From 569e9ad93793b088009e120ec5709c087377ec84 Mon Sep 17 00:00:00 2001 From: vvb2060 Date: Mon, 6 Jun 2022 16:56:06 +0800 Subject: [PATCH] Use noHistory attribute for SuRequestActivity --- app/src/main/AndroidManifest.xml | 6 +----- buildSrc/src/main/java/Codegen.kt | 6 +----- native/jni/su/connect.cpp | 5 +++-- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 126f494b5..3855fdde2 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -26,10 +26,7 @@ + android:exported="false"> @@ -38,7 +35,6 @@ diff --git a/buildSrc/src/main/java/Codegen.kt b/buildSrc/src/main/java/Codegen.kt index 1d375cff6..bbb865522 100644 --- a/buildSrc/src/main/java/Codegen.kt +++ b/buildSrc/src/main/java/Codegen.kt @@ -94,7 +94,6 @@ fun genStubManifest(srcDir: File, outDir: File): String { """ | | | @@ -127,10 +126,7 @@ fun genStubManifest(srcDir: File, outDir: File): String { | + | android:exported="false"> | | | diff --git a/native/jni/su/connect.cpp b/native/jni/su/connect.cpp index 5432ee8bd..211e3e3ab 100644 --- a/native/jni/su/connect.cpp +++ b/native/jni/su/connect.cpp @@ -17,9 +17,10 @@ exe, "/system/bin", "com.android.commands.content.Content", \ #define START_ACTIVITY \ exe, "/system/bin", "com.android.commands.am.Am", \ "start", "-p", target, "--user", user, "-a", "android.intent.action.VIEW", \ -"-f", "0x18000020", "--es", "action", action +"-f", "0x58000020", "--es", "action", action -// 0x18000020 = FLAG_ACTIVITY_NEW_TASK|FLAG_ACTIVITY_MULTIPLE_TASK|FLAG_INCLUDE_STOPPED_PACKAGES +// 0x58000020 = FLAG_ACTIVITY_NEW_TASK|FLAG_ACTIVITY_MULTIPLE_TASK| +// FLAG_ACTIVITY_NO_HISTORY|FLAG_INCLUDE_STOPPED_PACKAGES #define get_cmd(to) \ ((to).command.empty() ? \