[Q] Can I use nanddump raw nand dump .img to restore from Recovery or FastBoot? - Android Q&A, Help & Troubleshooting

I am a novice in Android and even in Tablets. I bought my first Android tablet on 18th this month, and I was curious to have backups as the Company has provided nothing at all, no backup stock images. I rooted the device, and installed ClockWorkMod Recovery, and I created backups. I have not flashed any mod/upgrade in Tablet till now and it works fine. I created nanddump oob images of all partitions from /proc/mtd. All these images are raw nand dump images, of partitions. For emergency uses and knowledge, can I flash these nanddump dumped images via FastBoot or via Custom Recovery? Will it work? Please help.

aroratushar said:
I am a novice in Android and even in Tablets. I bought my first Android tablet on 18th this month, and I was curious to have backups as the Company has provided nothing at all, no backup stock images. I rooted the device, and installed ClockWorkMod Recovery, and I created backups. I have not flashed any mod/upgrade in Tablet till now and it works fine. I created nanddump oob images of all partitions from /proc/mtd. All these images are raw nand dump images, of partitions. For emergency uses and knowledge, can I flash these nanddump dumped images via FastBoot or via Custom Recovery? Will it work? Please help.
Click to expand...
Click to collapse
Should be as simple as this:
Find the dev block of the system partition
cat /proc/mounts
Example: system partitopn is in /dev/block/mmcblk0p16
Make a copy of the system partition:
dd if=/dev/block/mmcblk0p16 of=/sdcard/system.img
Copy f/sdcard/system.img rom your phone to PC
Connect your other phone in fastboot mode and flash the created system.img
fastboot flash system system.img

Related

CWM Recovery Test for MediaPad

CWM 5.8.0.9 for Huawei MediaPad
WARNING !!! DON'T FORMAT AND DON'T WIPE PARTITIONS USING THESE CWM !
I don't know how much this CWM version improves over the existing one by segler11.
However these build were more aimed at compiling and testing the new kernel sources.
I have tested compiling with both arm-eabi-4.4.0 and arm-eabi-4.4.3 with success on Ubuntu 10.04.
This is experimental, however with the new kernel sources it will just be a matter of time.
I have compiled the kernel included in this CWM recovery image but I didn't recompile the complete image.
I took as base Pyramid CWM 5.8.0.9 and I replaced the files from those found on a stock C232B005 kernel.
As the default build configuration I have used the /proc/config.gz of a C232B005 running kernel.
I have tested this CWM to be able to backup these partitions (I have not tested "restore" yet, just checked the tar archives):
boot.img - 12.582.912 (match 12Mb)
recovery.img - 16.777.216 (match 16Mb)
data.ext4.tar
cache.ext4.tar
system.ext4.tar
custom.ext4.tar
as you can see my hand tweaks to "recovery" require the name of "cust" partition to be "custom" instead but I believe this is a no issue while you backup and restore with the same CWM. Suggestions welcome.
BUGS:
data & time on archives are wrong
mount USB storage does not work
adb not enabled in recovery mode
Formats and Wipes do not work don't use them
The "busybox hwclock" applet doesn't work to set the hardware clock of our device.
The "adb shell" is not active while in CWM recovery, I don't know why and this was my objective so if you have suggestion please help.
As usual flash both "recovery" and "recovery2" partitions using "fastboot" and one of the attached CWM recovery:
Code:
fastboot flash recovery recovery-5.8.0.9-HWMOD-eabi-4.4.3.img
fastboot flash recovery2 recovery-5.8.0.9-HWMOD-eabi-4.4.3.img
fastboot reboot
WARNING !!! DON'T FORMAT AND DON'T WIPE PARTITIONS USING THESE CWM !
.:HWMOD:.
.
Reserved CWM HWMOD
This version seemed to work better for me.Tnx dude!
john9 said:
This version seemed to work better for me.Tnx dude!
Click to expand...
Click to collapse
Thank you for trying it.
Remember to absolutely avoid formatting or wiping partitions.
If you need to format/wipe do it ONLY after reinstalling the original "recovery.img" in both "recovery" and "recovery2" partitions and then reset the device from:
"Settings -> Backup and reset -> Factory reset"
ATTENTION !!! You can safely do a wipe or factory reset only after reinstalling the original recovery image.
Sorry for insisting but I don't want to create problems on users devices and I know those operations will create problems.
.:HWMOD:.
Just a note: I used your 4.4.3 version to try making a nandroid backup last night. Good news and bad news.
This morning I inspected the result using the app Nandroid Browser.
Good: Your CWM does successfully backup /data/data. The other CWM that had been posted here did not do so properly.
Bad: Your CWM also backs up the entire internal SD storage contents inside the folder /data/share. It is customary *not* to include this in a nandroid backup because a) you don't want to inflate the file size unnecessarily, and b) you don't want to overwrite the internal SD on a restore.
Idea: After you fix it, and until you manage to get ADB over USB working, maybe you could add a menu option to make a separate backup archive of internal SD to external SD. This would allow a route to save the internal storage if the device becomes unbootable and requires a data wipe.
cmstlist said:
Just a note: I used your 4.4.3 version to try making a nandroid backup last night. Good news and bad news.
This morning I inspected the result using the app Nandroid Browser.
Good: Your CWM does successfully backup /data/data. The other CWM that had been posted here did not do so properly.
Bad: Your CWM also backs up the entire internal SD storage contents inside the folder /data/share. It is customary *not* to include this in a nandroid backup because a) you don't want to inflate the file size unnecessarily, and b) you don't want to overwrite the internal SD on a restore.
Idea: After you fix it, and until you manage to get ADB over USB working, maybe you could add a menu option to make a separate backup archive of internal SD to external SD. This would allow a route to save the internal storage if the device becomes unbootable and requires a data wipe.
Click to expand...
Click to collapse
Thank you for trying it. I wanted to compile/test a kernel with new sources in a CWM.
Yes, in our device the internal memory "/mnt/sdcard" is also mapped under "/data/share".
Unfortunately I don't have the skills (yet) to build a complete recovery image from scratch,
so what I did was just compiling the kernel part of the recovery image, using the new sources.
Then I simply hex tweaked the "recovery" executable of a 5.8.0.9 Pyramid CWM (HTC Sensation).
So, in conclusion, I have no control over what is copied during the backup process of those partitions.
Though I could control which partition is processed by removing them from "fstab", but there is no gain into it.
We will have to wait somebody with the specific knowledge, or maybe I will have some time to learn once I return from holidays.
.:HWMOD:.
Today i have builded bootable CWM 5.5.0.4 from sources, so now we can adjust all what we need
after_silence said:
Today i have builded bootable CWM 5.5.0.4 from sources, so now we can adjust all what we need
Click to expand...
Click to collapse
well done
HI, can anyone share buckup from working device created by CWM.?
Thanks to all.
Hi,
Is it possible to flash update zips from this CWM recovery (like Beats Audio which is in flashable zip format)?
I don't want to use it for backup-recovery.
...and how about doing wipe cache and wipe dalvik cache?
.dredd. said:
Hi,
Is it possible to flash update zips from this CWM recovery (like Beats Audio which is in flashable zip format)?
I don't want to use it for backup-recovery.
...and how about doing wipe cache and wipe dalvik cache?
Click to expand...
Click to collapse
Haven't tried installing a ".zip" archive from CWM but it should work.
Avoid "wiping" and/or "formatting" partitions, they will be messed up.
hwmod said:
Haven't tried installing a ".zip" archive from CWM but it should work.
Avoid "wiping" and/or "formatting" partitions, they will be messed up.
Click to expand...
Click to collapse
The main reason for use of CWM would be to have the possibility of flashing update zips from CWM... but I am afraid of messing up my device... to understand: no problem if I have to reflash the rom but I would not want to cause mistake which could be repaired only by service.
fastboot is always available if something goes wrong and if you flash cwm you wont be able to install official roms because cwm will overwrite stock recovery
so i was stupid and wiped data and cache - then remembered that it said not to - how do i fix this paperweight? i tried fastbooting all the usual partitions (system, boot, userdata, cache, etc) but still nothing - i can get to fastboot but i cant flash any dload updates. any suggestions are greatly appreciated.
flash stock recovery (2 files) from zipped rom via fastboot and then you should be able to flash stock rom
flashed three different stock recoveries to recovery and recovery2 - still only get the media pad logo twice (flashed androidani intl rom before bricking) cant boot to recovery - think the partition table is screwed. is there a way to create partitions from fastboot, and if so, still would be nice to know the names of the partitions to flash as referenced in tmo stock thread.
byt3b0mb said:
flashed three different stock recoveries to recovery and recovery2 - still only get the media pad logo twice (flashed androidani intl rom before bricking) cant boot to recovery - think the partition table is screwed. is there a way to create partitions from fastboot, and if so, still would be nice to know the names of the partitions to flash as referenced in tmo stock thread.
Click to expand...
Click to collapse
The time needed to reformat and rewrite all the firmware partitions (the first time) will be between 10-15 minutes.
Be patient and give enough time to the device to execute all the needed processes.
When the device finally boot it need to completely regenerate dalvik-cache (the first time).
So try again as instructed above, rewrite "BOTH" partitions named "recovery" and "recovery2", both using the same "recovery.img" file found in the latest stock Huawei firmware.
Now extract the stock Huawei firmware archive on your PC and copy the "dload" folder on an empty formatted SDCard, then insert the SDCard in the MediaPad reboot it and wait until success or failure message.
If you wiped partitions you will have to wait more time (20-30m). It may be that after waiting a while a message about "Encryption not possible" could appear, just say no to encryption and let it reset the device.
It already happened to some of us so hope you are also able to recover your tablet.
thanks i will give it a shot - while it is rewriting partitions, should it be on the huawei logo? or should i see the android / gears turning?
byt3b0mb said:
thanks i will give it a shot - while it is rewriting partitions, should it be on the huawei logo? or should i see the android / gears turning?
Click to expand...
Click to collapse
First time restoration takes time on both moments during the 1st Huawei log and even during animation.
Trying to recover a partition that was wiped takes much longer for the OS to show the error.
When I tried wiping "data" and rebooted the device I recall I went for a long walk and when I returned the device was showing the "Encryption failure / Reset" message (about half an hour later).
So I can only suggest that when you retry you wait at least that amount of time (30 min.) with charger connected, whatever happens leave it alone until it display or ask you do something. Let me know if it works when you have tried.
Download links do not work for me. Can you upload in mediafire please?

S III efs missing not booting

Dear Friends,
Need help please. I have installed another custom rom that was not meant for I9300 and now the EFS is corrupted. I tried installing orignal rom using ODIN but geting boot loop and the phone is not booting. On going into recovery i can see an error efs/ corupted or something like that. I have the backup of my EFS folder in tar.gz format however dont know how to install the same and recover my phone as not able to boot to android.
Please help me if someone can work it out. My phone has just 3 days of warranty left and it does not shows rooted anywhere except the count of installation is about 32 and rom says official and kernel says custom.
Please if someone can help me restore my phone back in working condition i shall always remain thankfull.
Regards,
Mush
mush2004 said:
Dear Friends,
Need help please. I have installed another custom rom that was not meant for I9300 and now the EFS is corrupted. I tried installing orignal rom using ODIN but geting boot loop and the phone is not booting. On going into recovery i can see an error efs/ corupted or something like that. I have the backup of my EFS folder in tar.gz format however dont know how to install the same and recover my phone as not able to boot to android.
Please help me if someone can work it out. My phone has just 3 days of warranty left and it does not shows rooted anywhere except the count of installation is about 32 and rom says official and kernel says custom.
Please if someone can help me restore my phone back in working condition i shall always remain thankfull.
Regards,
Mush
Click to expand...
Click to collapse
It is essential that you have a backup of the EFS partition and a way to place it back - the first two ways that I would think about are:
a) use a good recovery - like Philz recovery, that has commands to restore EFS
b) if the format of the backup is not exactly right you might be able to boot in recovery and use ADB commands.
xclub_101 said:
It is essential that you have a backup of the EFS partition and a way to place it back - the first two ways that I would think about are:
a) use a good recovery - like Philz recovery, that has commands to restore EFS
b) if the format of the backup is not exactly right you might be able to boot in recovery and use ADB commands.
Click to expand...
Click to collapse
Code:
su
umount /efs
dd if=/sdcard/efs.img of=/dev/block/mmcblk0p1 bs=4096
reboot
Ver3go said:
Code:
su
umount /efs
dd if=/sdcard/efs.img of=/dev/block/mmcblk0p1 bs=4096
reboot
Click to expand...
Click to collapse
I am new to adb commands. Will phylz recovery help me enter the commands? if yes then i shall be replying with the sd card efs tar file name. Will then you be able to guide me with the commands based on the tar file?
Thanks all of you in advance.
Mush
mush2004 said:
I am new to adb commands. Will phylz recovery help me enter the commands? if yes then i shall be replying with the sd card efs tar file name. Will then you be able to guide me with the commands based on the tar file?
Thanks all of you in advance.
Mush
Click to expand...
Click to collapse
No for ADB you boot into recovery, connect your computer via USB and run the ADB commands from either Linux Terminal or Windows Command Prompt.
The tool here:
http://forum.xda-developers.com/showthread.php?t=1703488
May help if you're new to adb.
Otherwise it's a case of downloading and installing the drivers for your phone and the Android SDK http://developer.android.com/sdk/index.html
Thanks for all your replies.
Just wanted to confirm if i have the efs backup in sd card as under folder backup_efs and there are two files in tar.gz format will i be able to use the phylz recovery to use this replace my efs folder? if yes then can you guide me the steps please.
Regards,
Mush
mush2004 said:
Thanks for all your replies.
Just wanted to confirm if i have the efs backup in sd card as under folder backup_efs and there are two files in tar.gz format will i be able to use the phylz recovery to use this replace my efs folder? if yes then can you guide me the steps please.
Regards,
Mush
Click to expand...
Click to collapse
I do not remember right now what creates an backup_efs folder but it really does not matter that much - the tar.gz is a "file archive" and .img is usually a partition image. Each could have minor advantages - the .img also contains the entire filesystem of the partition (and will work easier if the filesystem is bonked) but a tar.gz backup is more versatile when you have bad sectors or a changed partition.
Under an advanced recovery like Philz you would just navigate some menus and try to restore the EFS - see the info in those specific threads.
Under ADB you need to have stuff (drivers and some programs) installed in your PC, you connect the phone on USB and you run ADB commands from the command line.

how to buckup system.img & persist & boot with out recovery ?

how to buckup system.img & persist & boot with out recovery ?
my phone hisense u971
Need Make Full Damp
Well, I don't know the partition sheme of your device, but in general you could you use dd in shell to make img-files of the partitions you want to backup and then pull them with adb to your pc.
In this thread the scenario is described for another device, with another partition sheme, but it may give you some hints
Any One Help Me TO Backup System

Making a stock based rom out of a dd backup problem

I made a dd backup of system into system.img, unpacked system, and got all the files, done all changes i had to do and flashed the system, but it doesnt boot! The device is the Acer Predator 8, it has root, TWRP 3.0.2 and bootloader is unlocked and its also using an unsecured boot.img... The changes ive made to the stockbasedrom were minimal, just to make it boot.. what could it be? i noticed a weird folder that is inckuded in dd backup while system on device doesnt show, its a [SYS] folder with a file inside about 70mb, called journal, what is it? could that be the reason to why its not booting? since ive made other stock based roms for other devices and never had the issue.. Please help me..

Flash boot.img using TWRP openrecoveryscript

Hey,
is there a simple way to flash a new kernel / boot.img using TWRP by script / openrecoveryscript? I can select "Install Image" in the UI and flash the boot.img just fine, but I want to script that so I can flash devices easily or even remotely just by uploading the openrecoveryscript and the image to flash.
The documentation at https://twrp.me/faq/openrecoveryscript.html is pretty useless, it doesn't even mention that '/cache/recovery/openrecoveryscript' will be executed by TWRP.
The install command expects a zip file, the restore command a TWRP backup.
Any ideas? Thx
TWRP's OpenRecoveryScript ( read: command line ) support is great.
It's source code here:
Team-Win-Recovery-Project/openrecoveryscript.cpp at android-5.0 ยท TeamWin/Team-Win-Recovery-Project
Core recovery files for the Team Win Recovery Project (T.W.R.P) - this is not up to date, please see https://github.com/TeamWin/android_bootable_recovery/ - Team-Win-Recovery-Project/openrecoverysc...
github.com
IMO the mentioned TWRP recovery command line guide isn't useless as you claim.
Using a simple text file, saved in the /cache/recovery/ directory with the name openrecoveryscript, the TWRP recovery can be instructed to execute the described set of commands during the startup, e.g. the installation of a ZIP archive such as a ROM, or the deletion of a partition.
@jwoegerbauer I think you want to refer to https://github.com/TeamWin/android_bootable_recovery/blob/android-10.0/openrecoveryscript.cpp instead, as https://github.com/TeamWin/Team-Win-Recovery-Project ist not maintained if I understand it correctly.
However, I don't want to read the source to find out how to (not) flash a boot.img using TWRP without the UI.
If I understand the docs correctly, TWRP does not support flashing images. It supports restoring backups and installing zips.
I've also tried to find out if there is an easy way to convert the boot.img to an installable zip or TWRP recovery, but so far I've not succeeded.
Do you know an answer to this?
Use Fastboot to flash boot.img
I can't use fastboot as the device (Samsung) does not support it and it would also require physical access.
So far my workflow is to flash the image to a device I have by hand (manually), create a backup of the boot partition with TWRP (manually), download it and then deploy the backup to remote devices via adb and restore them on reboot via the openrecoveryscript.
My workflow would be simplified if could remove the need for the manual process that creates an image/backup that can be flashed remotely.
Well, I found a simpler way to flash the kernel / boot.img directly within the os. I can simply overwrite the partition:
adb push boot.img /sdcard/boot.img
adb shell su -c "dd if=/sdcard/boot.img of=/dev/block/mmcblk0p14"
Don't even have to reboot the device...
For those wondering from where to get the block-device... See ls -l /dev/block/platform/msm_sdcc.1/by-name/ ("msm_sdcc.1" part may be different)

Categories

Resources