diff doc/TIFFS-IVA-usage @ 922:3152e23399a2

document SE K2x0 FFS quirks and our support for them
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 02 Jan 2023 00:50:19 +0000
parents d89b72f2181b
children 11391cb6bdc0
line wrap: on
line diff
--- a/doc/TIFFS-IVA-usage	Sat Dec 31 22:55:23 2022 +0000
+++ b/doc/TIFFS-IVA-usage	Mon Jan 02 00:50:19 2023 +0000
@@ -190,3 +190,27 @@
 
 Just like regular cat, but takes an inode number instead of a pathname.  Can be
 used to cat the old content of deleted or overwritten files.
+
+Support for SE K2x0 extended filenames
+======================================
+
+As explained in the SE-K2x0-FFS article, Sony Ericsson K200/220 phones use
+TIFFS as their flexible data storage mechanism, but they also made their own
+non-standard extension to TIFFS in terms of extended UCS-2 filenames.
+
+In order to allow listing full FFS trees from SE K2x0 phones with tiffs ls and
+possibly also extracting them with tiffs xtr, we have made the following hackish
+extension to our TIFFS IVA: whenever either of these two commands encounters an
+"extended" filename (one which fails standard TIFFS filename validity checks but
+has a terminating NUL that allows the name and data portions of the chunk to be
+separated) in the visible tree walk, our tool replaces it (for the purpose of
+listed pathname generation or extraction into host file system) with a
+synthesized pseudonym of the form "!bogo%04x", where %04x is the FFS inode
+number in hex.  In the case of tiffs ls, the actual extended filename is then
+printed on a separate line (immediately following the synthesized listing), with
+non-printable-ASCII characters escaped in \x hex form.  We've also extended the
+individual-inode form of lsino command to list these extended filenames when
+encountering such, and we've extended catino (which needs to skip past the name
+to get to the beginning of the data portion of the head chunk) to not reject
+file head chunks with extended filenames in them as long as the needed
+separating NUL is found.