How to run app on one device from another device? Is there a way to run an app (for example Gmail app) on a different device in the same wifi network? Conditions:


Two Android smartphones are in the same with network.  
The devices are controlled by the same person. 
The user runs the script/app on one device that starts Gmail app on the other device. 
There is no Internet connection in the network. Just the connection between the devices via WiFi.
No root access to both devices.
Use remote ADB.

First connect both devices with an OTG cable and a regular cable (or a C to C cable if applicable), and start an ADB shell, then type:

setprop service.adb.tcp.port 555
stop adbd
start adbd


You may want to run ifconfig to get the IP address.

Then you can disconnect the phone from cables and use wireless ADB. On your controller phone, run

adb connect xxx.xxx.xxx.xxx:5555
(tap [Authenticate] on the first phone)
adb shell monkey -p &lt;package&gt; -c android.intent.category.LAUNCHER 1