如何得知 kernel 或 android 已開機多久時間

adb shell cat /proc/uptime 中的第一個數字,

adb shell cat "/proc/uptime"
210.79 312.76

或者是

kernel

struct timespec uptime;
get_monotonic_boottime(&uptime);
((unsigned long) uptime.tv_sec

猜你喜欢

转载自www.cnblogs.com/youchihwang/p/9225999.html