Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Programmaticslly 我想禁用 USB 数据读取。没有意义或目的。我只是想了解是否可能。为了澄清,我怎样才能禁用USB连接?(有点拔掉插头)
Use this command in android terminal emulator. Root priveleges required:
echo 0 > /sys/devices/virtual/android_usb/android0/enable
or...
su -c 'echo 0 > /sys/devices/virtual/android_usb/android0/enable'
根据下面接受的答案,目前不可能。
如何在 android 应用程序中以编程方式启用和禁用 USB