Hi,
I am trying to fix my friends nexus 4. It has a unlocked bootloader and was rooted. He had the franco kernel installed and when it was updated the other day, the wifi wouldn't work. The recovery function works and I can download any recovery or boot.img. The problem is whilst trying to fix, he erased all the data on the phone. now there is no OS installed. I believe he was running stock. Their is no zips installed. the problem i have is how can I install the new kk zip and gapps I have downloaded to the device. I cant mount the sd card in the recovery because of no sd card. I have a htc one and am used to putting roms on that. Its just I am stuck trying to fix this. The phone will enter fastboot and Recovery as discussed. Thanks..hope this makes sense
2 options..
1. you need to adb push a rom/gapps to your device while you are in recovery. then flash them after pushing.
2. you need to fastboot flash the factory image while you are in the bootloader.
simms22 said:
2 options..
1. you need to adb push a rom/gapps to your device while you are in recovery. then flash them after pushing.
2. you need to fastboot flash the factory image while you are in the bootloader.
Click to expand...
Click to collapse
Hi Thanks for your reply. I am trying to adb push a rom to the device. The computer recognizes the device when I type adb devices in the command prompt when in recovery. The problem is what do I save it to without a sd card. I seen a few videos with the command adb push name.zip /sdcard/ namezip
what do i enter instead of sd card ...thanks again
http://teamw.in/ADBSideload
tommyforest123 said:
Hi Thanks for your reply. I am trying to adb push a rom to the device. The computer recognizes the device when I type adb devices in the command prompt when in recovery. The problem is what do I save it to without a sd card. I seen a few videos with the command adb push name.zip /sdcard/ namezip
what do i enter instead of sd card ...thanks again
Click to expand...
Click to collapse
when i do it, i put the file in the same folder as adb. i enter recovery, then.. adb push namezip, then its there.
tommyforest123 said:
Hi Thanks for your reply. I am trying to adb push a rom to the device. The computer recognizes the device when I type adb devices in the command prompt when in recovery. The problem is what do I save it to without a sd card. I seen a few videos with the command adb push name.zip /sdcard/ namezip
what do i enter instead of sd card ...thanks again
Click to expand...
Click to collapse
Just use adb push name.zip /sdcard. There is an internal sdcard
Sent from my Nexus 5 using XDA Free mobile app
jd1639 said:
Just use adb push name.zip /sdcard. There is an internal sdcard
Sent from my Nexus 5 using XDA Free mobile app
Click to expand...
Click to collapse
Hi, thanks for the replies. I was able to flash a new kk rom through the adb...
Related
I need to flash a ROM, but I can't start my phone up to be able to transfer the file over. There used to be a Mount Storage Device option on my old DHD, but I noticed that on the N4, CWM does not have this option (maybe to do with MTP).
How can I copy a file over onto SDCard so I can flash it? I tried:
Code:
adb push file.zip /sdcard/file.zip
When I try and flash it, it says "Can't open /sdcard/file.zip (bad)
Flash TWRP via fastboot and mount the phone via usb the same drag it into the phone.
Alternatively as a last resort, flash back to stock using stock images provided by Google vis fast boot and then drag it onto the sd as well as reinstalling the recovery.
Sent from my Nexus 4 using xda premium
stefandunn said:
I need to flash a ROM, but I can't start my phone up to be able to transfer the file over. There used to be a Mount Storage Device option on my old DHD, but I noticed that on the N4, CWM does not have this option (maybe to do with MTP).
How can I copy a file over onto SDCard so I can flash it? I tried:
Code:
adb push file.zip /sdcard/file.zip
When I try and flash it, it says "Can't open /sdcard/file.zip (bad)
Click to expand...
Click to collapse
Remove the "file.zip" after the sdcard:
Code:
adb push file.zip /sdcard/
Also ensure the real file name doesn't contain spaces.
Edit: the command as you were typing it was telling adb to take the CONTENTS of file.zip and place them in a FOLDER called file.zip. Out of adb's range of abilities
Alternatively, if you're using CWM, you can use the "Install zip from sideload" option. Once you're in, push the file from adb using "adb sideload filename.zip"
The adb command you tried should work fine in recovery. Maybe you weren't in the correct folder where file.zip was located when you executed the adb command?
Also, if you don't have adb set in your PATH, then the adb app will need to be in the same folder as file.zip.
http://forum.xda-developers.com/showthread.php?t=1667929
se1000 said:
Alternatively, if you're using CWM, you can use the "Install zip from sideload" option. Once you're in, push the file from adb using "adb sideload filename.zip"
Click to expand...
Click to collapse
Thank you very much!
Hi everybody
Today I've just messed up my phone by deleting all TWRP backups as well as ROM zip files on my N4 (haven't found out why i did it, hell!)
Now after wipe my current rom, I've totally in the middle of "NoRom"
I have TWRP, and Nexus 4 Toolkits installed on my PC. I think all drivers are installed correctly as well, since I used them to unlock bootloader and root my N4 before.
But i just cannot figure out how to "ADB sideload" zip file to my device in order to flash a new rom.
So please guild me to do this. Many thanks
Note: I read on TWRP page and they say that I have to enable adb sideload in TWRP on my N4 (of which i've done), then "From the command line, type adb sideload /path/to/rom.zip". From that point I cannot understand. How and where could I open the command line?
(sounds noobie but since downloading that Toolkits, I've got rid of pure ADB things, so now I don't have the sdk)
Thank you.
Lol, getting rid of ADB especially when you have a nexus was a bad idea. You need ADB, so you also need the SDK (although you *might* find only adb.exe and associated files here on XDA, which should be sufficient for this particular process, but I still recommend the SDK as it is quite handy).
Once you set up the SDK on your pc, go to the folder which has adb.exe, and open a command prompt there. That's the command line you need to use for adb sideload. From there, you can simply type adb sideload file_name.zip, which will place the file_name.zip on your sdcard.
Edit: Forgot to mention this. I never used toolkits and advise using the manual method which will teach you a lot and is more comfortable to use once you get the hang of it, believe me.
Sent from my Nexus 4 using Tapatalk 4 Beta
Spiralzz said:
Lol, getting rid of ADB especially when you have a nexus was a bad idea. You need ADB, so you also need the SDK (although you *might* find only adb.exe and associated files here on XDA, which should be sufficient for this particular process, but I still recommend the SDK as it is quite handy).
Once you set up the SDK on your pc, go to the folder which has adb.exe, and open a command prompt there. That's the command line you need to use for adb sideload. From there, you can simply type adb sideload file_name.zip, which will place the file_name.zip on your sdcard.
Edit: Forgot to mention this. I never used toolkits and advise using the manual method which will teach you a lot and is more comfortable to use once you get the hang of it, believe me.
Sent from my Nexus 4 using Tapatalk 4 Beta
Click to expand...
Click to collapse
OK thank you, i'll try it
Back to the past when i got G1, i was familiar with sdk and adb thing. But as time passing by, i'm getting lazier and lazier lol, so i've almost forgotten those useful stuffs, just use some 1-click tools like the toolkits.
Help
Spiralzz said:
Lol, getting rid of ADB especially when you have a nexus was a bad idea. You need ADB, so you also need the SDK (although you *might* find only adb.exe and associated files here on XDA, which should be sufficient for this particular process, but I still recommend the SDK as it is quite handy).
Once you set up the SDK on your pc, go to the folder which has adb.exe, and open a command prompt there. That's the command line you need to use for adb sideload. From there, you can simply type adb sideload file_name.zip, which will place the file_name.zip on your sdcard.
Edit: Forgot to mention this. I never used toolkits and advise using the manual method which will teach you a lot and is more comfortable to use once you get the hang of it, believe me.
Sent from my Nexus 4 using Tapatalk 4 Beta
Click to expand...
Click to collapse
I tried sideload on my nexus 4 but it gives me this error...
"failed to write data 'protocol fault (no status)"
I have been trying to sideload cm 10.2 since my phone is stuck on the google boot logo...any ideas as to how to solve this problem?
Cheers beforehand!
close "adb.exe" in task manager
Help please. I've done the same thing as the OP. I do not know what to do next.
I am unable to mount the phone. I click on "Mount" from TWRP's main screen and nothing registers on my computer.
Under Advanced I am able to click on ADB Sideload but then the adb commands do not work to sideload a rom. I am able to use the command adb devices and that returns a response. I have also tried the adb push command to move the rom onto the phone with no response.
What should I do next?
Standard adb functions work on the main menu of twrp
Here is the easiest method.
On your pc go to your toolkit directory
Find the folder that has adb.exe in it
Copy your new Rom to this directory and rename it rom.zip (for simplicity)
Hold shift and right click on a blank bit of the folder
In the pop-up menu there should now be an option saying "open command prompt here" or something similar.
Boot your phone into twrp and plug it into your pc
On your pc's new command prompt screen type
adb push rom.zip /sdcard
Once it has completed you can install the rom as normal on your phone
Sent from my Nexus 4 using xda app-developers app
Alex240188 said:
Standard adb functions work on the main menu of twrp
Here is the easiest method.
On your pc go to your toolkit directory
Find the folder that has adb.exe in it
Copy your new Rom to this directory and rename it rom.zip (for simplicity)
Hold shift and right click on a blank bit of the folder
In the pop-up menu there should now be an option saying "open command prompt here" or something similar.
Boot your phone into twrp and plug it into your pc
On your pc's new command prompt screen type
adb push rom.zip /sdcard
Once it has completed you can install the rom as normal on your phone
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Thanks that worked.
Alex240188 said:
Standard adb functions work on the main menu of twrp
Here is the easiest method.
On your pc go to your toolkit directory
Find the folder that has adb.exe in it
Copy your new Rom to this directory and rename it rom.zip (for simplicity)
Hold shift and right click on a blank bit of the folder
In the pop-up menu there should now be an option saying "open command prompt here" or something similar.
Boot your phone into twrp and plug it into your pc
On your pc's new command prompt screen type
adb push rom.zip /sdcard
Once it has completed you can install the rom as normal on your phone
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Hey bro it says device not found. what do i do?
---------- Post added at 09:46 PM ---------- Previous post was at 09:43 PM ----------
Alex240188 said:
Standard adb functions work on the main menu of twrp
Here is the easiest method.
On your pc go to your toolkit directory
Find the folder that has adb.exe in it
Copy your new Rom to this directory and rename it rom.zip (for simplicity)
Hold shift and right click on a blank bit of the folder
In the pop-up menu there should now be an option saying "open command prompt here" or something similar.
Boot your phone into twrp and plug it into your pc
On your pc's new command prompt screen type
adb push rom.zip /sdcard
Once it has completed you can install the rom as normal on your phone
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
I have clockworkmod recovery v6.0.1.9 it didnt work for me it said device not found
---------- Post added at 10:37 PM ---------- Previous post was at 09:46 PM ----------
Alex240188 said:
Standard adb functions work on the main menu of twrp
Here is the easiest method.
On your pc go to your toolkit directory
Find the folder that has adb.exe in it
Copy your new Rom to this directory and rename it rom.zip (for simplicity)
Hold shift and right click on a blank bit of the folder
In the pop-up menu there should now be an option saying "open command prompt here" or something similar.
Boot your phone into twrp and plug it into your pc
On your pc's new command prompt screen type
adb push rom.zip /sdcard
Once it has completed you can install the rom as normal on your phone
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Hey Thank i got it working, but one thing i cant understand is i got in a boot loop cause install cm10.1.3 RC2 coming from cm 10.2 nightly version, i also flased gapp 4.2.2 assuming the rom was 4.2.2 that why. is this correct? i wanna go to cm10.1.3 RC2 current on 10.2 nightly how can i do this? which gapps should i install?
Do you have adb drivers installed?
What happens when you type
adb devices
In the command prompt
You should get the serial number of your phone, then next to it it should say recovery
If you have nothing listed then you have an issue with the drivers on your computer
Sent from my Nexus 4 using xda app-developers app
Hi,
I moved from slimbean build 8 (4.2.2) to Slimbean 5 (4.3)
After a couple of reboot the phone stucks an google screen, I tried to reflash the rom from twpr but nothing chaged.
If I try to sideload small files (like supersu) it works, with rom.zip files not..
I have "* failed to write data 'protocol fault (no status)' *" after some seconds.
If I try to use sideload from twpr home (2.6.0.0) adb doesn't work,
adb devices
List of devices attached
0076a0288a8c04be recovery
Cwm
Is it possible to do the same with Cwm instead of twrp? If so, how? Also, i have both twrp and cwm according to rom manager. How?
Thanks your a life saver!
Alex240188 said:
Do you have adb drivers installed?
What happens when you type
adb devices
In the command prompt
You should get the serial number of your phone, then next to it it should say recovery
If you have nothing listed then you have an issue with the drivers on your computer
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
HElp
Hi guys,
I had the same problem while trying to install a new rom and i got into a bootloop stuff.
I tried what its say before on this thread but my phone can't be found. what can i do ?
Excuse my english i'm French.
Thx for your help if somebody can help me.
i run adb push rom.zip /sdcard but it tells me: cannot stat 'rom.zip': No such file or directory
I know that my drivers are installed and i can see my device when i run adb devices. Thank you for any help i can get.
Jens_Karlsson said:
i run adb push rom.zip /sdcard but it tells me: cannot stat 'rom.zip': No such file or directory
I know that my drivers are installed and i can see my device when i run adb devices. Thank you for any help i can get.
Click to expand...
Click to collapse
being a noob at all of this, I am getting nowhere..... all I did so far was install android sdk. and put phone into sideload....
when I did adb push rom.zip /sdcard and it did some things?
then I do adb devices (in the cmd line of windows) and it gave me my serial number.... but what now?
I see nothing on the phone to load/install?
also: I type this: adb push rom.zip /sdcard
it says error closed.
Even i have been caught up with this same problem , and i found this thread which was pretty helpful
HTML:
http://forum.xda-developers.com/showthread.php?t=2318497
that saved my day !!
I have the same problem
I have the same issues. When i type adb devices in command prompt, I get
List of devices attached
(there are nothing under it) what should i to ? Help me please
Install http://koush.com/post/universal-adb-driver
Report back if still having issues.
help!!!!!
I get this but now what???
C:\adb> adb push rom.zip /sdcard
_
Nothing more and in my phones sd its the rom but failed when i tried to install it
I want to flash a rom but i can't save the zip files to my storage. What do i do?
I have no os but only cwm. Please help, thanks.
dicksonjoe said:
I want to flash a rom but i can't save the zip files to my storage. What do i do?
I have no os but only cwm. Please help, thanks.
Click to expand...
Click to collapse
ADB Sideload
1. Connect your phone make sure it's actually connected. No errors in Device Manager
2. Rename the downloaded ROM you want to flash to something basic, like rom.zip (Names can get rather long)
3. Open CMD (command prompt), & navigate it to the folder you placed the ROM in. or just press shift and right click on the folder where the rom is and select open command prompt here
4. Boot to recovery on your phone and enable the ADB sideload function. Under Advanced in TWRP...not sure about CWM
5. in CMD type adb sideload rom.zip or what ever the name of the .zip is
6. Let TWRP or CWM flash the zip and prompt for reboot.
7. Reboot and be happy, your phone is fixed!
You can then transfer the gapps to your internal storage and flash the normal way through your reecovery or just go through the same process for the gapps after you flash the rom.
I am having trouble installing the adb file.
I don't know what mode my phone needs to be on in order to install adb file.
dicksonjoe said:
I am having trouble installing the adb file.
I don't know what mode my phone needs to be on in order to install adb file.
Click to expand...
Click to collapse
Installing adb doesnt have to do with what mode your phone is in.
So I have now no OS installed @ nexus 4... I ve read that with adb it should work. When I now write adb push and then the Rom.zip the command line shows me a lot of Text but doesnt do anything. When i write adb push Rom zip /sdcard/download it starts to move the zip but there isnt a folder at all. And should i activate adb sideload @ nexus? Because When i Start it loads very long but nothing happens.
I have twrp recovery so what should i Do now? Because this is my First only internal sd Card Phone and i cant connect the N4 to the PC Because no OS i only need to Know how to boot any firmware or does something like odin for nexus?
Try "adb push ROM.zip /sdcard/"
(With that extra slash at the end)
Sent using xda-developers app
Chromium_ said:
Try "adb push ROM.zip /sdcard/"
(With that extra slash at the end)
Sent using xda-developers app
Click to expand...
Click to collapse
thanks man! worked perfectly
Note: I'm new to XDA, so I've basically made no posts so far. I tried posting this under HTC Bolt/Evo 10, but since I have not made the 10 post threshold yet, I cannot post there, so I just made the post here. If this post needs to be relocated please let me know.
After rooting my phone (HTC Bolt), I foolishly deleted some bloatware applications without backing them up. One of them was TouchPal, a preinstalled keyboard app. I didn't think this would be much of a problem because I already had it disabled in settings and was using a separate keyboard app for other purposes.
However, when I restart my phone, it always asks me to type my pin and "decrypt" the phone. I'm not sure why it does this (previous cell phone didn't), but apparently (this is only a theory) it uses this keyboard application, so I can't actually type my PIN in to decrypt my phone.
I could be completely wrong, and I might have accidentally deleted some other important file from my phone, but either way, I don't know how to fix my phone right now.
I did a bit of research and found out I was supposed to flash a ROM onto my device. However, I don't think I can even connect my device to my computer because normally I would have to enable USB debugging and file transfers.
So basically: is there a way to connect my phone to my computer that would allow me to do whatever is necessary to let me access my phone again? (also should I be flashing a completely new ROM? I should still have everything on my phone except a couple bloatware applications, so is there an easier workaround?)
Update: I got my phone to connect to my PC by booting it in recovery mode. I'll delete this thread if I can successfully flash a ROM.
Hey!
You have already rooted your phone - perfekt!
Now you can start to your bootloader and from there you can flash a twrp recovery if you haven't yet.
If you didn't, there are many tutorials how to do: google: your phone flash custom recovery via fastboot mode
If you have done this - you can easily backup your data with twrp recovery (I think twrp is the best)
After you have done this you can make a full whipe of your system.
If you have done this maybe the failure isnt anymore, but now you have no code to unlock! If the app is still not there - go to apkmirror.com and download the app(there are even system apps). Or just google "xxx.apk download"
After this you can restore your data from twrp!
Summary:
1. Flash recovery. Via fastboot mode
2. Restore your data via recovery
3. Full Wipe
4. Restart
5. If app is still not there - search for APK and install
6. Reboot to recovery (e.g. volume up and home at starting phone, google...)
7. Restore data
8. Restart to system.
I don't know if this Is work, but it's worth to try.
If this don't work: you can transfer data from phone to PC via fastboot mode and then you can flash custom ROM or stock rom,...
I hope this works!
Greets
Ksa
Ksawerion said:
Hey!
You have already rooted your phone - perfekt!
Now you can start to your bootloader and from there you can flash a twrp recovery if you haven't yet.
If you didn't, there are many tutorials how to do: google: your phone flash custom recovery via fastboot mode
If you have done this - you can easily backup your data with twrp recovery (I think twrp is the best)
After you have done this you can make a full whipe of your system.
If you have done this maybe the failure isnt anymore, but now you have no code to unlock! If the app is still not there - go to apkmirror.com and download the app(there are even system apps). Or just google "xxx.apk download"
After this you can restore your data from twrp!
Summary:
1. Flash recovery. Via fastboot mode
2. Restore your data via recovery
3. Full Wipe
4. Restart
5. If app is still not there - search for APK and install
6. Reboot to recovery (e.g. volume up and home at starting phone, google...)
7. Restore data
8. Restart to system.
I don't know if this Is work, but it's worth to try.
If this don't work: you can transfer data from phone to PC via fastboot mode and then you can flash custom ROM or stock rom,...
I hope this works!
Greets
Ksa
Click to expand...
Click to collapse
Thanks for the reply. How would I install the apk onto my device?
ztcfrank123 said:
Thanks for the reply. How would I install the apk onto my device?
Click to expand...
Click to collapse
I remember an easier way.
Maybe you can install app via ADB in recovery mode.
Therefore you need:
custom recovery
ADB tools installed on your PC
USB Driver installed
The APK downloaded from here: https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s=TouchPal
If you have done this - reboot to recovery.
Navigate on your PC to the adb tools folder where adb.exe is in it. Open CMD with right click on address line.
Then write in CMD:
adb devices
If your phone is found, adb commands are working.
Then copy the APK in the folder where adb.exe is in it.
Type in CMD:
adb push xxx.apk /system/app(the address where you delete apk)
So maybe this works
So first check:
- custom recovery flashed?
- adb tools installed?
- USB driver installed?
If you have further questions, let me know.
KSA
Ksawerion said:
Type in CMD:
adb push xxx.apk /system/app(the address where you delete apk)
Click to expand...
Click to collapse
How would I find out the address where I deleted the apk? I already had adb, USB drivers, and custom recovery installed.
ztcfrank123 said:
How would I find out the address where I deleted the apk? I already had adb, USB drivers, and custom recovery installed.
Click to expand...
Click to collapse
How did you delete the files?
Nice, then boot into recovery start CMD where you adb is installed and write" adb devices"
Do you see your device?
Ksawerion said:
How did you delete the files?
Nice, then boot into recovery start CMD where you adb is installed and write" adb devices"
Do you see your device?
Click to expand...
Click to collapse
The files were deleted within the phone itself through Titanium Backup, so I have no idea where the file location is. As of now, I can adb push the apk, but I don't know where to push it to.
ztcfrank123 said:
The files were deleted within the phone itself through Titanium Backup, so I have no idea where the file location is. As of now, I can adb push the apk, but I don't know where to push it to.
Click to expand...
Click to collapse
The now try:
adb remount
adb push Xxx.apk /system/app
adb shell chmod 644 /system/app/xxx.apk
adb reboot
Ksawerion said:
The now try:
adb remount
adb push Xxx.apk /system/app
adb shell chmod 644 /system/app/xxx.apk
adb reboot
Click to expand...
Click to collapse
Sorry for the late reply.
The command "adb shell chmod 644 /system/app/xxx.apk" doesn't work for some reason. It says it is not a directory. (I changed the name from xxx to the actual apk name by the way)
ztcfrank123 said:
Sorry for the late reply.
The command "adb shell chmod 644 /system/app/xxx.apk" doesn't work for some reason. It says it is not a directory. (I changed the name from xxx to the actual apk name by the way)
Click to expand...
Click to collapse
Okay then forget this command and only try 'adb push' command, and restart phone maybe it works. Merry Christmas bre
Ksawerion said:
Okay then forget this command and only try 'adb push' command, and restart phone maybe it works. Merry Christmas bre
Click to expand...
Click to collapse
Yeah... I already tried that. Also I tried a bunch of other adb commands like deleting the file and it couldn't find the directory either .
Merry Christmas to you too!
ztcfrank123 said:
Yeah... I already tried that. Also I tried a bunch of other adb commands like deleting the file and it couldn't find the directory either .
Merry Christmas to you too!
Click to expand...
Click to collapse
Was pushing successful? What says CMD after 'adb push'?