0

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

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

1 Answer 1

0

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 <package> -c android.intent.category.LAUNCHER 1
4
  • There is no way to use root access on the second device. I've edited the question. Commented Aug 28, 2017 at 5:03
  • Root is not required actually.
    – iBug
    Commented Aug 28, 2017 at 5:12
  • Ok, I will try it. Will this work with multiple devices controlled by one? Commented Aug 28, 2017 at 5:18
  • Repeat the adb connect line multiple times with different IPs.
    – iBug
    Commented Aug 28, 2017 at 7:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .