Mounting and exploring an .img of an encrypted OP3T /data partition? - OnePlus 3T Questions & Answers

Hello xda community and OP3(T) users!
In April I created an image of my f2fs /data partition according to this hint:
https://stackoverflow.com/questions/26967862/how-to-make-an-image-of-android-partition-to-your-pc
This was successful and a *.img file sized 53+ GB now resides safely and quietly on an external hard drive.
Now I want to mount as well explore it with my Linux laptop. ))
How do I do this? Which tools and commands are needed?
P.S.: in the past this partition was also encrypted and decrypted via a simple 3x3 pattern by TWRP as well as before a ROM boots....

Related

[Q] Mount Nandroid image?

As the title is it possible to mount the image Clockwork (nandroid?) .img files make. I have tested with deamon tools without any luck. Would be really great if someone could help me with this, i want to llok for files inside it.
Try renaming it to .Zip and open the archive
Sent from my LG-P990 using XDA Premium App
Not working
I was just wondering about the same thing, about how to mount the nandroid backup.
I have tried to rename the extension from .img to .zip, but Windows (winrar in my case) won't read the file.
Are there any other solutions on how to extract data from the backup under a Windows environment, or do I have to fire up a virtual linux machine to get my data?
They aren't archives, so WinZip/RAR isn't going to be able to handle them. You can mount them in Linux though.
Thanks for clarifying that for me. I'll do that then.
One last question: Are special tools required for mounting in linux? Or are there native support for the nandroid backup in linux?
It's all built in, Linux would be quite useless if it was unable to mount an EXT3/4 file system
I think the command (assuming EXT3 backup) is:
Code:
mount -t ext3 system.img /path/to/mount/folder -o loop
LOL, didn't realize that it was ext3/4. -I had an idea of that it was compressed to some special format.
Thanks again Rusty and thanks for the command.
are the images ext3 even though the system is yaffs2?
Just a thought, wouldn't it be possible (for us windows users) to mount the img files in android, then adb pull the files from the phone?
System isn't YAFFS on these, it's EXT3 or EXT4 if on MCR.

Mounting System and all partitions over USB

