22 Commits

Author SHA1 Message Date
Kenny Root
4f35092af5 Merge "Move extract native libraries to JNI code" 2011-07-27 15:54:51 -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
Kenny Root
9c8625ead8 Change user 0 directory back for compatibility
The PackageManagerTests aren't designed for multiple users yet, so they
fail. Since multiple users aren't supported yet, just change the default
data directory for user 0 back to how it was previously. This fixes the
existing tests and doesn't get anyone's hopes up since they won't see
/data/user/0/pacakge when we don't support multiple users yet.

Bug: 4380006
Change-Id: Iedcc3115b000759c0013ba6878e13cd2358897da
2011-07-25 09:42:22 -07:00
Dianne Hackborn
b8f400020b Fix issue #4999574: Disabled system app not listed in Settings after reboot
Change-Id: I1a0a0724f72adcfa6aedffdcd3112bd4faa909d3
2011-07-19 15:17:43 -07:00
Jeff Brown
5d6d90fac8 Remove more simulator support code.
Bug: 5010576

Change-Id: Ie6c8665306bf4e822693b76f25c3a0f05c12d42d
2011-07-11 13:33:22 -07:00
Jeff Brown
10e8971286 Eliminate single-process mode.
Bug: 5010576

Change-Id: Id450dc83efed4897d1e4ff451530fed14457aace
2011-07-08 19:54:07 -07:00
Brian Carlstrom
f4b92ec567 Revert "Add keychain user with special keystore access permissions"
This reverts commit 8c2a1a90a81f04573bfa578eab32f5fd4a30eafb.

Conflicts:

	cmds/keystore/keystore.c

Bug:4970237
Change-Id: I626023d695becfada47e5f319b18e0889b766563
2011-06-30 22:59:13 -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
Dianne Hackborn
0ac3031c15 Implement remaining infrastructure for user disabling apps.
Change-Id: If8135eb0e27ec36f8f159eb7b6397add7acd0299
2011-06-17 14:49:45 -07:00
Kenny Root
a51b6fd6f8 resolved conflicts for merge of b2d0ee16 to master
Change-Id: I4483a6d0ccecfea4a1e66bb6eba80d13e8b9a3a4
2011-05-19 15:02:18 -07:00
Dianne Hackborn
3d0724dc22 resolved conflicts for merge of 0e59729b to master
Change-Id: I2d3a6bddf66b1df0c101c45ea2fec1cf65caf01b
2011-05-12 15:39:41 -07:00
Amith Yamasani
0f3f29b1b9 Use canonical paths to compare library directory with data directory.
Fix for unexpected recursive symbolic link when unpacking
native libraries contained in apks. This happened due to the data
directory of primary user becoming a symlink to the legacy data directory.

Bug: 4396427

Change-Id: Iaed2f21ada4eda16ce729ead259a52203300dfa8
2011-05-10 15:32:18 -07:00
Amith Yamasani
25641ca1ac Merge "Plumbing in PackageManager and installd for multi-user support." 2011-04-19 10:41:20 -07:00
Amith Yamasani
0b285499db Plumbing in PackageManager and installd for multi-user support.
- Create /data/user directory and symlink /data/user/0 -> /data/data for
  backward compatibility
- Create data directories for all packages for new user

- Remove data directories when removing a user

- Create data directories for all users when a package is created

- Clear / Remove data for multiple users

- Fixed a bug in verifying the location of a system app

- pm commands for createUser and removeUser (will be disabled later)

- symlink duplicate lib directories to the original lib directory

Change-Id: Id9fdfcf0e62406a8896aa811314dfc08d5f6ed95
2011-04-15 15:15:27 -07:00
Kenny Root
2e3ede527d Merge "Updated system packages retain shared user" 2011-04-12 15:34:42 -07:00
Amith Yamasani
beb182a494 Merge "Package manager changes to store and update user information." 2011-04-11 12:14:17 -07:00
Amith Yamasani
4b2e934928 Package manager changes to store and update user information.
Some API stubs for managing users and storing their details.
List of users is stored in an xml file.
Each user's properties are stored in a separate xml file.

Some unit tests for modifying the XML files.

Change-Id: If2ce2420723111bd426f6762def3c2afc19a0ae5
2011-04-11 12:12:58 -07:00
Kenny Root
1d1b489376 Updated system packages retain shared user
If a system package was updated that used permissions provided by a
package signed with a different signature, it wouldn't grant
those permissions to the updated system app.

This is because the sharedUser field was not set in the disabled system
package. Therefore it was checking the disabled system package's
individual user permission grants which were empty.

This change populates the sharedUser field for disabled system packages
after reading all the existing shared users from the saved settings
database.

Bug: 4245273
Change-Id: I57c58c4083bd59f45095c184d6ca5a302f79ff6e
2011-04-08 14:25:27 -07:00
Brian Carlstrom
8c2a1a90a8 Add keychain user with special keystore access permissions
Change-Id: I02fe5171add62c5cd9f57b01bc137f3bc1cb3a69
2011-04-08 14:06:39 -07:00
Joe Onorato
63ebffcb84 turn off log spew
Change-Id: I7e5564e02460ff41829c9fd26d80032ea3104498
2011-04-06 11:50:50 -07:00
Kenny Root
447106fc83 Split dump and annotate users of mPackages lock
Split the dump() command between PMS and Settings.

Try to annotate all users of the mPackages lock in preparation for
switch to reader/writer lock.

Also mark some locals final as I was reading through the usage of the
synchronization on mPackages.

Change-Id: Ia7add63e835e67156edf886f98acebe50cc41f70
2011-03-23 17:20:04 -07:00
Kenny Root
cf0b38ca6e Split PackageManagerService into subclasses
Split PackageManagerService from one monolithic class with several inner
classes to several classes. This will help determining how its data
structures can be reshuffled to provide better separation of concerns.

Change-Id: Ic7571daebdcf13ce08e08f34204c5bbf4140139b
2011-03-22 16:17:57 -07:00