History log of /frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ec00b5199ce788208ea80fee1ee30a1653e0a143 25-Apr-2017 Fyodor Kupolov <fkupolov@google.com> Call getAllowedUid on a separate thread

Test: manual
Bug: 37673384
Change-Id: If7480a8cd3fd1ccb5b7179b613a124db010efa8e
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
e29a5a11529dc7df82911b48b9f95461383cbcc2 17-Dec-2016 Fyodor Kupolov <fkupolov@google.com> Added SystemServerInitThreadPool

System services can use it during the boot to submit tasks that can be run in
parallel with the main thread.

Switched PersistentDataBlockService and FingerprintService from FgThread to
the new thread pool.

UiModeManagerService: update initial configurations on init thread. They run
while holding the mLock so no extra synchronization barriers are needed at a
later stage.

Test: manual - device boots without errors
Test: ParallelPackageParserTest passes
Change-Id: I548f34b0a18f61924e09a39afb12e085cde35442
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
5394fd0450ed2ad2355c013bcf9d14c057ce83d4 29-Dec-2016 Charles He <qiurui@google.com> Remove duplicate lines due to automerger

Test: make
Bug: 30352311
Change-Id: Ic476be8fca733414589202701fe91e5eb47e97fb
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
a54f83c99c418d561764132c9b1485bebefac629 29-Dec-2016 Charles He <qiurui@google.com> Add @GuardedBy annotation to PersistentDataBlockService#mIsWritable. am: 71d2a41dd9 am: d0339c6e8f am: 6aa436bef2 am: 76ca2da7e8 am: 0cc0219089 am: ced5ab190c am: 3cc7f6acdc am: e426dac4e2 am: b75b025578 am: 3ad5df5231 am: fdcec75c74
am: f2263e3a5e

Change-Id: I7dc971d31d61d49bbe2c2031ef336176cc9b3eae
bcf0dbcd5dfdfcc9e7d3acc9ee5f9fbec50df7f7 29-Dec-2016 Charles He <qiurui@google.com> Prevent writing to FRP partition during factory reset. am: a9437bd1ca am: 2ce5c4320d am: 133ff4d611 am: 00a581f882 am: e5156ec1e9 am: 9a47fa7fc0 am: 8bcdab7e6f am: dd7837c5ad am: 9bc2d6b446 am: 08ea823955 am: 065e387455
am: fce4eb6810

Change-Id: I87a2d4fbeed47094cc27967b13e1950b3dedaf0e
e426dac4e2e668ff6af027ec0c8bbfff40596ba1 29-Dec-2016 Charles He <qiurui@google.com> Add @GuardedBy annotation to PersistentDataBlockService#mIsWritable. am: 71d2a41dd9 am: d0339c6e8f am: 6aa436bef2 am: 76ca2da7e8 am: 0cc0219089 am: ced5ab190c
am: 3cc7f6acdc

Change-Id: I98e65fcf8180e5187a92e8d5b888eb794f89ab6d
dd7837c5ad947b3a423423b622e1cc38b8fb5c86 29-Dec-2016 Charles He <qiurui@google.com> Prevent writing to FRP partition during factory reset. am: a9437bd1ca am: 2ce5c4320d am: 133ff4d611 am: 00a581f882 am: e5156ec1e9 am: 9a47fa7fc0
am: 8bcdab7e6f

Change-Id: I6e41bfad4ce66ca80bca636a5fb4ddc85b71e83a
3cc7f6acdcd7b81fcb6e3bfbe821a90be844bdc0 29-Dec-2016 Charles He <qiurui@google.com> Add @GuardedBy annotation to PersistentDataBlockService#mIsWritable. am: 71d2a41dd9 am: d0339c6e8f am: 6aa436bef2 am: 76ca2da7e8 am: 0cc0219089
am: ced5ab190c

Change-Id: I59602f83fd659ce5192636d0e66feae217997d7c
8bcdab7e6f334a653d8a04a7c0c411a3c3860904 29-Dec-2016 Charles He <qiurui@google.com> Prevent writing to FRP partition during factory reset. am: a9437bd1ca am: 2ce5c4320d am: 133ff4d611 am: 00a581f882 am: e5156ec1e9
am: 9a47fa7fc0

Change-Id: Ifb9f5b177f7c031352e6e9cf308e6295f7c60074
6aa436bef287c71d569b4855e6874fd5a5b7fd0e 29-Dec-2016 Charles He <qiurui@google.com> Add @GuardedBy annotation to PersistentDataBlockService#mIsWritable. am: 71d2a41dd9
am: d0339c6e8f

Change-Id: I0dbec3edf704821eb4605a48b770461eb99ddae7
133ff4d611ca5cc0227ae9d4bc73c61329b14d3a 29-Dec-2016 Charles He <qiurui@google.com> Prevent writing to FRP partition during factory reset. am: a9437bd1ca
am: 2ce5c4320d

Change-Id: I29339a634fd22cd46bfc08619464da8fe159a2b7
71d2a41dd9c8be8c4bca5eba339802e1e0c2be3c 01-Dec-2016 Charles He <qiurui@google.com> Add @GuardedBy annotation to PersistentDataBlockService#mIsWritable.

Change-Id: I1024f2a56badde5c123d025d6fe02f42559cbcb1
Test: manual
Bug: 30352311
(cherry picked from commit f6f1d627483b4dad9d65176769a1ee92c59a4810)
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
a9437bd1caeeb38780d920a81bde8cc7ca280fe0 24-Nov-2016 Charles He <qiurui@google.com> Prevent writing to FRP partition during factory reset.

Avoid potential race condition between FRP wipe and write operations
during factory reset by making the FRP partition unwritable after
wipe.

Bug: 30352311
Test: manual
Change-Id: If3f024a1611366c0677a996705724458094fcfad
(cherry picked from commit a629c772f4a7a5ddf7ff9f78fb19f7ab86c2a9c2)
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
00f9a1a4735f8ba6b40cee5294a034bd60b28df4 12-Dec-2016 Charles He <qiurui@google.com> Merge "Add @GuardedBy annotation to PersistentDataBlockService#mIsWritable."
f6f1d627483b4dad9d65176769a1ee92c59a4810 01-Dec-2016 Charles He <qiurui@google.com> Add @GuardedBy annotation to PersistentDataBlockService#mIsWritable.

Change-Id: I1024f2a56badde5c123d025d6fe02f42559cbcb1
Test: manual
Bug: 30352311
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
0ef99417bd40b79cc5f9964808ac4fc405f31896 06-Dec-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Init PersistentDatablockService on the worker thread"
68f49aea205a0d26f09cc457f86450e8dd3023d0 03-Dec-2016 Fyodor Kupolov <fkupolov@google.com> Init PersistentDatablockService on the worker thread

Other services do not depend on PersistentDatabalockService in the early
stages of system server initialization.
Initialization is now done on the FgThread. The service also ensures that
init is complete before PHASE_ACTIVITY_MANAGER_READY.

Change-Id: I3b9a1994e37c1e995ed04257f271c425d48c2e7c
Test: Manual, device boots, service is initialized and published
Bug: 33199244
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
a629c772f4a7a5ddf7ff9f78fb19f7ab86c2a9c2 24-Nov-2016 Charles He <qiurui@google.com> Prevent writing to FRP partition during factory reset.

Avoid potential race condition between FRP wipe and write operations
during factory reset by making the FRP partition unwritable after
wipe.

Bug: 30352311
Test: manual
Change-Id: If3f024a1611366c0677a996705724458094fcfad
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
3d9805d50281882b4420ee2d4ede8a8bdd94d455 07-Jul-2016 Mahaver Chopra <mahaver@google.com> Added UM.DISALLOW_OEM_UNLOCK, Removed Global.OEM_UNLOCK_DISALLOWED.

Currently we used global setting to restrict user from enabling oem
unlock. As global settings can be chagned using adb, using user
restrictions instead.

Bug: 29893399
Change-Id: Ic83112a4838b8279bf50408a29ae205e0b8639ee
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
d444ff120774ef87710ee3106534ea7ca44baa5d 16-Jun-2016 Mahaver Chopra <mahaver@google.com> Global.OEM_UNLOCK_DISALLOWED should only restrict when enabling oem

Bug:29409746
Change-Id: I5254456cc2364c93809cebbe2d134a873873790d
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
211b5b10f6baddc290f7f65c0ac70eed3b9913c8 08-Jun-2016 Amith Yamasani <yamasani@google.com> resolve merge conflicts of 718f321 to nyc-mr1-dev

Change-Id: I0021aa5be1822082d8ff026cafa8c8b6b56b90b5
d2b21047c8c133d99cbd4821a5dc88f60d933445 03-Jun-2016 Amith Yamasani <yamasani@google.com> Add a separate read permission for oem unlock state

New privileged permission READ_OEM_UNLOCK_STATE added
for system privileged apps.

