Jump to content


Photo

Procedure for dumping existing ROM


  • Please log in to reply
26 replies to this topic

#1 namko

namko

    FW Developer

  • FW Developer
  • PipPipPip
  • 685 posts

Posted 25 November 2011 - 11:59 AM

UPDATE This is no longer relevant since the availability of custom recovery.

DISCLAIMER I am not responsible for any damage you cause to your tablet with this.
Though I'd like to add simply dumping the ROM is expected to be harmless, as I've tried this many times over while developing and testing this.

What you will need:
  • An SD card. NOTE All data on this card will be erased.
  • SD Card Reader.
Procedure:
If you do not want to dump your bootloader (easy):
  • Take any SD card (256MiB+), format it using the HP USB format tool.
  • Place the "utscript.sh" and "zImage.debug" files into your SD card.
  • Place the "utscript" file from "nodump" folder into your SD card.
  • You should now have 3 files in your SD card (and nothing else) - "utscript", "utscript.sh" and "zImage.debug".
  • Safely unplug the SD card. Turn off your tablet, insert the SD card, hold Menu+Power.
  • Wait for the process to complete.
  • Remove the SD card. You may now turn on your tablet and use it normally. The backup is in the SD card. Plug it in and you'll see two new folders, "logs" and "dump". "dump" contains the various dumped files that you may put into an existing firmware (replacing each file) and logs contain information about the process.
If you want to dump your bootloader (slightly difficult):
  • Take any SD card (2GiB+), and use a tool like SuSE Studio Image Writer to write the "mbr.raw" file (found in the "mbr" folder) to your SD card. Then safely unplug the SD card and then replug it back. Windows will ask to format the disk. Click 'No'. In My Computer you should see a 1GB external disk (this is expected), right click and format it.
  • Place the "utscript.sh" and "zImage.debug" files into your SD card.
  • Place the "utscript" file from "nanddump" folder if you have NAND ("mmcdump" folder if no NAND) into your SD card.
  • You should now have 3 files in your SD card (and nothing else) - "utscript", "utscript.sh" and "zImage.debug".
  • Safely unplug the SD card. Turn off your tablet, insert the SD card, hold Menu+Power.
  • Wait for the process to complete.
  • Remove the SD card. You may now turn on your tablet and use it normally. The backup is in the SD card. Plug it in and you'll see two new folders, "logs" and "dump". "dump" contains the various dumped files that you may put into an existing firmware (replacing each file) and logs contain information about the process.
NOTE:
After completing this procedure (the one for dumping bootloader) the SD card you used contains the following:
Sectors 0x200000 to 0x200400: Bootloader (u-boot.bin)
Sectors 0x200400 to 0x200800: Bootloader arguments (u-boot.arg)
Sectors 0x200800 to 0x204800: Recovery (recovery)
Sectors 0x204800 to 0x207800: Kernel (zImage)
Sectors 0x207800 to 0x209800: Boot logo (logo.bmp)

The files:
Attached File  ROM Dump.zip   6.4MB   405 downloads
Alternate link

Edited by namko, 12 July 2012 - 12:01 PM.

  • derpeter and WiR3D like this

#2 namko

namko

    FW Developer

  • FW Developer
  • PipPipPip
  • 685 posts

Posted 25 November 2011 - 11:59 AM

DISCLAIMER I am not responsible for any damage you cause to your tablet with this.

Procedure to restore ROM:
  • Take any SD card (256MiB+), format it using the HP USB format tool.
  • Place the "zImage.debug" file into your SD card.
  • Depending on the dumping method you used place the "utscript" and "utscript.sh" file from the correct folder into your SD card. (If you did not dump the bootloader, the folder is "norestore"; if you dumped the bootloader from NAND and are restoring to NAND, the folder is "nandrestore"; if you dumped the bootloader from SD and are restoring to SD, the folder is "mmcrestore"; any other combination is invalid and will probably brick your tablet).
  • You should now have 3 files in your SD card (and nothing else) - "utscript", "utscript.sh" and "zImage.debug".
  • Next, copy all the files that were generated during the dumping process (found in the "dump" folder when you performed dump).
  • A verification check that you may perform: If the bootloader was not dumped, atleast "rootfs.tar", "utscript", "utscript.sh" and "zImage.debug" should be present. If the bootloader was dumped, "u-boot.bin", "u-boot.arg", "recovery", "zImage", "logo.bmp", "mbr", "rootfs.tar", "utscript", "utscript.sh" and "zImage.debug" should all be present. If any of the required files is missing your tablet may become unusable (soft- or hard-brick).
  • Safely unplug the SD card. Turn off your tablet, insert the SD card, hold Menu+Power.
  • Wait for the process to complete.
  • You may now turn on your tablet and use it normally. Restoration is complete.
NOTE: For your information, the no-bootloader-restore method only rewrites system into your tablet and if NAND exists, into NAND otherwise into SD card. The bootloader-restore method rewrites everything, either the NAND or the SD card.

The files:
Attached File  ROM Restore.zip   6.41MB   68 downloads
Alternate link

Edited by namko, 10 December 2011 - 10:57 AM.

  • derpeter and mandar like this

#3 Negar

Negar

    Newbie

  • Jr. Member
  • Pip
  • 1 posts

Posted 12 December 2011 - 06:24 AM

[*]Take any SD card (2GiB+), and use a tool like SuSE Studio Image Writer to write the "mbr.raw" file (found in the "mbr" folder) to your SD card. Then safely unplug the SD card and then replug it back. Windows will ask to format the disk. Click 'No'. In My Computer you should see a 1GB external disk (this is expected), right click and format it.
........



Hello
How to return the original volume of the SD card (4GB), passed through this procedure?
Thank you.
  • mandar likes this

#4 namko

namko

    FW Developer

  • FW Developer
  • PipPipPip
  • 685 posts

Posted 12 December 2011 - 11:13 AM

Try HP USB format tool.
  • mandar likes this

#5 mtbriding

mtbriding

    Newbie

  • Jr. Member
  • Pip
  • 5 posts

Posted 14 December 2011 - 05:57 PM

DISCLAIMER I am not responsible for any damage you cause to your tablet with this.

Procedure to restore ROM:

  • Take any SD card (256MiB+), format it using the HP USB format tool.
  • Place the "zImage.debug" file into your SD card.
  • Depending on the dumping method you used place the "utscript" and "utscript.sh" file from the correct folder into your SD card. (If you did not dump the bootloader, the folder is "norestore"; if you dumped the bootloader from NAND and are restoring to NAND, the folder is "nandrestore"; if you dumped the bootloader from SD and are restoring to SD, the folder is "mmcrestore"; any other combination is invalid and will probably brick your tablet).
  • You should now have 3 files in your SD card (and nothing else) - "utscript", "utscript.sh" and "zImage.debug".
  • Next, copy all the files that were generated during the dumping process (found in the "dump" folder when you performed dump).
  • A verification check that you may perform: If the bootloader was not dumped, atleast "rootfs.tar", "utscript", "utscript.sh" and "zImage.debug" should be present. If the bootloader was dumped, "u-boot.bin", "u-boot.arg", "recovery", "zImage", "logo.bmp", "mbr", "rootfs.tar", "utscript", "utscript.sh" and "zImage.debug" should all be present. If any of the required files is missing your tablet may become unusable (soft- or hard-brick).
  • Safely unplug the SD card. Turn off your tablet, insert the SD card, hold Menu+Power.
  • Wait for the process to complete.
  • You may now turn on your tablet and use it normally. Restoration is complete.
NOTE: For your information, the no-bootloader-restore method only rewrites system into your tablet and if NAND exists, into NAND otherwise into SD card. The bootloader-restore method rewrites everything, either the NAND or the SD card.

The files:
Attached File  ROM Restore.zip   6.41MB   68 downloads
Alternate link


Hi namco, wondered if you can use this procedure to swap out the internal sd? i.e. dump firmware without nand (from internal card). Replace internal card with an unformatted one. then restore dump to unformatted internal card?

Also would it matter if the old and new cards are different sizes? i.e. Older card is 16Gb (slow), new one would be a fast 8Gb

Thanks in advance for the info.
  • mandar likes this

#6 namko

namko

    FW Developer

  • FW Developer
  • PipPipPip
  • 685 posts

Posted 14 December 2011 - 10:58 PM

Hi namco, wondered if you can use this procedure to swap out the internal sd? i.e. dump firmware without nand (from internal card). Replace internal card with an unformatted one. then restore dump to unformatted internal card?


Size difference doesn't matter, however, note that if you insert a blank SD card, there will be no bootloader to begin with (it's actually the bootloader which loads these scripts to dump this firmware, in the first place). Therefore, you will first have to load a bootloader manually into the (new) internal SD card (see one of the threads on unbricking your tablet, they have instructions and a bootloader to load into the internal SD). If you are using linux, I can easily put a script for you to DIRECTLY write the firmware into the internal SD WITHOUT using the tablet.
  • edely and mandar like this

#7 edely

edely

    Newbie

  • Jr. Member
  • Pip
  • 1 posts

Posted 17 December 2011 - 11:03 AM

excellent job! thanks for and may i try for my i7011
it is just restore stock rom in the factory~

#8 c_ferrando

c_ferrando

    Newbie

  • Jr. Member
  • Pip
  • 7 posts

Posted 03 February 2012 - 08:32 AM

Try HP USB format tool.


Hi namko, great job !
Why this tool ?
because it makes partition active ?
thanks
  • mandar likes this

#9 namko

namko

    FW Developer

  • FW Developer
  • PipPipPip
  • 685 posts

Posted 04 February 2012 - 02:01 AM

I've observed sometimes windows inbuilt format tool doesn't properly write MBR; as a result, the tablet fails to detect the formatted partition. HP Format Tool seems to properly write the MBR and the card works. You can use some other tool as well if you know it will properly write the MBR.
  • mandar likes this

#10 c_ferrando

c_ferrando

    Newbie

  • Jr. Member
  • Pip
  • 7 posts

Posted 07 February 2012 - 05:49 AM

I've observed sometimes windows inbuilt format tool doesn't properly write MBR; as a result, the tablet fails to detect the formatted partition. HP Format Tool seems to properly write the MBR and the card works. You can use some other tool as well if you know it will properly write the MBR.


Hi namko, thanks, sorry for my english.

After completing the backup procedure the sd card contains the following files:

u-boot.arg
recovery
zImage
logo.bmp

and in place of u-boot.bin there are these files:

mbr
param
rootfs.tar

Is it safe to proceed with restore procedure ?
thank you very much

P.S.: My partitions log:

major minor #blocks name

31 0 512 mtdblock0
31 1 8192 mtdblock1
31 2 6144 mtdblock2
31 3 4096 mtdblock3
31 4 109568 mtdblock4
31 5 2048 mtdblock5
179 0 3872256 mmcblk0
179 1 2995344 mmcblk0p1
179 2 105896 mmcblk0p2
179 3 514352 mmcblk0p3
179 4 208010 mmcblk0p4
179 8 7782400 mmcblk1
179 9 1046245 mmcblk1p1

and my mtd log:

dev: size erasesize name
mtd0: 00080000 00020000 "misc"
mtd1: 00800000 00020000 "recovery"
mtd2: 00600000 00020000 "kernel"
mtd3: 00400000 00020000 "logo"
mtd4: 06b00000 00020000 "rootfs-combin"
mtd5: 00200000 00020000 "param"
  • mandar likes this

#11 c_ferrando

c_ferrando

    Newbie

  • Jr. Member
  • Pip
  • 7 posts

Posted 10 February 2012 - 03:55 AM

[*]A verification check that you may perform: If the bootloader was dumped, "u-boot.bin", "u-boot.arg", "recovery", "zImage", "logo.bmp", "mbr", "rootfs.tar", "utscript", "utscript.sh" and "zImage.debug" should all be present.


Hi,
after dump procedure all files are dumped except u-boot.bin
Looking at scripts, this file is necessary for the restore procedure.
How can I make it, or how can I found it ?
Any u-boot.bin from any firmware is okay ?

many thanks
  • mandar likes this

#12 namko

namko

    FW Developer

  • FW Developer
  • PipPipPip
  • 685 posts

Posted 10 February 2012 - 06:07 AM

The reason why you dont see a u-boot.bin file is that it cant be dumped when the linux kernel is loaded. It can only be dumped when direct access to NAND is available (e.g. when U-Boot is "running"; i.e. before loading and executing the kernel itself). As such, unless you pick the file which doesnt dump bootloader, the bootloader is dumped, but directly onto the SD card (and not on the file system). Assuming that you are using linux, you dont need any special tool to get it, but Windows users will either need a Hex editor that can open disks directly, or some other disk imaging tool (which, in general, people find difficult).

Generally you can use existing bootloader if the devices are compatible (e.g. if you have a Herotab C8 and you take a bootloader from a Herotab C8 ROM it will work). Your other option is to not flash the bootloader at all. Flashing kernel and rootfs is sufficient to change firmwares (and the logo if you want to).
  • mandar likes this

#13 c_ferrando

c_ferrando

    Newbie

  • Jr. Member
  • Pip
  • 7 posts

Posted 10 February 2012 - 11:37 AM

The reason why you dont see a u-boot.bin file is that it cant be dumped when the linux kernel is loaded. It can only be dumped when direct access to NAND is available (e.g. when U-Boot is "running"; i.e. before loading and executing the kernel itself). As such, unless you pick the file which doesnt dump bootloader, the bootloader is dumped, but directly onto the SD card (and not on the file system). Assuming that you are using linux, you dont need any special tool to get it, but Windows users will either need a Hex editor that can open disks directly, or some other disk imaging tool (which, in general, people find difficult).

Generally you can use existing bootloader if the devices are compatible (e.g. if you have a Herotab C8 and you take a bootloader from a Herotab C8 ROM it will work). Your other option is to not flash the bootloader at all. Flashing kernel and rootfs is sufficient to change firmwares (and the logo if you want to).


My tablet is a MID703, which should be compatible with Herotab C8.
I try to use a boot file that already exists for this tablet.
Thank you very much !

#14 namko

namko

    FW Developer

  • FW Developer
  • PipPipPip
  • 685 posts

Posted 10 February 2012 - 12:18 PM

Since I dont know anything about that tablet all I can say is you shoudn't do that unless you are absolutely sure that it is compatible (if you know someone who has successfully flashed MID703 with Herotab ROMs then it's probably safe).

#15 c_ferrando

c_ferrando

    Newbie

  • Jr. Member
  • Pip
  • 7 posts

Posted 11 February 2012 - 11:12 AM

Since I dont know anything about that tablet all I can say is you shoudn't do that unless you are absolutely sure that it is compatible (if you know someone who has successfully flashed MID703 with Herotab ROMs then it's probably safe).

nothing absolute, but someone says it is compatible.

With Linux, after the dump procedure, can I get file u-boot.bin, from sd card, with the "dd" command ?

Like this:
dd if=/dev/sda of=./u-boot.bin bs=512 skip=2097152 count=1024

thanks

#16 namko

namko

    FW Developer

  • FW Developer
  • PipPipPip
  • 685 posts

Posted 12 February 2012 - 08:30 AM

Yes that looks OK to me. You might as well want to grep for "U-Boot" in the file you obtain.

#17 derpeter

derpeter

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 51 posts
  • LocationGermany

Posted 01 April 2012 - 07:51 AM

Hi

I'm stuck in the recovery procedure. The script stops aber echoing "Preparing system..."
Next step in the script should be to either print "NAND found .." or "No NAND found".
As far as i see it in the script there is no command that could fail between the first and the second echo
so I'm confused what could go wrong. Even if the if fails it should fall into the else clause and echo the last string.

As we have no ADB at this time i have no idea how to debug.
I also checked the scipt for wrong line breaks but i looks fine.

Any hint?

“Free software” is a matter of liberty, not price. To understand the concept, you should think of “free” as in “free speech,” not as in “free beer.”
- Richard Stallman -


#18 Helionline

Helionline

    Newbie

  • Jr. Member
  • Pip
  • 1 posts

Posted 12 April 2012 - 02:49 PM

Hi, these procedures are valid for any type of tablets?

PS: Sorry for the bad english...

Thanks

#19 namko

namko

    FW Developer

  • FW Developer
  • PipPipPip
  • 685 posts

Posted 15 April 2012 - 02:03 AM

For this procedure to work:
  • The tablet must be having U-Boot as the bootloader
  • The bootloader must be reading the booting instructions from an environment variable (and not be hard-coded)


#20 masterpick

masterpick

    Newbie

  • Jr. Member
  • Pip
  • 3 posts

Posted 16 April 2012 - 05:20 PM

i need !! :rolleyes:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users