We have moved to a new Sailfish OS Forum. Please start new discussions there.
0

Dump entire internal device memory? [duplicate]

asked 2016-01-04 12:15:41 +0200

Olle Jolle gravatar image

updated 2016-01-04 17:55:51 +0200

chemist gravatar image

Is there a way to do a raw byte-by-byte dump of the entire internal 16GB storage memory?

I specifically don't mean just all the files that are currently on there. Actually, the unused space is much more interesting.

I'd like to try and see if I can recover some data from it, but that may take me a while. In the meantime I need to use the phone, so I don't want to keep it in recovery mode the whole time.

Background:
I recently did a factory reset and then upgraded three times or so all the way to Sailfish 2. Forgot about certain data created by an android app I had used. That data wasn't backed up but is important to me. Since I haven't installed or used the phone much since the upgrade, my hope is that the data still floats around somewhere on the unused space and I can find a way to retrieve it from the memory image.

edit retag flag offensive reopen delete

The question has been closed for the following reason "duplicate question" by pichlo
close date 2016-01-04 17:53:10.913724

2 Answers

Sort by » oldest newest most voted
4

answered 2016-01-04 12:50:51 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2016-01-04 12:50:51 +0200

pichlo gravatar image

Look up the dd command. You do not need the whole 16GB, only the user accessible part of it. This is the /dev/mmcblk0p28 partition. "Only" 14GB.

But I doubt it will help you. You went through three updates, chances are your data is already gone. Plus this is flash storage and btrfs, both with their own paradigms, increasing the chance of overwriting unused memory blocks for things like wear leveling and balancing. Do not hold your hopes too high. Sorry.

edit flag offensive delete publish link more

Comments

1

Adding to this btrfs supports the TRIM command, which tells the underlying storage can erase the now freed area ready for the next write. Unlike spinning media, flash storage must first be erase before it can be written to again. Hence TRIM, the storage can erase the blocks ready for writing during an idle time, therefore improving performance among other reasons.

GD ( 2016-01-04 12:57:46 +0200 )edit

Thanks for the quick replies. I realize I may be out of luck, but want to try anyway. At least I'll learn something in the process. I just tried this with a 64GB SD card mounted to /mysd:

dd if=/dev/mmcblk0p28 of=/mysd/jolladump.img

and got this output:

dd: writing '/mysd/jolladump.img': File too large
8388609+0 records in
8388607+1 records out
4294967295 bytes (4.0GB) copied, 261.254326 seconds, 15.7MB/s

Is there a 4GB file size limit on those SD cards? Can the dump be broken into parts or is there any other solution?

Olle Jolle ( 2016-01-04 13:34:55 +0200 )edit
1

4GB is an individual file size limit imposed by FAT, the default file system used on most SD cards. 64GB cards are normally preformatted with exFAT with does not have that limit but exFAT is normally not supported on Jolla so if you reformatted your SD card to FAT then you have reintroduced the 4GB limit. There is a 3rd party exFAT support installable on Jolla but I have not tried it.

You can dd in blocks. Run it again, specifying the starting offset at 4GB, writing to a new file. Repeat until you've copied the whole lot.

pichlo ( 2016-01-04 13:46:06 +0200 )edit
2

Or reformat your SD card to a new file system without the 4GB restriction, dump the image in one go and then copy the file to your PC..

SilentWanderer ( 2016-01-04 13:48:30 +0200 )edit

I reformatted the SD card with exFAT using Apple's Disk Utility, but every time I try to mount it, I get:

mount: mounting /dev/mmcblk1p1 on /mysd failed: Invalid argument

When I format it as plain FAT, it works fine. The reason I had it in FAT in the first place was that Jolla doesn't support anything other than this ancient dinosaur in normal operation. I thought maybe it'd be different in recovery mode, but that doesn't seem to be the case. How did you guys manage to work with an exFAT card?

Olle Jolle ( 2016-01-06 05:48:13 +0200 )edit
2

answered 2016-01-04 16:29:25 +0200

jolladiho gravatar image

I would say this Q is a duplicate to https://together.jolla.com/question/81832/full-phone-backup-guide/

You can read about 4GB and FAT there too - time to close. ;-)

edit flag offensive delete publish link more

Comments

You are right, closed as duplicate.

pichlo ( 2016-01-04 17:53:34 +0200 )edit

Question tools

Follow
2 followers

Stats

Asked: 2016-01-04 12:15:41 +0200

Seen: 1,039 times

Last updated: Jan 04 '16