[HOW TO] ADB Sideload/Push if you Wipe Internal Storage & No ROM to Flash [19 May 15]

smiler51

Member
Jul 6, 2011
26
0
0
I was able to solve my problem through going into the download mode and then flashing the original .kdz. Don't know why this error always happened...

Smiler51
 

landfiller

Member
Apr 16, 2015
21
0
0
Wilkes-Barre
Hey Guys,

made the same mistake and deleted everything in TWRP and have no rom on the phone left.

I installed the ADB Tool (http://forum.xda-developers.com/show....php?t=2588979) and can see my phone as a connected device to be sideloaded to (command adb devices) which is good.

Now i tried to sideload the rom into the phone (adb sideload myromname.zip) and get error: * cannot read 'myromname.zip' *
I then tried: adb push myromname.zip /data/media/0/ and get "error: closed".

Same problem as the guys above me. My phone is an LG G2 D802,

I am on Windows 8.1 64bit (PowerShell runs as x86) and installed ADB Installer 1.3 and 1.42. What am i doing wrong? WHen i do the push command, maybe the folder structure on my phone is not existend or wrong...

Thanks

Smiler51
At least your phone is being recognized, I get device not found... I hope you figured out and are back up and running. If/when I get mine fixed, will stay out of it after this. I thought it'd be simple to just update ROM... Wrong!!!! Good luck!!!!
 

vinuneuro

Senior Member
Apr 29, 2012
608
43
0
Chicago
I am getting the cannot read error. The zip is in my platform-tools folder where adb is. If I do "adb sideload xxx.zip" I get the cannot read error. If "adb sideload fulldirectorypath\xxx.zip" I get the following below which the OP says in the second post is due to not being in sideload mode (twrp says it is) or the command was typed incorrectly. I've tried naming the file differently as well as tried different zip files. I am at a loss at what else to try and would appreciate any advice.

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

C:\Users\William>cd Downloads\ADB

C:\Users\William\Downloads\ADB>adb sideload Slim-nozomi-4.2.2.build.6-OFFICIAL
Android Debug Bridge version 1.0.26

-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <serial number> - directs command to the USB device or emulator w
ith
the given serial number. Overrides ANDROID_SERI
AL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.

If -p is not specified, the ANDROID_PRODUCT_OUT

environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>:<port> - connect to a device via TCP/IP
disconnect <host>:<port> - disconnect from a TCP/IP device

device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport

adb install [-l] [-r] [-s] <file> - push this package file to the device and i
nstall it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
('-s' means install on SD card instead of inter
nal storage)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.

adb help - show this help message
adb version - show version num

DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition

scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns

adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:

- If <directory> is not specified, both /system and /data partitions will be u
pdated.

- If it is "system" or "data", only the corresponding partition
is updated.

C:\Users\William\Downloads\ADB>-d
'-d' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\William\Downloads\ADB>-d\
'-d\' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\William\Downloads\ADB>-d: \
'-d:' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\William\Downloads\ADB>:-d
C:\Users\William\Downloads\ADB>-d\
'-d\' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\William\Downloads\ADB>-d
'-d' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\William\Downloads\ADB


---------- Post added at 07:13 PM ---------- Previous post was at 06:51 PM ----------

I am getting the cannot read error. The zip is in my platform-tools folder where adb is. If I do "adb sideload xxx.zip" I get the cannot read error. If "adb sideload fulldirectorypath\xxx.zip" I get the following below which the OP says in the second post is due to not being in sideload mode (twrp says it is) or the command was typed incorrectly. I've tried naming the file differently as well as tried different zip files. I am at a loss at what else to try and would appreciate any advice.

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

C:\Users\William>cd Downloads\ADB

C:\Users\William\Downloads\ADB>adb sideload Slim-nozomi-4.2.2.build.6-OFFICIAL
Android Debug Bridge version 1.0.26

-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <serial number> - directs command to the USB device or emulator w
ith
the given serial number. Overrides ANDROID_SERI
AL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.

If -p is not specified, the ANDROID_PRODUCT_OUT

environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>:<port> - connect to a device via TCP/IP
disconnect <host>:<port> - disconnect from a TCP/IP device

device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport

adb install [-l] [-r] [-s] <file> - push this package file to the device and i
nstall it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
('-s' means install on SD card instead of inter
nal storage)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.

adb help - show this help message
adb version - show version num

DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition

scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns

adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:

- If <directory> is not specified, both /system and /data partitions will be u
pdated.

- If it is "system" or "data", only the corresponding partition
is updated.

C:\Users\William\Downloads\ADB>-d
'-d' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\William\Downloads\ADB>-d\
'-d\' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\William\Downloads\ADB>-d: \
'-d:' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\William\Downloads\ADB>:-d
C:\Users\William\Downloads\ADB>-d\
'-d\' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\William\Downloads\ADB>-d
'-d' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\William\Downloads\ADB
Found this in another thread and it worked!

I had this problem too, but solved it this way:

Place the file you're trying to sideload is in the same adb directory, f.i. C:\Android
And when in the CMD window, change the active directory to this directory before you type: adb sideload [name of file]

So:
- run CMD window

- change your active directory to adb C:\Android
Code:
cd\
cd android
- type:
Code:
adb devices
(List of devices should indicate a number of the connected device)

- type:
Code:
adb sideload [name of file]
 
Last edited:

bdorr1105

Senior Member
Sep 6, 2008
4,129
3,112
0
I was able to solve my problem through going into the download mode and then flashing the original .kdz. Don't know why this error always happened...

Smiler51
I am sorry I didn't realize I have not subscribed to this thread anymore..

Once adb is good to go, the file you are pushing must be inside the platform tools folder and the easiest thing to do is navigate to the platform tools folder, shift right click on it and open a command window here....

In command prompt you have to change directory to the adb folder which is platform tools and the file must also be inside of it...

That is for side load as well as adb push
 

FreeIRide

New member
Oct 16, 2015
1
0
0
Hoping this thread is still active. I tried to sideload MRA58K from LMY48T using the OTA download link from google. I got a serving (~85%) failed to read command error. What's weirder is that the phone booted up into the new OS as if it worked - optimized apps, new splash screen, and everything. What happened? Is there anyway I can check to see if the install was cleanly done? I don't feel like I can redo the sideload to ensure a good install given the file was supposed to upgrade LMY48T to MRA58K and my about phone section shows I have MRA58K. Any help would be great. Thanks
 

bdorr1105

Senior Member
Sep 6, 2008
4,129
3,112
0
Hoping this thread is still active. I tried to sideload MRA58K from LMY48T using the OTA download link from google. I got a serving (~85%) failed to read command error. What's weirder is that the phone booted up into the new OS as if it worked - optimized apps, new splash screen, and everything. What happened? Is there anyway I can check to see if the install was cleanly done? I don't feel like I can redo the sideload to ensure a good install given the file was supposed to upgrade LMY48T to MRA58K and my about phone section shows I have MRA58K. Any help would be great. Thanks
You do not even have to side load really, you can just open your internal memory from my computer via mtp, just drag and flash a custom ROM or use the Nexus Toolkit

Sent from my Nexus 6 using Tapatalk
 

bdorr1105

Senior Member
Sep 6, 2008
4,129
3,112
0

dafas

Member
Feb 10, 2015
42
1
0
Yes

Sent from my SM-N920T using Tapatalk
OMG! R u sure? I have no service with my device after installing wrong region firmware. i'm looking how to extract radio files, modem,modemst1,modemst2. or something like that. And now u r saying I can just install my original ROM simple like that? :silly:
So, I have cwm recovery, I have original recovery, I have needed rom (update.app),even bought a code generator for bootloader to unlock it..
I'm tyred of bricking it again and again.

So Should I use in cmd:
adb sideload update.app <<<<<<<<<<<<<<<<<<<<<<<THAT'S ALL?
No something like flash all or flash rom update.app?

BTW it's not zip, so maybe I should flash original recovery 1st? Don't remember if it have adbsideloadoption
 
Last edited:

dafas

Member
Feb 10, 2015
42
1
0
And here i'm answering to my questions
ADB sideload with cwm recovery stuck on 77%;
ADB sideload with original recovery same stuck on 77%

Maybe I should wipe my rom with cwm, before doing it;
Then maybe I should flash original recovery;
After that maybe I can install update.app via ADB sideload, or maybe standard force upgrade would work then..

Or, my device is just cursed, and there is no sulutions to get it running :confused::confused:
 

bdorr1105

Senior Member
Sep 6, 2008
4,129
3,112
0
OMG! R u sure? I have no service with my device after installing wrong region firmware. i'm looking how to extract radio files, modem,modemst1,modemst2. or something like that. And now u r saying I can just install my original ROM simple like that? :silly:
So, I have cwm recovery, I have original recovery, I have needed rom (update.app),even bought a code generator for bootloader to unlock it..
I'm tyred of bricking it again and again.

So Should I use in cmd:
adb sideload update.app <<<<<<<<<<<<<<<<<<<<<<<THAT'S ALL?
No something like flash all or flash rom update.app?

BTW it's not zip, so maybe I should flash original recovery 1st? Don't remember if it have adbsideloadoption
You can sideload any file, doesn't mean it will help you... What device do you have and what happened? Sounds like you are going to need to do much more than sideload... This will not solve problems like that...

Fastboot flashing the modem for example will, or full factory restore

Sent from my SM-N920T using Tapatalk
 

dafas

Member
Feb 10, 2015
42
1
0
You can sideload any file, doesn't mean it will help you... What device do you have and what happened? Sounds like you are going to need to do much more than sideload... This will not solve problems like that...

Fastboot flashing the modem for example will, or full factory restore

Sent from my SM-N920T using Tapatalk
my device is huawei G740-l00. services lost after installing upgrade from another region. i'w managed to find some files of modem I wrote above. But from update.app, I can extract only system, boot, user data ( I mean I can't identify other files). what do you mean full factory restore? like deleting everything including boot? :D I would like to do it btw. I know, I can't reboot my phone then, but I may do adb push then 1 by 1 on those files.
Exactly problem with update.app is that I can't use force upgrade, because of oemsbl error. & I'm not sure, but I think information about it maybe in boot.img? so after wiping it, maybe my problem would be solved at last.
Well, if bootloader info is there too, maybe then it's not a bes sollution, but I can backup boot.img, & after getting software what I needed I may flash my boot again?
 
