Alex Buynytskyy
1d89216eac
Appops permission monitoring for GET_USAGE_STATS.
...
This makes sure DataLoader won't be able to obtain read logs once user
denies access.
Bug: b/152633648
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Test: adb shell appops set 1000 GET_USAGE_STATS deny
Change-Id: Ibbb74933b4ef0dd8f5fe27732743e5820b8ee4dc
2020-04-06 12:22:49 -07:00
Alex Buynytskyy
96e350b30d
Disallow read logs collection if user changes their mind.
...
Bug: b/152633648
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Test: adb shell appops set 1000 GET_USAGE_STATS deny
Change-Id: I7fc8356f84fe30669483470579eedf546f81f297
2020-04-03 18:44:43 -07:00
Yurii Zubrytskyi
107ae35444
[incfs] fix the storage loading for existing mounts
...
IncrementalService used to keep the storage parameters in the
directory metadata, but our current incfs doesn't support
metadata on directories - so the storage id is encoded in its
name. But the loading code used to think it's still in the
metadata and couldn't load anything for that reason
Bug: 151241369
Test: install an app and reboot the phone. It's still there
Change-Id: Ic93f8f368b48fc5c5cc9bb726eff80478183596c
2020-04-03 13:15:53 -07:00
Alex Buynytskyy
50e0244012
Merge changes from topic "LOADER_USAGE_STATS" into rvc-dev
...
* changes:
Checking LOADER_USAGE_STATS before enabling read logs.
Revert "Update the current API dump"
2020-04-02 00:36:26 +00:00
Alex Buynytskyy
5e860ba105
Checking LOADER_USAGE_STATS before enabling read logs.
...
Bug: b/152633648
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Change-Id: Ic747a51b97b785c627c95bddecc6834ef602ff30
2020-04-02 00:31:41 +00:00
Yurii Zubrytskyi
e82cdd7935
Use the new incfs API to open files
...
Bug: 152983639
Test: atest service.incremental_test
Change-Id: If33891d4699d5ddf2789ac99677a67e2b004d94e
2020-04-01 12:19:26 -07:00
Songchun Fan
20d6ef2477
[frameworks] update with incfs.h
...
BUG: 150470163
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: I32ac2576c7468e04ada61e82ca778f762ce2559f
2020-03-27 16:40:27 -07:00
Alex Buynytskyy
686a537376
Dynamic args complete removal.
...
Bug: b/150470163
Test: atest PackageManagerShellCommandIncrementalTest PackageManagerShellCommandTest
Change-Id: I122f37f210ef9b8b02d565c34245ebeec26d83b2
2020-03-26 16:28:33 -07:00
Yurii Zubrytskyi
9cce14eb0e
Merge "[incremental native lib] skip writing to zero byte files" into rvc-dev
2020-03-19 06:23:23 +00:00
Yurii Zubrytskyi
793f73812d
Merge "Incremental apps removal on data loader failures." into rvc-dev
2020-03-19 06:20:37 +00:00
Songchun Fan
afaf6e9ee7
[incremental native lib] skip writing to zero byte files
...
Test: adb install --incremental /google/data/rw/teams/tradefed/testdata/thirdparty_apps_stable/MX_Player_1.9.17.apk
BUG: 150795871
Change-Id: Idca09929f41424edb527b9b89dea1974c1f8ea46
2020-03-18 14:17:04 -07:00
Yurii Zubrytskyi
1d6e6bfe96
Merge "Removing race condition accessing shared binder object." into rvc-dev
2020-03-18 19:54:55 +00:00
Alex Buynytskyy
2cf1d18fe1
Incremental apps removal on data loader failures.
...
Test: adb install --incremental megacity.apk over USB2.0, remove usb connection
after installed.
Bug: b/15041101
Change-Id: Ib848640dbe49c76021f7cf544de4413599c2c763
2020-03-18 10:18:48 -07:00
Alex Buynytskyy
b6e02f7b09
Removing race condition accessing shared binder object.
...
Test: incrementally installing two apks at the same time
Bug: b/150411019
Change-Id: I81231edf7a32470542ec529aa305b4f9fb2b80e3
2020-03-18 09:01:36 -07:00
Songchun Fan
eee228f65e
Merge "[incremental service] avoid nullptr dereferencing" into rvc-dev
2020-03-18 05:19:56 +00:00
Songchun Fan
306b7df3f9
[incremental service] avoid nullptr dereferencing
...
externalListener could be nullptr.
BUG: 150795871
Test: atest service.incremental_test
Change-Id: I2843e1751cb1f7e9318edb05e9a8f5256ad9f3a8
2020-03-17 14:27:31 -07:00
Alex Buynytskyy
f5e605a00c
Updated v4 signature processing.
...
Passing to libincfs.so.
Obtaining and verifying, including v3 digest check.
go/apk-v4-signature-format
Test: atest PackageManagerShellCommandTest
Bug: b/151241461
Change-Id: Id61f5716b9f9b55d6ab1ebca5a7ecb1c6e54570a
2020-03-13 15:13:25 -07:00
Jooyung Han
66c567a8c4
Use aidl::nullable for nullable type in C++
...
To reduce the discrepance between old code which still uses
std::unique_ptr and new code using std::optional.
This might help to avoid merge-conflicts between branches.
Bug: 144773267
Test: m
Merged-In: Ie3196ee5cce17d77950eea9479d2cc1406e9e674
Merged-In: I33822bc76ef87637d5408849f64a0607e121792e
Change-Id: I33822bc76ef87637d5408849f64a0607e121792e
(cherry picked from commit ad62e8cbf5 )
Exempt-From-Owner-Approval: cherry-pick from master with owner's approval
2020-03-12 11:36:33 +00:00
Alex Buynytskyy
bf1c063481
DataLoader lifecycle cleanup.
...
Remove 5 second delay in startLoading()
Remove sysprops: incremental.skip_loader
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest
Bug: b/151178179 b/136132412
Change-Id: Ibbe921c444b7e11fe5482662ca791bd8dfeb8324
2020-03-11 09:22:34 -07:00
Songchun Fan
68645c42ac
directly call data loader manager service from incremental service
...
BUG: 150406132
Test: atest service.incremental_test
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: I2bb75d5adae58d2471478f6a4d2354058d7b0dab
2020-03-03 21:18:30 -08:00
Songchun Fan
1124fd38c1
Fix mounting existing images on reboot
...
Fixes paths.
BUG: b/133435829
Test: manual
Change-Id: Ib48ac36e8b22f8e2a85d5e223c6dd0f8b5289045
2020-02-11 16:21:16 -08:00
Alex Buynytskyy
f3b2e68fae
Merge "Incremental installations in PackageManagerShellCommand."
2020-02-11 21:24:55 +00:00
Alex Buynytskyy
04f7391fc3
Incremental installations in PackageManagerShellCommand.
...
- onPrepareImage in native,
- allow to check installation type and choose native or managed
dataloaders,
- native data loader for Incremental,
- install-incremental shell command.
Test: atest PackageManagerShellCommandTest
Test: atest IncrementalServiceTest
Bug: b/136132412 b/133435829
Change-Id: I530a8a203fb50132c1869abd0b869036add18699
2020-02-11 13:11:31 -08:00
George Burgess IV
dd5275dcc4
incfs: fix uninitialized values
...
Clang's static analyzer is flagging uninitialized struct fields that
we're passing around. In particular, it's not happy that we pass this
partially-initialized struct to a pure-virtual method. I tend to agree
that this may cause issues.
Assuming zero-init gives us reasonable values for all of:
IncFsNewFileParams{}.verification.rootHash
IncFsNewFileParams{}.verification.additionalData
IncFsNewFileParams{}.verification.signature
Bug: None
Test: TreeHugger
Change-Id: I61e556cd8c0e68cdaebd50b0a7be5d5e0a4fd8ff
2020-02-10 11:26:40 -08:00
Songchun Fan
0f8b6fe950
Incremental native lib extraction
...
Basically we configure all the lib files inside Incremental Service,
e.g., create lib dirs, make lib files, extract original
lib file data from zip and then write data to the lib files on incfs.
Test: manual with incremental installation
BUG: b/136132412 b/133435829
Change-Id: I7544d2e78bcf3bdd76ce4c0766ec31ff13fd2011
2020-02-07 11:35:48 -08:00
TreeHugger Robot
1a79ff69de
Merge "fix dir creation mode"
2020-02-04 07:19:54 +00:00
TreeHugger Robot
fb740d58fe
Merge "Dumpsys support for IncrementalService."
2020-02-04 06:56:31 +00:00
Alex Buynytskyy
18b07a4252
Dumpsys support for IncrementalService.
...
Test: atest PackageManagerShellCommandTest
Test: adb shell dumpsys incremental
Bug: b/136132412 b/133435829
Change-Id: I8a91eddb850c68da87f56a82ca14fdf9ac5d3ce5
2020-02-03 20:09:00 -08:00
Songchun Fan
103ba1db21
more normalized path fix
...
Test: manual
Change-Id: I8fe073cb4bc4fa1a3af784cfcfa8db4d0a232991
2020-02-04 03:27:45 +00:00
Songchun Fan
9610093a7b
fix dir creation mode
...
They need to be writable by owner.
Test: manual
Change-Id: I3e99094e5752c0f6bb351cc24bdf5698b7a4bde2
2020-02-04 03:27:08 +00:00
Songchun Fan
54c6aed58d
make adb install --incremental work
...
With a simple Java apk (flipboard.app).
BUG: 133435829
Test: manual
Change-Id: If702afffc0e01cbb03f88560c0569fd23dda2350
2020-01-31 19:48:35 -08:00
Yurii Zubrytskyi
4a25dfb2de
Port the current code to new IncFS
...
Bug: 146080380
Test: manual, "cmd incremental install-start"
Change-Id: I6761c3f0e58b6d4de1ae3c4b31c23204fba9f740
2020-01-28 12:10:17 -08:00
Alex Buynytskyy
1ecfcece45
Migrating Incremental* APIs to PackageManager APIs.
...
Step 2, merging Data Loader params.
Test: builds and flashes
Bug: b/136132412
Change-Id: I2102554316dadcdcb49790c133ece110c43c29b3
2019-12-20 06:55:32 -08:00
Songchun Fan
3c82a306cd
[incremental] native implementation of Incremental Service
...
The implementation of IIncrementalManager.aidl. TODO to refactor this.
Test: atest service.incremental_test
Change-Id: Ib8c8a9c0e7f0289b4bcd8961fa39746ed12b4310
2019-12-19 11:27:42 -08:00