To bulk import contacts in the Android emulator using the ADB command:
Using the commands provided by ADB, you can easily import contacts from your PC into the Android emulator in batches.
You first have to prepare a fixed-format VCF file, which is the Address Book store format file in Android.
The format is as follows:
BEGIN:VCARDVERSION:2.1N:; QiQi;;; Fn:qiqitel; Home:7474email; HOME:qiqi.comADR; HOME:;; QiQi;;;; END:VCARDBEGIN:VCARDVERSION:2.1N:; Re;;; Fn:retel; Home:73email; HOME:re.comADR; HOME:;; Re;;;; END:VCARDBEGIN:VCARDVERSION:2.1N:; Staill;;; Fn:stailltel; Home:782-455email; HOME:staill.comADR; HOME:;; Staill;;;; END:VCARDBEGIN:VCARDVERSION:2.1N:; Tian;;; Fn:tiantel; Home:8426email; HOME:tian.comADR; HOME:;; Tian;;;; END:VCARDBEGIN:VCARDVERSION:2.1N:; Uuu;;; Fn:uuutel; Home:888email; HOME:uuu.comADR; HOME:;; Uuu;;;; END:VCARDBEGIN:VCARDVERSION:2.1N:; Victory;;; Fn:victorytel; Home:842-8679email; HOME:victory.comADR; HOME:;; Victory;;;; End:vcard
The imported commands are as follows:
1 //Clear the contacts of the original contacts.2 3Adb-s emulator-5554Shell pm Clear com.android.providers.contacts4 5 6 //CONTACTS.VCF The correct format of the contacts file into the Android emulator and wait for the emulator to refresh for a few seconds7 8Adb-s emulator-5555Push contacts.vcf/sdcard/CONTACTS.VCF9 Ten One //from the file, import the contacts into the Address Book of the Android emulator, and the process will be time dependent on the number of contacts. A -Adb-s emulator-5554Shell am START-T"Text/x-vcard"-D"FILE:///SDCARD/CONTACTS.VCF"-A Android.intent.action.VIEW com.android.contacts
View Code
Bulk import contacts contacts into the Android emulator