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

Commit 156cf242 authored by Jooyung Han's avatar Jooyung Han Committed by Android (Google) Code Review
Browse files

Revert "Do not rely on /data/apex"

This reverts commit 6314b162.

Reason for revert: The code was wrong.

Change-Id: I54949ce148777c4ec99e13baf105d06bfbd5e49f
parent 6314b162
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -612,7 +612,7 @@ public class BinaryTransparencyService extends SystemService {
                    pw.println("--- Package Installation Info ---");
                    pw.println("Current install location: "
                            + packageInfo.applicationInfo.sourceDir);
                    if ((packageInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
                    if (packageInfo.applicationInfo.sourceDir.startsWith("/data/apex/")) {
                        String origPackageFilepath = getOriginalApexPreinstalledLocation(
                                packageInfo.packageName);
                        pw.println("|--> Pre-installed package install location: "
+2 −3
Original line number Diff line number Diff line
@@ -189,10 +189,9 @@ public final class BinaryTransparencyHostTest extends BaseHostJUnit4Test {
    private void uninstallRebootlessApexThenReboot() throws DeviceNotAvailableException {
        // Reboot only if the APEX is not the pre-install one.
        CommandResult result = getDevice().executeShellV2Command(
                "pm list packages -f --apex-only --show-versioncode "
                + " | grep com.android.apex.cts.shim");
                "pm list packages -f --apex-only |grep com.android.apex.cts.shim");
        assertTrue(result.getStatus() == CommandStatus.SUCCESS);
        if (result.getStdout().contains("versionCode:2")) {
        if (result.getStdout().contains("/data/apex/active/")) {
            uninstallPackage("com.android.apex.cts.shim");
            getDevice().reboot();