Tethering enabling mode is not safe
Implement this https://android.stackexchange.com/questions/171744/how-can-i-enable-usb-tethering-through-adb for enabling tethering instead of pressing buttons
Implement this https://android.stackexchange.com/questions/171744/how-can-i-enable-usb-tethering-through-adb for enabling tethering instead of pressing buttons