[lug] Convertion of ext4 Sparse Files
Bear Giles
bgiles at coyotesong.com
Mon Jan 8 08:39:45 MST 2018
I can't help with android but for Linux you can use the traditional 'dump'
and 'restore'. I wrote a java reader for the dump file (and contributed it
to Apache commons) and had to deal with sparse files since those programs
are smart enough to recognize them. (I also got to look at the extended
attributes, e.g., things like SELinux labels. The apps are smarter than you
would expect for something that's essentially unmaintained now.)
I would suggest looking at any extX packages you can find. The standard
tools will always provide data when reading a sparse block. IIRC that
includes 'dd' unless you're operating on raw devices. It definitely happens
if you mmap a file into your program space. To see the sparse gaps you need
to open the raw devices and use the filesystem library.
On Sat, Jan 6, 2018 at 2:01 PM, <stimits at comcast.net> wrote:
> FYI, the file systems were originally created on ordinary Ubuntu and
> Fedora systems via a loopback mounted file. This file is copied bit-for-bit
> exactly to the device...or read back bit-for-bit exact during cloning. It
> is the conversion from non-sparse to sparse which has the unknown Android
> issue, but when not sparse it is entirely plain vanilla desktop PC Linux.
>
> ----- Original Message -----
> From: Aaron D. Johnson <adj at fnord.greeley.co.us>
> To: Boulder (Colorado) Linux Users Group -- General Mailing List <
> lug at lug.boulder.co.us>
> Sent: Sat, 06 Jan 2018 20:33:47 -0000 (UTC)
> Subject: Re: [lug] Convertion of ext4 Sparse Files
> stimits at comcast.net writes:
> > > Search on Android sparse image. I found all kinds of tools
> > > referenced online.
> >
> > In order for reading a sparse file to result in the bytes of a
> > non-sparse file the reader or the driver of the file system must
> > recognize this as such...apparently this version is recognized as
> > an Android sparse image when the "file" command is run on it, but no
> > other tool...even some of those specific to Android ...seems to work
> > on this. I'm trying to get more information from the creator of the
> > tool which created the sparse file.
> Your "Android sparse image" file is something different than a sparse
> file on a UNIXy filesystem like ext4. This is unfortunately very
> confusing for those of us trying to help out -- we saw "ext4 sparse
> file" in your subject line and went off trying to understand how that
> might cause the problems you're experiencing.
> At this point, you are correct -- the tool which created the Android
> image file (sparse or otherwise) has left you with something that
> needs to be extracted if you'd like to access using a more "normal"
> (by which I mean desktop or server-ish) Linux system. I would hope
> the image creator tool's author is capable of explaining how to
> extract the image file's contents.
> Please let us know if you can get anywhere on that front. If not,
> perhaps you can share the image file itself somewhere and others can
> see what it might take to make use of it.
> - Aaron
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20180108/b43e9276/attachment.html>
More information about the LUG
mailing list