[SOLVED] - Manually enable adb debugging from recovery

Search This thread

workdowg

Senior Member
Apr 17, 2011
1,556
691
Seneca Falls
First off, this may seem a noob question, but I am definitely not. :)

I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:

Added to default.prop and /system/build.prop
Code:
persist.service.adb.enable=1                                                    
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb

Edit: Must have had typos... It now works.
 
Last edited:

philos64

Senior Member
May 27, 2010
3,495
3,221
Somewhere in Brittany
First off, this may seem a noob question, but I am definitely not. :)

I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:

Added to default.prop and /system/build.prop
Code:
persist.service.adb.enable=1                                                    
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb

Edit: Must have had typos... It now works.

Ok Sounds good for you. Can you changed the title of your thread by [SOLVED]
Thanks in advance ;)
 

MikeMobes

Member
Nov 27, 2009
10
4
How would i do this with my skyrocket? same problem, broken screen, adb disabled. Some instructions would be sweet, cause im not really clear with what you did here.

First off, this may seem a noob question, but I am definitely not. :)

I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:

Added to default.prop and /system/build.prop
Code:
persist.service.adb.enable=1                                                    
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb

Edit: Must have had typos... It now works.
 

workdowg

Senior Member
Apr 17, 2011
1,556
691
Seneca Falls
How would i do this with my skyrocket? same problem, broken screen, adb disabled. Some instructions would be sweet, cause im not really clear with what you did here.

How would i do this with my skyrocket? same problem, broken screen, adb disabled. Some instructions would be sweet, cause im not really clear with what you did here.
I'm going to stay general and assume that a skyrochet is a phone, you have a linux or windows pc with ADB installed (and the drivers to connect to your phone) and have TWRP or CWM Recovery installed already...
1) Start the phone in recovery mode - mine is power down and vol
2) Connect you cable to the pc and start a console terminal or cmd prompt
3) Run the following
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
Once you reboot into Android you should be able to connect via adb.
If you google vnc over adb you can get a usable but very slow vnc connection then install Andriod VNC server for a little better performance.
That's the best I can do from memory ...
 

That Baker Guy

Senior Member
Dec 11, 2011
260
32
Tobie Town
I'm going to stay general and assume that a skyrochet is a phone, you have a linux or windows pc with ADB installed (and the drivers to connect to your phone) and have TWRP or CWM Recovery installed already...
1) Start the phone in recovery mode - mine is power down and vol
2) Connect you cable to the pc and start a console terminal or cmd prompt
3) Run the following
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
Once you reboot into Android you should be able to connect via adb.
If you google vnc over adb you can get a usable but very slow vnc connection then install Andriod VNC server for a little better performance.
That's the best I can do from memory ...

I'm booted into twrp 2.6.3 and when i try to run adb devices i just get this
Code:
[email protected]:~$ adb devices
List of devices attached 
????????????	no permissions
 
  • Like
Reactions: alexialamb

BIade

Senior Member
Apr 11, 2013
692
544
Cologne
I'm going to stay general and assume that a skyrochet is a phone, you have a linux or windows pc with ADB installed (and the drivers to connect to your phone) and have TWRP or CWM Recovery installed already...
1) Start the phone in recovery mode - mine is power down and vol
2) Connect you cable to the pc and start a console terminal or cmd prompt
3) Run the following
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
Once you reboot into Android you should be able to connect via adb.
If you google vnc over adb you can get a usable but very slow vnc connection then install Andriod VNC server for a little better performance.
That's the best I can do from memory ...

OMG! After my screen broke, i raged and became hulk. After 3 hours of internet-searching the hulk found your post and released me to become bruce banner again...
The thank you button was just not enough!
 
  • Like
Reactions: manas003

pnz

Member
Dec 28, 2012
18
0
Sorry to resurrect a dead thread, but I need a bit more help with this. I've successfully followed these instructions to enable the adb service on my i9505 with a dead screen, however it hasn't authorised it. When I try to connect I get the following error: error: device unauthorized. Please check the confirmation dialog on your device.

Is there anyway to bypass this confirmation dialog from ADB in recovery (Philz Touch)?

Thanks.
 

workdowg

