Difference between revisions of "Save and Restore"

From WebOS Internals
Jump to navigation Jump to search
 
Line 1: Line 1:
 +
== Summary ==
 
A general architecture for saving and restoring stuff from application data areas to the USB drive.
 
A general architecture for saving and restoring stuff from application data areas to the USB drive.
  
Architecture:
+
== Architecture ==
  
 
* A binary C-based org.webosinternals.saverestore service provides the ability to run a set of pre-installed scripts
 
* A binary C-based org.webosinternals.saverestore service provides the ability to run a set of pre-installed scripts
Line 10: Line 11:
 
* Therefore, any script that is run by the service has been installed by a means that already had root access
 
* Therefore, any script that is run by the service has been installed by a means that already had root access
  
Features of the service:
+
== Features of the service ==
  
 
* A method to list the current set of available scripts with info about id, name, ...
 
* A method to list the current set of available scripts with info about id, name, ...
Line 17: Line 18:
 
** restore
 
** restore
  
Implementation Decisions
+
== Implementation Decisions ==
  
 
* Where to store the data
 
* Where to store the data
 
** Choose /media/internal/saverestore
 
** Choose /media/internal/saverestore
  
Situations To Persist Across
+
== Situations To Persist Across ==
  
 
* Partial Erase
 
* Partial Erase
 
* Profile Reset (/var and /media/cryptofs are wiped, but /media/internal is retained)
 
* Profile Reset (/var and /media/cryptofs are wiped, but /media/internal is retained)
  
Locations of Application Data
+
== Locations of Application Data ==
  
 
* /var/palm/data
 
* /var/palm/data

Latest revision as of 02:04, 30 March 2010

Summary

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

Architecture

  • A binary C-based org.webosinternals.saverestore 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. 'info', 'save', 'restore', etc)
  • The scripts are named according to the appId of the application that owns the data
  • 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

Features of the service

  • A method to list the current set of available scripts with info about id, name, ...
  • 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 data
    • Choose /media/internal/saverestore

Situations To Persist Across

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

Locations of Application Data

  • /var/palm/data
  • /media/internal/.app-storage
  • /var/luna/data
  • additional files in the application directory