Switch USB-tethering with ADB hack?

meute

Member
Hi,

I did the ADB hack.
Can I use it to switch USB-tethering?

To switch mobile data is currently possible.

Bye
meute
 

meute

Member
If there is any setting in settings.system, settings.global or settings.secure then it is possible however, this varies between devices.

This app wil give you a broad overview of the settings tables. You can also set them as a test. You will learn quite a lot about your device https://play.google.com/store/apps/details?id=by4a.setedit22
Now I installed this app.
I see in "System Table" this parameter:
"usb_tethering_enabeld" "0"

What does that mean?
Can Macrodroid switch the parameter?
 

Jacob L

Moderator (Lawsonator)
Yes. Find this value in the system setting action of MacroDroid and set the value to 1 and it should be on
 

MacroDroidDev

Administrator
Staff member
Although be aware there is no guarantee that just changing a particular parameter will always function as you expect. In some cases the value might only have an effect if you reboot your device or might not have any noticeable impact at all in some cases.
 

meute

Member
Now I installed this app.
I see in "System Table" this parameter:
"usb_tethering_enabeld" "0"
Find this value in the system setting action of MacroDroid and set the value to 1 and it should be on
I created a macro.
Trigger: USB device connected
But the macro does not react when you plug the smartphone into the PC via a USB cable.
Does somebody has any idea?
 

Pseudocyclic

Well-known member
I created a macro.
Trigger: USB device connected
But the macro does not react when you plug the smartphone into the PC via a USB cable.
Does somebody has any idea?
Test the trigger and the action independently and confirm what is working and what is not.
 

MacroDroidDev

Administrator
Staff member
Your PC is not a "USB device". This trigger works with USB slave devices such as memory sticks, keyboards and other peripherals.

It should trigger when you use the external power connected, but there is no way that I know of to detect this as different from a charger cable.
 

Jacob L

Moderator (Lawsonator)
Or you could use notification received trigger to achieve this, for example if you have USB debugging enabled. If not, it should still display a notification to which allows you to switch USB mode between charge, MIDI or file transfer. This will vary per manufacturer however.
 

meute

Member
Or you could use notification received trigger to achieve this, for example if you have USB debugging enabled. If not, it should still display a notification to which allows you to switch USB mode between charge, MIDI or file transfer. This will vary per manufacturer however.
Sorry, but i don't understand your solution.
Please can you describe in more detail how the macro has to be configured.
 
Top