What I'm trying to do
I am trying to open a tab in Chromium using ADB. What I'm trying to accomplish is opening a tab within chromium using their hotkeys. I'm trying to hit this line of code from their source: https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java?rcl=120f241e3761e263d28f1b9194bd6cbf7aa56efd&l=215
Here's the various things I've tried:
Using Android Key Events: https://developer.android.com/reference/android/view/KeyEvent
adb shell sendevent /dev/input/event0 1 114 1
adb shell sendevent /dev/input/event0 1 48 1
adb shell sendevent /dev/input/event0 1 114 0
adb shell sendevent /dev/input/event0 1 48 0
Using Android key codes from source: https://android.googlesource.com/kernel/msm.git/+/android-msm-hammerhead-3.4-kk-r1/include/linux/input.h
adb shell sendevent /dev/input/event0 1 97 1
adb shell sendevent /dev/input/event0 1 20 1
adb shell sendevent /dev/input/event0 1 97 0
adb shell sendevent /dev/input/event0 1 20 0
Using keyevent inputs
adb shell input keyevent KEYCODE_CTRL_RIGHT
adb shell input keyevent KEYCODE_T
An alternative way (but not what I'm trying to accomplish)
One way I've managed to accomplish opening a tab, but not a way I'm in favor of us using intents. I want to open the tab using the actual key events instead of using this intent.
Way that does open a tab:
adb shell am start -a "android.intent.action.VIEW" -d "google.com"