Senior Member
Apr 17, 2011
1,556
691
Seneca Falls
Sorry to resurrect a dead thread, but I need a bit more help with this. I've successfully followed these instructions to enable the adb service on my i9505 with a dead screen, however it hasn't authorised it. When I try to connect I get the following error: error: device unauthorized. Please check the confirmation dialog on your device.

Is there anyway to bypass this confirmation dialog from ADB in recovery (Philz Touch)?

Thanks.

I Googled it a little and it seems to be a Samsung thing. Apparently it isn't booting to recovery. Sorry for the lack help :(

From my Debloated Stock Kitkat VS980 4G VZN
 

pnz

Member
Dec 28, 2012
18
0
I Googled it a little and it seems to be a Samsung thing. Apparently it isn't booting to recovery. Sorry for the lack help :(

From my Debloated Stock Kitkat VS980 4G VZN

No, I'm quite sure it is booting to my custom recovery, as I have full ADB access to that. What I'm trying to do is enable ADB access to the Android 4.4.2 proper from my custom recovery. So far following the instructions in this thread I've managed to enable ADB there, but whenever you try to connect to this phone a dialog box is meant to come up asking if you want to accept incoming ADB requests from your computer's key. Unfortunately I have no way of selecting accept (or even seeing that dialog box), so I'm hoping there's a way to bypass it.
 

Jarmezrocks

Senior Member
Mar 25, 2011
959
493
Gold Coast
tinyurl.com
Hey mate,

Sorry to necro-bumb the thread. I have been reading and have much similar issue to your self. Maybe some drivers that automatically enable adb, android usb or MTP without debugging enabled might be something to take a look at?

Check this thread out >>> here

Hope that might help (you and I both?)

Besides that I am still searching for a post I saw where you can edit the init-rc in the kernel (the guy explained how to extract the boot.img) and then decompile the kernel, edit the init-rc, recompile the kernel and then flash it back in recovery.

At the moment I am really stuck with a customer device that is bricked, so have a bash script and busybox binary that loads from a signed update.zip that should allow editing of the init-rc and add the lines mentioned in this thread to the build.prop and system.prop.

Fingers crossed it works for a completely stock device :fingers-crossed:
 

FSDown

Member
Apr 3, 2015
11
0
34
Colnbrook
www.thehappylemon.co.uk
Hey mate,

Sorry to necro-bumb the thread. I have been reading and have much similar issue to your self. Maybe some drivers that automatically enable adb, android usb or MTP without debugging enabled might be something to take a look at?

Check this thread out >>> here

Hope that might help (you and I both?)

Besides that I am still searching for a post I saw where you can edit the init-rc in the kernel (the guy explained how to extract the boot.img) and then decompile the kernel, edit the init-rc, recompile the kernel and then flash it back in recovery.

At the moment I am really stuck with a customer device that is bricked, so have a bash script and busybox binary that loads from a signed update.zip that should allow editing of the init-rc and add the lines mentioned in this thread to the build.prop and system.prop.

Fingers crossed it works for a completely stock device :fingers-crossed:

Hi mate, did you manage to get into the customers mobile? I have the same problem as I'm locked out with no access to enable USB debugging and a home button which does not work, meaning I can't load recovery mode to wipe the phone :rolleyes::confused:

Sent from my C6903 using XDA app
 

wmoecke

Member
Dec 27, 2009
5
1
Code:
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

Thank you, I had no clue how, but my phone's (MUCH Snail, aka MUCH W1, aka MUCH 78P01) manufacturer (China's Snail Mobile) had removed from Android's Developer Options menu the option to Enable/Disable USB Debugging.

I was looking all over the web for days, this was the only way I could effectively turn on USB debugging in my phone. Thanks!
There's only one difference, instead of performing the above steps from an ADB console window (for obvious reasons) I did it with Build.prop Editor, but first I needed to change permissions to 666 on the default.prop file (otherwise it wouldn't save my changes).

Curiously, every time I do a full reboot the default.prop file somehow is overwritten with the manufacturer's original settings - that doesn't happen when I soft reboot my device though. Any clues as to what could be reversing my changes at boot?
 
Last edited:
  • Like
Reactions: Uzair40

Given92

