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

Commit 95c937d7 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Log zygote init argv

parent 887ce3ae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ import java.util.logging.LogManager;
 */
public class RuntimeInit {
    final static String TAG = "AndroidRuntime";
    final static boolean DEBUG = false;
    final static boolean DEBUG = true;

    /** true if commonInit() has been called */
    @UnsupportedAppUsage
+4 −0
Original line number Diff line number Diff line
@@ -351,6 +351,8 @@ public final class Zygote {
            boolean bindMountAppDataDirs, boolean bindMountAppStorageDirs) {
        ZygoteHooks.preFork();

        
        Log.i("jklee", "nativeForkAndSpecialize:" + niceName);
        int pid = nativeForkAndSpecialize(
                uid, gid, gids, runtimeFlags, rlimits, mountExternal, seInfo, niceName, fdsToClose,
                fdsToIgnore, startChildZygote, instructionSet, appDataDir, isTopApp,
@@ -358,6 +360,7 @@ public final class Zygote {
                bindMountAppStorageDirs);
        if (pid == 0) {
            // Note that this event ends at the end of handleChildProc,
            Log.i("jklee", "pid = 0, niceName=" + niceName);
            Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "PostFork");

            // If no GIDs were specified, don't make any permissions changes based on groups.
@@ -653,6 +656,7 @@ public final class Zygote {
            throw new IllegalStateException("Unable to create USAP pipe.", errnoEx);
        }

        Log.i("jklee", "nativeForkApp");
        int pid = nativeForkApp(readFD.getInt$(), writeFD.getInt$(),
                                sessionSocketRawFDs, /*argsKnown=*/ false, isPriorityFork);
        if (pid == 0) {
+7 −0
Original line number Diff line number Diff line
@@ -267,6 +267,9 @@ class ZygoteConnection {
                            // in child
                            zygoteServer.setForkChild();

                            Log.i("jklee", "child process");
                            Log.i("jklee", "child process name:" + parsedArgs.mNiceName);

                            zygoteServer.closeServerSocket();
                            IoUtils.closeQuietly(serverPipeFd);
                            serverPipeFd = null;
@@ -276,6 +279,8 @@ class ZygoteConnection {
                        } else {
                            // In the parent. A pid < 0 indicates a failure and will be handled in
                            // handleParentProc.
                            Log.i("jklee", "parent process");
                            Log.i("jklee", "parent process name:" + parsedArgs.mNiceName);
                            IoUtils.closeQuietly(childPipeFd);
                            childPipeFd = null;
                            handleParentProc(pid, serverPipeFd);
@@ -526,6 +531,8 @@ class ZygoteConnection {

        Zygote.setAppProcessName(parsedArgs, TAG);

        Log.i("jklee", "nice_name:" + parsedArgs.mNiceName + " package_name:" + parsedArgs.mPackageName);

        // End of the postFork event.
        Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
        if (parsedArgs.mInvokeWith != null) {
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ public class ZygoteInit {

    private static final String TAG = "Zygote";

    private static final boolean LOGGING_DEBUG = Log.isLoggable(TAG, Log.DEBUG);
    private static final boolean LOGGING_DEBUG = true;

    private static final String PROPERTY_DISABLE_GRAPHICS_DRIVER_PRELOADING =
            "ro.zygote.disable_gl_preload";