一、概述
EventLog是Android中重要的log,能够用来分析系统的各种状况,比如activity的生命周期,电池状态等
在终端输入
logcat -b events
能够打印出evetnlog。同时在MTKLog的mobilelog文件夹下面也能看到evetnlog。
tags格式的定义位于文件system/etc/event-log-tags
同时,阅读详细信息可以查看源码中的EventLogTags.logtags文件,这里通过EventLogTags.logtags翻译部分Tag含义。
二、EventLog
2.1 ActivityManager
2719 configuration_changed (config mask|1|5)
2721 cpu (total|1|6),(user|1|6),(system|1|6),(iowait|1|6),(irq|1|6),(softirq|1|6)
# ActivityManagerService.systemReady() starts:
3040 boot_progress_ams_ready (time|2|3)
# ActivityManagerService calls enableScreenAfterBoot():
3050 boot_progress_enable_screen (time|2|3)
# Do not change these names without updating the checkin_events setting in
# google3/googledata/wireless/android/provisioning/gservices.config !!
#
# An activity is being finished:
30001 am_finish_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Reason|3)
# A task is being brought to the front of the screen:
30002 am_task_to_front (User|1|5),(Task|1|5)
# An existing activity is being given a new intent:
30003 am_new_intent (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5)
# A new task is being created:
30004 am_create_task (User|1|5),(Task ID|1|5)
# A new activity is being created in an existing task:
30005 am_create_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5)
# An activity has been resumed into the foreground but was not already running:
30006 am_restart_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3)
# An activity has been resumed and is now in the foreground:
30007 am_resume_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3)
# Application Not Responding
30008 am_anr (User|1|5),(pid|1|5),(Package Name|3),(Flags|1|5),(reason|3)
# Activity launch time
30009 am_activity_launch_time (User|1|5),(Token|1|5),(Component Name|3),(time|2|3)
# Application process bound to work
30010 am_proc_bound (User|1|5),(PID|1|5),(Process Name|3)
# Application process died
30011 am_proc_died (User|1|5),(PID|1|5),(Process Name|3),(OomAdj|1|5),(ProcState|1|5)
# The Activity Manager failed to pause the given activity.
30012 am_failed_to_pause (User|1|5),(Token|1|5),(Wanting to pause|3),(Currently pausing|3)
# Attempting to pause the current activity
30013 am_pause_activity (User|1|5),(Token|1|5),(Component Name|3),(User Leaving|3)
# Application process has been started
30014 am_proc_start (User|1|5),(PID|1|5),(UID|1|5),(Process Name|3),(Type|3),(Component|3)
# An application process has been marked as bad
30015 am_proc_bad (User|1|5),(UID|1|5),(Process Name|3)
# An application process that was bad is now marked as good
30016 am_proc_good (User|1|5),(UID|1|5),(Process Name|3)
# Reporting to applications that memory is low
30017 am_low_memory (Num Processes|1|1)
# An activity is being destroyed:
30018 am_destroy_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Reason|3)
# An activity has been relaunched, resumed, and is now in the foreground:
30019 am_relaunch_resume_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3)
# An activity has been relaunched:
30020 am_relaunch_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3)
# The activity's onPause has been called.
30021 am_on_paused_called (User|1|5),(Component Name|3),(Reason|3)
# The activity's onResume has been called.
30022 am_on_resume_called (User|1|5),(Component Name|3),(Reason|3)
# Kill a process to reclaim memory.
30023 am_kill (User|1|5),(PID|1|5),(Process Name|3),(OomAdj|1|5),(Reason|3)
# Discard an undelivered serialized broadcast (timeout/ANR/crash)
30024 am_broadcast_discard_filter (User|1|5),(Broadcast|1|5),(Action|3),(Receiver Number|1|1),(BroadcastFilter|1|5)
30025 am_broadcast_discard_app (User|1|5),(Broadcast|1|5),(Action|3),(Receiver Number|1|1),(App|3)
# A service is being created
30030 am_create_service (User|1|5),(Service Record|1|5),(Name|3),(UID|1|5),(PID|1|5)
# A service is being destroyed
30031 am_destroy_service (User|1|5),(Service Record|1|5),(PID|1|5)
# A process has crashed too many times, it is being cleared
30032 am_process_crashed_too_much (User|1|5),(Name|3),(PID|1|5)
# An unknown process is trying to attach to the activity manager
30033 am_drop_process (PID|1|5)
# A service has crashed too many times, it is being stopped
30034 am_service_crashed_too_much (User|1|5),(Crash Count|1|1),(Component Name|3),(PID|1|5)
# A service is going to be restarted after its process went away
30035 am_schedule_service_restart (User|1|5),(Component Name|3),(Time|2|3)
# A client was waiting for a content provider, but its process was lost
30036 am_provider_lost_process (User|1|5),(Package Name|3),(UID|1|5),(Name|3)
# The activity manager gave up on a new process taking too long to start
30037 am_process_start_timeout (User|1|5),(PID|1|5),(UID|1|5),(Process Name|3)
# Unhandled exception
30039 am_crash (User|1|5),(PID|1|5),(Process Name|3),(Flags|1|5),(Exception|3),(Message|3),(File|3),(Line|1|5)
# Log.wtf() called
30040 am_wtf (User|1|5),(PID|1|5),(Process Name|3),(Flags|1|5),(Tag|3),(Message|3)
# User switched
30041 am_switch_user (id|1|5)
# Activity set to resumed
30043 am_set_resumed_activity (User|1|5),(Component Name|3),(Reason|3)
# Stack focus
30044 am_focused_stack (User|1|5),(Display Id|1|5),(Focused Stack Id|1|5),(Last Focused Stack Id|1|5),(Reason|3)
# Running pre boot receiver
30045 am_pre_boot (User|1|5),(Package|3)
# Report collection of global memory state
30046 am_meminfo (Cached|2|2),(Free|2|2),(Zram|2|2),(Kernel|2|2),(Native|2|2)
# Report collection of memory used by a process
30047 am_pss (Pid|1|5),(UID|1|5),(Process Name|3),(Pss|2|2),(Uss|2|2),(SwapPss|2|2),(Rss|2|2),(StatType|1|5),(ProcState|1|5),(TimeToCollect|2|2)
# Attempting to stop an activity
30048 am_stop_activity (User|1|5),(Token|1|5),(Component Name|3)
# The activity's onStop has been called.
30049 am_on_stop_called (User|1|5),(Component Name|3),(Reason|3)
# Report changing memory conditions (Values are ProcessStats.ADJ_MEM_FACTOR* constants)
30050 am_mem_factor (Current|1|5),(Previous|1|5)
# UserState has changed
30051 am_user_state_changed (id|1|5),(state|1|5)
# Note when any processes of a uid have started running
30052 am_uid_running (UID|1|5)
# Note when all processes of a uid have stopped.
30053 am_uid_stopped (UID|1|5)
# Note when the state of a uid has become active.
30054 am_uid_active (UID|1|5)
# Note when the state of a uid has become idle (background check enforced).
30055 am_uid_idle (UID|1|5)
# Note when a service is being forcibly stopped because its app went idle.
30056 am_stop_idle_service (UID|1|5),(Component Name|3)
# The activity's onCreate has been called.
30057 am_on_create_called (User|1|5),(Component Name|3),(Reason|3)
# The activity's onRestart has been called.
30058 am_on_restart_called (User|1|5),(Component Name|3),(Reason|3)
# The activity's onStart has been called.
30059 am_on_start_called (User|1|5),(Component Name|3),(Reason|3)
# The activity's onDestroy has been called.
30060 am_on_destroy_called (User|1|5),(Component Name|3),(Reason|3)
# The activity's onActivityResult has been called.
30062 am_on_activity_result_called (User|1|5),(Component Name|3),(Reason|3)
# The task is being removed from its parent stack
30061 am_remove_task (Task ID|1|5), (Stack ID|1|5)
# The task is being compacted
30063 am_compact (Pid|1|5),(Process Name|3),(Action|3),(BeforeRssTotal|2|2),(BeforeRssFile|2|2),(BeforeRssAnon|2|2),(BeforeRssSwap|2|2),(DeltaRssTotal|2|2),(DeltaRssFile|2|2),(DeltaRssAnon|2|2),(DeltaRssSwap|2|2),(Time|2|3),(LastAction|1|2),(LastActionTimestamp|2|3),(setAdj|1|2),(procState|1|2),(BeforeZRAMFree|2|2),(DeltaZRAMFree|2|2)
# The activity's onTopResumedActivityChanged(true) has been called.
30064 am_on_top_resumed_gained_called (User|1|5),(Component Name|3),(Reason|3)
# The activity's onTopResumedActivityChanged(false) has been called.
30065 am_on_top_resumed_lost_called (User|1|5),(Component Name|3),(Reason|3)
# An activity been add into stopping list
30066 am_add_to_stopping (User|1|5),(Token|1|5),(Component Name|3),(Reason|3)
下面列举tag可能使用的部分场景:
- am_low_memory:位于AMS.killAllBackgroundProcesses或者AMS.appDiedLocked,记录当前Lru进程队列长度。
- am_pss:位于AMS.recordPssSampleLocked(
- am_meminfo:位于AMS.dumpApplicationMemoryUsage
- am_proc_start:位于AMS.startProcessLocked,启动进程
- am_proc_bound:位于AMS.attachApplicationLocked
- am_kill: 位于ProcessRecord.kill,杀掉进程
- am_anr: 位于AMS.appNotResponding
- am_crash:位于AMS.handleApplicationCrashInner
- am_wtf:位于AMS.handleApplicationWtf
- am_activity_launch_time:位于ActivityRecord.reportLaunchTimeLocked(),后面两个参数分别是thisTime和 totalTime.
- am_activity_fully_drawn_time:位于ActivityRecord.reportFullyDrawnLocked, 后面两个参数分别是thisTime和 totalTime
- am_broadcast_discard_filter:位于BroadcastQueue.logBroadcastReceiverDiscardLocked
- am_broadcast_discard_app:位于BroadcastQueue.logBroadcastReceiverDiscardLocked
Activity生命周期相关的方法:
- am_on_resume_called: 位于AT.performResumeActivity
- am_on_paused_called: 位于AT.performPauseActivity, performDestroyActivity
- am_resume_activity: 位于AS.resumeTopActivityInnerLocked
- am_pause_activity: 位于AS.startPausingLocked
- am_finish_activity: 位于AS.finishActivityLocked, removeHistoryRecordsForAppLocked
- am_destroy_activity: 位于AS.destroyActivityLocked
- am_focused_activity: 位于AMS.setFocusedActivityLocked, clearFocusedActivity
- am_restart_activity: 位于ASS.realStartActivityLocked
- am_create_activity: 位于ASS.startActivityUncheckedLocked
- am_new_intent: 位于ASS.startActivityUncheckedLocked
- am_task_to_front: 位于AS.moveTaskToFrontLocked
2.2 Power & Battery
# ---------------------------
6# BatteryService.java
7# ---------------------------
82722 battery_level (level|1|6),(voltage|1|1),(temperature|1|1)
92723 battery_status (status|1|5),(health|1|5),(present|1|5),(plugged|1|5),(technology|3)
10# This is logged when battery goes from discharging to charging.
11# It lets us count the total amount of time between charges and the discharge level
122730 battery_discharge (duration|2|3),(minLevel|1|6),(maxLevel|1|6)
13
14
15# ---------------------------
16# PowerManagerService.java
17# ---------------------------
18# This is logged when the device is being forced to sleep (typically by
19# the user pressing the power button).
202724 power_sleep_requested (wakeLocksCleared|1|1)
21# This is logged when the screen on broadcast has completed
222725 power_screen_broadcast_send (wakelockCount|1|1)
23# This is logged when the screen broadcast has completed
242726 power_screen_broadcast_done (on|1|5),(broadcastDuration|2|3),(wakelockCount|1|1)
25# This is logged when the screen on broadcast has completed
262727 power_screen_broadcast_stop (which|1|5),(wakelockCount|1|1)
27# This is logged when the screen is turned on or off.
282728 power_screen_state (offOrOn|1|5),(becauseOfUser|1|5),(totalTouchDownTime|2|3),(touchCycles|1|1),(latency|1|3)
29# This is logged when the partial wake lock (keeping the device awake
30# regardless of whether the screen is off) is acquired or released.
312729 power_partial_wake_state (releasedorAcquired|1|5),(tag|3)
32# The device is being asked to go into a soft sleep (typically by the ungaze gesture).
33# It logs the time remaining before the device would've normally gone to sleep without the request.
342731 power_soft_sleep_requested (savedwaketimems|2)
35
36#
37# Leave IDs through 2739 for more power logs (2730 used by battery_discharge above)
部分含义:
- battery_level: [19,3660,352] //剩余电量19%, 电池电压3.66v, 电池温度35.2℃
- power_screen_state: [0,3,0,0] // 灭屏状态(0), 屏幕超时(3). 当然还有其他设备管理策略(1),其他理由都为用户行为(2)
- power_screen_state: [1,0,0,0] // 亮屏状态(1)
下面列举tag可能使用的部分场景:
- power_sleep_requested: 位于PMS.goToSleepNoUpdateLocked
- power_screen_state:位于Notifer.handleEarlyInteractiveChange, handleLateInteractiveChange
2.3更多含义
# ---------------------------
42# DeviceStorageMonitorService.java
43# ---------------------------
44# File on cache partition was deleted
452748 cache_file_deleted (path|3)
46# Storage volume state and usable space in bytes
472749 storage_state (uuid|3),(old_state|1),(new_state|1),(usable|2),(total|2)
48
49
50# ---------------------------
51# NotificationManagerService.java
52# ---------------------------
53# when a NotificationManager.notify is called. status: 0=post, 1=update, 2=ignored
542750 notification_enqueue (uid|1|5),(pid|1|5),(pkg|3),(id|1|5),(tag|3),(userid|1|5),(notification|3),(status|1)
55# when someone tries to cancel a notification, the notification manager sometimes
56# calls this with flags too
572751 notification_cancel (uid|1|5),(pid|1|5),(pkg|3),(id|1|5),(tag|3),(userid|1|5),(required_flags|1),(forbidden_flags|1),(reason|1|5),(listener|3)
58# when someone tries to cancel all of the notifications for a particular package
592752 notification_cancel_all (uid|1|5),(pid|1|5),(pkg|3),(userid|1|5),(required_flags|1),(forbidden_flags|1),(reason|1|5),(listener|3)
60# when the notification panel is shown
61# Note: New tag range starts here since 2753+ have been used below.
6227500 notification_panel_revealed (items|1)
63# when the notification panel is hidden
6427501 notification_panel_hidden
65# when notifications are newly displayed on screen, or disappear from screen
6627510 notification_visibility_changed (newlyVisibleKeys|3),(noLongerVisibleKeys|3)
67# when notifications are expanded, or contracted
6827511 notification_expansion (key|3),(user_action|1),(expanded|1),(lifespan|1),(freshness|1),(exposure|1)
69# when a notification has been clicked
7027520 notification_clicked (key|3),(lifespan|1),(freshness|1),(exposure|1)
71# when a notification action button has been clicked
7227521 notification_action_clicked (key|3),(action_index|1),(lifespan|1),(freshness|1),(exposure|1)
73# when a notification has been canceled
7427530 notification_canceled (key|3),(reason|1),(lifespan|1),(freshness|1),(exposure|1),(listener|3)
75# replaces 27510 with a row per notification
7627531 notification_visibility (key|3),(visibile|1),(lifespan|1),(freshness|1),(exposure|1),(rank|1)
77# a notification emited noise, vibration, or light
7827532 notification_alert (key|3),(buzz|1),(beep|1),(blink|1)
79# a notification was added to a autogroup
8027533 notification_autogrouped (key|3)
81# notification was removed from an autogroup
82275534 notification_unautogrouped (key|3)
83
84# ---------------------------
85# Watchdog.java
86# ---------------------------
872802 watchdog (Service|3)
882803 watchdog_proc_pss (Process|3),(Pid|1|5),(Pss|1|2)
892804 watchdog_soft_reset (Process|3),(Pid|1|5),(MaxPss|1|2),(Pss|1|2),(Skip|3)
902805 watchdog_hard_reset (Process|3),(Pid|1|5),(MaxPss|1|2),(Pss|1|2)
912806 watchdog_pss_stats (EmptyPss|1|2),(EmptyCount|1|1),(BackgroundPss|1|2),(BackgroundCount|1|1),(ServicePss|1|2),(ServiceCount|1|1),(VisiblePss|1|2),(VisibleCount|1|1),(ForegroundPss|1|2),(ForegroundCount|1|1),(NoPssCount|1|1)
922807 watchdog_proc_stats (DeathsInOne|1|1),(DeathsInTwo|1|1),(DeathsInThree|1|1),(DeathsInFour|1|1),(DeathsInFive|1|1)
932808 watchdog_scheduled_reboot (Now|2|1),(Interval|1|3),(StartTime|1|3),(Window|1|3),(Skip|3)
942809 watchdog_meminfo (MemFree|1|2),(Buffers|1|2),(Cached|1|2),(Active|1|2),(Inactive|1|2),(AnonPages|1|2),(Mapped|1|2),(Slab|1|2),(SReclaimable|1|2),(SUnreclaim|1|2),(PageTables|1|2)
952810 watchdog_vmstat (runtime|2|3),(pgfree|1|1),(pgactivate|1|1),(pgdeactivate|1|1),(pgfault|1|1),(pgmajfault|1|1)
962811 watchdog_requested_reboot (NoWait|1|1),(ScheduleInterval|1|3),(RecheckInterval|1|3),(StartTime|1|3),(Window|1|3),(MinScreenOff|1|3),(MinNextAlarm|1|3)
97
98# ---------------------------
99# RescueParty.java
100# ---------------------------
1012900 rescue_note (uid|1),(count|1),(window|2)
1022901 rescue_level (level|1),(trigger_uid|1)
1032902 rescue_success (level|1)
1042903 rescue_failure (level|1),(msg|3)
105
106# ---------------------------
107# BackupManagerService.java
108# ---------------------------
1092820 backup_data_changed (Package|3)
1102821 backup_start (Transport|3)
1112822 backup_transport_failure (Package|3)
1122823 backup_agent_failure (Package|3),(Message|3)
1132824 backup_package (Package|3),(Size|1|2)
1142825 backup_success (Packages|1|1),(Time|1|3)
1152826 backup_reset (Transport|3)
1162827 backup_initialize
1172828 backup_requested (Total|1|1),(Key-Value|1|1),(Full|1|1)
1182829 backup_quota_exceeded (Package|3)
1192830 restore_start (Transport|3),(Source|2|5)
1202831 restore_transport_failure
1212832 restore_agent_failure (Package|3),(Message|3)
1222833 restore_package (Package|3),(Size|1|2)
1232834 restore_success (Packages|1|1),(Time|1|3)
124
1252840 full_backup_package (Package|3)
1262841 full_backup_agent_failure (Package|3),(Message|3)
1272842 full_backup_transport_failure
1282843 full_backup_success (Package|3)
1292844 full_restore_package (Package|3)
1302845 full_backup_quota_exceeded (Package|3)
1312846 full_backup_cancelled (Package|3),(Message|3)
132
1332850 backup_transport_lifecycle (Transport|3),(Bound|1|1)
134
135
136# ---------------------------
137# SystemServer.java
138# ---------------------------
139# SystemServer.run() starts:
1403010 boot_progress_system_run (time|2|3)
141
142
143# ---------------------------
144# PackageManagerService.java
145# ---------------------------
146# Package Manager starts:
1473060 boot_progress_pms_start (time|2|3)
148# Package Manager .apk scan starts:
1493070 boot_progress_pms_system_scan_start (time|2|3)
150# Package Manager .apk scan starts:
1513080 boot_progress_pms_data_scan_start (time|2|3)
152# Package Manager .apk scan ends:
1533090 boot_progress_pms_scan_end (time|2|3)
154# Package Manager ready:
1553100 boot_progress_pms_ready (time|2|3)
156# + check activity_launch_time for Home app
157# Value of "unknown sources" setting at app install time
1583110 unknown_sources_enabled (value|1)
159# Package Manager critical info
1603120 pm_critical_info (msg|3)
161# Disk usage stats for verifying quota correctness
1623121 pm_package_stats (manual_time|2|3),(quota_time|2|3),(manual_data|2|2),(quota_data|2|2),(manual_cache|2|2),(quota_cache|2|2)
163
164# ---------------------------
165# WindowManagerService.java
166# ---------------------------
167# Out of memory for surfaces.
16831000 wm_no_surface_memory (Window|3),(PID|1|5),(Operation|3)
169# Task created.
17031001 wm_task_created (TaskId|1|5),(StackId|1|5)
171# Task moved to top (1) or bottom (0).
17231002 wm_task_moved (TaskId|1|5),(ToTop|1),(Index|1)
173# Task removed with source explanation.
17431003 wm_task_removed (TaskId|1|5),(Reason|3)
175# Stack created.
17631004 wm_stack_created (StackId|1|5)
177# Home stack moved to top (1) or bottom (0).
17831005 wm_home_stack_moved (ToTop|1)
179# Stack removed.
18031006 wm_stack_removed (StackId|1|5)
181# bootanim finished:
18231007 wm_boot_animation_done (time|2|3)
183
184
185# ---------------------------
186# InputMethodManagerService.java
187# ---------------------------
188# Re-connecting to input method service because we haven't received its interface
18932000 imf_force_reconnect_ime (IME|4),(Time Since Connect|2|3),(Showing|1|1)
190
191
192# ---------------------------
193# WallpaperManagerService.java
194# ---------------------------
19533000 wp_wallpaper_crashed (component|3)
196
197# ---------------------------
198# Device idle
199# ---------------------------
20034000 device_idle (state|1|5), (reason|3)
20134001 device_idle_step
20234002 device_idle_wake_from_idle (is_idle|1|5), (reason|3)
20334003 device_idle_on_start
20434004 device_idle_on_phase (what|3)
20534005 device_idle_on_complete
20634006 device_idle_off_start (reason|3)
20734007 device_idle_off_phase (what|3)
20834008 device_idle_off_complete
20934009 device_idle_light (state|1|5), (reason|3)
21034010 device_idle_light_step
211
212# ---------------------------
213# DisplayManagerService.java
214# ---------------------------
215# Auto-brightness adjustments by the user.
21635000 auto_brightness_adj (old_adj|5),(old_lux|5),(old_brightness|5),(old_gamma|5),(new_adj|5),(new_lux|5),(new_brightness|5),(new_gamma|5)
217
218# ---------------------------
219# ConnectivityService.java
220# ---------------------------
221# Connectivity state changed
22250020 connectivity_state_changed (type|1),(subtype|1),(state|1)
223
224
225# ---------------------------
226# NetworkStatsService.java
227# ---------------------------
22851100 netstats_mobile_sample (dev_rx_bytes|2|2),(dev_tx_bytes|2|2),(dev_rx_pkts|2|1),(dev_tx_pkts|2|1),(xt_rx_bytes|2|2),(xt_tx_bytes|2|2),(xt_rx_pkts|2|1),(xt_tx_pkts|2|1),(uid_rx_bytes|2|2),(uid_tx_bytes|2|2),(uid_rx_pkts|2|1),(uid_tx_pkts|2|1),(trusted_time|2|3)
22951101 netstats_wifi_sample (dev_rx_bytes|2|2),(dev_tx_bytes|2|2),(dev_rx_pkts|2|1),(dev_tx_pkts|2|1),(xt_rx_bytes|2|2),(xt_tx_bytes|2|2),(xt_rx_pkts|2|1),(xt_tx_pkts|2|1),(uid_rx_bytes|2|2),(uid_tx_bytes|2|2),(uid_rx_pkts|2|1),(uid_tx_pkts|2|1),(trusted_time|2|3)
230
231
232# ---------------------------
233# LockdownVpnTracker.java
234# ---------------------------
23551200 lockdown_vpn_connecting (egress_net|1)
23651201 lockdown_vpn_connected (egress_net|1)
23751202 lockdown_vpn_error (egress_net|1)
238
239# ---------------------------
240# ConfigUpdateInstallReceiver.java
241# ---------------------------
24251300 config_install_failed (dir|3)
243
244# ---------------------------
245# IntentFirewall.java
246# ---------------------------
24751400 ifw_intent_matched (Intent Type|1|5),(Component Name|3),(Caller Uid|1|5),(Caller Pkg Count|1|1),(Caller Pkgs|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5)
248
249# ---------------------------
250# IdleMaintenanceService.java
251# ---------------------------
25251500 idle_maintenance_window_start (time|2|3), (lastUserActivity|2|3), (batteryLevel|1|6), (batteryCharging|1|5)
25351501 idle_maintenance_window_finish (time|2|3), (lastUserActivity|2|3), (batteryLevel|1|6), (batteryCharging|1|5)
254
255# ---------------------------
256# StorageManagerService.java
257# ---------------------------
2582755 fstrim_start (time|2|3)
2592756 fstrim_finish (time|2|3)
260
261# ---------------------------
262# AudioService.java
263# ---------------------------
26440000 volume_changed (stream|1), (prev_level|1), (level|1), (max_level|1), (caller|3)
26540001 stream_devices_changed (stream|1), (prev_devices|1), (devices|1)
266
267# ---------------------------
268# GestureLauncherService.java
269# ---------------------------
27040100 camera_gesture_triggered (gesture_on_time|2|3), (sensor1_on_time|2|3), (sensor2_on_time|2|3), (event_extra|1|1)
271
272# ---------------------------
273# timezone/RulesManagerService.java
274# ---------------------------
27551600 timezone_trigger_check (token|3)
27651610 timezone_request_install (token|3)
27751611 timezone_install_started (token|3)
27851612 timezone_install_complete (token|3), (result|1)
27951620 timezone_request_uninstall (token|3)
28051621 timezone_uninstall_started (token|3)
28151622 timezone_uninstall_complete (token|3), (result|1)
28251630 timezone_request_nothing (token|3)
28351631 timezone_nothing_complete (token|3)
三. EventLog完整语义分析
以am_proc_start分析log中的信息
30014 am_proc_start (User|1|5),(PID|1|5),(UID|1|5),(Process Name|3),(Type|3),(Component|3)
am_proc_start之后紧跟着的几个括号,其中括号里的内容如下:
<name>|data type[|data unit])
(<名字>|数据类型[|数据单位])
那么(User|1|5)
==> 名字为User, 数据类型为1,数据单位为5,下面再来看看数据类型
和数据单位
:
3.1 数据类型
- 1: int
- 2: long
- 3: string
- 4: list
3.2 数据单位
- 1: Number of objects(对象个数)
- 2: Number of bytes(字节数)
- 3: Number of milliseconds(毫秒)
- 4: Number of allocations(分配个数)
- 5: Id
- 6: Percent(百分比)
am_proc_start: [0,2703,10011,com.google.android.onetimeinitializer,broadcast,com.google.android.onetimeinitializer/.OneTimeInitializerReceiver]
进程启动: UserId=0, pid=2703, uid=10011, ProcessName=com.google.android.onetimeinitializer, 数据类型=broadcast, 组件=com.google.android.onetimeinitializer/.OneTimeInitializerReceiver
参考信息: