Digitizer broken, screen ok. Help me set up ADB for input

Search This thread

martin_henry

Member
Feb 18, 2014
25
9
Dropped my phone this morning (~80cm) & screen cracked; now I've got no response from touchscreen at all.

LG Optimus G
CWM 6.0.4.7
Cyanogenmod 11
all data backed up

I can access ADB shell when it's in recovery mode but once booted up it just connects as MTP device and ADB doesn't see it (nor does fastboot). I've tried an OTG cable with mouse, no luck there. I have a bluetooth mouse but no way to pair it!

Do I just have the wrong driver in windows? Device manager says "LGE Android MTP Device" because I had (at some point earlier) installed the LG usb drivers and recovery tool.
 

Attachments

  • lge_mtp.png
    lge_mtp.png
    20 KB · Views: 5,891
Last edited:

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
You don't have debugging on is my best guess, but if you're just trying to pull some files you can do this through recovery. Or is there another reason you want adb on while in os?

Sent from my Nexus 7 using XDA Premium 4 mobile app
 
  • Like
Reactions: martin_henry

martin_henry

Member
Feb 18, 2014
25
9
You don't have debugging on is my best guess, but if you're just trying to pull some files you can do this through recovery. Or is there another reason you want adb on while in os?

Sent from my Nexus 7 using XDA Premium 4 mobile app

Correct, I don't believe it was enabled in android os. I was hoping to use Screencast or ADB or something to control my phone until I get a chance to order a new screen
 

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
you can try this
boot to recovery
use adb to pull build.prop
Code:
adb pull /system/build.prop /location/on/pc
add these lines (or change accordingly if present)
Code:
persist.service.adb.enable=1                                                    
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
now push it back
Code:
adb push location/on/pc/build.prop /system/build.prop
and fix permissions in recovery or
Code:
adb shell
su
chmod 644 build.prop
or try just editing it in a shell like
Code:
adb shell
su
mount -o remount,rw /system
cd /
echo "persist.service.adb.enable=1" >> default.prop 
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop 
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
then reboot

either method i would suggest doing a backup in recovery first, just in case, but should be fine
best of luck!
 
  • Like
Reactions: martin_henry

martin_henry

Member
Feb 18, 2014
25
9
you can try this
boot to recovery
use adb to pull build.prop
Code:
adb pull /system/build.prop /location/on/pc
add these lines (or change accordingly if present)
Code:
persist.service.adb.enable=1                                                    
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
now push it back
Code:
adb push location/on/pc/build.prop /system/build.prop
and fix permissions in recovery or
Code:
adb shell
su
chmod 644 build.prop
or try just editing it in a shell like
Code:
adb shell
su
mount -o remount,rw /system
cd /
echo "persist.service.adb.enable=1" >> default.prop 
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop 
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
then reboot

either method i would suggest doing a backup in recovery first, just in case, but should be fine
best of luck!

Here's what I got:
Code:
G:\android sdk\sdk\platform-tools>adb devices
List of devices attached
01a9a0f610c750f6        recovery


G:\android sdk\sdk\platform-tools>adb root
adbd is already running as root

G:\android sdk\sdk\platform-tools>adb pull /system/build.prop C:\testing\
remote object '/system/build.prop' does not exist

G:\android sdk\sdk\platform-tools>

so then I tried:
Code:
G:\android sdk\sdk\platform-tools>adb shell
~ # ls
ls
boot               external_sd        property_contexts  storage
cache              file_contexts      recovery           sys
charger            fstab.geehrc       res                system
data               init               root               tmp
datadata           init.rc            sbin               ueventd.geehrc.rc
default.prop       initlogo.rle888    sd-ext             ueventd.rc
dev                internal_sd        sdcard
emmc               mnt                seapp_contexts
etc                proc               sepolicy
~ # cd system
/system # /system # ls -R -l
ls -R -l
.:
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
drwxr-xr-x    2 root     root             0 Jan  1  1970 bin

./bin:

