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