Android adb 更新非市场 apk?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2414786/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
adb update a non-market apk?
提问by lostInTransit
Is there a way we can update(not reinstall) a non-market apk on an Android device? I could only find an adb install (nothing like adb update)
有没有办法可以在 Android 设备上更新(而不是重新安装)非市场 apk?我只能找到 adb 安装(不像 adb 更新)
回答by Vidar Vestnes
adb install -r
is the closest you get, that is actually an update as it keeps the database and stored preferences. If you uninstall/re-install both the app database and preferences is deleted. What exactly are you trying to update about the app that -r option does not help you with ?
adb install -r
是您得到的最接近的,这实际上是一个更新,因为它保留了数据库和存储的首选项。如果您卸载/重新安装应用程序数据库和首选项都会被删除。你到底想更新什么 -r 选项对你没有帮助的应用程序?
回答by Waleed Abdalmajeed
adb install -r
didn't work for me. So, I did a little workaround.
adb install -r
对我不起作用。所以,我做了一些解决方法。
Uninstall app but keep the data by using
adb uninstall -k com.packagename
. This will uninstall the app but keeps the data. See thisInstall the app again using
adb install package.here
.
卸载应用程序,但使用
adb uninstall -k com.packagename
. 这将卸载应用程序但保留数据。看到这个使用 再次安装应用程序
adb install package.here
。
Note:You must have root access to execute this commands.
注意:您必须具有 root 访问权限才能执行此命令。
回答by Thierry
To reinstall a downgraded version of app, use this command:
要重新安装降级版本的应用程序,请使用以下命令:
abd install -d -r package.apk
回答by elazarik
The easiest way to do it exactly like market apk, is to download the APK to your phone (i.e. download from Google Drive or from email) and then click on the APK in the Downloads library
与市场 apk 完全相同的最简单方法是将 APK 下载到您的手机(即从 Google Drive 或电子邮件下载),然后单击下载库中的 APK