Project Url: iternull/secure-if
More: Author   ReportBugs   

Secure I/F This application is used to control the Charge Connection and Data Connection of the Android USB interface.

This application can prevent unauthorized devices from connecting to your phone via USB to implant malicious viruses, can protect the charging safety in public places.

This application requires Root.


How is work

Control the USB function switch by modifying the kernel parameter parameters.

USB Charge

su -c 'echo 0 > /sys/class/power_supply/battery/charging_enabled'    // Disable USB Charge
su -c 'echo 1 > /sys/class/power_supply/battery/charging_enabled'    // Enable USB Charge

Not all Android phones are this path, so this feature only supports some phones.

USB Data Connections

su -c 'echo 0 > /sys/devices/virtual/android_usb/android0/enable'    // Disable USB Connections
su -c 'echo 1 > /sys/devices/virtual/android_usb/android0/enable'    // Enable USB Connections


This project is developed using Android Studio.

Also provided a Shell Script, Used for command line interface.


Download the latest release.


This is a private project.

℉ūck yōūr ōpéń $ōūrcé līcéń$é

Support Me
About Me
Google+: Trinea trinea
GitHub: Trinea