Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 83620602 authored by Dario Freni's avatar Dario Freni
Browse files

Disable APEX install on unsupported devices.

If the device ships with "flattened" APEXs, this will not be treated as
packages and therefore will not be updatable.

This CL also ensure that APEX files are only scheduled to be installed
as part of a staged session.

Fix: 124644545
Test: install succeeds on taimen (supported). Install fails on marlin
with following error.
$ adb install com.android.media.apex
Performing Streamed Install
adb: failed to install com.android.media.apex:
Exception occurred while executing:
java.lang.IllegalStateException: This device doesn't support the installation of APEX files
        at com.android.server.pm.PackageInstallerService.createSessionInternal(PackageInstallerService.java:497)
        at com.android.server.pm.PackageInstallerService.createSession(PackageInstallerService.java:450)
        at com.android.server.pm.PackageManagerShellCommand.doCreateSession(PackageManagerShellCommand.java:2587)
        at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:1011)
        at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:164)
        at android.os.ShellCommand.exec(ShellCommand.java:103)
        at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:20664)
        at android.os.Binder.shellCommand(Binder.java:887)
        at android.os.Binder.onTransact(Binder.java:771)
        at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4689)
        at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3698)
        at android.os.Binder.execTransactInternal(Binder.java:1026)
        at android.os.Binder.execTransact(Binder.java:999)

Change-Id: I6cc0c1d4cb143197cf4cc88a86dc6b758c6c70b2
parent 3deb23fe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment