این اسکریپت رو امروز برای اضافه کردن مخاطبین به گوشیم نوشتم. اول شماره ها رو توی یه فایل (هر شماره در یک خط) بنویسید و بعد گوشی رو به سیستم وصل کنید و اسکریپت رو اجرا کنید.
#!/usr/bin/bash
IFS=$'\n'
list=`cat ~/shop-contacts`
index=1
for number in $list; do
    contact_name="shop_$index"
    adb shell am start -a android.intent.action.INSERT -t vnd.android.cursor.dir/contact -e name $contact_name -e phone $number
    adb shell input keyevent 4
    adb shell input keyevent 4
    adb shell input keyevent 4
    wait $pid
    ((index++))
    adb shell input keyevent 4
done
فایل حاوی شماره ها:
list=`cat ~/shop-contacts`
