Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,811,344 Members 46,800 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
martin_henry
Old
(Last edited by martin_henry; 18th February 2014 at 03:49 AM.)
#1  
Junior Member - OP
Thanks Meter 0
Posts: 8
Join Date: Feb 2014
Prompt Digitizer broken, screen ok. Help me set up ADB for input

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.
Attached Thumbnails
Click image for larger version

Name:	lge_mtp.png
Views:	5477
Size:	20.0 KB
ID:	2585798  
 
demkantor
Old
#2  
demkantor's Avatar
Recognized Contributor
Thanks Meter 2,763
Posts: 5,788
Join Date: Nov 2011
Location: 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
The Following User Says Thank You to demkantor For This Useful Post: [ Click to Expand ]
 
martin_henry
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 8
Join Date: Feb 2014
Quote:
Originally Posted by demkantor View Post
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
Old
#4  
demkantor's Avatar
Recognized Contributor
Thanks Meter 2,763
Posts: 5,788
Join Date: Nov 2011
Location: 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!
The Following User Says Thank You to demkantor For This Useful Post: [ Click to Expand ]
 
martin_henry
Old
(Last edited by martin_henry; 19th February 2014 at 11:27 AM.)
#5  
Junior Member - OP
Thanks Meter 0
Posts: 8
Join Date: Feb 2014
Thank you! I will try when I get home
 
martin_henry
Old
(Last edited by martin_henry; 19th February 2014 at 02:02 PM.) Reason: more detail
#6  
Junior Member - OP
Thanks Meter 0
Posts: 8
Join Date: Feb 2014
Quote:
Originally Posted by demkantor View Post
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.
 
demkantor
Old
#7  
demkantor's Avatar
Recognized Contributor
Thanks Meter 2,763
Posts: 5,788
Join Date: Nov 2011
Location: 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.ph...rnative_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
Old
(Last edited by martin_henry; 19th February 2014 at 08:52 PM.)
#8  
Junior Member - OP
Thanks Meter 0
Posts: 8
Join Date: Feb 2014
Quote:
Originally Posted by demkantor View Post
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.ph...rnative_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.
 
demkantor
Old
#9  
demkantor's Avatar
Recognized Contributor
Thanks Meter 2,763
Posts: 5,788
Join Date: Nov 2011
Location: 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
Old
(Last edited by martin_henry; 20th February 2014 at 12:55 AM.)
#10  
Junior Member - OP
Thanks Meter 0
Posts: 8
Join Date: Feb 2014
Quote:
Originally Posted by demkantor View Post
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/1...47430#15747430
and now I'm authorized!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes