Default mode with USB, charging + USB Tethering? Is there anyway to make it so that my phone, when connected with a USB Data Cable to a computer automatically turns on USB Tethering?

Currently using Cyanogenmod 13.

I tried changing the option in Developer Options to RNDIS however it doesn't seem to work (by that I mean it doesn't seem to do what USB Tethering does), and it doesn't hold when I unplug and plug back in.
Is there anyway to make it so that my phone, when connected with a USB Data Cable to a computer automatically turns on USB Tethering?


Yes. Use automation. I successfully tested my solution using Automate v1.1.13 on CM13 (build:ZNH0EAO1QE).

You would need to make a flow and it should fairly look like this:

(Click an image to enlarge it)




Alternatively, you can use Tasker to detect the USB connection and then run this command with root access:

service call connectivity 30 i32 1