[Q] Dumping entire internal storage? - Android Q&A, Help & Troubleshooting

hi guys,
I've been a fool and balls up a note 10.1 (n8010).
I've got a 2nd device and was wondering if I could simply do a
Code:
dd if=/dev/block/mmcblk0 of=/extSdCard/image.img
to get a complete image of ALL partitions on the device, then on the broken one do the restore
Code:
dd if=/extSdCard of=/dev/block/mmcblk0
?
Would this keep all partition table information?
I'm assuming it'll crate an exact clone of the 2nd device?
I've already done this for the efs partition as I over wrote it by mistake....
any thoughts?
thanks.

for google...
Yes I managed to fix my device.
From the working one, I opened a adb shell from CWM recovery and ran ls -l /dev/block/platform/{name}/by-name
this gave me a list of partitions and their names.
I then then did a dd (disk dump) of the partitions to a external sd card (had to mount the sd in recovery first). This gave me 7 .img files.
I then moved the sd to the broken device, booted to TRWP recovery and used the terminal to dd them the img files back into their respective partitions.
Long story short, she be working fine now

Related

Recover Files from dd image of mmcblk0p12

Hi i accidently deleted all of my images from the internal SD-Card. I have a rooted Galaxy S3 and booted in recovery and did a:
adb shell dd if=/dev/block/mmcblk0p12 > int_sdcard.dd
Now i have a 12 GB int_sdcard.dd file. But i tried with Ubuntu Live CD to mount or use testdisk on it but it doesnt work.
when i try to mount it says group descriptors corrupted and testdisk doesnt find any partitions on it.
Please could you help me to recover my images.
Thankss
This post helped me before
http://androidforums.com/lounge/556222-recovering-lost-pictures-samsung-galaxy-s-ii.html
Sent from my SGH-T999 using xda premium
Thanks but the S3 only has MTP Mode so i cant use any tools which needs direct access to the storage. This is the reason why i did a dd image.
duich said:
Hi i accidently deleted all of my images from the internal SD-Card. I have a rooted Galaxy S3 and booted in recovery and did a:
adb shell dd if=/dev/block/mmcblk0p12 > int_sdcard.dd
Now i have a 12 GB int_sdcard.dd file. But i tried with Ubuntu Live CD to mount or use testdisk on it but it doesnt work.
when i try to mount it says group descriptors corrupted and testdisk doesnt find any partitions on it.
Please could you help me to recover my images.
Thankss
Click to expand...
Click to collapse
The internal SD is ext4 format, and there is no "undelete" for it (unlike FAT32), so you're going to need a forensic util to recover SOME of your images. Give photorec a try - it's open source and I've used it with success in the past.
I already tried Photorec but all i get is hundrets of txt files but no images. I Think the Problem is that i even cannot mount the dd image with the normal files inside. (i mean the files wich are not deleted). Could it be because of piping the dd command and not using the "of" parameter?

GP 5.0 need help for reformatting internal memory

