Extracting boot image on HTC One XL no mtd?? - Android Q&A, Help & Troubleshooting

I only started android kernel dev less than a week ago, but I have managed to successfully modify and update the kernel for my HP touchpad without too many issues.
My issue now is I'm trying to update the kernel on my HTC One XL (AT&T One X), and reading through guides like (h ttp://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images), I need to make a copy of the boot image. However I can't find the boot image!?!?!
The following folder does not exist:
/dev/mtd
or
/proc/mtd
Am I missing something? I'm sure this is a total noob problem, but can't find a solution anywhere.
In my TWRP backup folder I have a 'boot.emmc.win' file, can I extract the boot img from this?
Any help would be great!!

DACcer said:
I only started android kernel dev less than a week ago, but I have managed to successfully modify and update the kernel for my HP touchpad without too many issues.
My issue now is I'm trying to update the kernel on my HTC One XL (AT&T One X), and reading through guides like (h ttp://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images), I need to make a copy of the boot image. However I can't find the boot image!?!?!
The following folder does not exist:
/dev/mtd
or
/proc/mtd
Am I missing something? I'm sure this is a total noob problem, but can't find a solution anywhere.
In my TWRP backup folder I have a 'boot.emmc.win' file, can I extract the boot img from this?
Any help would be great!!
Click to expand...
Click to collapse
It uses emmc now. To check your partitions you can use: adb shell cat /proc/emmc

blazingwolf said:
It uses emmc now. To check your partitions you can use: adb shell cat /proc/emmc
Click to expand...
Click to collapse
:victory: that works!!!
However, now that I can see mounts, how can I copy the required image? For instance the output is:
#cat /proc/mtd
dev: size erasesize name
mmcblk0p23: 000....0 000....000 "misc"
mmcblk0p22: 00500000 00020000 "recovery"
mmcblk0p21: 00280000 00020000 "boot"
etc.
cat /dev/emmc/mmcblk0p21 gives me a file not found error.
There is a '21' folder under /dev/emmc? Assume this is the image??

Something along the lines of this should work: dd if=/dev/block/mmcblk0p21 of=/sdcard/boot.img bs=4096
Make sure the info is correct for your device.

blazingwolf said:
Something along the lines of this should work: dd if=/dev/block/mmcblk0p21 of=/sdcard/boot.img bs=4096
Make sure the info is correct for your device.
Click to expand...
Click to collapse
Ahhhh, the dd command :highfive:
Cheers blazingwolf! Just tried it then, and worked perfectly. Didn't set the block size, but assuming that's okay

Related

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] How To Extract Stock Recovery.img From an android device

As the title suggests How To Extract Stock Recovery.img From an android device ?
Nishchay1 said:
As the title suggests How To Extract Stock Recovery.img From an android device ?
Click to expand...
Click to collapse
well its quite easy but it can get complicate if you have bml partition
if you have MTD partition then conect via adb shell or in terminal emulator type: cat/proc/mtd and press enter
you will see which is recovery partition and then type: dd if=/dev/mtd/mtd1 of=/sdcard/recovery.img (note that mtd1 you must replace with number which is recovery partition)
after that you will have recovery.img on your sd card
but if your file partition is BML in that case you have a problem.
What model is your cell phone ?
dvucino said:
well its quite easy but it can get complicate if you have bml partition
if you have MTD partition then conect via adb shell or in terminal emulator type: cat/proc/mtd and press enter
you will see which is recovery partition and then type: dd if=/dev/mtd/mtd1 of=/sdcard/recovery.img (note that mtd1 you must replace with number which is recovery partition)
after that you will have recovery.img on your sd card
but if your file partition is BML in that case you have a problem.
What model is your cell phone ?
Click to expand...
Click to collapse
I have a Karbonn A21 . And i dont know what partition do i have . Is there any way to know it ?
i typed cat/proc/mtd but it is showing sh: cat/proc/mtd: not found
Hi,
you need to put a SPACE character between cat and /proc/mtd...
So the correct command is
cat /proc/mtd
Regards
TheSSJ said:
Hi,
you need to put a SPACE character between cat and /proc/mtd...
So the correct command is
cat /proc/mtd
Regards
Click to expand...
Click to collapse
My hcl me u1 tab shows dev : size erasesize name
Means what?i have rooted my tab and i also want to make recovery for my tab.can you help me?
Sent from my GT-I5800 using Tapatalk 2
pratikmore said:
My hcl me u1 tab shows dev : size erasesize name
Means what?i have rooted my tab and i also want to make recovery for my tab.can you help me?
Sent from my GT-I5800 using Tapatalk 2
Click to expand...
Click to collapse
My Device also showing the same " dev : size erasesize name "
Which is the recovery partition ?
OK, that is very interesting!
There´s another possibility to make a backup:
you need SP Flash tool: chinamobiles.org/attachment.php?attachmentid=23720&d=1354147322
and MTK droid tools: http://chinamobiles.org/downloads.php?do=file&id=733
Open MTK droid tools, connect booted phone in Android and click on "blocks map". Switch to full screen mode and make a shortcut copy of all the shown datas. Best: Print that page, you´ll need it later.
Close MTK droid tools again.
Open Flash_tool.exe.
Go to read back and remove all entries if there are any.
Click an "add".
Double-click on entry. Change name "ROM_0" to first entry of you printed list, i.e. "PRELOADER".
click "save"
in next window let "HEX" and enter start adress and length of the list in HEX format (starts always with 0x...)
i.e. PRELOADER start adress 0x0, length 0x40000.
repeat "add" with all entries like DSP_BL, MBR, EBR1, PMT... in my example 19 entries.
Take care that all adresses and lenghts are correct!
at least push "read back"
SP Flash tool will create a backup.
It shows unknown rom structure,backup not possible,not showing anything when click to block info.plz help me...
Sent from my GT-I5800 using Tapatalk 2
In terminal emulator it shows
(1) + stopped (signal) system/bin/romdump
When i used romdump,it means???
Sent from my GT-I5800 using Tapatalk 2
I'm trying to make a backup of stock firmware on the UG007. When I run the ROM structure commands in adb shell, this is what I get
Code:
[email protected]:/ # cat /proc/mtd
cat /proc/mtd
dev: size erasesize name
mtd0: 00400000 00004000 "misc"
mtd1: 00800000 00004000 "kernel"
mtd2: 01000000 00004000 "boot"
mtd3: 01000000 00004000 "recovery"
mtd4: 18000000 00004000 "backup"
mtd5: 08000000 00004000 "cache"
mtd6: 20000000 00004000 "userdata"
mtd7: 00400000 00004000 "kpanic"
mtd8: 20000000 00004000 "system"
mtd9: 175000000 00004000 "user"
What partitions do I need and what is the extension that I need to use for each in this format?
example:
Code:
[email protected]:/ # dd if=/dev/mtd/mtd3 of=/sdcard/recovery.img
dd if=/dev/mtd/mtd3 of=/sdcard/recovery.img
32768+0 records in
32768+0 records out
16777216 bytes transferred in 0.817 secs (20535148 bytes/sec)
See above post of duvcno
Sent from my GT-I5800 using Tapatalk 2
I am able to get the recovery.img but what other partitions do I need in order to backup the stock firmware?
Sent From my Razr Maxx (iKreaM.4.1.2.AOKP) via Tapatalk 2
loociddreemr said:
I am able to get the recovery.img but what other partitions do I need in order to backup the stock firmware?
Sent From my Razr Maxx (iKreaM.4.1.2.AOKP) via Tapatalk 2
Click to expand...
Click to collapse
Friend,first make the cwm recovery with recovery builder using recovery.img,just google recovery builder.then with new cwm you can take a backup.
Sent from my GT-I5800 using Tapatalk 2
There are others with soft bricked devices. I was trying to create a flashable file for others to use. Will the CWM backup be useful for others? What would be the most useful format for ROM development?
Sent From my Razr Maxx (iKreaM.4.1.2.AOKP) via Tapatalk 2
You can convert any file format in .Zip by online or with some software,just take a backup of your stock rom with cwm.Your phone is based on Allwiner a10 or A13/rockchip based?
Sent from my GT-I5800 using Tapatalk 2
Yes, it's a mini-PC based on a Rockchip RK3066 A9
Sent From my Razr Maxx (iKreaM.4.1.2.AOKP) via Tapatalk 2
loociddreemr said:
Yes, it's a mini-PC based on a Rockchip RK3066 A9
Sent From my Razr Maxx (iKreaM.4.1.2.AOKP) via Tapatalk 2
Click to expand...
Click to collapse
Just visit here :-
http://forum.xda-developers.com/showthread.php?t=1734181
Also :- http://forum.xda-developers.com/showthread.php?t=1987393
Sent from my GT-I5800 using Tapatalk 2
Hey guys, sorry to bother you. Wonder if you guys can help:
I was trying to back up the rom (UG007). I tried connecting to a laptop but it was not detected, not even as a unknown USB device. I connected the UG007 with a USB extender cable (I guess it is called the B type-the big one) with a Male-Male gender changer at one end to the large USB port of a laptop. Also used the mini/micro usb to connect power and HDMI to the TV. I had the "connect to pc" checked and USB debugging on.
Am I doing anything wrong?
Thanks in advance.
install usb driver
Sent from my GT-I5800 using Tapatalk 2
pratikmore said:
install usb driver
Sent from my GT-I5800 using Tapatalk 2
Click to expand...
Click to collapse
Hi Pratikmore, thanks for your suggestion. I can only install the usb driver once the computer has detected the device.
Anyway, made it work. The trick is to connect your device with usb (both micro or the regular usb port work) and only then check the "connect to PC". After that the computer detects the new hardware and then install the usb driver.
Now I have to figure out how to backup the ROM in a relatively non-technical method. Any help?
Thanks

[Q]How to get system.img from nanodroid

I've tried using twrp and cwm to backup my system image but i havent been able to, with twrp i had system.ext4.win when i backed up only the system. Is their a tool or do i need to do it with adb ?
Thanks!
could you specify your phone/tablet model?
fantamedo said:
could you specify your phone/tablet model?
Click to expand...
Click to collapse
Galaxy s3
First make a full nandroid backup in CWMR, then on your phone navigate to mint/sdcard/clockworkmod then copy the folder of the backup you made (It should be the date of the backup by default) and transfer it to your computer. Once you transfer it to your computer open the backup folder and inside should be the system.img file.
You can also type these commands in terminal emulator to get your system.img:
Code:
su
dd if=/dev/block/mmcblk0p14 of=/mnt/sdcard/system.img bs=4096
Then just transfer the system.img from your sdcard to your computer. Let me know if you still have questions.
Sent from my SCH-I535 using xda premium
It didn't work with cwmr but I haven't tried out the terminal command
Sent from my SCH-I535 using xda premium
CovXX said:
It didn't work with cwmr but I haven't tried out the terminal command
Sent from my SCH-I535 using xda premium
Click to expand...
Click to collapse
Like I said try out the terminal command I suggested and let me know how it goes .
Sent from my SCH-I535 using xda premium
shimp208 said:
First make a full nandroid backup in CWMR, then on your phone navigate to mint/sdcard/clockworkmod then copy the folder of the backup you made (It should be the date of the backup by default) and transfer it to your computer. Once you transfer it to your computer open the backup folder and inside should be the system.img file.
You can also type these commands in terminal emulator to get your system.img:
Code:
su
dd if=/dev/block/mmcblk0p14 of=/mnt/sdcard/system.img bs=4096
Then just transfer the system.img from your sdcard to your computer. Let me know if you still have questions.
Sent from my SCH-I535 using xda premium
Click to expand...
Click to collapse
thanks man, just the command i was looking for, and it works like a charm.. :good:
So how about for a Razr M XT907 ? I ran the term command, but the img size was wayyy too small.
Find out what your system partition is and change command accordingly
Sent from my Nexus 4 using xda premium
livinginkaos said:
So how about for a Razr M XT907 ? I ran the term command, but the img size was wayyy too small.
Click to expand...
Click to collapse
You can find out your which partition your /system partition is by running the following commands either from terminal or adb shell as the root user:
Code:
ls -l /dev/block/platform/{your_platform_name_here}/by-name
For example on my Nexus 10 the platform name is "dw_mmc.0" so the command would look like:
Code:
ls -l /dev/block/platform/dw_mmc.0/by-name
To figure out your platform name first cd into the platform directory then list the contents of the platform directory to figure out what your platform name is:
Code:
cd /dev/block/platform/
ls
After you have then figured out what your platform name is you can run the command:
Code:
ls -l /dev/block/platform/{your_platform_name_here}/by-name
Once you have figured out your system partition you can dump it to your phones storage by running a command similar to:
Code:
cat /dev/block/block_of_system_partition > /mnt/sdcard/system.img
Let me know if you still have questions .
Awesome guys ! Thanks a bunch.
OK, so I have gotten the img. I've done it both ways with the dd and the cat. The image size comes up close to 1.5Gb. I know this is too large. The fastboot img file is normally in the 800-900 Mb range. Am I missing something here?
livinginkaos said:
OK, so I have gotten the img. I've done it both ways with the dd and the cat. The image size comes up close to 1.5Gb. I know this is too large. The fastboot img file is normally in the 800-900 Mb range. Am I missing something here?
Click to expand...
Click to collapse
Have you installed any additional system apps or placed any other files in the system folder? Because if you have modified the /system folder contents the file size will be greater then the normal 800-900 MB file range you listed since that file size if for an unmodified completely stock /system image.
Actually not really. I had done an erase data, roll back fxz, root, update and cache/dalvik wipe. Was trying to get a somewhat clean system.img
shimp208 said:
You can find out your which partition your /system partition is by running the following commands either from terminal or adb shell as the root user:
Code:
ls -l /dev/block/platform/{your_platform_name_here}/by-name
For example on my Nexus 10 the platform name is "dw_mmc.0" so the command would look like:
Code:
ls -l /dev/block/platform/dw_mmc.0/by-name
To figure out your platform name first cd into the platform directory then list the contents of the platform directory to figure out what your platform name is:
Code:
cd /dev/block/platform/
ls
After you have then figured out what your platform name is you can run the command:
Code:
ls -l /dev/block/platform/{your_platform_name_here}/by-name
Once you have figured out your system partition you can dump it to your phones storage by running a command similar to:
Code:
cat /dev/block/block_of_system_partition > /mnt/sdcard/system.img
Let me know if you still have questions .
Click to expand...
Click to collapse
When we come to Android 5.0 ages, we have new problems:
Method1 Using the dd we really can get the system.img, but in my 8994 device with busybox 1.23.1, it will 2.5GB fixed size, same as the system partition size.
so what I can found it works is , use sparsecoverter in this forum http://forum.xda-developers.com/showthread.php?t=2749797, we can remove the sparse bytes and make it a 1.4GB around and fastboot back to devices, that works fine, NOTE, that is not from dd nandroid backup. not from who only have TWRP and CWM backups;.
Method2 Using TWRP/CWM system.ext4.win/data.ext4.win, we can use
tar -xvf /storage/sdcard1/twrp/backup/abcd/2015-03-29-09-00-00/system.ext4.win
tar -xvf /storage/sdcard1/twrp/backup/abcd/2015-03-29-09-00-00/data.ext4.win
to gotten a folder, I run this on my target device under adb root and adb shell, but it will have many errors, tar remote link .... function not implement, so I think we need a cygwin according this post, but next step since Android 4.0 should be make_ext4fs, which will need a special build to avoid Permission Denied. which I still not success to finish it.
so, if Android successful tar -xvf and make_ext4fs story, please share here, thank you very much!
any news to help me forward?

