Skip to content

Commit 67f96e6

Browse files
quh4gko8thestinger
authored andcommitted
fixup! add test for SELinux flags-based per-app hardening features
This fixes the following error on duplicate permissions across HardeningTestApp, potentially caused by aapt2 peculiarity: ``` RUNNER ERROR: com.android.tradefed.targetprep.TargetSetupError[APK_INSTALLATION_FAILED|520001|DEPENDENCY_ISSUE]: Failed to install app.grapheneos.hardeningtest.sdk_27 with [${TMP_DIR}/HardeningTestAppSdk27.apk] on $SERIAL_NUMBER. Reason: 'INSTALL_FAILED_DUPLICATE_PERMISSION: Package app.grapheneos.hardeningtest.sdk_27 attempting to redeclare permission app.grapheneos.hardeningtest.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION already owned by app.grapheneos.hardeningtest.preinstalled' [$SERIAL_NUMBER $TARGET_PRODUCT:$TARGET_PRODUCT $BUILD_NUMBER] at com.android.tradefed.targetprep.TestAppInstallSetup.installSinglePackage(TestAppInstallSetup.java:595) at com.android.tradefed.targetprep.TestAppInstallSetup.installer(TestAppInstallSetup.java:562) at com.android.tradefed.targetprep.TestAppInstallSetup.setUp(TestAppInstallSetup.java:429) at com.android.tradefed.testtype.suite.ModuleDefinition.runPreparerSetup(ModuleDefinition.java:1048) at com.android.tradefed.testtype.suite.ModuleDefinition.runTargetPreparation(ModuleDefinition.java:1517) at com.android.tradefed.testtype.suite.ModuleDefinition.runPreparation(ModuleDefinition.java:1007) at com.android.tradefed.testtype.suite.ModuleDefinition.run(ModuleDefinition.java:515) at com.android.tradefed.testtype.suite.ITestSuite.runSingleModule(ITestSuite.java:1277) at com.android.tradefed.testtype.suite.ITestSuite.run(ITestSuite.java:1044) at com.android.tradefed.invoker.InvocationExecution.runTest(InvocationExecution.java:1457) at com.android.tradefed.invoker.InvocationExecution.runTests(InvocationExecution.java:1232) at com.android.tradefed.invoker.TestInvocation.prepareAndRun(TestInvocation.java:636) at com.android.tradefed.invoker.TestInvocation.performInvocation(TestInvocation.java:291) at com.android.tradefed.invoker.TestInvocation.invoke(TestInvocation.java:1429) at com.android.tradefed.command.CommandScheduler$InvocationThread.run(CommandScheduler.java:692) ```
1 parent 8edf282 commit 67f96e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/HardeningTest/HardeningTestApp/AndroidManifest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
xmlns:tools="http://schemas.android.com/tools"
44
package="app.grapheneos.hardeningtest">
55

6+
<!-- Since there are multiple versions of HardeningTest, permission name of -->
7+
<!-- dynamic receiver not exported checks conflicts between them. -->
8+
<!-- Remove this permission, it doesn't affect the testing app's functionality. -->
9+
<permission android:name="${applicationId}.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
10+
tools:node="remove" />
11+
612
<application
713
android:zygotePreloadName="app.grapheneos.hardeningtest.ZygotePreloadImpl" >
814

0 commit comments

Comments
 (0)