[TIMOB-24459] Android: Can’t remove unused permissions from AndroidManifest.xml using Ti SDK 6.x
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-04-14T10:02:31.000+0000 |
Affected Version/s | Release 6.0.2 |
Fix Version/s | Release 6.1.0 |
Components | Android |
Labels | android-manifest, module_build, qe-6.1.0, regression |
Reporter | Dirlei Dionísio |
Assignee | Gary Mathews |
Created | 2017-03-07T01:00:59.000+0000 |
Updated | 2018-02-09T01:26:04.000+0000 |
Description
In an Alloy project I have a custom AndroidManifest.xml at app/platform/android without any tags .
In app/controllers/index.js I have this only line:
as expected.
But when a build using any SDK >= 6.0, the resulted AndroidManifest.xml at build/android folder has this unused permissions:
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 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.
master: https://github.com/appcelerator/titanium_mobile/pull/8881
{noformat} Mac OS Version : 10.12.3 Appc CLI : 6.1.0 Appc NPM : 4.2.9-1 Node : v4.6.0 Device: Nexus 5x(6.0.1) Pixel XL(7.1.2) Emulator: (6.0), (4.4.2) {noformat} Using above env passed FR. After merge, the changes are present in SDK
6.1.0.v20170328172120
. *Closing*[~gmathews] can you also back port this to 6.0.4 and set the FixVersion when complete?