From 4a0838c2ce4bb96057cd4b6938a866b659d5b79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Fri, 14 Jun 2024 20:22:20 +0000 Subject: [PATCH] NetBpfLoad: remove isGSI() check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it doesn't work due to sepolicy anyway: I auditd : type=1400 audit(0.0:6): avc: denied { search } for comm="netbpfload" name="gsi" dev="sda8" ino=23 scontext=u:r:bpfloader:s0 tcontext=u:object_r:gsi_metadata_file:s0 tclass=dir permissive=0 Bug: 347309609 Signed-off-by: Maciej Żenczykowski Change-Id: Ic8c56a096a89a89950585b939379634accb78e56 --- netbpfload/NetBpfLoad.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/netbpfload/NetBpfLoad.cpp b/netbpfload/NetBpfLoad.cpp index b9976e0297..a247bdaa6d 100644 --- a/netbpfload/NetBpfLoad.cpp +++ b/netbpfload/NetBpfLoad.cpp @@ -224,11 +224,6 @@ static int logTetheringApexVersion(void) { return 0; } -static bool isGSI() { - // From //system/gsid/libgsi.cpp IsGsiRunning() - return !access("/metadata/gsi/dsu/booted", F_OK); -} - static bool hasGSM() { static string ph = base::GetProperty("gsm.current.phone-type", ""); static bool gsm = (ph != ""); @@ -351,7 +346,7 @@ static int doLoad(char** argv, char * const envp[]) { #undef REQUIRE - if (bad && !isGSI()) { + if (bad) { ALOGE("Unsupported kernel version (%07x).", kernelVersion()); } }