亚行卸载失败 [英] adb uninstall is failed

查看:147
本文介绍了亚行卸载失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写示例应用程序。之后,我调试这些应用程序,我没有看到在applciation管理卸载按钮。当我做亚行卸载,它总是说失败没有任何理由。从DDMS我看到我的apk文件存储在/data/app/com.k2g.leaveDemo-1.apk。 我不知道我米缺少的是什么。我总是要重置我的设备来摆脱这些应用程序:(

I am writing sample apps. After i debug these apps, i don't see uninstall button in applciation management. When i do adb uninstall, it always say Failure without any reason. from DDMS i saw that my apk is stored in /data/app/com.k2g.leaveDemo-1.apk. I am not sure what I m missing. I always has to reset my device to get rid of these apps:(

,我需要做一些与签名?我需要做一些与调试模式?或者是它的版本不同,我使用的三星S2。

Do i need to do something with Signing? Do i need to do something with debugging mode? or is it version difference, I am using Samsung S2.

谢谢 K2G

推荐答案

是的,移动设备管理将带来其自身的问题,但我敢打赌,失败是一个DOS2UNIX的问题。在我的Linux机器上,亚行追加一个DOS换行符导致,因为卸载认为CR字符的包名称的一部分失败。同样来自包1.apk文件名末尾删除-1.apk。

Yes, mobile device management would bring its own problems, but i bet 'Failure' is a dos2unix problem. On my Linux machines, adb is appending a DOS newline which causes 'Failure' because uninstall thinks the CR character is part of the package name. Also remove '-1.apk' from the end of the package-1.apk filename.

adb root
adb shell
pm list packages
pm uninstall com.android.chrome

在我的情况,我有一个手机,是永久的安全模式,因此只有在应用程序/系统/应用/有运行的机会。所以,我安装它们获得的apk文件复制了,然后卸载散装和复制到/系统/应用/擦拭/高速缓存和重新启动。现在我有运行,即使在安全MDOE更多的应用程序。

In my case, i have a phone that is in permanent 'Safe mode' so only apps under /system/app/ have a chance of running. So i install them to get the .apk files copied off, then uninstall in bulk and copy to /system/app/, wipe the /cache and reboot. Now i have more apps running even though in safe mdoe.

# adb root
# pm list packages -3 > /root/bulkuninstall.txt
# vi /root/bulkuninstall.txt  and check ^M characters at end of each line.   
   If ^M, then must run dos2unix /root/bulkuninstall.txt.  
   Remove '-1.apk' using vi search and replace:  
        :%s/-1\.apk//g 
   Or sed...

# cp /data/app/* /storage/sdcard1/APKs/
# for f in `cat /root/bulkuninstall.txt`; do echo $f; pm uninstall $f; done;
# 
# echo Now remount system and copy the APK files to /system/app/
# mount | grep system
# mount -o remount,rw /dev/block/(use block device from previous step)  /system 
# cp /storage/sdcard1/APKs/* /system/app/
# reboot

擦拭缓存   电源。

wipe cache power on.

这篇关于亚行卸载失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