Then I found default.prop in ./ (http://pastebin.com/RFyhMJe9) and added the first two lines you suggested (it already had usb.config=mtp,adb) but rebooted and no USB debugging. Booted back into recovery and the lines I added were gone.
 
Last edited:

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
You may need to mount /system r/w first as its protected its possible that it won't allow you to pull it otherwise... Can't recall
Default.prop I believe will often do this upon reboot as its part of the ramdisk. To fully edit this try looking at this
http://android-dls.com/wiki/index.p...t,_and_Re-Pack_Boot_Images#Alternative_Method
But really you just need to look for the build.prop
Just follow the part where I said edit in shell from above, this should work

Sent from my Nexus 7 using XDA Premium 4 mobile app
 

martin_henry

Member
Feb 18, 2014
25
9
You may need to mount /system r/w first as its protected its possible that it won't allow you to pull it otherwise... Can't recall
Default.prop I believe will often do this upon reboot as its part of the ramdisk. To fully edit this try looking at this
http://android-dls.com/wiki/index.p...t,_and_Re-Pack_Boot_Images#Alternative_Method
But really you just need to look for the build.prop
Just follow the part where I said edit in shell from above, this should work

I'll try that. Is there a find command I could use to find build.prop? I'm out of ways to look for build.prop, as I couldn't find it in /system or /sys.
 
Last edited:

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
It should be in /system , never seen it elsewhere. Maybe grab the build.prop from the ROM you are running (like direct from a download of the ROM, just unzip) edit this and push it in place, then fix permissions

Sent from my Nexus 7 using XDA Premium 4 mobile app
 

martin_henry

Member
Feb 18, 2014
25
9
You may need to mount /system

Bingo! looked in CWM recovery settings and found "Mount /system"
Once I did this, I could see all the files in /system, including build.prop. I updated build.prop and checked file persmissions (they were already correct, wierd). Rebooted, now ADB can see it:
Code:
>adb devices
List of devices attached
01a9a0f610c750f6        unauthorized
and when I try to run screencast (https://code.google.com/p/androidscreencast/) I get a bunch of java errors, including this:
Code:
java.io.IOException: device (01a9a0f610c750f6) request rejected: device unauthorized. Please check the confirmation dialog on your device.
If I try to send a keyevent, I get a similar message:
>adb shell input keyevent 3
Code:
error: device unauthorized. Please check the confirmation dialog on your device.

Realized this meant my PC wasn't authorized, so I followed these instructions: http://stackoverflow.com/questions/...ithout-previous-usb-pairing/15747430#15747430
and now I'm authorized!
 
Last edited:

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
Glad it worked out for you! Check out droid explorer and android commander, both should work well for you and have some more advanced options besides just screen cast

Sent from my Nexus 4 using XDA Premium 4 mobile app
 
  • Like
Reactions: martin_henry

martin_henry

Member
Feb 18, 2014
25
9
Thanks again, demkantor! I'll give those a try, since screencast only displays on my PC, none of the controls seem to work, and running commands like below are pretty slow:
Code:
adb shell input swipe 390 1100 650 1100 [I] (unlock swipe)[/I]
adb shell input keyevent 3 [I](home button)[/I]
[CODE]


EDIT:
Tried those but they both seem depricated and old. I got AirDroid which isn't exactly remote control but allows reading/writing of texts among other things, and works whenever you get on wifi.
 
Last edited:

briguy15

Senior Member
Dec 27, 2012
82
2
I am trying to do the same thing but I do not know how to append the line I got from my PC. As well on my LG e970 which has not been ever authorized I keep getting the error that there is no directory for /data/misc/adb/adb_keys and I have CWM too in which I have also mounted the data partition. Please help!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    You don't have debugging on is my best guess, but if you're just trying to pull some files you can do this through recovery. Or is there another reason you want adb on while in os?

    Sent from my Nexus 7 using XDA Premium 4 mobile app
    1
    you can try this
    boot to recovery
    use adb to pull build.prop
    Code:
    adb pull /system/build.prop /location/on/pc
    add these lines (or change accordingly if present)
    Code:
    persist.service.adb.enable=1                                                    
    persist.service.debuggable=1
    persist.sys.usb.config=mtp,adb
    now push it back
    Code:
    adb push location/on/pc/build.prop /system/build.prop
    and fix permissions in recovery or
    Code:
    adb shell
    su
    chmod 644 build.prop
    or try just editing it in a shell like
    Code:
    adb shell
    su
    mount -o remount,rw /system
    cd /
    echo "persist.service.adb.enable=1" >> default.prop 
    echo "persist.service.debuggable=1" >> default.prop
    echo "persist.sys.usb.config=mtp,adb" >> default.prop
    echo "persist.service.adb.enable=1" >> /system/build.prop 
    echo "persist.service.debuggable=1" >> /system/build.prop
    echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
    then reboot

    either method i would suggest doing a backup in recovery first, just in case, but should be fine
    best of luck!
    1
    Glad it worked out for you! Check out droid explorer and android commander, both should work well for you and have some more advanced options besides just screen cast

    Sent from my Nexus 4 using XDA Premium 4 mobile app