Yo Chiang be20495f0b Key revocation check is permissive when device is unlocked
imageValidationThrowOrWarning() logs the error as a warning if device
bootloader is unlocked, else re-throw the error.
Device lock state is queried via PersistentDataBlockManager service.

Bug: 128892201
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 8192 \
    -d file:///storage/emulated/0/Download/aosp_arm64-dsu_test.zip \
    --es ${IMAGE_KEY}
Test: Observe the logcat
Change-Id: I895e70d90624afda2bf7cd3b34ea8d21a1702163
2020-02-19 11:11:29 +00:00

49 lines
2.0 KiB
XML

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.dynsystem"
android:sharedUserId="android.uid.system">
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.MANAGE_DYNAMIC_SYSTEM" />
<uses-permission android:name="android.permission.REBOOT" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_OEM_UNLOCK_STATE" />
<application
android:allowBackup="false"
android:label="@string/app_name">
<service
android:name=".DynamicSystemInstallationService"
android:enabled="true"
android:exported="true"
android:permission="android.permission.INSTALL_DYNAMIC_SYSTEM"
android:process=":dynsystem">
<intent-filter>
<action android:name="android.os.image.action.NOTIFY_IF_IN_USE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</service>
<activity android:name=".VerificationActivity"
android:exported="true"
android:permission="android.permission.INSTALL_DYNAMIC_SYSTEM"
android:theme="@android:style/Theme.Material.Light.Dialog.NoActionBar"
android:process=":dynsystem">
<intent-filter>
<action android:name="android.os.image.action.START_INSTALL" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<receiver
android:name=".BootCompletedReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>
</manifest>