[Ask] [Help] boot.img

hello guys. help me to get boot.img on my LG Magna (H502F) device. thanks before
You can try this
You could use the guidelines in this thread
http://forum.xda-developers.com/showthread.php?t=2450045
In my phone I couldn't list by name but if you use the cat commands in terminal Emulator with a rooted phone you can know the partition distribution in mmcblk0.
Hope this helps.
Here is described how to pull the files with the details remember first accessing to root privileges
vampirefo said:
Do you have a complete tutorial on how to do this? plus commands to restore? This would be great for us Linux users, I have two of these phones coming in from china and have zero desire to use windows to back up and restore a android device.
I think I got it figured out, wont know for sure until I get my phones to test.
Anyway basically I just
cat /proc/dumchar_info
this gives me partition info, from there I dd partition contents to sdcard, example below is to pull your recovery.img from the info you posted.
to pull eg backup
dd if=/dev/block/mmcblk0 of=/sdcard/recovery.img bs=4096 count=2560 skip=10112
to restore
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0 bs=4096 seek=10112
Click to expand...
Click to collapse
If=the directory you are going to read, of=the directory you are going to write, I recommend using your internal memory to avoid any problems, I did this using terminal Emulator and fx file manager with the root plug in to copy those files to the external_SD card
Where bs= blocks size, 4096 is fine, count= the number of blocks to copy and skip is the number of blocks that are omitted blocks copy

Where isBoot.img ?

I want to dump boot.img for flashing my kernel .
I've navigated in/dev/block/platform/sprd-sdhci.3/by-name folder
but there isn't boot.img . Have you given me advices? thanks you.
Is there a boot partition? It could also be named Kernel in some devices. You have to have root and use dd command.
adb shell
su
dd if=/.../by-name/boot (or kernel) of=/sdcard/boot.img
Sent from my KYOCERA-C6745 using Tapatalk
RealWelder said:
Is there a boot partition? It could also be named Kernel in some devices. You have to have root and use dd command.
adb shell
su
dd if=/.../by-name/boot (or kernel) of=/sdcard/boot.img
Click to expand...
Click to collapse
I have dumped it and see that its size is 15MB. But when i see boot.img in flashable rom files ,its size is only 5 MB.I'm wondering if that kernel file is also same as boot.img.
Nuttapat007 said:
I have dumped it and see that its size is 15MB. But when i see boot.img in flashable rom files ,its size is only 5 MB.I'm wondering if that kernel file is also same as boot.img.
Click to expand...
Click to collapse
When you dd it copies the entire partition size, including blank space. Totally normal. The new one wasn't done with dd command so the blank space isn't shown.
Sent from my KYOCERA-C6745 using Tapatalk
RealWelder said:
When you dd it copies the entire partition size, including blank space. Totally normal. The new one wasn't done with dd command so the blank space isn't shown.
Click to expand...
Click to collapse
Thanks you

Categories

Resources