Related
I flashed a bad ROM zip to my wife's N4 and now it won't boot. How do I transfer the proper zip to internal storage? I am using TWRP recovery.
Do you have adb and the appropriate drivers?
You can adb push a ROM zip to the phone from recovery.
CMNein said:
Do you have adb and the appropriate drivers?
You can adb push a ROM zip to the phone from recovery.
Click to expand...
Click to collapse
Yeah, that's the way to do it. Put the file in the same folder as adb.
adb push filename /sdcard/
I knew my refusal to learn how to use ADB would bite me in the @$$ one day. Time to start learning fast.
have you tried wiping data in your recovery then reflashing your rom? if you flash an incompatible rom over a previous rom, usually it wont boot(until you wipe data and reflash).
It's an updated version of the same ROM. I'm pretty sure it got corrupted uploading to and from Dropbox.
I just have to get the proper file onto the phone. I've tried the Nexus 4 toolkit, but the drivers won't install right on my Windows 8 PC.
Sent from an N4 blessed with AOKP and sanctified by Faux123!
Okay, I managed to flash the factory image via the toolkit (after fighting for hours to get the drivers to install) and then flashed the proper ROM. Lost all my wife's data and had to restore months old titanium backups. So let that be a lesson, always nandroid backup! Even if you're doing something simple.
Sent from an N4 blessed with AOKP and sanctified by Faux123!
I apparently flashed one too many times and now I am able to only pull up the TWRP recovery but there are no back ups. It seems I wiped them all out unknowingly,it says i have no OS on it now.
My question is; how do I get this up and running again? Any help will be greatly appreciated....
Do you have any TWRP backups stored on your computer? If so, you can use adb to send those backup files to your nexus internal sdcard and restore them through TWRP. You can also put your backup files on a USB stick and connect it with your nexus 7 using a USB-OTG cable (then select external storage in the restoring menu).
If not, then you'll have to (re)flash stock with fastboot. You can use a toolkit or do it manually (http://forum.xda-developers.com/showthread.php?t=1907796).
Good luck!
Westervoort said:
Do you have any TWRP backups stored on your computer? If so, you can use adb to send those backup files to your nexus internal sdcard and restore them through TWRP. You can also put your backup files on a USB stick and connect it with your nexus 7 using a USB-OTG cable (then select external storage in the restoring menu).
If not, then you'll have to (re)flash stock with fastboot. You can use a toolkit or do it manually (http://forum.xda-developers.com/showthread.php?t=1907796).
Good luck!
Click to expand...
Click to collapse
Not sure how to flash a recovery, ADB does recognize my device...TWRP comes up but that's it..
Easiest way would be to sideload a ROM zip using ADB.
Sent from my Nexus 7 using Tapatalk HD
mojimmy said:
Not sure how to flash a recovery, ADB does recognize my device...TWRP comes up but that's it..
Click to expand...
Click to collapse
You can flash a custom recovery with fastboot:
- Reboot to bootloader (adb reboot bootloader)
- fastboot flash recovery [name of recoveryfile]
I use the most recent TWRP downloaded from their official website.
If you have made a nandroid backup with TWRP, you can restore it in the restore menu in TWRP. Make sure the restore folder is on your internal sdcard or on a USB-stick connected with an OTG-cable.
If you never made a nandroid backup or can not find any:
- then you can flash a (custom) ROM with TWRP. There are lots of good quality roms available in the XDA forums (paranoid android, clockworkmod, stock ....
- or you can flash the original stock from google. You will have to reboot to the bootloader and use fastboot to flash stock (use the link I provided early).
It's not that difficult.
fixed
OTG cable did the trick, absolutely impossible to find the cable in a local store but ordered on e-bay and problem solved.
Thanks for the help....:good:
So I unlocked bootloader and flashed TWRP. Now I'm in TWRP but I don't see how to copy files from computer to device (internal SD or whatever)...?
Advanced > ADB Sideload
Then you use the "adb sideload" command from the computer to push a zip that gets automatically saved as sideload.zip and it gets installed.
It takes a bit for sideloading to start working, maybe 1 min or so, adb will say "device not found" but it will eventually work if wait long enough.
If you are not familiar with adb, you need to start reading about it.
Very good question, I've been having trouble with that myself as well. I managed to push it using adb commands but I guess there's an easier way.
But since I can't mount sd-card twrp nor Cwm, this seems like the only option.
Command is: adb push (name of file).zip (or any other file extension) /sdcard/(name if file).zip
Sent from my Nexus 4 using xda app-developers app
kwibis said:
Very good question, I've been having trouble with that myself as well. I managed to push it using adb commands but I guess there's an easier way.
But since I can't mount sd-card twrp nor Cwm, this seems like the only option.
Command is: adb push (name of file).zip (or any other file extension) /sdcard/(name if file).zip
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
I have an elementary grasp of adb now from unlocking the bootloader and flashing TWRP. Jesus christ though, I thought pure Google would be the most user friendly device to mod, but this is just silly...
Push sounds more friendly than sideload... So just to be clear, I can wipe (factory reset, cache, dalvik, system, internal), then push ROM + gapps to /sdcard/ while still in TWRP?
Thanks for your help.
.psd said:
I have an elementary grasp of adb now from unlocking the bootloader and flashing TWRP. Jesus christ though, I thought pure Google would be the most user friendly device to mod, but this is just silly...
Push sounds more friendly than sideload... So just to be clear, I can wipe (factory reset, cache, dalvik, system, internal), then push ROM + gapps to /sdcard/ while still in TWRP?
Thanks for your help.
Click to expand...
Click to collapse
Yeah, it's a bit weird. I hope someone that knows the solution will reply on this thread, or maybe I'll ask one day in the TWRP thread.
Before you wipe everything, see if the push command works when you're in twrp. For me it did. If it works, wipe your phone and push the rom and gapps to /sdcard/(name).zip yes. Make sure your path of the command window is in the folder where you've located the zip-files.
after a quick search I found out it's normal apparently. The nexus devices do not have an SD-card, only a folder called that way making it impossible to mount. Had the same issue with the Asus tablets.
http://forum.xda-developers.com/showthread.php?t=1916108&highlight=recovery+mount+sdcard
I guess I'm comfortable continuing to do it that way. I was able to push (and subsequently flash) a ROM and gapps last night. But Google should know how amazingly silly and frustrating it is that they haven't managed to make the internal mountable from recovery...
Bye bye external SD. You never know what you've got until it's gone...
The Nexus range is raw Android, so you need to know adb/fastboot inside out. Once you do it's easy but even easier is to make sure the files are on the phone BEFORE you go into recovery in the first place
kwibis said:
Very good question, I've been having trouble with that myself as well. I managed to push it using adb commands but I guess there's an easier way.
But since I can't mount sd-card twrp nor Cwm, this seems like the only option.
Command is: adb push (name of file).zip (or any other file extension) /sdcard/(name if file).zip
Click to expand...
Click to collapse
adb push/pull only work if the ROM is booted up. If for whatever reason your phone doesn't boot, e.g. you wiped System, you need to "adb sideload" a ROM while in TWRP. It's good to read ahead about "adb sideload" in case disaster strikes. Better yet, keep a handy ROM always somewhere under /sdcard, say a rooted stock ROM or any other favorite ROM. If you can't boot your phone, you can always go to TWRP, flash said backup ROM from /sdcard and you can be up and running in no time, at least you can make phone calls, etc.
The other thing that's good to get familiar with is nandroid backups from TWRP. Customize the ROM the way you like and when you are relatively happy take a backup and save it, it can be your go to image in case you mess up.
That or the factory Google image to flash via fastboot...
sirxdroid said:
adb push/pull only work if the ROM is booted up. If for whatever reason your phone doesn't boot, e.g. you wiped System, you need to "adb sideload" a ROM while in TWRP. It's good to read ahead about "adb sideload" in case disaster strikes. Better yet, keep a handy ROM always somewhere under /sdcard, say a rooted stock ROM or any other favorite ROM. If you can't boot your phone, you can always go to TWRP, flash said backup ROM from /sdcard and you can be up and running in no time, at least you can make phone calls, etc.
The other thing that's good to get familiar with is nandroid backups from TWRP. Customize the ROM the way you like and when you are relatively happy take a backup and save it, it can be your go to image in case you mess up.
Click to expand...
Click to collapse
No need for sideload, as soon as you enter twrp or cwm, the computer recognizes it as an adb device and thus things can be pushed to sd-card. Sideload is another possibility, however I've not used it as it takes a long time.
Also nandroids are nice when they are ON your sd-card, but if you decide to cleanwipe your phone including that partition it's not there anymore, hence this thread.
---------- Post added at 06:39 PM ---------- Previous post was at 06:38 PM ----------
EddyOS said:
That or the factory Google image to flash via fastboot...
Click to expand...
Click to collapse
Yes exactly, that's the last way out if you screw everything else up lol.
kwibis said:
No need for sideload, as soon as you enter twrp or cwm, the computer recognizes it as an adb device and thus things can be pushed to sd-card.
Click to expand...
Click to collapse
Wow, it does work, thanks for the tip! It never worked for me on an HTC phone so I thought it was not supposed to work.
I was gladly surprised as well when I found out
EddyOS said:
The Nexus range is raw Android, so you need to know adb/fastboot inside out. Once you do it's easy but even easier is to make sure the files are on the phone BEFORE you go into recovery in the first place
Click to expand...
Click to collapse
Well no offense to Google or people with the time to make thousands of posts in this forum, but some of us aren't interested in learning "adb/fastboot inside and out", lol...
And ya, the basic commands are relatively "easy" (once you read a hundred different newb guides and power through your inevitable mistakes). But like kwibis was saying, the purpose of this thread stems from the fact that files stored on the device are wiped in recovery immediately before installing a new ROM (factory reset, wipe cache, dalvik, system, internal)...
EDIT: unless you don't need to wipe the internal storage...? In which case you're right about copying files before booting recovery, and this whole thread is null. :|
Don't wipe internal, no need to when switching ROMs.
In fact, factory reset wipes your caches too, and ROMs typically wipe system, so factory reset is all you need. It's all I've used since reading that and I've never had a problem. It would be a rare case that you would actually have to wipe internal.
Sent from an N4 blessed with AOKP and sanctified by Faux123!
JaylanPHNX said:
In fact, factory reset wipes your caches too, and ROMs typically wipe system, so factory reset is all you need. It's all I've used since reading that and I've never had a problem.
Click to expand...
Click to collapse
Great tip!
Yes that is true, however I remember from the Crespo that wiping sd-card would sometimes remove some bugs. Have not had it on the mako though.
Sent from my Nexus 4 using xda app-developers app
kwibis said:
Yes that is true, however I remember from the Crespo that wiping sd-card would sometimes remove some bugs. Have not had it on the mako though.
Click to expand...
Click to collapse
Even so, you don't need to delete everything from the sdcard, e.g. music, photos, backups, etc. You can select which folders you want deleted, e.g Android, other (dot) folders, etc. Keeping your media should not affect any apps.
kwibis said:
I was gladly surprised as well when I found out
Click to expand...
Click to collapse
I am unhappily not surprised that I cannot get adb to work when the recovery loads and it only works when the rom is booted up. Perhaps you need an insecure boot?
Hi everyone,
So I have never ran across this issue before. I haven't had any problems with my device and yesterday I wanted to test out the new Jelly Bam update rom from their site. The rom would not boot pasted the "Google" spash screen so I rebooted in to recovery and did a full wipe and restored via backup to my previous rom just like normal. Well then I noticed that normally when I connect my phone to my computer I see my internal memory drive pop up which I am able to click on and then access my files, but this time when I accessed it I have a hand full or folders like 0, twrp, android, etc and I had to double click on o folder to access my memory with all my files. I thought that was weird so I went on about my day. Later I tried to do a fresh install of my current rom PACman but even after doing a fresh install the phone will not boot passed the Google spash screen, and now twrp doesn't even see my backup file because its being directed to this new partition with all the folders I was talking about. I even tried using the file manager in twrp to move the backup to that twrp folder but twrp doesn't even see it.
So as of right now I can get in to twrp but I can not boot my device pasted the google splash screen. I also can't access my memory through my pc since nexus does not allow it with twrp. What do I do? My thoughts are that something got screwed up with the partitions when I flashed the Jelly Bam rom so I will need to go back to stock, does that sound about right? I was thinking of following these instructions to go back to stock and then move on from there, any thoughts or alternatives? http://www.androidrootz.com/2012/12/how-to-unroot-nexus-4-to-stock-42-jelly.html
Thank you
Trying this method to return to stock: http://www.wugfresh.com/nrt/
If no one has any input I will assume I am following the right path.
I flashed factory images a couple weeks ago and in order for TWRP to see the nandroids I copied back to my phone I put them in the following path: /sdcard/TWRP/BACKUPS/stringofrandomnumbersandletters/
Are your TWRP backups in a similar location?
If you've decided to go back to stock, I'd suggest using the following guide by efrant... http://forum.xda-developers.com/showthread.php?p=34552123
Sent from my Nexus 4 using xda app-developers app
It is twrp fault. That recovery is crap to be honest.
Sent from my Nexus 4 using xda premium
It looks like twrp is now looking at my twrp folder in my sd card 1 not sd card 0 where I have had my backups and all my files. After trying again, I moved the TWRP backup to the sd card 1 twrp folder, twrp recognized it and I restored from backup....but when I reboot I am still stuck on the Google screen. Not sure what to do.
Underground_XI said:
It is twrp fault. That recovery is crap to be honest.
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
Since I can't move anything to my memory, any suggestions?
If you've got adb and the proper drivers installed on your PC you could try:
Code:
adb push ROM.zip /sdcard/ROM.zip
from the command prompt. Obviously use the name of the actual ROM.
Edit: ignore that, just read the post where you managed to restore! D'oh!
Have you tried clearing both caches?
The only issue is that my phone is not recognized as having debugging on when I use the Nexus Root Toolkit. Would it matter trying to push via adb? Also with your code, can you specify exactly what I should type. Mine shows C: \Users
synergeticink said:
The only issue is that my phone is not recognized as having debugging on when I use the Nexus Root Toolkit. Would it matter trying to push via adb? Also with your code, can you specify exactly what I should type. Mine shows C: \Users
Click to expand...
Click to collapse
If I were you I would not rely on a toolkit at this point. If you boot into recovery you can use adb commands to push the files from your computer to your phone.
Edit... Spec-Chum's suggestion of wiping caches is a good one. Have you tried that while booted into TWRP?
You could also try the following from within TWRP:
1. Factory reset
2. Wipe system
3. Restore nandroid backup
4. Wipe caches
5. Reboot
Sent from my Nexus 4 using xda app-developers app
chef_christoph said:
If I were you I would not rely on a toolkit at this point. If you boot into recovery you can use adb commands to push the files from your computer to your phone.
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
And that's were I am stuck right now. I am not a pro at using adb commands, never used it till I got my nexus 4. Right now when I launch the cmd it shows "C:\Users\My User Name\Desktop>", not sure where to go next. I guess I am not sure what I should be pushing at this point either.
Oops...it seems I was editing my post at the same time you were responding to it...take a look at my previous response again
I'm fairly new around here but I can help with the adb commands if you need. Hang in there
Sent from my Nexus 4 using xda app-developers app
chef_christoph said:
If I were you I would not rely on a toolkit at this point. If you boot into recovery you can use adb commands to push the files from your computer to your phone.
Edit... Spec-Chum's suggestion of wiping caches is a good one. Have you tried that while booted into TWRP?
You could also try the following from within TWRP:
1. Factory reset
2. Wipe system
3. Restore nandroid backup
4. Wipe caches
5. Reboot
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Yeah. I tried wiping cache/dalvik/system/factory reset and then both restoring from backup or flashing the latest PACman rom which is in my sd card. Right now I am reading the http://forum.xda-developers.com/showthread.php?t=2018179 guide to see if I can use adb to flash my rom or another recovery. Makes sense if its the recovery not letting me flash anything, but i'm not a dev. At least I am able to get in to recovery to begin with, good sign I guess.
If you can boot into bootloader and recovery there are many options to help get you up and running again. That guide by Jubakuba is really good but if wiping and restoring your backup from within TWRP didn't work I would highly suggest reading efrant's guide on returning to stock...I posted the link in an earlier reply.
Sent from my Nexus 4 using xda app-developers app
I was able to flash cwm using adb, now trying to do a fresh install
Nope, doing a fresh install didn't work. Now its time to restore to stock. ......
One problem:
"
5) Extract the files from within the .tgz file which you downloaded in step 3 using 7-zip, not WinZip or WinRAR or whatever.
6) Make sure you have extracted ALL the files (including extracting any files in any archives inside the .tgz file). You should have six (6) files ending with .img in the directory you created in step 1. The other files you extracted from the .tgz are not necessary;"
UPDATE; Got it, instructions were not clear.
synergeticink said:
UPDATE; Got it, instructions were not clear.
Click to expand...
Click to collapse
I was just checking how it appeared on my own computer before responding... I'm glad you got that part cleared up.
Sent from my Nexus 4 using xda app-developers app
chef_christoph said:
I was just checking how it appeared on my own computer before responding... I'm glad you got that part cleared up.
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Its weird adb will not work on the computer unless the files are in the platform-tools folder in androi sdk. trial and error, just finished flashing system....
should I do this command, I really don't want to lose my stuff:
10) Optional (NOT optional for n00bs) -- Flash the data partition: fastboot flash userdata userdata.img Note: this command will wipe your device (including /sdcard), EVEN if your bootloader is already unlocked. See note 2 below.
Well, I didn't and finished the process...did a reboot when I was done...now its on the Google screen...just waiting....I'm seeing a Nexus X splash screen!!!...
Update: Its taking a very long time, hopefully it works...going to give it another 10 mins
And we have BOOT... thank you everyone! Now I have to root this sucker!
Hey Xda, so I ran into a little problem earlier today.
After creating a backup on my PC with the nexus 4 root toolkit and rotting and flashing TWRP I attempted to install a rom but since it was my first time using TWRP (Im used to CWM) i accedently wiped my internal storage and my OS and now im stuck in TWRP since i have no OS to boot to.
Is there anything I can do or is all hope lost?
Thanks in advance
Gabrielvbrz said:
Hey Xda, so I ran into a little problem earlier today.
After creating a backup on my PC with the nexus 4 root toolkit and rotting and flashing TWRP I attempted to install a rom but since it was my first time using TWRP (Im used to CWM) i accedently wiped my internal storage and my OS and now im stuck in TWRP since i have no OS to boot to.
Is there anything I can do or is all hope lost?
Thanks in advance
Click to expand...
Click to collapse
Yes, install adb platform-tools and push a rom to the sdcard: adb push namerom.zip /sdcard/. Or try TWRP sideload http://teamw.in/ADBSideload.
Gabrielvbrz said:
Hey Xda, so I ran into a little problem earlier today.
After creating a backup on my PC with the nexus 4 root toolkit and rotting and flashing TWRP I attempted to install a rom but since it was my first time using TWRP (Im used to CWM) i accedently wiped my internal storage and my OS and now im stuck in TWRP since i have no OS to boot to.
Is there anything I can do or is all hope lost?
Thanks in advance
Click to expand...
Click to collapse
Dude the same thing happened to me the very first time but here's what I did I hooked up my phone to the PC and ran wug nexus tool kit and performed back to stock. And it worked like a charm hope that helps if you're still stuck there:thumbup:
Sent from my Nexus 4 using Tapatalk 2
Just posted a good reply from someone on the Nexus 10 forums who did the same thing:
espionage724 said:
I tend to take a FAT32-formatted flash drive, USB OTG cable, throw a custom ROM, Kernel, and Gapps onto the flash drive's root, reboot the tablet to TWRP, wipe everything (except USB OTG) and format data, reboot back to recovery, and then install ROM, Gapps, and Kernel (in that order).
In other words, if you have a flash drive and OTG cable, you can recover your device pretty easily If you don't have these though, you can adb push the zip's over to /sdcard I believe; it's been awhile since I've done this.
If you want to go back to factory stock, you can grab the latest factory image from the link shimp208 provided, and should be able to run the flash-all.bat included (may have to have platform-tools in PATH if running Windows, or cd into the folder).
Click to expand...
Click to collapse
Edit: I'm not entirely sure how USB OTG is on the N4 though. If it doesn't work, then adb push should be fine.
espionage724 said:
Just posted a good reply from someone on the Nexus 10 forums who did the same thing:
Edit: I'm not entirely sure how USB OTG is on the N4 though. If it doesn't work, then adb push should be fine.
Click to expand...
Click to collapse
Interesting, This is indeed a truly "clean install". Any idea if this method would this work in CWM. Sorry to OP for jacking your thread.
I myself have done this before, I hope you get through it. Goodluck