首页 > 其他分享 >Android runInstallCreate from pm command asks to run as user -1 but is calling from user 0

Android runInstallCreate from pm command asks to run as user -1 but is calling from user 0

时间:2022-12-16 17:01:56浏览次数:56  
标签:run asks runInstallCreate user Android android pm

android使用pm静默安装

pm install -i “包名” -r apkPath

提示错误:

Android runInstallCreate from pm command asks to run as user -1 but is calling from user 0

随后查资料说是加上--user 0 

pm install -i “包名” --user 0 -r apkPath

返回了一个Failure [null]错误

Failure [null]:********************** 最后去查了pm安装的配置, 需要在AndroidManifest -> manifest中加上android:sharedUserId="android.uid.system",sharedUserId一致的apk允许静默安装。 最后测试我是发行成release版本测试。 安装成功!

 

标签:run,asks,runInstallCreate,user,Android,android,pm
From: https://www.cnblogs.com/wuxuemin/p/16987773.html

相关文章