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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.