[Q]How to get system.img from nanodroid - Android Q&A, Help & Troubleshooting

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?

Related

[INFO] Backup the pds partition of your Atrix!

It is a wise idea to backup the /pds partition of your Atrix. It is /dev/block/mmcblk0p3. It holds very important information unique to the phone, like the wifi and bluetooth mac addresses. We still don't fully understand it, but it can resolve issues with the touchscreen not taking input properly. This has happened to a number of people, and now that everyone can have the unlock, I am sure people will do things that will cause the same problem.
Steps:
1. Pick your favorite method: adb, ssh, terminal emulator, etc
2. Become root if not already, REQUIRED
3. dd if=/dev/block/mmcblk0p3 of=/tmp/pds.img
4. Pick your favorite method to get the file off the phone: scp, sd card, etc
The file should be about 2mb. Keep it in a safe place.
edgan said:
It is a wise idea to backup the /pds partition of your Atrix. It is /dev/block/mmcblk0p3. It holds very important information unique to the phone. We still don't fully understand it, but it can resolve issues with the touchscreen not taking input properly. This has happened to a number of people, and now that everyone can have the unlock, I am sure people will do things that will cause the same problem.
Steps:
1. Pick your favorite method: adb, ssh, terminal emulator, etc
2. Become root if not already, REQUIRED
3. dd if=/dev/block/mmcblk0p3 of=/tmp/pds.img
4. Pick your favorite method to get the file off the phone: scp, sd card, etc
The file should be about 2mb. Keep it in a safe place.
Click to expand...
Click to collapse
Everyone can't have the Unlock... Bell is denied for now.
This is sweet though. Thanks for the tip.
Can Root Explorer be used to do this?
no pds is mounted but root exp sees an empty partition, btw would be possible to know which files exactly are in the directory?
me and others messed up this partition using tenfar's recovery, now we have problem with temp throttling, i guess (cpu reaches only 50% of max freq)
Once you go through steps 1 to 3, you can go to /tmp in root explorer and copy pds.img file to sdcard or wherever you want to copy the pds file
Uhhh, is this still possible to back up after unlocking and flashing the 2.3.4 build?
Sent from my MB860 using XDA App
neer2005 said:
Uhhh, is this still possible to back up after unlocking and I flashing the 2.3.4 build?
Sent from my MB860 using XDA App
Click to expand...
Click to collapse
I don't see any reason why you wouldn't be able to.
Screwed up my PDS on my old Atrix. Made sure to immediately back mine up when I got a new one too lol
Backed up the pds file to my ext-sd card using adb shell and got a 2.00mb file. Is this right?
Thanks for the info!
yes
now share it
Thanks I just make a backup image... but how do you restore it?
dd if=/tmp/pds.img of=/dev/block/mmcblk0p3
edgan said:
It is a wise idea to backup the /pds partition of your Atrix. It is /dev/block/mmcblk0p3. It holds very important information unique to the phone. We still don't fully understand it, but it can resolve issues with the touchscreen not taking input properly. This has happened to a number of people, and now that everyone can have the unlock, I am sure people will do things that will cause the same problem.
Steps:
1. Pick your favorite method: adb, ssh, terminal emulator, etc
2. Become root if not already, REQUIRED
3. dd if=/dev/block/mmcblk0p3 of=/tmp/pds.img
4. Pick your favorite method to get the file off the phone: scp, sd card, etc
The file should be about 2mb. Keep it in a safe place.
Click to expand...
Click to collapse
i cant seem to find the file once i created it!
ok, seems simple enough, but stupid question... can someone explain the commands "dd=" and "of=".
I was able to see the file @ dev/block with winscp but how do I convert it to a .img file, etc.
Thanks for your help.
samcripp said:
i cant seem to find the file once i created it!
Click to expand...
Click to collapse
It's in /tmp.
I suggest people use this command:
*MicroSD Installed*
dd if=/dev/block/mmcblk0p3 of=/sdcard-ext/pds.img
*No MicroSD Installed*
dd if=/dev/block/mmcblk0p3 of=/sdcard/pds.img
These commands will create the pds.img file in the root directory of your MicroSD or your Internal SD card respectively.
What is pdf partition?
I believe and if I am wrong I am sure someone will correct me but
dd = I'm not sure
if = input file
of = output file
dd essentially takes a disk and copies it.
Sent from my MB860 using Tapatalk
Not to sound newbish, but I am, I keep getting Cannot Open for Read: Permission Denied
Could someone assist? Thanks.
Realized:
SU is what I needed to type, methinks...will try.
Worked:
Yeah, once I put SU and got that done, it worked out.
_Dennis_ said:
I believe and if I am wrong I am sure someone will correct me but
dd = I'm not sure
if = input file
of = output file
dd essentially takes a disk and copies it.
Sent from my MB860 using Tapatalk
Click to expand...
Click to collapse
From Wikipedia: "dd is a common Unix program whose primary purpose is the low-level copying and conversion of raw data............. dd can also be used to copy regions of raw device files, e.g. backing up the boot sector of a hard disk, or to read fixed amounts of data from special files like /dev/zero or /dev/random.[4]"
So, I am a n00b on using adb (etc..) so I will explain the way I did it using adb.
1. Make sure you have adb.exe installed on your computer and connect the phone to the computer. (I got my adb.exe from the Gladroot script. Here is a link: http://goo.gl/jHiJc)
2. Open a command window
3. Browse to the directory where the adb.exe is and type the following (press enter after each line):
adb shell
su
dd if=/dev/block/mmcblk0p3 of=/sdcard-ext/pds.img
Now, if you DON'T have a SDcard in your phone, take out the "-ext" from that last line.
The file (pds.img) should now be in either the internal sdcard or on your physical sdcard, as nexxusty described.
I hope that helps some as it took me a while to learn this.
Sorry if this is too noob for some, but I started from zero knowledge of this
garekinokami said:
Not to sound newbish, but I am, I keep getting Cannot Open for Read: Permission Denied
Could someone assist? Thanks.
Click to expand...
Click to collapse
Only thing I can think of is if you didn't give ADB superuser permission. You have to physically click allow on the phone after you type "su". Could that be it?
wirednix said:
Only thing I can think of is if you didn't give ADB superuser permission. You have to physically click allow on the phone after you type "su". Could that be it?
Click to expand...
Click to collapse
Lol Yes. 10 Char.
Aye I know what it IS....not what dd MEANS lol. Thank you for the guide.....I completed this in terminal emulator.

[SOLVED][$300][BOUNTY] Making your own PG05IMG, Flashing Roms with ADB

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

[HOW-TO] (YP-G1) Create FULL personal backups for complete restore from a brick

Hi everyone,
I made this guide for users of a Galaxy Player 4.0 USA or INTL who want to get backups of every partition in case they completely brick their device. This will be very useful if you have somehow screwed up your partitions beyond just /system, which is what most ROMs only include. It even backs up /efs, which contains the serial numbers unique to every player and other things that even complete restore ROMs and nandroid backups don't include. It's also good to just have a backup of your partitions stored somewhere safe, because you never know when you might need them. Also, if you're reverting from CM7 (the second release or later) you will need to use this with a PIT file because CM7 uses MTD partitions. Basically, flashing this backup will allow you to completely return to how your device was before, including all your personal data and apps. Hopefully soon we'll begin to have less "bricked my player help" threads clogging up the General (and sometimes Dev) sections. Enjoy
This backup does not back up bootloaders, which can increase your chances of a hard-brick and are almost never needed. Also, this is for the YP-G1 / Player 4.0 USA or INTL only, not for 5.0 users.
Disclaimer: I am not responsible for your device if anything happens blah blah blah
*Pre-requisites*
- Rooted device or ROM
- Busybox (Most rooted ROMs have this, but you can still download Busybox Installer from the Play Store and update to the latest busybox version just to make sure)
- ADB properly set up
- Some space on your internal SD card (about 1-2 GBs should be fine)
- Player set to "USB Debugging Mode" found in Settings
Alright, let's begin. First we will need to make a dump of every partition on the device. However, dumping the PIT is not needed because Adamoutler has a thread with a master list of PITs. Open a Command Prompt (or Terminal if you're using Linux), make sure your device is connected and type:
Code:
adb remount
adb shell
su
Now, to back up EFS:
Code:
dd if=/dev/block/stl3 of=/sdcard/efs.rfs bs=4096
PARAM
Code:
dd if=/dev/block/stl6 of=/sdcard/param.lfs bs=4096
KERNEL
Code:
dd if=/dev/block/bml7 of=/sdcard/zImage bs=4096
SYSTEM
Code:
dd if=/dev/block/stl9 of=/sdcard/factoryfs.rfs bs=4096
DBDATA
Code:
dd if=/dev/block/stl10 of=/sdcard/dbdata.rfs bs=4096
CACHE
Code:
dd if=/dev/block/stl11 of=/sdcard/cache.rfs bs=4096
DATA (Optional if you want your apps)
Code:
tar -czvf /sdcard/data.tar.gz /data
You can exit out of the current window and open a new one once all the processes above are completed.
Now to pull all of the backups to your computer:
Code:
adb remount
adb pull /sdcard/efs.rfs
adb pull /sdcard/param.lfs
adb pull /sdcard/zImage
adb pull /sdcard/factoryfs.rfs
adb pull /sdcard/dbdata.rfs
adb pull /sdcard/cache.rfs
adb pull /sdcard/data.tar.gz
I recommend keeping these files in a safe place on your hard drive for when you need to use them. Feel free to delete them from your player now to save space.
How to Flash
First grab the correct PIT for your device here
For Heimdall, just load the PIT, click "Re-Partition", and select the correct files for each partition. Then click flash.
For ODIN, you have to tar the files together first.
Using Cygwin or Terminal, browse to the directory where all your backup files are. Then, type in:
Code:
tar -H ustar -c efs.rfs param.lfs zImage factoryfs.rfs dbdata.rfs cache.rfs > backup_package.tar
Now load the PIT, click "Re-Partition", and under the PDA section browse to your backup_package.tar (or whatever you named it to). Click flash.
After it is done flashing, here's how to restore your apps. Open Terminal or Command Prompt to the directory of data.tar.gz on your computer:
Code:
adb remount
adb push data.tar.gz /sdcard/
adb shell su -c "tar -zxvf /sdcard/data.tar.gz"
And you're done! If all goes well you should have completely restored your device, with a perfectly safe method and no bootloaders! I hope that this will be helpful to people.
Reserved for future use....
I did this, and i believe that AdamOutlers .pit is what messed up my device. Can you please give me a copy of your or another copy?
Tcollins412 said:
I did this, and i believe that AdamOutlers .pit is what messed up my device. Can you please give me a copy of your or another copy?
Click to expand...
Click to collapse
AdamOutler's pit is not messed up... I used it to repartition my player and it worked perfectly with the right partitions.
Sent using Tapatalk
when i tried it, it messed up my player. do you know how i could fix it?
Hey klin1344, not sure if you still watch this thread, but I was wondering if anyone has had success using heimdall 1.3.2 with the 4.0? I see it says it broke compatibility with some devices.
iJimaniac said:
Hey klin1344, not sure if you still watch this thread, but I was wondering if anyone has had success using heimdall 1.3.2 with the 4.0? I see it says it broke compatibility with some devices.
Click to expand...
Click to collapse
No problem for me
i wanted to use this method to backup my /efs (like daniel advicd me to do ) but i cant seem to do it. It says Can't open 'sdcard/efs.rfs': Read only file system
pls answer
crancpiti said:
i wanted to use this method to backup my /efs (like daniel advicd me to do ) but i cant seem to do it. It says Can't open 'sdcard/efs.rfs': Read only file system
pls answer
Click to expand...
Click to collapse
You have to be rooted to do this.
Sent from my A500 using xda app-developers app
klin1344 said:
You have to be rooted to do this.
Sent from my A500 using xda app-developers app
Click to expand...
Click to collapse
i think either i hadnt BuSY box installed(my device was rooted before) or it was bcause i connected my device to the PC / i mounted my sdcards
now i have a efs.rfs file and that should do it i hope
thanks . i have problem with heimdall to download my wifi 4 int PIt file
is there any ADB command for downloading pit file from device?
aminking2005 said:
thanks . i have problem with heimdall to download my wifi 4 int PIt file
is there any ADB command for downloading pit file from device?
Click to expand...
Click to collapse
I do remember that there is the dd command from the adb shell in order to get your pit, but it's not the recommended way to get it.
You can download the pit files right here:
http://forum.xda-developers.com/showthread.php?t=1531850
zaclimon said:
I do remember that there is the dd command from the adb shell in order to get your pit, but it's not the recommended way to get it.
You can download the pit files right here:
http://forum.xda-developers.com/showthread.php?t=1531850
Click to expand...
Click to collapse
most pit file are represented for wifi4 8GB . but mine is 16GB.
so im not sure about pit files in forum.
if i install a custom rom and it faild can i recover my yp-g1 by having above backups?
aminking2005 said:
most pit file are represented for wifi4 8GB . but mine is 16GB.
so im not sure about pit files in forum.
if i install a custom rom and it faild can i recover my yp-g1 by having above backups?
Click to expand...
Click to collapse
Sorry for the long reply time, and yeah you should be able to restore with those backups.
Envoyé de mon Nexus 4 en utilisant Tapatalk

[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

Summoning Those with T-Mobile V521!

I'm trying to make an AOSP ROM, and while doing so, I now have a dysfunctional bootloader. If your tablet is rooted, please duplicate the boot.img from your system and share it with me. Would very much appreciate.
Instructions:
Use CMD and paste these 2 lines:
adb shell "dd if=/dev/block/platform/soc.0/by-name/boot of=/sdcard/boot.img"
adb pull /sdcard/boot.img
Then from ADB directory, upload to somewhere easily accessible.
Does it matter if we have updated to 7.0 or not? I'm rooted and have updated to 7.0 and would be happy to help.
That would actually be a good idea. The ROM is supposed to be 7.0.0 anyways.
Running the first command comes up as " no such file or directory"
Do you already have ADB?
mr_verystock said:
Do you already have ADB?
Click to expand...
Click to collapse
Yep. I do adb devices to make sure it recognizes the tablet and all is good there.
Maybe so I'm the same page i just open up ADB as normal : open the command prompt in my platform tools. I paste the first line in : adb shell "dd if=/dev/block/platform/soc.0/by-name/boot of=/sdcard/boot.img" I get no file or directory.
Unable to get the dumb file:
adb shell "dd if=/dev/block/platform/soc.0/by-name/boot of=/sdcard/boot.img"
dd: /dev/block/platform/soc.0/by-name/boot: No such file or directory
Edit: does a backup from the recovery could make the task done ? I backup the boot from the TWRP and I get a file of 32Mb with the name: boot.emmc.win
adb shell
cd /dev/block/platform
ls
And tell me the output. I appreciate your help!
mr_verystock said:
adb shell
cd /dev/block/platform
ls
And tell me the output. I appreciate your help!
Click to expand...
Click to collapse
Nothing, it returns an empty result
Unusual... Normally there's soc.0 or msm_sdcc.1.
mr_verystock said:
Unusual... Normally there's soc.0 or msm_sdcc.1.
Click to expand...
Click to collapse
That command never worked for me on this tablet. Yes the default kernels is 32mb.
You can get it from twrp backup as .win and then rename it (if it is not compressed) or use AUT or SuperR's kitchen to obtain it.
Another method would be flashifire>backup.
Im still on MM so I can not help you.
Try these: https://drive.google.com/file/d/0Bz54O_w1LEYpQ1k0aDVHX29NbkE/view?usp=sharing
the rooted files I grabbed from TWRP backup, should be idential to the ones get using dd method.
the stock files I extracted from stock kdz file using WindowsLGFirmwareExtract-1.2.6.1-Release

Categories

Resources