• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

[Verizon] [How To] ADB Push A Rom To The SDcard

iowabowtech

root@android:/ #
May 2, 2010
12,187
8,698
Iowa|USA
This thread was made for the dreaded scenario where you flash a bad rom and don't have a working backup. Since we have a non-removable sdcard, it can get a little tricky to get out of this situation now that you have a non-booting phone. Here's how:

Requirements And Assumptions:

This is written assuming you already have the sdk installed on the root of your pc's C drive. I will also mention specific Clockwork menu options although the other custom recoveries seem to use similar if not almost identical nomenclature so I don't expect this to be a pitfall.

The Procedure:

-Pull the battery, leave out for several seconds, then replace.
-Press and hold volume down and volume up and the power button all at the same time, this should bring up the bootloader screen.
-Press volume up to highlight the recovery option, then press power to enter recovery. Don't select any recovery menu options just yet.
-Plug phone into pc.
-Now place the rom zip you're wanting to push to the phone inside the sdk's platform-tools folder on your pc.
-Now open a command prompt on the pc.

Using command prompt, first navigate to the sdk's platform-tools folder:

cd c:\
cd android-sdk-windows\platform-tools

Now go ahead and push the file. If using a pre-Jellybean or pre-Jellybean rom:

adb push <name of file here.zip> /data/media/ (Note: < > symbols not to be used in actual command)

If on Jellybean or roms based upon JB, you may need to use this command instead:

adb push <name of file here.zip> /data/media/0/ (last character is a zero, not a letter "O")

You should see the transfer rate in KB/s and then the size of the file that was pushed and the time it took.

Now on the phone, you should still be seeing the recovery menu so select install zip from sdcard > choose zip from sd card, and the pushed rom should now be an available option. Repeat the above steps for Gapps if necessary/desired. If the files pushed ok, it may behoove you to first go backwards in the recovery menu and do a full wipe of data/cache/dalvik cache, then proceed to install the rom like usual. Hopefully this time, it's a working rom. :D
 
I have followed all of the steps for this recovery option. When it comes time to install the .zip from the sd card, it aborts the installation every time. The script reads:

- - Installing: /sdcard/0/obb/image-mysid-jdq39.zip
Finding update package...
Opening update package...
Installing update...
Installation aborted.


I'm very new to this and any help would be greatly appreciated.
 
Upvote 0
I have followed all of the steps for this recovery option. When it comes time to install the .zip from the sd card, it aborts the installation every time. The script reads:

- - Installing: /sdcard/0/obb/image-mysid-jdq39.zip
Finding update package...
Opening update package...
Installing update...
Installation aborted.


I'm very new to this and any help would be greatly appreciated.

It almost looks like you're trying to install the factory image which happens to be in zip format, is this correct? If so, you cannot do that. You'd want to push a custom rom and install that from recovery.

The stock image is meant to be extracted and then individual components within are flashed by way of fastboot. Entirely different animal than flashing a rom.

If you have further questions, do not hesitate to ask.
 
Upvote 0
I've followed each of the steps as closely as possible, and the problem I am having is that each time the command prompt returns "... is not recognized as an internal or external command, operable program or batch file."

Could you please post a screenshot of your cmd session? That might help us in spotting the issue.
 
Upvote 0
Could you please post a screenshot of your cmd session? That might help us in spotting the issue.

Here's both the CMD session and the SDK Manager (with 4 different failed attempts trying different strings in the command prompt). I'm attempting to use Team Nocturnal SinLess ROM v3.2.0.
 

Attachments

  • Android_CMD2.jpg
    Android_CMD2.jpg
    130.1 KB · Views: 292
  • Android_CMD.jpg
    Android_CMD.jpg
    218.1 KB · Views: 218
Upvote 0
Looks like your path is not correct to the platform-tools folder. So note the path very carefully and then run a cd command to that location. Yours is very convoluted which makes it even more difficult.

For example, mine would be:

cd c:\android-sdk-windows\platform-tools

Okay, that worked better, and got me to this point (screenshots attached). Still no successful push.
 

Attachments

  • Android_CMD3.jpg
    Android_CMD3.jpg
    779.5 KB · Views: 261
Upvote 0
You might try to kill the server and then start over since you have some failed attempts. So by that we're talking about this:

adb kill-server
adb reboot recovery

Once it reboots, retry the adb devices command.

I think you may have had a spelling error in the original push command per your screenshot. Looks to me like it said .zio instead of .zip at the end of your command? Your rom zip must be placed inside the platform-tools folder and then you must have the syntax exactly correct or it won't work. But it'd be nice if we could verify connectivity first via the adb devices command. Once we get that straight, we should be able to navigate the push command issues.

