[Q] How do i flash a file to internal sdcard? - One (M7) Q&A, Help & Troubleshooting

My HTC ONE wont mount via usb so i'm trying to flash a custom rom to the phone's internal storage (as it has no sdcard slot)
I have got as far as opening the CMD and directing it to the device but i dont know the proper command to ADD a zip file to the storage
anyone pls help, i think this is fairly simple

You're supposed to be using ADB commands in order to sideload a ROM and then install it from recovery.
Is that what you are trying to do or how are you going about it? Are you trying to use fast boot commands? Because those won't work.
Here's a guide to setting up ADB:
http://www.howtogeek.com/125769/how-to-install-and-use-abd-the-android-debug-bridge-utility/
You'll need proper drivers for your computer to recognise your device in ADB mode, and those are automatically installed with HTC Sync Manager.
After placing the ROM file into the platform-tools folder, rename it to rom.zip and then execute the following command:
adb sideload rom.zip
Of course that's after making sure that your device is actually recognised by ADB and listed in command prompt, by using this code:
adb devices
Good luck

Ok great i think i have adb and most of the drivers already installed so i'll give this a go.
yes my ONE got stuck in bootloop with CM10.1 and my backups are on my PC not the phone so i figured i'd mount by USB but neither TWRP or CWM will mount by USB????
I have CWM touch installed so i'm thinking as long as this is in place my device isn't tottally shafted?

Use the command:
Code:
adb push name_of_rom.zip /sdcard/0
or
Code:
adb push name_of_rom.zip /data/media
when you're in CWM, then flash the rom

Drag and drop it to the storage folder. Should be
/storage/sdcard0
And you can use ftp WiFi from the playstore if you don't wanna connect via usb cable.

I've resolved this now.
i'll explain what i did, it may help someone else out:
I went into CWM
Then i formatted the internal sdcard
Once i did that, an option in CWM appeared to sideload zip, i picked that, then it waited for the sideload command
went to folder on my PC containing adb.exe > hold shift > right click > open command here
then typed "adb sideload <romname>"
thanks for the help, good community here.

Yes, that's the correct way. And by the way, you cannot mount usb storage while you're in recovery anymore, neither TWRP nor CWM will do that for you. The only other option is using an OTG cable.

Related

Have I Bricked MY Phone ?

I'm worried.
I went to install a new rom, so formatted my sd card first, without realising it I've wiped my backups and also the rom I was going to flash. I can still get into twrp but I have no idea how to get a rom across to my handset.
ive tried fastboot update but i just get "waiting for device"
Someone please help
gsusx said:
I'm worried.
I went to install a new rom, so formatted my sd card first, without realising it I've wiped my backups and also the rom I was going to flash. I can still get into twrp but I have no idea how to get a rom across to my handset.
ive tried fastboot update but i just get "waiting for device"
Someone please help
Click to expand...
Click to collapse
Triy adb sideload, links for how to http://www.google.nl/url?sa=t&rct=j...v4l4QSOgEwWvPXvTXm_X0Kw&bvm=bv.48705608,d.ZWU.
1. Connect your phone make sure it's actually connected and you have the drivers.
If you don't have the drivers check this out: http://forum.xda-developers.com/showthread.php?t=1983470
2. Rename the ROM you want to flash to something basic, I used Find5.zip
3. Open CMD (command prompt), navigate it to the folder you placed the ROM
(e.g. code: cd C:\Users\Jelle\Downloads\ will navigate to my Downloads folder)
4. Boot to recovery on your phone and enable the ADB sideload function.
5. in CMD type adb sideload Find5.zip
6. Let TWRP or CWM flash the zip and prompt for reboot.
7. Reboot and be happy, your phone is fixed!
gee2012 said:
Triy adb sideload, links for how to http://www.google.nl/url?sa=t&rct=j...v4l4QSOgEwWvPXvTXm_X0Kw&bvm=bv.48705608,d.ZWU.
1. Connect your phone make sure it's actually connected and you have the drivers.
If you don't have the drivers check this out: http://forum.xda-developers.com/showthread.php?t=1983470
2. Rename the ROM you want to flash to something basic, I used Find5.zip
3. Open CMD (command prompt), navigate it to the folder you placed the ROM
(e.g. code: cd C:\Users\Jelle\Downloads\ will navigate to my Downloads folder)
4. Boot to recovery on your phone and enable the ADB sideload function.
5. in CMD type adb sideload Find5.zip
6. Let TWRP or CWM flash the zip and prompt for reboot.
7. Reboot and be happy, your phone is fixed!
Click to expand...
Click to collapse
you're a gentleman
im downloading the drivers now
gsusx said:
you're a gentleman
im downloading the drivers now
Click to expand...
Click to collapse
its installing now, thank you so much !!!!

