[Q] How to enable usb debugging from recovery - Nexus 5 Q&A, Help & Troubleshooting

Hi everyone.
So here is my problem.. I wanted to change rom, was on Cataclysm and wanted to flash the latest Dirty unicorn rom but I kinda ****ed up.
I did a full wipe like asked (system etc) and I wanted to flash the new rom and gapps from TWRP, using adb and fastboot. I downloaded latest drivers for the nexus 5 on my pc, and they are working, I assume.
My problem is that, since I don't have USB Debugging enabled, my device is not listed when I open a command prompt Window in adb folder and type fastboot devices.
So now I'm stuck with my nexus 5 with no os on it, and I was wondering if I could enable usb debugging via TWRP or..?
Thanks in advance !
Note : My device is rooted BUT Unlocked, if that can help.

Your problem is either your memory if you've done this before or your reading if you haven't. Tell twrp to reboot to bootloader and try again there
Sent from my Nexus 5 using Tapatalk

Related

[Solved] Need help with installing custom recovery (twrp)

Hey all, so I bought a nexus 5 about a week ago(loving it!) and it came with boot loader unlocked. Basically I'm tryna install twrp through fastboot so I can flash SuperSU and root. Andriod version is 5.1 lollipop and I'm trying to install 2.8.5.2 twrp. I can get cmd to recognize the andriod SDK platform and is recognizes the fastboot recovery command but it says waiting for device. Do I press start on my phone or should it do this itself?
KentuckyGuy447 said:
Hey all, so I bought a nexus 5 about a week ago(loving it!) and it came with boot loader unlocked. Basically I'm tryna install twrp through fastboot so I can flash SuperSU and root. Andriod version is 5.1 lollipop and I'm trying to install 2.8.5.2 twrp. I can get cmd to recognize the andriod SDK platform and is recognizes the fastboot recovery command but it says waiting for device. Do I press start on my phone or should it do this itself?
Click to expand...
Click to collapse
You have to install drivers from here first: http://developer.android.com/sdk/win-usb.html
Is your phone booted to fastboot?
Sent via tapatalk from my cataclysm'd Lollipooop Nexus 5
Ben36 said:
Is your phone booted to fastboot?
Sent via tapatalk from my cataclysm'd Lollipooop Nexus 5
Click to expand...
Click to collapse
Fastboot is waiting on device if there isn't wright driver installed.
Enable use debugging
Install drivers and adb using adbinstaller.exe. Google it.
Then try "adb devices" in cmd
Yes my device was booted to fastboot. I already installed the android SDK, and the PC already installed driver. I'm gonna enable USB debugging as I forgot though. Will look into all of this and let you guys know. Just curious as to what is the start option in the fastboot menu on my phone?
Turns out I do need the drivers for adb. Thanks zagorteney! I'm gonna install them and see what happens.
Adb is irrelevant in fastboot mode
Sent via tapatalk from my cataclysm'd Lollipooop Nexus 5
KentuckyGuy447 said:
Turns out I do need the drivers for adb. Thanks zagorteney! I'm gonna install them and see what happens.
Click to expand...
Click to collapse
Ben36 said:
Adb is irrelevant in fastboot mode
Sent via tapatalk from my cataclysm'd Lollipooop Nexus 5
Click to expand...
Click to collapse
That's true. Adb and fastboot are two different things. In fastboot you don't need USB debugging enabled. You need to install drivers, when you are allready in fastboot mode (booted in bootloader).
zagorteney said:
That's true. Adb and fastboot are two different things. In fastboot you don't need USB debugging enabled. You need to install drivers, when you are allready in fastboot mode (booted in bootloader).
Click to expand...
Click to collapse
OK so when I use the adb devices command it doesn't pick up my device? Do I have to press the start option on my phone in bootloader? Also as I said when I use the fastboot recovery command it just keeps saying waiting for device. Should I press start on my device in the bootloader mode?
Try fastboot devices and see what it says
Sent from my Nexus 5 using Tapatalk
KentuckyGuy447 said:
OK so when I use the adb devices command it doesn't pick up my device? Do I have to press the start option on my phone in bootloader? Also as I said when I use the fastboot recovery command it just keeps saying waiting for device. Should I press start on my device in the bootloader mode?
Click to expand...
Click to collapse
If the phone is running normally, try the "adb devices" command and see if your device is recognized. Or if booted in to the bootloader, do "fastboot devices". Either way you should see your device as an alphanumeric string. If either recognizes your device, you have the correct drivers installed.
You will fastboot flash a custom recovery in bootloader mode.
Lots on good info in these threads:
http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
http://forum.xda-developers.com/goo...ide-nexus-5-how-to-unlock-bootloader-t2507905
upndwn4par said:
If the phone is running normally, try the "adb devices" command and see if your device is recognized. Or if booted in to the bootloader, do "fastboot devices". Either way you should see your device as an alphanumeric string. If either recognizes your device, you have the correct drivers installed.
You will fastboot flash a custom recovery in bootloader mode.
Lots on good info in these threads:
http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
http://forum.xda-developers.com/goo...ide-nexus-5-how-to-unlock-bootloader-t2507905
Click to expand...
Click to collapse
Away from a working PC for a couple of days but when I get access to one, will try it and let you guys know what happens.
Alright guys thanks! Got the custom recovery installed and phone is rooted! Solution was installing the Naked (United?) Drivers for nexus 4(yes they work for nexus 5 too!) Fastboot recognized the device and installed recovery susscessfully! Now it seems I have another question,I installed elementalx kernel and reverted back to stock as stock is way easier on my battery. Just wondering when changing the settings in the elementalx installer and then reverted to stock did the config stick or revert? I noticed my phones running hotter than usual which leads me to be leave the thermel throttling didn't revert. Thanks!
EDIT: It seems battery is draining faster too!
KentuckyGuy447 said:
Alright guys thanks! Got the custom recovery installed and phone is rooted! Solution was installing the Naked (United?) Drivers for nexus 4(yes they work for nexus 5 too!) Fastboot recognized the device and installed recovery susscessfully! Now it seems I have another question,I installed elementalx kernel and reverted back to stock as stock is way easier on my battery. Just wondering when changing the settings in the elementalx installer and then reverted to stock did the config stick or revert? I noticed my phones running hotter than usual which leads me to be leave the thermel throttling didn't revert. Thanks!
EDIT: It seems battery is draining faster too!
Click to expand...
Click to collapse
Probably best if you opened a new thread for separate issues.
EDIT: Yep, so nice to be ignored.
There's no way elementalx is worse on battery than stock. It's far better.
Use options for custom hotplugging
Sent via tapatalk from my cataclysm'd Lollipooop Nexus 5
Ben36 said:
There's no way elementalx is worse on battery than stock. It's far better.
Use options for custom hotplugging
Sent via tapatalk from my cataclysm'd Lollipooop Nexus 5
Click to expand...
Click to collapse
I reinstalled to test thoughly. I see where I can disable mpdecision and use custom hotplugging in the elementalx config, is that it or is there other steps I need to take besides that? Any advice or threads on this?
EDIT: I'm guessing the overheating is causing the battery drain. Stock didn't heat my device like this. Its not bad overheating but it does get significant and the battery seems to plummet when it happens. Usually happens after playing games, although stock didn't heat up this bad or drain battery that bad while playing games. It may also be the new charger I got, will charge with stock charger to see what happens.
beekay201 said:
Probably best if you opened a new thread for separate issues.
Click to expand...
Click to collapse
True but I don't want mods thinking I'm trying to spam or troll.
Thanks guys, I've done all I needed to do. As suggested by Ben using custom hotplugging and adjusting thermal throttling, device settled back down and is running smooth and heatfree(besides heavy gaming which is usual.) Thanks everyone! Guess it'll hold me over till official Cyanogenmod 12.1 nightlies start rolling out.

Stuck on Installing Custom Rom, what do I do now?

First time installing a custom ROM on my Nexus 5, I decided to pick Dirty Unicorns 5.1.1
I installed Clockwork 6.0.4.5 onto my Nexus 5, and then proceeded to do a "full wipe" as described by the Dirty Unicorns thread. However after doing so, I could not push the custom ROM onto my phone, as the command line would return me with a "error: device not found message".
Fastboot still detects the device in boot manager.
I don't have an OS on my phone since I've wiped the system/data/cache/sdcard.
I'm on Windows 8.1
What do I do now?
System, data, cache would have been adequate--no need to wipe the internal SD. That said, can you flash TWRP as a recovery or can your computer see the phone as a removable drive while booted into recovery? If so, copy the DU ROM file to the phone and flash it. (I did something similar--wiped, then accidentally deleted the DU ROM file--but my PC still saw the phone as a removable drive while booted into TWRP.)
My computer does not detect my phone as a removable drive, flashed TWRP. ADB still can't find the Nexus when I type "adb devices" in the command line.
Alright, so I got adb to find my Nexus by installing the Android Composite ADB Interface drivers.
With that being said, successfully flashed my first custom ROM.
If you're in the bootloader. Its fastboot devices
Sent from my Nexus 5 using Tapatalk
make sure that all drivers are installed correctly, android sdk tool is updated and usb cable is original
hallowieners said:
My computer does not detect my phone as a removable drive, flashed TWRP. ADB still can't find the Nexus when I type "adb devices" in the command line.
Alright, so I got adb to find my Nexus by installing the Android Composite ADB Interface drivers.
With that being said, successfully flashed my first custom ROM.
Click to expand...
Click to collapse
In TWRP select "Mount --> Enable MTP" and then connect your phone to your computer. You should see your phone mounted then.

