598 Commits

Author SHA1 Message Date
Dianne Hackborn
2c22882181 Merge "Plumb information from the framework about asec container size." 2011-06-29 14:05:01 -07:00
Andreas Huber
eb91630715 Support for "streaming" non-transport streams by first converting them to ts packets.
Change-Id: Ia753a1ab99039f54ce3678a38e997902372b5fa5
2011-06-28 16:08:24 -07:00
Dianne Hackborn
292f8bc9d1 Plumb information from the framework about asec container size.
Change-Id: Ie0ec3cb6d463aefa341a8cbea80be790451ba5e3
2011-06-28 15:02:44 -07:00
Andreas Huber
d11eccf3a8 Merge "Multiple changes to ACodec/codec tools:" 2011-06-28 12:48:01 -07:00
Andreas Huber
e366f52b15 Multiple changes to ACodec/codec tools:
Make sure sf2 does not coalesce input buffers, generalize ACodec's codec
instantiation based on OMXCodec's list of eligible component names.

Some changes/additions to the "sf2" commandline tool

Make surface options consistent with stagefright tool, i.e. use '-S' instead of '-s'
New option '-R' renders surface-allocated buffers.

Also fixes a longstanding bug introduced when generalizing from surfaces to native windows that never used surface-allocated buffers in sf2 even when the option was specified.

Change-Id: I59fd533f0f6ef0337ebe2806ddc81a46878eb3ae
2011-06-28 10:51:41 -07:00
Andreas Huber
8413251083 New option in the stagefright commandline tool.
Use '-S' to allocate decoder buffers from a surface
Use '-T' to allocate decoder buffers from a surface texture

Change-Id: Ib71ea53d0fd1b2def08bfeac2fd8bcbdc1938161
2011-06-28 10:11:09 -07:00
Chia-chi Yeh
b2b201395a KeyStore: fix test-keystore
Change-Id: I1dcbd5c3cc7569c397d2480cda76288a9e28cd5c
2011-06-27 10:38:10 -07:00
Chia-chi Yeh
14f14863c5 KeyStore: allow system user to get secrets from keystore.
Change-Id: I9cb41344c17fb33e6614a45d46368a9c43e3dce7
2011-06-26 18:24:19 -07:00
Dianne Hackborn
46d110329e Small cleanup of am/pm commands.
Change-Id: I5af730bc177635821a82d4dd3ec9130a5dcd525a
2011-06-24 13:22:45 -07:00
Brian Carlstrom
0ff6d7ee17 Merge "Reinitialize KeyStore::mMasterKey after unlock (and add test-keystore)" 2011-06-23 10:26:38 -07:00
Brian Carlstrom
ac8a1b2198 Reinitialize KeyStore::mMasterKey after unlock (and add test-keystore)
Bug: 4599735

Change-Id: Iee38a2e2929c45b6405214c9012819da09b273af
2011-06-23 02:10:23 -07:00
Andreas Huber
65f993e0d8 Reconstruct sync frame indication for content served by the MPEG2TSExtractor
Strip data up to the first IDR frame if necessary.

Change-Id: I4a096785eb1a17b7484983788e223d188454771d
2011-06-22 14:57:25 -07:00
Christopher Tate
e26e96bcc1 Pass the data fd number as a command line argument to 'bu'
This way we don't have to muck with stdin/stdout just to get known
fds for data handling.

Change-Id: If87d19f4867c883a32d4e9afb91b915511b9df19
2011-06-20 19:26:31 -07:00
Dianne Hackborn
0ac3031c15 Implement remaining infrastructure for user disabling apps.
Change-Id: If8135eb0e27ec36f8f159eb7b6397add7acd0299
2011-06-17 14:49:45 -07:00
James Dong
6e4ba2bf35 Merge "Add an option to force to use HW codec in stagefright cmd tool" 2011-06-13 18:47:20 -07:00
James Dong
78b9c381aa Add an option to force to use HW codec in stagefright cmd tool
Change-Id: If6c277dd5a3f7a0b62acd6721343618b0be085fc
2011-06-13 17:23:01 -07:00
Mathias Agopian
7bb843ca07 unify SurfaceTexture and Surface
Add the concept of synchronous dequeueBuffer in SurfaceTexture
Implement {Surface|SurfaceTextureClient}::setSwapInterval()
Add SurfaceTexture logging
fix onFrameAvailable
2011-06-13 15:51:35 -07:00
Dianne Hackborn
f741e679c4 resolved conflicts for merge of e2aa0490 to master
Change-Id: Id0448a1598fc93aca0652b29253e02586e35a067
2011-06-09 17:50:36 -07:00
Dianne Hackborn
a1396dfe7a am 02140891: Merge "Work on issue #4518815: Compatibility mode introduces compatibility regression..." into honeycomb-mr2
* commit '021408910af170268cb486910d4dd5a7d838c2bb':
  Work on issue #4518815: Compatibility mode introduces compatibility regression...
2011-06-08 20:02:43 -07:00
Dianne Hackborn
5fd2169eab Work on issue #4518815: Compatibility mode introduces compatibility regression...
...for Market App iRunner

There were a lot of serious issues with how we updated (or often didn't update)
the display and resource state when switching compatibility mode in conjunction
with restarting and updating application components.  This addresses everything
I could find.

Unfortunately it does *not* fix this particular app.  I am starting to think this
is just an issue in the app.  This change does fix a number of other problems
I could repro, such as switching the compatibility mode of an IME.

Also a few changes here and there to get rid of $#*&^!! debug logs.

Change-Id: Ib15572eac9ec93b4b9966ddcbbc830ce9dec1317
2011-06-08 18:45:43 -07:00
Dianne Hackborn
b5c462f801 Merge "Add force-stop subcommand for 'am'." 2011-06-06 19:01:48 -07:00
Brian Carlstrom
e2afc2420d KeyStore.reset changes
restore keystore reset behavior of removing master key.
otherwise after reboot keystore has is LOCKED and not UNINITIALIZED
	cmds/keystore/keystore.cpp

when removing password, reset the keystore, so it doesn't remain
locked with a now bogus password.

	core/java/com/android/internal/widget/LockPatternUtils.java

Change-Id: If5e0bb50b42599e9ca27a8b91d6cec12528419a1
2011-06-02 16:24:45 -07:00
Christopher Tate
1a536e642f Merge "Restore from a previous full backup's tarfile" 2011-06-01 15:14:36 -07:00
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
Brian Carlstrom
5cfee3fabb Integrating keystore with keyguard (Part 1 of 4)
Summary:

frameworks/base
  keystore rewrite
  keyguard integration with keystore on keyguard entry or keyguard change
  KeyStore API simplification

packages/apps/Settings
  Removed com.android.credentials.SET_PASSWORD intent support
  Added keyguard requirement for keystore use

packages/apps/CertInstaller
  Tracking KeyStore API changes
  Fix for NPE in CertInstaller when certificate lacks basic constraints

packages/apps/KeyChain
  Tracking KeyStore API changes

Details:

frameworks/base

   Move keystore from C to C++ while rewriting password
   implementation. Removed global variables. Added many comments.

	cmds/keystore/Android.mk
	cmds/keystore/keystore.h
	cmds/keystore/keystore.c => cmds/keystore/keystore.cpp
	cmds/keystore/keystore_cli.c => cmds/keystore/keystore_cli.cpp

   Changed saveLockPattern and saveLockPassword to notify the keystore
   on changes so that the keystore master key can be reencrypted when
   the keyguard changes.

	core/java/com/android/internal/widget/LockPatternUtils.java

   Changed unlock screens to pass values for keystore unlock or initialization

	policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
	policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java

   KeyStore API changes
   - renamed test() to state(), which now return a State enum
   - made APIs with byte[] key arguments private
   - added new KeyStore.isEmpty used to determine if a keyguard is required

	keystore/java/android/security/KeyStore.java

   In addition to tracking KeyStore API changes, added new testIsEmpty
   and improved some existing tests to validate expect values.

	keystore/tests/src/android/security/KeyStoreTest.java

packages/apps/Settings

    Removing com.android.credentials.SET_PASSWORD intent with the
    removal of the ability to set an explicit keystore password now
    that the keyguard value is used. Changed to ensure keyguard is
    enabled for keystore install or unlock. Cleaned up interwoven
    dialog handing into discrete dialog helper classes.

	AndroidManifest.xml
	src/com/android/settings/CredentialStorage.java

    Remove layout for entering new password

	res/layout/credentials_dialog.xml

    Remove enable credentials checkbox

	res/xml/security_settings_misc.xml
	src/com/android/settings/SecuritySettings.java

    Added ability to specify minimum quality key to ChooseLockGeneric
    Activity. Used by CredentialStorage, but could also be used by
    CryptKeeperSettings. Changed ChooseLockGeneric to understand
    minimum quality for keystore in addition to DPM and device
    encryption.

	src/com/android/settings/ChooseLockGeneric.java

    Changed to use getActivePasswordQuality from
    getKeyguardStoredPasswordQuality based on experience in
    CredentialStorage. Removed bogus class javadoc.

	src/com/android/settings/CryptKeeperSettings.java

    Tracking KeyStore API changes

	src/com/android/settings/vpn/VpnSettings.java
	src/com/android/settings/wifi/WifiSettings.java

   Removing now unused string resources

	res/values-af/strings.xml
	res/values-am/strings.xml
	res/values-ar/strings.xml
	res/values-bg/strings.xml
	res/values-ca/strings.xml
	res/values-cs/strings.xml
	res/values-da/strings.xml
	res/values-de/strings.xml
	res/values-el/strings.xml
	res/values-en-rGB/strings.xml
	res/values-es-rUS/strings.xml
	res/values-es/strings.xml
	res/values-fa/strings.xml
	res/values-fi/strings.xml
	res/values-fr/strings.xml
	res/values-hr/strings.xml
	res/values-hu/strings.xml
	res/values-in/strings.xml
	res/values-it/strings.xml
	res/values-iw/strings.xml
	res/values-ja/strings.xml
	res/values-ko/strings.xml
	res/values-lt/strings.xml
	res/values-lv/strings.xml
	res/values-ms/strings.xml
	res/values-nb/strings.xml
	res/values-nl/strings.xml
	res/values-pl/strings.xml
	res/values-pt-rPT/strings.xml
	res/values-pt/strings.xml
	res/values-rm/strings.xml
	res/values-ro/strings.xml
	res/values-ru/strings.xml
	res/values-sk/strings.xml
	res/values-sl/strings.xml
	res/values-sr/strings.xml
	res/values-sv/strings.xml
	res/values-sw/strings.xml
	res/values-th/strings.xml
	res/values-tl/strings.xml
	res/values-tr/strings.xml
	res/values-uk/strings.xml
	res/values-vi/strings.xml
	res/values-zh-rCN/strings.xml
	res/values-zh-rTW/strings.xml
	res/values-zu/strings.xml
	res/values/strings.xml

packages/apps/CertInstaller

  Tracking KeyStore API changes
	src/com/android/certinstaller/CertInstaller.java

  Fix for NPE in CertInstaller when certificate lacks basic constraints
	src/com/android/certinstaller/CredentialHelper.java

packages/apps/KeyChain

  Tracking KeyStore API changes
	src/com/android/keychain/KeyChainActivity.java
	src/com/android/keychain/KeyChainService.java
	support/src/com/android/keychain/tests/support/IKeyChainServiceTestSupport.aidl
	support/src/com/android/keychain/tests/support/KeyChainServiceTestSupport.java
	tests/src/com/android/keychain/tests/KeyChainServiceTest.java

Change-Id: Ic141fb5d4b43d12fe62cb1e29c7cbd891b4be35d
2011-06-01 14:29:59 -07:00
Mathias Agopian
c12b7ba81e sensorservice can now be ran standalone
Change-Id: I6e757f31f1e020046038e5ab84e71b8689a0aed3
2011-05-27 16:35:11 -07:00
Xianzhu Wang
351f32270a Add force-stop subcommand for 'am'.
It's useful for some testing and debugging, to ensure all processes
are stopped before testing. 'kill' doesn't always work because sometimes the
system will restart the process immediately (e.g. if an app is running in
background).

Change-Id: I2c0caa38f74ee65ad6c35172fbf505227be7e7c3
2011-05-27 10:26:04 +08:00
Kenny Root
5e34a1945a am 1d8f8819: Merge "Break apart queries to getInstalled* API DO NOT MERGE" into honeycomb-mr2
* commit '1d8f8819f1e98cdf3b7756396158613e95fe9eb6':
  Break apart queries to getInstalled* API DO NOT MERGE
2011-05-26 13:34:42 -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
Kenny Root
1bb6cf18c0 Break apart queries to getInstalled* API DO NOT MERGE
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: Ia3a8cdaa94581ed9336f2e05694b8c8a5f757bce
2011-05-26 09:53:24 -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