Changing the unlock state still requires the old
permission OEM_UNLOCK_STATE, which is signature protected.

Bug: 28953956
Change-Id: Iedd2ad1d2d1dc3ae91122d7c406e3ee623a47d61
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
830e32cdccdeeeadc5f07ba006b2b5779f8be65d 17-May-2016 Mahaver Chopra <mahaver@google.com> Disallow OEM unlock when DISALLOW_FACTORY_RESET applies

Bug: 28339424
Change-Id: I4b6dc6f186ea60a13e778f52d574e615b0b19b74
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
bfe1b04f8ba9cd5486e26ca4cc30242b3b2f2c7f 16-May-2016 Steven Ng <stevenckng@google.com> Enforce permission before checking OEM unlocking setting

Bug: 28783495
Change-Id: Idb7b191dd8c50a687c8e910656c0325414ecd544
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
dc20ba69bf5f6e1017202555b6159abaf67b855c 26-Apr-2016 Steven Ng <stevenckng@google.com> Add a Global setting for disabling OEM unlocking setting

+ By default, OEM unlocking setting is enabled.
+ Add a check to prevent oem unlock being flipped if the setting isn't
enabled.

Bug: 28163088
Change-Id: I087d8d5a1d99a611a8f66ff71a92ec9ea1da4e9f
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
74e9b18b2de2127e081b170cdd4622193cfb7543 22-Feb-2016 Andres Morales <anmorales@google.com> Add SystemApi for retrieving device flash lock state

Bug: 26039090
Change-Id: Ib51c4862d897cc91a0788379c761ed49a2adf271
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
c5967e9862489024c932b0c7fcb84ed0af2a7fd7 08-Jan-2016 Jeff Sharkey <jsharkey@android.com> More progress on triaging PackageManager callers.

Catch a bunch of simple cases where the PackageManager flags are
obvious. Add the ability to use the MATCH_SYSTEM_ONLY flag on
PackageInfo and ApplicationInfo queries.

Re-examine recent tasks after a user is unlocked, since some of the
activities may now be available and runnable.

Bug: 26471205, 26253870
Change-Id: I989d9f8409070e5cae13202b47e2c7de85bf4a5b
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
e06b4d1d9f718b9fe02980fea794a36831a16db2 06-Jan-2016 Jeff Sharkey <jsharkey@android.com> Consistent naming for PackageManager methods.

When hidden PackageManager methods take a userId argument, they
should be named explicitly with the "AsUser" suffix. This fixes
several lagging examples so that we can pave the way to safely
start passing flags to new methods without scary overloading.

Also fix spacing issues in various logging statements.

Change-Id: I1e42f7f66427410275df713bea04f6e0445fba28
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
f06607882ff4bfdb4c0ada981193e567b9242f57 02-Sep-2015 Xiaohui Chen <xiaohuic@google.com> Cleanup USER_OWNER in PDB Service

This assumes that the calling uid is always from user 0, even in split
system user mode.

Bug: 19913735
Change-Id: I99b6a0ca534ac1627c1abb8609c92ff74a5aeabf
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
09ad6bfe9619ff7a61209131f1f3182d53d840d0 02-Jun-2015 Craig Lafayette <craiglafa@google.com> Remove FRP wipe support for device initializers

- Remove ManagedProvisioning NFC parameter key from
DevicePolicyManager
- Remove wipeIfAllowed from PersistentDataBlockManager

Bug: 21558883
Change-Id: I59354b7bb1ef7e0b0346ff9a7d1654780231dff0
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
66445a639dc134d09393f5069b7683ec36d4cd07 27-Mar-2015 Craig Lafayette <craiglafa@google.com> Reset protection in PersistentDataBlockManager

Add method to allow authorized data block wipe in support of factory
reset protection. This will allow ManagedProvisioning to respond to
and pass factory reset protection challenges during automated device
setup.
- Adds the wipeIfAllowed method to clear the data block
- Creates a protected-broadcast to send to allowed package

Bug: 19792435
Change-Id: I897f2ea2afb1222a1fc8ac49290ee45ea4d3f2d7
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
fb5dcacf41479434c497f1934646d0110ab73089 27-Mar-2015 Andres Morales <anmorales@google.com> Merge "Add system prop to track if oem unlock is allowed"
5ca4cc576145466e616f236e63215e2fe33df91c 20-Mar-2015 Andres Morales <anmorales@google.com> Add system prop to track if oem unlock is allowed

This state is never trusted, but it permits us to build
more appropriately message the user if their device is in
a state where its OK to reset.

Change-Id: I26cc0f928d7fdeff8837e4c2c4b8859fede7846d
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
c8f952ce9f9cadc0d38745e455c0a6388bc68a47 19-Mar-2015 Andres Morales <anmorales@google.com> Write correct checksum when formatting partition

OEM unlock enabled bit is not computed in the checksum,
causing OEM Unlocking to be disabled after the second
reboot.

Bug: 19829441
Change-Id: I100bf5d3958b89323ee35b9e97b19c162209fcd7
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
1ce7d179bf00a9ebebef8aff0006d71469870c26 07-Jan-2015 Andres Morales <anmorales@google.com> Wipe FRP partition if OEM unlock enabled

Not all devices invoke recovery on every userdata wipe,
so we can't rely on code in the
recovery OS to do this. This results in fastboot -w
not properly wiping the FRP partition. This patch
fixes the issue by having the framework level service
check the OEM unlock enabled bit, and wiping the partition
if it is set.

Bug: 18644051
Change-Id: Id97a29916fe39561700912a920c5741109842bdb
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
6b0c7acd7f175552d90d1d73b9717ff347158e7d 24-Nov-2014 Andres Morales <anmorales@google.com> Define permission for system apps to query size of block

Allows ManagedProvisioning to determine whether there's a
challenge and thus whether to disable NFC provisioning.

Other implementation option: new hidden boolean API method.
Can't think of benefit of new API method "isBlockInUse", other
than doesn't leak PDB size and is more explicitly tied to the
use case. Open to either impl if anyone has opinions on the matter.

Bug: 18508767
Change-Id: I28d2eb5a0837ff85cb91f140b17ce1dd843fe9d6
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
2830130770b0d010007d126f64756413f922974b 12-Nov-2014 Andres Morales <anmorales@google.com> Add a checksum to FRP partition

It will be hard to mandate the contents
of the FRP partition out of factory. Further, for upgrading
units, it would require that OEMs format the partition and then store
a bit saying that they've done so. This adds another attack vector.
Now defeating FRP means either compromising the FRP partition
OR wherever the OEMs decide to store that bit.

This patch adds a checksum to the FRP partition. If the checksum
is not valid, the partition is wiped - disabling OEM unlock.

This ensures that no matter what data comes on the partition, we will
always disable OEM unlock by default. It also allows OEMs to not have to
worry about initializing the partition, as it happens automatically.

Bug: 18322021
Change-Id: Ib30782baa771591c30ea95054d3b83f36fc08cc2
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
a31c23da300b5d1f4b1fc261bb0dcb1fee9b61f1 30-Oct-2014 Andres Morales <anmorales@google.com> Only allow USER_OWNER to access PDB and change OEM unlock ability

Bug:18191568
Change-Id: Ie09823945af04accead99216580efc958bf6aefe
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
514c58045980998909883bfed5810c9508fd2f7b 13-Sep-2014 Guang Zhu <guangzhu@google.com> do not allow monkey to flip OEM unlock flag

Bug: 11435021
Change-Id: I3a6865bc6c9fde245d8f4af3230716eac4a3f1b1
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
6429f313b4248a010bb197993bbdb16629459d69 05-Aug-2014 Andres Morales <anmorales@google.com> Allow PersistentDataBlockService to be used with all users

Bug: 16795591
Change-Id: Id5e5dc5c26408752fe85f6f6fc2c67d9408b6a2a
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
963295ea105314e28e4ca9563aa09cb7440de4c3 11-Jul-2014 Andres Morales <anmorales@google.com> Permit settings to "wipe" the persistent partition

One of the requirements is that when the user does a
factory reset through settings, all data on the
persistent partition should be cleared.

This adds one last API method that allows settings
to wipe the partition.

Bug: 14288780
Change-Id: Ib87ee741d1e5195814516ae1d66eb7c4cf754dcf
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java
68d4acd205e8c2da524e62734ca42847306cc029 02-Jul-2014 Andres Morales <anmorales@google.com> Service for reading and writing blocks to PST partition

Permits apps with permission
android.permission.ACCESS_PERSISTENT_PARTITION to obtain
a read and write data blocks to the PST partition.

Only one block ever exists at one time in PST. When
a client writes another block, the previous one is
overwritten.

This permits storing a block of data that will live
across factory resets.

Change-Id: I8f23df3531f3c0512118eb4b7530eff8a8e81c83
/frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java