使用ADB Shell安装.APK

发布于 2025-02-04 18:13:09 字数 112 浏览 1 评论 0原文

如何使用ADB Shell安装.APKS文件? 我尝试使用pm install/sdcard/testapp.apks,但它引发了错误。我什至尝试搜索谷歌搜索这个问题,但一无所获。

How do i install an .apks file using the adb shell?
I tried using pm install /sdcard/TestApp.apks but it threw an error. I've even tried googling the question but found nothing.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深居我梦 2025-02-11 18:13:09

要安装.apks文件, bundletool 需要。

命令是:

bundletool install-apks --apks=/MyApp/my_app.apks

当然,需要更改上面命令中的.apks文件位置。
如果您通过USB连接了Android手机,并且ADB可以通过USB在手机上安装APK,则thing Butletool命令将在手机中安装.APKS文件。

To install an .apks file, bundletool is needed.

The command is:

bundletool install-apks --apks=/MyApp/my_app.apks

Of course, it is needed to change the .apks file location in the command above.
If you have an android phone connected through usb and adb can install apks on the phone via USB, above bundletool command will install the .apks file in the phone.

拿命拼未来 2025-02-11 18:13:09

.apks文件不是Android构造。因此,Android OS不知道它,包括pm之类的命令。您将需要使用BETLETOLOL

An .apks file is not an Android construct. Hence, the Android OS does not know about it, including commands like pm. You will need to use bundletool.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文