# [SOLVED] - Manually enable adb debugging from recovery



## workdowg (Jun 23, 2013)

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

```
persist.service.adb.enable=1                                                    
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
```

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


----------



## Sib64 (Jun 23, 2013)

workdowg said:


> 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:
> 
> ...

Click to collapse



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


----------



## workdowg (Jun 23, 2013)

philos64 said:


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

Click to collapse



Ooops.... :good:


----------



## MikeMobes (Nov 13, 2013)

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.



workdowg said:


> 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:
> 
> ...

Click to collapse


----------



## workdowg (Nov 13, 2013)

MikeMobes said:


> 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.

Click to collapse





MikeMobes said:


> 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.

Click to collapse



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

```
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 (Nov 16, 2013)

workdowg said:


> 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
> ...

Click to collapse



I'm booted into twrp 2.6.3 and when i try to run adb devices i just get this 

```
[email protected]:~$ adb devices
List of devices attached 
????????????	no permissions
```


----------



## workdowg (Nov 17, 2013)

That Baker Guy said:


> I'm booted into twrp 2.6.3 and when i try to run adb devices i just get this
> 
> ```
> [email protected]:~$ adb devices
> ...

Click to collapse



Enter the following commands:
	
	



```
adb kill-server  sudo ./adb start-server adb devices
```
  The issue is your not running adb server as root.


----------



## iksi (Dec 13, 2013)

Hello. Does possible enable accesibility and set default tts via adb shell, and edit default.prop and build.prop? 
Thanks and best regards.


----------



## BIade (Apr 16, 2014)

workdowg said:


> 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
> ...

Click to collapse



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!


----------



## pnz (May 2, 2014)

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 (May 2, 2014)

pnz said:


> 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.

Click to collapse



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 (May 2, 2014)

workdowg said:


> 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

Click to collapse



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 (May 9, 2014)

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 (Apr 3, 2015)

Jarmezrocks said:


> 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?
> 
> ...

Click to collapse



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 

Sent from my C6903 using XDA app


----------



## wmoecke (Apr 11, 2015)

workdowg said:


> ```
> echo "persist.service.adb.enable=1" >> default.prop
> echo "persist.service.debuggable=1" >> default.prop
> echo "persist.sys.usb.config=mtp,adb" >> default.prop
> ...

Click to collapse



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?


----------



## Given92 (May 3, 2015)

wmoecke said:


> 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).
> ...

Click to collapse



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.


----------



## workdowg (May 3, 2015)

Given92 said:


> 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.
> 
> ...

Click to collapse



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


----------



## Given92 (May 3, 2015)

workdowg said:


> 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

Click to collapse



In my view, the /system/build.prop works.


----------



## deaston13 (Jun 14, 2015)

I am  a huge noob and i dont really understand where i am inputing that code ?


----------



## avro.bd (Jun 17, 2015)

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!


----------



## workdowg (Jun 23, 2013)

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

```
persist.service.adb.enable=1                                                    
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
```

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


----------



## digital_carpenter (Aug 9, 2015)

*You should've stopped at " 'adb' is not..."*



avro.bd said:


> Microsoft Windows [Version 6.3.9600]
> (c) 2013 Microsoft Corporation. All rights reserved.
> 
> C:\Windows\system32>adb shell
> ...

Click to collapse



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."

Click to collapse


----------



## Anz-dev (Oct 10, 2015)

I'm getting this, please help?

C:\Users\******\Downloads>adb devices
adb server is out of date.  killing...
* daemon started successfully *
List of devices attached
10cb4f24        recovery


C:\Users\****\Downloads>adb shell
~ # ←[6nsu
su
/sbin/sh: su: not found
~ # ←[6n


----------



## Andreus94 (Nov 4, 2015)

workdowg said:


> 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:
> 
> ...

Click to collapse



You are my salvation!! I love you:fingers-crossed:


----------



## ErnestChia (Nov 14, 2015)

workdowg said:


> 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
> ...

Click to collapse




Hi workdowg and others,

I'm trying to do the above on my Samsung GT-N7105. The screen has gone completely black, though the touch/digitizer still works. My goal is to be able to use my phone with Android Screencast. And the first step is to enable adb debugging on Android.

I've flashed CWM recovery and tried to run the above commands, but I got an error here:


```
# mount -o remount,rw /system
mount: can't find /system in /proc/mounts
```

I tried going ahead with the rest of the commands anyway, but when I rebooted, I still didn't have adb access on Android.

I'm running stock Android 4.1.2, and my bootloader doesn't have Knox.

Btw I am noob, so please try to give unambiguous replies. I understand it's troublesome to type a long reply, and I don't mind if your reply is short, but please try to make it as unambiguous as possible.

Thanks so much.


----------



## workdowg (Nov 14, 2015)

ErnestChia said:


> Hi workdowg and others,
> 
> I'm trying to do the above on my Samsung GT-N7105. The screen has gone completely black, though the touch/digitizer still works. My goal is to be able to use my phone with Android Screencast. And the first step is to enable adb debugging on Android.
> 
> ...

Click to collapse



I'll try to help.. It's been a long time and my old device is long gone...

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

something like this...

```
$ 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)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
/dev/block/by-name/config on /config type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/by-name/factory on /factory type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/by-name/logs on /logs type ext4 (rw,seclabel,nosuid,nodev,relatime,data=ordered)
/dev/block/mmcblk0p11 on /cache type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p14 on /data type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p14 on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk1p1 on /external_sd type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
```


----------



## workdowg (Nov 14, 2015)

workdowg said:


> I'll try to help.. It's been a long time and my old device is long gone...
> 
> When you are in adb shell what do you  get with just the mount command?
> 
> ...

Click to collapse



Try this:

```
su
mount -o rw,remount /dev/block/by-name/system /system
```


----------



## ErnestChia (Nov 15, 2015)

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:


```
# 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"




