How can i copy Rom zip to phone, i formatted, no rom to flash but i have recovery - G2 Q&A, Help & Troubleshooting

I deleted Rom file in sdcard. I cant flash a rom. I have recovery, root and Philz Touch.
How can i copy Rom zip file from computer to Phone? Any idea. I have rooted KK, i dont want to do all things again.
How to: Copy ROM zip file to the freshly wiped device
I found and share with you, it worked.
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 card) on 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 rom.zip package to your internal storage:
Download this mini-sdk package and extract it to c:\mini-sdk
Rename the custom ROM package you want to flash to "rom.zip" and copy it to c:\mini-sdk
Connect your device to the PC
Boot your device in recovery mode
Open a command prompt on the PC (cmd.exe), type and confirm each command with ENTER:
cd /d c:\mini-sdk
adb shell
mount /data (error might mean that /data partition is already mounted)
on Android 4.2 and above: mkdir -p /data/media/0
on Android 4.1.2 and below: mkdir -p /data/media
exit
on Android 4.2 and above: adb push rom.zip /data/media/0
on Android 4.1.2 and below: adb push rom.zip /data/media
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.
Depends on your custom recovery, use the navigation keys to flash the custom rom.zip package in a typical way you used to flash custom ROMs. It should be on your internal storage now. Done! http://android-revolution-hd.blogspot.com.tr/2013/12/how-to-copy-rom-zip.html

easier solution:
*bring device in recovery mode
*open cmd, go to adb.exe
*type adb.exe push *filename.zip* /sdcard/your path **/sdcard is already linked to /data/media/0
*wait after pushing the file, reboot recovery again
*choose file and flash
*** other method ***
*use the sideload function in recovery
*adb.exe sideload *rom.zip* in cmd

it says usb device descriptor failed...is it due to bad cable??
it says usb device descriptor failed...is it due to bad cable??

Related

[TOOLS][ADB][Windows]Push files to device through ADB*now include deodex tools*

See my previous post before in post#2
This is a simple batch file using ADB..
With this you can use ADB to manage your file or APK , Backup, Push Your File to device, or pull file from device..
ADB Work on Stand by Mode (Home Screen) or in Recovery Mode, just set it up..
Extract ADBTOOLSv1.0.1.zip and you will find :
command.bat : Windows Batch Command
_BACKUP_OUT : folder where your backup process done and made
_FLASHING_OUT:
folder for flashing your :
kernel (place your boot.img here)
recovery (place your recovery.img here),
modem (place your modem.bin here)--only for gt p7300
_MODDING_FILE: Folder where your file were created by PULL process
Folder where file for PUSH process should be here
_BATCH_INSTALL : place your APK here for batch install
tools: ADB.exe and busybox binary
success_APK : A folder created for All apk from _BATCH_INSTALL move here after instalation.
Click to expand...
Click to collapse
Notes:
ADB can access all file from device from CWM Recovery, especially CWMR 5.5.0.4
ALL you need to do is:
From Recovery menu, you need to mount /data and /system for ADB working..
THEN, From Command Prompt set ADB Mode to "recovery".(This Batch File set ADB mode to "Home Screen" by default)
So when you use ADB from Online device ( I mean a stand by device).. you dont need to change ADB Mode..
After you set up, you can use ADB as you like..
Code:
=============================================================================
:::: ADB TOOLS FOR GT P7300 and P7310 by suwandiapr
-----------------------------------------------------------------------------
| [*] Before use read this:
| --make sure you have installed adb drivers for your device
| --enable "USB DEBUGGING"
| from (Menu\Settings\Applications\Development)
| --enable "UNKNOWN SOURCES"
| from (Menu\Settings\Applications)
| --increase screen timeout to 10 minutes
| --connect USB cable to PHONE and then connect to PC
| --MAKE SURE YOU HAVE A ROOTED DEVICE AND BUSYBOX
| --Place the right file in the right folder
| --Some feature like Flashing need more tester..so please be aware
| --If you use adb recovery feature, set ADB Mode to recovery
| mount /data and /system from your device recovery
| --If you use adb from homescreen, set ADB Mode to HomeScreen
| --All you Do is your own Risk, use with carefull
-----------------------------------------------------------------------------
****Turn on the screen and allow superuser permission when asked!****
_____________________________________________________________________________
| Current MODDING FILE: NONE | ADB MODE :HomeScreen | sdcard path: /sdcard/|
=============================================================================
:::: ADB PULL ::::
=============================================================================
0 Pulling file from /data ( see result in _MODDING_FILE)
1 Pulling file from /system partition ( see result in _MODDING_FILE)
2 Pulling file from SDcard ( see result in _MODDING_FILE)
3 Backup recovery ( see result in _BACKUP_OUT)
4 Backup Kernel ( see result in _BACKUP_OUT)
5 Backup modem (for P7300 only-see result in _BACKUP_OUT)
6 Backup /system (tar format-see result in _BACKUP_OUT)
7 Backup /efs (tar and .img format-see result in _BACKUP_OUT)
8 Backup APK from /data/app (tar format-see result in _BACKUP_OUT)
=============================================================================
:::: ADB PUSH ::::
=============================================================================
9 Pushing file to /data ( from _MODDING_FILE to device)
10 Pushing file to /system ( from _MODDING_FILE to device)
11 Flashing recovery ( from _FLASHING_OUT to device)
12 Flashing Kernel ( from _FLASHING_OUT to device)
13 Flashing modem for GT P7300 ( from _FLASHING_OUT to device)
=============================================================================
:::: Setting ::::
=============================================================================
14 Set current working File ( for PUSH and PULL )
15 Install busybox on device (need root)
16 Set ADB mode (if you on recovery mode)
17 Install apk ( from _MODDING_FILE to device)
18 Install batch apk ( from _BATCH_INSTALL to device)
=============================================================================
:::: Reboot Menu ::::
=============================================================================
19 Reboot System
20 Boot Into Recovery
21 Reboot Bootloader
22 Quit
My previous post
inspiration from congox case
when you got a problem with bootlop and you forget make a nandroid backup
only have file from other ROM with flashable.zip and need to push the file from your computer to device
you have a recovery support with mount /system and mount /data (tested on CWM 5.5.0.4 and overcome CWM 5.1.2.6) and you can enter this menu while bootloop happen..
STEP 1 : MANUAL
Connect your device with computer
From device, Go to recovery - mounts and storage - mount /system and mount /data
From your computer go to adb terminal and type this
Code:
adb shell "ls /data/media/"
If you can see list of file from your device sdcard, so you make adb work for your device ..
Place your zip file on your path, says on C://backup.zip and you want to copy the file to /sdcard/download/ and type this code
Code:
adb push backup.zip /data/media/download/.
wait for copying progress done..
After you done with moving file to device sdcard, check content of your sdcard with this code
Code:
adb shell "ls /data/media/download/"
When you found your file from list, you can flash backup.zip from recovery
STEP 2 : WINDOWS BATCH FILE
I made a simple Batch File for windows (sorry i dont have MAC or LINUX distro) , this file will make a folder with name "emergency" in SDCARD and with your files inside that.
Extract the FLASHER.rar somewhere on your Local folder,example: on your " Desktop" Folder
in folder "FLASHER" you will find runme.bat and folder "files"
Rename your file ((flashable.zip files you want to send through ADB) to "backup.zip" and then Put your file into this path /FLASHER/files/myfiles/ (just replace the existing "backup.zip" with files from yours)
Connect your tab with Computer
Reboot into Recovery Menu from your device
From menu Mounts and Storage choose mount /system and /data
From your Computer go To Folder flasher and klik runme.bat
Follow the instruction on window untill copying process done and device reboot to recovery again (copying process will take a minutes depend on your file size)
Now you can flash a emergency ROM from recovery
Window instruction
Code:
-----------------------------------------------------------------------------
ADB EMERGENCY COPYING TOOL for TAB 8,9
created by SUWANDIAPR
-----------------------------------------------------------------------------
[*] This script will:
(1) COPY YOUR FILE FROM COMPUTER TO SDCARD/emergency/*
(2) CHECKING YOUR CONNECTED DEVICE DIRECTORY
[*] Before u begin:
(1) make sure u have installed adb drivers for ur device
(2) make sure u have installed CWM 5.5.0.4 ON YOUR DEVICE
(3) connect USB cable to PHONE and then connect to PC
(4) Rename your Flashable .zip file with "backup.zip"
and place inside "myfiles" folder on your Computer
(5) from Recovery Menu, Choose "Mounts and storage" then
-mount /system and -mount /data
(6) CONNECT YOUR TAB WITH PC WHILE ON RECOVERY MENU
---------------------------------------------------------------
CONFIRM ALL ABOVE
Sorry for my Bad english, if there is somebody want to correct every words i use , im very welcome and will change with the proper words and sentence..
Hope this help someone..
Nice guide, thanks!!
I needed some help with mounting the system using adb through a batch file.
I use this command
adb -d shell mount -o remount rw /system
But the mounting fails (I have a rooted phone )
pleas help me I know this is off topic
2 possible reasons for this command to fail:
- /default.prop (on the phone) contains the following line: "ro.secure=1". Then you need another boot.img (in fact just a modified ramdisk). look for "unpack-bootimg.pl" or "unpackbootimage" you may find a guide how to do this manually (not too easy). A rooted kernel would also do the trick.
you can check your default prob with this command "adb shell cat /default.prop".
- in some cases mount requires more parameters. try "adb shell mount" and look for the line containing "/system". In front of system is the "device-name". in my case the mount command would look like this:
mount -o remount,rw /block/dev/mmcblk0p24 /system
hope this helps and sorry for answering off-topic questions....
nail16 said:
I needed some help with mounting the system using adb through a batch file.
I use this command
adb -d shell mount -o remount rw /system
But the mounting fails (I have a rooted phone )
pleas help me I know this is off topic
Click to expand...
Click to collapse
you can use busybox and call the binary from the shell
i assume that your device in normal mode ( in home screen)..
here some example..
Code:
su
adb push busybox /tmp/.
adb shell "chmod 755 /tmp/busybox"
adb shell "tmp/busybox mount -o remount,rw /system"
after you type "su" superuser will prompt a request, choose "allow".
glitschi667 said:
2 possible reasons for this command to fail:
- /default.prop (on the phone) contains the following line: "ro.secure=1". Then you need another boot.img (in fact just a modified ramdisk). look for "unpack-bootimg.pl" or "unpackbootimage" you may find a guide how to do this manually (not too easy). A rooted kernel would also do the trick.
you can check your default prob with this command "adb shell cat /default.prop".
- in some cases mount requires more parameters. try "adb shell mount" and look for the line containing "/system". In front of system is the "device-name". in my case the mount command would look like this:
mount -o remount,rw /block/dev/mmcblk0p24 /system
hope this helps and sorry for answering off-topic questions....
Click to expand...
Click to collapse
yes you right glistchi, samsung lock adb root on new firmware on my SG- Note..
And make me flash an older firmware for rooting..
new update
Never mind, got it to work
i want to push same file in data system (/data/data) but my tab is not root. can i??
if from cwm recovery, yes you can.. if from stand by mode (home screen) the answer is no... you need root to make it happen..
i got this error
please help

help please

i format my Nexus 4 on twrp recovery using advance wipe and i checked all the box there, and when i rebooted its stuck on google logo, what should i do?
Well why would you do that? If you selected everything under advanced in twrp, that means that you have also wiped the system partition so there is no rom to boot into, hence why you are stuck at the google logo. You will need to use adb to copy a rom onto your phone, and then flash it via twrp. Instructions:
1. Setup adb: http://www.redmondpie.com/how-to-set-up-android-adb-and-fastboot-on-windows-tutorial/
2. Install Koush's universal adb driver (google this for the download)
3. Put the phone into twrp
4. Download a rom on your pc and move it to your desktop. Rename it to "rom.zip".
5. Open a command prompt window and run the following commands:
Code:
adb devices
If your phones serial number shows up, continue. If not, reinstall drivers.
Code:
cd Desktop
adb push rom.zip /sdcard/
6. After its finished pushing, go to install within twrp and flash it.
when i typed in cd desktop it says "The system cannot find the path specified". and when i continue to adb push rom.zip /sdcard/ it says "cannot stat rom.zip: no such file or directory"
it worked, thanks for your help.
I hope you realized when you checked all the boxes, you checked to wipe the internal storage which holds all your personal data.
And you checked to wipe /system partition which house the operating system, of course there wouldn't be anything to boot into.
sent from xda premium app

[Q] error during wipe => no file to flash

Hi all !
I just receveid my LG G2 D802. I wanted to install Optimus G3 rom custom, so I root and install TWRP recovery. OK
But I did a mistake when I wipe memory (system + data...), I wipe the ROMoptimus.zip file...
How can I do to access to the file ? My phone is only identified like "android device" on my PC so, I have no possibility to enter in the phone memory to drop the rom.zip file...
Can you help me please ?
Since you deleted the ROM and wiped the phone, you'll need to push a new one to internal storage via ADB while in recovery. After making sure the phone is recognized in Windows (correct drivers installed), this would be the command from a command prompt, run from the AndroidSDK\Tools directory or from the directory containing the ADB executable...
adb push ROM.zip /sdcard/ROM.zip
... replacing ROM with the EXACT name of the ROM file, for example ROMoptimus.zip

[Tutorial] TWRP ADB Sideloading

Alternative solution: OTG usb flash drive - With one of these, you can store a ROM zip safely, and still format ‘userdata’ to f2fs or EXT4.
TWRP ADB Sideloading​
Requirements: Mac | Linux | Windows PC / Laptop and TWRP Custom Recovery
Moto G (1st Gen) has no SD Card slot. This creates a problem for people converting their phones to GPE and back; as the entire internal storage needs to be formatted (wiped.)
Fastboot images can be used to get android onto your phone after formatting, but there is another way.
NOTE: TWRP needs to be restarted whenever 'data' is changed to a different filesystem.
Example 1:
GPE user wants to flash Stock Motorola ROM.
1) In TWRP, format ‘data’ to f2fs
2) In TWRP, enable ADB Sideloading
3) On PC, use command: ADB sideload stockrom.zip​
Example 2:
Stock Motorola ROM user wants to run GPE.
1) In TWRP, format ‘data’ to ext4
2) In TWRP, enable ADB Sideloading
3) On PC, use command: ADB sideload gperom.zip​
How to access ‘Recovery mode’ ADB:
On a Linux laptop, this is what happens when I use the 'adb devices' command while in TWRP. No drivers are required. I suspect the same applies to Mac OS.
[email protected]:~$ sudo adb devices
List of devices attached
TA53307V38 recovery​
On Windows, it seems not everyone is able to use ADB when in TWRP. The reason for this is that the Motorola drivers installed on the PC are not adequate.
15 Seconds ADB installer includes a generic android driver that may be the solution for people with this problem.
I'd appreciate any tips and insights into how to make this work on different versions of Windows.
Thanks for the guide
some other methods of doing same
Method-1. TWRP 2.8.4.0 supports MTP mode. (Main Menu >> Mount >> Enable MTP) Drivers required for windows. zip file can be copied in MTP mode (Though MTP mode available in 2.7.1.0 it was not working for me but TWRP2.8.4.0 works ). flash via recovery
Method-2. using ADB: place ROM.zip in the adb folder. type following command
Code:
adb push rom.zip /sdcard/
rom will be copied to sdcard. but it does not show the transfer process. flash via recovery
I will report as soon as I will reach home. Well this was needed for people who have issues with adb..
Sent from my Moto G using XDA Free mobile app
For those getting error:
Code:
C:\Users\username\moto>adb sideload sideload.zip
loading: 'sideload.zip'
* failed to write data 'protocol fault (couldn't read status): Invalid argument' *
In TWRP, go to restart > Recovery mode and try again, after the reboot!
Then it works:
Code:
C:\Users\username\moto>adb sideload sideload.zip
loading: 'sideload.zip'
sending: 'sideload.zip' 100%
Can i sideload any type of zip, like BootAnimation zip or System app zips etc, instead of only ROM zips???
subroto1427 said:
Can i sideload any type of zip, like BootAnimation zip or System app zips etc, instead of only ROM zips???
Click to expand...
Click to collapse
You can sideload any zip that you could also install from local storage.
reversegear said:
Thanks for the guide
some other methods of doing same
Method-1. TWRP 2.8.4.0 supports MTP mode. (Main Menu >> Mount >> Enable MTP) Drivers required for windows. zip file can be copied in MTP mode (Though MTP mode available in 2.7.1.0 it was not working for me but TWRP2.8.4.0 works ). flash via recovery
Method-2. using ADB: place ROM.zip in the adb folder. type following command
Code:
adb push rom.zip /sdcard/
rom will be copied to sdcard. but it does not show the transfer process. flash via recovery
Click to expand...
Click to collapse
It seems Lineage 14.1 uses boot loader 0x4111, instead of 0x411A.
Edit: The following resolved it
https://forum.xda-developers.com/moto-g/general/falcon-bootloader-upgrader-tool-t3093793

A way of install ROM without OTG

I have no OTG, I find a way of flash Lineageos/Pixelextend.......ROM of Realme x2 pro without OTG.
1. make adb works on your computer, mine is Windows7.
2. boot your phone into twrp or orangefox recovery. if you can't see the internal storage of phone, then:
3. on your pc, In the directory of ROM file you downloaded, run this command (you must config windows system environment and add the adb directory first, or you must move the ROM file to your work directory of adb.exe )
Code:
adb push PixelExtended_RMX1931-12.1-20220715-0042-UNOFFICIAL.zip /tmp
the ROM file will transfer to /tmp directory of your phone.
4. in twrp, you can "install" and find the ROM file under /tmp directory.

Categories

Resources