Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24459

Android: Can’t remove unused permissions from AndroidManifest.xml using Ti SDK 6.x

    Details

    • Story Points:
      5
    • Sprint:
      2017 Sprint 06 SDK

      Description

      In an Alloy project I have a custom AndroidManifest.xml at app/platform/android without any tags <uses-permission>.

      In app/controllers/index.js I have this only line:

      alert('hello world!');
      

      On tiapp.xml I have:

      <analytics>false</analytics>
      

      and

          <android xmlns:android="http://schemas.android.com/apk/res/android">
              <abi>armeabi-v7a</abi>
          </android>
      

      When I build with SDK 5.5.1 the resulted AndroidManifest.xml at build/android folder has no tags <uses-permission> as expected.

      But when a build using any SDK >= 6.0, the resulted AndroidManifest.xml at build/android folder has this unused permissions:

      	<uses-permission android:name="android.permission.INTERNET"/>
      	<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
      	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
      	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
      	<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
      	<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
      	<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/>
      

      When I build for distribution, the three “ACCESS_” are removed from the manifest.

      It will be very appreciated if we can choose one of two options, maybe whith a special tag in tiapp.xml:

      1) Having only permissions needed automatically added to final AndroidManifest.xml

      or

      2) Indicating that we want to replace completely the final AndroidManifest.xml

      But none of them are possible using SDKs 6.x.

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              dirleidionisio Dirlei Dionísio
              Reviewer:
              Maggie Chen
              Tester:
              Josh Longton
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-10527
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration