294 Commits

Author SHA1 Message Date
Dan Egnor
ca14320fa2 Merge "More consistent and clear traces.txt reporting." 2010-03-08 19:23:01 -08:00
Dan Egnor
efd1393801 More consistent and clear traces.txt reporting.
Print ANR traces.txt even if it's old.
Print more detailed error messages about VM trace dumps.

Change-Id: I067c90b8f3b3647b6136528eff3120e6cfea5715
2010-03-08 19:21:32 -08:00
Chia-chi Yeh
3eeffc1857 Merge "keystore: add AID_ROOT into the user table." 2010-03-08 17:50:56 -08:00
Chia-chi Yeh
4165dd2159 keystore: add AID_ROOT into the user table.
Change-Id: I4b9cf24d75ca79583d7913bbb2c33745a2316cde
2010-03-09 09:44:07 +08:00
San Mehat
54aa577ea2 dumpstate: Add secure container + mounted filesystems to bugreport
Change-Id: I0cb465da86976f5cce3594c4bb846aa6510c52d6
Signed-off-by: San Mehat <san@google.com>
2010-03-08 08:58:03 -08:00
Chia-chi Yeh
61b09cbc02 keystore: allow '\0's in keys and add guards for cplusplus.
Change-Id: I0af6ed7c5d51ce4ca39cb837e475942800cf6e2d
2010-03-08 17:21:35 +08:00
Christopher Tate
4528186e0d Refactor android.backup => android.app.backup
Change-Id: I0b21316ff890d7f3c7d4b82837bb60670724c2e8
2010-03-05 16:27:15 -08:00
Christian Sonntag
485c3a16ce fix hex parsing of bmgr 2010-03-04 14:59:04 -08:00
Dianne Hackborn
c1552397be Allow multiple original-package tags.
Also fix some issues with moving files from update commands.
2010-03-03 16:26:26 -08:00
Dianne Hackborn
8f7f35e0cc Add new -W option to Am to wait for the start to complete. 2010-02-26 16:34:33 -08:00
Christopher Tate
7d411a3b94 Add single-package restore to Bmgr feature set
Also sanity-check the package name on the Backup Manager side, failing gracefully
if the given package is not a backup/restore participant.

Bug: 2293977

Change-Id: I3575046ffcaa3cf45c1c602824baeadd64082f70
2010-02-26 12:45:22 -08:00
Oscar Montemayor
8fe5c9e39d Replacing hard-coded mount point for ASEC with a getenv() call. 2010-02-25 00:06:41 -08:00
Doug Zongker
3963cca7ff Merge "add "startservice" option to am command-line utility" 2010-02-24 11:38:08 -08:00
Doug Zongker
6fb35fe1ac add "startservice" option to am command-line utility
Allows starting Services in addition to Activities.

