Hi, Guest! Login / Register




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[Tutorial] How to backup / dump an Android phone’s Boot, Recovery and System partition images

#1
(This post was last modified: 07-08-2017, 08:44 PM by hovatek. )

Method 1: ADB Method I


  1. Install a root browser (e.g ROM Toolbox lite) and navigate to dev/block/platform . Open each folder in the platform folder till you find a folder named "by-name". Replace "your_folder" in the code below with the name of the folder which contains the by-name folder
  2. Launch ADB and type the code below. Press Enter after each line
    Code:
    adb shell
    ls -al /dev/block/platform/your_folder/by-name
  3. You should get an output of the phone's mount points
  4. Type the code below to dump the partition of your choice

    Code:
    adb shell
    su
    dd if=/yourMountingPoint of=/yourDestination/partitionType

  5. For example

    Code:
    adb shell
    su
    dd if=/dev/block/mmcblk0p9 of=/sdcard/system.img

Method 2: ADB dd 2


  1. Launch ADB and run the command below

    Code:
    adb shell
    cat /proc/dumchar_info

  2. You should have an output like

    Code:
    Part_Name          Size             StartAddr         Type  MapTo                 Region
    preloader    0x0000000000040000   0x0000000000000000   2   /dev/misc-sd           BOOT_1
    mbr          0x0000000000080000   0x0000000000000000   2   /dev/block/mmcblk0     USER
    ebr1         0x0000000000080000   0x0000000000080000   2   /dev/block/mmcblk0p1   USER
    pro_info     0x0000000000300000   0x0000000000100000   2   /dev/block/mmcblk0     USER
    nvram        0x0000000000500000   0x0000000000400000   2   /dev/block/mmcblk0     USER
    protect_f    0x0000000000a00000   0x0000000000900000   2   /dev/block/mmcblk0p2   USER
    protect_s    0x0000000000a00000   0x0000000001300000   2   /dev/block/mmcblk0p3   USER
    seccfg       0x0000000000020000   0x0000000001d00000   2   /dev/block/mmcblk0     USER
    uboot        0x0000000000060000   0x0000000001d20000   2   /dev/block/mmcblk0     USER
    bootimg      0x0000000001000000   0x0000000001d80000   2   /dev/block/mmcblk0     USER
    recovery     0x0000000001000000   0x0000000002d80000   2   /dev/block/mmcblk0     USER
    sec_ro       0x0000000000600000   0x0000000003d80000   2   /dev/block/mmcblk0p4   USER
    misc         0x0000000000080000   0x0000000004380000   2   /dev/block/mmcblk0     USER
    logo         0x0000000000300000   0x0000000004400000   2   /dev/block/mmcblk0     USER
    expdb        0x0000000000a00000   0x0000000004700000   2   /dev/block/mmcblk0     USER
    tee1         0x0000000000500000   0x0000000005100000   2   /dev/block/mmcblk0     USER
    tee2         0x0000000000500000   0x0000000005600000   2   /dev/block/mmcblk0     USER
    kb           0x0000000000100000   0x0000000005b00000   2   /dev/block/mmcblk0     USER
    dkb          0x0000000000100000   0x0000000005c00000   2   /dev/block/mmcblk0     USER
    android      0x0000000080000000   0x0000000005d00000   2   /dev/block/mmcblk0p5   USER
    cache        0x0000000010000000   0x0000000085d00000   2   /dev/block/mmcblk0p6   USER
    usrdata      0x000000030ce00000   0x0000000095d00000   2   /dev/block/mmcblk0p7   USER
    bmtpool      0x0000000001500000   0x0000000001500000   2   /dev/block/mmcblk0     USER

  3. If you wish to dump recovery.img for example, take note of the recovery line

    Code:
    recovery     0x0000000001000000   0x0000000002d80000   2   /dev/block/mmcblk0     USER

  4. Convert the Size and StartAddr values from Hexadecimal to Decimal then divide by 4096 (which is the Block Size)
    Run the command below

    Code:
    #mount -o ro,remount /[email protected] /system
    dd if=/dev/block/mmcblk0 bs=4096 skip=StartAddr count=Size | gzip >  /data/local/tmp/recovery.img.gz

  5. For Recovery in this example, it'll be

    Code:
    #mount -o ro,remount /[email protected] /system
    dd if=/dev/block/mmcblk0 bs=4096 skip=11648 count=4096 | gzip >  /data/local/tmp/recovery.img.gz

  6. Check your device for the dumped image

Method 3: ADB + ROMdump.zip method


  1. Setup ADB (see https://forum.hovatek.com/thread-588.html  )
  2. Download ROMdump
  3. Extract the file named "Install" from the ROMdump zip file and copy it to the same location as adb.exe
  4. Enable USB debugging on the phone (Settings > Developer > Tick USB Debugging) and connect the phone to PC
  5. Launch adb.exe (Open the adb folder > Hold Shift button > Right-click on any empty space > Select Open Command Window here)
  6. In the command window, type the following commands and press Enter after each:
    Code:
    adb devices
    adb push install /data/local/
    adb shell chmod 04755 /data/local/install
    adb shell /data/local/install
  7. Wait till pushing is complete
  8. Toggle Wi-Fi On then Off or Off then On then Off (depending on its current state)
  9. Type the command below in the command window then press Eenter
    Code:
    adb shell romdump
  10. Wait for the process to be complete and you'll have your ROMdump
  11. You'll find your files in a folder named romdump in the root of the SD card

Method 4: Terminal + ROMdump.zip method


  1. Ensure the phone is rooted (see https://blog.hovatek.com/how-to-root-and...ithout-pc/ )
  2. Install Android Terminal Emulator
  3. Download ROMdump
  4. Extract the file named "Install" from the ROMdump zip file and copy it to the root of the SD card (as in copy directly and not into any folder)
  5. Launch Terminal Emulator and type the following commands then press Enter after each
    Code:
    su
    cat /sdcard/install >/data/local/install
    chmod 04755 /data/local/install
    /data/local/install
  6. Wait for the process to complete
  7. Toggle Wi-Fi On then Off or Off then On then Off (depending on its current state)
  8. Type the command below in Terminal Emulator then press Enter
    Code:
    /system/bin/romdump
  9. Wait for the process to complete and you're done
  10. You'll find your files in a folder named romdump in the root of the SD card

Method 5:  ADB Method II


    Note: Only use this method for Boot and Recovery images, not for System image
    Also, you can use Terminal Emulator for this method instead of ADB

  1. Setup ADB (see https://forum.hovatek.com/thread-588.html  )
  2. Launch adb.exe (Open the adb folder > Hold Shift button > Right-click on any empty space > Select Open Command Window here)
  3. In the command window, type the following command then press Enter
    Code:
    adb shell
  4. If you're using Terminal emulator instead of ADB then type
    Code:
    su
    and Select Grant when prompted

  5. Type
    Code:
    cat proc/mtd
    or
    Code:
    cat proc/emmc
    depending on your phone type then press Enter

  6. You'll get an output similar to this:
    Code:
    dev:    size   erasesize  name
    mtd0: 000a0000 00020000 "misc"
    mtd1: 00480000 00020000 "recovery"
    mtd2: 00300000 00020000 "boot"
    mtd3: 0fa00000 00020000 "system"
    mtd4: 02800000 00020000 "cache"
    mtd5: 093a0000 00020000 "userdata"
  7. To dump the recovery image to your SD card, take note of the first word of the line which says “recovery” in the end. It is ‘mtd1’ in this example. Now use the command below, replacing ‘mtd1’ with the term that applies in your case, if different then press Enter:
    Code:
    dd if=/dev/mtd/mtd1 of=/sdcard/recovery.img bs=4096
  8. For boot image in this example, type the command below then press Enter
    Code:
    dd if=/dev/mtd/mtd2 of=/sdcard/boot.img bs=4096
  9. You should have your partition images dumped to the root of your SD card

Method 6: AIO Flasher Method


  1. Download AIO Flasher
  2. Launch it
  3. Enable USB debugging on the phone (Settings > Developer > Tick USB Debugging) and connect to PC via USB cord
  4. Go to The Backup / Restore tab
  5. Click on Install RomDump and ait till the log by the right shows
    Code:
    Pushing Romdump...
    Installed.

  6. Click Dump!
  7. Once complete, You'll find your files in a folder named romdump in the root of the SD card




Attached Files
.zip   romdump_v82b.zip (Size: 642.2 KB / Downloads: 381)
Need further assistance? Speak with a Hovatek Representative:
Working Hours: Mondays - Saturdays ; 09:00 - 18:00 (GMT +1:00)
Reply
#2
(This post was last modified: 10-29-2015, 03:37 AM by Drockstar. )
Boss after making this romdup or boot or recovery to the root directory of our sd card what should we Used the dump we have in the sd for?
Reply
#3
(10-29-2015, 03:35 AM)Drockstar Wrote: Boss after making this romdup or boot or recovery to the root directory of our sd card what should we Used the dump we have in the sd for?

To recover when bricked
Need further assistance? Speak with a Hovatek Representative:
Working Hours: Mondays - Saturdays ; 09:00 - 18:00 (GMT +1:00)
Reply
#4
(This post was last modified: 10-29-2015, 12:28 PM by Drockstar. )
Boss what is the dump of the boot, recovery used for specifically?

Sent from my Z3 using Hovatek mobile
Reply
#5
(10-29-2015, 11:13 AM)Drockstar Wrote: Boss what is the dump of the boot, recovery used for specifically?

Sent from my Z3 using Hovatek mobile

They're backups of parts of your ROM incase the phone gets bricked

Need further assistance? Speak with a Hovatek Representative:
Working Hours: Mondays - Saturdays ; 09:00 - 18:00 (GMT +1:00)
Reply
#6
So making a backup of the boot or recovery unbrick phone?

Sent from my Z3 using Hovatek mobile
Reply
#7
Attachments

Attached Files
.jpg   Mtk droid tools errors .jpg (Size: 448.53 KB / Downloads: 30)
.jpg   CDC SHA not found (1)_edit1.jpg (Size: 432.61 KB / Downloads: 14)
.jpg   CDC SHA not found _edit1_edit.jpg (Size: 385.88 KB / Downloads: 10)
Reply
#8
(10-29-2015, 07:32 PM)Drockstar Wrote: So making a backup of the boot or recovery unbrick phone?

Sent from my Z3 using Hovatek mobile

Only when they're the cause
Need further assistance? Speak with a Hovatek Representative:
Working Hours: Mondays - Saturdays ; 09:00 - 18:00 (GMT +1:00)
Reply
#9
What is the work of the boot? And recovery?

Sent from my Z3 using Hovatek mobile
Reply
#10
(10-30-2015, 01:36 PM)Drockstar Wrote: What is the work of the boot? And recovery?

Sent from my Z3 using Hovatek mobile

Boot contains the kernel
Recovery controls the recovery mode
Need further assistance? Speak with a Hovatek Representative:
Working Hours: Mondays - Saturdays ; 09:00 - 18:00 (GMT +1:00)
Reply










Users browsing this thread:
1 Guest(s)