[SOLVED] Unable to ADB Sideload

Hey guys, I may have completely stuffed this up, I got a 2nd hand Nexus 5 I was going to give to my mum. I was going to put the Chroma custom rom on it so firstly I unlock the bootloader and installed a 3.0 TWRP. After this is all done I was planning on using ADB sideload to install the custom rom, I wanted everything to be fresh and clean. So I wiped everything off it (including \system), after I done this, I realised I forgotten to enable USB debugging.
ADB works perfectly fine, so when I do ADB devices, I can see my device, I even double check that its set up correctly by using the Nexus Toolkit and ran the driver test. So when I tried to go and adb sideload chroma.zip, it says device error: no devices found. So I double check again by using adb devices and it says XXXXXXXXXXXX sideload. So its definitely there. So chances are, its because USB debugging is not enabled and this is screwing me over.
Anyone here is able to assist me with this? is there a way to enable USB debugging from TWRP (I tried to look for build.prop but that file is missing).
EDIT: Ohh, I forgot to mention that I got the latest Google drivers installed and the lastest SDK as well.
Z-Blade said:
Hey guys, I may have completely stuffed this up, I got a 2nd hand Nexus 5 I was going to give to my mum. I was going to put the Chroma custom rom on it so firstly I unlock the bootloader and installed a 3.0 TWRP. After this is all done I was planning on using ADB sideload to install the custom rom, I wanted everything to be fresh and clean. So I wiped everything off it (including \system), after I done this, I realised I forgotten to enable USB debugging.
ADB works perfectly fine, so when I do ADB devices, I can see my device, I even double check that its set up correctly by using the Nexus Toolkit and ran the driver test. So when I tried to go and adb sideload chroma.zip, it says device error: no devices found. So I double check again by using adb devices and it says XXXXXXXXXXXX sideload. So its definitely there. So chances are, its because USB debugging is not enabled and this is screwing me over.
Anyone here is able to assist me with this? is there a way to enable USB debugging from TWRP (I tried to look for build.prop but that file is missing).
EDIT: Ohh, I forgot to mention that I got the latest Google drivers installed and the lastest SDK as well.
Click to expand...
Click to collapse
usb debugging is automatically enabled while being into TWRP. I didn't try adb sideload with TWRP 3.0 so I can't confirm that the feature is working as it should be. Did you try with a previous version of TWRP? Did you enable adb sideload from TWRP before typing your command?
Primokorn said:
usb debugging is automatically enabled while being into TWRP. I didn't try adb sideload with TWRP 3.0 so I can't confirm that the feature is working as it should be. Did you try with a previous version of TWRP? Did you enable adb sideload from TWRP before typing your command?
Click to expand...
Click to collapse
Yes, I actually tried it with the previous version first due to the fact that 3.0 is new and may have bugs in it, but since that didn't work, I tried 3.0 afterwards. However, I was able to get MTP working while it was in Recovery. So I copied the files from my computer directly into the Nexus using MTP, for some reason, copying over the ROM and GApps took me over 13 hours to transfer. I didnt care how long it took at least it got it on there.
I was able to flash Chroma and GApps onto the phone so its now all good.

