I hoped for slightly more testing (more completely different platforms)
Also you can see what AOSP/google did
EDIT/BUMP: Found nice script that employs two ways (rndis_init() - cmdline, will break state of networking on android || tether-toggle() - a touchy way by inserting key events)
https://github.com/medvid/android-tethe … ter/tether
Touch way could be potentially used as a way to unlock device by unauthorized person so i wish there was a better way to do that (like some nice intent that could be used directly from adb)
Perhaps somebody with nicer android skills could write an app that would do the same thing from intent and push it to F-droid repository? Or Xposed module?
Also udev is an issue for devices with limited memory - is there an other way to achieve hotplug for usb
Without that resolved there is not much need for adb in repo (bloat)
EDIT2: http://stackoverflow.com/questions/2022 … e-terminal
While it doesn't work on all devices ( http://android.stackexchange.com/questi … 8775#98775 ) It at least contains all never devices (> 4.x)
So i should now write most of the service files for openwrt and udev rules and perhaps other hotplug ways
Config will have to contain options:
Toggle_way:
• rndis (like rndis_init). device-side script will need to be added to make it revert settings on device unplug
• touch - pointing mostly to other file with touch script
• modern - >=4.x devices , version detection is needed, preferably a future-proof solution that extracts method number from device. Version detection: adb shell getprop ro.build.version.release
blacklist: 0 - whitelist , 1 - blacklist
id_list: list of white/blacklisted IDs (adb devices)
wifi_toggle: 0/1 whether to toggle wifi on android when plugging in (This could be more complicated because of 1. hotplug 2. [Multi]WAN status. 2nd should be probably done by MultiWAN anyway, this would allow for powering down 3G/4G dongles when emergency connection is not needed)
polling: (in seconds) periodic checks when not using udev, especially if i wont find alternative hotplug detection method
TODO: compare lsusb/kernel + VID/PID lists and adb devices polling efficiency/memory usage
Gingerbread should be also possible somehow… sadly my device has such functionality broken ^^' but i can at least check if it toggles on cyanogenmod7.2
https://github.com/CyanogenMod/android_ … nager.aidl (I'm not sure which method should be used no idea if even available)
As for patching adb - there has to be a better way to have app compile properly on big and lil endian without crazy ifdefs, especially since performance is not an issue for us
EDIT 2015-05-22: Package should be pushed to packages.git net/ (like ssh/mosh) or utils/ (like minicom and openocd)
Even though hotplug2 was replaced by procd, same scripts for usb hotplug have to be used
EDIT 2015-06-20: There is some issue again with signed adb - when replugging, device thinks that host is unauthorized even though it has whitelisted fingerprint. Using adbkey(.pub) generated on PC might help
(Last edited by swiftgeek on 20 Jun 2015, 01:25)