[Q] Whoops

I think I soft bricked my phone.
I tried to fastboot a new rom over to my sdcard to no avail.
I have the PhilZ Touch 5 CWM Base Version : v6.0.3.7. Build 5.11.2 - HTC_One_cm_m7ul installed.
How do I copy a file via usb cable to my sd card and flash a rom again. I'm use to a phone that had a removable micro sd so this is new to me.
Thanks
Richard
krustypick said:
I think I soft bricked my phone.
I tried to fastboot a new rom over to my sdcard to no avail.
I have the PhilZ Touch 5 CWM Base Version : v6.0.3.7. Build 5.11.2 - HTC_One_cm_m7ul installed.
How do I copy a file via usb cable to my sd card and flash a rom again. I'm use to a phone that had a removable micro sd so this is new to me.
Thanks
Richard
Click to expand...
Click to collapse
using ADB, not fastboot
adb push C:\Users\User\Downloads\rom.zip /sdcard/rom.zip
(replace the C:\Users\User\Downloads with where the zip is and rom.zip to the actual zip name)
you should be able access adb through recovery, maybe in bootloader/fastboot mode too but I'm not too sure
krustypick said:
I think I soft bricked my phone.
I tried to fastboot a new rom over to my sdcard to no avail.
I have the PhilZ Touch 5 CWM Base Version : v6.0.3.7. Build 5.11.2 - HTC_One_cm_m7ul installed.
How do I copy a file via usb cable to my sd card and flash a rom again. I'm use to a phone that had a removable micro sd so this is new to me.
Thanks
Richard
Click to expand...
Click to collapse
Can you boot into recovery? If so you should be able to push a rom zip file over adb with this command: adb push name_of_rom_file.zip /sdcard/
This is of course assuming you have adb set up and that your phone shows up when you enter the 'adb devices' command.
EDIT: looks like thom109 beat me to it.
thom109 said:
using ADB, not fastboot
adb push C:\Users\User\Downloads\rom.zip /sdcard/rom.zip
(replace the C:\Users\User\Downloads with where the zip is and rom.zip to the actual zip name)
you should be able access adb through recovery, maybe in bootloader/fastboot mode too but I'm not too sure
Click to expand...
Click to collapse
I tried this guys but my computer just says 'error' and will not push the file over. No sure where to go from here. I did order an OTG cable and will see if that will work.
bluetint said:
Can you boot into recovery? If so you should be able to push a rom zip file over adb with this command: adb push name_of_rom_file.zip /sdcard/
This is of course assuming you have adb set up and that your phone shows up when you enter the 'adb devices' command.
EDIT: looks like thom109 beat me to it.
Click to expand...
Click to collapse
Sorry.
What is says is error closed.
krustypick said:
I tried this guys but my computer just says 'error' and will not push the file over. No sure where to go from here. I did order an OTG cable and will see if that will work.
Click to expand...
Click to collapse
There isn't any more information in the error? It literally just says "error"? Do you have ADB set up properly? Have you been able to use it before?
EDIT: Didn't see your second post. I've never seen that error before.
EDIT 2: With your phone in recovery mode and plugged into your computer what is the output of the command 'adb devices' ?
bluetint said:
There isn't any more information in the error? It literally just says "error"? Do you have ADB set up properly? Have you been able to use it before?
EDIT: Didn't see your second post. I've never seen that error before.
EDIT 2: With your phone in recovery mode and plugged into your computer what is the output of the command 'adb devices' ?
Click to expand...
Click to collapse
I type c:\fastboot> adb devices - it comes back as;
List of devices attached
HT35KW909302 host
krustypick said:
Sorry.
What is says is error closed.
Click to expand...
Click to collapse
make sure you also state the name of the zip file the second time.
so adb push C:\blabla\bla\rom.zip /sdcard/rom.zip
not just adb push C:\blabla\bla\rom.zip /sdcard
and what state is your device in when trying to push? It works in fastboot mode and in recovery mode
thom109 said:
make sure you also state the name of the zip file the second time.
so adb push C:\blabla\bla\rom.zip /sdcard/rom.zip
not just adb push C:\blabla\bla\rom.zip /sdcard
and what state is your device in when trying to push? It works in fastboot mode and in recovery mode
Click to expand...
Click to collapse
It shows device in both Fastboot and ADB devices command.

