[Q] Is it possible to enable USB debugging via pc - General Questions and Answers

HELP!
my Sony Xperia Go ST27i is locked i forgot the PIN for the screen lock. Is it possible to enable USB debugging using PC? my adb is not recognized since usb debugging is not turned on and I can't unlock my bootloader due to this. I can't boot into recovery mode as well.

hayes.asdfg said:
my Sony Xperia Go ST27i is locked i forgot the PIN for the screen lock. Is it possible to enable USB debugging using PC? my adb is not recognized since usb debugging is not turned on and I can't unlock my bootloader due to this. I can't boot into recovery mode as well.
Click to expand...
Click to collapse
Boot into a custom recovery (like TWRP) and try this in Terminal:
Code:
adb shell
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"
reboot
Now reboot to system and see if ADB is working.
If that doesn't help, try this:
Code:
adb shell
setprop persist.service.adb.enable 1
setprop persist.service.debuggable 1
setprop persist.sys.usb.config mtp,adb
reboot
BTW, you can try as many as wrong pins which would enable you to change the pin again via Google account. That's the best way..

GokulNC said:
Drain your phone charge to 0%
Then plug in your phone, but don't switch it ON.
After 15mins, use your regular key combination like power+volumeUp+volumeDown or whatever to get into bootloader menu.
Open up recovery mode or fastboot mode and do whatever you need.
If you want to enable USB debugging, try this in fastboot mode:
Code:
adb shell
echo "persist.service.adb.enable=1" >>/system/build.prop
echo "persist.service.debuggable=1" >>/system/build.prop
echo "persist.sys.usb.config=mass_storage,adb" >>/system/build.prop"
reboot
If that doesn't help, try this:
Code:
adb shell
setprop persist.service.adb.enable 1
setprop persist.service.debuggable 1
setprop persist.sys.usb.config mass_storage,adb
reboot
BTW, you can try as many as wrong pins which would enable you to change the pin again via Google account.
Click to expand...
Click to collapse
I have a similar problem in that I can't access my phone and settings. I tried the adb shell and it goes error: device '(null)' not found.
Then I tried the
echo "persist.service.adb.enable=1" >>/system/build.prop but again no good "The system cannot find the path specified."
Does the phone really need to be drained for this to work? My phone charge though I can't see it is around 90%.
On the setprop persist.service.adb.enable 1 is says that 'setprop' is not recognized as an internal or external command, operable program or batch file.
Another question that comes to mind is whether doing factory reset removes root?

Related

Command to turn on USB debug

So on my tablet, there is no option in "Application Settings" to turn on USB debug.
I have root and su access and a terminal.
Is there a command in terminal I can issue to turn USB debug on?
On my phone its saved at
/data/property/persist.service.adb.enable
Maybe its the same on your tablet?
Edit: If its in the same place this command should work.(not tested - use at own risk! - worst case scenario...wipe data).
echo 1 > /data/property/persist.service.adb.enable
Sent from my HTC Desire using XDA App
Bingo! That got me going.
Ran that command as 'su'
It didn't come back with any errors, so I assumed it worked.
Plugged into the computer, said recognize device. Listd it as a <NULL><NULL> USB Device.
Go to my My Computer, and it shows an E: drive, but cannot open it. I select to Mount my USB in the notification area and now I can see my SD card.
The code
mercianary said:
On my phone its saved at
/data/property/persist.service.adb.enable
Maybe its the same on your tablet?
Edit: If its in the same place this command should work.(not tested - use at own risk! - worst case scenario...wipe data).
echo 1 > /data/property/persist.service.adb.enable
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
_______________________________________________________________________________________________________________________
Where did you find where that is saved?
Wow! mines located there too and I can change to 1/0 by editing it through text editor program
just so you guys know. what seemed to work for me was to
go to about phone or tablet under settings
scroll to bottom where it shows build number
tap build number 7 times
developer window now shows. This works in android 4.2
This works from a terminal emulator (with root permissions) and from TWRP or any other terminal supporting recovery:
WARNING
Only use this method if you are sure the property files are located under /data/property/...
Enable adb functions:
Code:
echo 1 > /data/property/persist.service.adb.enable
echo 1 > /data/property/persist.service.debuggable
echo adb > /data/property/persist.sys.usb.config
Disable adb function:
Code:
echo 0 > /data/property/persist.service.adb.enable
echo 0 > /data/property/persist.service.debuggable
echo mass_storage > /data/property/persist.sys.usb.config
If it worked for you, a thank you is always appreciated!

