android 关机充电流程
2016-08-15 19:26
489 查看
点击打开链接
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[/code]
2
3
4
5
6
7
8
9
10
11
12
1
2
3
4
5
6
7
8
9
10
11
12
[/code]
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[/code]
0.主要流程
usb插入通过传递cmdline给init解析从而启动充电进程1. LK
lk\app\aboot\aboot.cupdate_cmdline ---------- if (boot_into_ffbm) // 工厂测试模式 { cmdline_len += strlen(androidboot_mode); cmdline_len += strlen(ffbm_mode_string); /* reduce kernel console messages to speed-up boot */ cmdline_len += strlen(loglevel); } else if (target_pause_for_battery_charge()) // 判断是否关机充电 { pause_at_bootup = 1; // charger flag cmdline_len += strlen(battchg_pause); //更新 cmd line 长度 } ---------- else if (pause_at_bootup) // charger flag { src = battchg_pause; // static const char *battchg_pause = " androidboot.mode=charger"; if (have_cmdline) --dst; while ((*dst++ = *src++)); }1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[/code]
2.init
#init.c if (!is_ffbm) is_charger = !strcmp(bootmode, "charger"); ---------- if (is_charger) action_for_each_trigger("charger", action_add_queue_tail);1
2
3
4
5
6
7
8
9
10
11
12
1
2
3
4
5
6
7
8
9
10
11
12
[/code]
# init.rc on charger class_start charger ---------- # init.qcom.rc service charger /charger class charger ---------- #system/core/healthd/Android.mk LOCAL_MODULE := healthd ... # Symlink /charger to /sbin/healthd1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[/code]
相关文章推荐
- android 电池(二):android关机充电流程、充电画面显示
- android关机充电流程、充电画面显示
- android 电池(二):android关机充电流程、充电画面显示
- android 电池(二):android关机充电流程、充电画面显示
- android 关机充电流程
- android 电池(二):android关机充电流程、充电画面显示
- android关机充电流程、充电画面显示
- android关机充电流程、充电画面显示
- android 电池(二):android关机充电流程、充电画面显示
- Android7.1关机充电启动流程及LED状态更新
- android 电池(二):android关机充电流程、充电画面显示
- android 电池(二):android关机充电流程、充电画面显示 .
- android 电池(二):android关机充电流程、充电画面显示
- android关机充电流程及关机充电时的画面显示
- android关机充电流程、充电画面显示
- android关机充电流程、充电画面显示
- android 电池(二):android关机充电流程、充电画面显示
- Android 关机充电流程简析
- android 电池(二):android关机充电流程、充电画面显示
- android 电池(二):android关机充电流程、充电画面显示