-
-
Save satyamisme/b6427845bc877c40ed8b2e2505577c38 to your computer and use it in GitHub Desktop.
MIUI 「USB安装」免登录账号
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
setprop persist.security.adbinput 1 | |
setprop persist.security.adbinstall 1 | |
provider_prefs_xml=/data/data/com.miui.securitycenter/shared_prefs/remote_provider_preferences.xml | |
provider_prefs_tmp_xml=/data/local/tmp/remote_provider_preferences.xml | |
sed -e "/security_adb_install_enable/d;/permcenter_install_intercept_enabled/d" $provider_prefs_xml > $provider_prefs_tmp_xml | |
sed -i "/<\/map>/i\ \ \ \ <boolean name=\"security_adb_install_enable\" value=\"$1\" />" $provider_prefs_tmp_xml | |
sed -i "/<\/map>/i\ \ \ \ <boolean name=\"permcenter_install_intercept_enabled\" value=\"$2\" />" $provider_prefs_tmp_xml | |
diff $provider_prefs_xml $provider_prefs_tmp_xml | |
cp $provider_prefs_tmp_xml $provider_prefs_xml && rm $provider_prefs_tmp_xml | |
chmod 660 $provider_prefs_xml | |
chown system:system $provider_prefs_xml | |
chcon u:object_r:system_app_data_file:s0 $provider_prefs_xml | |
am force-stop com.miui.securitycenter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment