# adb-sms **Repository Path**: dreamidea/adb-sms ## Basic Information - **Project Name**: adb-sms - **Description**: Shell脚本利用Android ADB发短信 - **Primary Language**: Shell - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 3 - **Created**: 2019-12-18 - **Last Updated**: 2023-08-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Shell脚本利用Android ADB发短信 适用场景:几十个或者几百个短信群发。通过短信群发系统要审核模板要缴费开通可能效率较低,可以直接适用ADB调试命令通过手机来群发短信。操作过程其实和人操作手机是一样的,只不过自动化了。 ## 背景 ADB发短信的命令: ```shell #填写短信内容 adb shell am start -a android.intent.action.SENDTO -d sms:13012345678,13087654321 --es sms_body "短信内容" #模拟发送 adb shell input keyevent 22 adb shell input keyevent 66 adb shell input keyevent 3 ``` ## 实现 用shell脚本从文本读入号码,群发短信,考虑到单发效率比较低,以指定数量为一组群发。 参照了一个用python写的脚本( https://blog.51cto.com/hackyao/2312555 ),用shell实现省去了python各种依赖环境的安装 ## 前提 * 一部android手机 * 手机开启调试模式,连接电脑 * 电脑有adroid tools环境,adb命令可用 ## 使用方法 ```shell ./send_sms.sh mobile.txt 25 ``` 其中mobile.txt是手机号码名单文本文件,一行一个号码。25指的是25个号码为一组群发短信