65 Commits

Author SHA1 Message Date
Steve Block
6215d3ff4b Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
2012-01-04 20:05:49 +00:00
Eric Fischer
2fbd56a652 Import revised translations.
Change-Id: I71efb16f2c6b257dfd444728c7e56ada662e6f77
2011-11-02 09:41:15 -07:00
Eric Fischer
b0d150aa53 Import revised translations.
Change-Id: I83ab00ec220b7c0ba0d37e7f4c91e945e35aab39
2011-10-18 15:03:21 -07:00
Kenny Root
05ca4c9064 Allow non-required package verifiers
* Verifiers can be specified in the AndroidManifest.xml

* Those verifiers can respond to the new Intent action

* PackageManager API for those verifiers: verifyPendingInstall

Change-Id: I4892bce2e6984871e6e93c60a1ca0dae145f5df5
2011-09-23 16:03:03 -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
Eric Fischer
8da527d843 Import revised translations.
Change-Id: I51335fa15a40d471010dbcc96e228b170f06ce7e
2011-08-22 11:09:13 -07:00
Kenny Root
61942c579d Fix external size calculations
Unfortunately fixed internal size calculations for HC, but never the
external size calculations.

Bug: 5113898
Change-Id: Idfe8af0ba74a20aa767eb9abac431ee1c74dcf8e
2011-08-15 12:46:35 -07:00
Kenny Root
f5121a9b80 Better errors from copyResource
Copy resource would fail without a good error code when the file
couldn't be found during copy.

Also destroy the target container ID during move operations since it
might exist. If the copy failed due to it existing, it would get
destroyed anyway. This way the user has a chance to have a good outcome
the first time.

Bug: 3375299
Bug: 5113898
Change-Id: I00559833f0801bc50e7cc031b462495e37a6b4ab
2011-08-10 17:00:30 -07:00
Kenny Root
1ebd74acf9 Better error codes for missing files
Make sure that files that don't exist aren't returning bogus 'out of
space' error codes.

Add some Javadoc so I can remember what each thing does in an IDE.

Add copyright header to NativeLibraryHelper

Bug: 3375299
Change-Id: Iac46019160921daca65b21d38897e5165063316e
2011-08-03 16:03:42 -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
66269ea6f6 Move extract native libraries to JNI code
The built-in ZipFile class was quite a long time to find an unpack
libraries. Move everything to using the libutils ZipFileRO class that
goes quite a bit faster. Initial measurements are 6 times faster than
the Java code.

Also, read files off the disk and compare their CRC against the APK's
CRC to see if we need to write the new file to disk. This also cuts down
the bootup time by up to a second per APK that has native files.

Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
2011-07-26 10:14:58 -07:00
Eric Fischer
6d470b7176 Import revised translations.
Change-Id: Ie30d36d7416f687f2d84b0bdf6547cda96446f37
2011-06-20 14:40:53 -07:00
Eric Fischer
8447a13f9c Import revised translations.
Change-Id: I10a93a6f3a274354e88263d86a8855d1e7121f58
2011-05-26 15:34:01 -07:00
Kenny Root
d022c23aed Merge "Revise free space checks for package installs" 2011-03-15 14:48:56 -07:00
Kenny Root
62e1b4e9d4 Revise free space checks for package installs
Change-Id: Ie72bbab77aa89a50ec096edc1f471eab74829e67
2011-03-14 17:18:24 -07:00
Iliyan Malchev
3070af0882 frameworks/base: remove LOCAL_PRELINK_MODULE
Change-Id: I54dd62ebef47e7690afa5a858f3cad941b135481
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-03-14 14:25:59 -07:00
Kenny Root
300c13a481 Erase OBB files when removing packages
OBB files on USB storage or SD card should be removed when an
application is removed.

Bug: 3356804
Change-Id: Ifbbf043368b125fcd47fd74e5cd2e5167a8deb00
2011-01-18 13:55:42 -08:00
Kenny Root
366949c2d9 Put externalSize measurements in PackageStats
When measuring a package's usage, put the external size in the
PackageStats as well. This will allow programs using a lot of space on
the external card to be held accountable.

Bug: 3308791
Change-Id: If2df07bdbf6ffb31577074fad8f4a87ca4e89086
2011-01-16 16:21:15 -08:00
Eric Fischer
c16aea5ee8 Import revised translations.
Change-Id: Ia6a9c2838156dd6f83aea9c4809c57f663c710af
2010-12-23 14:12:01 -08:00
Kenny Root
34e48955a5 DefaultContainerService's JNI library is required
Change from LOCAL_JNI_SHARED_LIBRARIES to LOCAL_REQUIRED_MODULES to make
sure the JNI library is built and included when DefaultContainerService
is built.

Change-Id: I322c72415237c2b70bff345d50e2a9e4f2e6d988
2010-12-07 11:56:24 -08:00
Kenny Root
aa183e2c9a Add measurement API to DefaultContainerService
System applications that don't have "media_rw" access need some way to
measure the size of directories on the SD card and other internal media.
Add this API to DefaultContainerService so they can simply bind to the
service and make an RPC.

Bug: 3203974
Change-Id: I4e1bcd7a1b702b156c011ecc04f6915022cb258a
2010-12-04 08:29:23 -08:00
Eric Fischer
d09a98173b Rename Indonesian and Hebrew translations to match Locale.java conventions
Change-Id: Icf4f1896d13a4b6bf86503b16bde189f1834fdcc
2010-12-02 14:05:29 -08:00
Kenny Root
4da12f07b5 am 1de6ca69: am 938d0972: Merge "Grant ACCESS_ALL_DOWNLOADS to DefaultContainerService" into gingerbread
* commit '1de6ca69cc541ccdd651071c8bd5629af4e09664':
  Grant ACCESS_ALL_DOWNLOADS to DefaultContainerService
2010-12-01 14:23:19 -08: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
Eric Fischer
113141e091 Import initial translations for 20 new locales.
Change-Id: I37d479c9d6293eb57d68ad686d00838445a18890
2010-11-17 16:24:41 -08:00
Eric Fischer
6362b3f077 Import revised translations.
Change-Id: I9fe6a999fc665faefbf0e7e222d5dfb4fdbcd3b1
2010-11-09 17:25:54 -08:00
Kenny Root
e1ff214e32 Add API to check for emulated external storage
When the storage is emulated, we don't want to install ASEC containers
to it. This adds the API to check when the external storage is emulated
and uses it to check whether or not to install packages to the external
storage in an ASEC container.

Bug: 3024387
Change-Id: Ia0318aca9e4938a4897deaada5603a4c7c1d0f48
2010-10-12 11:30:56 -07:00
Kenny Root
13cc0a06fc am 4309b52f: am 735de3b3: Hash keys with MD5; track IBinders not IInterface
Merge commit '4309b52fe19de5241113d8f9ebcdf52741e086a9'

* commit '4309b52fe19de5241113d8f9ebcdf52741e086a9':
  Hash keys with MD5; track IBinders not IInterface
2010-09-30 19:47:06 -07:00
Kenny Root
735de3b38a Hash keys with MD5; track IBinders not IInterface
Using a plaintext password doesn't work unless it's a certain length, so
just hash the plaintext password with MD5 to make it the right length
for the twofish encryption.

Tracking the IInterface doesn't make much sense since it's different
each time, so track the IBinder instead. That way we can unlinkToDeath
the binder when the last thing it's holding onto goes away.

Change-Id: Id828d25b4d74f27e9d8b4bfb3909c964469cc473
2010-09-30 17:25:05 -07:00
Kenny Root
bff405f910 resolved conflicts for merge of d8e8186c to master
Change-Id: Ica3f6cd958717ea7033cab8b4bf9cd3425c1e1c5
2010-09-28 18:16:50 -07:00
Kenny Root
05105f7abe Update OBB API to include callbacks
Add a callback for users of the StorageManager API to be able to receive
notifications when the requested operation completes for mountObb and
unmountObb.

Add NDK API to get to ObbInfo like the Java API has.

Also update the docs for the API and remove the "STOPSHIP" comments.

Change-Id: I23a4409c7f8b74d3169614beba920b4d667990a4
2010-09-28 17:23:26 -07:00
Kenny Root
818c830c59 am 83285781: am 7046bd92: Merge "Allow native shared libraries in ASEC containers" into gingerbread
Merge commit '8328578152fbfd23952a6cda4b2e60853d78eb74'

* commit '8328578152fbfd23952a6cda4b2e60853d78eb74':
  Allow native shared libraries in ASEC containers
2010-08-27 18:11:06 -07:00
Kenny Root
85387d7ba3 Allow native shared libraries in ASEC containers
This change moves the native library handling earlier in the package
installation process so that it may be inserted into ASEC containers
before they are finalized in the DefaultContainerService.

Note that native libraries on SD card requires that vold mount ASEC
containers without the "noexec" flag on the mount point.