Member
Dec 3, 2014
5
1
Thank you, I had no clue how, but my phone's (MUCH Snail, aka MUCH W1, aka MUCH 78P01) manufacturer (China's Snail Mobile) had removed from Android's Developer Options menu the option to Enable/Disable USB Debugging.

I was looking all over the web for days, this was the only way I could effectively turn on USB debugging in my phone. Thanks!
There's only one difference, instead of performing the above steps from an ADB console window (for obvious reasons) I did it with Build.prop Editor, but first I needed to change permissions to 666 on the default.prop file (otherwise it wouldn't save my changes).

Curiously, every time I do a full reboot the default.prop file somehow is overwritten with the manufacturer's original settings - that doesn't happen when I soft reboot my device though. Any clues as to what could be reversing my changes at boot?

Everytime you boot your phone, the root path is extracted from ramdisk which is usually bound to kernel. As a result, your modification is overwritten. In order to modify files under root path(such as default.prop), you must change the file in ramdisk.

There is many tools and tutorials about this task, I think this is a good point to google.

Addition:
The poster of this thread try to edit default.prop via adb, which is not possible to achieve, at least, for every android device I has hold.

For the unauthorized issue, It's because secure adb, which could be disabled via ro.adb.secure=0, but if there is a ro.adb.secure=1 in default.prop, modification of ramdisk is needed.
 
Last edited:

workdowg

Senior Member
Apr 17, 2011
1,556
691
Seneca Falls
Everytime you boot your phone, the root path is extracted from ramdisk which is usually bound to kernel. As a result, your modification is overwritten. In order to modify files under root path(such as default.prop), you must change the file in ramdisk.

There is many tools and tutorials about this task, I think this is a good point to google.

Addition:
The poster of this thread try to edit default.prop via adb, which is not possible to achieve, at least, for every android device I has hold.

For the unauthorized issue, It's because secure adb, which could be disabled via ro.adb.secure=0, but if there is a ro.adb.secure=1 in default.prop, modification of ramdisk is needed.
I had edited both default.prop AND /system/build.prop not knowing which one to use. This worked for me on JB and I used the tablet for a while after that.

From my Nexus 9
 

avro.bd

Member
Nov 7, 2014
42
3
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>adb shell
'adb' is not recognized as an internal or external command,
operable program or batch file.

C:\Windows\system32>su
'su' is not recognized as an internal or external command,
operable program or batch file.

C:\Windows\system32>mount -o remount,rw /system
'mount' is not recognized as an internal or external command,
operable program or batch file.

C:\Windows\system32>cd /

C:\>echo "persist.service.adb.enable=1" >> default.prop

C:\>echo "persist.service.debuggable=1" >> default.prop

C:\>echo "persist.sys.usb.config=mtp,adb" >> default.prop

C:\>echo "persist.service.adb.enable=1" >> /system/build.prop
The system cannot find the path specified.

C:\>echo "persist.service.debuggable=1" >> /system/build.prop
The system cannot find the path specified.

C:\>echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
The system cannot find the path specified.

