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

mortpiedra

New member
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 (at re-boot of the Samsung or Raspi 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.

In my search for a possible solution I found a myriad of technologies out there who all seem to do something. For me obviously the question is what solution makes sense for me to attempt.

Of the alternatives out there it seems to me as if MacroDroid could be the right thing and hence my question: is MacroDroid suitable/recommendable for what I am trying to accomplish?

I have done some google script programming, so I have some basic programming skills and I do not intend to become an Android programmer.

Here is a flowchart showing what I am trying to accomplish ( https://forum.xda-developers.com/t/...ring-does-not-switched-off-android-7.4341047/ ) from Slim K who actually recommended 'Automate' in his answer to this very same question.

1633261626467.png

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

mortpiedra

New member
Thanx for your answer J.
I rooted the device and granted MD superuser access.
I added a macro with the shell command

svc usb setFunctions rndis

This should do it, right?
Unfortunately when I test the action nothing happens.

I can turn USB-tethering on and off manually so the device is connected.

I also tried including above command as a 'system setting'

The log shows that the command is executed.

Any suggestions out there?
 

mortpiedra

New member
Also tried

svc usb setFunction rndis (as shell)

and

[setting_system=usb_tethering_enabled] (as system)

do not work :-(
 
Last edited:

Jacob L

Moderator (Lawsonator)
There is a built in action for this but none of this will work unless you are rooted
 

420

Active member
U mean like this?View attachment 1081
Does not work either :-(
Nah, it is it's own seperate action named "USB Tethering", if you don't see it it is probably because root features are hidden by default.

So then you should go into macrodroid settings and tick the box behind "Enable Root Features", you should be able to see/use it then.
 

Attachments

  • Screenshot_20211004-211154.png
    Screenshot_20211004-211154.png
    204 KB · Views: 6

mortpiedra

New member
Nah, it is it's own seperate action named "USB Tethering", if you don't see it it is probably because root features are hidden by default.

So then you should go into macrodroid settings and tick the box behind "Enable Root Features", you should be able to see/use it then.
Yeeeeezzzzz rite on!
Thanx :)
 
Top