[SOLVED] - Manually enable adb debugging from recovery

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 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:
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.
Click to expand...
Click to collapse
Ok Sounds good for you. Can you changed the title of your thread by [SOLVED]
Thanks in advance
philos64 said:
Ok Sounds good for you. Can you changed the title of your thread by [SOLVED]
Thanks in advance
Click to expand...
Click to collapse
Ooops.... :good:
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:
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.
Click to expand...
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 expand...
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 expand...
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
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 ...
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
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 ...
Click to expand...
Click to collapse
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
That Baker Guy said:
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
Click to expand...
Click to collapse
Enter the following commands:
Code:
adb kill-server sudo ./adb start-server adb devices
The issue is your not running adb server as root.
Hello. Does possible enable accesibility and set default tts via adb shell, and edit default.prop and build.prop?
Thanks and best regards.
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
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 ...
Click to expand...
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!
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.
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 expand...
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
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 expand...
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.
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:
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?
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:
Click to expand...
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
workdowg said:
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
Click to expand...
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?
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).
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?
Click to expand...
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.
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.
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.
Click to expand...
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
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 expand...
Click to collapse
In my view, the /system/build.prop works.
I am a huge noob and i dont really understand where i am inputing that code ?
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!

Display is ded.. I can only see from adb shell in recovery

an old samsung s4 mini. SInce ADB debugging is not ON, I keep it off unless I need to do something, I now cant use even Vysor to view whats on screen since my screen died with just some color dots and lines seen on screen.
Can anyone tell me how to 'see'the device in regular state via ADB? I followed some tuts like here
[SOLVED] - Manually enable adb debugging from recovery
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...
forum.xda-developers.com
to add e.g
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
first off I dont have such file in system just bin/ and user/ folder. Ive TWRP installed and Magisk.
I could only add those maybe in default.prop. When I ADB reboot I cant see the device, only in recovery. Is it because the phone goes in lock screen and you cant see the device listed if not unlocked?
p.s I add persist.sys.usb.config=ptp,adb in default.prop if that matters, but cant read, cant activate usb debugging to see from vysor. Any way?==================================
New display, repair, nvm..

need help for oppo a37fw

hi!
If u look at thi then u might help me (pls i need help!)
i have a oppo phone (a37fw) that has been bricked (idk if it bricked)
Details:
well... i got the phone after my dad give me the phone and before i give it mo my dad, i set a PIN password and now i cant remember it ,aslo the recorvery does not have reset function ( #### <=== (i type it )u OPPO) ,and when i GooGle some way to unlock, i tried to use :Msm8x39DownloadTool.exe to unlock and it stuck at half of the processs so i unplug and plug again (well ik im dumb) .as the result, it bricked
so after a year , i try to fix the phone without doing teardown stuff (id wanna brek it),seem like i still can use the usb without the box (i forgot the name)
my computer rec it with this name:
QSH_USBBULK(something like this idk)
tried to do the same app but this time i wonder how i make it vibrate (Magical)
If someone khows how to do then pls help me!
By Hackor (Nam)
If phone is accessible via ADB then to remove FRP lock you can try running these ADB commands - one by one
Code:
adb devices
adb shell "am start -n com.google.android.gsf.login/"
adb shell "am start -n com.google.android.gsf.login.LoginActivity"
adb shell "content insert --uri content://settings/secure --bind name:s:user_setup_complete --bind value:s:1"
adb reboot
jwoegerbauer said:
If phone is accessible via ADB then to remove FRP lock you can try running these ADB commands - one by one
Code:
adb devices
adb shell "am start -n com.google.android.gsf.login/"
adb shell "am start -n com.google.android.gsf.login.LoginActivity"
adb shell "content insert --uri content://settings/secure --bind name:s:user_setup_complete --bind value:s:1"
adb reboot
Click to expand...
Click to collapse
srry but i mean that my phone is kind like bricked, but its can still connect through usb
bc its a qualcomm devices

egl Tablet frp bypass.

EGL11QF6
EGL
1.0 firmware
E790C1D1944006BB6E24C855C196C7B2
Hi I have an E G L tablet I cant access due to it been locked after I did a hard reset I haven't got access to the Email account and it wont let me reset the password .
any ideas would I be able to install a custom rom and wipe it.
Any help appreciate seems a shame to throw it away
If you can establish an ADB connection between tablet and Windows computer then on Windows computer in command prompt you may run the following command sequence - one by one
Code:
adb devices
adb shell "am start -n com.google.android.gsf.login/"
adb shell "am start -n com.google.android.gsf.login.LoginActivity"
adb shell "content insert --uri content://settings/secure --bind name:s:user_setup_complete --bind value:s:1"
adb reboot
thank you unfortunately adb is not displaying device as i am unable to set developer options on tablet.
bart19788 said:
thank you unfortunately adb is not displaying device as i am unable to set developer options on tablet.
Click to expand...
Click to collapse
What chipset is your tablet?

Categories

Resources