Change-Id: Ib078115f6200faa8907b35909af2f64b0c563b38
2010-02-24 11:37:35 -08:00
Suchi Amalapurapu
cf6eaeaae9 Some framework fixes for apps on sd
change hard coded path in installd
fix tests
Work around for renaming containers.
Do forced unmount when destroying containers.
Force a gc in default container service to release handle to parsed package
and thus avoid getting killed by vold
Some cosmetic changes to PackageManager api.
Unit tests for renaming container for MountService
Remove internal size limit on app to be installed.
2010-02-24 11:31:36 -08:00
Andreas Huber
875d259c95 Merge "Tag stagefright development tools as "debug-only"." 2010-02-24 09:12:03 -08:00
Andreas Huber
66961105e5 Tag stagefright development tools as "debug-only". 2010-02-23 16:55:02 -08:00
Dmitry Shmidt
5386b3f91a Merge "Add Arp Cache dump" 2010-02-23 15:25:46 -08:00
Dmitry Shmidt
84b72ec3b4 Add Arp Cache dump
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-02-23 15:21:11 -08:00
Suchi Amalapurapu
8946dd3355 Move package from internal to external and vice versa. 2010-02-19 14:20:54 -08:00
Andreas Huber
1f13ceb6d2 Merge "Better diagnostics for the stagefright tool and codec performance." 2010-02-17 15:06:44 -08:00
Andreas Huber
6c9bf1c1de Better diagnostics for the stagefright tool and codec performance.
related-to-bug: 2450938
2010-02-17 14:58:07 -08:00
Dan Egnor
6a70d7d1e2 Don't overwrite ANR traces.txt if it can't be renamed (usually
due to lack of permissions, usually due to an old adb running
"dumpstate" directly rather than via bugreport).
2010-02-17 14:25:03 -08:00
Suchi Amalapurapu
642b7c0f19 Merge "Include install location preference when installing packages. Changes include Add new remote call in default container service to determine install location. Rename INSTALL_ON_SDCARD Remove recommentAppInstall method Add some additional flags used in remote stubs. Move check for protected apps prior to copy. Unit tests" 2010-02-16 09:23:51 -08:00
Suchi Amalapurapu
5b993ce7bc Include install location preference when installing packages.
Changes include
Add new remote call in default container service to determine
install location.
Rename INSTALL_ON_SDCARD
Remove recommentAppInstall method
Add some additional flags used in remote stubs.
Move check for protected apps prior to copy.
Unit tests

DefaultContainerService first parses the file uri(if content uri is specified
it returns a default install internal only value) and returns
a recommended location. Based on which the temporary id is determined
either a file name or a container id and the file is copied there.
This is then later renamed during install.
Todo's light weight parsing of package when determining location since we
just need the install location attribute only when finding out
recomended location. This will also enable to move the check for
updated system apps(cannot be on sdcard) prior to copying.
2010-02-12 18:50:47 -08:00
Dianne Hackborn
d705fd2b0a Tweak updatecmds to be able to move entire directories. 2010-02-12 16:29:50 -08:00
Marco Nelissen
6b03844b48 Fix simulator build. 2010-02-11 14:41:20 -08:00
Mathias Agopian
000479f9e3 split libsurfaceflinger_client and libcamera_client out of libui 2010-02-11 13:16:22 -08:00
David 'Digit' Turner
0dd50e6126 Fix installd to create /data/data/<pkgname> with appropriate permissions.
The directory was created with read+exec rights for others.
The patch restricts it to only exec rights.
2010-02-09 19:02:38 -08:00
James Dong
9446c50468 Merge "When the extractor is not able to be created successfully, don't crash" 2010-02-05 12:05:42 -08:00
James Dong
e4cfcb82a8 When the extractor is not able to be created successfully, don't crash 2010-02-04 18:11:32 -08:00
Chris Tate
5c1779b8ac Merge "Add single-package restore from an app's most-recent data" 2010-02-04 16:27:42 -08:00
Christopher Tate
8472581aa3 Add single-package restore from an app's most-recent data
Renamed the RestoreSession performRestore() method to restoreAll(), and
added a new restorePackage() method that only restores the single
specified app.  In order to restore an app other than itself, the
caller must hold the android.permission.BACKUP permission.

This change also introduces dataset tracking:  the Backup Manager
persistently remembers both the current backup dataset's identity
and that of the "ancestral" dataset, i.e. the one most recently used
for a whole-device restore such as performed by SetupWizard.  When a
single package is restored via restorePackage(), the selection of
most-recent dataset to use is this:

1. The data from the currently-active backup dataset, if such exists.
   An app that has ever backed up data will therefore get its last-
   known-good data.

2. The app's data from the ancestral dataset, if such exists.  This
   covers the case of a factory reset followed by reinstallation of
   an app at a later time.  The app had not yet backed anything up
   post-wipe, but the old data is in the ancestral dataset and should
   be brought forward when the app reappears.

3. If neither 1. nor 2. exist, there is no data to restore, so just
   skip it and return failure.

