[Q] nandroid backup via adb (no screen) - HTC EVO 3D

long story short, my 3d took a swim. dried it in rice and everything, but the lcd doesn't look like it is going to come back all the way. I tried to boot into the bootloader and I can see a little light at the bottom of the screen and the bootloader screen VERY faintly. I can connect to the phone via adb and send some commands so the phone seems to be at least kindof working, except for the screen.
I've tried to find a way to do this but I am stuck. what is the easiest way to backup everything on my phone through adb (since I have no working screen)? can you do a nandroid backup through adb? I have the latest twrp installed.

jon1234444 said:
long story short, my 3d took a swim. dried it in rice and everything, but the lcd doesn't look like it is going to come back all the way. I tried to boot into the bootloader and I can see a little light at the bottom of the screen and the bootloader screen VERY faintly. I can connect to the phone via adb and send some commands so the phone seems to be at least kindof working, except for the screen.
I've tried to find a way to do this but I am stuck. what is the easiest way to backup everything on my phone through adb (since I have no working screen)? can you do a nandroid backup through adb? I have the latest twrp installed.
Click to expand...
Click to collapse
It is not necessarily a nandroid, but you can 'adb pull' your system and data.
私のEVO 3Dから送信される。

jon1234444 said:
long story short, my 3d took a swim. dried it in rice and everything, but the lcd doesn't look like it is going to come back all the way. I tried to boot into the bootloader and I can see a little light at the bottom of the screen and the bootloader screen VERY faintly. I can connect to the phone via adb and send some commands so the phone seems to be at least kindof working, except for the screen.
I've tried to find a way to do this but I am stuck. what is the easiest way to backup everything on my phone through adb (since I have no working screen)? can you do a nandroid backup through adb? I have the latest twrp installed.
Click to expand...
Click to collapse
i might be missing it, but i'm not seeing any command line arg which can be passed to the actual recovery binary to trigger a nandroid backup
i'm looking is the source file to the latest twrp recovery.c around these lines: https://github.com/TeamWin/TWRP2/blob/master/recovery.c#L912
Code:
switch (arg) {
case 'p': previous_runs = atoi(optarg);
break;
case 's': send_intent = optarg;
break;
case 'u': update_package = optarg;
break;
case 'w': wipe_data = wipe_cache = 1;
break;
case 'c': wipe_cache = 1;
break;
case 'e': encrypted_fs_mode = optarg; toggle_secure_fs = 1; break;
case 't': ui_show_text(1);
break;
case '?': LOGE("Invalid command argument\n");
continue;
}
the good news: almost anything is possible over ADB!
the bad news:
otherwise, i'm not seeing any command line type input point in the backstore.c file to access the nandroid functions.
the older amon ra was using a sh for backup/restore which could be access thru the command line.
looking at the earlier release of twrp, nandroid backup/restore seems to setup similarity w/o command line access. as i recall, has been a while, but cwm is also using similar functionality as twrp in that there isn't command line access, but I could be wrong on cwm?
dastin1015 said:
It is not necessarily a nandroid, but you can 'adb pull' your system and data.
私のEVO 3Dから送信される。
Click to expand...
Click to collapse
this is prob the easiest method to pull all the files out. if you wanted to make it simplier, you could create a tar of the directories onto the sdcard and then adb pull the single .tar file
first, make sure to mount the partitions:
adb shell
mount -o rw /system /system
mount -o rw /data /data
then exit the shell
something such as: adb shell tar -cvf /sdcard/system-backup.tar /system
and: adb shell tar -cvf /sdcard/data-backup.tar /data
for using the straight adb pull method, you'll want to mount the partitions first and then you can execute the adb command.
adb shell
mount -o rw /system /system
mount -o rw /data /data
then exit the shell
adb pull /system c:\android-backup\system
adb pull /data c:\android-backup\data
hope that helps point in the right direction. good luck!

thanks a lot joey, though I managed to find a very similar solution late last night: http://forum.xda-developers.com/showthread.php?t=1021625
though after doing that and opening the tar files with 7-zip it gave me an "unexpected end of archive" error so I was suspicious it didnt get everything.
the real kicker though was finding this:
http://code.google.com/p/androidscreencast/
it actually works and I was able to get in and titanium backup everything.

joeykrim said:
for using the straight adb pull method, you'll want to mount the partitions first and then you can execute the adb command.
adb shell
mount -o rw /system /system
mount -o rw /data /data
then exit the shell
adb pull /system c:\android-backup\system
adb pull /data c:\android-backup\data
hope that helps point in the right direction. good luck!
Click to expand...
Click to collapse
Did this.. Now how to restore? ADB push?
Some kind of format the phone first?
Also can restore to different (replacement, same kind) phone?
Thanks much!

jackfrost909 said:
Did this.. Now how to restore? ADB push?
Some kind of format the phone first?
Also can restore to different (replacement, same kind) phone?
Thanks much!
Click to expand...
Click to collapse
Also, curious how you would restore the files.
Could you just rename the .tar file as system.img and issue the following commands?
fastboot flash system system.img
Would this work?

Related

unrooting without using the device?

so my screen recently stopped displaying anything,and im probably gonna send it in to verizon ASAP. is there a way to unroot the device using somthing like adb?
theblorg said:
so my screen recently stopped displaying anything,and im probably gonna send it in to verizon ASAP. is there a way to unroot the device using somthing like adb?
Click to expand...
Click to collapse
RUU10chars
theblorg said:
so my screen recently stopped displaying anything,and im probably gonna send it in to verizon ASAP. is there a way to unroot the device using somthing like adb?
Click to expand...
Click to collapse
If you can't see the screen, then neither can Verizon. By the time your phone gets to a repair facility (which might not even happen at this point), nobody is going to care who the prior owner of the phone was. Something to consider.
But, since you asked, here's a couple of alternatives.
(1) Try using the "Official" 2.1 RUU -or-
(2) Manually install the Leak-V3 ROM via adb [SIZE=+1]with Amon_RA booted[/SIZE]:
(a) Unpack the Leak-V3 PB00IMG.ZIP file on your PC. (Note that Windows native "compressed folder" zip implementations may not work because of the way that HTC signs the PB00IMG.ZIP files; iirc 7-zip should work, and certainly Linux/cygwin versions of "unzip" will work)
(b) Push the following individual files (unpacked from the PB00IMG.ZIP) to your sdcard:
Code:
adb push recovery.img /sdcard/
adb push boot.img /sdcard/
adb push system.img /sdcard/
adb push userdata.img /sdcard/
(c) Start a shell on the phone with adb ("adb shell")
(d) In the adb shell on the phone, perform the following steps, exactly as shown here. ( Do not type them - cut and paste, one line at a time )
Code:
mount /system
mount /data
mount /sdcard
flash_image boot /sdcard/boot.img
cd /system
rm -rf /system/*
unyaffs /sdcard/system.img
cd /data
rm -rf /data/*
unyaffs /sdcard/userdata.img
flash_image recovery /sdcard/recovery.img
cd /
sync
umount /data
umount /system
umount /sdcard
cd /cache
rm -rf /cache/*
exit
That's it. (You might see an error during the " rm -rf /cache/* " command, or complaints about the "lost+found" directory with any of the rm commands, but that's OK)
The "unyaffs" command will take some time with the system.img file - it's a big file (~160 MB); just let it go until the unyaffs command prints a message that it is finished.
Note that "flash_image" is already part of Amon_RA - you don't need to transfer it to the (booted) Amon_RA.
bftb0
bftb0 said:
If you can't see the screen, then neither can Verizon. By the time your phone gets to a repair facility (which might not even happen at this point), nobody is going to care who the prior owner of the phone was. Something to consider.
Click to expand...
Click to collapse
great info to know. im still probably gonna unroot it, just in case. thanks for the great post.
bftb0's the man!

[RECOVERY] ClockworkMod Recovery 3.0.0.5 (1/11/11)

**THE USUAL WARNINGS APPLY**
1/11/11: Updated CWR to 3.0.0.5. Now installs properly through ROM Manager. Nandroid backup works, don't know about restore. Not sure if partition wiping is working I would assume it is. Flashable zips from SD card are working, tested with Quickie OC kernel (HIGHLY RECOMMEND!!!). Attached the CWR 3.0.0.5 image to this post, it is not a flashable zip just the image file zipped. So we have some real progress. w00t!!!
1/2/11: Looks like CWR has been released for NC. I didn't see it up see here you go. Easiest way to get it installed is by downloading ROM Manager in the market and flashing it through the apk. Attached is the .zip, I believe you just rename it "update.zip" and put it on the root of your SD card. Then reboot into recovery. Again your best bet is to use ROM Manager. Link to website: http://www.koushikdutta.com/2010/02/clockwork-recovery-image.html
Awesome, will try this later today, thanks for bringing it to attention
Afraid i cant thank you from my nook, but rest assured i eil soon
install failed here, too.
Failed for me too....
Sent from my Nooted Rook XDA App
Not ready for prime time yet. You need to install uRecRam to use it. give it a day put so for out to be automated. At least that is where it was last night when I went to sleep.
Sent from my rooted droid x
As per the previous post. This is not ready yet and could result in a bricked NC.
http://nookdevs.com/NookColor:Building_Clockwork_Recovery
Unable to post url's
Also I don't think it is backing up all partitions.
Sent from my rooted droid x
Failed me too. Started the process and then failed. Looks like it is close though. Pretty exciting.
WOW, this is great news. Seems like real soon we will be able to make backups.
Awesome. Not too long now until ROMs start getting put together. Hope the teardown reveals working Bluetooth.
Here are the steps to actually making this work if you are the adventurous type. This may brick your device blah blah. I am not responsible, etc. You should only attempt this if you genuinely understand the commands you are performing.
Make sure neither /media or /sdcard are mounted in your OS!
Save this:
http://koush.tandtgaming.com/test/clockwork-b3-nook-uRecRam
adb push clockwork-b3-nook-uRecRam /media/
adb shell
su
mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
mkdir /system/boot/
mount -t vfat /dev/block/mmcblk0p1 /system/boot
cat /system/boot/uRecRam > /system/boot/uRecRam.bak
cat /media/clockwork-b3-nook-uRecRam > /system/boot/uRecRam
umount /system/boot
rmdir /system/boot
Now do the three fingered salute to get into CWM Recovery. VolUp/Down are up/down, respectively. The Nook/home button is Select and the power button is Back.
@Mistar Muffin
worked for me
starkruzr said:
Awesome. Not too long now until ROMs start getting put together. Hope the teardown reveals working Bluetooth.
Click to expand...
Click to collapse
That would be awesome!
Great job,
I tried to compile a scrip with the following but it doesn't work if i put it in a batch file but it works if I run it from DOS. Go figure...
Code:
adb push clockwork-b3-nook-uRecRam /media/
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb shell mkdir /system/boot/
adb shell mount -t vfat /dev/block/mmcblk0p1 /system/boot
adb shell "cat /system/boot/uRecRam > /system/boot/uRecRam.bak"
adb shell "cat /media/clockwork-b3-nook-uRecRam > /system/boot/uRecRam"
adb shell umount /system/boot
adb shell rmdir /system/boot
I will work on the batch for the community to run so it make it easy for noobs...no ETA
Would installing this hose the ability to factory reset (the 8 failed boots/bootcnt method)?
Flashed and it works.
Yes you will loose that ability in it's current state.
I do not recommend using this until it has the capability to backup all of your data. At this point an error can still leave you with no return path, you have been warned!
Edit: Scratch that. I see what I did.
Even if it might not be wise for most to use this yet, very happy to see this available. Looking forward to nandroid . . .
I saw that the nook color comes up in rom manager, does this mean we don't need to install that other file uRecRam.
Sent from my LogicPD Zoom2 using XDA App

[Q] Is it necessary to backup the /efs folder?

I saw a thread on the international S2 forum regarding the importance of backing up the /efs folder on the phone so you don't lose the phones imei. I was wondering if this is still a necessity on our phone as well? And if so is there a different process to do it than what they used? They used terminal commands to back it up using terminal Emulator or ADB.
This is the thread:
http://forum.xda-developers.com/showthread.php?t=1068193
Its very important..ask me..i lost my IMEI and dint have a back up of the efs folder..had to go to the store and get a new phone under warranty.
Please make a backup of it.
After 2 months, someone just had EFS corruption last week - so yes, now I think it's a good idea to back it up.
IMO it would be a good idea to image the partition too...
Entropy512 said:
IMO it would be a good idea to image the partition too...
Click to expand...
Click to collapse
Can you verify the partition? Is 0p3 the right one, or is it 0p1? I coundn't find a definitive answer by searching.
For some reason I thought it was p3, but I was wrong. It's p1:
Code:
/dev/block/mmcblk0p1 on /efs type ext4 (rw,nosuid,nodev,noatime,barrier=1,journal_checksum,data=ordered)
To back it up, get ADB working, and run the following using ADB while the phone is in CWM recovery and /sdcard is mounted (It often is not when you first enter CWM, mount it in the Mounts and Storage menu if it is not) (If you do this when the phone is running, you may back it up as it is getting written to, which could result in a bogus backup)
Code:
adb shell dd if=/dev/block/mmcblk0p1 of=/sdcard/efs_backup.img
Thanks for the verification entropy!
Sent from my SAMSUNG-SGH-I777 using XDA App
Entropy512 said:
Code:
/dev/block/mmcblk0p1 on /efs type ext4 (rw,nosuid,nodev,noatime,barrier=1,journal_checksum,data=ordered)
Click to expand...
Click to collapse
I don't know much about linux commands. Is this how you verified the partition?
Also, am I correct in assuming that if the partition is backed up, it would not be necessary to back up the efs directory using a file explorer? Or is there a reason to have both?
You can also run the command from entropy in terminal emulator on your phone. Do su first to get root and enter the dd command to do your backup.
Sent from my SGH-I777
creepyncrawly said:
I don't know much about linux commands. Is this how you verified the partition?
Also, am I correct in assuming that if the partition is backed up, it would not be necessary to back up the efs directory using a file explorer? Or is there a reason to have both?
Click to expand...
Click to collapse
I verified it by executing the following command and looking at the output:
Code:
mount
It may be easier to restore a folder backup - not sure. A partition backup is the best way to guarantee you got EVERYTHING in that partition, byte-for-byte.
That's crazy. Cause I don't understand how you learn stuff like that but thanks(aka I'm gonna go do this since I mess with my phone alot.) I followed amk28's troubles. What's the difference between efs backup pro and this mehod? They both backup images
Entropy512 said:
For some reason I thought it was p3, but I was wrong. It's p1:
Code:
/dev/block/mmcblk0p1 on /efs type ext4 (rw,nosuid,nodev,noatime,barrier=1,journal_checksum,data=ordered)
To back it up, get ADB working, and run the following using ADB while the phone is in CWM recovery and /sdcard is mounted (It often is not when you first enter CWM, mount it in the Mounts and Storage menu if it is not) (If you do this when the phone is running, you may back it up as it is getting written to, which could result in a bogus backup)
Code:
adb shell dd if=/dev/block/mmcblk0p1 of=/sdcard/efs_backup.img
Click to expand...
Click to collapse
Sent from my SAMSUNG-SGH-I777 using XDA App

[SOLVED][$300][BOUNTY] Making your own PG05IMG, Flashing Roms with ADB

** ADMINS/MODS, if your going to delete this thread, if you dont' mind please advising me on the correct way to post this or correct place, Thanks **
******************************************************
QUESTION: How can I create a update.zip (i.e., PG05IMG.zip) for the thunderbolt and then flash it with fastboot or in bootloader.
ANSWER: Flash a rom on your phone and then using adb
adb shell dd if=/dev/block/mmcblk0p25 of=/sdcard/system.img
Make a zip folder and put in it system.img along with boot.img from the
rom zip and whatever other partitions you want, perhaps a radio
mdm9k.img and radio.img along with a recovery.img and you can
make your own little custom rom to be flashed with fastboot or as an
update, then you can either put it on the sd card as an PG05IMG.zip and do
a bootloader update (s-off only) or fastboot flash zip (zipname.zip)
for eng-hboot only... really cool.
******************************************************
******************************************************
******************************************************
******************************************************************************************************************************************************************
1. Ok I've been trying dilligently in the past to do 2 things. I want to create my own SYSTEM.img from the roms i'm making so I can create PG05IMG's instead of .zips to flash, that way i can include the radio etc., this is for learning purposes (PLEASE DO NOT SUGGEST WELL KNOWN METHODS OR SIMPLY QUESTION WHY IM DOING THIS UNLESS ITS INVOLVED IN THE SOLUTION PROCESS.)
I have tried several different methods for backing up my system.img etc., I need someone to help me with this, and I'm willing to donate to get this done.
2. Secondly, I need to figure out a way to flash roms from command line using adb while the phone is in recovery, I don't have any problem flashing roms with fastboot if someone can show me or explain how to make the system.img actually work.
Already tried this:
Code:
adb push C:\ROM.zip /data/
adb shell
recovery --update_package=DATA:ROM.zip
This would simply make the thunderbolt go to an exclamation point and do nothing.
I was however able to get this to work on the same version of recovery 5.0.2.1 on a Nexus S I9020T, but not on the Thunderbolt ADR6400L.
Simple anlysis of questions
1. How can I turn a rom.zip (system folder) into a (system.img) "fastboot flashable"
2. How can I take a rom.zip and flash it in recovery using adb
Donation negotiable, and I appreciate any time/clues/answers/suggestions, but I really need to figure this out.
Hi there,
I have a plan in the works already since the beginning of last month. I call it CASUAL. Cross-platform Adb Scripting, Unified Android Loader. Its purpose is to do exactly what you wish. This is a project I intend to begin work on next month. I've set up a repository for the work and I will begin soon. Basically, it will do exactly what you want.
Edit: I do not intend on rushing for the bounty. My goal is to do it right. If someone wishes to rush it, go ahead and collect the bounty. My goal is to provide something which will create an infrastructure contained within a single cross-platform java file. I've got most of the heavy lifting already done from my Heimdall one-click project. However, in order to complete the job, it seems that I must reformat my desktop because my IDEs are acting wonkey.
AdamOutler said:
Hi there,
I have a plan in the works already since the beginning of last month. I call it CASUAL. Cross-platform Adb Scripting, Unified Android Loader. Its purpose is to do exactly what you wish. This is a project I intend to begin work on next month. I've set up a repository for the work and I will begin soon. Basically, it will do exactly what you want.
Edit: I do not intend on rushing for the bounty. My goal is to do it right. If someone wishes to rush it, go ahead and collect the bounty. My goal is to provide something which will create an infrastructure contained within a single cross-platform java file. I've got most of the heavy lifting already done from my Heimdall one-click project. However, in order to complete the job, it seems that I must reformat my desktop because my IDEs are acting wonkey.
Click to expand...
Click to collapse
Adam thanks for your response, really great to hear and the fact that your not rushing for money is great too I understand. But hey, without regard to the cross platform ADB rom flasher, can you just point me in the right direction as far as where to go to learn how to say, "make a system.img of a rom" so I can fastboot flash it..
Like so I can take a rom zip and be able to turn it into a system image that is fastboot flashable on the thunderbolt... at that point i can just manually flash the boot.img and radio and i'm good to go.
So if i can just figure out how to do that one little thing that would be huge and much appreciated... thanks so much man. I will gladly donate for an answer to this question.
halfcab123 said:
Adam thanks for your response, really great to hear and the fact that your not rushing for money is great too I understand. But hey, without regard to the cross platform ADB rom flasher, can you just point me in the right direction as far as where to go to learn how to say, "make a system.img of a rom" so I can fastboot flash it..
Like so I can take a rom zip and be able to turn it into a system image that is fastboot flashable on the thunderbolt... at that point i can just manually flash the boot.img and radio and i'm good to go.
So if i can just figure out how to do that one little thing that would be huge and much appreciated... thanks so much man. I will gladly donate for an answer to this question.
Click to expand...
Click to collapse
Generally, to flash a ROM, you type:
Code:
adb reboot bootloader
then on your desktop you use fastboot and type
Code:
fastboot oem unlock
fastboot flash your partition your file...
I'd follow this guide to get S-OFF: http://forum.xda-developers.com/showthread.php?t=1310014 then find your neato-bandito rom from this forum: http://forum.xda-developers.com/forumdisplay.php?f=943 and flash it.
AdamOutler said:
Generally, to flash a ROM, you type:
Code:
adb reboot bootloader
then on your desktop you use fastboot and type
Code:
fastboot oem unlock
fastboot flash your partition your file...
I'd follow this guide to get S-OFF: http://forum.xda-developers.com/showthread.php?t=1310014 then find your neato-bandito rom from this forum: http://forum.xda-developers.com/forumdisplay.php?f=943 and flash it.
Click to expand...
Click to collapse
Thanks Adam, but, I already know how to flash partitions in fastboot, but what i need to know is how to "make" partitions. as in like, take a system folder and turn it in to a system.img so i can fastboot flash system system.img
Please please need to know thanks
halfcab123 said:
Thanks Adam, but, I already know how to flash partitions in fastboot, but what i need to know is how to "make" partitions. as in like, take a system folder and turn it in to a system.img so i can fastboot flash system system.img
Please please need to know thanks
Click to expand...
Click to collapse
That's not overly hard to do. There's a guide I think on the cyanogen website for how to do it. Basically you use the "dd" tool in linux.
yareally said:
That's not overly hard to do. There's a guide I think on the cyanogen website for how to do it. Basically you use the "dd" tool in linux.
Click to expand...
Click to collapse
Dude please, can you walk me through it, like I said I'll donate. Or alteast give me a link to where its at, then i'll turn this post into a how to for noobs. I learn at 300,000,000 m/s^2
halfcab123 said:
Dude please, can you walk me through it, like I said I'll donate. Or alteast give me a link to where its at, then i'll turn this post into a how to for noobs. I learn at 300,000,000 m/s^2
Click to expand...
Click to collapse
It looks like there's a stupidly large amount of partitions on the Thunderbolt. if you can do this:
Code:
adb shell mount
and get the partition information, I can tell you how to do a backup and restore.
it will be something like this.. this gets run once to get a temporary storage area on the /sdcard
Code:
adb shell mkdir /sdcard/mybackup
Code:
mkdir /PATH/TO/YOUR/DESKTOP/backup
adb shell dd if=/dev/block/mmcblk0p25 of=/sdcard/mybackup/system.img
adb pull /sdcard/mybackup/system.img /PATH/TO/YOUR/DESKTOP/backup/system.img
These commands do: make a new folder for working on your desktop. direct disk backup of mmcblk0p25 (SYSTEM partition). Pull the system.img to your working folder on your desktop.
If you have your image on a Linux or Mac desktop, you can mount it like this..
Code:
cd /PATH/TO/YOUR/DESKTOP/backup
mkdir MountFolder
sudo mount ./system.img ./MountFolder
#if this doesnt work, then do this
sudo mont -o loop -t ext3 ./system.img ./MountFolder
you can make changes to the system which has been mounted onto your computer. Then unmount it and push it back to your device.
to unmount and flash it back you do this:
Code:
sudo umount ./MountFolder
adb push /PATH/TO/YOUR/DESKTOP/backup/system.img /sdcard/mybackup/system.img
adb shell dd if=/sdcard/mybackup/system.img of=/dev/block/mmcblk0p25
This pushes your backup to your device, then does a direct disk write of the image file to the disk partition
↑ last poster pretty much sums it up in detail
AdamOutler said:
It looks like there's a stupidly large amount of partitions on the Thunderbolt. if you can do this:
Code:
adb shell mount
and get the partition information, I can tell you how to do a backup and restore.
it will be something like this.. this gets run once to get a temporary storage area on the /sdcard
Code:
adb shell mkdir /sdcard/mybackup
Code:
mkdir /PATH/TO/YOUR/DESKTOP/backup
adb shell dd if=/dev/block/mmcblk0p25 of=/sdcard/mybackup/system.img
adb pull /sdcard/mybackup/system.img /PATH/TO/YOUR/DESKTOP/backup/system.img
These commands do: make a new folder for working on your desktop. direct disk backup of mmcblk0p25 (SYSTEM partition). Pull the system.img to your working folder on your desktop.
If you have your image on a Linux or Mac desktop, you can mount it like this..
Code:
cd /PATH/TO/YOUR/DESKTOP/backup
mkdir MountFolder
sudo mount ./system.img ./MountFolder
#if this doesnt work, then do this
sudo mont -o loop -t ext3 ./system.img ./MountFolder
you can make changes to the system which has been mounted onto your computer. Then unmount it and push it back to your device.
to unmount and flash it back you do this:
Code:
sudo umount ./MountFolder
adb push /PATH/TO/YOUR/DESKTOP/backup/system.img /sdcard/mybackup/system.img
adb shell dd if=/sdcard/mybackup/system.img of=/dev/block/mmcblk0p25
This pushes your backup to your device, then does a direct disk write of the image file to the disk partition
Click to expand...
Click to collapse
This is very informative and I actually realized something that I think will definitely help me, however its kinda not really the answer to my question.. and at the same time it is kind of another solution to the question that I asked.
What I asked was how to turn the system folder from a *.zip "rom" into a system.img that was fastboot flashable
You basically told me how to make a backup of the system, modify, and flash back to my phone.... which is interesting...
Basically what I take from this, please let me know if i'm on the right track here:
If the goal is to flash a rom on an htcdev unlocked phone one would:
(assuming system.img already created from backup, flashing to another phone)
Code:
adb reboot recovery
adb shell dd if=/dev/zero of=/dev/block/mmcblk0p6 (data wipe)
adb shell mount /sdcard/
adb shell dd if=/sdcard/system.img of=/dev/block/mmcblk0p25
adb reboot bootloader
fastboot erase cache
fastboot flash boot boot.img
fastboot reboot
After trying this, I was both unable to mount sd card for some odd reason
using adb shell mount /sdcard/ and I was also unable to wipe data
at partition mmcblk0p6 with /dev/zero it just hung for 4 minutes.. does it take longer ? I ended it.
My only other option that I can think of is to downgrade the thunderbolt and run revo to get s-off and then make a PG05IMG.zip with a custom system.img and boot.img and flash it as a PG05IMG.zip in bootloader... so coming from this direction which seems to be much much easier, if I say took a PG05IMG for the MR4 (2.11.605.9) replaced the hboot with an eng-hboot, replaced the system.img and the boot.img would it work ??? I'm going to try it lol, probably going to be an epic fail.. any comments appreciated.
UPDATE: after posting this I realized that with a revolutionary s-off, the hboot is protected from being updated with an RUU, in bootloader so I would not have to worry about replacing the HBOOT, the only reason I even mentioned it was because I know that the hboot in the official MR4 RUU is the dev method supported hboot and would probably throw a security warning after flashing... etc., once again any help is great.
There is no direct 1:1 way to convert. However, you can use the update script in the Meta folder as a guide. It will have information to copy files into the system folder and applysymlinks. The commands used by recovery all have a Linux equal.
Delete = rm
Delete recursive = rm -rf
symlink = ln -s
copy = cp
These are android recovery commands which must be translated to their Linux shell equivalants.
AdamOutler said:
There is no direct 1:1 way to convert. However, you can use the update script in the Meta folder as a guide. It will have information to copy files into the system folder and applysymlinks. The commands used by recovery all have a Linux equal.
Delete = rm
Delete recursive = rm -rf
symlink = ln -s
copy = cp
These are android recovery commands which must be translated to their Linux shell equivalants.
Click to expand...
Click to collapse
what if i just straight take the system.img and boot.img and throw them in a PG05IMG.zip and use bootloader to update, will that work ?
halfcab123 said:
what if i just straight take the system.img and boot.img and throw them in a PG05IMG.zip and use bootloader to update, will that work ?
Click to expand...
Click to collapse
I don't know what a pg05img is. However, with samsung devices, we use dd'd system images to flash with Odin. Odin works sorta like fastboot. I don't know if that will help you because I generally use Samsung devices and Samsung does things differently than the rest of Android. From what I understand, fastboot flashing is similar, but I don't know if you can DD an image from a device and just fastboot flash it back onto a device. You can do this with Odin. I don't think there are provisions for flashing images in recovery directly. They DO have executables encorperated within zip files for flashing modems and bootloaders. Before trying a non-standard flashing method, you need to do some reading. It can be risky.
AdamOutler said:
I don't know what a pg05img is. However, with samsung devices, we use dd'd system images to flash with Odin. Odin works sorta like fastboot. I don't know if that will help you because I generally use Samsung devices and Samsung does things differently than the rest of Android. From what I understand, fastboot flashing is similar, but I don't know if you can DD an image from a device and just fastboot flash it back onto a device. You can do this with Odin. I don't think there are provisions for flashing images in recovery directly. They DO have executables encorperated within zip files for flashing modems and bootloaders. Before trying a non-standard flashing method, you need to do some reading. It can be risky.
Click to expand...
Click to collapse
I just made my own PG05IMG.zip and updated in bootloader and it booted into a custom rom, and this is after i erased userdata, cache, system, so i know it works, i even
fastboot oem rebootRUU
fastboot flash zip "customzip.zip"
and that worked too, so stoked man, I can't believe I finally figured it out.
As soon as you told me the mmcblk0p25 could be backed up, it clicked, funny thing is I knew that but I guess I just didn't think it was that simple.

Bootloot... please help

So it seems that my HTC ONE has no OS installed, I am able to get to the HTC logo and thats it. I reboot into bootloader and are able to install CWM and TWRP but no luck installing ARHD rom via adb sideload method, it just fails. Any hints on how to install a rom either stock or otherwise? i have a cwm backup of my stock rom rooted odex on my computer but it is not a flashable zip. Any help will be greatly appreciated. Thanks in advance.
(i have a mac if that matters)
if you aren't back on cwm flash that recovery.
boot to it
push your backup to the phone with ./adb push /foldername/* /sdcard/clockworkmod/backup might be backups, I can't remember, but you can check with adb shell
./adb shell
cd /sdcard/clockworkmod
ls (that is a lowercase L)
that should give you a directory listing.
after you've successfully pushed the backup reboot to recovery again and restore it.
This should do the trick
gunnyman said:
if you aren't back on cwm flash that recovery.
boot to it
push your backup to the phone with ./adb push /foldername/* /sdcard/clockworkmod/backup might be backups, I can't remember, but you can check with adb shell
./adb shell
cd /sdcard/clockworkmod
ls (that is a lowercase L)
that should give you a directory listing.
after you've successfully pushed the backup reboot to recovery again and restore it.
This should do the trick
Click to expand...
Click to collapse
I am in the same situation. Can not get my phone to roboot. I have a rom to push but I dont know how to use ADB commands. I can get to command prompt but them I am totally lost. Can you give me a quick step by step?
adb push filename /sdcard
gunnyman said:
if you aren't back on cwm flash that recovery.
boot to it
push your backup to the phone with ./adb push /foldername/* /sdcard/clockworkmod/backup might be backups, I can't remember, but you can check with adb shell
./adb shell
cd /sdcard/clockworkmod
ls (that is a lowercase L)
that should give you a directory listing.
after you've successfully pushed the backup reboot to recovery again and restore it.
This should do the trick
Click to expand...
Click to collapse
Hy gunnyman, when I push the folder to the sd card it always decompresses and send the individual files to the system not the full backup folder so i can select it from the backups menu. this is the command I used ./adb push may6.zip /sdcard/clockworkmod/backup
I also pushed the decompressed files to the sd card since it looks like it instals all files needed for os to work with the following command ./adb push may6.zip /sdcard
I reboot system but still stuck on HTC logo.
May6 is the name of my backup and when i use the ls command it has a .zip to the end.
So can you let me know how to sent the complete folder to the phone to be placed on the backup folder and thus be able to be selected under the cwm menu? Thank you so much
Unzip it. Send entire folder uncompressed
You don't restore a backup the same way you flash a rom. It's a separate menu option in recovery
gunnyman said:
Unzip it. Send entire folder uncompressed
You don't restore a backup the same way you flash a rom. It's a separate menu option in recovery
Click to expand...
Click to collapse
yes its unzipped. took off the .zip name and sent it to the backup folder and it still sends the uncompressed files. Once I go to restore from backup folder I get a -System/ and -Meta-INF/ files and no file with -May6/ or something like that. So i try to restore from -system/ but it says md5 sum dont match.
Any ideas?
No, I don't sorry

Categories

Resources