javaandroidandroid-studioadbroot

Import .VCF file by ADB


I have a .VCF file in my phone: /sdcard/contacts.vcf. I manually tried to import this file to the Android Contacts app and It worked well. However, when I tried with the below ADB command, I got a toast message: "Couldn't import VCard".

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

Android: One (LineageOS)

Device: Samsung S7(Rooted).

Is there anyone who can please help me?


Solution

  • Before I could import a .vcf file into the default contacts app of LineageOS I had change the following: