Sunday, December 8, 2013

How to: Copy ROM zip file to the freshly wiped device

Have you ever been in a situation where you mistakenly (or not) wiped the content of the internal storage (including system partition and virtual SD cardon your phone or tablet and unfortunately it doesn't support external storage? Now you can't flash desired custom ROM because you removed it and the device can't be booted due to wiped system partition. Don't worry - it's very easy to fix!

Here are the steps you need to follow to copy the correct package to your internal storage:
  1. Download this mini-sdk package and extract it to c:\mini-sdk
  2. Rename the custom ROM package you want to flash to "" and copy it to c:\mini-sdk
  3. Connect your device to the PC
  4. Boot your device in recovery mode
  5. Open a command prompt on the PC (cmd.exe), type and confirm each command with ENTER:
  6. cd /d c:\mini-sdk
  7. adb shell
  8. mount /data (error might mean that /data partition is already mounted)
  9. on Android 4.2 and above: mkdir -p /data/media/0
  10. on Android 4.1.2 and below: mkdir -p /data/media
  11. exit
  12. on Android 4.2 and above: adb push /data/media/0
  13. on Android 4.1.2 and below: adb push /data/media
  14. Wait for a few minutes until the file is copied. It will looks like command shell is not responding, but that means it's still copying. Wait patiently until you'll see blinking cursor again.
  15. Depends on your custom recovery, use the navigation keys to flash the custom package in a typical way you used to flash custom ROMs. It should be on your internal storage now. Done!
Have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) below this post!


  1. You can use this as alternative:

    - Enable Sideload in custom recovery
    - Enter command "adb sideload"

    1. Yes, but sideload is supported only on Jelly Bean and up. Older Android versions doesn't support sideload.

    2. I'm desperate here. I was using Revolution HD 31.6 and I mistakenly tried to install 40.1 and I'm on Sprint. I went back and flashed my back up and got stuck in a boot loop. I erased cache and davlik and that didnt' work. I tried to side load and I get this message. c:\Android\sdk\platform-tools>adb sideload
      * failed to write data 'protocol fault (no status)' * When Revolution 31.6 wouldn't work I tried Viper. Now I have to work in the morning. I need GPS and I'm screwed.. PLEASE... Any help would be greatly appreciated!!

  2. If I Sideload the Android 4.0 with 5.5 sense to my HTC ONE in order to free up my internal storage am I able to flash back my recovery afterwards? It would seem 25G or so is just not available so I don't think it's saved in my recovery is it? Just trying to avoid having to reinstall all of my apps ect. I have apps for reinstalling them but.. then you have to reposition and sign in to everything ect... I will if I must but.. Thoughts?

  3. I've been there. I always use push command to push the file I want from recovery adb

  4. Wow! What a helpful tutorial you did here. Its my real pleasure that your tutorial helps me to know that how to copy ROM zip file to the freshly wiped device and I hope now I will able to do it. Thanks and will come back soon. :)

  5. Microsoft Windows [Version 6.1.7600]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Windows\System32>cd /d c:\mini-sdk

    c:\mini-sdk>adb devices
    List of devices attached

    c:\mini-sdk>adb devices
    List of devices attached
    SH26CW100515 recovery

    c:\mini-sdk>adb shell
    ~ # mount /data
    mount /data
    ~ # mkdir -p /data/media/0
    mkdir -p /data/media/0
    ~ # adb push /data/media/0
    adb push /data/media/0
    /sbin/sh: adb: not found
    ~ # adb push
    adb push
    /sbin/sh: adb: not found
    ~ # push /data/media/0
    push /data/media/0
    /sbin/sh: push: not found
    ~ #

    I am getting the above error when i tried the above mentioned steps

    1. You need to exit adb shell before pushing the ROM. Type "exit" in the cmd and then type the push command.

    2. sorry i forgot to click exit

    3. I am not able to locate the /data/media/0 directory the push process has completed successfully. I am using Philz recovery

  6. after "adb shell" I'm getting the next error: " - exec '/system/bin/sh' failed: No such file or directory (2) - "

    How can I fix this?

    Thanks :)

    1. Then you are in the adb shell already. Type "exit".

    2. I'm not sure if I'm already in the adb shell because the "mount /data" command give me an error "mount is not a command" or something similar.
      Also the command "mkdir -p /data/media" is not working.

      Please see my last post on this forum with more details about my problem.
      I really need some help, I'm noob with android and I really need my phone.


    3. Please see my last post on this forum with more details about my problem:

    4. I fix it! The only way to make it work was to install the Ubuntu Emulator and all SDK drivers.

  7. After "adb shell" I´m getting "error: device not found". But I connected the device to my computer and have installed all drivers..
    What can I do?

  8. When I put command: '' adb push /data/media/0 '' in prompt, it says this: cannot stat '': No such file or directory

    What I should do ? :(

  9. Hi Dear
    Thanks for Android Revolution HD. I have 33.1 on my HTC One X. I wana ask if there is any option to do automatic update? Every time I need to check on google for update. And why there is no sound while turning ON/OFF the HTC One X?

  10. Hi mike1986, I am Vikram, I have a htc one x+, I rooted my phone one day I tried to install a rom. I deleted EVERYTHING from my phone accidentally. So I tried to do what you said but the ADB push stuff. I side loaded a rom to my htc one x+, the rom started to install and it asked me to delete the user partition and I checked yes, after that it started to install up to 30% and went back to recovery. Nothing happened, so I redid it again but this time I didn't check delete user partition, then it started to install but this time it went up 30% and was stuck there for like an hour. I dont't know to do mike, I want my phone back. Can you help me. My email is please I really need your help.

  11. Jadwal Resmi Adu Ayam SV388 9 Maret 2019 di Situs Judi Sabung Ayam Online Melalui Agen Resmi Taruhan Sabung Ayam Live Asli Thailand.

    Situs Judi Sabung Ayam Online SV388 Merupakan Situs Judi Asal Thailand Yang Sangat Terkenal Dengan Permainan Sabung Ayam Yang Fair dan Menghibur Para Penonton Judi Sabung Ayam.

    Untuk Info Lebih Lanjut Bisa Hub kami Di :
    wechat : bolavita
    line : cs_bolavita
    whatsapp : +628122222995

  12. このブログは素晴らしいです。このブログは非常に興味深く、機知に富んでいると思います。あなたのリソースはとても興味深く、私にとって有益であり、この記事ではすべてを詳細に説明しました。

    Daftar Sbobet88
    Agen Bola Terpercaya Deposit 25Rb
    Daftar Sbobet338
    Daftar Sbobet365
    Agen Sbobet88 Terpercaya
    Link Login Sbobet88 Terbaru
    Login Sbobet88 Versi WAP
    Login Sbobet88 Versi Mobile
    Sbobet88 Deposit Pulsa
    Sbobet88 Deposit OVO

  13. I am also interested in android devlopment. I do my coding with Android AIDE app. I have spent lots of time over android app devlopment. I have gain basic knowledge + little bit advance also.
    **Visit my blog**
    To (A4T) .