I want to call by sim2 using adb command (Dual sim state)
This is call using adb command
but default call is only sim1
adb shell am start -a android.intent.action.CALL -d 123-4567
Is there an adb command to change the default call in a dual sim situation?
call by sim2 setting using adb command
You can use the sim_slot as follows :
adb shell am start -a android.intent.action.CALL -d tel:<phone_number> --es sim_slot "1"
Where "1" corresponds to SIM 2.
To find out the current ID value run:
adb shell settings get global multi_sim_voice_call
Use this command to switch to the appropriate ID before calling:
adb shell settings put global multi_sim_voice_call <ID>
Related
I tried to use the following code, but reported to me "shell does not declare android.permission.REQUEST_INSTALL_PACKAGES"
adb shell am start -a android.intent.action.VIEW -t "application/vnd.android.package-archive" -d "file:///sdcard/Download/a.apk"
I am sad that for some reasons, adb install is not allowed, even if I run the following command, I still cannot install the application
adb shell settings put global verifier_verify_adb_installs 0
adb shell settings put global package_verifier_enable 0
logļ¼Failure [INSTALL_FAILED_VERIFICATION_FAILURE: adb install not allowed!]
I tried below commands for making outgoing call using ADB command and it's working
adb -s XYZWER56RITYDFS shell am start -a android.intent.action.CALL -d tel:555-5555
But not able to put call on HOLD I tried below command but its not working
adb -s XYZWER56RITYDFS shell am start -a android.intent.action.ON_HOLD
How can I achieve this using any adb keyevent or adb command to put ongoing call on hold.
This question already has answers here:
Enable/Disable NFC with ADB command
(6 answers)
Closed 5 years ago.
Is it possible to turn off/on (disable/enable) NFC with ADB for non-rooted Android device with v 6.0.1 version or higher?
i tried many stuff but it wont work for me.
Stuff i tried are:
Via ADB:
adb shell settings put global airplane_mode_toggleable_radios bluetooth,cell,wimax,nfc
adb shell am broadcast -a android.intent.action.airplane_mode_toggleable_radios
adb shell settings put global airplane_mode_on 1
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE
adb shell settings put global radio_nfc 0
adb shell am broadcast -a android.intent.action.radio_nfc
adb shell settings put global AIRPLANE_MODE_RADIOS 0
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE_RADIOS
adb shell settings put global NfcAdapter 0
adb shell am broadcast -a android.intent.action.NFC_adapter
adb shell settings put global airplane_mode_radios cell,bluetooth,nfc,wimax
adb shell content update --uri content://settings/global --bind value:s:'bluetooth,nfc,wimax' --where "name='airplane_mode_radios'"
also:
adb shell settings get global airplane_mode_radios
adb shell content query --uri content://settings/global --projection name:value --where "name='airplane_mode_radios'"
adb shell settings put global airplane_mode_radios "cell,nfc,wimax"
adb shell content update --uri content://settings/global --bind value:s:'cell,nfc,wimax' --where "name='airplane_mode_radios'"
adb shell settings put global airplane_mode_radios "cell,bluetooth,wifi,nfc,wimax"
adb shell content update --uri content://settings/global --bind value:s:'cell,bluetooth,wifi,nfc,wimax' --where "name='airplane_mode_radios'"
After restarting the device i can turn ON the airplane-mode with ADB but the nfc does NOT go off.
As i turn ON the airplane-mode on the native device (quick settings OR settings) it does go off!
Another one i tried is:
List the running services with:
adb shell service list
there you can read that nfc is running at number 9 " nfc: [android.nfc.INfcAdapter] "
try to disable with
adb shell pm hide com.android.nfc
does not work and throws:
Error: java.lang.SecurityException: Neither user 2000 nor current process has android.permission.MANAGE_USERS.
or:
adb shell pm grant EXAMPLE.android.services android.permission.WRITE_SECURE_SETTINGS
adb shell pm grant EXAMPLE.android.services android.permission.CHANGE_CONFIGURATION
-
following is working on devices up to Android 5x:
Enable/Disable NFC with ADB command
After playing around with Enable/Disable NFC with ADB command
On android Marshmallow (6.0.0 or 6.0.1)
Disable
service call nfc 5
Enable
~~service call nfc 6~~
Edit:
This doesn't seem to disable permanently, rebooting re-enables the service
Found the real answer!
svc nfc <enable|disable>
I found how to call , but even when the device has no sim card it returns no error, so it doesn't help me:
adb -s <device number> shell am start -a android.intent.action.CALL -d tel:55678888
You can read the content of telephony.registry by using - adb shell dumpsys telephony.registry and then parse it. Look for the value of mServiceState:
0 - In Service
1 - Out of Service
2 - Emergency Only
I would like to know how to retrieve specific hardware information, for example, from the camera, using an adb command. I would like to know if its possible to retrieve hardware ID or Physical device object name for example, to store these values.
Sdk:
adb shell getprop ro.build.version.sdk
Complete list:
adb shell getprop
Through the package manager:
adb shell pm list features
To retrieve detailed information about the camera
adb shell dumpsys media.camera
adb shell getprop
replace x with the prop. you want