Hi guys,
Now that we have unlocked bootloader and proper custom recovery I am wondering is it would be possible to boot in recovery and boot system partition and all other partitions.
On my old Android phone we used to be able to boot the phone in recovery and once plugged with a LINUX machine (that could recognize EXT3 / EXT4 it would mount all the partitions making it very easy to do a full system backup and modify system files from the computer.
Would something like this be possible on this phone?
Thanks.

NookHD+ can't mount emmc; can't fully boot from SD recovery

Perhaps someone can help. I've read a lot of the great content here but I've hit a wall.
A few weeks ago my ovation device was running cm11+cwm but began random rebooting. Clearing the cache+dalvik only helped briefly.
I tried an upgrade with a twrp 3.0.0.0 (using the amazing multiboot recovery SD), but it hung formatting the cache partition (I waited about an hour). Tried again, same thing.
I used adb shell to fix a blank file system type on the cache partition but was only successful in creating an ext2 partition there. I got cm13 booting but it trebuchet kept crashing. I tried twrp again and flashing a different image and tried a factory reset. Big mistake.
Now when I try to boot any recovery SD it doesn't boot all the way. Using adb shell, my dmesg shows that umount is hanging. No emmc partitions seem to be mounted. The partition data exists in dmesg but calls to parted hang. Mkfs.ext4 also hangs (naturally).
So I've lost the ability to fully boot recovery SDs (they are probably hanging when they try to mount the emmc partitions). As such I can't flash a recovery. I have a clockwork backup that has a system.ext.tar file in it, but I don't know how to use it at this point.
I can't mount /rom so I'm worried.
Is my emmc shot? Is there any way to tell?
Thanks!
Would a noEMMC SD be safe?
I guess what I was hoping to do was use adb to completely wipe and restore the device to a sane state, which would include repartitioning and formatting the emmc partitions. Is that possible? Maybe not at this point.
I guess another question would be: if my NookHd+ emmc is technically working but currently unrecoverable, is it possible for me to safely use a NOemmc SD card? There seem to be some warnings about those wrecking emmc but I can't find any technical explanation as to why.
Based on further diagnostics, my emmc is one of the faulty Samsung models and so I think the crashes and ultimate recovery failures were the failure of the emmc.
I've successfully installed 10.1 noEMMC on one microsd. Runs Okay but a lot of apps I am interested in don't work on android from this vintage.
I tried to install 4.4.4/CM11 noEMMC but it can't mount the necessary partitions as per the install process on the iamafanof Wordpress page. I also see SELinux errors in the twrp recovery log. Does anyone know how to overcome this mount issue that apparently impacts some people.
Assuming there are others out there who find this useful, I have some updates.
I was determined to figure out why the CM11 NoEMMC was not working for me but CM10.2 noEMMC works fine. I get the error that many others get: unable to mount /boot, /data, /system.
I used adb shell to connect to the twrp 2.8.0.0 that runs when you boot the CM11 noEMMC SD boot/install image and compared the Linux system differences between that and the system you can see connected to the cwm 6.0.4.? That runs when you boot the CM10.2 noEMMC SD boot/instal image.
First things first: cm10 noEMMC remaps the internal emmc as /dev/block/emcblk1 and the external microsd card slot as blk0 (this is swapped from the norm and correct for a situation where you want to install to the SD as though it were the internal device).
CM11 noEMMC does not do this. I think that the author assumed that if your emmc is bricked then the system won't see your /dev/block/emmcblk0 at all so your external sdcard will take over that number. Clearly that's true for some, but it's not true for me.
I also began poking around the post boot script (in /sbin) to see how the cm11 noEMMC prepares the partitions on the Sd card and to see what Command it uses to create the data partition
Here's the kicker. I was able to mount my emmc rom partition and copy off all that data with an adb pull. I was able to initialize the cache partition (9) as a blank ext4 partition. I was even able to initialize the user partition (10) as ext4... Though I'm not sure that's right. I began mounting partitions and got greedy and tried to mount the whole partition map and it failed.
So, there's something wrong with (at least) one of my partitions. When recovery tries to mount the partitions, mount hangs and recovery fails to fully load. The noEMMC sd card got me around this because it doesn't try to mount any of the emmc partitions let alone all of them.
So, does anyone know if I can make new file systems on every partition and if by luck I'm able to get a twrp or cwm to fully load, will flashing a stock recovery put data on all those partitions?
Thanks
Sorry to resurrect this thread, But it exactly speaks to my issue. You mention that the blk0 and blk1 devices need to be switched for cm11 image to mount partitions properly. Does anyone know specifically where this might be done. Can files of the existing nov4 cm11 image be altered to reverse these two devices?
CalculonsTalent said:
Assuming there are others out there who find this useful, I have some updates.
I was determined to figure out why the CM11 NoEMMC was not working for me but CM10.2 noEMMC works fine. I get the error that many others get: unable to mount /boot, /data, /system.
I used adb shell to connect to the twrp 2.8.0.0 that runs when you boot the CM11 noEMMC SD boot/install image and compared the Linux system differences between that and the system you can see connected to the cwm 6.0.4.? That runs when you boot the CM10.2 noEMMC SD boot/instal image.
First things first: cm10 noEMMC remaps the internal emmc as /dev/block/emcblk1 and the external microsd card slot as blk0 (this is swapped from the norm and correct for a situation where you want to install to the SD as though it were the internal device).
CM11 noEMMC does not do this. I think that the author assumed that if your emmc is bricked then the system won't see your /dev/block/emmcblk0 at all so your external sdcard will take over that number. Clearly that's true for some, but it's not true for me.
I also began poking around the post boot script (in /sbin) to see how the cm11 noEMMC prepares the partitions on the Sd card and to see what Command it uses to create the data partition
Here's the kicker. I was able to mount my emmc rom partition and copy off all that data with an adb pull. I was able to initialize the cache partition (9) as a blank ext4 partition. I was even able to initialize the user partition (10) as ext4... Though I'm not sure that's right. I began mounting partitions and got greedy and tried to mount the whole partition map and it failed.
So, there's something wrong with (at least) one of my partitions. When recovery tries to mount the partitions, mount hangs and recovery fails to fully load. The noEMMC sd card got me around this because it doesn't try to mount any of the emmc partitions let alone all of them.
So, does anyone know if I can make new file systems on every partition and if by luck I'm able to get a twrp or cwm to fully load, will flashing a stock recovery put data on all those partitions?
Thanks
Click to expand...
Click to collapse
Could you please teach me how to mount EMMC partitions and retrieve data specially /factory partition with ADB?
I can only boot my Nook HD+ with with bootable SD card with TWRP or CWM.
Thanks.

f2fs to ext4 conversion

Hello guys, i've a question, I did a fatory reset on my phone and lost all my data, I did a lot of research and was able to create a img file will all my data using some adb commands, but now I'm stuck because the motox 2014 uses f2fs filesystem and not ext4.
I need to convert a .bin image that is in f2fs to ext4 without loosing it's content, any of you have any idea how to so it?
The forensic tool FTK Imager does not read f2fs filesystem.
Thanks

Is it possible to mount data partition on PC or USB to recover data

Is it possible to mount data partition on PC or USB to recover data?
Edit: I meant userdata partition
I have tried backing up data partition using TWRP, but it prompted me that pictures and downloads will not be backed-up!
Isn't the data partition that holds my camera and download folder?
I am looking for a tool or and app that can let me take a disk image of internal SD partition, or create a whole image of my phone; so that I can use data recovery in my PC.
Making Dump Files Out of Android Device Partitions
have u try this
Thanks I have tried it but when I execute
Code:
noblelte:/ # dd if=/dev/block/sda17 of=/sda17.img
Gives me
Code:
dd: /sda17.img: Read-only file system
Just to be sure : I ran the adb code while the phone is on normally not in TWRP.
I also ran the code in TWRP terminal, while connecting a USB and mounting it.
It created the image inside the USB , however it stopped at 4GB saying the file is too large.
SilverDove said:
I also ran the code in TWRP terminal, while connecting a USB and mounting it.
It created the image inside the USB , however it stopped at 4GB saying the file is too large.
Click to expand...
Click to collapse
Are you just wanting to back up pictures, download folder, etc etc? Backing up the data partition the way you are is pointless as you're just accomplishing what twrp already does. Data partition is apps, system configurations, texts, calls, etc. Not pictures you've taking, download folder, etc.
And is there a reason you want an img file? Seems pointless to me when you can just copy it all over by drag and drop or adb pull the internal storage lol
I want to make a userdata partition image because it holds the camera album I deleted by mistake. I want to take the image and try to recover the deleted files using PC recovery software.
I found out that my problem was the 4GB limit of FAT32, so I formatted my USB flash memory using both exFat and ext4 and recovered the partition using TWRP terminal with the code above.
However I am still unable to read the image through Linux Reader and I can't attach the image as VHD.
Is what I am doing is useless? Because it came to my mind that if the recovered userdata partition is encrypted I will not be able to opened it, however, TWRP can browse the files so I guess it is not encrypted.
SilverDove said:
I want to make a userdata partition image because it holds the camera album I deleted by mistake. I want to take the image and try to recover the deleted files using PC recovery software.
I found out that my problem was the 4GB limit of FAT32, so I formatted my USB flash memory using both exFat and ext4 and recovered the partition using TWRP terminal with the code above.
However I am still unable to read the image through Linux Reader and I can't attach the image as VHD.
Is what I am doing is useless? Because it came to my mind that if the recovered userdata partition is encrypted I will not be able to opened it, however, TWRP can browse the files so I guess it is not encrypted.
Click to expand...
Click to collapse
You may need to convert the file type of the img using simg2img, make_ext4fs, etc
You can see what the file system type of the img you have by running:
file blahblah.img
But still don't think you're going to recover them but possibly lol never tried as I sync everything to a cloud
SilverDove said:
Is it possible to mount data partition on PC or USB to recover data?
Edit: I meant userdata partition
Click to expand...
Click to collapse
For backing up app data, I'm more of a Titanium Backup person myself and for backing up partitions I generally prefer TWRP, but there are also apps for backing up all the different partitions as well. This is just one. Never tried it, but Wanam is a much trusted developer in the XDA community for Samsung devices.
https://play.google.com/store/apps/details?id=ma.wanam.partitions
NOTE: You can always save these backups to a USB OTG device if you need to as well. That's what I do with my Titanium Backup app data files and the information is with me all the time hanging on my key chain.(More info about that under "No SD Card Slot" on this post HERE.) This information can of course always be copied to a PC too.

Categories

Resources