summaryrefslogtreecommitdiff
path: root/services/incremental/ServiceWrappers.h
AgeCommit message (Collapse)Author
2025-02-04[appops] Migrate native IAppOpsCallback to aidl Atneya Nair
Move IAppOpsCallback to frameworks/native for use in both java and native. Fix-up callsites with fully qualified package name and the correct arguments. Test: compiles Test: atest CtsMediaAudioPermissionTestCases Test: atest service.incremental_test Bug: 322692565 Flag: EXEMPT mechanical Change-Id: I8d5fff5ef86e0b2d68df4a95745fe430134fe1f0
2021-05-11[incremental] use same sysfs name for setOptions Songchun Fan
Otherwise we have errors during applyStorageParams: 05-10 15:35:32.363 562 625 E IncrementalService: applyStorageParams failed: Status(-8, EX_SERVICE_SPECIFIC): '-95: ' 05-10 15:35:32.363 562 625 E incfs-dataloaderconnector: setStorageParams failed with error: -95 05-10 15:35:32.363 562 625 E incfs-dataloaderconnector: DataLoader supports UID 05-10 15:35:32.367 0 0 E incfs : Can't change sysfs_name mount option on remount BUG: 187308584 Test: atest CtsContentTestCases:android.content.pm.cts.PackageManagerShellCommandIncrementalTest#testInstallWithIdSigNoMissingPages Change-Id: Ic2146aa7855e13de9f96794639de556f64e93701
2021-05-03[IncrementalService] add last read error in dumpsys Songchun Fan
BUG: 184844615 Test: dumpsys Change-Id: I3e8178c8a62dc5d09c718b140bb48bda85a3bae5
2021-04-30[IncrementalService] use sysfs_name in mount options and dumpsys Songchun Fan
BUG: 184844615 Test: adb shell dumpsys incremental Change-Id: Ib6bbbede6d4fbed0bcef8d37f377e706b9d1af28
2021-04-08Installation hardening: reducing read timeout during installation. Alex Buynytskyy
And then restoring post-install. Bug: 160635296 Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest Change-Id: I0821458bf92db162518a2cbcb7499cd7544e64f2
2021-03-24[incfs] Space trimming for IncFS v1 Yurii Zubrytskyi
Run a manual timed job that trims all files one by one on the old version of IncFS, where it didn't do it automatically. Bug: 183435580 Fixes: 183436717 Test: atest libincfs-test service.incremental_test Change-Id: I57885b2826e383814822c767802f837135fd8464
2021-03-19[incfs] Use a more efficient getBlockCount() for incfs v2 Yurii Zubrytskyi
v2 IncFS driver gives a very lightweight function to check the loading progress on a file, use it instead of counting the filled ranges + remove the unused mockable toString(IncFsFileId) Bug: 183067554 Test: atest IncrementalServiceTest Change-Id: Icd3bd891d671b27654f4194787a15a00cba1eb80
2021-03-18[incfs] Use the new libincfs API for file status checking Yurii Zubrytskyi
libincfs got a new set of functions for checking the file loaded status, which works more efficiently than getting filled ranges. Bug: 183067554 Test: atest IncrementalServiceTest Change-Id: I3b96bf409f1778c5a89e4802e2005197f70ce0cb
2021-03-17[incfs] Preallocate space for IncFS files Yurii Zubrytskyi
Use the new libincfs APIs to preallocate space for all files created via the public makeFile() API. This way we ensure the device won't run out of space much later Bug: 182185202 Test: atest libincfs-test PackageManagerShellCommandTest \ PackageManagerShellCommandIncrementalTest \ IncrementalServiceTest Change-Id: I70af97949b29ff5db63201b0e3487fe026e23160
2021-03-11DL lifecycle: handle slow DL binding. Alex Buynytskyy
Bug: 182214420 Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest Change-Id: I5959e01177ab702de1f754f4ba433004925ce98b
2021-02-22Fix the progress getting for mapped files Yurii Zubrytskyi
Mapped files don't support querying their loading progress, so we should simply skip them - they are already a part of some other file, and will get accounted for loading when that file's progress get queried + a bunch of small improvements Bug: 180535478 Test: atest service.incremental_test, adb install --incremental with mapped native libs Change-Id: Ifc8a402144f2f3669a0419124fb0f35d7002190a (cherry picked from commit 7731ebd1d8187c92a992d1f53c4114a6c40f7563)
2021-02-22[incremental] Use file range mapping for .so if available Yurii Zubrytskyi
Bug: 180535478 Test: IncrementalService unit tests Change-Id: I663dcdce337c289cacc5dc7224dedf5a55605c86
2021-02-11DataLoader lifecycle. Alex Buynytskyy
- restarting DataLoaders for not fully downloaded mounts, - exponential backoff retry on DataLoader restart. Bug: 173223115 Bug: 160634487 Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest Change-Id: I5a93fd515ef0fec09452ce7bb4cd79fbd283d45f
2021-01-14Incfs: Add the new .blocks_written control file Yurii Zubrytskyi
Bug: 170231230 Test: incremental and PackageManager unit tests Change-Id: Ia26306a4b1ca70ce70d55ce807fea62540f89334
2021-01-12Per package read timeouts. Alex Buynytskyy
Bug: 162345970 Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest Change-Id: I2599db1ed8827fff16387c11254a5d607f27ea46
2020-11-09[incremental] add last pending reads info in dumpsys Songchun Fan
Example section of dumpsys output: lastPendingReads: fileId: 03300000000000000000000000000000 metadataHex: 0330 blockIndex: 857738 bootClockTsUs: 166877488 Test: manual BUG: 162600251 Change-Id: I37b04751c2a11972450ce7e9082116f8047e87df
2020-09-15[incremental/pm] register progress listener Songchun Fan
Incremental Serivce periodically polls loading progress and sends to Package Manager Service. Package Manager provides APIs for other interested parties to listen to the loading progress. BUG: 165841827 Test: unit test Change-Id: I44b9e17c2240b9efe53bc09fc728b6671f1f7dfe
2020-08-27Wait for APK to be fully downloaded for full APK digests. Alex Buynytskyy
Bug: 160605420 Test: atest ChecksumsTest Change-Id: Ib9fd591c67290786268b6dcdc57c7db153612e01
2020-08-22[IncrementalService] getLoadingProgress (v1) Songchun Fan
This is to unblock Launcher's work on progress ring. Currently it uses incfs getFilledBlocks(). Will switch to the new incfs progress reporting API once it is ready. Test: unit test Test: adb shell dumpsys incremental BUG: 165799231 Change-Id: Icd68124806454f888826294da36f109bca9771ac
2020-06-01Healthcheck: proper job allocation and test. Alex Buynytskyy
Bug: 153874006 Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest Change-Id: Iede1f2297cc4f8e3c3f0acd43cee597f75dff179
2020-05-26Lifecycle: detecting blocked and unhealthy. Alex Buynytskyy
Part 1: interfaces and PM implementation. Bug: 153874006 Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest Change-Id: I312dd919d2bb552bea3d72fb49fd1579882da14b
2020-05-07Lifecycle: detecting pending reads. Alex Buynytskyy
Once pending read detected, try to start the dataloader. Bug: 153874006 Test: test PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest Change-Id: Ia8169ccbb0f710317715e6fddb9bc6a718543766
2020-04-23Keep only service binding in DataLoaderManager. Alex Buynytskyy
This simplifies: - resource management - no extra copies of controls, - state management - all states in one place, no more hidden (bound but not created) state. Bug: b/153874006 Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest Change-Id: I3d16a099c7f42fcf14637c5a8e96bd6f99e073d1
2020-04-22[incfs] Use the new IncFs_MakeDirs() function Yurii Zubrytskyi
This gets rid of annoying warnings in logcat about not being able to create a directory and then directory already existing Bug: 153704006 Test: atest IncrementalServiceTest Test: adb install megacity.apk Change-Id: Ib718960287f93cb383c06c9b9e3d0abf1ec42916
2020-04-22[incfs] Use MountRegistry to import existing mounts on start Yurii Zubrytskyi
This is a big cleanup in IncrementalService that makes it behave nicely on runtime restart, and more: - fixed a bunch of threading issues in createStorage/bind - made public functions correctly accept any path in any bind mount and translate it to the proper root mount - got rid of "using namespace" in headers, cleaned includes - removed all unused functions - set CLOEXEC bit on all duped FDs Bug: 151241369 Test: atest PackageManagerShellCommandTest \ PackageManagerShellCommandIncrementalTest \ IncrementalServiceTest Change-Id: Ided4415aabfbfca3925b5e71c91896055886ac4a
2020-04-10[incfs] Fix a crash in worker thread calling JNI Yurii Zubrytskyi
Worker thread has to initialize JNI separately to be able to call into managed binders implemented in the same system_server process, e.g. DataLoaderManager Bug: 153513507 Test: adb install megacity.nov4.apk; adb install megacity.v4.apk Change-Id: I668e8664361cd2fb3353ec50efd689c7d613658f
2020-04-06Appops permission monitoring for GET_USAGE_STATS. Alex Buynytskyy
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-03Disallow read logs collection if user changes their mind. Alex Buynytskyy
Bug: b/152633648 Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest Test: adb shell appops set 1000 GET_USAGE_STATS deny Change-Id: I7fc8356f84fe30669483470579eedf546f81f297
2020-04-02Merge changes from topic "LOADER_USAGE_STATS" into rvc-dev Alex Buynytskyy
* changes: Checking LOADER_USAGE_STATS before enabling read logs. Revert "Update the current API dump"
2020-04-02Checking LOADER_USAGE_STATS before enabling read logs. Alex Buynytskyy
Bug: b/152633648 Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest Change-Id: Ic747a51b97b785c627c95bddecc6834ef602ff30
2020-04-01Use the new incfs API to open files Yurii Zubrytskyi
Bug: 152983639 Test: atest service.incremental_test Change-Id: If33891d4699d5ddf2789ac99677a67e2b004d94e
2020-03-27[frameworks] update with incfs.h Songchun Fan
BUG: 150470163 Test: atest PackageManagerShellCommandIncrementalTest Change-Id: I32ac2576c7468e04ada61e82ca778f762ce2559f
2020-03-03directly call data loader manager service from incremental service Songchun Fan
BUG: 150406132 Test: atest service.incremental_test Test: atest PackageManagerShellCommandIncrementalTest Change-Id: I2bb75d5adae58d2471478f6a4d2354058d7b0dab
2020-03-03libincfs and libdataloader headers not using std::span Songchun Fan
BUG: 150470163 Test: atest service.incremental_test Test: atest PackageManagerShellCommandIncrementalTest Change-Id: I76715d6ea39da05fa82cec0e680a1896f5a88fe9 Merged-In: I76715d6ea39da05fa82cec0e680a1896f5a88fe9
2020-02-11Incremental installations in PackageManagerShellCommand. Alex Buynytskyy
- 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-04fix dir creation mode Songchun Fan
They need to be writable by owner. Test: manual Change-Id: I3e99094e5752c0f6bb351cc24bdf5698b7a4bde2
2020-01-28Port the current code to new IncFS Yurii Zubrytskyi
Bug: 146080380 Test: manual, "cmd incremental install-start" Change-Id: I6761c3f0e58b6d4de1ae3c4b31c23204fba9f740
2019-12-19[incremental] native implementation of Incremental Service Songchun Fan
The implementation of IIncrementalManager.aidl. TODO to refactor this. Test: atest service.incremental_test Change-Id: Ib8c8a9c0e7f0289b4bcd8961fa39746ed12b4310