275 Commits

Author SHA1 Message Date
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
Andreas Huber
2ea14e2319 Squashed commit of the following:
commit 144b1c40e9cf08a584c50e1bef7ba3f287e81a4f
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 16 09:28:23 2009 -0800

    This H264 file shows a certain problem even better.

commit 3245f1f3b7471975aeeb824a756c987abd610f55
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 16 09:20:08 2009 -0800

    Using only the QA testfiles now.

commit 074817eb3816c5dd70858a3594e3b92d799d873b
Author: Andreas Huber <andih@google.com>
Date:   Tue Dec 15 16:17:39 2009 -0800

    Yay, roles are back again now that the API is in place.

commit 6d847e4932cc38301ae27cb7283b7f1553a95457
Author: Andreas Huber <andih@google.com>
Date:   Tue Dec 15 13:01:20 2009 -0800

    Added commandline option for specifying the random seed for reproducable tests.

commit 62ab37b26336eaa67e49791c41c996acb6acee3f
Author: Andreas Huber <andih@google.com>
Date:   Mon Dec 14 10:53:27 2009 -0800

    When issuing a seek it is important that only the first MediaSource::read call has the seek option.

commit e77c46644b2fb6862bafa3569f7d304252074f1e
Author: Andreas Huber <andih@google.com>
Date:   Mon Dec 7 16:39:07 2009 -0800

    Make sure the tests are actually built, sp<OMXCodec> becomes sp<MediaSource>

commit 6df56915bd55a9445b3c6f953d3cc251d81579b8
Author: Andreas Huber <andih@google.com>
Date:   Thu Dec 3 14:25:36 2009 -0800

    Temporarily disable support for querying the roles of OMX components.

commit 31bb26930df9e3658dea684cedb4b0f1a06a4a88
Author: Andreas Huber <andih@google.com>
Date:   Tue Dec 1 13:36:52 2009 -0800

    Disregard EOS events, slightly change the way the EOS flag on output buffers is handled.

commit 4c382fbc9aebee8197d5988d04378062809e7c48
Author: Andreas Huber <andih@google.com>
Date:   Tue Dec 1 09:37:24 2009 -0800

    New random seek test for the codec tests. Fixed "sticky" end-of-output-buffers flag behaviour in OMXCodec.

commit c762eac3e44309592b61a168d66e091cf609fa03
Author: Andreas Huber <andih@google.com>
Date:   Tue Nov 3 14:13:43 2009 -0800

    Fix a typo.

commit 50540a59b65c7d476b0193c7494cd75895e6ca6d
Author: Andreas Huber <andih@google.com>
Date:   Tue Nov 3 09:48:35 2009 -0800

    Some more fine tuning of the unit tests, make MPEG4Extractor less verbose.

commit 1157a7e52a0636706caa235abe16d2ff8a0b8140
Author: Andreas Huber <andih@google.com>
Date:   Wed Oct 28 12:01:01 2009 -0700

    Changes to the IOMX::listNodes API, this now returns the component's roles as well, unit tests now test all components in all supported roles by default.

commit 30fbf2d8c6cb927689f7ba75eb550a81e9df488a
Author: Andreas Huber <andih@google.com>
Date:   Mon Oct 26 09:45:26 2009 -0700

    Initial check-in of unit tests for OMX components.
2009-12-17 09:28:15 -08:00
Dmitry Shmidt
64bf3d53d5 Add FW log dump for bcm4329
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2009-12-16 16:05:08 -08:00
Andreas Huber
772f8f4b3b am 23915ddd: am eec100b2: Merge change If0d04246 into eclair-mr2
Merge commit '23915ddde9ce3ed9f1ce50ea321c8fdce612faf0'

* commit '23915ddde9ce3ed9f1ce50ea321c8fdce612faf0':
  Don't count empty buffers when computing the frame rate.
2009-12-10 14:42:47 -08:00
Andreas Huber
f0d04246f4 Don't count empty buffers when computing the frame rate. 2009-12-10 12:21:57 -08:00
Andreas Huber
1d44bea444 am f553a584: am 5921fb51: Merge change I91eb0354 into eclair-mr2
Merge commit 'f553a58425c66a990dbc5f4579c976a0636fc573'

* commit 'f553a58425c66a990dbc5f4579c976a0636fc573':
  Change OMXCodec::Create to return an sp<MediaSource> instead of an sp<OMXCodec>, this is more general and does not sacrifice any functionality as the remaining OMXCodec APIs are not meant to be public anyway.
2009-12-07 18:32:57 -08:00
Andreas Huber
91eb035404 Change OMXCodec::Create to return an sp<MediaSource> instead of an sp<OMXCodec>, this is more general and does not sacrifice any functionality as the remaining OMXCodec APIs are not meant to be public anyway. 2009-12-07 09:43:00 -08:00
Andreas Huber
4612a9c53c am ae34cf92: am 781ac162: Merge change I8768f2cc into eclair-mr2
Merge commit 'ae34cf92db9c54ba72fdcac33a8ba855a2215e4e'

