8 Commits

Author SHA1 Message Date
Jeff Sharkey
dfa45309e0 Give DefaultContainerService all external storage.
Now we can bind to just one instance of DCS, instead of requiring
one-per-user. This also means we can operate on otherwise-stopped
users.

Bug: 7003520
Change-Id: I4881e064ae8942907f6a02c6b868926223455cdc
2012-09-13 01:04:15 -07:00
Dianne Hackborn
d2509fd835 Add boot mode where only "core apps" are started.
A core app is one that has coreApp="true" in its manifest tag.

The system can successfully boot (though a little painfully) with
only framework-res.apk, SettingsProvider.apk, SystemUI.apk,
DefaultContainerService.apk, and Launcher2.apk set as core apps.

Currently this boot mode is always turned off.

Change-Id: Ieaa4a8031c2c391a12996aa8d8b1d65fc2b09d6b
2011-09-12 12:29:43 -07:00
Christopher Tate
2efd2dbbac Support full-backup encryption and global backup password
If the user has supplied a backup password in Settings, that password
is validated during the full backup process and is used as an encryption
key for encoding the backed-up data itself.  This is the fundamental
mechanism whereby users can secure their data even against malicious
parties getting physical unlocked access to their device.

Technically the user-supplied password is not used as the encryption
key for the backed-up data itself.  What is actually done is that a
random key is generated to use as the raw encryption key.  THAT key,
in turn, is encrypted with the user-supplied password (after random
salting and key expansion with PBKDF2).  The encrypted master key
and a checksum are stored in the backup header.  At restore time,
the user supplies their password, which allows the system to decrypt
the master key, which in turn allows the decryption of the backup
data itself.

The checksum is part of the archive in order to permit validation
of the user-supplied password.  The checksum is the result of running
the user-supplied password through PBKDF2 with a randomly selected
salt.  At restore time, the proposed password is run through PBKDF2
with the salt described by the archive header.  If the result does
not match the archive's stated checksum, then the user has supplied
the wrong decryption password.

Also, suppress backup consideration for a few packages whose
data is either nonexistent or inapplicable across devices or
factory reset operations.

Bug 4901637

Change-Id: Id0cc9d0fdfc046602b129f273d48e23b7a14df36
2011-07-28 16:01:20 -07:00
Kenny Root
1de2eac9d0 Grant ACCESS_ALL_DOWNLOADS to DefaultContainerService
Be compatible with the old DownloadProvider behavior of being able to
operate on content URIs returned from .insert()

Bug: 3242328
Change-Id: I7dad15ac0fefa867c3c8a33a579fc9899ac80262
2010-12-01 11:37:53 -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
e83cefcef0 New external storage APIs.
This implements the spec for external storage organization, and
properly reflects how the media scanner organizes the files it finds.

Also includes package manager support for removing app private
files from external storage when the application is uninstalled.

For the new APIs and paths, the main place to look is Environment
and Context.
2010-02-09 14:20:55 -08:00
Suchi Amalapurapu
a8eed0d3b6 Add asec permission to DefaultContainerService 2010-01-27 15:02:41 -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