安卓SystemServer进程详解

目录

  • 一、概述
  • 二、源码分析
    • 2.1 SystemServer fork流程分析
      • 2.1.1 [ZygoteInit.java] main()
      • 2.1.2 [ZygoteInit.java] forkSystemServer()
      • 2.1.3 [Zygote.java] forkSystemServer()
      • 2.1.4 [com_android_internal_os_Zygote.cpp]
      • 2.1.5 [com_android_internal_os_Zygote.cpp] ForkCommon
      • 2.1.6 [Zygcom_android_internal_os_Zygoteote.cpp] SpecializeCommon
      • 2.1.7 [ZygoteInit.java] handleSystemServerProcess
      • 2.1.8 [ZygoteInit.java] zygoteInit
      • 2.1.9 [RuntimeInit.java] commonInit
      • 2.1.10 [ZygoteInit.java] nativeZygoteInit
      • 2.1.11 [RuntimeInit.java] applicationInit
      • 2.1.12 [RuntimeInit.java] findStaticMain
      • 2.1.13 [RuntimeInit.java] MethodAndArgsCaller
    • 2.2 SystemServer 启动后的流程
      • 2.2.1 [SystemServer.java] main
      • 2.2.2 [SystemServer.java] run
      • 2.2.3 [SystemServer.java] performPendingShutdown
      • 2.2.4 [SystemServer.java] createSystemContext
      • 2.2.5 [SystemServer.java] startBootstrapServices
      • 2.2.6 [SystemServer.java] startCoreServices
      • 2.2.7 [SystemServer.java] startOtherServices
  • 三、服务启动分析
    • 3.1 PHASE 0
    • 3.2 PHASE 100 (阶段100):
    • 3.3 PHASE 480 (阶段480):
    • 3.4 PHASE 500 (阶段500):
    • 3.5 PHASE 520 (阶段520):
    • 3.6 PHASE 550 (阶段550):
    • 3.7 PHASE 600 (阶段600):
    • 3.8 PHASE 1000 (阶段1000):
  • 四、服务分类
  • 五、总结
  • 六、相关日志


一、概述

Zygote是所有应用的鼻祖。SystemServer和其他所有Dalivik虚拟机进程都是由Zygote fork而来。Zygote fork的第一个进程就是SystemServer,其在手机中的进程名为 system_server

trinket:/ # ps -A |grep system_server
system        1504   591 7842576 231380 SyS_epoll_wait      0 S system_server

system_server 进程承载着整个framework的核心服务,例如创建 ActivityManagerService、PowerManagerService、DisplayManagerService、PackageManagerService、WindowManagerService、LauncherAppsService等80多个核心系统服务。这些服务以不同的线程方式存在于system_server这个进程中。

接下来,透过Android系统源码一起来分析一下SystemServer的整个启动过程。

核心源码

/frameworks/base/core/java/com/android/internal/os/ZygoteInit.java
/frameworks/base/core/java/com/android/internal/os/RuntimeInit.java
/frameworks/base/core/java/com/android/internal/os/Zygote.java
/frameworks/base/services/java/com/android/server/SystemServer.java
/frameworks/base/services/core/java/com/android/serverSystemServiceManager.java
/frameworks/base/services/core/java/com/android/ServiceThread.java
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
/frameworks/base/core/java/android/app/ActivityThread.java
/frameworks/base/core/java/android/app/LoadedApk.java
/frameworks/base/core/java/android/app/ContextImpl.java
/frameworks/base/core/jni/AndroidRuntime.cpp
/frameworks/base/core/jni/com_android_internal_os_ZygoteInit.cpp
/frameworks/base/cmds/app_process/app_main.cpp


二、源码分析

2.1 SystemServer fork流程分析

2.1.1 [ZygoteInit.java] main()

说明:Zygote进程,通过fork()函数,最终孵化出system_server的进程,通过反射的方法启动SystemServer.java的main()方法

源码:

public static void main(String argv[]) {ZygoteServer zygoteServer = null;...try {zygoteServer = new ZygoteServer(isPrimaryZygote);if (startSystemServer) {//fork system_serverRunnable r = forkSystemServer(abiList, zygoteSocketName, zygoteServer);// {@code r == null} in the parent (zygote) process, and {@code r != null} in the// child (system_server) process.if (r != null) {r.run(); //启动SystemServer.java的main()return; //Android 8.0之前是通过抛异常的方式来启动,这里是直接return出去,用来清空栈,提高栈帧利用率}}caller = zygoteServer.runSelectLoop(abiList);} catch (Throwable ex) {Log.e(TAG, "System zygote died with exception", ex);throw ex;} finally {if (zygoteServer != null) {zygoteServer.closeServerSocket();}}if (caller != null) {caller.run();}...
}

2.1.2 [ZygoteInit.java] forkSystemServer()

说明:准备参数,用来进行system_server的fork,从参数可知,pid=1000,gid=1000,进程名nick-name=system_server
当有两个Zygote进程时,需要等待第二个Zygote创建完成。由于fork时会拷贝socket,因此,在fork出system_server进程后,
需要关闭Zygote原有的socket

源码:

private static Runnable forkSystemServer(String abiList, String socketName,ZygoteServer zygoteServer) {......//参数准备,uid和gid都是为1000String args[] = {"--setuid=1000","--setgid=1000","--setgroups=1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1018,1021,1023,"+ "1024,1032,1065,3001,3002,3003,3006,3007,3009,3010","--capabilities=" + capabilities + "," + capabilities,"--nice-name=system_server","--runtime-args","--target-sdk-version=" + VMRuntime.SDK_VERSION_CUR_DEVELOPMENT,"com.android.server.SystemServer",};ZygoteArguments parsedArgs = null;int pid;try {//将上面准备的参数,按照ZygoteArguments的风格进行封装parsedArgs = new ZygoteArguments(args);Zygote.applyDebuggerSystemProperty(parsedArgs);Zygote.applyInvokeWithSystemProperty(parsedArgs);//通过fork"分裂"出子进程system_server/* Request to fork the system server process */pid = Zygote.forkSystemServer(parsedArgs.mUid, parsedArgs.mGid,parsedArgs.mGids,parsedArgs.mRuntimeFlags,null,parsedArgs.mPermittedCapabilities,parsedArgs.mEffectiveCapabilities);} catch (IllegalArgumentException ex) {throw new RuntimeException(ex);}//进入子进程system_serverif (pid == 0) {// 处理32_64和64_32的情况if (hasSecondZygote(abiList)) {waitForSecondaryZygote(socketName);  //需要等待第二个Zygote创建完成}// fork时会copy socket,Zygote原有的socket需要关闭zygoteServer.closeServerSocket();// system server进程处理自己的工作return handleSystemServerProcess(parsedArgs);}return null;
}

2.1.3 [Zygote.java] forkSystemServer()

说明:这里的nativeForkSystemServer()最终是通过JNI,调用Nativate C空间的com_android_internal_os_Zygote_nativeForkSystemServer()来fork system_server

源码:

public static int forkSystemServer(int uid, int gid, int[] gids, int runtimeFlags,int[][] rlimits, long permittedCapabilities, long effectiveCapabilities) {ZygoteHooks.preFork();// Resets nice priority for zygote process.resetNicePriority();//调用native的方法来fork system_server//最终调用native的方法:com_android_internal_os_Zygote_nativeForkSystemServerint pid = nativeForkSystemServer(uid, gid, gids, runtimeFlags, rlimits,permittedCapabilities, effectiveCapabilities);// Enable tracing as soon as we enter the system_server.if (pid == 0) {Trace.setTracingEnabled(true, runtimeFlags);}ZygoteHooks.postForkCommon();return pid;
}

[com_android_internal_os_Zygote.cpp]
说明:JNI注册的映射关系

static const JNINativeMethod gMethods[] = {{ "nativeForkSystemServer", "(II[II[[IJJ)I",(void *) com_android_internal_os_Zygote_nativeForkSystemServer },
}

2.1.4 [com_android_internal_os_Zygote.cpp]

com_android_internal_os_Zygote_nativeForkSystemServer()

说明:通过 SpecializeCommon进行fork,pid返回0时,表示当前为system_server子进程
当pid >0 时,是进入父进程,即Zygote进程,通过waitpid 的WNOHANG 非阻塞方式来监控
system_server进程挂掉,如果挂掉后重启Zygote进程。
现在使用的Android系统大部分情况下是64位的,会存在两个Zygote,当system_server挂掉后,只启动Zygote64这个父进程

|trinket:/ # ps -A |grep zygote
root           591     1 5421464 170432 poll_schedule_timeout 0 S zygote64
root           592     1 1734388 153892 poll_schedule_timeout 0 S zygote
webview_zygote 2213  592 1739824  57280 poll_schedule_timeout 0 S webview_zygote

源码:

static jint com_android_internal_os_Zygote_nativeForkSystemServer(JNIEnv* env, jclass, uid_t uid, gid_t gid, jintArray gids,jint runtime_flags, jobjectArray rlimits, jlong permitted_capabilities,jlong effective_capabilities) {pid_t pid = ForkCommon(env, true,fds_to_close,fds_to_ignore);if (pid == 0) {//进入子进程SpecializeCommon(env, uid, gid, gids, runtime_flags, rlimits,permitted_capabilities, effective_capabilities,MOUNT_EXTERNAL_DEFAULT, nullptr, nullptr, true,false, nullptr, nullptr);} else if (pid > 0) {//进入父进程,即zygote进程ALOGI("System server process %d has been created", pid);int status;//用waitpid函数获取状态发生变化的子进程pid//waitpid的标记为WNOHANG,即非阻塞,返回为正值就说明有进程挂掉了if (waitpid(pid, &status, WNOHANG) == pid) {//当system_server进程死亡后,重启zygote进程ALOGE("System server process %d has died. Restarting Zygote!", pid);RuntimeAbort(env, __LINE__, "System server process has died. Restarting Zygote!");}...}return pid;
}

2.1.5 [com_android_internal_os_Zygote.cpp] ForkCommon

说明:从Zygote孵化出一个进程的使用程序

源码:

static pid_t ForkCommon(JNIEnv* env, bool is_system_server,const std::vector<int>& fds_to_close,const std::vector<int>& fds_to_ignore) {//设置子进程的signalSetSignalHandlers();//在fork的过程中,临时锁住SIGCHLDBlockSignal(SIGCHLD, fail_fn);//fork子进程,采用copy on write方式,这里执行一次,会返回两次//pid=0 表示Zygote  fork SystemServer这个子进程成功//pid > 0 表示SystemServer 的真正的PIDpid_t pid = fork();if (pid == 0) {//进入子进程// The child process.PreApplicationInit();// 关闭并清除文件描述符// Clean up any descriptors which must be closed immediatelyDetachDescriptors(env, fds_to_close, fail_fn);...} else {ALOGD("Forked child process %d", pid);}//fork结束,解锁UnblockSignal(SIGCHLD, fail_fn);return pid;
}

2.1.6 [Zygcom_android_internal_os_Zygoteote.cpp] SpecializeCommon

说明:system_server进程的一些调度配置

源码:

static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids,jint runtime_flags, jobjectArray rlimits,jlong permitted_capabilities, jlong effective_capabilities,jint mount_external, jstring managed_se_info,jstring managed_nice_name, bool is_system_server,bool is_child_zygote, jstring managed_instruction_set,jstring managed_app_data_dir) {...bool use_native_bridge = !is_system_server &&instruction_set.has_value() &&android::NativeBridgeAvailable() &&android::NeedsNativeBridge(instruction_set.value().c_str());if (!is_system_server && getuid() == 0) {//对于非system_server子进程,则创建进程组const int rc = createProcessGroup(uid, getpid());if (rc == -EROFS) {ALOGW("createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT?");} else if (rc != 0) {ALOGE("createProcessGroup(%d, %d) failed: %s", uid, /* pid= */ 0, strerror(-rc));}}SetGids(env, gids, fail_fn);  //设置设置groupSetRLimits(env, rlimits, fail_fn); //设置资源limitif (use_native_bridge) {// Due to the logic behind use_native_bridge we know that both app_data_dir// and instruction_set contain values.android::PreInitializeNativeBridge(app_data_dir.value().c_str(),instruction_set.value().c_str());}if (setresgid(gid, gid, gid) == -1) {fail_fn(CREATE_ERROR("setresgid(%d) failed: %s", gid, strerror(errno)));}...//selinux上下文if (selinux_android_setcontext(uid, is_system_server, se_info_ptr, nice_name_ptr) == -1) {fail_fn(CREATE_ERROR("selinux_android_setcontext(%d, %d, \"%s\", \"%s\") failed",uid, is_system_server, se_info_ptr, nice_name_ptr));}//设置线程名为system_server,方便调试if (nice_name.has_value()) {SetThreadName(nice_name.value());} else if (is_system_server) {SetThreadName("system_server");}// Unset the SIGCHLD handler, but keep ignoring SIGHUP (rationale in SetSignalHandlers).//设置子进程的signal信号处理函数为默认函数UnsetChldSignalHandler();if (is_system_server) {//对应  Zygote.java 的callPostForkSystemServerHooks()env->CallStaticVoidMethod(gZygoteClass, gCallPostForkSystemServerHooks);if (env->ExceptionCheck()) {fail_fn("Error calling post fork system server hooks.");}//对应ZygoteInit.java 的 createSystemServerClassLoader()//预取系统服务器的类加载器。这样做是为了尽早地绑定适当的系统服务器selinux域。env->CallStaticVoidMethod(gZygoteInitClass, gCreateSystemServerClassLoader);if (env->ExceptionCheck()) {// Be robust here. The Java code will attempt to create the classloader// at a later point (but may not have rights to use AoT artifacts).env->ExceptionClear();}...}//等价于调用zygote.java 的callPostForkChildHooks()env->CallStaticVoidMethod(gZygoteClass, gCallPostForkChildHooks, runtime_flags,is_system_server, is_child_zygote, managed_instruction_set);if (env->ExceptionCheck()) {fail_fn("Error calling post fork hooks.");}
}

2.1.7 [ZygoteInit.java] handleSystemServerProcess

说明:创建类加载器,并赋予当前线程,其中环境变量SYSTEMSERVERCLASSPATH,主要是service.jar、ethernet-service.jar和wifi-service.jar这三个jar包

export SYSTEMSERVERCLASSPATH=/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar
源码:

private static Runnable handleSystemServerProcess(ZygoteArguments parsedArgs) {if (parsedArgs.mNiceName != null) {Process.setArgV0(parsedArgs.mNiceName); //设置当前进程名为"system_server"}final String systemServerClasspath = Os.getenv("SYSTEMSERVERCLASSPATH");if (systemServerClasspath != null) {//执行dex优化操作if (performSystemServerDexOpt(systemServerClasspath)) {sCachedSystemServerClassLoader = null;}...}if (parsedArgs.mInvokeWith != null) {String[] args = parsedArgs.mRemainingArgs;//如果我们有一个非空系统服务器类路径,我们将不得不复制现有的参数并将类路径附加到它。//当我们执行一个新进程时,ART将正确地处理类路径。if (systemServerClasspath != null) {String[] amendedArgs = new String[args.length + 2];amendedArgs[0] = "-cp";amendedArgs[1] = systemServerClasspath;System.arraycopy(args, 0, amendedArgs, 2, args.length);args = amendedArgs;}//启动应用进程WrapperInit.execApplication(parsedArgs.mInvokeWith,parsedArgs.mNiceName, parsedArgs.mTargetSdkVersion,VMRuntime.getCurrentInstructionSet(), null, args);throw new IllegalStateException("Unexpected return from WrapperInit.execApplication");} else {// 创建类加载器,并赋予当前线程createSystemServerClassLoader();ClassLoader cl = sCachedSystemServerClassLoader;if (cl != null) {Thread.currentThread().setContextClassLoader(cl);}//system_server进入此分支return ZygoteInit.zygoteInit(parsedArgs.mTargetSdkVersion,parsedArgs.mRemainingArgs, cl);}
}

2.1.8 [ZygoteInit.java] zygoteInit

说明:基础配置,并进行应用初始化,返回对象

源码:

public static final Runnable zygoteInit(int targetSdkVersion, String[] argv,ClassLoader classLoader) {Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "ZygoteInit");RuntimeInit.redirectLogStreams();  //重定向log输出RuntimeInit.commonInit(); //通用的一些初始化ZygoteInit.nativeZygoteInit(); // zygote初始化// 应用初始化return RuntimeInit.applicationInit(targetSdkVersion, argv, classLoader);
}

2.1.9 [RuntimeInit.java] commonInit

说明:配置log、时区、http userAgent等基础信息

源码:

protected static final void commonInit() {LoggingHandler loggingHandler = new LoggingHandler();// 设置默认的未捕捉异常处理方法RuntimeHooks.setUncaughtExceptionPreHandler(loggingHandler);Thread.setDefaultUncaughtExceptionHandler(new KillApplicationHandler(loggingHandler));// 设置时区,通过属性读出中国时区为"Asia/Shanghai"RuntimeHooks.setTimeZoneIdSupplier(() -> SystemProperties.get("persist.sys.timezone"));//重置log配置LogManager.getLogManager().reset();new AndroidConfig();//设置默认的HTTP User-agent格式,用于 HttpURLConnectionString userAgent = getDefaultUserAgent();System.setProperty("http.agent", userAgent);/** Wire socket tagging to traffic stats.*///设置socket的tag,用于网络流量统计NetworkManagementSocketTagger.install();...
}

2.1.10 [ZygoteInit.java] nativeZygoteInit

说明:nativeZygoteInit 通过反射,进入com_android_internal_os_ZygoteInit_nativeZygoteInit

源码:[AndroidRuntime.cpp]

int register_com_android_internal_os_ZygoteInit_nativeZygoteInit(JNIEnv* env)
{const JNINativeMethod methods[] = {{ "nativeZygoteInit", "()V",(void*) com_android_internal_os_ZygoteInit_nativeZygoteInit },};return jniRegisterNativeMethods(env, "com/android/internal/os/ZygoteInit",methods, NELEM(methods));
}gCurRuntime = this;
static void com_android_internal_os_ZygoteInit_nativeZygoteInit(JNIEnv* env, jobject clazz)
{//此处的gCurRuntime为AppRuntime,是在AndroidRuntime.cpp中定义的gCurRuntime->onZygoteInit();
}[app_main.cpp]
virtual void onZygoteInit()
{sp<ProcessState> proc = ProcessState::self();ALOGV("App process: starting thread pool.\n");proc->startThreadPool(); //启动新binder线程
}

2.1.11 [RuntimeInit.java] applicationInit

说明:通过参数解析,得到args.startClass = com.android.server.SystemServer

源码:

protected static Runnable applicationInit(int targetSdkVersion, String[] argv,ClassLoader classLoader) {//true代表应用程序退出时不调用AppRuntime.onExit(),否则会在退出前调用nativeSetExitWithoutCleanup(true);// We want to be fairly aggressive about heap utilization, to avoid// holding on to a lot of memory that isn't needed.//设置虚拟机的内存利用率参数值为0.75VMRuntime.getRuntime().setTargetHeapUtilization(0.75f);VMRuntime.getRuntime().setTargetSdkVersion(targetSdkVersion);final Arguments args = new Arguments(argv);  //解析参数...// Remaining arguments are passed to the start class's static main//调用startClass的static方法 main() return findStaticMain(args.startClass, args.startArgs, classLoader);
}

2.1.12 [RuntimeInit.java] findStaticMain

说明:拿到SystemServer的main()方法,并返回 MethodAndArgsCaller()对象

源码:

protected static Runnable findStaticMain(String className, String[] argv,ClassLoader classLoader) {Class<?> cl;try {//拿到com.android.server.SystemServer 的类对象cl = Class.forName(className, true, classLoader);} catch (ClassNotFoundException ex) {throw new RuntimeException("Missing class when invoking static main " + className,ex);}Method m;try {//得到SystemServer的main()方法,m = cl.getMethod("main", new Class[] { String[].class });} catch (NoSuchMethodException ex) {throw new RuntimeException("Missing static main on " + className, ex);} catch (SecurityException ex) {throw new RuntimeException("Problem getting static main on " + className, ex);}int modifiers = m.getModifiers();if (! (Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers))) {throw new RuntimeException("Main method is not public and static on " + className);}//把MethodAndArgsCaller的对象返回给ZygoteInit.main()。这样做好处是能清空栈帧,提高栈帧利用率//清除了设置进程所需的所有堆栈帧return new MethodAndArgsCaller(m, argv);
}

2.1.13 [RuntimeInit.java] MethodAndArgsCaller

说明:最终在ZygoteInit.java的main(),调用这里的run()来启动SystemServer.java的main(),真正进入SystemServer进程

源码:

static class MethodAndArgsCaller implements Runnable {/** method to call */private final Method mMethod;/** argument array */private final String[] mArgs;public MethodAndArgsCaller(Method method, String[] args) {mMethod = method;mArgs = args;}public void run() {try {//根据传递过来的参数,可知此处通过反射机制调用的是SystemServer.main()方法mMethod.invoke(null, new Object[] { mArgs });} catch (IllegalAccessException ex) {throw new RuntimeException(ex);} catch (InvocationTargetException ex) {Throwable cause = ex.getCause();if (cause instanceof RuntimeException) {throw (RuntimeException) cause;} else if (cause instanceof Error) {throw (Error) cause;}throw new RuntimeException(ex);}}
}

2.2 SystemServer 启动后的流程

2.2.1 [SystemServer.java] main

说明:main函数由Zygote进程 fork后运行,作用是new 一个SystemServer对象,再调用该对象的run()方法

源码:

public static void main(String[] args) {//new 一个SystemServer对象,再调用该对象的run()方法new SystemServer().run();
}

2.2.2 [SystemServer.java] run

说明:先初始化一些系统变量,加载类库,创建Context对象,创建SystemServiceManager对象等候再启动服务,启动引导服务、核心服务和其他服务
源码:

private void run() {try {traceBeginAndSlog("InitBeforeStartServices");// Record the process start information in sys props.//从属性中读取system_server进程的一些信息SystemProperties.set(SYSPROP_START_COUNT, String.valueOf(mStartCount));SystemProperties.set(SYSPROP_START_ELAPSED, String.valueOf(mRuntimeStartElapsedTime));SystemProperties.set(SYSPROP_START_UPTIME, String.valueOf(mRuntimeStartUptime));EventLog.writeEvent(EventLogTags.SYSTEM_SERVER_START,mStartCount, mRuntimeStartUptime, mRuntimeStartElapsedTime);//如果一个设备的时钟是在1970年之前(0年之前),//那么很多api 都会因为处理负数而崩溃,尤其是java.io.File#setLastModified//我把把时间设置为1970if (System.currentTimeMillis() < EARLIEST_SUPPORTED_TIME) {Slog.w(TAG, "System clock is before 1970; setting to 1970.");SystemClock.setCurrentTimeMillis(EARLIEST_SUPPORTED_TIME);}//如果时区不存在,设置时区为GMTString timezoneProperty = SystemProperties.get("persist.sys.timezone");if (timezoneProperty == null || timezoneProperty.isEmpty()) {Slog.w(TAG, "Timezone not set; setting to GMT.");SystemProperties.set("persist.sys.timezone", "GMT");}//变更虚拟机的库文件,对于Android 10.0默认采用的是libart.soSystemProperties.set("persist.sys.dalvik.vm.lib.2", VMRuntime.getRuntime().vmLibrary());// Mmmmmm... more memory!//清除vm内存增长上限,由于启动过程需要较多的虚拟机内存空间VMRuntime.getRuntime().clearGrowthLimit();...//系统服务器必须一直运行,所以它需要尽可能高效地使用内存//设置内存的可能有效使用率为0.8VMRuntime.getRuntime().setTargetHeapUtilization(0.8f);//一些设备依赖于运行时指纹生成,所以在进一步启动之前,请确保我们已经定义了它。Build.ensureFingerprintProperty();//访问环境变量前,需要明确地指定用户//在system_server中,任何传入的包都应该被解除,以避免抛出BadParcelableException。BaseBundle.setShouldDefuse(true);//在system_server中,当打包异常时,信息需要包含堆栈跟踪Parcel.setStackTraceParceling(true);//确保当前系统进程的binder调用,总是运行在前台优先级(foreground priority)BinderInternal.disableBackgroundScheduling(true);//设置system_server中binder线程的最大数量,最大值为31BinderInternal.setMaxThreads(sMaxBinderThreads);//准备主线程lopper,即在当前线程运行android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_FOREGROUND);android.os.Process.setCanSelfBackground(false);Looper.prepareMainLooper();Looper.getMainLooper().setSlowLogThresholdMs(SLOW_DISPATCH_THRESHOLD_MS, SLOW_DELIVERY_THRESHOLD_MS);//加载android_servers.so库,初始化native serviceSystem.loadLibrary("android_servers");// Debug builds - allow heap profiling.//如果是Debug版本,允许堆内存分析if (Build.IS_DEBUGGABLE) {initZygoteChildHeapProfiling();}//检测上次关机过程是否失败,这个调用可能不会返回performPendingShutdown();//初始化系统上下文createSystemContext();//创建系统服务管理--SystemServiceManagermSystemServiceManager = new SystemServiceManager(mSystemContext);mSystemServiceManager.setStartInfo(mRuntimeRestart,mRuntimeStartElapsedTime, mRuntimeStartUptime);//将mSystemServiceManager添加到本地服务的成员sLocalServiceObjectsLocalServices.addService(SystemServiceManager.class, mSystemServiceManager);// Prepare the thread pool for init tasks that can be parallelized//为可以并行化的init任务准备线程池SystemServerInitThreadPool.get();} finally {traceEnd();  // InitBeforeStartServices}// Start services.//启动服务try {traceBeginAndSlog("StartServices");startBootstrapServices();   // 启动引导服务startCoreServices();        // 启动核心服务startOtherServices();       // 启动其他服务SystemServerInitThreadPool.shutdown(); //停止线程池} catch (Throwable ex) {Slog.e("System", "******************************************");Slog.e("System", "************ Failure starting system services", ex);throw ex;} finally {traceEnd();}//为当前的虚拟机初始化VmPolicyStrictMode.initVmDefaults(null);...// Loop forever.//死循环执行Looper.loop();throw new RuntimeException("Main thread loop unexpectedly exited");
}

2.2.3 [SystemServer.java] performPendingShutdown

说明:检测上次关机过程是否失败,这个调用可能不会返回

源码:

private void performPendingShutdown() {final String shutdownAction = SystemProperties.get(ShutdownThread.SHUTDOWN_ACTION_PROPERTY, "");if (shutdownAction != null && shutdownAction.length() > 0) {boolean reboot = (shutdownAction.charAt(0) == '1');final String reason;if (shutdownAction.length() > 1) {reason = shutdownAction.substring(1, shutdownAction.length());} else {reason = null;}//如果需要重新启动才能应用更新,一定要确保uncrypt在需要时正确执行。//如果'/cache/recovery/block.map'还没有创建,停止重新启动,它肯定会失败,//并有机会捕获一个bugreport时,这仍然是可行的。if (reason != null && reason.startsWith(PowerManager.REBOOT_RECOVERY_UPDATE)) {File packageFile = new File(UNCRYPT_PACKAGE_FILE);if (packageFile.exists()) {String filename = null;try {filename = FileUtils.readTextFile(packageFile, 0, null);} catch (IOException e) {Slog.e(TAG, "Error reading uncrypt package file", e);}if (filename != null && filename.startsWith("/data")) {if (!new File(BLOCK_MAP_FILE).exists()) {Slog.e(TAG, "Can't find block map file, uncrypt failed or " +"unexpected runtime restart?");return;}}}}Runnable runnable = new Runnable() {@Overridepublic void run() {synchronized (this) {//当属性sys.shutdown.requested的值为1时,会重启//当属性的值不为空,且不为1时,会关机ShutdownThread.rebootOrShutdown(null, reboot, reason);}}};// ShutdownThread must run on a looper capable of displaying the UI.//ShutdownThread必须在一个能够显示UI的looper上运行//即UI线程启动ShutdownThread的rebootOrShutdownMessage msg = Message.obtain(UiThread.getHandler(), runnable);msg.setAsynchronous(true);UiThread.getHandler().sendMessage(msg);}
}

2.2.4 [SystemServer.java] createSystemContext

说明:初始化系统上下文, 该过程会创建对象有ActivityThread,Instrumentation, ContextImpl,LoadedApk,Application

源码:

private void createSystemContext() {//创建system_server进程的上下文信息ActivityThread activityThread = ActivityThread.systemMain();mSystemContext = activityThread.getSystemContext();//设置主题mSystemContext.setTheme(DEFAULT_SYSTEM_THEME);//获取systemui上下文信息,并设置主题final Context systemUiContext = activityThread.getSystemUiContext();systemUiContext.setTheme(DEFAULT_SYSTEM_THEME);
}

2.2.5 [SystemServer.java] startBootstrapServices

说明:用于启动系统Boot级服务,有ActivityManagerService, PowerManagerService, LightsService, DisplayManagerService, PackageManagerService, UserManagerService, sensor服务.

源码:

private void startBootstrapServices() {traceBeginAndSlog("StartWatchdog");//启动watchdog//尽早启动watchdog,如果在早起启动时发生死锁,我们可以让system_server//崩溃,从而进行详细分析final Watchdog watchdog = Watchdog.getInstance();watchdog.start();traceEnd();...//添加PLATFORM_COMPAT_SERVICE,Platform compat服务被ActivityManagerService、PackageManagerService//以及将来可能出现的其他服务使用。traceBeginAndSlog("PlatformCompat");ServiceManager.addService(Context.PLATFORM_COMPAT_SERVICE,new PlatformCompat(mSystemContext));traceEnd();//阻塞等待installd完成启动,以便有机会创建具有适当权限的关键目录,如/data/user。//我们需要在初始化其他服务之前完成此任务。traceBeginAndSlog("StartInstaller");Installer installer = mSystemServiceManager.startService(Installer.class);traceEnd();
...//启动服务ActivityManagerService,并为其设置mSystemServiceManager和installertraceBeginAndSlog("StartActivityManager");ActivityTaskManagerService atm = mSystemServiceManager.startService(ActivityTaskManagerService.Lifecycle.class).getService();mActivityManagerService = ActivityManagerService.Lifecycle.startService(mSystemServiceManager, atm);mActivityManagerService.setSystemServiceManager(mSystemServiceManager);mActivityManagerService.setInstaller(installer);mWindowManagerGlobalLock = atm.getGlobalLock();traceEnd();//启动服务PowerManagerService//Power manager需要尽早启动,因为其他服务需要它。//本机守护进程可能正在监视它的注册,//因此它必须准备好立即处理传入的绑定器调用(包括能够验证这些调用的权限)traceBeginAndSlog("StartPowerManager");mPowerManagerService = mSystemServiceManager.startService(
PowerManagerService.class);traceEnd();...//初始化power managementtraceBeginAndSlog("InitPowerManagement");mActivityManagerService.initPowerManagement();traceEnd();//启动recovery system,以防需要重新启动traceBeginAndSlog("StartRecoverySystemService");mSystemServiceManager.startService(RecoverySystemService.class);traceEnd();
...//启动服务LightsService//管理led和显示背光,所以我们需要它来打开显示traceBeginAndSlog("StartLightsService");mSystemServiceManager.startService(LightsService.class);traceEnd();
...//启动服务DisplayManagerService//显示管理器需要在包管理器之前提供显示指标traceBeginAndSlog("StartDisplayManager");mDisplayManagerService = mSystemServiceManager.startService(DisplayManagerService.class);traceEnd();// Boot Phases: Phase100: 在初始化package manager之前,需要默认的显示.traceBeginAndSlog("WaitForDisplay");mSystemServiceManager.startBootPhase(SystemService.PHASE_WAIT_FOR_DEFAULT_DISPLAY);traceEnd();//当设备正在加密时,仅运行核心String cryptState = VoldProperties.decrypt().orElse("");if (ENCRYPTING_STATE.equals(cryptState)) {Slog.w(TAG, "Detected encryption in progress - only parsing core apps");mOnlyCore = true;} else if (ENCRYPTED_STATE.equals(cryptState)) {Slog.w(TAG, "Device encrypted - only parsing core apps");mOnlyCore = true;}
...//启动服务PackageManagerServicetraceBeginAndSlog("StartPackageManagerService");try {Watchdog.getInstance().pauseWatchingCurrentThread("packagemanagermain");mPackageManagerService = PackageManagerService.main(mSystemContext, installer,mFactoryTestMode != FactoryTest.FACTORY_TEST_OFF, mOnlyCore);} finally {Watchdog.getInstance().resumeWatchingCurrentThread("packagemanagermain");}
...//启动服务UserManagerService,新建目录/data/user/traceBeginAndSlog("StartUserManagerService");mSystemServiceManager.startService(UserManagerService.LifeCycle.class);traceEnd();// Set up the Application instance for the system process and get  started.//为系统进程设置应用程序实例并开始。//设置AMStraceBeginAndSlog("SetSystemProcess");mActivityManagerService.setSystemProcess();traceEnd();//使用一个ActivityManager实例完成watchdog设置并监听重启,
//只有在ActivityManagerService作为一个系统进程正确启动后才能这样做traceBeginAndSlog("InitWatchdog");watchdog.init(mSystemContext, mActivityManagerService);traceEnd();//传感器服务需要访问包管理器服务、app ops服务和权限服务,//因此我们在它们之后启动它。//在单独的线程中启动传感器服务。在使用它之前应该检查完成情况。mSensorServiceStart = SystemServerInitThreadPool.get().submit(() -> {TimingsTraceLog traceLog = new TimingsTraceLog(SYSTEM_SERVER_TIMING_ASYNC_TAG, Trace.
TRACE_TAG_SYSTEM_SERVER);traceLog.traceBegin(START_SENSOR_SERVICE);startSensorService(); //启动传感器服务traceLog.traceEnd();}, START_SENSOR_SERVICE);
}

2.2.6 [SystemServer.java] startCoreServices

说明:启动核心服务BatteryService,UsageStatsService,WebViewUpdateService、BugreportManagerService、GpuService等

源码:

private void startCoreServices() {//启动服务BatteryService,用于统计电池电量,需要LightService.mSystemServiceManager.startService(BatteryService.class);//启动服务UsageStatsService,用于统计应用使用情况mSystemServiceManager.startService(UsageStatsService.class);mActivityManagerService.setUsageStatsManager(LocalServices.getService(UsageStatsManagerInternal.class));//启动服务WebViewUpdateService//跟踪可更新的WebView是否处于就绪状态,并监视更新安装if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_WEBVIEW)) {mWebViewUpdateService = mSystemServiceManager.startService(WebViewUpdateService.class);}//启动CachedDeviceStateService,跟踪和缓存设备状态mSystemServiceManager.startService(CachedDeviceStateService.class);//启动BinderCallsStatsService, 跟踪在绑定器调用中花费的cpu时间traceBeginAndSlog("StartBinderCallsStatsService");mSystemServiceManager.startService(BinderCallsStatsService.LifeCycle.class);traceEnd();//启动LooperStatsService,跟踪处理程序中处理消息所花费的时间。traceBeginAndSlog("StartLooperStatsService");mSystemServiceManager.startService(LooperStatsService.Lifecycle.class);traceEnd();//启动RollbackManagerService,管理apk回滚mSystemServiceManager.startService(RollbackManagerService.class);//启动BugreportManagerService,捕获bugreports的服务mSystemServiceManager.startService(BugreportManagerService.class);//启动GpuService,为GPU和GPU驱动程序提供服务。mSystemServiceManager.startService(GpuService.class);
}

2.2.7 [SystemServer.java] startOtherServices

说明:启动其他的服务,开始处理一大堆尚未重构和整理的东西,这里的服务太多,大体启动过程类似,就不详细说明

源码:

private void startOtherServices() {...//启动TelecomLoaderService,通话相关核心服务mSystemServiceManager.startService(TelecomLoaderService.class);//启动TelephonyRegistrytelephonyRegistry = new TelephonyRegistry(context);ServiceManager.addService("telephony.registry", telephonyRegistry);...//启动AlarmManagerService,时钟管理mSystemServiceManager.startService(new AlarmManagerService(context));...//启动InputManagerServiceinputManager = new InputManagerService(context);ServiceManager.addService(Context.INPUT_SERVICE, inputManager,/* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL);...inputManager.setWindowManagerCallbacks(wm.getInputManagerCallback());inputManager.start();...//Phase480:在接收到此启动阶段后,服务可以获得锁设置数据mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);//Phase500:在接收到这个启动阶段之后,服务可以安全地调用核心系统服务,//如PowerManager或PackageManager。mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);mActivityManagerService.systemReady(() -> {//Phase550:在接收到此引导阶段后,服务可以广播意图。mSystemServiceManager.startBootPhase(SystemService.PHASE_ACTIVITY_MANAGER_READY);//Phase600:在接收到这个启动阶段后,服务可以启动/绑定到第三方应用程序。//此时,应用程序将能够对服务进行绑定调用。mSystemServiceManager.startBootPhase(SystemService.PHASE_THIRD_PARTY_APPS_CAN_START);}
}

三、服务启动分析

服务启动流程如下,从阶段0到阶段1000,一共8个阶段。

其中PHASE_BOOT_COMPLETED=1000,该阶段是发生在Boot完成和home应用启动完毕。系统服务更倾向于监听该阶段,而不是注册广播ACTION_BOOT_COMPLETED,从而降低系统延迟。

3.1 PHASE 0

说明:startBootstrapServices() 启动引导级服务

主要启动以下10个服务:

Installer
DeviceIdentifiersPolicyService
UriGrantsManagerService
ActivityTaskManagerService
ActivityManagerService
PowerManagerService
ThermalManagerService
RecoverySystemService
LightsService
DisplayManagerService

启动完后,进入PHASE_WAIT_FOR_DEFAULT_DISPLAY=100, 即Phase100阶段

源码:

    //1.启动DeviceIdentifiersPolicyServicemSystemServiceManager.startService(DeviceIdentifiersPolicyService.class);//2.启动UriGrantsManagerServicemSystemServiceManager.startService(UriGrantsManagerService.Lifecycle.class);//3.启动ActivityTaskManagerServiceatm = mSystemServiceManager.startService(ActivityTaskManagerService.Lifecycle.class).getService();//4.启动PowerManagerServicemPowerManagerService = mSystemServiceManager.startService(PowerManagerService.class);//5.启动ThermalManagerServicemSystemServiceManager.startService(ThermalManagerService.class);//6.启动RecoverySystemServicemSystemServiceManager.startService(RecoverySystemService.class);//7.启动LightsServicemSystemServiceManager.startService(LightsService.class);//8.启动DisplayManagerServicemDisplayManagerService = mSystemServiceManager.startService(DisplayManagerService.class);//执行回调函数 onBootPhase,把PHASE_WAIT_FOR_DEFAULT_DISPLAY=100, 传入各个service的 onBootPhasemSystemServiceManager.startBootPhase(SystemService.PHASE_WAIT_FOR_DEFAULT_DISPLAY);...
}

3.2 PHASE 100 (阶段100):

定义:public static final int PHASE_WAIT_FOR_DEFAULT_DISPLAY = 100;
说明: 启动阶段-Boot Phase, 该阶段需要等待Display有默认显示
进入阶段PHASE_WAIT_FOR_DEFAULT_DISPLAY=100回调服务: onBootPhase(100)
流程:startBootPhase(100) -> onBootPhase(100)
从以下源码可以看到这里遍历了一下服务列表,然后回调到各服务的 onBootPhase() 方法中了。每个服务的onBootPhase()处理都不相同,这里不详细分析
源码:

public void startBootPhase(final int phase) {...mCurrentPhase = phase;...final int serviceLen = mServices.size();for (int i = 0; i < serviceLen; i++) {final SystemService service = mServices.get(i);...try {service.onBootPhase(mCurrentPhase); // 轮训前面加过的service,把phase加入服务回调} catch (Exception ex) {...}...}...}

创建以下80多个服务:

BatteryService
UsageStatsService
WebViewUpdateService
CachedDeviceStateService
BinderCallsStatsService
LooperStatsService
RollbackManagerService
BugreportManagerService
GpuService

3.3 PHASE 480 (阶段480):

定义:public static final int PHASE_LOCK_SETTINGS_READY = 480;

说明: 该阶段后, 服务可以获取到锁屏设置的数据了

480到500之间没有任何操作,直接进入500

3.4 PHASE 500 (阶段500):

定义:public static final int PHASE_SYSTEM_SERVICES_READY = 500;

说明:该阶段后,服务可以安全地调用核心系统服务,比如PowerManager或PackageManager。

启动以下两个服务:

  • PermissionPolicyService
  • eviceSpecificServices

3.5 PHASE 520 (阶段520):

定义:public static final int PHASE_DEVICE_SPECIFIC_SERVICES_READY = 520;

说明:在接收到这个引导阶段之后,服务可以安全地调用特定于设备的服务。

告诉AMS可以运行第三方代码,Making services ready

mActivityManagerService.systemReady()

3.6 PHASE 550 (阶段550):

定义:public static final int PHASE_ACTIVITY_MANAGER_READY = 550;

说明:该阶段后,服务可以接收到广播Intents

AMS启动native crash监控,启动SystemUI,其余服务调用systemReady()

  1. AMS启动native crash监控:
mActivityManagerService.startObservingNativeCrashes();
  1. 启动systemUI:
startSystemUi()
  1. 其余服务调用systemReady():

networkManagementF.systemReady()
ipSecServiceF.systemReady();
networkStatsF.systemReady();
connectivityF.systemReady();
networkPolicyF.systemReady(networkPolicyInitReadySignal);

3.7 PHASE 600 (阶段600):

定义:public static final int PHASE_THIRD_PARTY_APPS_CAN_START = 600;

说明:该阶段后,服务可以启动/绑定到第三方应用程序。此时,应用程序将能够对服务进行绑定调用。

各种服务调用systemRunning方法:

locationF.systemRunning();
countryDetectorF.systemRunning();
networkTimeUpdaterF.systemRunning();
inputManagerF.systemRunning();
telephonyRegistryF.systemRunning();
mediaRouterF.systemRunning();
mmsServiceF.systemRunning();
incident.systemRunning();
touchEventDispatchServiceF.systemRunning();

3.8 PHASE 1000 (阶段1000):

定义:public static final int PHASE_BOOT_COMPLETED = 1000;

说明: 该阶段后,服务可以允许用户与设备交互。此阶段在引导完成且主应用程序启动时发生。

系统服务可能更倾向于监听此阶段,而不是为完成的操作注册广播接收器,以减少总体延迟。
在经过一系列流程,再调用AMS.finishBooting()时,则进入阶段Phase1000。
到此,系统服务启动阶段完成就绪,system_server进程启动完成则进入Looper.loop()状态,随时待命,等待消息队列MessageQueue中的消息到来,则马上进入执行状态。

四、服务分类

sdk:Android10
system_server进程启动的服务,从源码角度划分为引导服务、核心服务、其他服务3类。

引导服务 Boot Service (10个):

在这里插入图片描述

核心服务 Core Service(9个):

在这里插入图片描述

其他服务 Other Service(70个+):

在这里插入图片描述

五、总结

在这里插入图片描述

Zygote启动后fork的第一个进程为SystemServer,在手机中的进程别名为"system_server",主要用来启动系统中的服务
.Zygote fork后,进入SystemServer的main()
SystemServer在启动过程中,先初始化一些系统变量,加载类库,创建Context对象,创建SystemServiceManager对象等候再启动服务
启动的服务分为 引导服务(Boot Service)、核心服务(Core Service)和其他服务(Other Service)三大类,共90多个服务
SystemServer在启动服务前,会尝试与Zygote建立Socket通信,通信成功后才去启动服务
启动的服务都单独运行在SystemServer的各自线程中,同属于SystemServer进程。

六、相关日志

一份完整的开机SystemServer日志。

搜索 "SystemServer"1个文件中匹配到420次,总计查找1次)C:\Users\henry.xue\666.txt (匹配420次)行  4027: 01-01 08:00:22.187  1504  1504 I SystemServer: InitBeforeStartServices行  4030: 01-01 08:00:22.194  1504  1504 W SystemServer: System clock is before 1970; setting to 1970.4031: 01-01 08:00:22.195  1504  1504 I SystemServer: Entered the Android system server!4163: 01-01 08:00:22.591  1504  1504 D SystemServerTiming: InitBeforeStartServices took to complete: 403ms行  4164: 01-01 08:00:22.591  1504  1504 I SystemServer: StartServices行  4165: 01-01 08:00:22.592  1504  1504 I SystemServer: StartWatchdog行  4170: 01-01 08:00:22.617  1504  1504 D SystemServerTiming: StartWatchdog took to complete: 25ms行  4171: 01-01 08:00:22.617  1504  1504 I SystemServer: Reading configuration...4172: 01-01 08:00:22.617  1504  1504 I SystemServer: ReadingSystemConfig行  4173: 01-01 08:00:22.619  1504  1504 D SystemServerTiming: ReadingSystemConfig took to complete: 1ms行  4174: 01-01 08:00:22.619  1504  1504 I SystemServer: StartInstaller行  4176: 01-01 08:00:22.619  1504  1642 D SystemServerInitThreadPool: Started executing ReadingSystemConfig行  4178: 01-01 08:00:22.621  1504  1504 D SystemServerTiming: StartInstaller took to complete: 2ms行  4179: 01-01 08:00:22.621  1504  1504 I SystemServer: DeviceIdentifiersPolicyService行  4181: 01-01 08:00:22.622  1504  1504 D SystemServerTiming: DeviceIdentifiersPolicyService took to complete: 1ms行  4182: 01-01 08:00:22.622  1504  1504 I SystemServer: UriGrantsManagerService行  4184: 01-01 08:00:22.624  1504  1504 D SystemServerTiming: UriGrantsManagerService took to complete: 1ms行  4185: 01-01 08:00:22.624  1504  1504 I SystemServer: StartActivityManager行  4229: 01-01 08:00:22.768  1504  1504 D SystemServerTiming: StartActivityManager took to complete: 143ms行  4230: 01-01 08:00:22.768  1504  1504 I SystemServer: StartPowerManager行  4235: 01-01 08:00:22.783  1504  1504 D SystemServerTiming: StartPowerManager took to complete: 15ms行  4236: 01-01 08:00:22.783  1504  1504 I SystemServer: StartThermalManager行  4238: 01-01 08:00:22.784  1504  1504 D SystemServerTiming: StartThermalManager took to complete: 1ms行  4239: 01-01 08:00:22.784  1504  1504 I SystemServer: InitPowerManagement行  4240: 01-01 08:00:22.787  1504  1504 D SystemServerTiming: InitPowerManagement took to complete: 3ms行  4241: 01-01 08:00:22.787  1504  1504 I SystemServer: StartRecoverySystemService行  4243: 01-01 08:00:22.789  1504  1504 D SystemServerTiming: StartRecoverySystemService took to complete: 2ms行  4245: 01-01 08:00:22.790  1504  1504 I SystemServer: StartLightsService行  4247: 01-01 08:00:22.795  1504  1504 D SystemServerTiming: StartLightsService took to complete: 5ms行  4248: 01-01 08:00:22.795  1504  1504 I SystemServer: StartSidekickService行  4249: 01-01 08:00:22.795  1504  1504 D SystemServerTiming: StartSidekickService took to complete: 0ms行  4250: 01-01 08:00:22.795  1504  1504 I SystemServer: StartDisplayManager行  4253: 01-01 08:00:22.799  1504  1504 D SystemServerTiming: StartDisplayManager took to complete: 4ms行  4254: 01-01 08:00:22.799  1504  1504 I SystemServer: WaitForDisplay行  4263: 01-01 08:00:22.807  1504  1504 D SystemServerTiming: WaitForDisplay took to complete: 9ms行  4267: 01-01 08:00:22.808  1504  1504 I SystemServer: StartPackageManagerService行  4282: 01-01 08:00:22.833  1504  1642 D SystemServerInitThreadPool: Finished executing ReadingSystemConfig行  5304: 01-01 08:00:25.569  1504  1953 D SystemServerInitThreadPool: Started executing prepareAppData行  5327: 01-01 08:00:25.690  1504  1504 D SystemServerTiming: StartPackageManagerService took to complete: 2883ms行  5329: 01-01 08:00:25.691  1504  1504 I SystemServer: StartOtaDexOptService行  5333: 01-01 08:00:25.693  1504  1504 D SystemServerTiming: StartOtaDexOptService took to complete: 1ms行  5334: 01-01 08:00:25.693  1504  1504 I SystemServer: StartUserManagerService行  5336: 01-01 08:00:25.693  1504  1504 D SystemServerTiming: StartUserManagerService took to complete: 1ms行  5337: 01-01 08:00:25.693  1504  1504 I SystemServer: InitAttributerCache行  5338: 01-01 08:00:25.694  1504  1504 D SystemServerTiming: InitAttributerCache took to complete: 0ms行  5339: 01-01 08:00:25.694  1504  1504 I SystemServer: SetSystemProcess行  5344: 01-01 08:00:25.707  1504  1504 D SystemServerTiming: SetSystemProcess took to complete: 13ms行  5345: 01-01 08:00:25.707  1504  1504 I SystemServer: InitWatchdog行  5346: 01-01 08:00:25.707  1504  1504 D SystemServerTiming: InitWatchdog took to complete: 1ms行  5347: 01-01 08:00:25.708  1504  1504 I SystemServer: StartOverlayManagerService行  5350: 01-01 08:00:25.783  1504  1953 D SystemServerTimingAsync: AppDataFixup took to complete: 214ms行  5351: 01-01 08:00:25.829  1504  1504 D SystemServerTiming: StartOverlayManagerService took to complete: 121ms行  5353: 01-01 08:00:25.829  1504  1504 I SystemServer: StartSensorPrivacyService行  5355: 01-01 08:00:25.830  1504  1504 D SystemServerTiming: StartSensorPrivacyService took to complete: 1ms行  5356: 01-01 08:00:25.830  1504  1504 I SystemServer: StartBatteryService行  5358: 01-01 08:00:25.830  1504  1959 D SystemServerInitThreadPool: Started executing StartSensorService行  5423: 01-01 08:00:25.843  1504  1959 D SystemServerTimingAsync: StartSensorService took to complete: 13ms行  5424: 01-01 08:00:25.843  1504  1959 D SystemServerInitThreadPool: Finished executing StartSensorService行  5440: 01-01 08:00:25.875  1504  1504 D SystemServerTiming: StartBatteryService took to complete: 44ms行  5441: 01-01 08:00:25.875  1504  1504 I SystemServer: StartUsageService行  5445: 01-01 08:00:25.883  1504  1504 D SystemServerTiming: StartUsageService took to complete: 9ms行  5446: 01-01 08:00:25.884  1504  1504 I SystemServer: StartWebViewUpdateService行  5448: 01-01 08:00:25.886  1504  1504 D SystemServerTiming: StartWebViewUpdateService took to complete: 2ms行  5449: 01-01 08:00:25.886  1504  1504 I SystemServer: StartCachedDeviceStateService行  5451: 01-01 08:00:25.886  1504  1504 D SystemServerTiming: StartCachedDeviceStateService took to complete: 0ms行  5452: 01-01 08:00:25.886  1504  1504 I SystemServer: StartBinderCallsStatsService行  5454: 01-01 08:00:25.887  1504  1504 D SystemServerTiming: StartBinderCallsStatsService took to complete: 1ms行  5455: 01-01 08:00:25.887  1504  1504 I SystemServer: StartLooperStatsService行  5457: 01-01 08:00:25.888  1504  1504 D SystemServerTiming: StartLooperStatsService took to complete: 1ms行  5458: 01-01 08:00:25.888  1504  1504 I SystemServer: StartRollbackManagerService行  5461: 01-01 08:00:25.893  1504  1504 D SystemServerTiming: StartRollbackManagerService took to complete: 5ms行  5462: 01-01 08:00:25.893  1504  1504 I SystemServer: StartBugreportManagerService行  5464: 01-01 08:00:25.894  1504  1504 D SystemServerTiming: StartBugreportManagerService took to complete: 1ms行  5465: 01-01 08:00:25.894  1504  1504 I SystemServer: GpuService行  5467: 01-01 08:00:25.894  1504  1504 D SystemServerTiming: GpuService took to complete: 0ms行  5468: 01-01 08:00:25.894  1504  1504 I SystemServer: StartKeyAttestationApplicationIdProviderService行  5469: 01-01 08:00:25.895  1504  1969 D SystemServerInitThreadPool: Started executing SecondaryZygotePreload行  5470: 01-01 08:00:25.895  1504  1969 I SystemServer: SecondaryZygotePreload行  5471: 01-01 08:00:25.895  1504  1504 D SystemServerTiming: StartKeyAttestationApplicationIdProviderService took to complete: 0ms行  5472: 01-01 08:00:25.895  1504  1504 I SystemServer: StartKeyChainSystemService行  5474: 01-01 08:00:25.895  1504  1504 D SystemServerTiming: StartKeyChainSystemService took to complete: 0ms行  5475: 01-01 08:00:25.896  1504  1504 I SystemServer: StartSchedulingPolicyService行  5476: 01-01 08:00:25.896  1504  1970 D SystemServerInitThreadPool: Started executing SchedulingPolicyService.<init>5477: 01-01 08:00:25.897  1504  1504 D SystemServerTiming: StartSchedulingPolicyService took to complete: 1ms行  5478: 01-01 08:00:25.897  1504  1504 I SystemServer: StartTelecomLoaderService行  5480: 01-01 08:00:25.897  1504  1504 D SystemServerTiming: StartTelecomLoaderService took to complete: 0ms行  5481: 01-01 08:00:25.897  1504  1504 I SystemServer: StartTelephonyRegistry行  5482: 01-01 08:00:25.898  1504  1504 D SystemServerTiming: StartTelephonyRegistry took to complete: 1ms行  5483: 01-01 08:00:25.898  1504  1504 I SystemServer: StartEntropyMixer行  5496: 01-01 08:00:25.900  1504  1504 W EntropyMixer: 	at com.android.server.SystemServer.startOtherServices(SystemServer.java:977)5497: 01-01 08:00:25.900  1504  1504 W EntropyMixer: 	at com.android.server.SystemServer.run(SystemServer.java:519)5498: 01-01 08:00:25.900  1504  1504 W EntropyMixer: 	at com.android.server.SystemServer.main(SystemServer.java:356)5509: 01-01 08:00:25.902  1504  1504 D SystemServerTiming: StartEntropyMixer took to complete: 4ms行  5510: 01-01 08:00:25.902  1504  1504 I SystemServer: StartAccountManagerService行  5512: 01-01 08:00:25.905  1504  1504 D SystemServerTiming: StartAccountManagerService took to complete: 3ms行  5513: 01-01 08:00:25.906  1504  1504 I SystemServer: StartContentService行  5515: 01-01 08:00:25.907  1504  1504 D SystemServerTiming: StartContentService took to complete: 1ms行  5516: 01-01 08:00:25.907  1504  1504 I SystemServer: InstallSystemProviders行  5520: 01-01 08:00:25.911  1504  1970 D SystemServerInitThreadPool: Finished executing SchedulingPolicyService.<init>5542: 01-01 08:00:25.930  1504  1504 I SettingsState: 	at com.android.server.SystemServer.startOtherServices(SystemServer.java:992)5543: 01-01 08:00:25.930  1504  1504 I SettingsState: 	at com.android.server.SystemServer.run(SystemServer.java:519)5544: 01-01 08:00:25.930  1504  1504 I SettingsState: 	at com.android.server.SystemServer.main(SystemServer.java:356)5551: 01-01 08:00:25.947  1504  1504 D SystemServerTiming: InstallSystemProviders took to complete: 40ms行  5552: 01-01 08:00:25.947  1504  1504 I SystemServer: StartDropBoxManager行  5554: 01-01 08:00:25.948  1504  1504 D SystemServerTiming: StartDropBoxManager took to complete: 1ms行  5555: 01-01 08:00:25.948  1504  1504 I SystemServer: StartVibratorService行  5559: 01-01 08:00:25.955  1504  1504 D SystemServerTiming: StartVibratorService took to complete: 6ms行  5560: 01-01 08:00:25.955  1504  1504 I SystemServer: StartDynamicSystemService行  5561: 01-01 08:00:25.956  1504  1504 D SystemServerTiming: StartDynamicSystemService took to complete: 1ms行  5562: 01-01 08:00:25.956  1504  1504 I SystemServer: StartConsumerIrService行  5565: 01-01 08:00:25.958  1504  1504 D SystemServerTiming: StartConsumerIrService took to complete: 2ms行  5566: 01-01 08:00:25.958  1504  1504 I SystemServer: StartAlarmManagerService行  5571: 05-08 18:46:58.002  1504  1504 D SystemServerTiming: StartAlarmManagerService took to complete: 4ms行  5572: 05-08 18:46:58.002  1504  1504 I SystemServer: StartInputManagerService行  5574: 05-08 18:46:58.006  1504  1504 D SystemServerTiming: StartInputManagerService took to complete: 4ms行  5575: 05-08 18:46:58.007  1504  1504 I SystemServer: StartWindowManagerService行  5580: 05-08 18:46:58.019  1504  1504 D SystemServerTiming: StartWindowManagerService took to complete: 12ms行  5581: 05-08 18:46:58.019  1504  1504 I SystemServer: SetWindowManagerService行  5584: 05-08 18:46:58.043  1504  1504 D SystemServerTiming: SetWindowManagerService took to complete: 25ms行  5585: 05-08 18:46:58.044  1504  1504 I SystemServer: WindowManagerServiceOnInitReady行  5586: 05-08 18:46:58.058  1504  1504 D SystemServerTiming: WindowManagerServiceOnInitReady took to complete: 14ms行  5587: 05-08 18:46:58.058  1504  1504 I SystemServer: StartInputManager行  5589: 05-08 18:46:58.059  1504  1977 D SystemServerInitThreadPool: Started executing StartHidlServices行  5593: 05-08 18:46:58.065  1504  1504 D SystemServerTiming: StartInputManager took to complete: 7ms行  5596: 05-08 18:46:58.065  1504  1504 I SystemServer: DisplayManagerWindowManagerAndInputReady行  5598: 05-08 18:46:58.065  1504  1504 D SystemServerTiming: DisplayManagerWindowManagerAndInputReady took to complete: 0ms行  5599: 05-08 18:46:58.065  1504  1504 I SystemServer: StartBluetoothService行  5605: 05-08 18:46:58.068  1504  1504 D SystemServerTiming: StartBluetoothService took to complete: 2ms行  5606: 05-08 18:46:58.068  1504  1504 I SystemServer: IpConnectivityMetrics行  5610: 05-08 18:46:58.070  1504  1504 D SystemServerTiming: IpConnectivityMetrics took to complete: 3ms行  5611: 05-08 18:46:58.070  1504  1504 I SystemServer: NetworkWatchlistService行  5615: 05-08 18:46:58.073  1504  1977 D SystemServerTimingAsync: StartHidlServices took to complete: 14ms行  5616: 05-08 18:46:58.073  1504  1977 D SystemServerInitThreadPool: Finished executing StartHidlServices行  5622: 05-08 18:46:58.075  1504  1504 D SystemServerTiming: NetworkWatchlistService took to complete: 5ms行  5623: 05-08 18:46:58.075  1504  1504 I SystemServer: PinnerService行  5626: 05-08 18:46:58.078  1504  1504 D SystemServerTiming: PinnerService took to complete: 2ms行  5627: 05-08 18:46:58.079  1504  1504 I SystemServer: ActivityTriggerService行  5634: 05-08 18:46:58.079  1504  1504 D SystemServerTiming: ActivityTriggerService took to complete: 1ms行  5635: 05-08 18:46:58.079  1504  1504 I SystemServer: SignedConfigService行  5636: 05-08 18:46:58.079  1504  1504 D SystemServerTiming: SignedConfigService took to complete: 0ms行  5652: 05-08 18:46:58.092  1504  1504 I SystemServer: StartInputMethodManagerLifecycle行  5658: 05-08 18:46:58.102  1504  1504 D SystemServerTiming: StartInputMethodManagerLifecycle took to complete: 9ms行  5659: 05-08 18:46:58.102  1504  1504 I SystemServer: StartAccessibilityManagerService行  5661: 05-08 18:46:58.105  1504  1504 D SystemServerTiming: StartAccessibilityManagerService took to complete: 3ms行  5662: 05-08 18:46:58.105  1504  1504 I SystemServer: MakeDisplayReady行  5679: 05-08 18:46:58.128  1504  1504 D SystemServerTiming: MakeDisplayReady took to complete: 23ms行  5680: 05-08 18:46:58.128  1504  1504 I SystemServer: StartStorageManagerService行  5690: 05-08 18:46:58.138  1504  1504 D SystemServerTiming: StartStorageManagerService took to complete: 10ms行  5691: 05-08 18:46:58.138  1504  1504 I SystemServer: StartStorageStatsService行  5696: 05-08 18:46:58.142  1504  1504 D SystemServerTiming: StartStorageStatsService took to complete: 5ms行  5697: 05-08 18:46:58.143  1504  1504 I SystemServer: StartUiModeManager行  5701: 05-08 18:46:58.145  1504  1985 D SystemServerInitThreadPool: Started executing UiModeManager.onStart行  5703: 05-08 18:46:58.146  1504  1504 D SystemServerTiming: StartUiModeManager took to complete: 3ms行  5704: 05-08 18:46:58.146  1504  1504 I SystemServer: UpdatePackagesIfNeeded行  5707: 05-08 18:46:58.146  1504  1504 D SystemServerTiming: UpdatePackagesIfNeeded took to complete: 0ms行  5708: 05-08 18:46:58.146  1504  1504 I SystemServer: PerformFstrimIfNeeded行  5710: 05-08 18:46:58.147  1504  1504 D SystemServerTiming: PerformFstrimIfNeeded took to complete: 0ms行  5711: 05-08 18:46:58.147  1504  1504 I SystemServer: StartLockSettingsService行  5716: 05-08 18:46:58.164  1504  1504 D SystemServerTiming: StartLockSettingsService took to complete: 17ms行  5717: 05-08 18:46:58.164  1504  1504 I SystemServer: StartPersistentDataBlock行  5720: 05-08 18:46:58.165  1504  1504 D SystemServerTiming: StartPersistentDataBlock took to complete: 1ms行  5721: 05-08 18:46:58.166  1504  1986 D SystemServerInitThreadPool: Started executing PersistentDataBlockService.onStart行  5722: 05-08 18:46:58.167  1504  1504 I SystemServer: StartTestHarnessMode行  5730: 05-08 18:46:58.168  1504  1986 E PersistentDataBlockService: 	at com.android.server.SystemServerInitThreadPool.lambda$submit$0$SystemServerInitThreadPool(SystemServerInitThreadPool.java:72)5731: 05-08 18:46:58.168  1504  1986 E PersistentDataBlockService: 	at com.android.server.-$$Lambda$SystemServerInitThreadPool$jLyL3DFmbjsFesU5SGktD3NoWSc.run(Unknown Source:6)5737: 05-08 18:46:58.169  1504  1504 D SystemServerTiming: StartTestHarnessMode took to complete: 3ms行  5738: 05-08 18:46:58.170  1504  1504 I SystemServer: StartOemLockService行  5744: 05-08 18:46:58.172  1504  1504 D SystemServerTiming: StartOemLockService took to complete: 3ms行  5745: 05-08 18:46:58.172  1504  1504 I SystemServer: StartDeviceIdleController行  5747: 05-08 18:46:58.176  1504  1504 D SystemServerTiming: StartDeviceIdleController took to complete: 3ms行  5748: 05-08 18:46:58.176  1504  1504 I SystemServer: StartDevicePolicyManager行  5750: 05-08 18:46:58.179  1504  1504 D SystemServerTiming: StartDevicePolicyManager took to complete: 4ms行  5751: 05-08 18:46:58.180  1504  1504 I SystemServer: StartStatusBarManagerService行  5752: 05-08 18:46:58.181  1504  1504 D SystemServerTiming: StartStatusBarManagerService took to complete: 1ms行  5753: 05-08 18:46:58.184  1504  1504 D SystemServer: ContentCaptureService disabled because resource is not overlaid行  5755: 05-08 18:46:58.185  1504  1504 D SystemServer: AttentionService is not configured on this device行  5756: 05-08 18:46:58.185  1504  1504 D SystemServer: SystemCaptionsManagerService disabled because resource is not overlaid行  5757: 05-08 18:46:58.185  1504  1504 D SystemServer: AppPredictionService not defined by OEM行  5758: 05-08 18:46:58.185  1504  1504 D SystemServer: ContentSuggestionsService not defined by OEM行  5759: 05-08 18:46:58.185  1504  1504 I SystemServer: InitNetworkStackClient行  5760: 05-08 18:46:58.186  1504  1985 D SystemServerInitThreadPool: Finished executing UiModeManager.onStart行  5761: 05-08 18:46:58.191  1504  1504 D SystemServerTiming: InitNetworkStackClient took to complete: 6ms行  5762: 05-08 18:46:58.191  1504  1504 I SystemServer: StartNetworkManagementService行  5764: 05-08 18:46:58.194  1504  1986 D SystemServerInitThreadPool: Finished executing PersistentDataBlockService.onStart行  5765: 05-08 18:46:58.194  1504  1504 D SystemServerTiming: StartNetworkManagementService took to complete: 3ms行  5766: 05-08 18:46:58.194  1504  1504 I SystemServer: StartIpSecService行  5767: 05-08 18:46:58.196  1504  1504 D SystemServerTiming: StartIpSecService took to complete: 1ms行  5768: 05-08 18:46:58.196  1504  1504 I SystemServer: StartTextServicesManager行  5770: 05-08 18:46:58.197  1504  1504 D SystemServerTiming: StartTextServicesManager took to complete: 1ms行  5771: 05-08 18:46:58.197  1504  1504 I SystemServer: StartTextClassificationManagerService行  5773: 05-08 18:46:58.198  1504  1504 D SystemServerTiming: StartTextClassificationManagerService took to complete: 1ms行  5774: 05-08 18:46:58.198  1504  1504 I SystemServer: StartNetworkScoreService行  5777: 05-08 18:46:58.200  1504  1504 D SystemServerTiming: StartNetworkScoreService took to complete: 1ms行  5778: 05-08 18:46:58.200  1504  1504 I SystemServer: StartNetworkStatsService行  5780: 05-08 18:46:58.202  1504  1504 D SystemServerTiming: StartNetworkStatsService took to complete: 2ms行  5781: 05-08 18:46:58.202  1504  1504 I SystemServer: StartNetworkPolicyManagerService行  5782: 05-08 18:46:58.205  1504  1504 D SystemServerTiming: StartNetworkPolicyManagerService took to complete: 3ms行  5783: 05-08 18:46:58.205  1504  1504 I SystemServer: StartWifi行  5808: 05-08 18:46:58.343  1504  1504 D SystemServerTiming: StartWifi took to complete: 139ms行  5809: 05-08 18:46:58.343  1504  1504 I SystemServer: StartWifiScanning行  5815: 05-08 18:46:58.346  1504  1504 D SystemServerTiming: StartWifiScanning took to complete: 3ms行  5816: 05-08 18:46:58.346  1504  1504 I SystemServer: StartRttService行  5819: 05-08 18:46:58.349  1504  1504 D SystemServerTiming: StartRttService took to complete: 2ms行  5820: 05-08 18:46:58.349  1504  1504 I SystemServer: StartWifiAware行  5823: 05-08 18:46:58.351  1504  1504 D SystemServerTiming: StartWifiAware took to complete: 2ms行  5825: 05-08 18:46:58.351  1504  1504 I SystemServer: StartWifiP2P行  5830: 05-08 18:46:58.358  1504  1504 D SystemServerTiming: StartWifiP2P took to complete: 7ms行  5831: 05-08 18:46:58.358  1504  1504 I SystemServer: StartEthernet行  5835: 05-08 18:46:58.360  1504  1504 D SystemServerTiming: StartEthernet took to complete: 1ms行  5836: 05-08 18:46:58.360  1504  1504 I SystemServer: StartConnectivityService行  5843: 05-08 18:46:58.373  1504  1953 D SystemServerTimingAsync: AppDataPrepare took to complete: 550ms行  5845: 05-08 18:46:58.373  1504  1953 D SystemServerInitThreadPool: Finished executing prepareAppData行  5856: 05-08 18:46:58.377  1504  1504 D SystemServerTiming: StartConnectivityService took to complete: 17ms行  5857: 05-08 18:46:58.377  1504  1504 I SystemServer: StartNsdService行  5862: 05-08 18:46:58.379  1504  1504 D SystemServerTiming: StartNsdService took to complete: 3ms行  5863: 05-08 18:46:58.379  1504  1504 I SystemServer: StartSystemUpdateManagerService行  5867: 05-08 18:46:58.381  1504  1504 D SystemServerTiming: StartSystemUpdateManagerService took to complete: 1ms行  5868: 05-08 18:46:58.381  1504  1504 I SystemServer: StartUpdateLockService行  5869: 05-08 18:46:58.381  1504  1504 D SystemServerTiming: StartUpdateLockService took to complete: 1ms行  5870: 05-08 18:46:58.381  1504  1504 I SystemServer: StartNotificationManager行  5882: 05-08 18:46:58.398  1504  1504 D SystemServerTiming: StartNotificationManager took to complete: 16ms行  5883: 05-08 18:46:58.398  1504  1504 I SystemServer: StartDeviceMonitor行  5885: 05-08 18:46:58.399  1504  1504 D SystemServerTiming: StartDeviceMonitor took to complete: 2ms行  5886: 05-08 18:46:58.399  1504  1504 I SystemServer: StartLocationManagerService行  5889: 05-08 18:46:58.400  1504  1504 D SystemServerTiming: StartLocationManagerService took to complete: 1ms行  5890: 05-08 18:46:58.401  1504  1504 I SystemServer: StartCountryDetectorService行  5891: 05-08 18:46:58.401  1504  1504 D SystemServerTiming: StartCountryDetectorService took to complete: 1ms行  5892: 05-08 18:46:58.401  1504  1504 I SystemServer: StartTimeDetectorService行  5894: 05-08 18:46:58.402  1504  1504 D SystemServerTiming: StartTimeDetectorService took to complete: 1ms行  5895: 05-08 18:46:58.403  1504  1504 I SystemServer: StartSearchManagerService行  5897: 05-08 18:46:58.404  1504  1504 D SystemServerTiming: StartSearchManagerService took to complete: 1ms行  5898: 05-08 18:46:58.404  1504  1504 I SystemServer: StartWallpaperManagerService行  5900: 05-08 18:46:58.405  1504  1504 D SystemServerTiming: StartWallpaperManagerService took to complete: 2ms行  5901: 05-08 18:46:58.405  1504  1504 I SystemServer: StartAudioService行  5923: 05-08 18:46:58.448  1504  1504 D SystemServerTiming: StartAudioService took to complete: 43ms行  5924: 05-08 18:46:58.448  1504  1504 I SystemServer: StartDockObserver行  5927: 05-08 18:46:58.449  1504  1504 D SystemServerTiming: StartDockObserver took to complete: 1ms行  5928: 05-08 18:46:58.449  1504  1504 I SystemServer: StartWiredAccessoryManager行  5935: 05-08 18:46:58.452  1504  1504 D SystemServerTiming: StartWiredAccessoryManager took to complete: 2ms行  5936: 05-08 18:46:58.452  1504  1504 I SystemServer: StartMidiManager行  5938: 05-08 18:46:58.453  1504  1504 D SystemServerTiming: StartMidiManager took to complete: 1ms行  5939: 05-08 18:46:58.453  1504  1504 I SystemServer: StartAdbService行  5941: 05-08 18:46:58.454  1504  1504 D SystemServerTiming: StartAdbService took to complete: 2ms行  5942: 05-08 18:46:58.454  1504  1504 I SystemServer: StartUsbService行  5957: 05-08 18:46:58.457  1504  1504 I UsbDeviceManager: 	at com.android.server.SystemServer.startOtherServices(SystemServer.java:1584)5958: 05-08 18:46:58.457  1504  1504 I UsbDeviceManager: 	at com.android.server.SystemServer.run(SystemServer.java:519)5959: 05-08 18:46:58.457  1504  1504 I UsbDeviceManager: 	at com.android.server.SystemServer.main(SystemServer.java:356)5983: 05-08 18:46:58.470  1504  1504 D SystemServerTiming: StartUsbService took to complete: 15ms行  5984: 05-08 18:46:58.470  1504  1504 I SystemServer: StartSerialService行  5985: 05-08 18:46:58.471  1504  1504 D SystemServerTiming: StartSerialService took to complete: 1ms行  5986: 05-08 18:46:58.471  1504  1504 I SystemServer: StartHardwarePropertiesManagerService行  5988: 05-08 18:46:58.472  1504  1504 D SystemServerTiming: StartHardwarePropertiesManagerService took to complete: 2ms行  5989: 05-08 18:46:58.473  1504  1504 I SystemServer: StartTwilightService行  5991: 05-08 18:46:58.473  1504  1504 D SystemServerTiming: StartTwilightService took to complete: 0ms行  5992: 05-08 18:46:58.473  1504  1504 I SystemServer: StartColorDisplay行  5995: 05-08 18:46:58.474  1504  1504 D SystemServerTiming: StartColorDisplay took to complete: 1ms行  5996: 05-08 18:46:58.474  1504  1504 I SystemServer: StartJobScheduler行  6007: 05-08 18:46:58.484  1504  1504 D SystemServerTiming: StartJobScheduler took to complete: 9ms行  6008: 05-08 18:46:58.484  1504  1504 I SystemServer: StartSoundTrigger行  6010: 05-08 18:46:58.485  1504  1504 D SystemServerTiming: StartSoundTrigger took to complete: 1ms行  6011: 05-08 18:46:58.485  1504  1504 I SystemServer: StartTrustManager行  6013: 05-08 18:46:58.486  1504  1504 D SystemServerTiming: StartTrustManager took to complete: 1ms行  6014: 05-08 18:46:58.486  1504  1504 I SystemServer: StartBackupManager行  6016: 05-08 18:46:58.489  1504  1504 D SystemServerTiming: StartBackupManager took to complete: 2ms行  6017: 05-08 18:46:58.489  1504  1504 I SystemServer: StartAppWidgetService行  6019: 05-08 18:46:58.494  1504  1504 D SystemServerTiming: StartAppWidgetService took to complete: 4ms行  6020: 05-08 18:46:58.494  1504  1504 I SystemServer: StartRoleManagerService行  6021: 05-08 18:46:58.497  1504  1504 D SystemServerTiming: StartRoleManagerService took to complete: 2ms行  6022: 05-08 18:46:58.497  1504  1504 I SystemServer: StartVoiceRecognitionManager行  6026: 05-08 18:46:58.502  1504  1504 D SystemServerTiming: StartVoiceRecognitionManager took to complete: 5ms行  6027: 05-08 18:46:58.502  1504  1504 I SystemServer: StartGestureLauncher行  6029: 05-08 18:46:58.502  1504  1504 D SystemServerTiming: StartGestureLauncher took to complete: 0ms行  6030: 05-08 18:46:58.502  1504  1504 I SystemServer: StartSensorNotification行  6032: 05-08 18:46:58.502  1504  1504 D SystemServerTiming: StartSensorNotification took to complete: 0ms行  6033: 05-08 18:46:58.502  1504  1504 I SystemServer: StartContextHubSystemService行  6035: 05-08 18:46:58.502  1504  1504 D SystemServerTiming: StartContextHubSystemService took to complete: 0ms行  6036: 05-08 18:46:58.502  1504  1642 D SystemServerInitThreadPool: Started executing Init ContextHubSystemService行  6037: 05-08 18:46:58.503  1504  1504 I SystemServer: StartDiskStatsService行  6040: 05-08 18:46:58.504  1504  1642 D SystemServerInitThreadPool: Finished executing Init ContextHubSystemService行  6041: 05-08 18:46:58.505  1504  1504 D SystemServerTiming: StartDiskStatsService took to complete: 2ms行  6042: 05-08 18:46:58.505  1504  1504 I SystemServer: Start HenryService行  6044: 05-08 18:46:58.506  1504  1504 D SystemServerTiming: Start HenryService took to complete: 1ms行  6045: 05-08 18:46:58.506  1504  1504 I SystemServer: RuntimeService行  6046: 05-08 18:46:58.507  1504  1504 D SystemServerTiming: RuntimeService took to complete: 1ms行  6047: 05-08 18:46:58.507  1504  1504 I SystemServer: StartNetworkTimeUpdateService行  6049: 05-08 18:46:58.507  1504  1504 D SystemServer: Using networkTimeUpdater class=class com.android.server.NewNetworkTimeUpdateService行  6050: 05-08 18:46:58.508  1504  1504 D SystemServerTiming: StartNetworkTimeUpdateService took to complete: 2ms行  6051: 05-08 18:46:58.508  1504  1504 I SystemServer: CertBlacklister行  6052: 05-08 18:46:58.509  1504  1504 D SystemServerTiming: CertBlacklister took to complete: 0ms行  6053: 05-08 18:46:58.509  1504  1504 I SystemServer: StartEmergencyAffordanceService行  6055: 05-08 18:46:58.509  1504  1504 D SystemServerTiming: StartEmergencyAffordanceService took to complete: 0ms行  6056: 05-08 18:46:58.509  1504  1504 I SystemServer: StartDreamManager行  6058: 05-08 18:46:58.510  1504  1504 D SystemServerTiming: StartDreamManager took to complete: 1ms行  6059: 05-08 18:46:58.510  1504  1504 I SystemServer: AddGraphicsStatsService行  6060: 05-08 18:46:58.512  1504  1504 D SystemServerTiming: AddGraphicsStatsService took to complete: 2ms行  6061: 05-08 18:46:58.512  1504  1504 I SystemServer: StartPrintManager行  6063: 05-08 18:46:58.513  1504  1504 D SystemServerTiming: StartPrintManager took to complete: 1ms行  6064: 05-08 18:46:58.513  1504  1504 I SystemServer: StartCompanionDeviceManager行  6066: 05-08 18:46:58.514  1504  1504 D SystemServerTiming: StartCompanionDeviceManager took to complete: 1ms行  6067: 05-08 18:46:58.515  1504  1504 I SystemServer: StartRestrictionManager行  6069: 05-08 18:46:58.515  1504  1504 D SystemServerTiming: StartRestrictionManager took to complete: 1ms行  6070: 05-08 18:46:58.515  1504  1504 I SystemServer: StartMediaSessionService行  6073: 05-08 18:46:58.523  1504  1504 D SystemServerTiming: StartMediaSessionService took to complete: 7ms行  6074: 05-08 18:46:58.523  1504  1504 I SystemServer: StartMediaResourceMonitor行  6076: 05-08 18:46:58.523  1504  1504 D SystemServerTiming: StartMediaResourceMonitor took to complete: 1ms行  6077: 05-08 18:46:58.523  1504  1504 I SystemServer: StartMediaRouterService行  6078: 05-08 18:46:58.524  1504  1504 D SystemServerTiming: StartMediaRouterService took to complete: 1ms行  6079: 05-08 18:46:58.524  1504  1504 I SystemServer: StartBackgroundDexOptService行  6081: 05-08 18:46:58.525  1504  1504 D SystemServerTiming: StartBackgroundDexOptService took to complete: 0ms行  6082: 05-08 18:46:58.525  1504  1504 I SystemServer: StartDynamicCodeLoggingService行  6083: 05-08 18:46:58.526  1504  1504 D SystemServerTiming: StartDynamicCodeLoggingService took to complete: 0ms行  6084: 05-08 18:46:58.526  1504  1504 I SystemServer: StartPruneInstantAppsJobService行  6085: 05-08 18:46:58.526  1504  1504 D SystemServerTiming: StartPruneInstantAppsJobService took to complete: 0ms行  6086: 05-08 18:46:58.526  1504  1504 I SystemServer: StartShortcutServiceLifecycle行  6088: 05-08 18:46:58.528  1504  1504 D SystemServerTiming: StartShortcutServiceLifecycle took to complete: 2ms行  6089: 05-08 18:46:58.528  1504  1504 I SystemServer: StartLauncherAppsService行  6091: 05-08 18:46:58.529  1504  1504 D SystemServerTiming: StartLauncherAppsService took to complete: 1ms行  6092: 05-08 18:46:58.529  1504  1504 I SystemServer: StartCrossProfileAppsService行  6094: 05-08 18:46:58.530  1504  1504 D SystemServerTiming: StartCrossProfileAppsService took to complete: 1ms行  6095: 05-08 18:46:58.530  1504  1504 I SystemServer: StartMediaProjectionManager行  6098: 05-08 18:46:58.532  1504  1504 D SystemServerTiming: StartMediaProjectionManager took to complete: 2ms行  6099: 05-08 18:46:58.532  1504  1504 I SystemServer: StartSliceManagerService行  6101: 05-08 18:46:58.534  1504  1504 D SystemServerTiming: StartSliceManagerService took to complete: 2ms行  6102: 05-08 18:46:58.534  1504  1504 I SystemServer: StartCameraServiceProxy行  6104: 05-08 18:46:58.536  1504  1504 D SystemServerTiming: StartCameraServiceProxy took to complete: 2ms行  6105: 05-08 18:46:58.536  1504  1504 I SystemServer: StartStatsCompanionService行  6108: 05-08 18:46:58.540  1504  1504 D SystemServerTiming: StartStatsCompanionService took to complete: 4ms行  6109: 05-08 18:46:58.540  1504  1504 I SystemServer: StartIncidentCompanionService行  6111: 05-08 18:46:58.541  1504  1504 D SystemServerTiming: StartIncidentCompanionService took to complete: 1ms行  6112: 05-08 18:46:58.541  1504  1504 I SystemServer: StartMmsService行  6114: 05-08 18:46:58.542  1504  1504 D SystemServerTiming: StartMmsService took to complete: 0ms行  6115: 05-08 18:46:58.542  1504  1504 I SystemServer: StartAutoFillService行  6122: 05-08 18:46:58.546  1504  1504 D SystemServerTiming: StartAutoFillService took to complete: 3ms行  6123: 05-08 18:46:58.546  1504  1504 I SystemServer: StartClipboardService行  6125: 05-08 18:46:58.547  1504  1504 D SystemServerTiming: StartClipboardService took to complete: 2ms行  6126: 05-08 18:46:58.547  1504  1504 I SystemServer: AppServiceManager行  6128: 05-08 18:46:58.549  1504  1504 D SystemServerTiming: AppServiceManager took to complete: 1ms行  6129: 05-08 18:46:58.549  1504  1504 I SystemServer: MakeVibratorServiceReady行  6135: 05-08 18:46:58.550  1504  1504 D SystemServerTiming: MakeVibratorServiceReady took to complete: 2ms行  6136: 05-08 18:46:58.550  1504  1504 I SystemServer: MakeLockSettingsServiceReady行  6173: 05-08 18:46:58.570  1504  1504 D SystemServerTiming: MakeLockSettingsServiceReady took to complete: 20ms行  6174: 05-08 18:46:58.571  1504  1504 I SystemServer: StartBootPhaseLockSettingsReady行  6178: 05-08 18:46:58.576  1504  1959 D SystemServerInitThreadPool: Started executing DevicePolicyManager行  6179: 05-08 18:46:58.576  1504  1959 D SystemServerInitThreadPool: Finished executing DevicePolicyManager行  6180: 05-08 18:46:58.578  1504  1504 D SystemServerTiming: StartBootPhaseLockSettingsReady took to complete: 8ms行  6181: 05-08 18:46:58.578  1504  1504 I SystemServer: StartBootPhaseSystemServicesReady行  6243: 05-08 18:46:58.635  1504  1504 D SystemServerTiming: StartBootPhaseSystemServicesReady took to complete: 56ms行  6244: 05-08 18:46:58.635  1504  1504 I SystemServer: MakeWindowManagerServiceReady行  6246: 05-08 18:46:58.642  1504  1504 D SystemServerTiming: MakeWindowManagerServiceReady took to complete: 6ms行  6249: 05-08 18:46:58.644  1504  1504 I SystemServer: MakePowerManagerServiceReady行  6252: 05-08 18:46:58.657  1504  1504 D SystemServerTiming: MakePowerManagerServiceReady took to complete: 13ms行  6253: 05-08 18:46:58.657  1504  1504 I SystemServer: StartPermissionPolicyService行  6256: 05-08 18:46:58.666  1504  1504 D SystemServerTiming: StartPermissionPolicyService took to complete: 8ms行  6257: 05-08 18:46:58.666  1504  1504 I SystemServer: MakePackageManagerServiceReady行  6294: 05-08 18:46:58.704  1504  1504 D SystemServerTiming: MakePackageManagerServiceReady took to complete: 38ms行  6295: 05-08 18:46:58.704  1504  1504 I SystemServer: MakeDisplayManagerServiceReady行  6298: 05-08 18:46:58.706  1504  1504 D SystemServerTiming: MakeDisplayManagerServiceReady took to complete: 1ms行  6300: 05-08 18:46:58.706  1504  1504 I SystemServer: StartDeviceSpecificServices行  6301: 05-08 18:46:58.706  1504  1504 D SystemServerTiming: StartDeviceSpecificServices took to complete: 0ms行  6302: 05-08 18:46:58.706  1504  1504 I SystemServer: StartBootPhaseDeviceSpecificServicesReady行  6304: 05-08 18:46:58.706  1504  1504 D SystemServerTiming: StartBootPhaseDeviceSpecificServicesReady took to complete: 1ms行  6361: 05-08 18:46:58.748  1504  1969 D SystemServerTimingAsync: SecondaryZygotePreload took to complete: 813ms行  6362: 05-08 18:46:58.748  1504  1969 D SystemServerInitThreadPool: Finished executing SecondaryZygotePreload行  6364: 05-08 18:46:58.787  1504  1504 I SystemServer: Making services ready行  6365: 05-08 18:46:58.787  1504  1504 I SystemServer: StartActivityManagerReadyPhase行  6526: 05-08 18:46:58.978  1504  1504 D SystemServerTiming: StartActivityManagerReadyPhase took to complete: 191ms行  6527: 05-08 18:46:58.978  1504  1504 I SystemServer: StartObservingNativeCrashes行  6528: 05-08 18:46:58.979  1504  1504 D SystemServerTiming: StartObservingNativeCrashes took to complete: 0ms行  6532: 05-08 18:46:58.979  1504  1504 I SystemServer: StartSystemUI行  6533: 05-08 18:46:58.979  1504  1970 D SystemServerInitThreadPool: Started executing WebViewFactoryPreparation行  6534: 05-08 18:46:58.979  1504  1970 I SystemServer: WebViewFactoryPreparation行  6548: 05-08 18:46:58.992  1504  1970 D SystemServerTimingAsync: WebViewFactoryPreparation took to complete: 14ms行  6549: 05-08 18:46:58.992  1504  1970 D SystemServerInitThreadPool: Finished executing WebViewFactoryPreparation行  6557: 05-08 18:46:58.993  1504  1504 D SystemServerTiming: StartSystemUI took to complete: 15ms行  6558: 05-08 18:46:58.993  1504  1504 I SystemServer: MakeNetworkManagementServiceReady行  6561: 05-08 18:46:58.999  1504  1504 D SystemServerTiming: MakeNetworkManagementServiceReady took to complete: 5ms行  6562: 05-08 18:46:58.999  1504  1504 I SystemServer: MakeIpSecServiceReady行  6566: 05-08 18:46:59.000  1504  1504 D SystemServerTiming: MakeIpSecServiceReady took to complete: 1ms行  6567: 05-08 18:46:59.000  1504  1504 I SystemServer: MakeNetworkStatsServiceReady行  6582: 05-08 18:46:59.028  1504  1504 D SystemServerTiming: MakeNetworkStatsServiceReady took to complete: 29ms行  6583: 05-08 18:46:59.028  1504  1504 I SystemServer: MakeConnectivityServiceReady行  6600: 05-08 18:46:59.040  1504  1504 D SystemServerTiming: MakeConnectivityServiceReady took to complete: 11ms行  6601: 05-08 18:46:59.040  1504  1504 I SystemServer: MakeNetworkPolicyServiceReady行  6602: 05-08 18:46:59.041  1504  1504 D SystemServerTiming: MakeNetworkPolicyServiceReady took to complete: 0ms行  6603: 05-08 18:46:59.041  1504  1504 I SystemServer: PhaseThirdPartyAppsCanStart行  6652: 05-08 18:46:59.093  1504  1504 D SystemServerTiming: PhaseThirdPartyAppsCanStart took to complete: 53ms行  6653: 05-08 18:46:59.094  1504  1504 I SystemServer: StartNetworkStack行  6662: 05-08 18:46:59.099  1504  1504 D SystemServerTiming: StartNetworkStack took to complete: 5ms行  6663: 05-08 18:46:59.099  1504  1504 I SystemServer: MakeLocationServiceReady行  6714: 05-08 18:46:59.131  1504  1504 D SystemServerTiming: MakeLocationServiceReady took to complete: 32ms行  6715: 05-08 18:46:59.131  1504  1504 I SystemServer: MakeCountryDetectionServiceReady行  6717: 05-08 18:46:59.131  1504  1504 D SystemServerTiming: MakeCountryDetectionServiceReady took to complete: 0ms行  6719: 05-08 18:46:59.132  1504  1504 I SystemServer: MakeNetworkTimeUpdateReady行  6727: 05-08 18:46:59.134  1504  1504 D SystemServerTiming: MakeNetworkTimeUpdateReady took to complete: 3ms行  6729: 05-08 18:46:59.135  1504  1504 I SystemServer: MakeInputManagerServiceReady行  6733: 05-08 18:46:59.136  1504  1504 D SystemServerTiming: MakeInputManagerServiceReady took to complete: 1ms行  6734: 05-08 18:46:59.136  1504  1504 I SystemServer: MakeTelephonyRegistryReady行  6738: 05-08 18:46:59.137  1504  1504 D SystemServerTiming: MakeTelephonyRegistryReady took to complete: 1ms行  6740: 05-08 18:46:59.137  1504  1504 I SystemServer: MakeMediaRouterServiceReady行  6742: 05-08 18:46:59.137  1504  1504 D SystemServerTiming: MakeMediaRouterServiceReady took to complete: 0ms行  6743: 05-08 18:46:59.137  1504  1504 I SystemServer: MakeMmsServiceReady行  6746: 05-08 18:46:59.138  1504  1504 D SystemServerTiming: MakeMmsServiceReady took to complete: 0ms行  6747: 05-08 18:46:59.139  1504  1504 I SystemServer: IncidentDaemonReady行  6754: 05-08 18:46:59.142  1504  1504 D SystemServerTiming: IncidentDaemonReady took to complete: 4ms行  7016: 05-08 18:46:59.381  1504  1504 D SystemServerTiming: ActivityManagerStartApps took to complete: 238ms行  7017: 05-08 18:46:59.381  1504  1504 D SystemServerTiming: PhaseActivityManagerReady took to complete: 674ms行  7027: 05-08 18:46:59.383  1504  1504 D SystemServerInitThreadPool: Shutdown successful行  7029: 05-08 18:46:59.383  1504  1504 D SystemServerTiming: StartServices took to complete: 4751ms行 13520: 05-08 18:47:03.030  1504  1648 D SystemServerTiming: SystemUserUnlock took to complete: 945ms

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/20302.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

CANDela studio基础使用

ECU Information 可以修改ECU的名称 里面有个Supported Interfaces&#xff0c;可以在CDDT里面选择支持的通讯接口 可以在tools下面新建internface&#xff0c;也可以从其他CDDT文件里面复制过来&#xff0c;复制的时候注意要另外将里面的参数再复制一次。 也可以在这里点击新…

倪师哲学。能让我好,我就接受

还有有些人更搞笑的是&#xff0c;把自己的行为啊&#xff0c;建立在别人的基础之上&#xff0c;如果那个人么样对我&#xff0c;我肯定能怎么样对这个人。 生而为人呐&#xff0c;你是一个独立的人&#xff0c;不要去总是拿着各种各样的前提&#xff0c;来限制了自己个人的成长…

打造你的专属Vue组件:超实用“手机号、邮箱、身份证号加密显示组件“实战

随着Web应用程序的发展&#xff0c;我们经常需要处理用户敏感信息&#xff0c;如手机号码和身份证号码。为了保护用户隐私&#xff0c;我们需要在前端对这些信息进行加密处理&#xff0c;以避免直接暴露在页面上。在这篇博客中&#xff0c;我们将介绍如何使用Vue 3.0单文件组件…

CATO原理中的数学与魔术(十一)——Parity Principle及其应用二:集合的可视化...

早点关注我&#xff0c;精彩不错过&#xff01; 上篇文章中&#xff0c;我们已经进入了CATO原理魔术介绍的深水区&#xff0c;是第3个系列Parity Principle中集合性质的章节&#xff0c;聊到了关于张数和求和集合性质&#xff0c;并对性质之间的偏序关系&#xff0c;性质之间的…

three.js官方案例(animation / keyframes)webgl_animation_keyframes.html学习

目录 ​编辑 1 PMREMenerator 1.1 构造函数 1.2 fromScene方法 2 AnimationMixer 3 animal1.html全部 4 animal1.js全部 1 PMREMenerator 此类生成预过滤的 Mipmapped 辐射环境贴图 &#xff08;PMREM&#xff09; 来自 cubeMap 环境纹理。这允许不同的级别 的模糊&…

桶形畸变和枕形畸变

桶形畸变和枕形畸变是两种常见的光学畸变现象&#xff0c;主要发生在使用广角镜头或远摄镜头拍摄时。这些畸变是因为镜头的光学特性不能完美地将光线汇聚到一个共同的焦点上&#xff0c;导致图像的不同部分在形状上发生扭曲。下面分别对这两种畸变进行详细描述&#xff1a; 桶…

快手万合通脚本,磁力广告挂机变现项目,号称单窗口日收益10+(教程+软件)

在这个项目中&#xff0c;我们采用一种简便的方法来获取额外收入。比如&#xff1a; 1. 主账号准备&#xff1a;首先&#xff0c;确保拥有一个已开通磁力万合功能的快手主账号。账号需拥有至少一万粉丝&#xff0c;以确保广告收益。 2. 创建快手小号&#xff1a;无需粉丝基础…

每日一题《leetcode--LCR 021.删除链表的倒数第N个结点》

https://leetcode.cn/problems/SLwz0R/ 这道题我们可以设一个哨兵位&#xff0c;然后把要遍历链表的结点指向该哨兵位。最后用for循环将指针指向要删除结点的前一个。 struct ListNode* removeNthFromEnd(struct ListNode* head, int n){struct ListNode* dummy malloc(sizeof…

什么是成就动机?如何判断人的成就动机?

什么是成就动机&#xff1f; 成就动机指的是一个人追求成就的心理&#xff0c;对成就&#xff08;成绩&#xff0c;目标&#xff09;的渴望心理&#xff0c;成就动机促进我们实现个人价值&#xff0c;完成工作当中的任务&#xff0c;始终被成就动机驱使的人往往懂得吃苦耐劳&a…

通过强化学习策略进行特征选择

特征选择是构建机器学习模型过程中的决定性步骤。为模型和我们想要完成的任务选择好的特征&#xff0c;可以提高性能。 如果我们处理的是高维数据集&#xff0c;那么选择特征就显得尤为重要。它使模型能够更快更好地学习。我们的想法是找到最优数量的特征和最有意义的特征。 …

wampserver安装与汉化

wampserver安装与汉化 文章目录 wampserver安装与汉化一、安装二、汉化1.升级软件并安装补丁 介绍&#xff1a; WampServer是一款由法国人开发的Apache Web服务器、PHP解释器以及MySQL数据库的整合软件包。免去了开发人员将时间花费在繁琐的配置环境过程&#xff0c;从而腾出更…

每日一题——Python实现PAT甲级1042 Shuffling Machine(举一反三+思想解读+逐步优化)

一个认为一切根源都是“自己不够强”的INTJ 个人主页&#xff1a;用哲学编程-CSDN博客专栏&#xff1a;每日一题——举一反三Python编程学习Python内置函数 Python-3.12.0文档解读 目录 我的写法 功能分析 时间复杂度 空间复杂度 总结 代码点评 我要更强 优化方向 …

stm32F4的时钟树

时钟其实就是单片机的心脏。首先我们的高速外部时钟&#xff08;HES&#xff09;&#xff0c;看名字就可知道外部高速时钟是由外部所提供的其是高速的&#xff0c;其具体可以是有源晶振或者无源晶振所提供的时钟。而在时钟树图中我们从OSC_IN、OSC_OUT进入&#xff0c;然后经过…

【项目管理知识】项目质量管理措施

1、持续改进&#xff08;PDCA&#xff09; 戴明循环或称PDCA循环、PDSA循环。戴明循环的研究起源于20世纪20年代&#xff0c;先是有着“统计质量控制之父”之称的著名的统计学家沃特阿曼德休哈特&#xff08;Walter A. Shewhart&#xff09;在当时引入了“计划-执行-检查&…

低代码平台:教育机构数字化转型的技术新引擎

在数字化浪潮汹涌而来的今天&#xff0c;教育行业正迎来前所未有的变革。随着技术的不断进步和教育理念的更新&#xff0c;越来越多的教育机构开始意识到数字化转型的重要性。而在这场转型的浪潮中&#xff0c;低代码平台以其独特的优势&#xff0c;正成为教育机构实现数字化转…

7-13 字节解析(parse_byte)--PTA实验C++

一、题目描述 字节有几位都没个标准&#xff0c;古代程序员过的什么日子啊&#xff1f;还好现在字节统一成8位了。 鉴于我对C已有相当牢固的基础&#xff0c;可以探索底层开发了&#xff0c;先做个解析十六进制字节数据的功能吧。 输入规格 每项待读入的字节数据由两个非空白…

virtualbox识别windows上usb设备

当你插入 USB 时&#xff0c;你的宿主操作系统可以轻松访问它并使用其中的文件。如果需要VirtualBox 的虚拟机也能访问物理机的 USB设备&#xff0c;需要安装安装扩展包管理器。 第一步&#xff1a; 要安装 VirtualBox 扩展包&#xff0c;只需访问 VirtualBox 官方下载页面&a…

骨传导耳机哪一款比较值得入手?年度精选好用骨传导耳机推荐

现在很多年轻人都会选择用骨传导耳机&#xff0c;因为骨传导耳机更加方便&#xff0c;不用入耳&#xff0c;不会伤害到耳朵&#xff0c;对耳膜也没有什么伤害。同时&#xff0c;因为骨传导耳机的结构也比较简单&#xff0c;所以佩戴也会更加舒适。接下来就给大家推荐几款口碑不…

LabVIEW老程序功能升级:重写还是改进?

概述&#xff1a;面对LabVIEW老程序的功能升级&#xff0c;开发者常常面临重写与改进之间的选择。本文从多个角度分析两种方法的利弊&#xff0c;并提供评估方法和解决思路。 重写&#xff08;重新开发&#xff09;的优势和劣势&#xff1a; 优势&#xff1a; 代码清晰度高&a…

面试二十七、 CAS和Atomic

CAS锁机制&#xff08;无锁、自旋锁、乐观锁、轻量级锁&#xff09;-CSDN博客 1. ABA问题 在C中&#xff0c;可以使用std::atomic和版本号来解决ABA问题。C标准库没有直接提供类似Java的AtomicStampedReference&#xff0c;但可以通过将版本号和指针组合在一起实现类似的效果。…