571 Commits

Author SHA1 Message Date
Christopher Tate
75a99709ac Restore from a previous full backup's tarfile
Usage:  adb restore [tarfilename]

Restores app data [and installs the apps if necessary from the backup
file] captured in a previous invocation of 'adb backup'.  The user
must explicitly acknowledge the action on-device before it is allowed
to proceed; this prevents any "invisible" pushes of content from the
host to the device.

Known issues:

* The settings databases and wallpaper are saved/restored, but lots
  of other system state is not yet captured in the full backup.  This
  means that for practical purposes this is usable for 3rd party
  apps at present but not for full-system cloning/imaging.

Change-Id: I0c748b645845e7c9178e30bf142857861a64efd3
2011-06-01 15:09:55 -07:00
Mathias Agopian
c12b7ba81e sensorservice can now be ran standalone
Change-Id: I6e757f31f1e020046038e5ab84e71b8689a0aed3
2011-05-27 16:35:11 -07:00
James Dong
e8b26dcec7 Extract embedded cover art (aka poster frame) in mp4 files
Change-Id: Ic9421ee27b9aa3b27df00878b887de20f25d232b
2011-05-26 11:31:16 -07:00
Jeff Brown
ebed7d6e35 Support wrapping app processes to inject debug instrumentation.
Bug: 4437846

Change-Id: I4552501c693716b14714afb5c5248edaca9547ab
2011-05-24 12:01:25 -07:00
Kenny Root
a51b6fd6f8 resolved conflicts for merge of b2d0ee16 to master
Change-Id: I4483a6d0ccecfea4a1e66bb6eba80d13e8b9a3a4
2011-05-19 15:02:18 -07:00
Kenny Root
e6cd0c747e resolved conflicts for merge of 2433c443 to honeycomb-plus-aosp
Change-Id: I3385f57e5761679e6700bcbe3c41deb3ecd43ba1
2011-05-19 12:48:14 -07:00
Kenny Root
2433c443bb am f2006f31: Merge "Break apart queries to getInstalled* API" into gingerbread
* commit 'f2006f3123dcdf598e052051041b49c89710b53e':
  Break apart queries to getInstalled* API
2011-05-19 11:04:01 -07:00
JP Abgrall
cb4d1a91fc dumpstate: don't attempt to use vril-dump, it breaks adb bugreport
http://b/4442803 vril-dump's usage of adb causes bugreport to hang

lcm-dump.sh re-uses adb which breaks.

Change-Id: I5eeb30f78793c0a6d10bfaf0097d6aa7b811cf66
Signed-off-by: JP Abgrall <jpa@google.com>
2011-05-17 21:35:54 -07:00
Dianne Hackborn
9d31154d0b am b68c768d: am 41744836: am 7916ac65: Add new command line option to change global screen size.
* commit 'b68c768ddb57407bc253230c677056329c9e4bae':
  Add new command line option to change global screen size.
2011-05-16 21:39:47 -07:00
Dianne Hackborn
417448369c am 7916ac65: Add new command line option to change global screen size.
* commit '7916ac65dc492e4e1431879875c77d7121fbf82e':
  Add new command line option to change global screen size.
2011-05-16 21:21:24 -07:00
Dianne Hackborn
7916ac65dc Add new command line option to change global screen size.
For example:

adb shell am display-size 1024x600

Change-Id: I5df462acd3323bdaaaefa3126faea7dd8595b726
2011-05-16 20:55:41 -07:00
Christopher Tate
14a2935809 bu - add handling for both 'backup' and 'restore' modes
Requires a parallel change in adb to support the new syntax.

Change-Id: Iff30cb247e424b6817af121c018f3c4e40b9f81a
2011-05-16 16:57:32 -07:00
Dianne Hackborn
2a20583a5f am 700ab1c7: Merge "DO NOT MERGE. Integrate from master: Improve activity manager debug dumps." into honeycomb-mr2
* commit '700ab1c75862babba90f54e02bdc877becd4f4fc':
  DO NOT MERGE.  Integrate from master: Improve activity manager debug dumps.
2011-05-16 11:06:28 -07:00
Wink Saville
7b06e3516c am 7a2a87d6: am a1c29d30: Merge "Support for Vendor RIL dump of baseband logs" into honeycomb-LTE
* commit '7a2a87d6457885c5d3d4dbf335be101aa9c5c3ab':
  Support for Vendor RIL dump of baseband logs
2011-05-15 14:47:45 -07:00
John Michelau
71bbe7a87c Support for Vendor RIL dump of baseband logs
Added hook for Vendor RIL to provide a dump of the underlying
baseband's logs.  The Vendor RIL must implement the actual executable
that does the capture.