recovery/fastboot only (need rom on phone)HELP PLS

I flashed a new recovery twrp 2.6.3.3 to flash android revolution rom... I am new to this recovery so I made an error of deleting formatting the internal storage and in turn the android rev zip I wanted to flash.. so now im stuck in recovery with no rom to flash..and no backup to flash or restore.
I can access fastboot and I tried doing fastboot flash zip rom.zip said remote not allowed:failed...
this twrp wont mount the phone on my pc so I can drop the zip on the phone and flash it.
removable storage shows on my pc but it says please insert removable storage when I click it
I also went to mount on twrp and put the x throu system cache and data.. and tried without the x.. usb-otg is non selectable..but I don't even know what that is.. either way I still cant get access on my computer to drop the zip..
so is there any quick way I can get a darn zip transferred to my phone so I can flash it throu twrp.?
any help would be great
thanks
matthewstice said:
I flashed a new recovery twrp 2.6.3.3 to flash android revolution rom... I am new to this recovery so I made an error of deleting formatting the internal storage and in turn the android rev zip I wanted to flash.. so now im stuck in recovery with no rom to flash..and no backup to flash or restore.
I can access fastboot and I tried doing fastboot flash zip rom.zip said remote not allowed:failed...
this twrp wont mount the phone on my pc so I can drop the zip on the phone and flash it.
removable storage shows on my pc but it says please insert removable storage when I click it
I also went to mount on twrp and put the x throu system cache and data.. and tried without the x.. usb-otg is non selectable..but I don't even know what that is.. either way I still cant get access on my computer to drop the zip..
so is there any quick way I can get a darn zip transferred to my phone so I can flash it throu twrp.?
any help would be great
thanks
Click to expand...
Click to collapse
I think you just need an OTG cable... download and copy ROM of your choice, copy it to a USB drive, then mount the USB drive to your phone using OTG cable (available in most electronics stores for something like $2)
Once the USB is mounted, go into recovery, click install, and at the top there should be a menu that lets you choose between internal sdcard and OTG. Click OTG, and you'll be able to choose the ROM to install on the USB drive.
There's a way to "push" the files to your phone when it's hooked up through USB cable to the PC, but that's a bit more complicated. You can google or search on the forums (how to push files to HTC ONE)
Ya I googled..pushed zip over fastboot as I heard adb won't work..or is that wrong? just dont know if i did it right.. fastboot flash zip yourrom.zip..I'll give that other option a try but I guess I need a USB drive..and a cord.
Thanks
Sent from my LG-P769 using xda app-developers app
Go to recovery and adb push rom,zip /data/media
matthewstice said:
Ya I googled..pushed zip over fastboot as I heard adb won't work..or is that wrong? just dont know if i did it right.. fastboot flash zip yourrom.zip..I'll give that other option a try but I guess I need a USB drive..and a cord.
Click to expand...
Click to collapse
No, that's not right for flashing a custom ROM. That would be for flashing a ROM from HTC. They're both distributed as .zip, but are different formats. @SaHiLzZ got the right answer, but I'll explain it a little further:
- Install/configure ADB (you probably already did this if you can run fastboot).
- Boot the phone to recovery
- I would run two commands just for a little added safety:
Code:
adb shell mkdir /data/media
adb shell mkdir /data/media/0
Then the key command:
Code:
adb push name-of-ROM.zip /data/media/0/
Make sure the ROM is in the present shell directory on your computer, or type the full path to the ROM. The transfer takes a few minutes. The procedure is identical on Linux/OSX/Windows.
Now the ROM is on your phone, and you can install in TWRP.
Easiest way is 2 buy a USB OTG cable and put the ROM in the USB storage
fenstre said:
No, that's not right for flashing a custom ROM. That would be for flashing a ROM from HTC. They're both distributed as .zip, but are different formats. @SaHiLzZ got the right answer, but I'll explain it a little further:
- Install/configure ADB (you probably already did this if you can run fastboot).
- Boot the phone to recovery
- I would run two commands just for a little added safety:
Code:
adb shell mkdir /data/media
adb shell mkdir /data/media/0
Then the key command:
Code:
adb push name-of-ROM.zip /data/media/0/
Make sure the ROM is in the present shell directory on your computer, or type the full path to the ROM. The transfer takes a few minutes. The procedure is identical on Linux/OSX/Windows.
Now the ROM is on your phone, and you can install in TWRP.
Click to expand...
Click to collapse
Adb push myrom.zip /data/media/0
Waited 5 min then
Failed to copy "myrom.Zip" to /data/media/0/: Is a directory
Not working.. Want to get this work in over adb as I don't want to go out an buy a cord and USB drive
First I'll try
Adb push myrom.zip /data/media
I notice the ROM zip showing on the data/media directory on the phone..but something seems to be interrupting and failing the transfer before its completed
Second attempt worked...thank you..I'm back in business
Sent from my LG-P769 using xda app-developers app
Wonderful!

