2

So I downloaded an app from the web today, but it had some permissions I was uncomfortable with granting. So, I used APKTool to decompile the APK, removed the suspicious permission from the manifest, and recompiled + resigned the APK. Then, I downloaded the modified APK on my phone.

Does this approach work? My understanding is that now the app will crash if it tries to do something requiring that permission.


*PS: The reason I did this was because the permission to remove (CHANGE_WIFI_MULTICAST_STATE) did not show under settings/app Permissions of my phone. It only showed up under "All Permissions," where I couldn't simply disable it.

  • 1
    It may work if the APK is not protected against repackaging and as long as you don't execute the function that makes use of the permission. If you do the app may crash or ignore the error just as the developer implemented it. – Robert May 23 at 18:46
  • @Robert my question is, how can the developer ignore that error? If the permission no longer exists, and the app tries using it, shouldn't it always crash? – Ruchir Baronia May 24 at 1:59
  • Android apps are usually programmed in Java and Java allows to encapsulate code in try-catch blocks that allow to catch all errors. The problem is that if the programmer does not expect an error such a try-catch block is often not used. Hence it depends if the programmer was programming very carefully or not. – Robert May 24 at 10:10
1

It will surely remove the permission, but the moment code inside the program executes a function that requires that permission, the app will crash as a result.

| improve this answer | |

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.