精华内容
参与话题
问答
  • Doze模式adb shell命令集

    千次阅读 2017-11-20 15:38:14
    一、adb 指令1.1 让设备进入未连接充电的模式进行doze模式命令模拟的话,需要先下发该命令,因为只要存在充电状态,是无法从Acitve状态切换到InActive状态的adb shell dumpsys battery unplugZ90:/ # dumpsys ...

    一、adb 指令

    1.1 让设备进入未连接充电的模式

    进行doze模式命令模拟的话,需要先下发该命令,因为只要存在充电状态,是无法从Acitve状态切换到InActive状态的

    adb shell dumpsys battery unplug

    Z90:/ # dumpsys battery unplug
    dumpsys battery unplug

    1.2 退出Doze模式,让手机恢复正常需要复位充电模式

    不使用doze命令模拟的时候,记得退出这个模式,不然电池电量状态可能不更新哦

    adb shell dumpsys battery reset

    Z90:/ # dumpsys battery reset
    dumpsys battery reset

    1.3 Doze Help 命令查询

    adb shell dumpsys deviceidle -h

    Z90:/ # dumpsys deviceidle -h
    dumpsys deviceidle -h
    
    Device idle controller (deviceidle) commands:
      help
        Print this help text.
      step [light|deep]
        Immediately step to next state, without waiting for alarm.
      force-idle [light|deep]
        Force directly into idle mode, regardless of other device state.
      force-inactive
        Force to be inactive, ready to freely step idle states.
      unforce
        Resume normal functioning after force-idle or force-inactive.
      get [light|deep|force|screen|charging|network]
        Retrieve the current given state.
      disable [light|deep|all]
        Completely disable device idle mode.
      enable [light|deep|all]
        Re-enable device idle mode after it had previously been disabled.
      enabled [light|deep|all]
        Print 1 if device idle mode is currently enabled, else 0.
      whitelist
        Print currently whitelisted apps.
      whitelist [package ...]
        Add (prefix with +) or remove (prefix with -) packages.
      tempwhitelist
        Print packages that are temporarily whitelisted.
      tempwhitelist [-u] [package ..]
        Temporarily place packages in whitelist for 10 seconds.
    

    二、adb 指令 实操如下

    Z90:/ # dumpsys deviceidle step light
    dumpsys deviceidle step light
    Stepped to light: IDLE_MAINTENANCE
    
    Z90:/ # dumpsys deviceidle step deep
    dumpsys deviceidle step deep
    Stepped to deep: IDLE_PENDING
    
    Z90:/ # dumpsys deviceidle force-idle light
    dumpsys deviceidle force-idle light
    Now forced in to light idle mode
    
    Z90:/ # dumpsys deviceidle force-idle deep
    dumpsys deviceidle force-idle deep
    Now forced in to deep idle mode
    
    Z90:/ # dumpsys deviceidle force-inactive
    dumpsys deviceidle force-inactive
    Light state: OVERRIDE, deep state: IDLE
    
    Z90:/ # dumpsys deviceidle unforce
    dumpsys deviceidle unforce
    Light state: OVERRIDE, deep state: IDLE
    
    Z90:/ # dumpsys deviceidle get light
    dumpsys deviceidle get light
    OVERRIDE
    Z90:/ # dumpsys deviceidle get deep
    dumpsys deviceidle get deep
    IDLE
    
    Z90:/ # dumpsys deviceidle get force
    dumpsys deviceidle get force
    false
    
    Z90:/ # dumpsys deviceidle get screen
    dumpsys deviceidle get screen
    false
    
    Z90:/ # dumpsys deviceidle get charging
    dumpsys deviceidle get charging
    false
    
    Z90:/ # dumpsys deviceidle get network
    dumpsys deviceidle get network
    true
    
    Z90:/ # dumpsys deviceidle disable light
    dumpsys deviceidle disable light
    Light idle mode disabled
    
    Z90:/ # dumpsys deviceidle disable deep
    dumpsys deviceidle disable deep
    Deep idle mode disabled
    
    Z90:/ # dumpsys deviceidle disable all
    dumpsys deviceidle disable all
    
    Z90:/ # dumpsys deviceidle enable light
    dumpsys deviceidle enable light
    Light idle mode enable
    Z90:/ # dumpsys deviceidle enable deep
    dumpsys deviceidle enable deep
    Deep idle mode enabled
    Z90:/ # dumpsys deviceidle enable all
    dumpsys deviceidle enable all
    
    Z90:/ # dumpsys deviceidle whitelist
    dumpsys deviceidle whitelist
    system-excidle,com.android.providers.downloads,10001
    system-excidle,com.android.vending,10023
    system-excidle,com.google.android.gms,10014
    system,com.android.providers.downloads,10001
    system,com.google.android.gms,10014
    user,com.tencent.mm,10108
    user,com.vapp.aide.intl.arm64,10068
    user,com.google.android.gsf,10014
    user,com.tencent.mobileqq,10110
    user,com.facebook.katana,10092
    user,com.vapp.aide.intl,10025
    user,com.bsb.hike,10088
    
    
    Z90:/ # dumpsys deviceidle tempwhitelist
    dumpsys deviceidle tempwhitelist

    三、具体源码

    状态切换可以参考

    http://blog.csdn.net/su749520/article/details/78570613

    例如看状态切换

    C:\Users\fadi.su>adb shell dumpsys battery unplug
    
    C:\Users\fadi.su>adb shell dumpsys deviceidle step deep
    Stepped to deep: IDLE_PENDING
    
    C:\Users\fadi.su>adb shell dumpsys deviceidle step deep
    Stepped to deep: SENSING
    
    C:\Users\fadi.su>adb shell dumpsys deviceidle step deep
    Stepped to deep: LOCATING
    
    C:\Users\fadi.su>adb shell dumpsys deviceidle step deep
    Stepped to deep: IDLE
    
    C:\Users\fadi.su>adb shell dumpsys deviceidle step deep
    Stepped to deep: IDLE_MAINTENANCE
    
    C:\Users\fadi.su>adb shell dumpsys deviceidle step deep
    Stepped to deep: IDLE
    
    C:\Users\fadi.su>adb shell dumpsys deviceidle get deep
    IDLE
    package com.android.server;
    
    
    /**
     * Keeps track of device idleness and drives low power mode based on that.
     */
    public class DeviceIdleController extends SystemService
            implements AnyMotionDetector.DeviceIdleCallback {
    
        int onShellCommand(Shell shell, String cmd) {
            PrintWriter pw = shell.getOutPrintWriter();
            if ("step".equals(cmd)) {
                getContext().enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER,
                        null);
                synchronized (this) {
                    long token = Binder.clearCallingIdentity();
                    String arg = shell.getNextArg();
                    try {
                        if (arg == null || "deep".equals(arg)) {
                            stepIdleStateLocked("s:shell");
                            pw.print("Stepped to deep: ");
                            pw.println(stateToString(mState));
                        } else if ("light".equals(arg)) {
                            stepLightIdleStateLocked("s:shell");
                            pw.print("Stepped to light: "); pw.println(lightStateToString(mLightState));
                        } else {
                            pw.println("Unknown idle mode: " + arg);
                        }
                    } finally {
                        Binder.restoreCallingIdentity(token);
                    }
                }
            } else if ("force-idle".equals(cmd)) {
                getContext().enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER,
                        null);
                synchronized (this) {
                    long token = Binder.clearCallingIdentity();
                    String arg = shell.getNextArg();
                    try {
                        if (arg == null || "deep".equals(arg)) {
                            if (!mDeepEnabled) {
                                pw.println("Unable to go deep idle; not enabled");
                                return -1;
                            }
                            mForceIdle = true;
                            becomeInactiveIfAppropriateLocked();
                            int curState = mState;
                            while (curState != STATE_IDLE) {
                                stepIdleStateLocked("s:shell");
                                if (curState == mState) {
                                    pw.print("Unable to go deep idle; stopped at ");
                                    pw.println(stateToString(mState));
                                    exitForceIdleLocked();
                                    return -1;
                                }
                                curState = mState;
                            }
                            pw.println("Now forced in to deep idle mode");
                        } else if ("light".equals(arg)) {
                            mForceIdle = true;
                            becomeInactiveIfAppropriateLocked();
                            int curLightState = mLightState;
                            while (curLightState != LIGHT_STATE_IDLE) {
                                stepIdleStateLocked("s:shell");
                                if (curLightState == mLightState) {
                                    pw.print("Unable to go light idle; stopped at ");
                                    pw.println(lightStateToString(mLightState));
                                    exitForceIdleLocked();
                                    return -1;
                                }
                                curLightState = mLightState;
                            }
                            pw.println("Now forced in to light idle mode");
                        } else {
                            pw.println("Unknown idle mode: " + arg);
                        }
                    } finally {
                        Binder.restoreCallingIdentity(token);
                    }
                }
            } else if ("force-inactive".equals(cmd)) {
                getContext().enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER,
                        null);
                synchronized (this) {
                    long token = Binder.clearCallingIdentity();
                    try {
                        mForceIdle = true;
                        becomeInactiveIfAppropriateLocked();
                        pw.print("Light state: ");
                        pw.print(lightStateToString(mLightState));
                        pw.print(", deep state: ");
                        pw.println(stateToString(mState));
                    } finally {
                        Binder.restoreCallingIdentity(token);
                    }
                }
            } else if ("unforce".equals(cmd)) {
                getContext().enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER,
                        null);
                synchronized (this) {
                    long token = Binder.clearCallingIdentity();
                    try {
                        exitForceIdleLocked();
                        pw.print("Light state: ");
                        pw.print(lightStateToString(mLightState));
                        pw.print(", deep state: ");
                        pw.println(stateToString(mState));
                    } finally {
                        Binder.restoreCallingIdentity(token);
                    }
                }
            } else if ("get".equals(cmd)) {
                getContext().enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER,
                        null);
                synchronized (this) {
                    String arg = shell.getNextArg();
                    if (arg != null) {
                        long token = Binder.clearCallingIdentity();
                        try {
                            switch (arg) {
                                case "light": pw.println(lightStateToString(mLightState)); break;
                                case "deep": pw.println(stateToString(mState)); break;
                                case "force": pw.println(mForceIdle); break;
                                case "screen": pw.println(mScreenOn); break;
                                case "charging": pw.println(mCharging); break;
                                case "network": pw.println(mNetworkConnected); break;
                                default: pw.println("Unknown get option: " + arg); break;
                            }
                        } finally {
                            Binder.restoreCallingIdentity(token);
                        }
                    } else {
                        pw.println("Argument required");
                    }
                }
            } else if ("disable".equals(cmd)) {
                getContext().enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER,
                        null);
                synchronized (this) {
                    long token = Binder.clearCallingIdentity();
                    String arg = shell.getNextArg();
                    try {
                        boolean becomeActive = false;
                        boolean valid = false;
                        if (arg == null || "deep".equals(arg) || "all".equals(arg)) {
                            valid = true;
                            if (mDeepEnabled) {
                                mDeepEnabled = false;
                                becomeActive = true;
                                pw.println("Deep idle mode disabled");
                            }
                        }
                        if (arg == null || "light".equals(arg) || "all".equals(arg)) {
                            valid = true;
                            if (mLightEnabled) {
                                mLightEnabled = false;
                                becomeActive = true;
                                pw.println("Light idle mode disabled");
                            }
                        }
                        if (becomeActive) {
                            becomeActiveLocked((arg == null ? "all" : arg) + "-disabled",
                                    Process.myUid());
                        }
                        if (!valid) {
                            pw.println("Unknown idle mode: " + arg);
                        }
                    } finally {
                        Binder.restoreCallingIdentity(token);
                    }
                }
            } else if ("enable".equals(cmd)) {
                getContext().enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER,
                        null);
                synchronized (this) {
                    long token = Binder.clearCallingIdentity();
                    String arg = shell.getNextArg();
                    try {
                        boolean becomeInactive = false;
                        boolean valid = false;
                        if (arg == null || "deep".equals(arg) || "all".equals(arg)) {
                            valid = true;
                            if (!mDeepEnabled) {
                                mDeepEnabled = true;
                                becomeInactive = true;
                                pw.println("Deep idle mode enabled");
                            }
                        }
                        if (arg == null || "light".equals(arg) || "all".equals(arg)) {
                            valid = true;
                            if (!mLightEnabled) {
                                mLightEnabled = true;
                                becomeInactive = true;
                                pw.println("Light idle mode enable");
                            }
                        }
                        if (becomeInactive) {
                            becomeInactiveIfAppropriateLocked();
                        }
                        if (!valid) {
                            pw.println("Unknown idle mode: " + arg);
                        }
                    } finally {
                        Binder.restoreCallingIdentity(token);
                    }
                }
            } else if ("enabled".equals(cmd)) {
                synchronized (this) {
                    String arg = shell.getNextArg();
                    if (arg == null || "all".equals(arg)) {
                        pw.println(mDeepEnabled && mLightEnabled ? "1" : 0);
                    } else if ("deep".equals(arg)) {
                        pw.println(mDeepEnabled ? "1" : 0);
                    } else if ("light".equals(arg)) {
                        pw.println(mLightEnabled ? "1" : 0);
                    } else {
                        pw.println("Unknown idle mode: " + arg);
                    }
                }
            } else if ("whitelist".equals(cmd)) {
                String arg = shell.getNextArg();
                if (arg != null) {
                    getContext().enforceCallingOrSelfPermission(
                            android.Manifest.permission.DEVICE_POWER, null);
                    long token = Binder.clearCallingIdentity();
                    try {
                        do {
                            if (arg.length() < 1 || (arg.charAt(0) != '-'
                                    && arg.charAt(0) != '+' && arg.charAt(0) != '=')) {
                                pw.println("Package must be prefixed with +, -, or =: " + arg);
                                return -1;
                            }
                            char op = arg.charAt(0);
                            String pkg = arg.substring(1);
                            if (op == '+') {
                                if (addPowerSaveWhitelistAppInternal(pkg)) {
                                    pw.println("Added: " + pkg);
                                } else {
                                    pw.println("Unknown package: " + pkg);
                                }
                            } else if (op == '-') {
                                if (removePowerSaveWhitelistAppInternal(pkg)) {
                                    pw.println("Removed: " + pkg);
                                }
                            } else {
                                pw.println(getPowerSaveWhitelistAppInternal(pkg));
                            }
                        } while ((arg=shell.getNextArg()) != null);
                    } finally {
                        Binder.restoreCallingIdentity(token);
                    }
                } else {
                    synchronized (this) {
                        for (int j=0; j<mPowerSaveWhitelistAppsExceptIdle.size(); j++) {
                            pw.print("system-excidle,");
                            pw.print(mPowerSaveWhitelistAppsExceptIdle.keyAt(j));
                            pw.print(",");
                            pw.println(mPowerSaveWhitelistAppsExceptIdle.valueAt(j));
                        }
                        for (int j=0; j<mPowerSaveWhitelistApps.size(); j++) {
                            pw.print("system,");
                            pw.print(mPowerSaveWhitelistApps.keyAt(j));
                            pw.print(",");
                            pw.println(mPowerSaveWhitelistApps.valueAt(j));
                        }
                        for (int j=0; j<mPowerSaveWhitelistUserApps.size(); j++) {
                            pw.print("user,");
                            pw.print(mPowerSaveWhitelistUserApps.keyAt(j));
                            pw.print(",");
                            pw.println(mPowerSaveWhitelistUserApps.valueAt(j));
                        }
                    }
                }
            } else if ("tempwhitelist".equals(cmd)) {
                long duration = 10000;
                String opt;
                while ((opt=shell.getNextOption()) != null) {
                    if ("-u".equals(opt)) {
                        opt = shell.getNextArg();
                        if (opt == null) {
                            pw.println("-u requires a user number");
                            return -1;
                        }
                        shell.userId = Integer.parseInt(opt);
                    } else if ("-d".equals(opt)) {
                        opt = shell.getNextArg();
                        if (opt == null) {
                            pw.println("-d requires a duration");
                            return -1;
                        }
                        duration = Long.parseLong(opt);
                    }
                }
                String arg = shell.getNextArg();
                if (arg != null) {
                    try {
                        addPowerSaveTempWhitelistAppChecked(arg, duration, shell.userId, "shell");
                    } catch (Exception e) {
                        pw.println("Failed: " + e);
                        return -1;
                    }
                } else {
                    dumpTempWhitelistSchedule(pw, false);
                }
            } else if ("except-idle-whitelist".equals(cmd)) {
                getContext().enforceCallingOrSelfPermission(
                        android.Manifest.permission.DEVICE_POWER, null);
                final long token = Binder.clearCallingIdentity();
                try {
                    String arg = shell.getNextArg();
                    if (arg == null) {
                        pw.println("No arguments given");
                        return -1;
                    } else if ("reset".equals(arg)) {
                        resetPowerSaveWhitelistExceptIdleInternal();
                    } else {
                        do {
                            if (arg.length() < 1 || (arg.charAt(0) != '-'
                                    && arg.charAt(0) != '+' && arg.charAt(0) != '=')) {
                                pw.println("Package must be prefixed with +, -, or =: " + arg);
                                return -1;
                            }
                            char op = arg.charAt(0);
                            String pkg = arg.substring(1);
                            if (op == '+') {
                                if (addPowerSaveWhitelistExceptIdleInternal(pkg)) {
                                    pw.println("Added: " + pkg);
                                } else {
                                    pw.println("Unknown package: " + pkg);
                                }
                            } else if (op == '=') {
                                pw.println(getPowerSaveWhitelistExceptIdleInternal(pkg));
                            } else {
                                pw.println("Unknown argument: " + arg);
                                return -1;
                            }
                        } while ((arg = shell.getNextArg()) != null);
                    }
                } finally {
                    Binder.restoreCallingIdentity(token);
                }
            } else {
                return shell.handleDefaultCommands(cmd);
            }
            return 0;
        }
    展开全文
  • Android Doze模式调试

    千次阅读 2017-05-02 15:48:39
    Android 6.0开始,Android提供两种延长电池寿命的功能 doze和 App Standby。在没有充电的情况下,当用户一段时间没有使用手机的时候,Doze模式通过延缓app后台的CPU和网络活动减少电量的消耗。...先执行 adb shell du

    Android 6.0开始,Android提供两种延长电池寿命的功能 doze和 App Standby。在没有充电的情况下,当用户一段时间没有使用手机的时候,Doze模式通过延缓app后台的CPU和网络活动减少电量的消耗。App Stanbdy延缓用户最近没有使用app的后台网络活动。

    今天主要检测下手机进入Doze模式之后App的状态。


    先执行 adb shell dumpsys battery unplug 

    命令主要作用模拟手机为未冲充电状态,可以通过  

    adb shell dumpsys battery 

    可以看到 AC powered 和 USB powered 值为false ,说明模拟成功。

    然后执行  adb shell dumpsys deviceidle enable 将idle 置为enable状态

    随后通过几步的adb shell dumpsys deviceidle step 进入 IDLE状态

    也可以通过 adb shell dumpsys deviceidle force-idle 直接进入IDLE状态,即可测试在Doze下app的行为。


    最后退出

     adb shell dumpsys deviceidle disable 

     adb shell dumpsys battery reset

    状态复原。

    展开全文
  • Doze & App Standby

    2018-12-20 17:54:05
    Doze模式的启用和恢复 adb shell dumpsys battery:获取电池当前状态 模拟未充电状态: adb shell dumpsys battery unplug:模拟手机未充电状态 IDLE有效化: adb shell dumpsys deviceidle enable:让IDLE有效...

    Doze模式的启用和恢复

    adb shell dumpsys battery:获取电池当前状态

    1. 模拟未充电状态:

    adb shell dumpsys battery unplug:模拟手机未充电状态

    1. IDLE有效化:

    adb shell dumpsys deviceidle enable:让IDLE有效化;

    1. 进入IDLE模式:

    有两种方法。

    第一种是,屏幕亮着状态按下电源按钮关闭屏幕,敲入命令让其进入IDLE模式。

    (注意:我们在切换状态的时候要重复输入几次命令,直到进入IDLE模式。)

    第二种是,敲入命令强制让手机进入IDLE模式。

    敲入命令 adb shell dumpsys deviceidle force-idle

    敲入命令 adb shell dumpsys deviceidle

    1. 恢复手机状态

    当我们模拟完状态之后要恢复回去,以便手机能够正常使用。

    敲入命令 adb shell dumpsys deviceidle disable 和 adb shell dumpsys battery reset 即可让手机恢复状态。再敲入 adb shell dumpsys battery 查看一下手机是否已经恢复状态。

     

    展开全文
  • 模拟Doze模式进行调试

    2018-12-25 15:31:20
    Doze是Android6.0推出的一种省电模式,手机在不插电并静置不动一段时间后,会进入IDLE状态,在这个状态下会阻止应用访问网络,并且会推迟Amarm、Job、Syn等操作。 为了方便调试应用在IDLE状态下的表现,可以通过adb...

    Doze是Android6.0推出的一种省电模式,手机在不插电并静置不动一段时间后,会进入IDLE状态,在这个状态下会阻止应用访问网络,并且会推迟Amarm、Job、Syn等操作。

    为了方便调试应用在IDLE状态下的表现,可以通过adb命令使设备快速进入IDLE状态。

    • 进入IDLE状态
    #让设备电池进入未连接充电器的模式
    adb shell dumpsys battery unplug
    #使IDLE有效化
    adb shell dumpsys deviceidle enable
    #模拟Doze模式下的几个阶段,多执行几次直到进入IDLE,如果一直处于ACTIVE状态则需要把手机锁屏再执行
    adb shell dumpsys deviceidle step
    
    • 查看当前状态
    #查看当前状态,其中的mState表示当前状态,白名单也可以在这里的whitelist项下查看
    adb shell dumpsys deviceidle
    
    • 恢复手机状态
    #禁用IDLE状态
    adb shell dumpsys deviceidle disable
    #重置手机电池状态
    adb shell dumpsys battery reset
    
    展开全文
  • Android 设备强制进入full doze方法

    千次阅读 2018-03-14 09:52:53
    记录:先用 adb shell dumpsys battery 这段命令查看一下手机当前的状态敲入命令 adb shell dumpsys battery unplug 模拟手机未充电状态敲...强制进入full doze:敲入命令 adb shell dumpsys deviceidle force-id...
  • 测试Doze模式 1. 首先确保你的硬件或虚拟设备是Android6.0或更高版本系统; 2. 连接设备到开发机上并安装你的app; 3. 运行app并让其运行活动; 4. 关闭设备的屏幕; 5. 运行以下adb命令使系统进入Doze模式...
  • Android Doze模式使用命令启用和恢复

    千次阅读 2017-11-06 14:29:29
    1,用 adb shell dumpsys battery 这段命令查看一下手机当前的状态; --->USB powered:true 2,用adb shell dumpsys battery unplug 模拟手机未充电状态; 再敲入(1.)的命令可以看到 --->USB powered:false 3,用...
  • 1. 模拟进入 Doze 模式 设置未充电状态 adb shell dumpsys battery unplug 设置强制进入深度deep模块 adb shell dumpsys deviceidle force-idle deep 设置开启 alarm 日志 adb shell dumpsys ...
  • 1. adb 命令模拟进入doze模式 设置未充电状态 方便连接logcat查看实时日志...adb shell dumpsys battery unplug 设置开启 alarm 日志 并不是每台机器都开启 alarm 的日志,所以我们可以命令强制开启 adb ...
  • 安装6.0之后,防止应用进入DOZE状态,导致无法后台请求服务器,或者其他请求。 本人使用的是手机型号: NONKA 509; ROOT: 是 Android studio 版本: 4.3 使用cmd命令查询白名单 确保连接成功手机,adb不被系统干掉(我...
  • 通过 adb shell dumpsys deviceidle step [light|deep] 强行进入Doze模式。 退出Doze模式,让手机恢复正常需要复位充电模式: adb shell dumpsys battery reset。 方便测试状态栏电池状态...
  • Device set to doze (adb shell dumpsys deviceidle force-idle), push message, nothing. Un-doze with 'adb shell dumpsys deviceidle unforce' and .. ping .. here's the notification. Now - some...
  • Android功耗分析

    千次阅读 2018-05-10 13:44:06
    系统功耗跟踪 功耗分析 doze模式一直处于关闭状态 ...adb shell dumpsys batterystats --reset // 运行... adb bugreport bugreport.zip 导入Battery Historian分析 采集时间从前一天晚上十点到当天...
  • App Standby 学习小结

    千次阅读 2016-06-14 14:06:17
    在之前文档“doze模式介绍”的第10点中,我们知道使用adb命令强制使我们的应用进入standby模式,其实用app idle模式更为贴切。具体 命令如下: adbshelldumpsysbatteryunplug//先把电源连接设置为unplug adb shell ...
  • 列出kernel层wake lock 信息 进入adb shell cat /sys/power/wake_lock cat /sys/power/wake_unlock 列出已经release的信息。 列出ap层的wake lock 信息 adb shell dumpsys power ... DOZE_WAKE_LOCK ...
  • android Wake Lock

    2020-11-25 11:49:31
    列出kernel层wake lock 信息 adb shell cat /sys/power/wake_lock cat /sys/power/wake_unlock 列出已经release的信息。... DOZE_WAKE_LOCK 'DreamManagerService' ACQ=-2m38s738ms (uid=1000 pid=1533)

空空如也

1 2
收藏数 23
精华内容 9
关键字:

doze shell