C:\>
Getting this on S$..any1 here to help me!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    First off, this may seem a noob question, but I am definitely not. :)

    I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:

    Added to default.prop and /system/build.prop
    Code:
    persist.service.adb.enable=1                                                    
    persist.service.debuggable=1
    persist.sys.usb.config=mtp,adb

    Edit: Must have had typos... It now works.
    19
    How would i do this with my skyrocket? same problem, broken screen, adb disabled. Some instructions would be sweet, cause im not really clear with what you did here.

    How would i do this with my skyrocket? same problem, broken screen, adb disabled. Some instructions would be sweet, cause im not really clear with what you did here.
    I'm going to stay general and assume that a skyrochet is a phone, you have a linux or windows pc with ADB installed (and the drivers to connect to your phone) and have TWRP or CWM Recovery installed already...
    1) Start the phone in recovery mode - mine is power down and vol
    2) Connect you cable to the pc and start a console terminal or cmd prompt
    3) Run the following
    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
    Once you reboot into Android you should be able to connect via adb.
    If you google vnc over adb you can get a usable but very slow vnc connection then install Andriod VNC server for a little better performance.
    That's the best I can do from memory ...
    3
    First off, this may seem a noob question, but I am definitely not. :)

    I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:

    Added to default.prop and /system/build.prop
    Code:
    persist.service.adb.enable=1                                                    
    persist.service.debuggable=1
    persist.sys.usb.config=mtp,adb

    Edit: Must have had typos... It now works.

    Ok Sounds good for you. Can you changed the title of your thread by [SOLVED]
    Thanks in advance ;)
    3
    Hi workdowg! I appreciate your replies.

    Immediately after I boot into CWM recovery and connect via adb, I'm already root. There is no need for me to su.

    Also, there's already a directory called /system. If I "cd" to this directory and run "ls -la", I get the following:

    Code:
    # cd /system
    
    /system # ls -la
    __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    3 root     root             0 Jan  1  1970 .
    drwxr-xr-x   22 root     root             0 Jan  1 17:07 ..
    drwxr-xr-x    2 root     root             0 Jan  1  1970 bin


    So immediately after I boot, /system is a directory which already exists, but doesn't contain a "build.prop"


    When you are in adb shell what do you get with just the mount command?

    The output of the mount command is:

    Code:
    # mount
    rootfs on / type rootfs (rw)
    tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
    devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
    proc on /proc type proc (rw,relatime)
    sysfs on /sys type sysfs (rw,seclabel,relatime)
    selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
    tmpfs on /storage type tmpfs (rw,seclabel,relatime,mode=050,gid=1028)
    tmpfs on /mnt/secure type tmpfs (rw,seclabel,relatime,mode=700)
    tmpfs on /mnt/fuse type tmpfs (rw,seclabel,relatime,mode=775,gid=1000)
    /dev/block/mmcblk0p12 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,journal_async_commit,data=ordered)



    Try this:
    Code:
    su
    mount -o rw,remount /dev/block/by-name/system /system

    Four mount commands which I tried but didn't work:

    Code:
    # mount -o rw,remount /dev/block/by-name/system /system
    mount: mounting /dev/block/by-name/system on /system failed: Invalid argument
    
    # mount -o rw,remount /dev/block/by-name/system /system2
    mount: mounting /dev/block/by-name/system on /system2 failed: No such file or directory
    
    /dev/block # mount -o rw,remount /dev/block/mmcblk0p13 /system2
    mount: mounting /dev/block/mmcblk0p13 on /system2 failed: No such file or directory
    
    /dev/block # mount -o rw,remount /dev/block/mmcblk0p13 /system
    mount: mounting /dev/block/mmcblk0p13 on /system failed: Invalid argument


    Btw I'm guessing that mmcblk0p13 is my system partition, but I'm not 100% sure.

    *********************

    Edit:

    Oh no, I wasn't thinking straight earlier...

    Sorry, I've just realized how noob I was. Anyway, after running the following commands...

    Code:
    cd /
    mkdir /system2
    mount -o rw /dev/block/mmcblk0p13 /system2
    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" >> /system2/build.prop 
    echo "persist.service.debuggable=1" >> /system2/build.prop
    echo "persist.sys.usb.config=mtp,adb" >> /system2/build.prop

    ...and then rebooting, I now have adb access to Android! (Finally!) And I've managed to run Android Screencast together with my phone, so my phone is fully functional once more.

    Thank you so much workdowg!
    3
    You should've stopped at " 'adb' is not..."

    Microsoft Windows [Version 6.3.9600]
    (c) 2013 Microsoft Corporation. All rights reserved.

    C:\Windows\system32>adb shell
    'adb' is not recognized as an internal or external command,
    operable program or batch file.
    . . .
    Getting this on S$..any1 here to help me!

    You need to first install ADB, the installer can be found via Google.
    Once installed (Press 'Y' > 'ENTER' for each option during install, this should install it to the default location, i.e. "C:").
    Run "cmd" and enter the command "dir" . . . you should see "adb" as the first or second <DIR> listed; if you do not, find where 'adb' is installed and navigate to its folder via the commands 'cd' and 'dir'. Once in the 'adb' dir...
    Begin typing "adb shell" and you'll see something other than..
    "'adb' is not recognized as an internal or external command,
    operable program or batch file."