I'm trying to remove permissions* from certain bank app to prevent abuse.

I've managed to download apk file using emulator (AVD) and appextractor. I've used toolapk to extract the apk file and modified AndroidManifest.xml, repacked it and signed the file using jarsigner.

The installation on my phone fails with "App not installed.". The situation is the same on fresh emulator instance (no gapps). I tried to install unmodified version of the app on emulator with the same error.

How to get a more descriptive error message? What am I missing?

My device is Galaxy Nexus running Cyanogen mod without gapps.

*contacts & call log reading, sdcard r/w, etc...

  • 2
    Install it using adb and also use logcat to get more descriptive information. What permissions are you trying to remove? Absence of permissions may cause instability for the app. See if the answers here provides a good alternative to whatever you're trying to achieve: Is it possible to install an app and exclude some of its requested permissions?
    – Firelord
    Mar 14 '16 at 16:35
  • 2
    An Android emulator ran from the computer (aside from Bluestacks) is an environment that's not the ideal to test an app. I recommend you to push the modified packages directly to your Nexus. Regarding the "App not installed." error, I can confirm that it's not depending upon any permission. It's typically generated from an error/mistake in the phase of recompiling/signing the APK, provided that your AndroidManifest.xml is syntactically correct. For this, and instead of the standard ApkTool, I recommend you to search for Apk-Multi-Tool, a semiautomated script plus tools.
    – Grimoire
    Mar 14 '16 at 18:15
  • logcat sugestion was very helpfull. @Firelord: if You post it an an answer I'll be able to accept it. It turns out that the app needs com.google.android.maps shared liblary. I'll have to make a placeholder.
    – lynx
    Mar 14 '16 at 23:38
  • 1
    @lynx: good to hear that. It is fine by me if you self-answer (not in the question but as a separate post on the same page using "Post Your Answer" button) your post. Please add in that answer whatever interesting or relevant info you found in the logcat, so that visitors in future would get to know what precisely to look for in the output.
    – Firelord
    Mar 14 '16 at 23:41

It turns out that the installation fails because missing shared library. Using aLogcat ROOT app from f-droid repo I was able to see following error:

E/PackageManager:( 1221): Package com.evil-bank requires unavilable shared library com.google.android.maps: failing!

One solution would be installing google maps app(or whole gapps package). I'm not going to test this one through.

Thanks to Firelord for pointing out using logcat.


If you use CyanogenMod, you don't need to remove Permissions from the APK. You can just go to Settings->Privacy->Manage App permissions after you installed the app and remove or add anything you want. Alternatively, which has even more control over the permissions (it can even be specific for which methods can be used) you can install the Xposed module XPrivacy (I have it installed and I use it a lot).

  • Are You absolutely sure that app will not be able to do anything malicious while being installed and before revoking the permissions? I think that modifying apk is more proper solution.
    – lynx
    Mar 14 '16 at 23:50
  • 2
    Not any permission can be revoked via the Privacy Manager. And yes, in the time frame between installation and revocation, it has enough time to play with.
    – Grimoire
    Mar 15 '16 at 1:40
  • Maybe I gave the wrong path, I'm German so I'm not sure how it's named in the English version. But it should absolutely be there, except you use an old version of CyanogenMod. In this case, XPrivacy does a better job even on older OS versions, the installation process is just a little mire advanced.
    – Namnodorel
    Mar 15 '16 at 19:25
  • And yes, it can't do anything as far as you don't start it, as explained here stackoverflow.com/questions/2227604/… - and the inbuild permission manager in CyanogenMod or XPrivacy are much more easy to use and don't require much time to configure perms.
    – Namnodorel
    Mar 15 '16 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.