【AndroidFramework】【EMMC拷机】混合拷机时盒子待机
【AndroidFramework】【EMMC拷机】混合拷机时盒子待机
问题结论
暂时确定为误按键,不是故障。问题关闭。后续完全保证无按键(物理隔离)情况下如果出现待机,请反馈。
问题描述
【EMMC拷机】混合拷机时盒子待机---新版本引入
EMMC:东芝THGBMFG6C1LBAIL 容量为8GB
【故障描述】
1,拷机10台,全部杀了遥控器,拷机播放13H后发现一台出现问题
2,混合拷机时盒子待机
分析详细
- grep确认事件现场
- 确认日志产生机制
- 确认盒子待机按钮
- 确认自动待机接口
- 确认测试部“杀遥控器”方法
- grep确认事件现场
拿到日志有53份,每份102400k,先放在服务器上,grep一下,结果如下:
wanghongzhu@ubuntu:~/temp/182.16.90.24_2019-06-17-17-17-58$ grep 'sleep' * -nir
Log_2019-06-17-17-17-58_53.log:467677:2019-06-17 21:00:29.344 I/PowerManagerService( 3246): Going to sleep due to power button (uid 1000)...
Log_2019-06-17-17-17-58_53.log:467683:2019-06-17 21:00:29.344 I/PowerManagerService( 3246): Sleeping (uid 1000)...
Log_2019-06-17-17-17-58_53.log:481099:2019-06-17 21:00:32.464 I/TV_Client.TagTv( 4374): [4585][playermgr.cpp (L7160)][StopallTVplay]:---[0]---iPlayerID[0];joinchannel is NOT running!exit Sleep!
wanghongzhu@ubuntu:~/temp/182.16.90.24_2019-06-17-17-17-58$ grep 'screen off' * -nir
Log_2019-06-17-17-17-58_53.log:467687:2019-06-17 21:00:29.344 I/DisplayPowerController( 3246): Blocking screen off
Log_2019-06-17-17-17-58_53.log:467689:2019-06-17 21:00:29.344 I/DisplayPowerController( 3246): Unblocked screen off after 1 ms
Log_2019-06-17-17-17-58_53.log:468063:2019-06-17 21:00:29.547 D/PowerManagerService-JNI( 3246): Excessive delay in setInteractive(false) while turning screen off
结果显示,待机只发生在最后一份日志,并且显示为power button,结果基本明晰。接下来,
1.确认框架代码,什么情况下会出现该打印(遥控器按到了?其他未知原因调用到了?)
2.是不是碰到盒子上‘待机按钮’引起的
3.是不是什么apk调用了自动待机的接口?
- 确认日志产生机制
代码路径/frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java
/frameworks/base/services/core/java/com/android/server/power$ cat PowerManagerService.java |grep -nir 'Going to sleep due to'
PowerManagerService.java:1407: Slog.i(TAG, "Going to sleep due to device administration policy "
PowerManagerService.java:1411: Slog.i(TAG, "Going to sleep due to screen timeout (uid " + uid +")...");
PowerManagerService.java:1414: Slog.i(TAG, "Going to sleep due to lid switch (uid " + uid +")...");
PowerManagerService.java:1417: Slog.i(TAG, "Going to sleep due to power button (uid " + uid +")...");
PowerManagerService.java:1420: Slog.i(TAG, "Going to sleep due to sleep button (uid " + uid +")...");
PowerManagerService.java:1423: Slog.i(TAG, "Going to sleep due to HDMI standby (uid " + uid +")...");
跳转到打印处,调用的方法,梳理逻辑。
// This method is called goToSleep for historical reasons but we actually start
// dozing before really going to sleep.
@SuppressWarnings("deprecation")
private boolean goToSleepNoUpdateLocked(long eventTime, int reason, int flags, int uid) {
if (DEBUG_SPEW) {
Slog.d(TAG, "goToSleepNoUpdateLocked: eventTime=" + eventTime
+ ", reason=" + reason + ", flags=" + flags + ", uid=" + uid);
}
if (eventTime < mLastWakeTime
|| mWakefulness == WAKEFULNESS_ASLEEP
|| mWakefulness == WAKEFULNESS_DOZING
|| !mBootCompleted || !mSystemReady) {
return false;
}
Trace.traceBegin(Trace.TRACE_TAG_POWER, "goToSleep");
try {
switch (reason) {
case PowerManager.GO_TO_SLEEP_REASON_DEVICE_ADMIN:
Slog.i(TAG, "Going to sleep due to device administration policy "
+ "(uid " + uid +")...");
break;
case PowerManager.GO_TO_SLEEP_REASON_TIMEOUT:
Slog.i(TAG, "Going to sleep due to screen timeout (uid " + uid +")...");
break;
case PowerManager.GO_TO_SLEEP_REASON_LID_SWITCH:
Slog.i(TAG, "Going to sleep due to lid switch (uid " + uid +")...");
break;
case PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON:
Slog.i(TAG, "Going to sleep due to power button (uid " + uid +")...");
break;
case PowerManager.GO_TO_SLEEP_REASON_SLEEP_BUTTON:
Slog.i(TAG, "Going to sleep due to sleep button (uid " + uid +")...");
break;
case PowerManager.GO_TO_SLEEP_REASON_HDMI:
Slog.i(TAG, "Going to sleep due to HDMI standby (uid " + uid +")...");
break;
case PowerManager.GO_TO_SLEEP_REASON_ACCESSIBILITY:
Slog.i(TAG, "Going to sleep by an accessibility service request (uid "
+ uid +")...");
break;
default:
Slog.i(TAG, "Going to sleep by application request (uid " + uid +")...");
reason = PowerManager.GO_TO_SLEEP_REASON_APPLICATION;
break;
}
mLastSleepTime = eventTime;
mSandmanSummoned = true;
setWakefulnessLocked(WAKEFULNESS_DOZING, reason);
// Report the number of wake locks that will be cleared by going to sleep.
int numWakeLocksCleared = 0;
final int numWakeLocks = mWakeLocks.size();
for (int i = 0; i < numWakeLocks; i++) {
final WakeLock wakeLock = mWakeLocks.get(i);
switch (wakeLock.mFlags & PowerManager.WAKE_LOCK_LEVEL_MASK) {
case PowerManager.FULL_WAKE_LOCK:
case PowerManager.SCREEN_BRIGHT_WAKE_LOCK:
case PowerManager.SCREEN_DIM_WAKE_LOCK:
numWakeLocksCleared += 1;
break;
}
}
EventLogTags.writePowerSleepRequested(numWakeLocksCleared);
// Skip dozing if requested.
if ((flags & PowerManager.GO_TO_SLEEP_FLAG_NO_DOZE) != 0) {
reallyGoToSleepNoUpdateLocked(eventTime, uid);
}
} finally {
Trace.traceEnd(Trace.TRACE_TAG_POWER);
}
return true;
}
由以上代码可见,待机是由于power按键。不是由于某些应用程序调用。
确认盒子待机按钮
经按键盒子上的power键,是走的真待机重启流程,无以上打印。- 确认自动待机接口
做实验:设置中修改自动待机,过段时间待机后看日志。
实验结论:自动待机调用的接口与power button不同,该问题不是由调用自动待机接口导致。
日志如下:
sdcard/111.log |grep -nir 'sleep' <
(standard input):451:01-01 03:20:50.225 D/SharedPreferencesLogger( 5198): Tried to log string preference MainSettings/sleepTime = 10800000
(standard input):492:01-01 03:21:00.542 V/SettingsProvider( 3120): Notifying for 0: content://settings/secure/sleep_timeout
(standard input):494:01-01 03:21:00.549 D/SharedPreferencesLogger( 5198): Tried to log string preference MainSettings/sleepTime = 1800000
(standard input):1434:01-01 03:51:00.538 I/PowerManagerService( 3120): Going to sleep due to screen timeout (uid 1000)...
(standard input):1437:01-01 03:51:00.540 I/PowerManagerService( 3120): Sleeping (uid 1000)...
(standard input):1713:01-01 04:05:03.885 I/PowerManagerService( 3120): Waking up from sleep (uid=1000 reason=android.policy:POWER)...
- 确认测试部“杀遥控器”方法
经试验,在ATV9上无法屏蔽遥控器按键
【AndroidFramework】【EMMC拷机】混合拷机时盒子待机的更多相关文章
- Linux服务器压测/拷机软件收集
最近公司采购了一批服务器,于是收集了一些拷机软件来压测服务器硬件性能.硬件的稳定相对来说比较重要,7x24小时无间断运行,主要看三个硬件:CPU.内存.硬盘. 下面是收集的一些教程,可能网址已经失效了 ...
- 数往知来C#之 String 集合 深拷与浅拷 序列化<五>
C# 基础常用string方法篇 复习. 1.引用类型与值类型 -->文件的复制与快捷方式的复制 2.垃圾回收 3.静态与非静态 -->如何定义静态成员与静态类 --> ...
- set集合,深浅拷⻉以及部分知识点补充
set集合,深浅拷⻉以及部分知识点补充内容:1. 基础数据类型补充2. set集合3. 深浅拷⻉主要内容: ⼀. 基础数据类型补充⾸先关于int和str在之前的学习中已经讲了80%以上了. 所以剩下的 ...
- python 學習深淺拷貝、集合、、作用域、函數
python 學習深淺拷貝.集合..作用域.函數 2020開年新冠肺炎流行大部分人員.工廠.單位無法復工生產,人員隔離每天外出都要戴口罩,在家隔離期間悶壞了感覺把半年的口糧都幹掉了,嚴重考察大家的資本 ...
- 两个"�"="锟斤拷"?
关于作者:程序猿石头(ID: tangleithu),现任阿里巴巴技术专家,清华学渣,前大疆后端 Leader.欢迎关注,交流和指导! 本文首发于微信公众号,原文链接,转载请全文保留. 以一首七言绝句 ...
- Inspiron 14 7000 系列 (7447) 游匣14 拆机图
Inspiron 14 7000 系列 (7447) 游匣14 拆机图 游匣配置不多说,i5起步,标配4G GTX850M显卡,这么霸道的配置给我玩扫雷肯定不卡.配置高功耗就大,不过游匣的散热 ...
- 完成在本机远程连接HBase进行数据增删改查
1.进行hbase与本机远程连接测试连接 1.1 修改虚拟机文件hbase-site.xml(cd/usr/local/hbase/conf)文件,把localhost换成你的虚拟机主机名字 1.2修 ...
- eMMC真能优化成UFS?谈谈手机闪存的文件系统
和UFS闪存相比,eMMC的性能更弱,同一型号的手机混用这两种规格的闪存,让一些消费者感到了不满.对此,厂商称通过优化,eMMC的产品也可以获得优秀的体验.这个优化到底是怎么回事?根据以往的一些宣传, ...
- 【小米3使用经验】小米3联通版 miui7.2.11稳定版刷机
1.我的手机是小米3联通版的,买来后为了配合公司的手机开发,将Android系统升级到4.4.4版本,MiUi为默认版本. 前段时间可能不小心开启了自动升级,结果Android系统升级到6.0.1版本 ...
随机推荐
- linux Apache 的安装
rpm –qa httpd 查询是否安装了 Apache rpm –e 包名卸载安装程序 rpm –e --nodeps 包名卸载安装程序不产生依赖 #检查是否安装有依赖库 yum install – ...
- .net Core——SqlSugar使用
一.DbContext配置 public class DbContext { public DbContext() { Db = new SqlSugarClient(new ConnectionCo ...
- VB中RaiseEvent语句的功能及用法
Creat a new class named Class1, it's codes like this: Public Event MyEvent() Public Sub RaiseTheEven ...
- Xor Sum 2 AtCoder - 4142 (异或前缀和性质+ 双指针)
Problem Statement There is an integer sequence A of length N. Find the number of the pairs of intege ...
- 1134. Vertex Cover (25)
A vertex cover of a graph is a set of vertices such that each edge of the graph is incident to at le ...
- linear_func
''' class torch.nn.Linear(in_features,out_features,bias = True )[来源] 参数: in_features - 每个输入样本的大小out_ ...
- 第一次接触oracle
登录 SQLPLUS cmd sqlplus [用户名]/[密码][@数据库] [参数] sqlplus sys/orcl as sysdba -- 登录 sys 用户,必须指定 sysdba 或 s ...
- 前端之JavaScript:JS之DOM对象二
继续JS之DOM对象二 前面在JS之DOM中我们知道了属性操作,下面我们来了解一下节点操作.很重要!! 一.节点操作 创建节点:var ele_a = document.createElement(' ...
- H5 FormData对象
FormData对象 2018年01月08日 14:31:53 阅读数:2635 FormData对象,可以把所有表单元素的name与value组成一个queryString,提交到后台. 在使用aj ...
- 【leetcode】494. Target Sum
题目如下: 解题思路:这题可以用动态规划来做.记dp[i][j] = x,表示使用nums的第0个到第i个之间的所有元素得到数值j有x种方法,那么很容易得到递推关系式,dp[i][j] = dp[i- ...