Keep lspd is euid 0 in debug build (#2615)

This commit is contained in:
南宫雪珊 2023-07-10 13:42:36 +08:00 committed by GitHub
parent 8792e62df8
commit a2db3f8b4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,8 @@ import android.system.ErrnoException;
import android.system.Os;
import android.util.Log;
import org.lsposed.daemon.BuildConfig;
import java.lang.reflect.Field;
import java.util.Map;
@ -147,7 +149,9 @@ public class BridgeService {
}
} finally {
try {
Os.seteuid(1000);
if (!BuildConfig.DEBUG) {
Os.seteuid(1000);
}
} catch (ErrnoException e) {
Log.e(TAG, "seteuid 1000", e);
}