1. Are you ready for the Galaxy S20? Here is everything we know so far!

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

Discussion in 'Android Devices' started by iowabowtech, Aug 16, 2012.

  1. iowabowtech

    iowabowtech root@android:/ #
    Thread Starter

    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
     



    1. Download the Forums for Android™ app!


      Download

       
  2. robdijo

    robdijo Lurker

    Can you direct me where to get the stock Verizon .zip ROM for this phone?
     
  3. jmar

    jmar Nexican

  4. joesixpack

    joesixpack Android Enthusiast

    Thanks for the info. Good read for me. I really had no idea how to do this and it kinda scared me!
     
    iowabowtech likes this.
  5. kevinbw4l

    kevinbw4l Lurker

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

    iowabowtech root@android:/ #
    Thread Starter

    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.
     
    teddyearp and scary alien like this.
  7. jra_vts

    jra_vts Newbie

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

    iowabowtech root@android:/ #
    Thread Starter

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

    jra_vts Newbie

    Sure thing. I'll get back in a little bit with that. I appreciate it.
     
  10. jra_vts

    jra_vts Newbie

    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.
     

    Attached Files:

  11. iowabowtech

    iowabowtech root@android:/ #
    Thread Starter

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

    jra_vts Newbie

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

    Attached Files:

  13. iowabowtech

    iowabowtech root@android:/ #
    Thread Starter

    Once you cd'd to your platform-tools folder, run this command:

    adb devices

    What does that output?
     
  14. jra_vts

    jra_vts Newbie

    Screenshot attached. It says "List of devices attached" and nothing else. My device is connected via USB to the PC and TWRP is open on it.
     

    Attached Files:

  15. jra_vts

    jra_vts Newbie

    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.
     

    Attached Files:

  16. iowabowtech

    iowabowtech root@android:/ #
    Thread Starter

    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 #.
     
  17. iowabowtech

    iowabowtech root@android:/ #
    Thread Starter


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

    iowabowtech root@android:/ #
    Thread Starter

    [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.
     
  19. jra_vts

    jra_vts Newbie

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

    jra_vts Newbie

    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!
     
  21. jra_vts

    jra_vts Newbie

    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!
     
  22. iowabowtech

    iowabowtech root@android:/ #
    Thread Starter

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

    jra_vts Newbie

    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.
     

    Attached Files:

  24. iowabowtech

    iowabowtech root@android:/ #
    Thread Starter

    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 #?
     
  25. jra_vts

    jra_vts Newbie

    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!
     
    scary alien and iowabowtech like this.

Galaxy Nexus Forum

The Galaxy Nexus release date was November 2011. Features and Specs include a 4.65" inch screen, 5MP camera, 1GB RAM, TI OMAP 4460 processor, and 1750mAh battery.

November 2011
Release Date
0
Reviews
Loading...

Share This Page

Loading...