* commit 'ae34cf92db9c54ba72fdcac33a8ba855a2215e4e':
  A small sample tool to encode pcm audio data to amr, decode it again and play it. Some changes to OMXCodec to properly configure the AMR decoder(s).
2009-12-01 17:26:32 -08:00
Andreas Huber
8768f2ccef A small sample tool to encode pcm audio data to amr, decode it again and play it. Some changes to OMXCodec to properly configure the AMR decoder(s). 2009-12-01 15:26:54 -08:00
Doug Zongker
1b3c375ce2 am bf72820e: am b292461c: Merge change I305e1b8f into eclair-mr2
Merge commit 'bf72820e7775748c7239287b49b81031167b3428'

* commit 'bf72820e7775748c7239287b49b81031167b3428':
  add --esn option to am to allow adding extra with a null value
2009-12-01 09:12:22 -08:00
Doug Zongker
305e1b8fe9 add --esn option to am to allow adding extra with a null value 2009-11-30 16:15:15 -08:00
Dima Zavin
84ba348474 am c92f3bcd: am e11a1b4d: am f817218e: dumpstate: Pick up the last kernel log from /proc
Merge commit 'c92f3bcd556be6086aabcdcf437cc29c2ac605f6'

* commit 'c92f3bcd556be6086aabcdcf437cc29c2ac605f6':
  dumpstate: Pick up the last kernel log from /proc
2009-11-29 14:01:14 -08:00
Dima Zavin
e11a1b4d1a am f817218e: dumpstate: Pick up the last kernel log from /proc
Merge commit 'f817218e09a556f20efc81309ba2cdb3475a370b' into eclair-mr2

* commit 'f817218e09a556f20efc81309ba2cdb3475a370b':
  dumpstate: Pick up the last kernel log from /proc
2009-11-29 13:51:14 -08:00
Dima Zavin
f817218e09 dumpstate: Pick up the last kernel log from /proc
This is needed since its no longer copied to /data/dontpanic by init.

Change-Id: I5217da73ec470653824b7fb9a31e093e263a8dc9
Signed-off-by: Dima Zavin <dima@android.com>
2009-11-25 23:34:19 -08:00
Oscar Montemayor
a8529f6867 Encrypted File Systems Project. Installer modifications.
Started to modify isntaller for data redirection to a secure location.
2009-11-24 11:44:19 -08:00
Andreas Huber
e21fb34387 am 5493df91: am bbd6cb46: Merge change Ib1b7bce4 into eclair-mr2
Merge commit '5493df919b01952857eb3b78fad3fe2cff573935'

* commit '5493df919b01952857eb3b78fad3fe2cff573935':
  Squashed commit of the following:
2009-11-23 10:55:40 -08:00
Andreas Huber
27366fc954 Squashed commit of the following:
commit 1efc38dc3c33fef57b759002db3965ed07a28cb0
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 19 14:36:14 2009 -0800

    Sending the SEEK-COMPLETE notification temporarily broke seeking backwards in time behaviour. This is now fixed.

    Also, get rid of the semi-random delay after posting buffers to surface flinger in favour of delaying the buffer release until the next frame is displayed.

commit 51973062eb5ee63fd64b845d72bac517cc3369cf
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 14:01:43 2009 -0800

    Fix one more unit test, properly send seek-complete notification only after seek actually completed.

commit cb22250b34b1fcfe1bf459723a761fd003950229
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 12:31:36 2009 -0800

    Fix seek-while-paused in AwesomePlayer, revert to using FileSource if MmapSource fails.

commit 25eb9241138ddf7bb27ce90657116c5f8a94d880
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 12:30:40 2009 -0800

    Support seeking and duration in AMRExtractor, assuming all frames are the same size.

commit 44192f2ebb7ea3bbd3ba5910025692dbc6a08faa
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 10:21:44 2009 -0800

    MediaPlayerImpl is dead, long live AwesomePlayer.

commit c5b52d3c0674f5dc94db506afbce52401cceddac
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 09:42:23 2009 -0800

    New implementation of the stagefright mediaplayer.
2009-11-23 10:44:30 -08:00
Mike Chan
cc829a652b am 26a9a13a: am b2a51667: am 23b3ef82: Merge change I99194df1 into eclair
Merge commit '26a9a13ac32a9109300e323d26af5865bf5244cc'

* commit '26a9a13ac32a9109300e323d26af5865bf5244cc':
  frameworks: base: dumpstate: Dump kernel cpufreq speeds.
2009-11-19 17:44:59 -08:00
Mike Chan
b2a5166704 am 23b3ef82: Merge change I99194df1 into eclair
Merge commit '23b3ef82c0c4175e8c953740306ee6b080dae8e7' into eclair-mr2

* commit '23b3ef82c0c4175e8c953740306ee6b080dae8e7':
  frameworks: base: dumpstate: Dump kernel cpufreq speeds.
2009-11-19 16:23:56 -08:00
Mike Chan
c6b406f0eb frameworks: base: dumpstate: Dump kernel cpufreq speeds.
Change-Id: I99194df1d6c46254affef86ea8eb39e784c3dfb3
Signed-off-by: Mike Chan <mike@android.com>
2009-11-19 16:01:05 -08:00