Android - Remove ACCESS_MOCK_LOCATION from Manifest
Is there a method to remove <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/> from AndroidManifest.xml without creating AndroidManifest.custom.xml but simply editing tiapp.xml?
Sdk: 1.6.3 (continuous build)
MAC OS X
APIs 1.6
2 Answers
- 
				
					
Well this will be removed within the next mobilesdk release see: Bug report
Otherwise the only way is to create your custom Manifest.xml file.
 - 
				
					
for those still running pre-1.8.x sdk, you can apply the patch yourself. Note: its usually terrible to modify a framework yourself, but the risk of that message to users outweighs that imo.
File: Titanium/mobilesdk/osx/1.7.5/android/builder.py
(note this varies by OS and version)@@ -653,11 +653,15 @@ def generate_android_manifest(self,compiler): 653 653 # NOTE: these are built-in permissions we need -- we probably need to refine when these are needed too 654 654 permissions_required = ['INTERNET','ACCESS_WIFI_STATE','ACCESS_NETWORK_STATE', 'WRITE_EXTERNAL_STORAGE'] 655 655 656 - GEO_PERMISSION = [ 'ACCESS_COARSE_LOCATION', 'ACCESS_FINE_LOCATION', 'ACCESS_MOCK_LOCATION'] 656 + GEO_PERMISSION = [ 'ACCESS_COARSE_LOCATION', 'ACCESS_FINE_LOCATION'] 657 657 CONTACTS_PERMISSION = ['READ_CONTACTS'] 658 658 VIBRATE_PERMISSION = ['VIBRATE'] 659 659 CAMERA_PERMISSION = ['CAMERA'] 660 660 WALLPAPER_PERMISSION = ['SET_WALLPAPER'] 661 + 662 + # Enable mock location if in development or test mode. 663 + if self.deploy_type == 'development' or self.deploy_type == 'test': 664 + GEO_PERMISSION.append('ACCESS_MOCK_LOCATION') 661 665 662 666 # this is our module method to permission(s) trigger - for each method on the left, require the permission(s) on the right 663 667 permission_mapping = {source: https://github.com/appcelerator/titanium_mobile/pull/445/files