当前位置:   article > 正文

允许安装第三方应用_settings put secure install_non_market_apps 1

settings put secure install_non_market_apps 1

Android 8.0以下
临时允许
设置

adb shell settings put secure install_non_market_apps 1
  • 1

查看

adb shell settings get secure install_non_market_apps
  • 1

可以获取状态

0为关闭,1为开启

永久打开

diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index dc8532ff..9f5e3ac7 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -38,7 +38,7 @@

    <bool name="def_bluetooth_on">true</bool>
    <bool name="def_wifi_display_on">false</bool>
-    <bool name="def_install_non_market_apps">false</bool>
+    <bool name="def_install_non_market_apps">true</bool>
    <bool name="def_package_verifier_enable">true</bool>
    <!-- Comma-separated list of location providers.
         Network location is off by default because it requires
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

Android 8.0以上
取消了永久授权,需要自APK自己申请相关权限.

可以参考:

https://www.jianshu.com/p/baa13455cd79
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/153058
推荐阅读
相关标签
  

闽ICP备14008679号