Change-Id: I40fdf2ccc4bb14a9cef92b7866fad19684502524
2011-05-14 18:54:47 -07:00
Dianne Hackborn
9a84983a9f DO NOT MERGE. Integrate from master: Improve activity manager debug dumps.
Activity manager now does all dump requests into apps
asynchronously, so it can nicely timeout if there is an
app problem.  Also lots of general cleanup of the am
dump output.

Change-Id: I99447b87f77a701af52aeca984d93dfe931f065d
2011-05-13 18:38:19 -07:00
Dianne Hackborn
88bf0e5ae7 Merge "resolved conflicts for merge of 0e59729b to master" 2011-05-12 17:15:22 -07:00
Dianne Hackborn
3d0724dc22 resolved conflicts for merge of 0e59729b to master
Change-Id: I2d3a6bddf66b1df0c101c45ea2fec1cf65caf01b
2011-05-12 15:39:41 -07:00
Dianne Hackborn
972808164a am 0f1de9ad: New compat mode front end: UI and persistence.
* commit '0f1de9adde0b52d2a385a76232bd7ac30c3eeea2':
  New compat mode front end: UI and persistence.
2011-05-12 15:01:53 -07:00
Dima Zavin
34bb419e59 update for new audio.h header location
Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876
Signed-off-by: Dima Zavin <dima@android.com>
2011-05-12 14:09:57 -07:00
Dianne Hackborn
0f1de9adde New compat mode front end: UI and persistence.
Adds a really crappy UI for toggling compat mode.

Persists compat mode selection across boots.

Turns on compat mode by default for newly installed apps.

Change-Id: Idc83494397bd17c41450bc9e9a05e4386c509399
2011-05-12 13:28:45 -07:00
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
Dianne Hackborn
aa9d84c37e resolved conflicts for merge of 05be6d6f to master
Change-Id: Ic6a6c5bb300f6f1d43f9ed550b284282b4f16212
2011-05-09 19:00:59 -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
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
Mathias Agopian
59f19e48c1 clear boot-animation background with black (not transparent) pixels
Change-Id: I2fcf9f303e8324cefaa2d96f1c46647f70980bb2
2011-05-06 19:22:12 -07:00
Robert Greenwalt
7277744e8d am 67c92fbd: am 5f2ff42b: Add data to bugreports.
* commit '67c92fbdfe52a94804f021c2255132c0f3550875':
  Add data to bugreports.
2011-04-29 10:26:26 -07:00
Robert Greenwalt
5f2ff42b28 Add data to bugreports.
Include IPv6 routes and iptables data.

Change-Id: Ie9bca8a935f93933082eef0c45f83a17be76b7ed
2011-04-29 09:43:49 -07:00
Dima Zavin
24fc2fb1c5 audio/media: convert to using the audio HAL and new audio defs
Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5
Signed-off-by: Dima Zavin <dima@android.com>
2011-04-27 13:10:10 -07:00
Mathias Agopian
9638e5c167 Get rid of the "pid" parameter from createSurface
Change-Id: I28635e3f803e6abe965d79998e305f54a202465d
2011-04-20 14:26:11 -07:00
Amith Yamasani
25641ca1ac Merge "Plumbing in PackageManager and installd for multi-user support." 2011-04-19 10:41:20 -07:00
Nick Kralevich
08d1f93723 Merge "Make installd resistant to umask changes." 2011-04-19 10:10:54 -07:00
Kenny Root
0e2c0f37d9 Break apart queries to getInstalled* API
To avoid blowing past the Binder IPC limit, change the
PackageManagerService to have a DB-like interaction where the client
tells the service the last "row" that it read.

The fact that we use a HashMap instead of a TreeMap makes this
problematic. For now we're just making a new ArrayList for the keys and
then sorting them for each call. This can make the API slower for callers
of this, but it's probably greatly overshadowed by the cost of the data
transfer itself.

Bug: 4064282
Change-Id: Ic370fd148d4c3813ae4f2daffa1a7c28d63d5a09
2011-04-19 09:57:54 -07:00
Amith Yamasani
0b285499db Plumbing in PackageManager and installd for multi-user support.
- Create /data/user directory and symlink /data/user/0 -> /data/data for
  backward compatibility
- Create data directories for all packages for new user

- Remove data directories when removing a user

- Create data directories for all users when a package is created

- Clear / Remove data for multiple users

- Fixed a bug in verifying the location of a system app

- pm commands for createUser and removeUser (will be disabled later)

- symlink duplicate lib directories to the original lib directory

Change-Id: Id9fdfcf0e62406a8896aa811314dfc08d5f6ed95
2011-04-15 15:15:27 -07:00
Nick Kralevich
f68327e7e2 Make installd resistant to umask changes.
Bug: 3272072
Change-Id: Ic2d241afcb4d0dabd63fcdadf13b2d48b7f398e8
2011-04-14 16:20:03 -07:00
Elliott Hughes
d195e5ab40 Replace a custom AndroidRuntime::findClass with a more targeted fix.
This seems simpler and more contained, and I think the comment explaining
why hoop-jumping is necessary is a bit clearer now.

Change-Id: Ief4afd7cbb42188ed835fce23e497520bdb753a8
2011-04-13 16:43:15 -07:00
Gloria Wang
162ee49e1c - Add another parameter in notify() to be able to send timed text sample
through listener during video playback.
- Add OnTimedTextListener in the MediaPlayer
For feature request 800939.

Change-Id: I65072c27acb4c0037109a72be38c73e9f667420f
2011-04-13 11:11:34 -07:00
Brian Carlstrom
8c2a1a90a8 Add keychain user with special keystore access permissions
Change-Id: I02fe5171add62c5cd9f57b01bc137f3bc1cb3a69
2011-04-08 14:06:39 -07:00
Dianne Hackborn
e17aeb3103 Improve activity manager debug dumps.
Activity manager now does all dump requests into apps
asynchronously, so it can nicely timeout if there is an
app problem.  Also lots of general cleanup of the am
dump output.

Change-Id: Id0dbccffb217315aeb85c964e379833e6aa3f5af
2011-04-07 18:26:15 -07:00
Kenny Root
86c9584559 Update installd to allow multiuser
* Add ability to select different personas to generate the path to be
  created.

* Move hardcoded paths to read from init's set environment.

* Add unit tests for all the utility functions that build strings to
  make sure they're correct.

* Fill in persona with "0" all the time now. Will be plumbed through in
  later CL.

Change-Id: I0a7f6e3640cb6b052f8823080886ee79e90b679f
2011-04-05 10:45:35 -07:00
Dmitry Shmidt
829f8e5ae5 Merge "bugreport: Add ping wlan gateway, dns1 and dns2 servers" 2011-03-29 16:28:00 -07:00
Dmitry Shmidt
9abfeb4123 bugreport: Add ping wlan gateway, dns1 and dns2 servers
Change-Id: I91c2b9be217fabe8f854c637c972377bc811cca8
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-03-29 16:21:12 -07:00
Mathias Agopian
696257ccf3 merge libsurfaceflinger_client into libgui
this is the first step in unifying surfacetexture and surface.
for this reason the header files were not moved, as most of them
will eventually go away.

NOTE: currently we keep libsurfaceflinger_client.so as an empty
library to workaround prebuilt binaries wrongly linking against
it.

Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
2011-03-25 18:42:40 -07:00
James Dong
199d1c131d Fix missing AOSP copyright headers for more files
o Update the copyright date on InputDispatcher_test.cpp and InputReader_test.cpp
  because these two files were moved from other places to the current location,
  and were actually created in 2010.

bug - 4119349

Change-Id: Ic93b81ddafb58e9e72a2e9e02ca3d9f173d6dca7
2011-03-17 14:43:12 -07:00
Kenny Root
3dee21eb0f Merge "Switch to returnCode for IPackageDeleteObserver" 2011-03-02 08:50:42 -08:00
Kenny Root
c39bb4aaa7 Switch to returnCode for IPackageDeleteObserver
Before the IPackageDeleteObserver only knew whether the deletion
succeeded or failed, but not the reason why.

Bug: 2520191
Change-Id: I1f0d7c04f06c539660b6e17e7e133defb0f61b5b
2011-03-01 09:27:57 -08:00
Andreas Huber
190c03cb32 Add the option '-S' to use surface allocated buffers in the stagefright cmdline tool.
Change-Id: Ic84eeed1679d6bf68c92de0e20d30e7a3c4d410f
2011-02-28 09:23:13 -08:00
Dmitry Shmidt
285a8f52c5 bugreport: Remove wlan FW dump log
Change-Id: I7f211c8125e6c3ba99e9c34e1221dfaa5ac1bee1
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-02-14 11:08:01 -08:00
Mathias Agopian
1eac1c8e48 am bfe9e9cf: am cc24170d: Merge "fix [3374821] Cannot take screenshot of HC preview" into honeycomb
* commit 'bfe9e9cf18ca84214bc59d875d74ca63a27e2414':
  fix [3374821] Cannot take screenshot of HC preview
2011-02-09 13:27:01 -08:00
Mathias Agopian
9afc7b02fa fix [3374821] Cannot take screenshot of HC preview
the screencap tool will now fallback to /dev/graphics/fb0 is the
screenshot API fails.

Change-Id: I3f593847c72f4ca5429d4f64ca22bd5436dd2051
2011-02-08 20:43:00 -08:00