Adb push contacts to Phone imports default to SIM. How to change the behavior to adb push to Phone Account?

1.1k Views Asked by At

Whenever I try to import contacts using adb with a command like :

adb shell am start -t text/vcard -d file:///sdcard/Folder1/vcard.vcf -a android.intent.action.VIEW com.android.contacts

The contacts are pushed to SIM.

Traversing to this screen : " Contacts App -> Settings -> Account ". I see "SIM" as an account. I have to manually add another account for "Phone". Thereafter the adb push work as expected and imports contacts to Phone.

How do we achieve this using adb commands, without manual intervention ?

1

There are 1 best solutions below

2
marmor On

This setting is internal to the Contacts app so you can't control it via ADB or any API.

You can potentially create a little app that takes a vcard file from the sdcard and saves the contacts on it to the Phone, but I don't think this is what you're looking for.