Skip to content

Instantly share code, notes, and snippets.

@swissonid
Last active June 6, 2016 19:49
Show Gist options
  • Save swissonid/fc97d62e8cb1370178b1 to your computer and use it in GitHub Desktop.
Save swissonid/fc97d62e8cb1370178b1 to your computer and use it in GitHub Desktop.
Adds 10 Contact to your device
#!/bin/sh
contactstore=./contactstore
temp=~/.tempcontacts
cat ${contactstore}/*vcf > $temp
adb shell pm clear com.android.contacts
adb shell pm clear com.android.providers.contacts
adb push $temp /sdcard/contacts-import.vcf
adb shell am start -t "text/vcard" -d "file:///sdcard/contacts-import.vcf" -a android.intent.action.VIEW com.android.contacts
#adb shell input keyevent 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment