I have just started taking interest in porting custom rom on an android device and it requires me to have a backup/dump of boot.img and recovery.img of my device. I have Sony Xperia E4 Dual (E2115).
Following are details about my device:
Kernel Build: 24.0.B.5.14
Processor: MT6582
Board: arima82_w_s_kk
Android Version: 4.4.4
/proc/dumchar_info:
Part_Name Size StartAddr Type MapTo
preloader 0x0000000000080000 0x0000000000000000 2 /dev/misc-sd
mbr 0x0000000000080000 0x0000000000000000 2 /dev/block/mmcblk0
ebr1 0x0000000000080000 0x0000000000080000 2 /dev/block/mmcblk0p1
pro_info 0x0000000000300000 0x0000000000100000 2 /dev/block/mmcblk0
nvram 0x0000000000500000 0x0000000000400000 2 /dev/block/mmcblk0
protect_f 0x0000000000a00000 0x0000000000900000 2 /dev/block/mmcblk0p2
protect_s 0x0000000000a00000 0x0000000001300000 2 /dev/block/mmcblk0p3
seccfg 0x0000000000020000 0x0000000001d00000 2 /dev/block/mmcblk0
uboot 0x0000000000080000 0x0000000001d20000 2 /dev/block/mmcblk0
ta 0x0000000000200000 0x0000000001da0000 2 /dev/block/mmcblk0
ltalabel 0x0000000001000000 0x0000000001fa0000 2 /dev/block/mmcblk0p4
fotakernel 0x0000000001400000 0x0000000002fa0000 2 /dev/block/mmcblk0
bootimg 0x0000000001400000 0x00000000043a0000 2 /dev/block/mmcblk0
sec_ro 0x0000000000600000 0x00000000057a0000 2 /dev/block/mmcblk0p5
misc 0x0000000000080000 0x0000000005da0000 2 /dev/block/mmcblk0
logo 0x0000000000300000 0x0000000005e20000 2 /dev/block/mmcblk0
ebr2 0x0000000000080000 0x0000000006120000 2 /dev/block/mmcblk0
expdb 0x0000000000080000 0x00000000061a0000 2 /dev/block/mmcblk0
tee1 0x0000000000080000 0x0000000006220000 2 /dev/block/mmcblk0
tee2 0x0000000000080000 0x00000000062a0000 2 /dev/block/mmcblk0
apps_log 0x0000000000800000 0x0000000006320000 2 /dev/block/mmcblk0p6
android 0x0000000083400000 0x0000000006b20000 2 /dev/block/mmcblk0p7
cache 0x000000000c800000 0x0000000089f20000 2 /dev/block/mmcblk0p8
usrdata 0x000000013a060000 0x0000000096720000 2 /dev/block/mmcblk0p9
bmtpool 0x0000000000000000 0xffffffffff3f00a8 2 /dev/block/mmcblk0
Part_Name:Partition name you should open;
Size:size of partition
StartAddr:Start Address of partition;
Type:Type of partition(MTD=1,EMMC=2)
MapTo:actual device you operate
As far as I know bootimg is what I am looking for. I converted the size and start address from hex to decimal and tried dumping it using:
dd if=/dev/block/mmcblk0 of=/sdcard/boot.img bs=4096 skip=17312 count=5210
But when I try to unpack it using unpackbootimg or other unpacking tools, I get an error stating that the boot.img is not a valid boot image. What am I missing here?
I have seen on the web that System images created using dd are not valid, but this is not the case with boot and recovery images and people have successfully dumped these partitions using this method. I am using Ubuntu and would love to know if there are other methods to achieve this.
ls -l /dev/block/platform/*/by-name/
? – Matthew Read Apr 3 '16 at 18:22find /dev -name "by-name"
– Matthew Read Apr 4 '16 at 8:23echo $((0x0000000001400000/4096))
=5120
not5210
– Charlie Gorichanaz Mar 12 '17 at 22:35