[SOLVED][$300][BOUNTY] Making your own PG05IMG, Flashing Roms with ADB - Thunderbolt Q&A, Help & Troubleshooting

** 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.

Related

[Q] Cooking with Samsung Firmware

Hello:
I'm attempting to create a custom rom for my Samsung Galaxy S Vibrant. I've downloaded a firmware for my phone (UGJK3), but I've run into a small problem: Samsung doesn't seem to use the default "system.img, boot.img, etc" file structure, and instead uses various factoryfs.rfs, zImage, etc files.
I'm unable to cook my rom using the HTC android kitchen due to this problem: I'm required to have the *.IMG files in order to cook it.
I've mounted the .RFS files in linux, but it has gotten me no closer.
This problem is probably quite easy to fix, I'm just unsure where to start.
Any help is appreciated,
thanks.
It seems like other folks are making flashable zips. I just grabbed one and it's setup very similar to ours, although it appears that the kernel is done differently.
http://forum.xda-developers.com/forumdisplay.php?f=711
Existence. said:
Hello:
I'm attempting to create a custom rom for my Samsung Galaxy S Vibrant. I've downloaded a firmware for my phone (UGJK3), but I've run into a small problem: Samsung doesn't seem to use the default "system.img, boot.img, etc" file structure, and instead uses various factoryfs.rfs, zImage, etc files.
I'm unable to cook my rom using the HTC android kitchen due to this problem: I'm required to have the *.IMG files in order to cook it.
I've mounted the .RFS files in linux, but it has gotten me no closer.
This problem is probably quite easy to fix, I'm just unsure where to start.
Any help is appreciated,
thanks.
Click to expand...
Click to collapse
gnarlyc said:
It seems like other folks are making flashable zips. I just grabbed one and it's setup very similar to ours, although it appears that the kernel is done differently.
http://forum.xda-developers.com/forumdisplay.php?f=711
Click to expand...
Click to collapse
Yeah, I've noticed that, however I'd prefer to work with a kernal and ROM that is stock; that is, hasn't been modified at all. I was able to import a custom ROM into the kitchen that has already been modified (namely Doc's rom), but I view this as a learning experience, and would ideally like to de-odex, zipalign, remove bloatware, etc etc myself.
I'd imagine there would be a veary easy way to change this .tar file to a flashable zip, however I'm at a loss on how to do this.
If someone created a flashable, stock, UGJK3 rom, that would be different, and I'd be able to work with that.
Existence. said:
Yeah, I've noticed that, however I'd prefer to work with a kernal and ROM that is stock; that is, hasn't been modified at all. I was able to import a custom ROM into the kitchen that has already been modified (namely Doc's rom), but I view this as a learning experience, and would ideally like to de-odex, zipalign, remove bloatware, etc etc myself.
I'd imagine there would be a veary easy way to change this .tar file to a flashable zip, however I'm at a loss on how to do this.
If someone created a flashable, stock, UGJK3 rom, that would be different, and I'd be able to work with that.
Click to expand...
Click to collapse
Sure. I like to start with as close to stock or source if possible too. I'm just wondering if there's a how-to in the Vibrant forum or if those folks might know better than those of us who don't have Vibrants. I recently tried helping a friend to root his Vibrant and it was different enough for me to get lost.. .
gnarlyc said:
Sure. I like to start with as close to stock or source if possible too. I'm just wondering if there's a how-to in the Vibrant forum or if those folks might know better than those of us who don't have Vibrants. I recently tried helping a friend to root his Vibrant and it was different enough for me to get lost.. .
Click to expand...
Click to collapse
Yeah, I've already posted a thread in the Galaxy I9000 Q&A section of the forum, but to no avail (not the Vibrant section, as the T-Mobile US-variant differs from my Bell-based Vibrant). I was thinking, what if I install the UGJK3 stock rom on my phone, take a nandroid backup, then use the .IMG files in that backup in the kitchen?
Eh, it's worth a try. I'll see how it goes.
Existence. said:
Yeah, I've already posted a thread in the Galaxy I9000 Q&A section of the forum, but to no avail (not the Vibrant section, as the T-Mobile US-variant differs from my Bell-based Vibrant). I was thinking, what if I install the UGJK3 stock rom on my phone, take a nandroid backup, then use the .IMG files in that backup in the kitchen?
Eh, it's worth a try. I'll see how it goes.
Click to expand...
Click to collapse
okay so was there anything to report because i am on this trek myself at the moment and am looking for any pockets of air as i feel i am drowning in the ocean of dead ends!
Okay, I'm feeling kind today, so here goes:
SAMSUNG ODIN ROMS – Applies to Galaxy S and all derivatives (Vibrant, Captivate, etc)
For anyone unaware, ODIN is the Samsung equivalent of HTC’s RUU. Both are full ROMs containing the images, and both can only be installed via Windows. The ODIN ROMs can be used to restore a semi-bricked phone, that won’t boot to recovery or into the full OS, as all that is needed is Download mode. Download mode is simply accessed by unplugging the phone from the USB cable, holding the volume buttons and plugging in!
BEFORE YOU START, YOU WILL NEED:
- Windows & Relevant ODIN drivers (note – if you’re on 64 bit, you will need to disable signature enforcement on boot before ODIN will work)
- A Linux installation (possibly OS-X, but I haven’t written this guide for that)
So... Working on ODIN roms is a little different to typical ROM ‘cooking’ (I hate that term by the way... cooking can be applied to winzip warriors.. what we're doing here is a tad more technical).
1. First, flash the base ROM using ODIN. Be sure it is a pre-rooted version, or at least root it yourself after.
2. Install an FTP server app to the phone, and connect to it via your computer. It can be done using file managers and shell commands, but will take you ages.
3. Mount system as read write:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
4. Once you’ve found the issues/things you'd like to change, make the changes directly on the phone itself using FTP/filemanager/shell commands
Add custom boot, build.prop, sounds, fonts, whatever you want (SEE NOTES).
5. Once you’re happy with the build, it’s time to dump the necessary partitions to build the ODIN rom.
To do this, you will need to install a terminal emulator or use adb shell, and ensure the ROM has root access & SU. Let’s work on the assumption that if you’re reading this, you know roughly what you’re doing.
In terminal, type the following commands to dump the /system partition, cache (not necessary), zImage (kernel) and modem.bin (radio) to the INTERNAL SD Card:
su
dd if=/dev/block/stl9 of=/sdcard/factoryfs.rfs bs=4096
dd if=/dev/block/stl11 of=/sdcard/cache.rfs bs=4096
dd if=/dev/block/bml7 of=/sdcard/zImage bs=4096
dd if=/dev/block/bml12 of=/sdcard/modem.bin bs=4096
6. You’ll need to boot into your Linux machine/VM. The next step is to create the tarball of the dumped partitions. Do this by typing the following command into the Linux terminal:
tar -H ustar -c factoryfs.rfs cache.rfs modem.bin zImage > gals.tar
OPTIONAL:
7. Next, md5 it up, as ODIN can check the md5 before writing the image. Do this with the following command:
md5sum –t gals.tar >> gals.tar
mv gals.tar gals.tar.md5
8. Contratulations! That’s your ODIN flashable ROM.
9. You will need a PIT file in ODIN to flash this ROM. This can be obtained by Googling for it, or by asking me... or if you need to know how to make you’re own, it’s a piece of piss, just dump it in the same way as above.
su
dd if=/dev/block/bml2 of=/sdcard/FILENAME.pit bs=4096
More congratulations: you can now do the job of Samsung.
PS - please, oh please, can we stop calling it cooking?
You said:
nprussell said:
Add custom boot, build.prop, sounds, fonts, whatever you want (SEE NOTES).
Click to expand...
Click to collapse
Any chance you have a link to said notes? I would like to read further if they exist.
nprussel: How would you go about creating a CWM flashable version instead of Odin?
Edit: Found this guide, but it's geared towards creating an update.zip for specific purposes instead of for a full rom. Its there a way to automatically generate the update-script for a full stock rom? Maybe just by doing a nandroid backup like the OP suggested?
http://www.londatiga.net/it/how-to-create-android-update-zip-package
nprussell said:
Okay, I'm feeling kind today, so here goes:
SAMSUNG ODIN ROMS – Applies to Galaxy S and all derivatives (Vibrant, Captivate, etc)
For anyone unaware, ODIN is the Samsung equivalent of HTC’s RUU. Both are full ROMs containing the images, and both can only be installed via Windows. The ODIN ROMs can be used to restore a semi-bricked phone, that won’t boot to recovery or into the full OS, as all that is needed is Download mode. Download mode is simply accessed by unplugging the phone from the USB cable, holding the volume buttons and plugging in!
BEFORE YOU START, YOU WILL NEED:
- Windows & Relevant ODIN drivers (note – if you’re on 64 bit, you will need to disable signature enforcement on boot before ODIN will work)
- A Linux installation (possibly OS-X, but I haven’t written this guide for that)
So... Working on ODIN roms is a little different to typical ROM ‘cooking’ (I hate that term by the way... cooking can be applied to winzip warriors.. what we're doing here is a tad more technical).
1. First, flash the base ROM using ODIN. Be sure it is a pre-rooted version, or at least root it yourself after.
2. Install an FTP server app to the phone, and connect to it via your computer. It can be done using file managers and shell commands, but will take you ages.
3. Mount system as read write:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
4. Once you’ve found the issues/things you'd like to change, make the changes directly on the phone itself using FTP/filemanager/shell commands
Add custom boot, build.prop, sounds, fonts, whatever you want (SEE NOTES).
5. Once you’re happy with the build, it’s time to dump the necessary partitions to build the ODIN rom.
To do this, you will need to install a terminal emulator or use adb shell, and ensure the ROM has root access & SU. Let’s work on the assumption that if you’re reading this, you know roughly what you’re doing.
In terminal, type the following commands to dump the /system partition, cache (not necessary), zImage (kernel) and modem.bin (radio) to the INTERNAL SD Card:
su
dd if=/dev/block/stl9 of=/sdcard/factoryfs.rfs bs=4096
dd if=/dev/block/stl11 of=/sdcard/cache.rfs bs=4096
dd if=/dev/block/bml7 of=/sdcard/zImage bs=4096
dd if=/dev/block/bml12 of=/sdcard/modem.bin bs=4096
6. You’ll need to boot into your Linux machine/VM. The next step is to create the tarball of the dumped partitions. Do this by typing the following command into the Linux terminal:
tar -H ustar -c factoryfs.rfs cache.rfs modem.bin zImage > gals.tar
OPTIONAL:
7. Next, md5 it up, as ODIN can check the md5 before writing the image. Do this with the following command:
md5sum –t gals.tar >> gals.tar
mv gals.tar gals.tar.md5
8. Contratulations! That’s your ODIN flashable ROM.
9. You will need a PIT file in ODIN to flash this ROM. This can be obtained by Googling for it, or by asking me... or if you need to know how to make you’re own, it’s a piece of piss, just dump it in the same way as above.
su
dd if=/dev/block/bml2 of=/sdcard/FILENAME.pit bs=4096
More congratulations: you can now do the job of Samsung.
PS - please, oh please, can we stop calling it cooking?
Click to expand...
Click to collapse
Ok, so I'm trying to create a Factory Odin Flash for the Samsung Galaxy S Showcase.. (brother of the fascinate and Mesmerize)...
I've followed your instructions (step 5-9) to a T, using a Rooted Showcase...
But it fails..
Here the start of the Thread
This is the post of the guy that tested it HERE
Guys ANY info you can help me with this would be GREATLY appreciated, because as of now we have no way to get back to stock!!!
I'm trying to create an Odin Flash now using MY files. I'm on a deodexed PicknPack Rom/Voodoo Kernel. There's several people that have messed up phones and are simply trying to get on our network, so I'm hoping I can atleast help them with that..
Thanks in advance,
elijahblake
nprussell said:
Okay, I'm feeling kind today, so here goes:
SAMSUNG ODIN ROMS – Applies to Galaxy S and all derivatives (Vibrant, Captivate, etc)
For anyone unaware, ODIN is the Samsung equivalent of HTC’s RUU. Both are full ROMs containing the images, and both can only be installed via Windows. The ODIN ROMs can be used to restore a semi-bricked phone, that won’t boot to recovery or into the full OS, as all that is needed is Download mode. Download mode is simply accessed by unplugging the phone from the USB cable, holding the volume buttons and plugging in!
BEFORE YOU START, YOU WILL NEED:
- Windows & Relevant ODIN drivers (note – if you’re on 64 bit, you will need to disable signature enforcement on boot before ODIN will work)
- A Linux installation (possibly OS-X, but I haven’t written this guide for that)
Click to expand...
Click to collapse
Windows is not needed to flash ODIN packages. You can use an alternate open-source software called Heimdall, which is considered by many to be more stable than ODIN. Heimdall is available for Linux, MacOS, and yes even Windows. There is also a GUI, compiled for those platforms (except Linux 32-bit, have to do it yourself or use command-line. 64bit Linux has a compiled version of GUI available)
I have only needed Heimdall once so, but it was easy to use the command-line text from the example given-- I guess maybe I'll learn more complex bits as I soft-brick more times ;-)
The main difference seems to be that you uncompress the ROM archive first, but maybe they will add support for opening the archives (tar files) within Heimdall.
William
Linux FTW! (the others parts could prob be done on Windows somehow, but as our phones run Linux, everything needed is there or easier to install)
Is there a way to port an HTC rom to the vibrant or say the Galaxy Tab (preferred)?
There is a flavour of the Android Kitchen made for the Galaxy S, if you're lazy and/or need some hand-holding: ;-)
It's by RMGeren but still in a beta stage:
https://github.com/dsixda/Android-Kitchen/tree/galaxy_s
Just click on the "Downloads" link on the top right part of the page.
@nprussel: Thanks for that detailed guide!

[Q] /system/ r/w mounting on Legend.

Hey,
I'm having difficulty mounting the /system/ directory as read/write on my Legend.
I've tried both "adb remount" and "mount -o remount,rw /dev/block/mtdblock3 /system".
The mount appears to succeed but when I try to do anything I get errors (eg; "touch: /system/test: Out of memory" and "mkdir failed for /system/test, Out of memory")
ro.secure=0 is set in my /default.prop
Code:
# cat /default.prop
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.service.adb.enable=1
HBOOT: 1.01 S-ON
Does it need to be S-OFF to do so? If so, is it possible to S-OFF my Legend?
Thanks.
You are s-on, so you can't write on /system
You need to have s-off, but you are on hboot 1.0+ where s-off isn't possible yet
Thanks ThauExodus ,
So am I right in thinking that when I flash a rom (let's say "update-cm-7.0.0-RC4-Legend-signed.zip"), I am re-flashing the /system partition?
If that's the case, can I somehow modify the rom before flashing to add custom things? If I extract it and insert a directory called "/system/test", when I flash it will /system/test exist?
A practical example being, if I populate the hosts file (/system/etc/hosts) with AdFree entries then somehow repackage and flash the rom will it work?
Just use Blay0's overlay filesystem (flash the zip with CWM) and you will be able to do what you want
I am S-on and found no reason for s-off..for modifying anything in /system..i use adb in recovery mode..this serves the purpose..
that sounds appealing
abhishek92 said:
I am S-on and found no reason for s-off..for modifying anything in /system..i use adb in recovery mode..this serves the purpose..
Click to expand...
Click to collapse
does that stick? (e.g. remove system apps like stocks)
what are you doing that on? (legend-hboot-os ect)
yes it does stick..when u enter recovery mode..u r allowed to write to /system..ul have to boot into ur custom recovery mode(clockwork/amon)..and then use adb shell from the command line on ur comp...jus search on how to use adb shell in recovery mode..
thank you sir
abhishek92 said:
yes it does stick..when u enter recovery mode..u r allowed to write to /system..ul have to boot into ur custom recovery mode(clockwork/amon)..and then use adb shell from the command line on ur comp...jus search on how to use adb shell in recovery mode..
Click to expand...
Click to collapse
Thank you for the information, from what i have been reading i was convinced that could be a viable way to go about things. I have been reading about adb shell and recovery, unfortunately i find sites like adb for beginners a little rough for an actual beginner-well, not as informative as typing help into the cmd prompt.
As of right now i am trying to compile a list of commands specific to the legend structure.
That is why i would ask what build, hboot or any phone specific info about your phone so i can get a better grasp on how things change from one system\setup to the next.
Following instructions is one thing, i want to understand what i am doing.
Before I flash a new ROM I just open the downloaded ROM zip on the PC and delete apps I don't want from the system directory. Delete stocks, quick office etc. Simplest method for Windows users who don't want to use adb.
Sent from my HTC Legend using XDA App
billyJAM said:
Before I flash a new ROM I just open the downloaded ROM zip on the PC and delete apps I don't want from the system directory. Delete stocks, quick office etc. Simplest method for Windows users who don't want to use adb.
Sent from my HTC Legend using XDA App
Click to expand...
Click to collapse
wouldnt it be nice if we could do that with our ota updates and just skip the whole rooting process
billyJAM said:
Before I flash a new ROM I just open the downloaded ROM zip on the PC and delete apps I don't want from the system directory. Delete stocks, quick office etc. Simplest method for Windows users who don't want to use adb.
Sent from my HTC Legend using XDA App
Click to expand...
Click to collapse
It doesn't work that way .
It's just not so symple
http://forum.xda-developers.com/showthread.php?t=760376
But u may give it a try
Just start your phone with clockwork recovery, select mount system and restart adb in advanced menu from recovery. Then start adb on PC and push your file to system,
Adb push ...apk /system/app/...apk
Apk should be in same folder like advanced itself
Sent from my Legend using XDA App

How to make a system dump of UCKK6?

I installed the UCKK6 update for the purpose of pulling out the rom parts, by updating from rooted stock UCKH7. This successfully retained root on UCKK6.
From the mount command, I found that the system partition is listed as mmcblk0p9. I used dd to transfer the modem, kernel, and system partitions, and created Odin flashable tar files from each individually. I found that the kernel and the modem flash successfully, but that the system image flash fails almost immediately. Here is the code I used to pull the system partition in android terminal emulator:
Code:
# dd if=/dev/block/mmcblk0p9 of=/sdcard/factoryfs.img
I didn't remember to include bs=4096 in the command line, but then I didn't include it in the pull for the kernel (mmcblk0p5) and modem (mmcblk0p8) partitions either.
So, to those who know, how do I correctly pull the system partition, so that I can obtain a flashable image?
I'm also interested to know if pulling the image from a rooted phone will include root in the image, or how do you pull/create both a rooted and non-rooted system image?
This looks like a job for... GTG or ENTROPY!
creepyncrawly said:
I installed the UCKK6 update for the purpose of pulling out the rom parts, by updating from rooted stock UCKH7. This successfully retained root on UCKK6.
From the mount command, I found that the system partition is listed as mmcblk0p9. I used dd to transfer the modem, kernel, and system partitions, and created Odin flashable tar files from each individually. I found that the kernel and the modem flash successfully, but that the system image flash fails almost immediately. Here is the code I used to pull the system partition in android terminal emulator:
Code:
# dd if=/dev/block/mmcblk0p9 of=/sdcard/factoryfs.img
I didn't remember to include bs=4096 in the command line, but then I didn't include it in the pull for the kernel (mmcblk0p5) and modem (mmcblk0p8) partitions either.
So, to those who know, how do I correctly pull the system partition, so that I can obtain a flashable image?
I'm also interested to know if pulling the image from a rooted phone will include root in the image, or how do you pull/create both a rooted and non-rooted system image?
Click to expand...
Click to collapse
Always asking the hard questions...
In case this helps... Here's what I have for partition commands:
# dd if=/dev/block/mmcblk0p5 of=/sdcard/zImage bs=4096
# dd if=/dev/block/mmcblk0p8 of=/sdcard/modem.bin bs=4096
# dd if=/dev/block/mmcblk0p7 of=/sdcard/cache.img bs=4096
# dd if=/dev/block/mmcblk0p9 of=/sdcard/factoryfs.img bs=4096
# dd if=/dev/block/mmcblk0p10 of=/sdcard/data.img bs=4096
They have worked for me so far.... did you try including "bs=4096" for the factoryfs.img?
Regarding the root image... When pulling the a factoryfs.img, it pulls EVERYTHING in the system partition (folders). Files effecting root are contained within the system folders, so when you pull the factoryfs.img you get that too. The thing I don't know is if you can pull the img without having root. My phone is always rooted.
I keep a odin flashable image of my entire phone (all partitions listed above) as a fail proof backup in case I totality dork something up. The odin tar is about 2-3 gig. I can completely wipe my phone and return it to stock, then flash my odin to bring it back. I've used it (in testing) to COMPLETELY restore my phone and data... etc... etc. Pretty cool and comforting to know a can fix a bad screw up.
Peaster111 said:
Always asking the hard questions...
...did you try including "bs=4096" for the factoryfs.img?
Click to expand...
Click to collapse
No but I think I will go back and try again this afternoon to see if that was the problem.
By the way, there was a UCKK6 system partition dump with root prepared by vlara and posted in another thread. He named the file system.img instead of factoryfs.img. When I used it to make an Odin flashable tar, it failed immediately, just like the one I made.
# dd if=/dev/block/mmcblk0p5 of=/sdcard/zImage bs=4096
# dd if=/dev/block/mmcblk0p8 of=/sdcard/modem.bin bs=4096
# dd if=/dev/block/mmcblk0p7 of=/sdcard/cache.img bs=4096
# dd if=/dev/block/mmcblk0p9 of=/sdcard/factoryfs.img bs=4096
# dd if=/dev/block/mmcblk0p10 of=/sdcard/data.img bs=4096
Click to expand...
Click to collapse
BTW, you left out mmcblk0p1 = /efs and mmcblk0p4 = /mnt/.lfs. Wouldn't you need the efs for a complete backup? And isn't 0p4 the param.lfs?
Also just wondering. Entropy said that a backup of the efs partition should be done while booted into recovery so that it doesn't get hosed by a write during the backup. Would that be true for any of the other partitions? 1, 4, 7 and 10 are read/write. Not sure about 5 and 8.
creepyncrawly said:
By the way, there was a UCKK6 system partition dump with root prepared by vlara and posted in another thread. He named the file system.img instead of factoryfs.img. When I used it to make an Odin flashable tar, it failed immediately, just like the one I made.
BTW, you left out mmcblk0p1 = /efs and mmcblk0p4 = /mnt/.lfs. Wouldn't you need the efs for a complete backup? And isn't 0p4 the param.lfs?
Also just wondering. Entropy said that a backup of the efs partition should be done while booted into recovery so that it doesn't get hosed by a write during the backup. Would that be true for any of the other partitions? 1, 4, 7 and 10 are read/write. Not sure about 5 and 8.
Click to expand...
Click to collapse
Interesting on the system.img... Hard to stay what the story is there.
I did leave out the "efs" blocks... I forgot about that one. I dumped it once when I originally got the phone and just reuse the file. Interesting on the recovery part, I've not heard of that. I don't remember if mine was in recovery or not. It seems to work fine.
As long as you are in adb shell as su, whether the partition is r/w or r/o doesn't matter. You are just dumping (reading) it not writing.
The PARM partition is where SBL stores information. This is the settings for boot and contains the image you see on startup as well as the Download Mode image and others. Unless you need to mess with the bootloader related stuff, I wouldn't do the param.lfs. I'd rather reflash from a stock odin to fix any boatloader related issues. A clean PARM partition would ensure you avoid any bootloader anomalies.
I've attached the full mapping of the partitions along with some info on each.
OK.
Wiped data. Odin installed UCKH7 stock plus root. Updated to UCKK6 OTA.
Used adb to pull the system image, this time including the block size bs=4096.
Odin installed UCKH7 stock plus root again (so about phone would show UCKH7). Installed Mobile Odin. Flashed factoryfs.img. Flash failed. Phone still reports Gingerbread.UCKH7.
Mobile Odin rebooted into recovery and then the text goes by really fast, but it essentially printed quickly Clearing... Flashing... and then immediately rebooted. I think this is about the same experience that I had with the Odin flashable tar before. If the system partition was going to install, it would take at least a couple of minutes to write half a gig of info to the phone.
So, bad factoryfs.img? Is there any point in even making a tar and checking it out?
I'm at a loss. This should have worked shouldn't it?
Maybe Entropy will pitch in with some helpful advice.
creepyncrawly said:
So, bad factoryfs.img? Is there any point in even making a tar and checking it out?
I'm at a loss. This should have worked shouldn't it?
Maybe Entropy will pitch in with some helpful advice.
Click to expand...
Click to collapse
I've had mixed results using mobile odin. I had a soft brick once trying to flash a kernel. I would try making an actual odin tar image and try flashing that way. That's the way I do it.
There is a good thread in the international SGS2 forums on creating an odin tar. You'll need Cygwin on your computer (assuming you're on windows).
Here's the short "How to" version:
To create a flashable Odin package, you need to pull all of the files off of the phone/sdcard and onto your computer.
Open a Cygwin and change directory to where you are storing your ROM dumps.
Run the following commands to build a package. Be sure to use identifiable names with versions or dates:
$ tar -H ustar -c factoryfs.img modem.bin zImage > package_name.tar
$ md5sum -t package_name.tar >> package_name.tar
$ mv package_name.tar package_name.tar.md5
Include what images you want after the "-c" and before the ">".
A second opinion is always good!
Why not nand and just pull factoryfs.img that way
Indeed.. You could. That would work too.
UPDATE: I just pulled mine. I reflashed to my old UCKH7 build (wiped and flashed just the basics) and back to my new UCKK6 build plus all my data, etc. It all seemed to work.
jivy26 said:
Why not nand and just pull factoryfs.img that way
Click to expand...
Click to collapse
I've never lived in linux land, so I don't have the background to quickly grasp this. I know nand is our phone's memory, but what does your statement mean? I'd appreciate it if you could explain a little. I'd be happy with something to study, but I don't even know what to look for.
creepyncrawly said:
I've never lived in linux land, so I don't have the background to quickly grasp this. I know nand is our phone's memory, but what does your statement mean? I'd appreciate it if you could explain a little. I'd be happy with something to study, but I don't even know what to look for.
Click to expand...
Click to collapse
On the rooted system I assume you have CWM as well. If that is the case go into CWM backup your phone then boot up the phone. Mount SDCARD and navigate to Clockworkmod > backup > then whatever date and time you backed up and you will see factoryfs.img in there as well as other img files.
jivy26 said:
On the rooted system I assume you have CWM as well. If that is the case go into CWM backup your phone then boot up the phone. Mount SDCARD and navigate to Clockworkmod > backup > then whatever date and time you backed up and you will see factoryfs.img in there as well as other img files.
Click to expand...
Click to collapse
Jivy,
I'm not sure on yours, but my folders only have 3 tar files (cache.ext4.tar, data.ext4.tar, system.ext4.tar) and a 2 img's (boot and recovery). They are each only 8mb. The tar files have all the data. They reflash fine in CWM, but they are not odiin compatible.
Also for the non-rooted system try this, assuming you have Android-sdk installed.
Plug phone into PC with usb debugging enabled.
Download busybox here
Put it on c:\
Run CMD with Admin privileges.
Below are the commands you will type in CMD. For below I am assuming your SDK is in the same location as default, if not just change as neccessary.
cd\
cd program files
cd android-sdk
cd platform-tools
adb devices (to make sure your phone shows up)
adb push busybox /data/local/busybox
adb shell
cd /sdcard
chmod 755 /data/local/busybox
/data/local/busybox tar cvf stock_unrooted.tar /system
Click to expand...
Click to collapse
Once its done you can mount sdcard and the tar with system will be there waiting
jivy26 said:
On the rooted system I assume you have CWM as well. If that is the case go into CWM backup your phone then boot up the phone. Mount SDCARD and navigate to Clockworkmod > backup > then whatever date and time you backed up and you will see factoryfs.img in there as well as other img files.
Click to expand...
Click to collapse
Oh. nand for nandroid backup. It does not contain factoryfs.img. It has system.ext4.tar which contains the directory sturcture and contents of system in the file system, not a partition image.
creepyncrawly said:
Oh. nand for nandroid backup. It does not contain factoryfs.img. It has system.ext4.tar which contains the directory sturcture and contents of system in the file system, not a partition image.
Click to expand...
Click to collapse
Misunderstood what your goal was. Like earlier mentioned you need to have:
Code:
dd if=/dev/block/mmcblk0p9 of=/sdcard/factoryfs.img bs=4096
That wont flash in odin you still need to make it 512M so quick run down in linux
Download this http://dl.dropbox.com/u/53644280/ext4_utils.zip
So you can view contents of .img
Code:
mkdir tempdir; mount -o loop factoryfs.img tempdir
To repack img w/ 512M
Code:
./mkuserimg.sh -s /some/directory/ ./factoryfs_custom.img ext4 ./temp 512M
Then making a TAR ball. *Just included everything i've normally seen in one*
Code:
tar -c boot.bin factoryfs.img hidden.img modem.bin param.lfs zImage >> PDA.tar
jivy26 said:
Also for the non-rooted system try this, assuming you have Android-sdk installed.
Plug phone into PC with usb debugging enabled.
Download busybox here
Put it on c:\
Run CMD with Admin privileges.
Below are the commands you will type in CMD. For below I am assuming your SDK is in the same location as default, if not just change as neccessary.
Once its done you can mount sdcard and the tar with system will be there waiting
Click to expand...
Click to collapse
Kewl. That non-rooted dump will include the busybox directory though won't it? On a rooted system, it would capture the root tools too I expect.
Only, when developers provide a package like Entropy's Return/Unbrick to stock packages, or DesignGears original One-Click downloader for Captivate, those packages contain partition images, not file system images. I would really like to learn how to dump the system partition so that it can be used to create Odin flashable tar files.
Thanks for your input.
creepyncrawly said:
Kewl. That non-rooted dump will include the busybox directory though won't it? On a rooted system, it would capture the root tools too I expect.
Only, when developers provide a package like Entropy's Return/Unbrick to stock packages, or DesignGears original One-Click downloader for Captivate, those packages contain partition images, not file system images. I would really like to learn how to dump the system partition so that it can be used to create Odin flashable tar files.
Thanks for your input.
Click to expand...
Click to collapse
I posted that before I knew what your intentions were. The above would give you a stock /system in .tar . Since busybox is stored in data/local not system/xbin, it wont be in that tar. So you'd have a stock /system, but not the .img you're looking for.
jivy26 said:
Misunderstood what your goal was. Like earlier mentioned you need to have:
Code:
dd if=/dev/block/mmcblk0p9 of=/sdcard/factoryfs.img bs=4096
That wont flash in odin you still need to make it 512M so quick run down in linux
Download this http://dl.dropbox.com/u/53644280/ext4_utils.zip
So you can view contents of .img
Code:
mkdir tempdir; mount -o loop factoryfs.img tempdir
To repack img w/ 512M
Code:
./mkuserimg.sh -s /some/directory/ ./factoryfs_custom.img ext4 ./temp 512M
Then making a TAR ball. *Just included everything i've normally seen in one*
Code:
tar -c boot.bin factoryfs.img hidden.img modem.bin param.lfs zImage >> PDA.tar
Click to expand...
Click to collapse
When I pulled the system image using the above dd command including the bs=4096, the resulting file did come out 512M. It still didn't flash.
So do I need a linux box to do this? Don't have one of course. I've been making the tar files on my phone in Terminal. Can I do the above commands on the phone?
creepyncrawly said:
When I pulled the system image using the above dd command including the bs=4096, the resulting file did come out 512M. It still didn't flash.
So do I need a linux box to do this? Don't have one of course. I've been making the tar files on my phone in Terminal. Can I do the above commands on the phone?
Click to expand...
Click to collapse
Never tried from phone. Cygwin is an option to run linux scripts and what not in windows, but not sure if it can handle the above mentioned.
jivy26 said:
Never tried from phone. Cygwin is an option to run linux scripts and what not in windows, but not sure if it can handle the above mentioned.
Click to expand...
Click to collapse
OK. I'll play around with it and see what happens. Really appreciate the help.

[Q] Recovery Update.zip Question

Braway posted the following in his reset the flash counter thread :http://forum.xda-developers.com/showthread.php?t=1569206
"ok, simple guide:
requires that cwm is installed!
1. flash stock system, kernel, modem and so on (not recovery yet) through odin (or cwm, if you have that stuff as update.zip)
2. flash this reset through cwm to reset the counter (now you should have everything stock, except for recovery)
3. in cwm, now you can either flash a stock recovery using an update.zip (if you have it), OR follow this:
a) extract recovery.img from the odin stock recovery tar file
b) put it on your sdcard
c) boot to cwm
d) use adb to connect to cwm (adb shell)
e) in the cwm shell, use one of the following commands:
recovery.img on external sdcard:
Code:
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22
recovery.img on your internal sdcard:
Code:
dd if=/emmc/recovery.img of=/dev/block/mmcblk0p22
WARNING: a typo in that line could hard brick your phone!"
I posted a question on that thread but then thought maybe this was a more reasonable/appropriate place for it.
How do I get the recovery update.zip?
I have followed the first two steps and they worked like a champ, flash counter is reset and all is good on that front. As I said in his thread ADB is not my friend, it kinda intimidates me a little (I have used it a time or two on my HTC EVO 3D, but still I dont really like it). And Braway's caveat about a typo possibly hard bricking the phone makes that even worse. If there is a way to just flash a .zip, well that really is more my speed.
So my question is, does anyone already have the recovery update.zip he spoke of? If so would you please share it? If it is easy to make could you please give me (extremely detailed) instructions. I did extract the recovery.img from the stock .tar http://forum.xda-developers.com/showthread.php?t=1506330, but I have no idea whatsoever on how to turn that into a update.zip.
Any help is much appreciated!
Do you not have CWM installed? I made a little guide here if interested...
http://forum.xda-developers.com/showthread.php?t=1584250
With CWM installed, here is the flashable zip where the file name doesn't matter..
AT&T ONLY!! http://forum.xda-developers.com/attachment.php?attachmentid=972406&d=1333071299
Slap it on root of sdcard and navigate to it and flash in CWM.
lmike6453 said:
Do you not have CWM installed? I made a little guide here if interested...
http://forum.xda-developers.com/showthread.php?t=1584250
With CWM installed, here is the flashable zip where the file name doesn't matter..
AT&T ONLY!! http://forum.xda-developers.com/attachment.php?attachmentid=972406&d=1333071299
Slap it on root of sdcard and navigate to it and flash in CWM.
Click to expand...
Click to collapse
Yeah I have CWM, thats the problem. I guess I should have put that in the OP. I am wanting to get rid of CWM so I can return the phone. Thanks for the help!
Edit:Sorry I wasn't clear in the OP. That .zip you linked was the reset the flash counter zip, I have already done that (works great!) but now I need to remove CWM. According to the instructions posted by Braway (see OP) I need to flash the recovery via an update.zip to do that (well thats the way I am reading it...could be wrong on that point too I guess
Put the stock recovery in /sdcard (root directory of internal SD), boot into Android and connect via adb. Enter the following command:
Code:
adb shell dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22
This will flash stock recovery, overwriting CWM. If you copy and paste the command, there's no danger in a typo bricking your phone.
tenderchkn said:
Put the stock recovery in /sdcard (root directory of internal SD), boot into Android and connect via adb
Click to expand...
Click to collapse
Nightforge said:
OR follow this:
c) boot to cwm
d) use adb to connect to cwm (adb shell)
e) in the cwm shell, use one of the following commands:
recovery.img on external sdcard:
Code:
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22
recovery.img on your internal sdcard:
Code:
dd if=/emmc/recovery.img of=/dev/block/mmcblk0p22
WARNING: a typo in that line could hard brick your phone!"
Click to expand...
Click to collapse
And the noob says>>>> So I took your advice and decided to suck it up and use adb and of course, because adb hates me, it failed. So step by step this is what I did if anyone would be so kind as to tell me where i went wrong. Screen shot included.
1.put recovery.img on internal (and external just for grins) sdcard
2.made sure usb debugging was on.
3.plugged phone into comp w/usb
4.started adb on comp using the following
C:\users\myname> cd C:\android-sdk-windows\platform-tools
C:\android-sdk-windows\platform-tools> adb.exe
5.After adb started I pasted the following from Tenderchckn
adb shell dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22
Thanks again...
Try booting into CWM instead, then launch adb, and run the same command. If that doesn't work for some reason, enter "adb shell" first, and you should have a "$" prompt. Then enter "adb shell dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22".
http://forum.xda-developers.com/showpost.php?p=23499670&postcount=133 Followed step by step and it worked, doh!
Avoided this because I didn't want to use adb, then forgot about it. Then found it again and it worked like a champ. Thanks for the help now please delete thread. Lol

