Skip to content

Instantly share code, notes, and snippets.

@ilhan-athn7
Created July 31, 2026 04:07
Show Gist options
  • Select an option

  • Save ilhan-athn7/024df1ba48f8f3feee3b510da03af548 to your computer and use it in GitHub Desktop.

Select an option

Save ilhan-athn7/024df1ba48f8f3feee3b510da03af548 to your computer and use it in GitHub Desktop.
Hide USB debugging
#!/bin/sh
resetprop -w sys.boot_completed 0
hide_usb_debug() {
while true; do
resetprop -w init.svc.adbd stopped
resetprop init.svc.adbd stopped
resetprop init.svc_debug_pid.adbd ""
resetprop -d ro.boottime.adbd
resetprop -c
done
}
hide_usb_config_1() {
while true; do
resetprop -w persist.usb.config mtp
resetprop -d persist.usb.config
resetprop -c
done
}
hide_usb_config_2() {
while true; do
resetprop -w persist.sys.usb.config mtp
resetprop -d persist.sys.usb.config
resetprop -c
done
}
hide_usb_config_3() {
while true; do
resetprop -w sys.usb.config mtp
sleep 1
resetprop sys.usb.config mtp
resetprop sys.usb.state mtp
resetprop -c
done
}
hide_usb_debug & hide_usb_config_1 & hide_usb_config_2 & hide_usb_config_3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment