0

How to connect 2 smartphones via USB to get the 1st to control applications running on the 2nd?

I don't mean the connection to be limited to screen mirroring or off-lione file transfer only.

I need 1st smartphone to control applications running on 2nd smartphone in interactive mode, exactly as I can control applications run on Android board connected to PC via USB cable.

Ok, OTG and host mode supported since modern smartphones intended to work in parallel.

Another related question: How to start an application using android ADB tools?

A couple of examples:

adb shell am start -a android.intent.action.MAIN -n
com.android.settings/.Settings 

will launch Settings, and

adb shell am start -a android.intent.action.MAIN -n
com.android.browser/.BrowserActivity

will launch the Browser. If you want to point the Browser at a particular page, do this

adb shell am start -a android.intent.action.VIEW -n
com.android.browser/.BrowserActivity http://www.google.co.uk

From: How to run (not only install) an android application using .apk file?

follow-up 2

connected my 5.0.2 Android smartphone to 4.0.2 Android tablet via microUSB2USB cable inserted into OTG USB2micxroUSB to get microUSB on both hands Enabled usb debugging on both devices, run adb daemon on port 5038 on smartphone. None device connected, no TCPIP established In programming mode I need to select debugging app on tablet: one suggested by default is: com.android.partnerbrowsercustomizations.example other option is None Should I select the above or install one another, called ???

11
  • great related question, comments and answers with examples stackoverflow.com/questions/4567904/… "We can as well start an application by knowing application type and feeding it with data: adb shell am start -d "file:///sdcard/sample.3gp" -t "video/3gp" -a android.intent.action.VIEW
    – darius
    Aug 4, 2020 at 15:36
  • If an application can be started and run via adb, fed with data and if such application run generates output data, is it possible to fork and redirect that data to usb port for viewing, processing, saving on the 1st smartphone running adb ?
    – darius
    Aug 4, 2020 at 15:40
  • 1
    1st please don't post links to search engines because every body will get different search results. If you want to link to an external page include the link to the final page. 2nd please don't use comments for just adding info. Instead just edit the question.
    – Robert
    Aug 4, 2020 at 17:18
  • @iknow thank you for your edit help "adb shell am start -a android.intent.action.MAIN -n com.android.settings/.Settings" BTW not sure why select & C&P generated extra signs "adb shell am start -a android.intent.action.MAIN -n com.android.settings/.Settings" it must be MS Windows > Linux ASCII string conversion
    – darius
    Aug 5, 2020 at 18:20
  • If there any manual in htmlized / Javascript form, listing syntax to run every native Android app via ADB USB How to gues the following : "adb shell am start -a android.intent.action.VIEW -n com.android.browser/.BrowserActivity google.co.uk or adb shell input tap x y can broadcasted output from app run via ADB USB be redirected (fork) to USB interface for postprocessing by a script to keep interactive communication via USB continued ? how to get to more advanced examples or learning course on video ?
    – darius
    Aug 7, 2020 at 16:16

1 Answer 1

0

This looks like part of your answer: install the Termux app, and then adb to run within it. I have not tried this yet.

You must log in to answer this question.

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