Install android-tools if you haven't already:
pkg update ; pkg upgrade
pkg install android-tools
adb pair 127.0.0.1:port
| #!/usr/bin/env bash | |
| # Download: raw file is in https://gist.github.com/unique-EJ/64b2f43dfb5489a52a020114b374ffdc | |
| # curl can download the URL. | |
| # Usage: no options, puts command snippets into the Bash initialization file. | |
| declare edit_file="$(cat <<"EOF" | |
| # Edit a file. Line numbers - Meta key (Alt, Cmd, or Esc), N. | |
| function edit_file () { | |
| [[ ! -f "$1" || ! -w "$1" ]] && return 1; |
| # Linux command-line - AWK text processing language program. | |
| awk $'BEGIN { print "Type decimal (input) values to have the converted hexadecimal value output. CTRL-d to end." }\n{ printf "%s%x\\n", "Hex: ", $0 }' |
| #!/bin/bash | |
| # Send text to Android device using ADB, emulating keyboard input. | |
| # Based on a script from https://android.stackexchange.com/a/105881/223695 | |
| # and extended to support special characters. | |
| # CC BY-SA 3.0 - Share under same license, attribute the creator, indicate changes. | |
| # From Matthijs Kooijman's answer, https://android.stackexchange.com/a/176590/359828 | |
| if [[ "$1" != "" ]] | |
| then | |
| TEXT="$1" |
| # Start application, and X server, on a remote machine (SSH). | |
| # ". Xserver.sh [app name]", "pgrep [app name]" | |
| if [ $# -ge 1 ]; then | |
| app="$@" # The positional parameters (app). | |
| session="startlxde-pi" | |
| commands="\ | |
| cd /tmp/; mkfifo -m 607 .command; | |
| env echo -e \"declare DISPLAY=:0; \$(which ${session}) & | |
| ${app}\" > .command & |
Install android-tools if you haven't already:
pkg update ; pkg upgrade
pkg install android-tools
adb pair 127.0.0.1:port
Install the vino package.
You need to restart GNOME so that vino-server is started automatically when enabling the remote desktop feature. The remote desktop feature can usually be enabled in Settings > Sharing, however this only seems to be functional when NetworkManager is installed and functional. Alternative Desktop Environments
GRUB_INIT_TUNE="1000 334 1 334 1 0 1 334 1 0 1 261 1 334 1 0 1 392 2 0 4 196 2"
| adb shell am | |
| usage: am [subcommand] [options] | |
| usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>] | |
| [--R COUNT] [-S] [--opengl-trace] <INTENT> | |
| am startservice <INTENT> | |
| am force-stop <PACKAGE> | |
| am kill <PACKAGE> | |
| am kill-all | |
| am broadcast <INTENT> | |
| am instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w] |