Change-Id: Ib34b1886bf6f94b99bb7b3781db6e9b5a58807ba
2010-08-27 16:40:06 -07:00
Eric Fischer
ba4048c028 Import revised translations.
Change-Id: I03d83a241843f1fe88471425e4a7f7e6f33fee16
2010-08-17 16:50:06 -07:00
Eric Fischer
f870000ff0 Import revised translations. DO NOT MERGE
Change-Id: Id47f0897de1361ba755f149b2886d7d1f79ff494
2010-08-17 16:43:35 -07:00
Eric Fischer
3d173c3040 Import revised translations.
Change-Id: I0b89d1baf9ed02c492e8845f45fad1bee56e8d56
2010-08-12 16:44:07 -07:00
Kenny Root
bf0cb26a1c am f5ee5358: am ac9717ab: Merge "Move OBB file reading to DefaultContainerService" into gingerbread
Merge commit 'f5ee5358c187107b2e5a1e1fbcb5a648d793c798'

* commit 'f5ee5358c187107b2e5a1e1fbcb5a648d793c798':
  Move OBB file reading to DefaultContainerService
2010-08-11 14:15:10 -07:00
Kenny Root
a02b8b05dd Move OBB file reading to DefaultContainerService
The system_server shouldn't touch files on the SD card. This change
moves the things that touch the SD card out to the
DefaultContainerService so that it will get killed if the SD card goes
away instead of the system_server.

Change-Id: I0aefa085be4b194768527195532ee6dddc801cfc
2010-08-11 11:20:53 -07:00
Eric Fischer
33dc1d7cd0 Import revised translations. DO NOT MERGE
Change-Id: Ibc3e9f1f83159835c2e6c3bcdaa8ff6a7e7fa384
2010-08-04 10:37:25 -07:00
Kenny Root
b0289f62af am 59d4a536: am 739cdab7: Merge "Do not deference before null check" into gingerbread
Merge commit '59d4a5369cd68d4b65809ded407611b62b013f9a'

* commit '59d4a5369cd68d4b65809ded407611b62b013f9a':
  Do not deference before null check
2010-08-02 13:31:41 -07:00
Kenny Root
930d3af75f Do not deference before null check
The return of parsePackageLite wasn't checked until after it was
deferenced. Move the deference below the null check and remove redundant
set.

Bug: 2852726
Change-Id: I3eaaea5050948145eed44b64507dc846993d98eb
2010-08-02 07:52:56 -07:00
Eric Fischer
359d79f317 Add character limit for translators.
Change-Id: If3d77fed7ebc1ef08c546b7f7d32177b4d80d2b9
2010-07-28 16:27:18 -07:00
Dianne Hackborn
3ac8eb7278 Update app label.
Change-Id: I6c688fd9292aeaa58435eec6273b3a19cad5eff9
2010-07-24 18:21:07 -07:00
Suchi Amalapurapu
d345bb6e5b Fix error code when media is filled up.
Change-Id: Id8dae2e7c967e3f103aecd2f31abb7e292af8f1d
2010-04-22 13:43:20 -07:00
Suchi Amalapurapu
315a5fb91d Dont fall back to installing on sdcard when internal storage is filled up
when the install location is set to internal only. Similary if install
location is set to external only(via adb), dont fall back to installing on
internal storage if sdcard is filled up.
If nothing is specified ie install location is set to let system decide,
we just check on internal storage.
Fix tests

Change-Id: I7400ccc131782d9c45284bd9ebd0dee43a3b412b
2010-04-14 18:24:06 -07:00
Suchi Amalapurapu
40e472521a Fix 2579461
Move install location values to secure settings.
Diable attribute for UI. Set default value to auto.
Add command line interface to set install location via pm.

Change-Id: I80e97b3d24845adad7102f40dcbe238f00efa406
2010-04-07 20:43:54 -07:00
Kenny Root
ea3e8e0758 Merge "Import revised translations" 2010-03-18 10:25:37 -07:00
Suchi Amalapurapu
14b6abda13 Add new install flag to install on internal flash only
Change default install location policy for new flag.
New error code for media unavailable.

Change-Id: I5a5d0828b067692b2b94a15a2bcc7534f796c1a2
2010-03-17 18:43:31 -07:00
Kenny Root
35f480eb06 Import revised translations
Change-Id: Id1a0d62dc917937fc14ccab26eb7bd2c2148137e
2010-03-17 18:30:12 -07:00
Suchi Amalapurapu
8a9ab24a5c Do storage checks before initiating a move.
Add new remote method to check for insufficient error conditions.
Some fixes in MountService when updating media status on PackageManagerService
Fix size calculation condition in installd.

Add new error code if media is unavailable.
New tests for testing error codes.
Some additional debugging statements in MountService.

Change-Id: Ibfe90d5ed6c71d57f9c1c67806f38b5ae9ecdfbf
2010-03-16 16:36:26 -07:00