android - 是否有 ADB 命令可以更改已安装应用程序的高级设置?
问题描述
我一直试图找出一个使用 ADB 命令行的命令来更改我通过 ADB 安装的应用程序的高级设置。
安装后,我希望使用 ADB 命令将以下设置更改为“允许”:
这可能吗?
我想可能是:在这里找到
adb shell pm grant com.mycompany.mypackage INSTALL_NON_MARKET_APPS 1
解决方案
安装未知应用程序的命令是:
adb shell pm grant com.company.testapp android.permission.REQUEST_INSTALL_PACKAGES
这将失败,因为android.permission.REQUEST_INSTALL_PACKAGES
不是可更改的权限类型:
Operation not allowed: java.lang.SecurityException: Permission android.permission.REQUEST_INSTALL_PACKAGES is not a changeable permission type
也许有一种方法可以解决这个问题,我不知道。
推荐阅读
- ruby-on-rails - 具有 has_many 的表单中的列组件不起作用
- java - 在 lambda java 中将变量更改出 lambda 表达式范围
- ios - Swift 编译错误
- regex - oracle regex_replace
- node.js - 如何直接从 angular component.html 调用节点 api
- proxy - 如何获取代理服务器ip
- java - 在 Parse 中注册显示错误:com.parse.ParseUser.signUpInBackground()' 在空对象引用上
- java - Camel-Undertow 不适用于 SSL 配置:
- android - 如何更改 com.mancj.materialsearchbar.MaterialSearchBar 中的文本颜色
- oracle - BEGIN END 块 PL/SQL 中的 WITH 子句行为