Note that the infrastructure to automatically attempt a restore after
an application has been installed does not yet exist; that's coming.

Change-Id: I0ba170df9885128000c46ed28d3dddda3a63a143
2010-02-04 16:01:09 -08:00
Dianne Hackborn
b858dfda50 Implement system data migration support.
This adds three new features:

- <original-package android:name="com.foo" /> manifest tag.
  This allows an .apk to specify another package it originally came from,
  propagating all state and data from the old to new package.

- <adopt-permissions android:name="com.foo" /> manifest tag.
  In some more complicated cases, a new .apk may be a combination
  of multiple older .apks that each declared their own permissions.
  This allows you to propagate the permissions from these other
  .apks into the new one.

- A new system/etc/updatecmds directory.
  You can place files here which describe data files to move from
  one package to another.  (See below for details.)

Also in this change: we now clean up the data directories of
.apks that disappear from the system image, and some improvements
to logging and reporting error messages.

A typical file in the updatecmds directory looks like this:

-------
com.google.android.gsf:com.google.android.providers.talk
    databases/talk.db
com.google.android.gsf:com.google.android.googleapps
    databases/gls.db
-------

This says that for com.google.android.sfs, there are two packages to
move files from:

From com.google.android.providers.talk, the file databases/talk.db.
From com.google.android.googleapps, the file databases/gls.db

As part of moving the file, its owner will be changed from the old
package to whoever is the owner of the new package's data directory.

If those two files had existed, after booting you would now have the
files:

/data/data/com.google.android.gsf/databases/talk.db
/data/data/com.google.android.gsf/databases/gls.db

Note that all three of these facilities assume that the older .apk
is completely removed from the newer system.  The WILL NOT work
correctly if the older .apk still remains.
2010-02-03 15:42:02 -08:00
Suchi Amalapurapu
c028be4f3b AppsOnSd feature - Add default container
Add new remote interface to do temporary copies. The new
remote stub handling is done on mHandler thread and doesn't need locking
for now.
Add new InstallArgs class and subclasses to isolate cases for installation.
Move resource deletion for failed installs/upgrades to later on in installation
cycle.
Fix code path for forward locked apps when using scanPackageLI

TODO's
Fix installation paths to completely use InstallArgs based design later on.
Get rid of using flags in various install/uninstall code paths.
Ideally InstallArgs should be created using these flags and used in the
rest of the code.
Function renames.
Revisit mount api's.
2010-01-27 10:26:43 -08:00
Dan Egnor
ea11654e68 Use six dashes instead of five. 2010-01-26 17:04:26 -08:00
Andreas Huber
07bf09da4a Initial checkin of AudioSource and AMRWriter, a pair of classes supporting pure-audio recording in stagefright.
related-to-bug: 2295449
2010-01-25 16:17:40 -08:00
Suchi Amalapurapu
b49d9af7e1 Merge "Mount/Unmount secure containers Persist flags in PackageSetting. Flags are relevant to ApplicationInfo.FLAG_SYSTEM, Application.FLAG_ON_SDCARD, ApplicationInfo.FLAG_FORWARD_LOCK. New pm command to simulate mount/unmount in Pm. This will be removed when MountService/vold event generation gets fixed. Calls from MountService into PackageManager when media gets mounted/unmounted. Scan the packages and grant permissions when the sdcard gets mounted. This api might change again." 2010-01-19 14:11:43 -08:00
Suchi Amalapurapu
fd3530f905 Mount/Unmount secure containers
Persist flags in PackageSetting. Flags are relevant to ApplicationInfo.FLAG_SYSTEM, Application.FLAG_ON_SDCARD, ApplicationInfo.FLAG_FORWARD_LOCK.
New pm command to simulate mount/unmount in Pm. This will be removed
when MountService/vold event generation gets fixed.
Calls from MountService into PackageManager when media gets mounted/unmounted.
Scan the packages and grant permissions when the sdcard gets mounted.
This api might change again.
2010-01-19 14:04:54 -08:00
Andreas Huber
3c79a4abf8 Merge "Upgrade for the stagefright commandline tool to support extracting thumbnails and to optionally prefer software codecs." 2010-01-19 10:25:13 -08:00
Andreas Huber
e42fdb5442 Upgrade for the stagefright commandline tool to support extracting thumbnails and to optionally prefer software codecs. 2010-01-14 14:09:17 -08:00
Suchi Amalapurapu
af8e9f4805 app install on sdcard. provide skeleton implementation
to install an app on sdcard, just resources.
Add new install path for /asec in installd.
ignore . when checking for apk path since the sdcard packages id'ed
by package name.
Add new -s option to adb shell pm
Refactor fwd locked from scanMode to ApplicationInfo.
Add new flag for sd install
Add new parse flags for fwd locking and installing on sdcard
New mock api's in PackageManagerService to invoke MountService api's. These
will be refactored again and so have been wrapped internally.
Some error codes in PackageManager
Changes in PackageManagerService to use mPath and mScanPath during installation
and switch to using PackageParser.Package.applicationInfo attributes for
source and public resource directories.
Some known issues that will be addressed later
 using system_uid for now. needs some tinkering with uid and packagesetting creation to use the actual app uid
 error handling from vold not very robust. ignoring lot of things for now
 sending a delayed destroy to delete packages. will revisit later
 revisit temp file creation later. just copy for now
