With the commands provided by ADB, it is very easy to import contacts from your PC into the Android emulator.
You first have to prepare a fixed-format contacts.vcf file, which is the Address Book store file in Android. The format is as follows:
begin:vcardversion:3.0n:15200000000;;;; TEL; type=cell:15200000000end:vcardbegin:vcardversion:3.0n:15200000011;;;; TEL; Type=cell:15200000011end:vcard
The imported commands are as follows:
# first clear the original address book contact adb-s emulator-5554 Shell pm Clear com.android.providers.contacts # will be the correct format of the Address Book file contacts.vcf, Import the Android emulator and wait for the emulator to refresh for a few seconds adb-s emulator-5554 push contacts.vcf/sdcard/contacts.vcf sleep 3 # from the file, Importing contacts into the Android emulator's address book, the import process is time dependent on the number of contacts. Adb-s emulator-5554 Shell am start-t "Text/x-vcard"-D "file:///sdcard/contacts.vcf"-a Android.intent.action.VIEW COM.A Ndroid.contacts Sleep 10
OK, if none of the above is a problem, the new contact information is added to the emulator's address book.
Import contacts to the Android emulator with the ADB command