I'm making a node.js app that control calls in android phone, I'm using the npm mudule ADB and was able to make calls as bellow:
adb -s <serialno> shell am start -a android.intent.action.CALL -d tel:123-456
Unfortunately I was not able to manage the audio and control it from my app.
My question is:
Is there a way to send and receive the voice between my application and the phone (Without using any third party like twilio)?
Any help will be appreciated.
Related
actually I'm trying to launch amazon prime app using adb commands in python ,but I'm not able to open the app if it is present in the device ,its getting opened only if the app is in home screen .I have to open the app where ever its present on my device???please help me out.
I'm trying in win 10
you can use "am start -n" commands.
adb shell am start -n com.test/com.test.TestActivity
I have a third party application in my android phone.
The application offers a service at 127.0.0.1:30002.
I don't know the name of service.
Is there a way to find out whether that tcp service is up or not using adb or some other means.
Also what is the use of adb reverse.
Can i run a server in host pc and forward that server on android using adb reverse.
I am completely new to android, so please be brief.
Thanks in advance.
To find which app using specific port:
1. $ cat /proc/net/tcp - This will give you a list of open ports and the UId (unique application ID) of the port's owner.
2. & cat /data/system/packages.list | grep '<The UID you just found>' - This will give you the app name connected to this UID.
3. ps |grep '<the app name>' Will tell you if the app service is running.
What is adb reverse?
adb reverse tells your phone use a port of your local machine (e.g laptop).
Assume you use the command:
adb reverse tcp:80 tcp:3000
Now when your phone tries to access http://localhost:3000/ your request will be routed to localhost:80 of your laptop.
Is it possible to simulate or mimic a call coming in on an Android device programmatically from the device (not connected to a computer)? I am doing a safety demo about the dangers of calls while driving and I would prefer not to have to create my own copy of the call app.
Yes you can!
Use adb for that, for emulators you can also use the android-studio tools.
adb -s <serial> shell am start -a android.intent.action.CALL -d tel:0612345678
Where <serial> should be your device or emulator id (like emulator-5555)
If you want to do it on the device itself, you can try to call yourself (yes it kind of works on most devices).
I have been exploring various options with adb by connecting to real device. Went thru the android documents.
By reading random documents, i found out that i can open a webpage directly by adb using
adb shell am start -a android.intent.action.VIEW -d http://www.wikipedia.org
or i can send BT turn On request using
adb shell am start -a android.bluetooth.adapter.action.REQUEST_ENABLE
I am wondering, if i can find all such functions at one place or how to explore more about what all could be done using adb.
Here is a collection of ADB commands , i am collected from various sites & books
Please go through this . Feel free to ask any doubts regarding these commands
I have a requirement to integrate an android application with the ADB Daemon in order to pass commands to it (my Android application) through the USB interface.
Is this possible ?
My intention, is to plug this Android device to a Linux device and allow the Linux device to pass commands to the Android application via USB.
Therefore, since ADB is already implemented, and the ADB drivers for Linux also exist, I was wondering whether it would be easier to leverage this to allow the kind of communication I require.
You can use Activity Manager through adb shell.
For example, "adb shell am broadcast " will send broadcast intent to attached device.
Then your app can handle it with broadcast receiver.