[lug] Convertion of ext4 Sparse Files

stimits at comcast.net stimits at comcast.net
Mon Jan 8 12:00:03 MST 2018


The tool which converted the ext4 loopback-mountable file system seems to be somewhat custom...none of the Linux tools seem to work with this (though "file" recognizes it as an Android sparse file...dump is one of the tools not working with this variation of sparse file). Even Android tools fail. I have a query in with the author of the tool to find out what might be non-standard on how this tool creates sparse from non-sparse.
 
----- Original Message -----From: Bear Giles <bgiles at coyotesong.com>To: Boulder (Colorado) Linux Users Group -- General Mailing List <lug at lug.boulder.co.us>Sent: Mon, 08 Jan 2018 15:39:45 -0000 (UTC)Subject: Re: [lug] Convertion of ext4 Sparse Files


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 sparsefile on a UNIXy filesystem like ext4. This is unfortunately veryconfusing for those of us trying to help out -- we saw "ext4 sparsefile" in your subject line and went off trying to understand how thatmight cause the problems you're experiencing.

At this point, you are correct -- the tool which created the Androidimage file (sparse or otherwise) has left you with something thatneeds 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 hopethe image creator tool's author is capable of explaining how toextract 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 cansee what it might take to make use of it.

- Aaron_______________________________________________Web Page: http://lug.boulder.co.usMailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lugJoin 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/d3591664/attachment.html>


More information about the LUG mailing list