I made a thing do a thing
Custom Python script to push a section of the screen to the Kindle and use Fbink to display the image
KindleTermPV connecting to netcat to send the input events back
And Android x86 running in QEMU with video=600x800 passed on the kernel command-line
screen.py
Code:
import sys
import time
import paramiko
import pyscreenshot as ImageGrab
import signal
hostname = '192.168.86.125'
password = 'pass'
username = 'root'
def sigint_handler(signum, frame):
print('Exiting')
time.sleep(2)
ftp.close()
ssh.close()
signal.signal(signal.SIGINT, sigint_handler)
ssh = paramiko.SSHClient()
ssh.load_system_host_keys()
ssh.connect(hostname, username=username, password=password, compress=False)
ssh.exec_command("lipc-set-prop -- com.lab126.powerd preventScreenSaver 1")
while True:
im = ImageGrab.grab(bbox=(1320, 280, 1920, 1080))
im.save('/tmp/screen.png')
ftp=ssh.open_sftp()
ftp.put('/tmp/screen.png','/dev/screen.png')
stdin, stdout, stderr = ssh.exec_command("fbink -g file=/dev/screen.png -x 0 -y 0")
stdout.readlines()
mouse.sh
Code:
#!/bin/bash
sudo netcat -T -l -p 23 | while read -n 1 c; do
case "$c" in
($'\033')
read -t.001 -n2 r
case "$r" in
('[A') xdotool mousemove_relative -- 0 -10 ;;
('[B') xdotool mousemove_relative -- 0 10 ;;
('[D') xdotool mousemove_relative -- -10 0 ;;
('[C') xdotool mousemove_relative -- 10 0 ;;
esac;;
"") xdotool mousedown 1 && xdotool mouseup 1 ;;
esac; done