50054 Commits

Author SHA1 Message Date
Christopher Tate
4a627c71ff Full local backup infrastructure
This is the basic infrastructure for pulling a full(*) backup of the
device's data over an adb(**) connection to the local device.  The
basic process consists of these interacting pieces:

1. The framework's BackupManagerService, which coordinates the
   collection of app data and routing to the destination.

2. A new framework-provided BackupAgent implementation called
   FullBackupAgent, which is instantiated in the target applications'
   processes in turn, and knows how to emit a datastream that contains
   all of the app's saved data files.

3. A new shell-level program called "bu" that is used to bridge from
   adb to the framework's Backup Manager.

4. adb itself, which now knows how to use 'bu' to kick off a backup
   operation and pull the resulting data stream to the desktop host.

5. A system-provided application that verifies with the user that
   an attempted backup/restore operation is in fact expected and to
   be allowed.

The full agent implementation is not used during normal operation of
the delta-based app-customized remote backup process.  Instead it's
used during user-confirmed *full* backup of applications and all their
data to a local destination, e.g. via the adb connection.

The output format is 'tar'.  This makes it very easy for the end
user to examine the resulting dataset, e.g. for purpose of extracting
files for debug purposes; as well as making it easy to contemplate
adding things like a direct gzip stage to the data pipeline during
backup/restore.  It also makes it convenient to construct and maintain
synthetic backup datasets for testing purposes.

Within the tar format, certain artificial conventions are used.
All files are stored within top-level directories according to
their semantic origin:

apps/pkgname/a/  : Application .apk file itself
apps/pkgname/obb/: The application's associated .obb containers
apps/pkgname/f/  : The subtree rooted at the getFilesDir() location
apps/pkgname/db/ : The subtree rooted at the getDatabasePath() parent
apps/pkgname/sp/ : The subtree rooted at the getSharedPrefsFile() parent
apps/pkgname/r/  : Files stored relative to the root of the app's file tree
apps/pkgname/c/  : Reserved for the app's getCacheDir() tree; not stored.

For each package, the first entry in the tar stream is a file called
"_manifest", nominally rooted at apps/pkgname.  This file contains some
metadata about the package whose data is stored in the archive.

The contents of shared storage can optionally be included in the tar
stream. It is placed in the synthetic location:

shared/...

uid/gid are ignored; app uids are assigned at install time, and the
app's data is handled from within its own execution environment, so
will automatically have the app's correct uid.

Forward-locked .apk files are never backed up.  System-partition
.apk files are not backed up unless they have been overridden by a
post-factory upgrade, in which case the current .apk *is* backed up --
i.e. the .apk that matches the on-disk data.  The manifest preceding
each application's portion of the tar stream provides version numbers
and signature blocks for version checking, as well as an indication
of whether the restore logic should expect to install the .apk before
extracting the data.

System packages can designate their own full backup agents.  This is
to manage things like the settings provider which (a) cannot be shut
down on the fly in order to do a clean snapshot of their file trees,
and (b) manage data that is not only irrelevant but actively hostile
to non-identical devices -- CDMA telephony settings would seriously
mess up a GSM device if emplaced there blind, for example.

When a full backup or restore is initiated from adb, the system will
present a confirmation UI that the user must explicitly respond to
within a short [~ 30 seconds] timeout.  This is to avoid the
possibility of malicious desktop-side software secretly grabbing a copy
of all the user's data for nefarious purposes.

(*) The backup is not strictly a full mirror.  In particular, the
    settings database is not cloned; it is handled the same way that
    it is in cloud backup/restore.  This is because some settings
    are actively destructive if cloned onto a different (or
    especially a different-model) device: telephony settings and
    AndroidID are good examples of this.

(**) On the framework side it doesn't care that it's adb; it just
    sends the tar stream to a file descriptor.  This can easily be
    retargeted around whatever transport we might decide to use
    in the future.

KNOWN ISSUES:

* the security UI is desperately ugly; no proper designs have yet
  been done for it
* restore is not yet implemented
* shared storage backup is not yet implemented
* symlinks aren't yet handled, though some infrastructure for
  dealing with them has been put in place.

Change-Id: Ia8347611e23b398af36ea22c36dff0a276b1ce91
2011-05-10 17:52:51 -07:00
Dirk Dougherty
2bb51bb203 am 63c5a2bc: am e4e8dffd: am 0d5196b9: am 5f8f0a0d: Merge "Doc change: add Android 3.1 highlights and version notes." into honeycomb-mr1
* commit '63c5a2bc39839804442ba2800b6d974d0391f2cc':
  Doc change: add Android 3.1 highlights and version notes.
2011-05-10 11:15:54 -07:00
Scott Main
6d98a19190 am 315595d1: am 6b2c8f00: am fef7b625: am 7f3cf449: Merge "docs: update screen support doc to de-emphasize support for 1.5 this includes a variety of other revisions to reorganize some of the content in the main document and also add separate documents for how to enab
* commit '315595d10dfd4b8fe32cfe45a53f9e342bf0a699':
  docs: update screen support doc to de-emphasize support for 1.5 this includes a variety of other revisions to reorganize some of the content in the main document and also add separate documents for how to enable screen filtering and add screen support on 1.5
2011-05-10 11:15:51 -07:00
Wink Saville
37eca253af am d649887a: am eb8da0fe: Merge "Fix issue on infinite retry config in RetryManager" into honeycomb-LTE
* commit 'd649887a43efb435f1ea2255c364d8c214552aef':
  Fix issue on infinite retry config in RetryManager
2011-05-10 11:15:25 -07:00
Wink Saville
e8a0619b03 am d1736a3d: am d237bcb2: Merge "Add unset and setOnIccRefresh." into honeycomb-LTE
* commit 'd1736a3ddae04f5cbe4ebc0ba31e605b6bdae72c':
  Add unset and setOnIccRefresh.
2011-05-10 11:14:51 -07:00
Dianne Hackborn
fd26ed1a28 Merge "resolved conflicts for merge of 05be6d6f to master" 2011-05-10 10:59:29 -07:00
Kristian Monsen
39201b017f Merge "Deprecating webkit API's that might not be supported in the future" 2011-05-10 10:57:52 -07:00
Wink Saville
5e4ab52859 Merge "Add unset and setOnIccRefresh." 2011-05-10 10:25:46 -07:00
Wink Saville
c2e6a104aa Add unset and setOnIccRefresh.
A temporary hack as some binaries are using these methods.

Bug: 4401309
Change-Id: I046f78f56c4a9300355e68488735da227991a773
2011-05-10 10:24:15 -07:00
Kristian Monsen
fc77165d44 Deprecating webkit API's that might not be supported in the future
Change-Id: I992ae207f29a95daff991768cc6fe190471978cd
2011-05-10 16:53:51 +01:00
Ben Murdoch
bb40896e66 Merge WebKit at r74534: Update browser user agent.
Change-Id: I6959d2f1f9b69209deb255e442791f6447fe6b05
2011-05-10 15:38:51 +01:00
Kristian Monsen
cbb59db7ee Enable platform notifications for chrome http stack
Change-Id: I386aef25010c95b15fb6a8edc96e59e538540306
2011-05-10 14:13:16 +01:00
Dirk Dougherty
63c5a2bc39 am e4e8dffd: am 0d5196b9: am 5f8f0a0d: Merge "Doc change: add Android 3.1 highlights and version notes." into honeycomb-mr1
* commit 'e4e8dffd41c0f7aaf005418b71cae7738ad868d2':
  Doc change: add Android 3.1 highlights and version notes.
2011-05-10 00:46:26 -07:00
Scott Main
315595d10d am 6b2c8f00: am fef7b625: am 7f3cf449: Merge "docs: update screen support doc to de-emphasize support for 1.5 this includes a variety of other revisions to reorganize some of the content in the main document and also add separate documents for how to enable screen fil
* commit '6b2c8f00c95d05a8ca410ff74451fd0701f36119':
  docs: update screen support doc to de-emphasize support for 1.5 this includes a variety of other revisions to reorganize some of the content in the main document and also add separate documents for how to enable screen filtering and add screen support on 1.5
2011-05-10 00:46:21 -07:00
Dirk Dougherty
e4e8dffd41 am 0d5196b9: am 5f8f0a0d: Merge "Doc change: add Android 3.1 highlights and version notes." into honeycomb-mr1
* commit '0d5196b972044da44a844acd9cdffde9d5aa696d':
  Doc change: add Android 3.1 highlights and version notes.
2011-05-10 00:37:02 -07:00
Scott Main
6b2c8f00c9 am fef7b625: am 7f3cf449: Merge "docs: update screen support doc to de-emphasize support for 1.5 this includes a variety of other revisions to reorganize some of the content in the main document and also add separate documents for how to enable screen filtering and ad
* commit 'fef7b62506a74d0133b60fd1d6ae9bf54bf599c9':
  docs: update screen support doc to de-emphasize support for 1.5 this includes a variety of other revisions to reorganize some of the content in the main document and also add separate documents for how to enable screen filtering and add screen support on 1.5
2011-05-10 00:36:59 -07:00
Dirk Dougherty
0d5196b972 am 5f8f0a0d: Merge "Doc change: add Android 3.1 highlights and version notes." into honeycomb-mr1
* commit '5f8f0a0d40675bc4d373121ffdd22730f3701662':
  Doc change: add Android 3.1 highlights and version notes.
2011-05-10 00:34:09 -07:00
Scott Main
fef7b62506 am 7f3cf449: Merge "docs: update screen support doc to de-emphasize support for 1.5 this includes a variety of other revisions to reorganize some of the content in the main document and also add separate documents for how to enable screen filtering and add screen supp
* commit '7f3cf449fe1b90b902a37ddc3c05ec7aa236e584':
  docs: update screen support doc to de-emphasize support for 1.5 this includes a variety of other revisions to reorganize some of the content in the main document and also add separate documents for how to enable screen filtering and add screen support on 1.5
2011-05-10 00:34:06 -07:00
Dirk Dougherty
5f8f0a0d40 Merge "Doc change: add Android 3.1 highlights and version notes." into honeycomb-mr1 2011-05-09 22:58:37 -07:00
Dirk Dougherty
b7c7f15737 Doc change: add Android 3.1 highlights and version notes.
Change-Id: Ifbc7df004d8aca9073d6397fad282a57ad4f1b74
2011-05-09 22:50:25 -07:00
Wink Saville
d649887a43 am eb8da0fe: Merge "Fix issue on infinite retry config in RetryManager" into honeycomb-LTE
* commit 'eb8da0fec2ea577f14e5c5c4dcca1eea0b8261fc':
  Fix issue on infinite retry config in RetryManager
2011-05-09 20:34:24 -07:00
Wink Saville
d1736a3dda am d237bcb2: Merge "Add unset and setOnIccRefresh." into honeycomb-LTE
* commit 'd237bcb241b2be8b2f3f3baed87fce973de00fa7':
  Add unset and setOnIccRefresh.
2011-05-09 20:32:34 -07:00
Wink Saville
eb8da0fec2 Merge "Fix issue on infinite retry config in RetryManager" into honeycomb-LTE 2011-05-09 20:31:45 -07:00
Wink Saville
d237bcb241 Merge "Add unset and setOnIccRefresh." into honeycomb-LTE 2011-05-09 20:29:55 -07:00
Wink Saville
987cd49966 Add unset and setOnIccRefresh.
A temporary hack as some binaries are using these methods.

Change-Id: I4ee63df82acf167ab5f434e63bd073e84e1fdf71
2011-05-09 20:27:54 -07:00
Dianne Hackborn
aa9d84c37e resolved conflicts for merge of 05be6d6f to master
Change-Id: Ic6a6c5bb300f6f1d43f9ed550b284282b4f16212
2011-05-09 19:00:59 -07:00
Scott Main
7f3cf449fe Merge "docs: update screen support doc to de-emphasize support for 1.5 this includes a variety of other revisions to reorganize some of the content in the main document and also add separate documents for how to enable screen filtering and add screen support on 1.5" into honeycomb-mr1 2011-05-09 18:32:10 -07:00
James Dong
2f6a27f69d Merge "Add send session recording summary report to application" 2011-05-09 17:47:09 -07:00
Dianne Hackborn
05be6d6fe0 am 4907d1d5: am 0c6cbf41: Merge "Better compat mode part one: start scaling windows." into honeycomb-mr2
* commit '4907d1d5e2c7d244b07579b8c52153df69754e85':
  Better compat mode part one: start scaling windows.
2011-05-09 17:10:34 -07:00
Dianne Hackborn
4907d1d5e2 am 0c6cbf41: Merge "Better compat mode part one: start scaling windows." into honeycomb-mr2
* commit '0c6cbf410a642f6e9cea7cca0a6e53a4a3cdd324':
  Better compat mode part one: start scaling windows.
2011-05-09 17:08:40 -07:00
Dianne Hackborn
0c6cbf410a Merge "Better compat mode part one: start scaling windows." into honeycomb-mr2 2011-05-09 17:06:24 -07:00
Wink Saville
28e77e616d am ba54feb0: am 45364dc4: Merge "Telephony: Signal Strength Changes." into honeycomb-LTE
* commit 'ba54feb094fdf0eb2201eae5751104a144a2a31d':
  Telephony: Signal Strength Changes.
2011-05-09 17:04:57 -07:00
James Dong
3aea037dd8 Add send session recording summary report to application
Change-Id: I9c63ddae432f0c93486c39776ed0a058a8649602
2011-05-09 17:03:35 -07:00
Dianne Hackborn
e2515eebf4 Better compat mode part one: start scaling windows.
First step of improving app screen size compatibility mode.  When
running in compat mode, an application's windows are scaled up on
the screen rather than being small with 1:1 pixels.

Currently we scale the application to fill the entire screen, so
don't use an even pixel scaling.  Though this may have some
negative impact on the appearance (it looks okay to me), it has a
big benefit of allowing us to now treat these apps as normal
full-screens apps and do the normal transition animations as you
move in and out and around in them.

This introduces fun stuff in the input system to take care of
modifying pointer coordinates to account for the app window
surface scaling.  The input dispatcher is told about the scale
that is being applied to each window and, when there is one,
adjusts pointer events appropriately as they are being sent
to the transport.

Also modified is CompatibilityInfo, which has been greatly
simplified to not be so insane and incomprehendible.  It is
now simple -- when constructed it determines if the given app
is compatible with the current screen size and density, and
that is that.

There are new APIs on ActivityManagerService to put applications
that we would traditionally consider compatible with larger screens
in compatibility mode.  This is the start of a facility to have
a UI affordance for a user to switch apps in and out of
compatibility.

To test switching of modes, there is a new variation of the "am"
command to do this: am screen-compat [on|off] [package]

This mode switching has the fundamentals of restarting activities
when it is changed, though the state still needs to be persisted
and the overall mode switch cleaned up.

For the few small apps I have tested, things mostly seem to be
working well.  I know of one problem with the text selection
handles being drawn at the wrong position because at some point
the window offset is being scaled incorrectly.  There are
probably other similar issues around the interaction between
two windows because the different window coordinate spaces are
done in a hacky way instead of being formally integrated into
the window manager layout process.

Change-Id: Ie038e3746b448135117bd860859d74e360938557
2011-05-09 17:03:24 -07:00
Robert Greenwalt
9dd0cb8977 am b98b56c2: am a142512a: Broadcast SIM Refresh to all registered components
* commit 'b98b56c21faac16cea97e8cdcba485365f86c50f':
  Broadcast SIM Refresh to all registered components
