ubports / ubuntu-touch-for-oneplus-one

Ubuntu touch for oneplus one
67 stars 19 forks source link

adb shell only works when device is unlocked #12

Closed wdehoog closed 9 years ago

wdehoog commented 9 years ago

When the device goes to 'sleep' (screen goes black) adb shell results in 'error: closed'. When you unlock the screen adb shell works normally. When you have a shell and the screen goes black again the shell remains working.

mariogrip commented 9 years ago

A workaround i did to make is work, is to start adbd at the boot process. due to security reasons, the adbd binary shipped with Ubuntu checks if the device's screen is unlocked, so you need to replace adbd with this unlocked one http://people.canonical.com/~ogra/adbd (sbin/adbd). also check if the installer made a file named adbd.conf inside /etc/init, if not copy this http://hastebin.com/epegacipor.sql into /etc/init and name it adbd.conf. This should start adb at boot logged into root.

wdehoog commented 9 years ago

The adbd.conf is there but adbd itself is located in /usr/bin. /sbin is on a mounted ro file system (/dev/loop0) and for remount I need sudo. So I guess I need to find a way to include it in the system.img or vivid tar.gz. How did you transfer adbd?

wdehoog commented 9 years ago

Using 'phablet-config writable-image' the system could be made system writable. Using adb the new 'adbd' could be transfered to the phone (I used /android/cache). Using sudo the file could be moved to /sbin. One can now 'adb shell' when the screen is dark and is then logged in as root.

wdehoog commented 9 years ago

Since it works with the work around you mentioned I'll close the issue.