[Q] Anyone Know A Way To Mount SD While In Recovery?

Basically i went to flash a Rom in my phone, one of the requirements for the Rom was to format system. Not looking I, formatted SD card instead. Erasing my backup i had just made, and whipping the Rom that I was about to flash. So, what I need help with is seeing if anyone know a way to flash a Rom to my phone while in recovery, or is there a way to mount my SD Card memory while in Fastboot or recovery? I'm just looking to be able to flash any Rom in my phone to at least get it able to be used again.
CWR had an option to mount the sd card under mounts and storage. I say had because that was on my dinc2. I'm not rooted on my DNA so I don't have a custom recovery to check for you but this is how I did it in the past.
Sent from my HTC6435LVW using xda app-developers app
charlrober6 said:
Basically i went to flash a Rom in my phone, one of the requirements for the Rom was to format system. Not looking I, formatted SD card instead. Erasing my backup i had just made, and whipping the Rom that I was about to flash. So, what I need help with is seeing if anyone know a way to flash a Rom to my phone while in recovery, or is there a way to mount my SD Card memory while in Fastboot or recovery? I'm just looking to be able to flash any Rom in my phone to at least get it able to be used again.
Click to expand...
Click to collapse
Not to fret, ran into this problem last night. Both of our recoveries allow for adb sideload but ithasn't worked for me (maybe it will for you)
If it doesn't work, you can drop whatever ROM you want into your ADB folder. To make things simple, just change the name of the ROM to DNA. Go into your recovery and then cd to your adb tools from a command window. type in adb push dna.zip /sdcard/ and it'll move it to your internal storage. It takes awhile so be patient :good:
Chyrux said:
Not to fret, ran into this problem last night. Both of our recoveries allow for adb sideload but ithasn't worked for me (maybe it will for you)
If it doesn't work, you can drop whatever ROM you want into your ADB folder. To make things simple, just change the name of the ROM to DNA. Go into your recovery and then cd to your adb tools from a command window. type in adb push dna.zip /sdcard/ and it'll move it to your internal storage. It takes awhile so be patient :good:
Click to expand...
Click to collapse
Okay quick question, well questions. When typing in my adb commands, do my phone need to be in fastboot, if not when you say it needs to be in recovery do it need to be in recovery with it mounted some how or just in recovery in general. Sorry if i'm being a complete noob, but being phone less is killing me
charlrober6 said:
Okay quick question, well questions. When typing in my adb commands, do my phone need to be in fastboot, if not when you say it needs to be in recovery do it need to be in recovery with it mounted some how or just in recovery in general. Sorry if i'm being a complete noob, but being phone less is killing me
Click to expand...
Click to collapse
No problem, we all have to start somewhere. I'll give a bit of clarification.
Fastboot is a way of accessing the Android system from the bootloader, such as flashing system and boot.img's or recovery files, meaning you can't be booted into the system when you want to use Fastboot.
ADB is the android debugging bridge and can be used at just about any time your phone is booted. For the average user, it's mainly a tool to push and pull files. So, in this case since you need to push the ROM to your phone.
I'm not sure if this can be done from the bootloader since it's going to your internal storage, so you need to boot into your recovery. Once there, you don't need to do anything. just make sure that the .zip is in your ADB directory. Open up a command prompt, cd to your adb tools, then use adb push insertfilename.zip (Like I said, rename it to dna to make it easy) so the command looks like adb push dna.zip /sdcard/ This takes awhile depending on the file size (UKB took about 5 minutes, I think. Maybe longer.) so just be patient. If it gives you any type of error, just try again. Hope this helps

Categories

Resources