Format System - Phone Wont Connect

Well I did something stupid, I was getting ready to give my phone to a friend and in my haste to make sure everything was deleted, I formatted /system in CWM recovery. I dont have any backups left on it either.
Now, I just need to flash a new rom, but I cant get my phone to connect to a computer in order to transfer the rom over.
It shows up immediately in Device Manager under Android USB Devices > My HTC, but it does not show up as a separate drive in My Computer.
Ive made sure the driver is up to date.
Anyone have any ideas?
culturistic said:
Well I did something stupid, I was getting ready to give my phone to a friend and in my haste to make sure everything was deleted, I formatted /system in CWM recovery. I dont have any backups left on it either.
Now, I just need to flash a new rom, but I cant get my phone to connect to a computer in order to transfer the rom over.
It shows up immediately in Device Manager under Android USB Devices > My HTC, but it does not show up as a separate drive in My Computer.
Ive made sure the driver is up to date.
Anyone have any ideas?
Click to expand...
Click to collapse
you cant connect your device to computer in MTP mode because you are not having any rom
try adb sideloading rom or adb push rom in custom recovery like TWRP or CWM (i used TWRP) in order to upload rom to sdcard
For Adb sideloading rom
> Reboot into TWRP
> in TWRP click "advanced" and navigate to "Sideload"
> Swipe to start Sideload
> now type "adb sideload romzip.zip"
wait until 100% then reboot back to recovery to flash the rom
If Adb sideload doesnt work..try Adb push
> Reboot into TWRP
> type "adb push rom.zip"
it might take sometime may be less than 5min to sideload or push the rom..dont cancel the command prompt after typing the above commands
Harish_Kumar said:
you cant connect your device to computer in MTP mode because you are not having any rom
try adb sideloading rom or adb push rom in custom recovery like TWRP or CWM (i used TWRP) in order to upload rom to sdcard
Click to expand...
Click to collapse
Awesome, thanks a million!

Wiped internal storage. Only have old TWRP recovery. How can I recover phone?

I can't see the device when I connect it to my laptop. ADB can't see it. I can't mount an OTG cable.
I've got a custom ROM downloaded (CM) but I don't know how to get it on to the phone to be able to install it?
Start adb sideload within TWRP
The on your pc open a command prompt / terminal and type - adb sideload rom.zip (rom.zip being the rom you downloaded)

Categories

Resources