Android Question I need help : Control another Android device with your phone (UDP)

mickeyk600

Member
Licensed User
Longtime User
Hello

I am looking to be able to remote control an Android rooted device using an Android phone device ( not rooted)

Similar to the described and shown example in this link:

https://www.b4x.com/android/forum/t...ol-the-desktop-with-your-phone.60887/#content

The controller side of the above example is perfect and needs no changes

The server(controlled device) in the above example is written for a PC in B4J and I would like it to be written in B4A and run on a rooted Android device


Any help will be appreciated
 

mickeyk600

Member
Licensed User
Longtime User
Basically the controlling android phone will be a mouse pad for the controlled rooted Android over UDP (same as in the Example in the link on post 1)
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Similar to TeamViewer, Vysor and AirDroid, I guess then. From a PC, it is easier since you can use ADB.
From Android to Android it is much more complicated....

Basically,
1) you need to find a way to communicate between the devices (which you seem to have already sorted out). You could use also Bluetooth, WifiDirect, WifiHotSpot.
2) Using the communication protocol you've set up, you can transfer screenshots from the rooted device to the controlling device and display them. Alternatively, you can send a video which creates a much smoother experience.
3) Then you need to trap touch actions, X and Y coordinates on the controlling device taking place on the displayed images and send them to the rooted device.
4) When the rooted device receives the X and Y (and action type such as a tap, long-click, slide, zoom-pinch), it needs to perform said actions. For this you need Accessibility Services.
5) and so forth...

I am working on a similar project, partly commercial for a client and for my own purposes.
I have implemented what mentioned above and it is working fine. However, I still need to glue them together, optimize code, do lots of testing and decide for alternative strategies if necessary.
If you are interested, you can contact me in PM to discuss this further.
 
Upvote 0
Top