Rooting new nexus 5 with 6.01

Android 6.0.1, build number MOB30H
I have a brand new nexus 5 that I want to root. Using ota, I accepted the system updates to 6.0.1 with the Android security patch of May 1, 2016. (not sure if that was a good idea or not but it's done now....). Now I want to root it with a twrp recovery.
Like most run of the mill users I've only rooted a device 2-3 times in my life, so my memory is rusty on how exactly to do it. I searched this forum and found many threads about this or that rooting problem which just confused me further. I know I need to unlock the bootloader and then flash a twrp recovery but I am not sure of the exact sequence of steps.
1. When I connect the nexus 5 to my windows pc using adb, it appears in Windows but the nexus 5 folder is empty. I have developer options available and usb debugging is on but I can't find where the mtp switch is.
2. Adb.
I have adb installed in Windows. The command "adb devices" returns the nexus 5 number unauthorized.
Don't know what "unauthorized" means or what to do about it.
I've done nothing further because I don't want to mess things up. Please help me resolve questions 1 and 2. Then, I presume I need to
A. unlock the bootloader
Fastboot command?
B. What's next?
Thanks for any help.
Two things, have you enabled developer options. Go to settings, about phone and tap build number 7 times. In developer options you can change USB configuration and you'll also need to enable OEM unlock. Then unlock and root your device per the guide in the general section.
Sent from my Nexus 9 using XDA Free mobile app
jd1639 said:
Two things, have you enabled developer options. Go to settings, about phone and tap build number 7 times. In developer options you can change USB configuration and you'll also need to enable OEM unlock. Then unlock and root your device per the guide in the general section.
Click to expand...
Click to collapse
Just to add,not to confuse him even more, there is no Oem unlock option for Nexus 5
Sent from my Alps Q10101 using XDA Labs
You need to connect the phone in fastboot mode, run the command "fastboot oem unlock:, accept the agreement using the volume and power buttons, reboot into fastboot mode, flash twrp, copy the latest version of supersu.zip to the phone's internal memory, and flash supersu.zip from twrp.
You can install TWRP and root without using ADB commands.
Yes I already had developer options working and also usb debug on.
Discovered that mtp is a problem in marshmallow. I finally got file transfer working.
audit13 said:
You need to connect the phone in fastboot mode, run the command "fastboot oem unlock:, accept the agreement using the volume and power buttons, reboot into fastboot mode, flash twrp, copy the latest version of supersu.zip to the phone's internal memory, and flash supersu.zip from twrp.
You can install TWRP and root without using ADB commands.
Click to expand...
Click to collapse
Thank you very much. That is very helpful.
I didn't know you could "install TWRP and root without using ADB commands". How do you do that?
BTW, I updated the new nexus 5 to marshmallow inadvertently. When I root I'll probably use a 5.1.1 image. Good idea?
Stevica Smederevac said:
Just to add,not to confuse him even more, there is no Oem unlock option for Nexus 5
Sent from my Alps Q10101 using XDA Labs
Click to expand...
Click to collapse
Yep, my bad. Sorry about that. My 5 crapped out and have the 5x now. Amazing how fast you forget things, lol.
Sent from my Nexus 9 using XDA Free mobile app
Download and flash twrp in fastboot mode: https://dl.twrp.me/hammerhead/twrp-3.0.2-0-hammerhead.img.html
Download supersu.zip and save it to the phone's internal memory: https://download.chainfire.eu/921/SuperSU/UPDATE-SuperSU-v2.65-20151226141550.zip
Boot the phone into fasboot mode, open a command prompt, type fastboot devices and press enter. If the device is recognized, you'll see the device's serial number. Unlock the bootloader by typing "fastboot oem unlock" and use the volume/power button to accept the agreement and unlock the bootloader. Unlocking the bootloader will wipe the phone's data and cache.
To install TWRP, boot the phone into fastboot mode, connect it to the computer, open a command prompt, and type "fastboot flash recovery name-of-TWRP-file,img" and press enter. After flashing, immediately boot into recovery using the power and volume buttons, and then flash supersu.zip.
Thank you so much audit13. I really appreciate your help.
One question if I may. Reading on the web about rooting the nexus 5 running marshmallow I came across a couple of sites that said I should download and flash "ElementalX kernel and SuperSU 2.52" in addition to supersu.
I've never had to install a separate kernel when I rooted in the past. I notice you don't add flashing a kernel either. Can I ignore flashing a special kernel?
Thank you so very much for your clear instructions.
Some root methods require a rootable kernel. The latest supersu should root mm.
Thank you. Ran into a problem. That's why people like me are afraid of rooting.
Bootloader is now unlocked. Thanks.
With the N5 in fastboot mode, I connected it again with the laptop.
From the laptop command prompt I ussued "fastboot devices" and it found the phone.
Problem:
1. Fastboot flash recovery.img
(I had renamed the twrp 3.0.2 img file to recovery. Img)
Result:
unknown partition 'recovery.img'
error: cannot determine image filename for' recovery.img'
Tried by downloading a fresh copy and using its original filename.
Same result.
What am I doing wrong?
Thank you.
Found my error. I forgot the word recovery.
I now flashed twrp successfully!
When I went to flash supersu I discovered that the supersu I had downloaded was no longer in download folder. Guess it got wiped. So I rebooted into system and will download it again. Hope that does not mess up things.
Edit:
All went well. Re-downloaded SuperSU, installed fine and I'm home free.
Thank you all, especially audit13. This is a nerve-wracking process for people who only do it rarely. Glad it is over. The rest is easy!
I spoke too soon. I believe I now have a boot loop? What I have is that the horizontal turning balls of marshmallow go around forever and never finish booting.
How do I exit from this?
So close, but not there!
Edit
I rebooted into twrp, deleted cache, davlik. Still in bootloop.
Deleted data. Still in bootloop.
Help.
Reflash the entire stock rom and start over.
Try the latest beta of supersu: http://forum.xda-developers.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133
Great you are still here.
Need more details.
You say reflash stock rom. Where do I get it? How do I get it into the phone? Do I flash it through twrp?
How to flash factory image: http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
Factory images are here: https://developers.google.com/android/nexus/ota#hammerhead
Thank you again. Will do.
I think I know what went wrong. After I flashed twrp the phone rebooted into system before I could stop it and I think I interrupted it somewhere to return to twrp to flash Supersu. Anyway, glad I didn't brick it. Thanks again for being there.
It's morning now and after a good night's sleep I'm less rattled. Will get breakfast and start again.
I'm going out with my wife for breakfast.
I haven't followed the marshmallow threads but I recall reading about lingering problems with marshmallow. I also like to use xprivacy and gravitybox. So I'm thinking of flashing the latest 5.1.1 instead of 6. Any thoughts?
I like both ROMs but my battery life seems a bit better on MM. I'm sticking with unrooted stock ROMs on all of my phones for now.
Being a "flashaholic" is tiring!
audit13, I know you know this but it was so simple to do (once you know how.....!). It took me the whole of 20 minutes, if that, to download the files, flash 5.1.1, flash twrp and install SuperSU. Makes you wonder why I had so much trouble before!
Well when you don't know the command syntax (forget to write which partition to flash to) and are frozen with fear that you will brick the phone, it is a scary process. Once I knew how, I breezed through it. Problem is that by the next time I need to do this, I will have forgotten how or will worry that the process has changed.
I just want to thank you more than I can say for helping and hanging in while I made my mistakes. I wish there was a way I could thank you with more than words. You were great!
P.S. This time I used the beta SuperSU. Don't know if it made any difference.

Nexus 5 bootloop

Hi guys.
I gave my nexus 5 to my girlfriend after I bought a new smartphone. I used to run a rom on it. Yesterday she tried to update the official system through the android notification and it's boot looping since then.
I tried to flash a rom again through nexus toolkit, but I don't really remember the android version it has. (Autodetect doesn't work since it's not in debug mode). Any suggestion on what to do? What happens if I select a wrong android build when I am asked " your current android build "? Thanks for support
Choose *any build* and continue normally.
You can manually flash the phone using fastboot commands. Adb commands and debugging are not necessary using fastboot to flash a rom.

Categories

Resources