Skip to content Skip to sidebar Skip to footer

Permission Denied Causing "installation Failed Due To Invalid Apk File"

When I try to run my app on my Nexus 4 running 4.2.1, I kept on getting this error in eclipse: [2012-12-22 19:30:51 - Rhiokai] Installation failed due to invalid APK file! [2012-1

Solution 1:

I started receiving this error after rooting my phone.

The reason for "permission denied" is that apk files uploaded to /data/local/tmp had the -rw----- permission and owned by root, and the installer process obviously did not have permissions to read any such file.

I never found a solution, but have a workaround that satisfies me. I have simply moved/symlinked the tmp directory to the SD card. Since SD card is formatted as FAT, it does not have owners/permissions and all files created there are always readable by everyone.

# cd /data/local# mv tmp tmp-old # (or simply rm -rf tmp)# mkdir /mnt/sdcard/tmp# ln -s /mnt/sdcard/tmp ./tmp

Solution 2:

Annoyingly, the age old trick of turning the phone off and back on again worked

Solution 3:

If you already have a signed version of the application on the device with the same package name, you might need to uninstall it before re-installing it (unless you want to sign it again and then upload that signed app to the device).

Post a Comment for "Permission Denied Causing "installation Failed Due To Invalid Apk File""