After aosp/1188881, DynamicSystemManager.remove() is blocked for
about 30 seconds. To give users feedbacks faster when they click on
the [Cancel] button, This CL removes the progress notification
earlier.
Bug: 145891864
Test: Clicking on the [Cancel] button
Change-Id: I4e43775b2de6eaa50d4a1cc073a5057f22f6d8d5
When VerificationActivity receives an Intent, clone the calling Intent's
extras Bundle and pass the whole Bundle into
DynamicSystemInstallationService Intent. Don't unpack and repack the
calling Intent's extras field. Since VerificationActivity aren't using the
contents of the extras Bundle, it shouldn't know about the details of extra.
Test: adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
--el KEY_USERDATA_SIZE 8589934592 \
-d file:///storage/emulated/0/Download/aosp_arm64-dsu_test.zip
Change-Id: Ie19b9d4d9ebcbd4623d8c76637da4fa732a4a3c3
DSU previously only supports gzipped system images. This CL enables
DSU to also read zipped files. If there are multiple images in the
zipped release, DSU will install them all.
Bug: 134353973
Test: adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
-d https://dl.google.com/developers/android/qt/images/gsi/aosp_arm64-QP1A.190771.020-5800535.zip \
--el KEY_USERDATA_SIZE 8589934592
Test: adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
-d file:///storage/emulated/0/Download/aosp_crosshatch-img-eng.pchsueh.zip \
--el KEY_USERDATA_SIZE 8589934592
Change-Id: I9c2137d4d81398a9c6153df63a29c16eb8339795
SparseInputStream read from upstream and detects the data format.
If the upstream is a valid sparse data, it will unsparse it on the fly.
Otherwise, it just passthrough as is.
Bug: 139510436
Test: \
java com.android.dynsystem.SparseInputStream system.img system.raw
simg2img system.img system.raw.golden
diff system.raw system.raw.golden
Change-Id: Ibc5c130127a455392484467fe32d638be642afa8
See build/soong/README.md for more information.
Bug: 122332340
Test: m DynamicSystemInstallationService InputDevices MtpDocumentsProvider SimAppDialog
Change-Id: I851b819030a1da6091f5d6125a228bb01a99011b
Reduce buffer size to 8192 to avoid binder transaction failures.
According to our previous tests. Reducing the buffer size to 8K
doesn't show negative impact on performance.
Bug: 132923636
Test: Successfully install a DSU
Change-Id: Ibe51ab748b4f6c1d3c3ac8286519380ea8afc184
We are using a feature flag to protect DSU and the device. But when
a Dynamic System is in use, feature flag is set as false by default.
This CL makes DSU bypass feature flag and start GSI service on boot
completed, check if the device is currently running a Dynamic System,
then, stop GSI service if the device isn't.
Bug: 132575851
Test: restart into DSU, check if the "In Use" notification is shown.
Change-Id: I9dabf9bc1716ef18d513278415c6544a5467d510
Per design, we ask user's confirmation before enabling DSU when
install completed. To simplify the process of testing, this CL adds
a paramenter (intent key) "KEY_ENABLE_WHEN_COMPLETED". If the key is
set, the installation service will not ask user before enabling DSU.
Bug: 131866826
Test: adb shell am start-activity -n com.android.dynsystem/com.android.dynsystem.VerificationActivity
-a android.os.image.action.START_INSTALL
-d file:///storage/emulated/0/Download/system.raw.gz
--el KEY_SYSTEM_SIZE 893841408
--el KEY_USERDATA_SIZE 8589934592
--ez KEY_ENABLE_WHEN_COMPLETED true
Change-Id: Id38c4c0525199594f6bd6704b5a575d4a42b7b61
We previously renamed DynamicAndroid to DynamicSystem. Package name
was also changed to com.android.dynsystem. But the folder name was
unchanged. This CL fixes the inconsistency.
Bug: 126613281
Test: make and run the service with 'adb shell am'
Change-Id: Ib462aec1603a16179c8392b6d51a00d0855d9421
Rename "Android On Tap" to "Dynamic System Updates".
And, some string changes to follow review suggestions.
Bug: 129100345
Bug: 129330026
Test: make the package
Change-Id: I440e5beaa3831814d2f7f1063be16d073c5f2c38
On BOOT_COMPLETED, the installation checks if there is an installed
system image and shows a notification if there is.
However, if there isn't. The installation should stop itself.
Bug: 128960337
Test: boot and adb shell ps
Change-Id: I422e308020cd5ec127ea265079926c1b74547d4b
Some changes to follow string review suggestions:
- Simplify some messages.
- Replace 'Reboot' with 'Restart'.
- Notification action button order: 'Restart' button on the right.
Bug: 129100345
Test: verified with test app
Change-Id: I1ee97b0adbf74add68d3561fc647dc4923ee7237
We can now use setEnable() to tell GsiService that we would like
run in DynamicSystem on the next restart, if there is a system
image installed.
Bug: 124613126
Test: Tap the button and setEnabe() is invoked.
Change-Id: I74312af0c87548981ecb4e1ac9a1f3814304a4d5
Check persistent feature flag 'settings_dynamic_system' before
invoking the installation service. User can still use gsi_tool if
the device is unlocked.
Bug: 119647479
Test: Verified with 'adb shell am' and test app.
Change-Id: If2265d877bc7eedf9b7a107bba04d2e95cf1b89a
We already have a permission, MANAGE_DYNAMIC_SYSTEM, whose protection
level is signature. Only platform applications holding it can interact
directly with DynamicSystemService, a wrapper of native GsiService. In
our design, DynamicSystemInstallationService is the sole platform app
holding it.
Then we need another permission for non-platform but privileged apps.
This new permission doesn't give apps access to DynamicSystemService,
but only to system API DynamicSystemClient. DynamicSystemClient works
with underneath DynamicSystemInstallationService and allows privileged
apps to install DynamicSystem images and get status updates in our
designed manner.
Bug: 128982216
Test: verified using DynamicSystemClient.
Change-Id: I3e67322511e3ab08db87bfad40d8c3d3cf6fdfe5
Per API review, send the system image file path to the installation
service using Uri.
Bug: 126613281
Test: adb shell am start-activity -d URL
Change-Id: Ib46d3604c16a981b4ae1a571afa96ffdda7a7262
Per API review, DynamicSystem installation service will also pass
exceptions to users of DynamicSystemClient.
Bug: 126613281
Test: build and run, verified with test app.
Change-Id: I413d6137837eaa968f59550f110da34cea66d4d4
Some API changes per API reivew:
- Move DynamicAndroidClient and ~Manager to android.os.image.
- Rename them to DynamicSystemClient and ~Manager.
- Rename permission MANAGE_DYNAMIC_ANDROID to MANAGE_DYNAMIC_SYSTEM
- Corresponding changes in the installation service.
- Corresponding changes in privapp-permissions-platform.xml.
- Add missing annotations.
- Change setOnStatusChangedListener's parameters order.
- Improve documentations.
- Re-generate api/system-current.txt.
Bug: 126613281
Test: adb shell am
Change-Id: Ia920e9ccf6de1dbbd38c52910cb72cb81b9b5b32