Monday, November 13, 2017

Help with this ADB REVERSE Tethering Script?



I added the functionality to automatically turn on reverse tethering after many fails:


Now i only enter t into terminal


alias t='r && sz $tether && r && sz $n'
tether='am start -n com.android.settings/com.android.settings.TetherSettings && input keyevent 66 && input keyevent 66'
n='netcfg rndis0 dhcp'
alias sz='ad shell'
alias de='ad devices -l'
alias r='ad kill-server && ad start-server'
alias ad='adb'
alias pu='adb push'


The issues with the above are: (2 is most important)




  1. This only works with the screen on and when notification bar isn't pulled down




  2. This doesn't simulate wi-fi/other wirelessnetworking or make apps actually try to connect to net instead of checking if wifi/other wirelessnetworking is enabled





  3. This code can most probably be much shorter/optimized (but at least it works)





To understand the background better please see my original question:I can reverse tether now by using alias but it stops on adb shell command





No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...