workdowg said:


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

Click to collapse



The output of the mount command is:


```
# 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)
```





workdowg said:


> Try this:
> 
> ```
> su
> ...

Click to collapse



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


```
# 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...


```
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!


----------



## super rey (Dec 5, 2015)

*usb debugg force*



ErnestChia said:


> 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.
> 
> ...

Click to collapse



C:\>adb shell                                                 
 error: device not found  
 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     

whats wrong wt this??? please help!


----------



## W60 (Dec 6, 2015)

super rey said:


> C:\>adb shell
> error: device not found
> 
> 
> whats wrong wt this??? please help!

Click to collapse



Your device is not detected by the computer. Check the connection and make sure you have the right drivers installed.

If your computer has USB3 ports, this might be a problem. In this situation it seems some people could connect to the phone only through a USB hub.

If all else fails, try with another computer.

...

Also, as a general advice, try to understand what a command means, instead of blindly typing it.
The "echo" commands shouldn't be written at the Windows command prompt, they are meant for the Android command prompt, after you have successfully connected to the phone.


----------



## DroidX2 (Dec 24, 2015)

wmoecke said:


> 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).
> ...

Click to collapse



____________________________________________________________________________________________________________________________________________________________
To anyone else having issues getting Debug on the Snail W1, another way to do it would be to install Qihu 360 (Chinese Mobile Assistant app) and open it. Once open, press Back. There will be a menu that pops up. It will be in Chinese, but look for the option that has "USB" in the description. Tick this option and USB Debugging is enabled on the device. You can now uninstall the Qihu 360 app.

Source: http://manguiro.blogspot.com/2015/03/review-snail-much-w1-ireadygo-78dian.html


----------



## bBigBrO (Feb 4, 2016)

avro.bd said:


> Microsoft Windows [Version 6.3.9600]
> (c) 2013 Microsoft Corporation. All rights reserved.
> 
> C:\Windows\system32>adb shell
> ...

Click to collapse



Errr... you do not even seem to have ADB installed... try this: http://forum.xda-developers.com/showthread.php?p=48915118


----------



## akhil51183 (Feb 15, 2016)

PLEASE HELP!!!!
on runnin d commands i get sh: su : permission denied


----------



## ivanchin99 (Mar 7, 2016)

workdowg said:


> 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
> ...

Click to collapse



Godsend!! Thank you


----------



## jepry (Nov 4, 2016)

*adb offline*

help please
my android show error : device offfline
how to get it online?
i just forgot to turn on the usb debugging


----------



## Cusciolino (Nov 16, 2016)

Hi,
this is my porblem. My phone have stopped on boot "Google" word, I' can't load in donwload mode (Gnexus), I can't load in recovery.
How can bypass ADB authorization?

Tnk you at all


----------



## bigtom.pc (May 6, 2017)

thank your


----------



## ericksonebak (Feb 6, 2018)

hello there, how do you connect your android devices if the adb debugging is not enable?  when i open cmd and type adb devices, it says no devices/emulators found even though i connect my phone via usb cable and in recovery mode. please help me with this problem. my phone is lenovo a369i.


----------



## davejames500 (Mar 9, 2018)

I have loaded TWRP on my phone and I can successfully enter the ADB shell by running "adb shell" to it when in recovery mode. However when I run "su" I get the following 

 "/sbin/sh: su: not found"

I suppose I need to root my phone?


----------



## fahadysf (Jul 29, 2018)

davejames500 said:


> I have loaded TWRP on my phone and I can successfully enter the ADB shell by running "adb shell" to it when in recovery mode. However when I run "su" I get the following
> 
> "/sbin/sh: su: not found"
> 
> I suppose I need to root my phone?

Click to collapse



No you don't. You can follow the guide apart from without typing su. 

On the other hand the process isn't working on Oreo 8.1 (MUIU 10) Roms. I've also looked at https://gist.github.com/varhub/7b9555cdd1e5ad785ffde2300fcfd0bd which is basically the same instructions. I am thinking there is a missing property for Oreo 8.1 which needs to be set.


----------



## Dimi83 (Oct 14, 2018)

I installed  Oreo 8.1 on nokia 5 (TA 1024) and it doesn't start at all,  didn't activate Enable USB debugging, can't really do anything, tried to install it's firmware but gives errors verification required,  could it be that it's cause of usb debugging? that it doesn't work? and how can I fix it so it will work?


----------



## workdowg (Jun 23, 2013)

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

```
persist.service.adb.enable=1                                                    
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
```

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


----------



## gyanendra07 (Aug 17, 2019)

*same problem*



ericksonebak said:


> hello there, how do you connect your android devices if the adb debugging is not enable?  when i open cmd and type adb devices, it says no devices/emulators found even though i connect my phone via usb cable and in recovery mode. please help me with this problem. my phone is lenovo a369i.

Click to collapse



same problem with me
i have samsung galaxy grand max SM-G7202
i installed all drivers adb present on the web but my device was not detected please help me i have very important documents on my phone


----------



## Droidriven (Aug 17, 2019)

gyanendra07 said:


> same problem with me
> 
> i have samsung galaxy grand max SM-G7202
> 
> i installed all drivers adb present on the web but my device was not detected please help me i have very important documents on my phone

Click to collapse



If your device can not boot into system, ADB will not work on your Samsung device unless your device device is rooted and/or has TWRP recovery installed on the device.

Sent from my SM-S767VL using Tapatalk


----------



## Cepasaccus (Sep 5, 2019)

I try to find a solution for my boot problem without a full wipe and I would like to look at the logs to get information why it is stuck. The behavior is that it is doing endlessly the arc animation with a little pause every sixth arc and I can't turn off with the power button. I did what is written in the fifth posting here to turn on adb. Unfortunately I have adb only in TWRP and not in the Android booting process.

Is there something wrong with what I did to enable adb? Or is adb not starting that early in the boot process and it can't work?

Samsung S5 with Lineage 16


----------



## Droidriven (Sep 6, 2019)

Cepasaccus said:


> I try to find a solution for my boot problem without a full wipe and I would like to look at the logs to get information why it is stuck. The behavior is that it is doing endlessly the arc animation with a little pause every sixth arc and I can't turn off with the power button. I did what is written in the fifth posting here to turn on adb. Unfortunately I have adb only in TWRP and not in the Android booting process.
> 
> Is there something wrong with what I did to enable adb? Or is adb not starting that early in the boot process and it can't work?
> 
> Samsung S5 with Lineage 16

Click to collapse



What did you do to cause the bootloop? If you were on stock then flashed a custom ROM but did not factory reset, wipe cache and wipe dalvik cache when you flashed the ROM, that is why you are getting a bootloop. You can't flash a custom ROM over stock without wiping. If this is what you did, boot into TWRP and factory reset, wipe cache and wipe dalvik cache then see if it reboots correctly.

If this is not what caused your bootloop, try booting into TWRP, select the Wipe option then select the "advanced wipe" option, then select only the cache partition and dalvik cache, then wipe them and try rebooting.


Sent from my SM-S767VL using Tapatalk


----------



## Cepasaccus (Sep 7, 2019)

The last thing I did before the boot loop was to install Yalp as system service. I did already wipe cache and dalvik, up- and downgrade, remove all traces of yalp by deleting packages and editing text files, wipe system partition and reinstall. I did not yet do a fresh install. I would like to avoid that if possible and thought that I could get logging information via adb.


----------



## Cepasaccus (Sep 10, 2019)

The new nightly solved the problem.


----------



## lucfig (Apr 28, 2020)

Hi,

I have a galaxy A20 with a broken screen.

Imanaged to boot into recovery and adb detects the device which is rooted with magisk.

But when i try the "su" command after "adb shell", it returns:

```
/sbin/sh: su: not found
```

The mount command returns: 

```
rootfs on / type rootfs (rw,seclabel)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1392352k,nr_inodes=348088,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 /tmp type tmpfs (rw,seclabel,relatime,size=1392352k,nr_inodes=348088)
none on /sys/kernel/config type configfs (rw,relatime)
pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
/dev/block/mmcblk0p28 on /cache type ext4 (rw,seclabel,relatime,i_version)
/dev/block/mmcblk0p32 on /data type ext4 (rw,seclabel,relatime,resgid=5678,i_version,data=ordered)
/dev/block/mmcblk0p32 on /sdcard type ext4 (rw,seclabel,relatime,resgid=5678,i_version,data=ordered)
```

Can anyone give me a direction?

Thanks


----------



## NFSP G35 (Apr 28, 2020)

Just because the android system has su doesn't mean the same applies for recovery


----------



## lucfig (Apr 29, 2020)

NFSP G35 said:


> Just because the android system has su doesn't mean the same applies for recovery

Click to collapse



So I should add su to the recovery? Is that it? 
If it is the case, do you have any suggestion on how to do that?

Thanks,


----------



## Droidriven (Apr 29, 2020)

lucfig said:


> So I should add su to the recovery? Is that it?
> 
> If it is the case, do you have any suggestion on how to do that?
> 
> ...

Click to collapse



No, you won't be able to get stock recovery to work with su. If your recovery/system has the option to mount system in stock recovery, this "might" enable the use of certain adb functions to modify system.

Other than that, you'll need a custom recovery such as TWRP to achieve what you are looking for.

Sent from my SM-S767VL using Tapatalk


----------



## lucfig (Apr 30, 2020)

Droidriven said:


> No, you won't be able to get stock recovery to work with su. If your recovery/system has the option to mount system in stock recovery, this "might" enable the use of certain adb functions to modify system.
> 
> Other than that, you'll need a custom recovery such as TWRP to achieve what you are looking for.
> 
> Sent from my SM-S767VL using Tapatalk

Click to collapse



I'm almost sure that I have TWRP installed. But I cannot see my screen.
A long time I do not boot in recovery, but I think I flashed TWRP when I rooted the device.
And from the mount command, I dont know which is the system partition. If adb do not have root access does it become hidden?


----------



## Droidriven (Apr 30, 2020)

lucfig said:


> I'm almost sure that I have TWRP installed. But I cannot see my screen.
> 
> A long time I do not boot in recovery, but I think I flashed TWRP when I rooted the device.
> 
> And from the mount command, I dont know which is the system partition. If adb do not have root access does it become hidden?

Click to collapse



If you can't see the TWRP screen when you boot into recovery, that means TWRP probably didn't flash correctly.

Sent from my SM-S767VL using Tapatalk


----------



## NFSP G35 (May 1, 2020)

Droidriven said:


> If you can't see the TWRP screen when you boot into recovery, that means TWRP probably didn't flash correctly.
> 
> Sent from my SM-S767VL using Tapatalk

Click to collapse



He can't see the screen because it's broken

---------- Post added at 12:13 AM ---------- Previous post was at 12:11 AM ----------




lucfig said:


> I'm almost sure that I have TWRP installed. But I cannot see my screen.
> A long time I do not boot in recovery, but I think I flashed TWRP when I rooted the device.
> And from the mount command, I dont know which is the system partition. If adb do not have root access does it become hidden?

Click to collapse



In adb, try just running the command:
twrp

That will tell you if your recovery is TWRP or stock. If it's TWRP, you can use that command to back up stuff


----------



## lucfig (May 3, 2020)

NFSP G35 said:


> He can't see the screen because it's broken
> 
> ---------- Post added at 12:13 AM ---------- Previous post was at 12:11 AM ----------
> 
> ...

Click to collapse



Thanks. Tried and it TWRP is indeed installed. So I am bacck to the main issue. Any idea why I cannot do any of these ?

see the system partition with the mount command
su command returns there is no su in sbin
cannot see or moodify the build.prop
see the system partition with the mount command


----------



## NFSP G35 (May 3, 2020)

lucfig said:


> Thanks. Tried and it TWRP is indeed installed. So I am bacck to the main issue. Any idea why I cannot do any of these ?
> 
> see the system partition with the mount command
> su command returns there is no su in sbin
> ...

Click to collapse



Magisk is a systemless root, meaning it doesn't modify your system partition. On some devices, modifying the system partition can result in boot loops or even a brick. 
You mentioned you have a broken screen, what is your goal with this device? IOW, why are you trying to enable ADB? If it is for the purpose of backing up things that you have on the phone, then you can do that with the TWRP adb


----------



## lucfig (May 4, 2020)

NFSP G35 said:


> Magisk is a systemless root, meaning it doesn't modify your system partition. On some devices, modifying the system partition can result in boot loops or even a brick.
> 
> You mentioned you have a broken screen, what is your goal with this device? IOW, why are you trying to enable ADB? If it is for the purpose of backing up things that you have on the phone, then you can do that with the TWRP adb

Click to collapse



I wanted to remove the lockscreen password and backup with titanium backup.
But you are right, will learn how to use the twrp command. After backing up, do you suggest any app for Android or windows to explore the backup and restore in a different device (also different model)?

Enviado de meu HD1903 usando o Tapatalk


----------



## NFSP G35 (May 4, 2020)

lucfig said:


> I wanted to remove the lockscreen password and backup with titanium backup.
> But you are right, will learn how to use the twrp command. After backing up, do you suggest any app for Android or windows to explore the backup and restore in a different device (also different model)?
> 
> Enviado de meu HD1903 usando o Tapatalk

Click to collapse



The donate version of Titanium has "extract from ADB backup" and "extract from Nandroid backup" options. I've never tried it, but it sounds like a potential solution in your case.


----------



## lucfig (May 5, 2020)

NFSP G35 said:


> The donate version of Titanium has "extract from ADB backup" and "extract from Nandroid backup" options. I've never tried it, but it sounds like a potential solution in your case.

Click to collapse



You are right. Did not remember that. I already used, had a couple of issues, but in general it worked 

Enviado de meu HD1903 usando o Tapatalk


----------



## perrypay (May 21, 2020)

*nice info*

thanks. it works.


----------



## Curt5654 (Apr 3, 2022)

digital_carpenter said:


> *You should've stopped at " 'adb' is not..."*
> 
> 
> 
> ...

Click to collapse


----------



## workdowg (Jun 23, 2013)

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

```
persist.service.adb.enable=1                                                    
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
```

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


----------



## Curt5654 (Apr 3, 2022)

First, find the folder that contains the adb.exe file. 
Then, right click the folder and choose "copy as path".

Then,

You can open system properties,
Click on environment variables,
On the System Variables window, click on the path variable, then click Edit,
On the menu that opens, click new,
And paste the clipboard and click "Ok".
Close all the variable windows.

You should now be able to open a cmd window anywhere and ADB and Fast Boot should work.

I hope that I explained this well enough.
Enjoy,


----------



## Noristay (Sep 7, 2022)

workdowg said:


> 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:
> 
> ...

Click to collapse



Hi,
Can you maybe help? Because I have nearly the same problem. I have a Huawei P20 with a broken screen, the touch does not work and I have a password and therefore I cannot unlock it, I would like to be able to get all the data back from the phone and I have tried in many ways how to do it without being able to use it and the only solution is do it through a computer, I have already tried to activate usb debugging with a program, only it shows me the notification but I can not approve, I checked if there was active ADB but it says it is unauthorized and now I wonder if I should send the phone in recovery mode or fastboot mode so that I can control it from a pc or somehow receive the data, the question is how can I do? Is it possibile to enable adb in recovery mode? I have no idea how fastboot or recovery mode can be and whether it will make me lose everything or not so I would like to make sure by asking an expert, I would be very grateful if you could help me.


----------