A successful adb devices command while in recovery should output the word recovery along with your device ID #.
 
Upvote 0
Also, I had a suggestion on another forum to try "adb push ROM.zip /sdcard/ROM.zip" and I got this output (attached)... I have a feeling that's not good.


Device not found usually means you don't have a driver set up properly. And the one we need right now is your "adb interface driver". While in recovery with the usb cable plugged in, check your PC's device manager. Disconnect, then reconnect the cable a time or two and watch the device manager carefully to see what is showing up/disappearing each time. If it's an unrecognized device (usually a yellow question mark) then that's what we need to fix. Meaning we'll have to manually install the driver. I'll take a look around for one.
 
Upvote 0
[ADB/FB/APX Driver] Universal Naked Driver 0.72 | Galaxy Nexus > XDA

Unzip that to your desktop into a regular folder of the same name. Then if you do indeed have the device showing up as unrecognized while in recovery, right click on the unrecognized device, manually update driver and point it to the naked driver folder on your desktop to get it loaded. Point it to the entire folder, windows will automatically search out the correct driver for your system if it resides inside that folder. Then retry the adb devices command afterward and see if that gets you going.
 
Upvote 0
[ADB/FB/APX Driver] Universal Naked Driver 0.72 | Galaxy Nexus > XDA

Unzip that to your desktop into a regular folder of the same name. Then if you do indeed have the device showing up as unrecognized while in recovery, right click on the unrecognized device, manually update driver and point it to the naked driver folder on your desktop to get it loaded. Point it to the entire folder, windows will automatically search out the correct driver for your system if it resides inside that folder. Then retry the adb devices command afterward and see if that gets you going.

When I unplug and plugged it back in several times, nothing shows up. I've connected the device to this PC before and it wouldn't assign the correct driver, but now it won't even see that it is physically connected.

Also, yes. You were correct, I did misspell the file name with .zio instead of.zip in the original command. So, I killed the server and restarted, and now the output is "error: device not found".
 
Upvote 0
[ADB/FB/APX Driver] Universal Naked Driver 0.72 | Galaxy Nexus > XDA

Unzip that to your desktop into a regular folder of the same name. Then if you do indeed have the device showing up as unrecognized while in recovery, right click on the unrecognized device, manually update driver and point it to the naked driver folder on your desktop to get it loaded. Point it to the entire folder, windows will automatically search out the correct driver for your system if it resides inside that folder. Then retry the adb devices command afterward and see if that gets you going.

Today I've been using my work PC, so when I get home later I will attempt to use the same procedure with my PC at home, which I know did load the driver correctly when I rooted the device. That will be fairly late this evening, but I will post how that turns out! I appreciate your help thus far in working through this. Looking forward to getting my Nexus running again!
 
Upvote 0
[ADB/FB/APX Driver] Universal Naked Driver 0.72 | Galaxy Nexus > XDA

Unzip that to your desktop into a regular folder of the same name. Then if you do indeed have the device showing up as unrecognized while in recovery, right click on the unrecognized device, manually update driver and point it to the naked driver folder on your desktop to get it loaded. Point it to the entire folder, windows will automatically search out the correct driver for your system if it resides inside that folder. Then retry the adb devices command afterward and see if that gets you going.

Now using my home PC, device plugged in via USB, the Device Manager does recognize the device and I've updated the driver using the above described procedure. I'm currently downloading the SDK on this PC to once again attempt to push the ROM to the device and get this situation resolved. Wish me luck!
 
Upvote 0
Good luck. :D

You should do fine. All you need when you update your sdk is tools and platform tools if you want to save time.

The trick I'm finding now is that the command prompt does see the device, but it won't push the ROM through from the PC. When I enter the appropriate command provided in the OP the CMD just displays the scripting options, etc. I did the "adb kill-server" and "adb reboot recovery" as you suggested previously. Screenshot attached shows what I'm getting. But at least the PC can see the device!! Getting there slowly but surely, I do believe.
 

Attachments

  • Android_screenshot.jpg
    Android_screenshot.jpg
    189.4 KB · Views: 313
Upvote 0
The screenshot isn't really showing the command you issued originally. Seems to be above what's showing on the screenshot?

But you did get a positive ID from the adb devices command? It said 'recovery' along with a device ID #?

Sorry about that, it was a poor screenshot. But yes, I did get a positive ID # from the adb devices command. And I just tried "adb push ROM.zip /sdcard/ROM.zip" again just for the heck of it AND IT WORKED! I've got a custom Kit Kat installed now! Hallelujah. You've been enormously helpful my friend!
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones