blob: 883e8c48560359f6143f591e7b12577fb199b805 [file] [log] [blame] [view]
Jeff Brown590a9d62011-06-30 12:55:34 -07001<!--
2 Copyright 2011 The Android Open Source Project
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15-->
16
17# Dumpsys #
18
19The `dumpsys` tool runs on the device and dumps interesting information
20about the status of system services.
21
22## Usage ##
23
24The input system is part of the window manager. To dump its state,
25run the following command.
26
27 $ adb shell su -- dumpsys window
28
29 WINDOW MANAGER INPUT (dumpsys window input)
30 Event Hub State:
31 BuiltInKeyboardId: -1
32 Devices:
33 ...
34
35The set of information that is reported varies depending on the version of Android.
36
37### Event Hub State ###
38
39The `EventHub` component is responsible for communicating with the kernel device
40drivers and identifying device capabilities. Accordingly, its state shows
41information about how devices are configured.
42
43 Event Hub State:
44 BuiltInKeyboardId: -1
45 Devices:
46 3: tuna-gpio-keypad
47 Classes: 0x00000001
48 Path: /dev/input/event2
49 Location:
50 UniqueId:
51 Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000
52 KeyLayoutFile: /system/usr/keylayout/tuna-gpio-keypad.kl
53 KeyCharacterMapFile: /system/usr/keychars/tuna-gpio-keypad.kcm
54 ConfigurationFile:
55 5: Tuna Headset Jack
56 Classes: 0x00000080
57 Path: /dev/input/event5
58 Location: ALSA
59 UniqueId:
60 Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000
61 KeyLayoutFile:
62 KeyCharacterMapFile:
63 ConfigurationFile:
64 6: Melfas MMSxxx Touchscreen
65 Classes: 0x00000014
66 Path: /dev/input/event1
67 Location: 3-0048/input0
68 UniqueId:
69 Identifier: bus=0x0018, vendor=0x0000, product=0x0000, version=0x0000
70 KeyLayoutFile:
71 KeyCharacterMapFile:
72 ConfigurationFile: /system/usr/idc/Melfas_MMSxxx_Touchscreen.idc
73 7: Motorola Bluetooth Wireless Keyboard
74 Classes: 0x8000000b
75 Path: /dev/input/event6
76 Location: 0C:DF:A4:B3:2D:BA
77 UniqueId: 00:0F:F6:80:02:CD
78 Identifier: bus=0x0005, vendor=0x22b8, product=0x093d, version=0x0288
79 KeyLayoutFile: /system/usr/keylayout/Vendor_22b8_Product_093d.kl
80 KeyCharacterMapFile: /system/usr/keychars/Generic.kcm
81 ConfigurationFile:
82
83#### Things To Look For ####
84
851. All of the expected input devices are present.
86
872. Each input device has an appropriate key layout file, key character map file
88 and input device configuration file. If the files are missing or contain
89 syntax errors, then they will not be loaded.
90
913. Each input device is being classified correctly. The bits in the `Classes`
92 field correspond to flags in `EventHub.h` such as `INPUT_DEVICE_CLASS_TOUCH_MT`.
93
944. The `BuiltInKeyboardId` is correct. If the device does not have a built-in keyboard,
95 then the id must be `-1`, otherwise it should be the id of the built-in keyboard.
96
97 If you observe that the `BuiltInKeyboardId` is not `-1` but it should be, then
98 you are missing a key character map file for a special function keypad somewhere.
99 Special function keypad devices should have key character map files that contain
100 just the line `type SPECIAL_FUNCTION` (that's what in the `tuna-gpio-keykad.kcm`
101 file we see mentioned above).
102
103### Input Reader State ###
104
105The `InputReader` is responsible for decoding input events from the kernel.
106Its state dump shows information about how each input device is configured
107and recent state changes that occurred, such as key presses or touches on
108the touch screen.
109
110This is what a special function keypad looks like:
111
112 Input Reader State:
113 Device 3: tuna-gpio-keypad
114 IsExternal: false
115 Sources: 0x00000101
116 KeyboardType: 1
117 Keyboard Input Mapper:
118 Parameters:
119 AssociatedDisplayId: -1
120 OrientationAware: false
121 KeyboardType: 1
122 Orientation: 0
123 KeyDowns: 0 keys currently down
124 MetaState: 0x0
125 DownTime: 75816923828000
126
127Here is a touch screen. Notice all of the information about the resolution of
128the device and the calibration parameters that were used.
129
130 Device 6: Melfas MMSxxx Touchscreen
131 IsExternal: false
132 Sources: 0x00001002
133 KeyboardType: 0
134 Motion Ranges:
135 X: source=0x00001002, min=0.000, max=719.001, flat=0.000, fuzz=0.999
136 Y: source=0x00001002, min=0.000, max=1279.001, flat=0.000, fuzz=0.999
137 PRESSURE: source=0x00001002, min=0.000, max=1.000, flat=0.000, fuzz=0.000
138 SIZE: source=0x00001002, min=0.000, max=1.000, flat=0.000, fuzz=0.000
139 TOUCH_MAJOR: source=0x00001002, min=0.000, max=1468.605, flat=0.000, fuzz=0.000
140 TOUCH_MINOR: source=0x00001002, min=0.000, max=1468.605, flat=0.000, fuzz=0.000
141 TOOL_MAJOR: source=0x00001002, min=0.000, max=1468.605, flat=0.000, fuzz=0.000
142 TOOL_MINOR: source=0x00001002, min=0.000, max=1468.605, flat=0.000, fuzz=0.000
143 Touch Input Mapper:
144 Parameters:
145 GestureMode: spots
146 DeviceType: touchScreen
147 AssociatedDisplay: id=0, isExternal=false
148 OrientationAware: true
149 Raw Touch Axes:
150 X: min=0, max=720, flat=0, fuzz=0, resolution=0
151 Y: min=0, max=1280, flat=0, fuzz=0, resolution=0
152 Pressure: min=0, max=255, flat=0, fuzz=0, resolution=0
153 TouchMajor: min=0, max=30, flat=0, fuzz=0, resolution=0
154 TouchMinor: unknown range
155 ToolMajor: unknown range
156 ToolMinor: unknown range
157 Orientation: unknown range
158 Distance: unknown range
159 TiltX: unknown range
160 TiltY: unknown range
161 TrackingId: min=0, max=65535, flat=0, fuzz=0, resolution=0
162 Slot: min=0, max=9, flat=0, fuzz=0, resolution=0
163 Calibration:
164 touch.size.calibration: diameter
165 touch.size.scale: 10.000
166 touch.size.bias: 0.000
167 touch.size.isSummed: false
168 touch.pressure.calibration: amplitude
169 touch.pressure.scale: 0.005
170 touch.orientation.calibration: none
171 touch.distance.calibration: none
172 SurfaceWidth: 720px
173 SurfaceHeight: 1280px
174 SurfaceOrientation: 0
175 Translation and Scaling Factors:
176 XScale: 0.999
177 YScale: 0.999
178 XPrecision: 1.001
179 YPrecision: 1.001
180 GeometricScale: 0.999
181 PressureScale: 0.005
182 SizeScale: 0.033
183 OrientationCenter: 0.000
184 OrientationScale: 0.000
185 DistanceScale: 0.000
186 HaveTilt: false
187 TiltXCenter: 0.000
188 TiltXScale: 0.000
189 TiltYCenter: 0.000
190 TiltYScale: 0.000
191 Last Button State: 0x00000000
192 Last Raw Touch: pointerCount=0
193 Last Cooked Touch: pointerCount=0
194
195Here is an external keyboard / mouse combo HID device. (This device doesn't actually
196have a mouse but its HID descriptor says it does.)
197
198 Device 7: Motorola Bluetooth Wireless Keyboard
199 IsExternal: true
200 Sources: 0x00002103
201 KeyboardType: 2
202 Motion Ranges:
203 X: source=0x00002002, min=0.000, max=719.000, flat=0.000, fuzz=0.000
204 Y: source=0x00002002, min=0.000, max=1279.000, flat=0.000, fuzz=0.000
205 PRESSURE: source=0x00002002, min=0.000, max=1.000, flat=0.000, fuzz=0.000
206 VSCROLL: source=0x00002002, min=-1.000, max=1.000, flat=0.000, fuzz=0.000
207 Keyboard Input Mapper:
208 Parameters:
209 AssociatedDisplayId: -1
210 OrientationAware: false
211 KeyboardType: 2
212 Orientation: 0
213 KeyDowns: 0 keys currently down
214 MetaState: 0x0
215 DownTime: 75868832946000
216 Cursor Input Mapper:
217 Parameters:
218 AssociatedDisplayId: 0
219 Mode: pointer
220 OrientationAware: false
221 XScale: 1.000
222 YScale: 1.000
223 XPrecision: 1.000
224 YPrecision: 1.000
225 HaveVWheel: true
226 HaveHWheel: false
227 VWheelScale: 1.000
228 HWheelScale: 1.000
229 Orientation: 0
230 ButtonState: 0x00000000
231 Down: false
232 DownTime: 0
233
234Here is a joystick. Notice how all of the axes have been scaled to a normalized
235range. The axis mapping can be configured using key layout files.
236
237 Device 18: Logitech Logitech Cordless RumblePad 2
238 IsExternal: true
239 Sources: 0x01000511
240 KeyboardType: 1
241 Motion Ranges:
242 X: source=0x01000010, min=-1.000, max=1.000, flat=0.118, fuzz=0.000
243 Y: source=0x01000010, min=-1.000, max=1.000, flat=0.118, fuzz=0.000
244 Z: source=0x01000010, min=-1.000, max=1.000, flat=0.118, fuzz=0.000
245 RZ: source=0x01000010, min=-1.000, max=1.000, flat=0.118, fuzz=0.000
246 HAT_X: source=0x01000010, min=-1.000, max=1.000, flat=0.000, fuzz=0.000
247 HAT_Y: source=0x01000010, min=-1.000, max=1.000, flat=0.000, fuzz=0.000
248 Keyboard Input Mapper:
249 Parameters:
250 AssociatedDisplayId: -1
251 OrientationAware: false
252 KeyboardType: 1
253 Orientation: 0
254 KeyDowns: 0 keys currently down
255 MetaState: 0x0
256 DownTime: 675270841000
257 Joystick Input Mapper:
258 Axes:
259 X: min=-1.00000, max=1.00000, flat=0.11765, fuzz=0.00000
260 scale=0.00784, offset=-1.00000, highScale=0.00784, highOffset=-1.00000
261 rawAxis=0, rawMin=0, rawMax=255, rawFlat=15, rawFuzz=0, rawResolution=0
262 Y: min=-1.00000, max=1.00000, flat=0.11765, fuzz=0.00000
263 scale=0.00784, offset=-1.00000, highScale=0.00784, highOffset=-1.00000
264 rawAxis=1, rawMin=0, rawMax=255, rawFlat=15, rawFuzz=0, rawResolution=0
265 Z: min=-1.00000, max=1.00000, flat=0.11765, fuzz=0.00000
266 scale=0.00784, offset=-1.00000, highScale=0.00784, highOffset=-1.00000
267 rawAxis=2, rawMin=0, rawMax=255, rawFlat=15, rawFuzz=0, rawResolution=0
268 RZ: min=-1.00000, max=1.00000, flat=0.11765, fuzz=0.00000
269 scale=0.00784, offset=-1.00000, highScale=0.00784, highOffset=-1.00000
270 rawAxis=5, rawMin=0, rawMax=255, rawFlat=15, rawFuzz=0, rawResolution=0
271 HAT_X: min=-1.00000, max=1.00000, flat=0.00000, fuzz=0.00000
272 scale=1.00000, offset=0.00000, highScale=1.00000, highOffset=0.00000
273 rawAxis=16, rawMin=-1, rawMax=1, rawFlat=0, rawFuzz=0, rawResolution=0
274 HAT_Y: min=-1.00000, max=1.00000, flat=0.00000, fuzz=0.00000
275 scale=1.00000, offset=0.00000, highScale=1.00000, highOffset=0.00000
276 rawAxis=17, rawMin=-1, rawMax=1, rawFlat=0, rawFuzz=0, rawResolution=0
277
278At the end of the input reader dump there is some information about global configuration
279parameters such as the mouse pointer speed.
280
281 Configuration:
282 ExcludedDeviceNames: []
283 VirtualKeyQuietTime: 0.0ms
284 PointerVelocityControlParameters: scale=1.000, lowThreshold=500.000, highThreshold=3000.000, acceleration=3.000
285 WheelVelocityControlParameters: scale=1.000, lowThreshold=15.000, highThreshold=50.000, acceleration=4.000
286 PointerGesture:
287 Enabled: true
288 QuietInterval: 100.0ms
289 DragMinSwitchSpeed: 50.0px/s
290 TapInterval: 150.0ms
291 TapDragInterval: 300.0ms
292 TapSlop: 20.0px
293 MultitouchSettleInterval: 100.0ms
294 MultitouchMinDistance: 15.0px
295 SwipeTransitionAngleCosine: 0.3
296 SwipeMaxWidthRatio: 0.2
297 MovementSpeedRatio: 0.8
298 ZoomSpeedRatio: 0.3
299
300#### Things To Look For ####
301
3021. All of the expected input devices are present.
303
3042. Each input device has been configured appropriately. Especially check the
305 touch screen and joystick axes.
306
307### Input Dispatcher State ###
308
309The `InputDispatcher` is responsible for sending input events to applications.
310Its state dump shows information about which window is being touched, the
311state of the input queue, whether an ANR is in progress, and so on.
312
313 Input Dispatcher State:
314 DispatchEnabled: 1
315 DispatchFrozen: 0
316 FocusedApplication: name='AppWindowToken{41b03a10 token=Token{41bdcf78 ActivityRecord{418ab728 com.android.settings/.Settings}}}', dispatchingTimeout=5000.000ms
317 FocusedWindow: name='Window{41908458 Keyguard paused=false}'
318 TouchDown: false
319 TouchSplit: false
320 TouchDeviceId: -1
321 TouchSource: 0x00000000
322 TouchedWindows: <none>
323 Windows:
324 0: name='Window{41bd5b18 NavigationBar paused=false}', paused=false, hasFocus=false, hasWallpaper=false, visible=true, canReceiveKeys=false, flags=0x05800068, type=0x000007e3, layer=181000, frame=[0,1184][720,1280], scale=1.000000, touchableRegion=[0,1184][720,1280], inputFeatures=0x00000000, ownerPid=306, ownerUid=1000, dispatchingTimeout=5000.000ms
325 1: name='Window{41a19770 RecentsPanel paused=false}', paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x01820100, type=0x000007de, layer=151000, frame=[0,0][720,1184], scale=1.000000, touchableRegion=[0,0][720,1184], inputFeatures=0x00000000, ownerPid=306, ownerUid=1000, dispatchingTimeout=5000.000ms
326 2: name='Window{41a78768 StatusBar paused=false}', paused=false, hasFocus=false, hasWallpaper=false, visible=true, canReceiveKeys=false, flags=0x00800048, type=0x000007d0, layer=141000, frame=[0,0][720,50], scale=1.000000, touchableRegion=[0,0][720,50], inputFeatures=0x00000000, ownerPid=306, ownerUid=1000, dispatchingTimeout=5000.000ms
327 3: name='Window{41877570 StatusBarExpanded paused=false}', paused=false, hasFocus=false, hasWallpaper=false, visible=true, canReceiveKeys=false, flags=0x01811328, type=0x000007e1, layer=131005, frame=[0,-1184][720,-114], scale=1.000000, touchableRegion=[0,-1184][720,-114], inputFeatures=0x00000000, ownerPid=306, ownerUid=1000, dispatchingTimeout=5000.000ms
328 4: name='Window{41bedf20 TrackingView paused=false}', paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x01020300, type=0x000007e1, layer=131000, frame=[0,-1032][720,102], scale=1.000000, touchableRegion=[0,-1032][720,102], inputFeatures=0x00000000, ownerPid=306, ownerUid=1000, dispatchingTimeout=5000.000ms
329 5: name='Window{41908458 Keyguard paused=false}', paused=false, hasFocus=true, hasWallpaper=false, visible=true, canReceiveKeys=true, flags=0x15120800, type=0x000007d4, layer=111000, frame=[0,50][720,1184], scale=1.000000, touchableRegion=[0,50][720,1184], inputFeatures=0x00000000, ownerPid=205, ownerUid=1000, dispatchingTimeout=5000.000ms
330 6: name='Window{4192cc30 com.android.phasebeam.PhaseBeamWallpaper paused=false}', paused=false, hasFocus=false, hasWallpaper=false, visible=true, canReceiveKeys=false, flags=0x00000308, type=0x000007dd, layer=21010, frame=[0,0][720,1184], scale=1.000000, touchableRegion=[0,0][720,1184], inputFeatures=0x00000000, ownerPid=429, ownerUid=10046, dispatchingTimeout=5000.000ms
331 7: name='Window{41866c00 com.android.settings/com.android.settings.Settings paused=false}', paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x01810100, type=0x00000001, layer=21005, frame=[0,0][720,1184], scale=1.000000, touchableRegion=[0,0][720,1184], inputFeatures=0x00000000, ownerPid=19000, ownerUid=1000, dispatchingTimeout=5000.000ms
332 8: name='Window{4197c858 com.android.launcher/com.android.launcher2.Launcher paused=false}', paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x01910100, type=0x00000001, layer=21000, frame=[0,0][720,1184], scale=1.000000, touchableRegion=[0,0][720,1184], inputFeatures=0x00000000, ownerPid=515, ownerUid=10032, dispatchingTimeout=5000.000ms
333 MonitoringChannels: <none>
334 InboundQueue: length=0
335 ActiveConnections: <none>
336 AppSwitch: not pending
337 Configuration:
338 MaxEventsPerSecond: 90
339 KeyRepeatDelay: 50.0ms
340 KeyRepeatTimeout: 500.0ms
341
342#### Things To Look For ####
343
3441. In general, all input events are being processed as expected.
345
3462. If you touch the touch screen and run dumpsys at the same time, then the `TouchedWindows`
347 line should show the window that you are touching.