Installation failed due to invalid APK file
2013-08-21 09:04
316 查看
root过了手机,发现再次安装程序出现了 Installation failed due to invalid APK file
这样的错误,后来再看logcat 发现是
Unable to open zip '/data/local/tmp/QuanZi.apk': Permission denied
这样的原因,但是将data/local/tmp 的权限修改了发现还是不行,最后通过查找,发现使用软连接的方式,将/data/local/tmp 到 /mnt/sdcard/tmp 这个下面,发现就可以了,也就是以后我的这个手机程序的安装都首先要在sdcard下安装了
ln -s /mnt/sdcard/tmp /data/local/tmp 下面的查找的资料
I got exactly the same problem, and this solution fixed it, so i hope it does for you too.
The reason for "permission denied" is that apk files uploaded to /data/local/tmp had to low permissions, 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. So open a terminal emulator on your phone. Get root ("su") and type in:
# cd /data/local
# mv tmp tmp-old # (or simply rm -rf tmp)
# mkdir /mnt/sdcard/tmp
# ln -s /mnt/sdcard/tmp ./tmp
这样的错误,后来再看logcat 发现是
Unable to open zip '/data/local/tmp/QuanZi.apk': Permission denied
这样的原因,但是将data/local/tmp 的权限修改了发现还是不行,最后通过查找,发现使用软连接的方式,将/data/local/tmp 到 /mnt/sdcard/tmp 这个下面,发现就可以了,也就是以后我的这个手机程序的安装都首先要在sdcard下安装了
ln -s /mnt/sdcard/tmp /data/local/tmp 下面的查找的资料
I got exactly the same problem, and this solution fixed it, so i hope it does for you too.
The reason for "permission denied" is that apk files uploaded to /data/local/tmp had to low permissions, 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. So open a terminal emulator on your phone. Get root ("su") and type in:
# cd /data/local
# mv tmp tmp-old # (or simply rm -rf tmp)
# mkdir /mnt/sdcard/tmp
# ln -s /mnt/sdcard/tmp ./tmp
相关文章推荐
- SDK运行Android项目是出现Installation failed due to invalid APK file!解决方法
- Installation failed due to invalid APK file!问题
- Installation failed due to invalid APK file!问题
- Installation failed due to invalid APK file!解决办法
- Installation failed due to invalid APK file!问题
- 安卓真机调试出现Installation failed due to invalid APK file!错误的解决办法
- Installation failed due to invalid APK file!
- Installation failed due to invalid APK file!问题解决
- android Installation failed due to invalid APK file 错误
- 关于解决Installation failed due to invalid APK file! Please check logcat output for more details.Launch
- (个人笔记)Installation failed due to invalid APK file!问题
- 解决Installation failed due to invalid APK file!问题
- android Installation failed due to invalid URI! 错误处理
- Installation failed due to invalid URI!问题的解决
- android Installation failed due to invalid URI! 错误处理
- Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK: Split lib_slice_8_apk was defined multiple times. It is possible that this issue is resolved by uninstalling a
- android Installation failed due to invalid URI! 错误处理
- android Installation failed due to invalid URI! 错误处理
- Android 模拟机出现Installation failed due to invalid URI!错误
- android Installation failed due to invalid URI! 错误处理