Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Note for Non-Nexus 4 users: if your device supports OTG, buy an OTG cable (comes very cheap) connect a standard PC mouse and the device to it and use the mouse to navigate the device.


Since the USB debugging is enabled and authorized, you can make good use of KeyEvents. Use input command to simulate up, down, left, and right navigational turns and enter.

Command:

adb shell input keyevent KEYCODE          # adb shell input: give further options

Examples:

adb shell input keyevent 22                # navigates one block rightward
adb shell input keyevent KEYCODE_DPAD_DOWN # navigates one block downward
adb shell input keyevent DPAD_LEFT         # navigates one block leftward

Relevant key codes:

19 -->  "KEYCODE_DPAD_UP" 

20 --> "KEYCODE_DPAD_DOWN" 21 --> "KEYCODE_DPAD_LEFT" 22 --> "KEYCODE_DPAD_RIGHT" 23 --> "KEYCODE_DPAD_CENTER"

(See more key codes herehere - by Rene Barbosa)

To simulate ENTER, use key code 66. 23 works too.

Use the key codes in combination. For example, when SuperSU app asks me to allow or deny root privileges to an app, I use the key codes 19, 20, 22 and 66 to simulate a tap on OK.


You can always use adb shell input tap X Y but you need the correct X and Y coordinates for the tap. You'll have to enable Pointer location under Developer settings as first step. Since the touchscreen is not working, finding the right coordinates is a hit and miss here. You would succeed with trial and error, should you choose this method.

Note for Non-Nexus 4 users: if your device supports OTG, buy an OTG cable (comes very cheap) connect a standard PC mouse and the device to it and use the mouse to navigate the device.


Since the USB debugging is enabled and authorized, you can make good use of KeyEvents. Use input command to simulate up, down, left, and right navigational turns and enter.

Command:

adb shell input keyevent KEYCODE          # adb shell input: give further options

Examples:

adb shell input keyevent 22                # navigates one block rightward
adb shell input keyevent KEYCODE_DPAD_DOWN # navigates one block downward
adb shell input keyevent DPAD_LEFT         # navigates one block leftward

Relevant key codes:

19 -->  "KEYCODE_DPAD_UP" 

20 --> "KEYCODE_DPAD_DOWN" 21 --> "KEYCODE_DPAD_LEFT" 22 --> "KEYCODE_DPAD_RIGHT" 23 --> "KEYCODE_DPAD_CENTER"

(See more key codes here - by Rene Barbosa)

To simulate ENTER, use key code 66. 23 works too.

Use the key codes in combination. For example, when SuperSU app asks me to allow or deny root privileges to an app, I use the key codes 19, 20, 22 and 66 to simulate a tap on OK.


You can always use adb shell input tap X Y but you need the correct X and Y coordinates for the tap. You'll have to enable Pointer location under Developer settings as first step. Since the touchscreen is not working, finding the right coordinates is a hit and miss here. You would succeed with trial and error, should you choose this method.

Note for Non-Nexus 4 users: if your device supports OTG, buy an OTG cable (comes very cheap) connect a standard PC mouse and the device to it and use the mouse to navigate the device.


Since the USB debugging is enabled and authorized, you can make good use of KeyEvents. Use input command to simulate up, down, left, and right navigational turns and enter.

Command:

adb shell input keyevent KEYCODE          # adb shell input: give further options

Examples:

adb shell input keyevent 22                # navigates one block rightward
adb shell input keyevent KEYCODE_DPAD_DOWN # navigates one block downward
adb shell input keyevent DPAD_LEFT         # navigates one block leftward

Relevant key codes:

19 -->  "KEYCODE_DPAD_UP" 

20 --> "KEYCODE_DPAD_DOWN" 21 --> "KEYCODE_DPAD_LEFT" 22 --> "KEYCODE_DPAD_RIGHT" 23 --> "KEYCODE_DPAD_CENTER"

(See more key codes here - by Rene Barbosa)

To simulate ENTER, use key code 66. 23 works too.

Use the key codes in combination. For example, when SuperSU app asks me to allow or deny root privileges to an app, I use the key codes 19, 20, 22 and 66 to simulate a tap on OK.


You can always use adb shell input tap X Y but you need the correct X and Y coordinates for the tap. You'll have to enable Pointer location under Developer settings as first step. Since the touchscreen is not working, finding the right coordinates is a hit and miss here. You would succeed with trial and error, should you choose this method.

replaced http://android.stackexchange.com/ with https://android.stackexchange.com/
Source Link

Note for Non-Nexus 4 users: if your device supports OTG, buy an OTG cable (comes very cheap) connect a standard PC mouse and the device to it and use the mouse to navigate the device.


Since the USB debugging is enabled and authorized, you can make good use of KeyEvents. Use input command to simulate up, down, left, and right navigational turns and enter.

Command:

adb shell input keyevent KEYCODE          # adb shell input: give further options

Examples:

adb shell input keyevent 22                # navigates one block rightward
adb shell input keyevent KEYCODE_DPAD_DOWN # navigates one block downward
adb shell input keyevent DPAD_LEFT         # navigates one block leftward

Relevant key codes:

19 -->  "KEYCODE_DPAD_UP" 

20 --> "KEYCODE_DPAD_DOWN" 21 --> "KEYCODE_DPAD_LEFT" 22 --> "KEYCODE_DPAD_RIGHT" 23 --> "KEYCODE_DPAD_CENTER"

(See more key codes here - by Rene Barbosa)

To simulate ENTER, use key code 66. 23 works too.

Use the key codes in combination. For example, when SuperSU app asks me to allow or deny root privileges to an app, I use the key codes 19, 20, 22 and 66 to simulate a tap on OK.


You can always use adb shell input tap X Y but you need the correct X and Y coordinates for the tap. You'll have to enable Pointer locationenable Pointer location under Developer settings as first step. Since the touchscreen is not working, finding the right coordinates is a hit and miss here. You would succeed with trial and error, should you choose this method.

Note for Non-Nexus 4 users: if your device supports OTG, buy an OTG cable (comes very cheap) connect a standard PC mouse and the device to it and use the mouse to navigate the device.


Since the USB debugging is enabled and authorized, you can make good use of KeyEvents. Use input command to simulate up, down, left, and right navigational turns and enter.

Command:

adb shell input keyevent KEYCODE          # adb shell input: give further options

Examples:

adb shell input keyevent 22                # navigates one block rightward
adb shell input keyevent KEYCODE_DPAD_DOWN # navigates one block downward
adb shell input keyevent DPAD_LEFT         # navigates one block leftward

Relevant key codes:

19 -->  "KEYCODE_DPAD_UP" 

20 --> "KEYCODE_DPAD_DOWN" 21 --> "KEYCODE_DPAD_LEFT" 22 --> "KEYCODE_DPAD_RIGHT" 23 --> "KEYCODE_DPAD_CENTER"

(See more key codes here - by Rene Barbosa)

To simulate ENTER, use key code 66. 23 works too.

Use the key codes in combination. For example, when SuperSU app asks me to allow or deny root privileges to an app, I use the key codes 19, 20, 22 and 66 to simulate a tap on OK.


You can always use adb shell input tap X Y but you need the correct X and Y coordinates for the tap. You'll have to enable Pointer location under Developer settings as first step. Since the touchscreen is not working, finding the right coordinates is a hit and miss here. You would succeed with trial and error, should you choose this method.

Note for Non-Nexus 4 users: if your device supports OTG, buy an OTG cable (comes very cheap) connect a standard PC mouse and the device to it and use the mouse to navigate the device.


Since the USB debugging is enabled and authorized, you can make good use of KeyEvents. Use input command to simulate up, down, left, and right navigational turns and enter.

Command:

adb shell input keyevent KEYCODE          # adb shell input: give further options

Examples:

adb shell input keyevent 22                # navigates one block rightward
adb shell input keyevent KEYCODE_DPAD_DOWN # navigates one block downward
adb shell input keyevent DPAD_LEFT         # navigates one block leftward

Relevant key codes:

19 -->  "KEYCODE_DPAD_UP" 

20 --> "KEYCODE_DPAD_DOWN" 21 --> "KEYCODE_DPAD_LEFT" 22 --> "KEYCODE_DPAD_RIGHT" 23 --> "KEYCODE_DPAD_CENTER"

(See more key codes here - by Rene Barbosa)

To simulate ENTER, use key code 66. 23 works too.

Use the key codes in combination. For example, when SuperSU app asks me to allow or deny root privileges to an app, I use the key codes 19, 20, 22 and 66 to simulate a tap on OK.


You can always use adb shell input tap X Y but you need the correct X and Y coordinates for the tap. You'll have to enable Pointer location under Developer settings as first step. Since the touchscreen is not working, finding the right coordinates is a hit and miss here. You would succeed with trial and error, should you choose this method.

added 448 characters in body
Source Link
Firelord
  • 25.3k
  • 21
  • 126
  • 292

Note: for Non-Nexus 4 users Non-nexus 4 users,: if your device supports OTG, buy an OTG cable (comes very cheap) connect a standard PC mouse and the device to it and use the mouse to navigate the device.


Since the USB debugging is enabled and authorized, you can make good use of KeyEvents. Use input command to simulate up, down, left, and right navigational turns and enter.

Command:

adb shell input keyevent KEYCODE          # adb shell input: give further options

Examples:

adb shell input keyevent 22                # navigates one block rightward
adb shell input keyevent KEYCODE_DPAD_DOWN # navigates one block downward
adb shell input keyevent DPAD_LEFT         # navigates one block leftward

Relevant key codes:

19 -->  "KEYCODE_DPAD_UP" 

20 --> "KEYCODE_DPAD_DOWN" 21 --> "KEYCODE_DPAD_LEFT" 22 --> "KEYCODE_DPAD_RIGHT" 23 --> "KEYCODE_DPAD_CENTER"

(See more key codes here - by Rene Barbosa)

To simulate ENTER, use key code 66. 23 works too.

Use the key codes in combination. For example, when SuperSU app asks me to allow or deny root privileges to an app, I use the key codes 19, 20, 22 and 66 to simulate a tap on OK.


You can always use adb shell input tap X Y but you need the correct X and Y coordinates for the tap. You'll have to enable Pointer location under Developer settings as first step. Since the touchscreen is not working, finding the right coordinates is a hit and miss here. You would succeed with trial and error, should you choose this method.

Note: Non-nexus 4 users, if your device supports OTG, buy an OTG cable (comes very cheap) connect a standard PC mouse and the device to it and use the mouse to navigate the device.


Since the USB debugging is enabled and authorized, you can make good use of KeyEvents. Use input command to simulate up, down, left, and right navigational turns and enter.

Command:

adb shell input keyevent KEYCODE

Examples:

adb shell input keyevent 22                # navigates one block rightward
adb shell input keyevent KEYCODE_DPAD_DOWN # navigates one block downward
adb shell input keyevent DPAD_LEFT         # navigates one block leftward

Relevant key codes:

19 -->  "KEYCODE_DPAD_UP" 

20 --> "KEYCODE_DPAD_DOWN" 21 --> "KEYCODE_DPAD_LEFT" 22 --> "KEYCODE_DPAD_RIGHT" 23 --> "KEYCODE_DPAD_CENTER"

(See more key codes here - by Rene Barbosa)

To simulate ENTER, use key code 66. 23 works too.

Use the key codes in combination. For example, when SuperSU app asks me to allow or deny root privileges to an app, I use the key codes 19, 20, 22 and 66 to simulate a tap on OK.

Note for Non-Nexus 4 users: if your device supports OTG, buy an OTG cable (comes very cheap) connect a standard PC mouse and the device to it and use the mouse to navigate the device.


Since the USB debugging is enabled and authorized, you can make good use of KeyEvents. Use input command to simulate up, down, left, and right navigational turns and enter.

Command:

adb shell input keyevent KEYCODE          # adb shell input: give further options

Examples:

adb shell input keyevent 22                # navigates one block rightward
adb shell input keyevent KEYCODE_DPAD_DOWN # navigates one block downward
adb shell input keyevent DPAD_LEFT         # navigates one block leftward

Relevant key codes:

19 -->  "KEYCODE_DPAD_UP" 

20 --> "KEYCODE_DPAD_DOWN" 21 --> "KEYCODE_DPAD_LEFT" 22 --> "KEYCODE_DPAD_RIGHT" 23 --> "KEYCODE_DPAD_CENTER"

(See more key codes here - by Rene Barbosa)

To simulate ENTER, use key code 66. 23 works too.

Use the key codes in combination. For example, when SuperSU app asks me to allow or deny root privileges to an app, I use the key codes 19, 20, 22 and 66 to simulate a tap on OK.


You can always use adb shell input tap X Y but you need the correct X and Y coordinates for the tap. You'll have to enable Pointer location under Developer settings as first step. Since the touchscreen is not working, finding the right coordinates is a hit and miss here. You would succeed with trial and error, should you choose this method.

Source Link
Firelord
  • 25.3k
  • 21
  • 126
  • 292
Loading