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 | |
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" $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 |
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
function _add_win_paths() { | |
local _win_paths=( | |
/mnt/c/Windows/ | |
/mnt/c/Windows/system32/ | |
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/ | |
/mnt/d/Program\ Files/Microsoft\ VS\ Code/bin/ | |
/mnt/d/Users/$USER/AppData/Android/Sdk/platform-tools/ | |
) | |
for p in $_win_paths; do | |
export PATH=$PATH:$p |