2011-05-09 17:02:28 -07:00
Wink Saville
ba54feb094 am 45364dc4: Merge "Telephony: Signal Strength Changes." into honeycomb-LTE
* commit '45364dc4bfe3e6118ad61f1d38489fe63418699a':
  Telephony: Signal Strength Changes.
2011-05-09 17:02:07 -07:00
Kazuhiro Ondo
192122e706 Fix issue on infinite retry config in RetryManager
"infinite retry config is lost when "resetRetryCount" is called.

Change-Id: I2b737efa6092ad1254c8dc25840ec429f5c6e882
2011-05-09 17:01:07 -07:00
Robert Greenwalt
b98b56c21f am a142512a: Broadcast SIM Refresh to all registered components
* commit 'a142512a5009d7b4c422d23b1d7bab8d219eb50b':
  Broadcast SIM Refresh to all registered components
2011-05-09 16:58:52 -07:00
Wink Saville
45364dc4bf Merge "Telephony: Signal Strength Changes." into honeycomb-LTE 2011-05-09 16:57:32 -07:00
Robert Greenwalt
a142512a50 Broadcast SIM Refresh to all registered components
There could be multiple registrants like SIM, STK.
Port of 6228 from partner repo.

Change-Id: I0756d8b69e30058409e0279f65a99a1aa091e13d
2011-05-09 16:46:39 -07:00
Teng-Hui Zhu
b109c88771 Exit full screen support on java side
bug:4312214

Change-Id: Id3c755db0a824d42f1f8d1a0952f63d2078d163a
2011-05-09 14:56:19 -07:00
Robert Ly
8755cc0919 am a3838018: am 5d032390: am 27944242: am c3038308: Merge "Doc change: adding ADK doc. still need to add the adk pkg download link when we get the package" into honeycomb-mr1
* commit 'a38380183329912a9d79a84ad5265c6c9dbef434':
  Doc change: adding ADK doc. still need to add the adk pkg download link when we get the package
2011-05-09 14:52:16 -07:00
Marco Nelissen
04f32bdfd2 Merge "Fix mode." 2011-05-09 14:49:36 -07:00
Robert Ly
a383801833 am 5d032390: am 27944242: am c3038308: Merge "Doc change: adding ADK doc. still need to add the adk pkg download link when we get the package" into honeycomb-mr1
* commit '5d03239063d0c5148d920a0992da8974c6e0a8ce':
  Doc change: adding ADK doc. still need to add the adk pkg download link when we get the package
2011-05-09 14:47:43 -07:00
Robert Ly
5d03239063 am 27944242: am c3038308: Merge "Doc change: adding ADK doc. still need to add the adk pkg download link when we get the package" into honeycomb-mr1
* commit '279442428ab1000b57273f172453b712b03cb9fd':
  Doc change: adding ADK doc. still need to add the adk pkg download link when we get the package
2011-05-09 14:43:28 -07:00
Robert Ly
279442428a am c3038308: Merge "Doc change: adding ADK doc. still need to add the adk pkg download link when we get the package" into honeycomb-mr1
* commit 'c3038308a765de2826997b65c175bf752b45bc70':
  Doc change: adding ADK doc. still need to add the adk pkg download link when we get the package
2011-05-09 14:41:00 -07:00
Robert Ly
c3038308a7 Merge "Doc change: adding ADK doc. still need to add the adk pkg download link when we get the package" into honeycomb-mr1 2011-05-09 14:25:53 -07:00
Marco Nelissen
19399f4ed6 Fix mode.
Change-Id: I94813a4a73ea3a7b11e0747fda479be87e697072
2011-05-09 14:06:57 -07:00
Marco Nelissen
f470ced7cd Merge "When using O_CREAT, the mode should be specified." 2011-05-09 13:03:43 -07:00
Marco Nelissen
d868913728 When using O_CREAT, the mode should be specified.
Change-Id: Id364072fce62388eba47207a97800eb185480633
2011-05-09 12:46:56 -07:00