Hello All,
I need help from experimented people because while trying to reformat my YP-GB70 - 5.0 korean version (internal memory went wreck after some bad manipulations in testing new roms)
Problem: partition14 is no more available, same for 15 and above and have to be reformatted through adb/fdisk.
Reformatting: OK but!
This is a normal operation I've done it 3 times already ,but the issue I am facing now is because Fdisk does not want to open the main /dev/block/mmcblk0 where the partitions are located and visible (excepted n°14 to 17 that are no more linux formated).
I am root access and I am able to access and reformat /dev/block/mmcblk1 that is my external SD card, so problem seems to be somewhere around fdisk instruction to open main memory .
Here attached the overall listing for verification.
Your suggestions are welcome, i need this issue solved for me, sure, but for any other people that can face the same behavior.
Anybody knows the trick? or any advice to help?
The most efficient way to do this is getting a full dd dump of another device. From adb in a working device:
Code:
mount /dev/block/mmcblk0p1 /sdcard
dd if=/dev/block/mmcblk0 of=/sdcard/image.img
Then dumping on your device:
Code:
mount /dev/block/mmcblk0p1 /sdcard
dd if=/sdcard/image.img of=/dev/block/mmcblk0
This command usually takes about 45 minutes or more to complete (you have 32gb internal storage).
Another way you can recover your device, but it's more risky:
DON'T DO IT UNLESS YOU HAVE THE OUTPUT OF A WORKING DEVICE (http://forum.xda-developers.com/showpost.php?p=21915742&postcount=3 )
Using fdisk /dev/block/mmcblk0
Recreate the partition table (if i'm not mistaken the command is o).
Then, you need to create p1 (primary), which is extended and uses all the device storage. The rest of partitions are logical (inside p1).
Make sure you replicate exactly the partition table. DON'T WRITE THE PARTITION TABLE UNLESS YOU'RE DONE. DON'T REBOOT THE DEVICE UNLESS YOU'RE DONE. If you do it --> hardbrick.
Many thanks for your prompt and precise answer.
I am going to ask for a GB70 dump with low confidence in getting it...
I will investigate the "hard" repartitionning way you suggest, I am not sure fdisk will allow me to modify anything because the main memory access is permanently denied.
(/dev/block/mmcblk0)
I already have my device partition table from previous issue I had in march.
regards
memory Issue under control
rumirand said:
The most efficient way to do this is getting a full dd dump of another device. From adb in a working device:
Code:
mount /dev/block/mmcblk0p1 /sdcard
dd if=/dev/block/mmcblk0 of=/sdcard/image.img
Then dumping on your device:
Code:
mount /dev/block/mmcblk0p1 /sdcard
dd if=/sdcard/image.img of=/dev/block/mmcblk0
This command usually takes about 45 minutes or more to complete (you have 32gb internal storage).
Another way you can recover your device, but it's more risky:
DON'T DO IT UNLESS YOU HAVE THE OUTPUT OF A WORKING DEVICE (http://forum.xda-developers.com/showpost.php?p=21915742&postcount=3 )
Using fdisk /dev/block/mmcblk0
Recreate the partition table (if i'm not mistaken the command is o).
Then, you need to create p1 (primary), which is extended and uses all the device storage. The rest of partitions are logical (inside p1).
Make sure you replicate exactly the partition table. DON'T WRITE THE PARTITION TABLE UNLESS YOU'RE DONE. DON'T REBOOT THE DEVICE UNLESS YOU'RE DONE. If you do it --> hardbrick.
Click to expand...
Click to collapse
PROBLEM SOLVED:
I have applied your guide lines and I finally succeeded turning back the device to life.
This was only possible because of the work you and Adamoutler's team have done.
Was mandatory your RJ14 kernel (V5.02.7)(- 2.8 also working ) and the "Unbrickeable resurrector" stuff .
Rebuilt the device 17 logical memory partitions and back to life again.
(see attachement)
Details for interested people under request.
More than many thanks again for your great help.

[Q] Help restore Bootloader

Hello dear friends! I installed ubuntu on a memory card, and then accidentally made "Wipe data", and now the tablet will not boot recovery and immediately begins to boot ubuntu is loaded and working properly. Please tell me if I can from under linux on the tablet restore Bootloader .
Found. If you are interested then:
Loaded on the tablet installed ubuntu, created in the root file system of Linux "sdcard" folder and placed in it "twrp-jb.blob".
1. In a terminal as root flashed recovery:
dd if=/sdcard/twrp-jb.blob of=/dev/mmcblk0p4
2. scored zeros mmcblk0p3:
dd if=/dev/zero of=/dev/mmcblk0p3 bs=16 count=1
after rebooting normally booted recovery !

Need mmcblk0 img for this device

Hello everyone, i was S-off, unlocked and rooted few days ago. now my device is hard bricked as i was installing CM12 which was installed successfully after booting to android it was requiring encryption password, to eliminate encryption i head to different thread and followed by formatting one of data partition. after rebooting device went to dead qhusb or QDL mode. tried every trick using linux PblClear/ Brickdetech.sh/ revive.sh nothing is working.
Last hope before sending it to Jtag is pulling mmcblk0 of working device and writing it to ext.sd card. Booting with same written ext Sd card .
If somebody wants to help me or others with same situation trying trial and error approach could help here.
Guide for helpers;
1- Working Droid Inc4g
2- Rooted
3- Terminal installed or Debugging enable
4- Commands
* To View partition Tables
adb shell su -c ls -al /dev/block/
* After Running this you can see this partition mmcblk0 in starting and make sure that the partition is available.
* Backup your Partition
* Pulling in Internal device SDCARD
adb shell su -c dd if=/dev/block/mmcblk0 of=storage/sdcard0/fulldump.img
or
* Pulling in Internal device External SDCARD
adb shell su -c dd if=/dev/block/mmcblk0 of=storage/sdcard1/fulldump.img
(Chances are mmcblk0 is in GB external Sdcard approch is more reliable with few GBs free space)
5- Connect your device to PC and find fulldump.img
6- Zip/winrar archive
7- Upload to popular cloud (Mega/Google Drive)
8- Share the link
For those with similar brick and if they can get mmcblk0.img(fulldump.img) mentioned above then;
Use win32Diskimager and write full mmcblk0(fulldump.img) to External SD card of 8/16 GB.
Place the ext Sdcard in device and boot to bootloader by holding Power + Vol Down.
try your luck, if booted from dead state try to restore fresh firmware or previous good known backup if you have one.

[Q] How to get memory dumps, when internal memory (/data partition) is damaged.

(Sorry for my english)
My phone, S3 16 GB wasn't rooted and installed custom recovery. Someday, it appears on the screen that "internal storage is damaged". So I want to backup internal storage, attempted flashing twrp and rooting the phone through CF-autoroot, but it unable to mount /data in twrp.
To create a internal memory dump, I find this article.
dfir.science/2017/04/Imaging-Android-with-root-netcat-and-dd.html
I tried to this.
adb devices
List of devices attached
4300********061 recovery
/data directory is empty.
adb shell
su
:: permission denied
I think phone isn't properly rooted. Installing a supersu.zip from twrp, it says "install failed".
adb forward tcp:8888 tcp:8888
dd if=/dev/block/mmcblk0 | busybox nc -l -p 8888
nc 127.0.0.1 8888 > android.dd
It created a dump file of 3.5 GB size on windows, although internal memory had 15 GB in use. And mounting the dump file from OSFMount is failed.
In this situation, is it possible to get a full memory dump of internal storage, specially /data partition?
--------------------
Update.
Retry dumping of /data partition, and view this dump file from testdisk in linux. It worked.

Categories

Resources