How can I disable Android USB debugging programmatically

后端 未结 2 1500
囚心锁ツ
囚心锁ツ 2020-12-21 01:32

There is a bug on some Samsung Android Phones causing USB-debugging to automatically be turned on if the USB is plugged in. This is obviously a security issue. I want to wri

2条回答
  •  天命终不由人
    2020-12-21 02:14

    It seems to be impossible. I think I must use Settings.System with ADB_ENABLED, but ADB_ENABLED is a Secure-System-Setting which cannot be changed by a normal application. :-(

    On the other hand, there is the permission android.permission.WRITE_SECURE_SETTINGS, so it looks like I can alter it. Can I get it on a rooted phone?

    If someone has an idea on how to fix this security issue, it would be great.

提交回复
热议问题