Want to ensure USB-tethering does not switched off (Android 7)


Sep 30, 2021
I have a Samsung (6) running Android 7 which I am using for USB-tethering (on a Raspberry Pi 4).

For (to me) unknown reasons the USB-tethering is occasionally switched off (=not only at re-boot of the device).

I was thinking that it would be great if I could create some sort of little process which makes sure to switch on USB-tethering every 30 seconds or so.

I have done some google script programming, but have no idea how to approach this issue on an Android device.

Any sort of suggestions if this is doable and how I could/should start would be most appreciated, but please remember I am a beginner and I do not intend to become an Android programmer.

Also: the device is not rooted (whatever that means).

Thank you.