File: android-deltas-sync/_etc/examples/basic-appprivate-storage/_readme.txt

This demo's PC-side scripts were run on macOS.  It uses
app-private storage for both zips and content on the Android
12L phone.  Changes made in config files are marked with '<='. 

This must use the Termux home ("~") folder as app-private 
storage; this is the only folder made visible to Android 
file-explorer apps via Termux's Storage Access Framework 
(SAF) interface.  You also must use a SAF-capable explorer
to both copy zipfiles and access your content in this mode.
Fx, AOSP (a.k.a. Files), Material Files, and MiXplorer are
known to support this access today.  For full info, see:

  ../../../_README.html#termux-app-private-SAF

Note that zips and content need not both use app-private
storage the way this demo does.  In practice, you might use
app-private for zipfiles to optimize sync speed, and shared 
storage for content to boost accessibility and longevity.


METADATA

App-private storage retains propagated symlinks, permissions,
and nonportable filenames:

NONPORTABLE FILENAMES 
  Don't need to be fixed here, because they are allowed in
  Android app-private storage when unzipped, and are silently
  munged to work on the exFAT proxy by macOS.

SYMLINKS 
  Are forged on the exFAT proxy by macOS, so they don't 
  generate perpetual diffs the way they do on Linux (though 
  they also won't register as symlinks elsewhere).  On phones,
  zipped symlinks in the initial-copy unzip are correctly 
  recreated in the Android app-private Termux home folder, 
  so there is no data loss here.

UNIX PERMISSIONS
  Are retained in app-private storage (at least as much as 
  allowed by Android's filesystems and policies).  They may
  or may not make it to the proxy, but are smuggled to/from 
  Android in this package's zipfiles.

For more info on filenames, symlinks, and permissions, see 
the main doc's:
  _README.html#Nonportable Filenames
  _README.html#storagemetadata
  _README.html#Unix Permissions


IMPORTANT: UnixPermissions (phone)

Besides FROM/TO pathnames, this demo's phone config file also 
changes setting UnixPermissions to True, to propagate Unix 
file permissions from macOS to Android app-private storage.
This setting is preset to False only because of issues for 
app-specific storage; see _README.html's "Unix Permissions."

Permissions are always copied to the PC during exports, so 
there is no parallel setting in the PC config file.

But in general:
  => Use False for UnixPermissions on phones where content 
     will be propagated to app-specific storage.


IMPORTANT: CheckFilenames (PC + phone)

This example's PC and phone config files both also change 
CheckFilenames to False to skip the nonportable-filenames 
fixer step, because no filename conversions are required:

- Copies and syncs to the phone use the PC file's setting.
  Nonportable names are allowed by Android in app-private 
  storage when unzipped there, and changed by macOS to work 
  on the exFAT proxy. 

- Exports (backsyncs) to the PC use the phone file's setting. 
  The macOS Unix target supports Android app-private names,
  and exports never update the proxy on Android.  The proxy
  is updated after unzip on macOS, which forges names to work.

But in general:
  => Use True for CheckFilenames when content will also be 
     propagated to Windows (or from Linux).



[Home page] Books Code Blog Python Author Train Find ©M.Lutz