Last edited:
  • Like
Reactions: MKOJOA

Drumattic00

New member
Mar 9, 2016
1
0
0
I dont know if this will help anybody, but I had MTP enabled in TWRPS. This caused a conflict between my pc and the phone, and I was receiving the classic "Cannot Load xxx.zip".. I disabled MTP, and I was solid.

Thanks for all the other hints.
 

Coldstone51

New member
Jul 8, 2016
1
0
0
any specific format the update should be in or is a zip what i need to use? have had someone "knowledgable tell me a zip wont work that it has to be only the img file or whatever files are within the zip not the zip itself... any help would be awesome
 
P

Perottonis

Guest
How to Sideload in TWRP if you erase your Internal Memory and don't have a ROM to Flash or Restore


Warning!

Code:
#include 
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/

Requirements

Code:
#include 
/*
* Unlocked Phone @ HTCDEV
* Custom Recovery
*/


Before You Start - Update Android SDK - How to set up Android SDK (ADB)








Instructions








If You have any Troubles with ADB

Koush Universal ADB Driver - Works on Windows 8 - Thanks xeroxide


YouTube Video for ADB Help

How to install ADB Drivers for any Device



I'm going through this: http://forum.xda-developers.com/galaxy-note-10-1/help/n8000-insane-bug-t3444875
Any idea on how to solve? Thanks.