jogerj / block-clipboard-android

Block clipboard permission to certain apps via ADB in Termux. Requires Android 10 or above.
MIT License
17 stars 0 forks source link

usb debugging is enabled and trusted for this computer, but nothing is going on #5

Open coding-garden-1 opened 3 months ago

coding-garden-1 commented 3 months ago

... ~/block-clipboard-android$ sudo ./disable_clipboard.sh Enter hostname or IP address: [localhost] disconnected everything restarting in TCP mode port: **** Click on Allow when prompted. If no prompt pops up, disable and re-enable USB debugging. Press ENTER to continue... Connection refused Failed to connect to adb server.

jogerj commented 3 months ago

Seems to be issue with wireless ADB. Have you tried connecting by usb? You can then run the rest of the commands manually

coding-garden-1 commented 3 months ago

It was by usb actually haha, no biggie

jogerj commented 1 month ago

sorry it took a while to get back to you. When I wrote the script and guide, it was with wireless ADB in mind + connecting locally without a computer. I also didn't spend much time in handling all the edge cases. If you are connected with a computer over USB, then it's way simpler. All you need is the following:

  1. Run cmd appops query-op --user 0 READ_CLIPBOARD allow to query packages requiring clipboard function.
  2. Run cmd appops set com.example.foo READ_CLIPBOARD ignore, replace com.example.foo with the package name.