Set *Restrict USB* > *Deny USB connections*/*Allow USB connections when unlocked* with adb
#22
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Related to Benjamin-Loison/android/issues/{139,140}.
+102
Set *Restrict USB* > *Deny USB connections* with `adb`to Set *Restrict USB* > *Deny USB connections*/*Allow USB connections when unlocked* with `adb`DuckDuckGo and Google search
"adb" "Restrict USB"first page of results does not seem to help.Related to Benjamin_Loison/Voice_assistant/issues/18#issuecomment-4414577.
Bash script:
Output:
No matter Restrict USB I face
usb_mass_storage_enabled=1.Output:
Output:
does not help experimentally.
adb rootdoes not help, see #39#issuecomment-3991.Could just proceed automatically graphically, see Benjamin_Loison/Voice_assistant/issues/46.
Related to Benjamin_Loison/Backup_Android_apps/issues/40.
Related to Benjamin-Loison/android/issues/28#issuecomment-3902625664.
https://chat.mistral.ai/chat/9ab408ba-dd8b-4454-aacf-db4d00ada110
does not change, as mentioned in #issuecomment-3944. Especially as there are 3 states.
Same for:
Output:
I verified that both
globalusb_restricted_modeandsecureusb_restrict0and1do not disconnect me withadb shell whoamicontrarily to manually setting to Deny USB connections.https://chat.mistral.ai/chat/159c960e-e7e1-4d67-a4ea-f7eba642e291
does not help.
https://chatgpt.com/share/6994f885-148c-8002-b3b1-c042967a9823
solved my issue, parentheses are needed.
Otherwise I would have used:
DuckDuckGo search Bash execute string.
The Stack Overflow answer 2005201 helps.
~/.bashrcexcerpt:always worked fine from my multiple tests.
None of:
and
achieve executing the second command while:
Output:
works as wanted.
DuckDuckGo search ADB disable Rooted debugging.
Alex4SSB/ADB-Explorer/issues/181
does not return anything and does not block
adb shell whoamiroot.Google search ADB disable Rooted debugging.
https://chat.mistral.ai/chat/c31140fc-ec5f-4430-8c77-f0674e4a9115
disable-verityandsetenforceis not explained and looks suspicious to me.https://chatgpt.com/share/699790fb-49a8-8002-9113-d3b855fbb0e1
does not help.
Bash script:
does not return anything as
root.Disabling graphically does not seem trivial notably due to temporary:
after disabling graphically.