2010-01-14 14:02:39 -08:00
Dan Egnor
52952b1bca Overhaul of dumpstate (aka bugreport) with cleanups & enhancements:
- include basic build & timestamp information in the header
- collect stack traces immediately at bugreport time
- *also* show stack traces from last ANR (as before), if in the last 15 minutes
- alphabetize system properties dump
- remove now-obsolete (and always questionable) "dumpcrash" functionality
- write to a .tmp file first, then rename to the final filename
- friendly usage message
- output sections include the exact file/command run
- source de-weirdification -- it's several hundred lines shorter now

The same data is present in the same order as before, and I've tried
to preserve all the grep/search targets people might use to find their
way through the file.
2010-01-13 14:30:33 -08:00
Joe Onorato
f5d95cbc1a less log spew 2010-01-08 15:46:24 -05:00
Chia-chi Yeh
5fe8598f75 keystore: compute the padding in an intuitive way. 2009-12-30 10:38:39 +08:00
Doug Kwan
5038c78f13 Add missing shared libraries in linker commands. Currently these libraries are
linked implicitly via dependencies of other shared libraries.
2009-12-22 13:30:25 -08:00
Android (Google) Code Review
fddd8f96f3 Merge change I70f91838
* changes:
  keystore: Add paddings before checksumming.
2009-12-22 01:39:14 -08:00
Chia-chi Yeh
fa4ae74ef7 keystore: Add paddings before checksumming.
Also fix a file descriptor leak when file system is nearly full.

Bug: 2339184
2009-12-22 17:26:42 +08:00
Dianne Hackborn
c59411b176 Rework activity manager debug dumps.
Change how we do debug dumps from the activity manager to make
everything go through the activity manager interface (no more
secondary interfaces), and use the command line arguments to
control what gets dumped.

The output from dumpsys without args still dumps everything.

When just dumping the activity service, we now dump a subset
of all of the am state that is interesting without being
overwhelming.

You can use "dumpsys activity -h" to get help with other things
that can be dumped.
2009-12-21 20:20:59 -08:00
Andreas Huber
4f471648e9 am b5c6be6d: am 082e5171: Merge change I895fb7d7 into eclair-mr2
Merge commit 'b5c6be6db25d9e9405ea4cf20bbedd46a62dc0bb'

* commit 'b5c6be6db25d9e9405ea4cf20bbedd46a62dc0bb':
  Squashed commit of the following:
2009-12-17 10:27:48 -08:00