Difference between revisions of "Save and Restore"

From WebOS Internals
Jump to navigation Jump to search
Line 23: Line 23:
 
** Should be centralised to start, but could be distributed later once things stabilise
 
** Should be centralised to start, but could be distributed later once things stabilise
 
** Choose /var/svc/org.webosinternals.saverestore
 
** Choose /var/svc/org.webosinternals.saverestore
 +
 +
Situations To Persist Across
 +
 +
* Partial Erase
 +
* Profile Reset (/var and /media/cryptofs are wiped, but /media/internal is retained)

Revision as of 07:00, 27 February 2010

A general architecture for saving and restoring stuff from application data areas to the USB drive.

Security model:

  • A binary C-based saverestoremgr service provides the ability to run a set of pre-installed scripts
  • The service calls the scripts with a small set of known arguments (e.g. 'save', 'restore', etc)
  • The scripts are stored in a location that is only accessible by installing them as root (e.g. a signed app with a post-install script)
  • The service does not allow the execution of scripts outside of that location
  • Therefore, any script that is run by the service has been installed by a means that already had root access
  • The scripts are named according to the appId of the application that owns the data

Features of the service:

  • A method to list the current set of available scripts
  • A method to call an individual script, or the set of all scripts, with a command method
    • save
    • restore

Implementation Decisions

  • Where to store the scripts
    • Needs to be somewhere outside of $IPKG_OFFLINE_ROOT
    • Should be centralised to start, but could be distributed later once things stabilise
    • Choose /var/svc/org.webosinternals.saverestore

Situations To Persist Across

  • Partial Erase
  • Profile Reset (/var and /media/cryptofs are wiped, but /media/internal is retained)