Touchscreen is toast, list of things needed to still use the device

tfurrows

Member
Jun 15, 2011
58
11
Been a while since I've been here... my Coby Kyros MID8024 has been collecting dust. Currently, the touchscreen is toast (long story). But, it's still useful- if you can connect a mouse and/or keyboard. For that to happen, it has to be in USB Host Mode. By default, it is not.

Here is what I have:


  • MID8024 with a non-working touch screen
  • Powers on to lock screen
  • ADB shell access works, push, pull, etc
  • I have root access (psneuter) and can write to /

What I really need is a way to enable USB host mode through the shell. Try as I might, I can't find any way to do this. (NOTE: I am aware that setting it to host while connected to another host is BAD; I would use whatever method could be provided and run it at reboot.) I am already aware of one trick to do it, but it only works with the screen unlocked:

Code:
## Very manually setup the USB bus mode so the mouse will work.
am start -a android.settings.SETTINGS
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 23
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 20
input keyevent 19 & input keyevent 23

AND that can't really be run at boot, it has to be run when you're in the GUI (and did I mention unlocked?)

So in short, any help with anything in the following list would be awesome. Thanks.


  • adb method to unlock the screen
  • adb method to set the usb host mode
  • file system method to set the default host mode (config file?)

Many thanks!
 
Ok, I found and tested one working way to change to host mode from the command line on the MID8024:

Code:
echo 1 > /proc/power_gpio/switch_usb_otg

Now I just need to find a way for it to happen on boot. I put it at the end of /init.rc and tried /init.smdkv210.rc but that didn't seem to do it... any hints?
 
Last edited:
I also tried this in the /init.rc file, but nothing... not so much as a flash of the LED on the mouse during boot:

Code:
write /proc/power_gpio/switch_usb_otg 1
 
Ok, some simple oversights on my part here. To enable USB Host Mode at boot time on Coby Kyros MID8024, simply:


  1. Setup ADB and root access (outside the scope of THIS post)
  2. adb shell pull /init.rc
  3. Add "write /proc/power_gpio/switch_usb_otg 1" to the init.rc file (I added it up where all the rest of the proc stuff is written)
  4. adb shell push init.rc /
  5. adb shell chmod a+x /init.rc
  6. adb shell chown 1001:1001 /init.rc
  7. Reboot

Apparently when I modified/pushed my init.rc it was changing the perms and such. My MID8024 now goes into host mode by default when rebooted. While this could prove disastrous (we're talking fried controllers) if I plug it into a PC without changing the setting back, it allows me to use the Kyros with a mouse/keyboard now by default, which is critical to this thing being worth a dime since the touchscreen is hosed.

To change the setting back while you're on the tablet, just go to settings>advanced>usb host mode (on the MID8024 this setting is there, on some tablets/builds it is NOT).


NOTES:

Setting the usb mode seems to be different on various tablets. the /proc/power_gpio/switch_usb_otg may not exist for other tablets/builds. My advise would be to Google your specific tablet or go to your tablet root and run ls -R > files.txt and sort through files.txt to see what you can find in the file system (that's how I found switch_usb_otg).
 
Back
Top