Control your Android from Linux... Only tested in Xiaomi Redminote4 (mido) (MIUI 10)
-
Enable ADB debugging in your android, and connect it to your linux and authorize it.
-
If you want to control it over network, then you need to open tcp port for ADB debugging service.
For this you need to root your android and run the following command in a terminal.
$ setprop service.adb.tcp.port 7091 $ stop adbd $ start adbd
You can change
7091
and set your custom port. If you want to revert to USB port then change the port to-1
.$ setprop service.adb.tcp.port -1 $ stop adbd $ start adbd
When connecting later don't forget to authorize your linux.
-
After setting up your android, to install mido run the
install.sh
script.You can run it from the current directory.
$ ./install.sh
-
configure
--ip XXX.XXX.XXX.XXX
--port XXXX
--adb-connection [tcp/usb]
--device-pin XXXX
--unlock-swipe-direction [up/down/left/right]
-
config
-
connect
-
wake
-
sleep / lock
--close-all
-
unlock
-
2cars
-
recent
--clear
-
home
-
back
-
vol+ [2,3,4...]
-
vol- [2,3,4...]
-
play
-
pause
-
next
-
previous / prev
-
search
--google
...More to come...