Created
July 31, 2026 04:07
-
-
Save ilhan-athn7/024df1ba48f8f3feee3b510da03af548 to your computer and use it in GitHub Desktop.
Hide USB debugging
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 | |
| 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