V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
gstqc
V2EX  ›  分享发现

Android 当二奶机, Remote Bot for Telegram + Termux(Termux:Boot, Termux:API)真是神器

  •  
  •   gstqc · 2018-01-29 13:42:26 +08:00 · 10465 次点击
    这是一个创建于 2268 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Remote Bot for Telegram 可以控制手机大部分设置和收发短信,拍照录像录音定位都可以
    Termux(Termux:Boot, Termux:API)开机直接开启 sshd,或者其他命令行工具,然后可以通过 ssh 和 Termux:API 控制系统

    如果有需要,也可以写个程序开机启动,比如 Python + Telegram Bot API,然后通过 Telegram 给 bot 发指令到手机执行
    当然,跑个 web server 也是非常简单的事情

    目前二奶号和 Nexus 4 丢在家里插着充电,都不用带手机了
    第 1 条附言  ·  2018-01-29 17:41:44 +08:00


    Remote Bot for Telegram 支持的功能列表:
    Bot commands:

    /start - start working with bot

    /help - show bot commands

    /sms - read or send SMS
    /sms send - send SMS
    /sms send +7123456 - send SMS to phone number +7123456
    /sms send Mike - send SMS to contact with name 'Mike'

    /call - phone call

    /callshistory - show calls history

    /contacts - show contacts

    /ring_mode - show ring mode
    /ring_mode [mode] - update ring mode, [mode] can be: normal, silent or vibrate

    /battery - show battery info

    /bluetooth - show bluetooth state
    /bluetooth [state] - update bluetooth state, [state] can be: on or off

    /wifi - control wifi state (on/off)

    /gps - enable/disable gps, on/off

    /sync - control auto sync state (on/off)

    /notify - send messages to notification bar

    /flashlight - on/off flashlight

    /apps - Open favorite apps, /apps "app name" - open selected favourite app directly

    /volume - show or change volume levels

    /clipboard - copy text to device clipboard or read device clipboard

    /system_info - system information

    /version - Remote Bot version

    /playback - play uploaded media or voice
    * Premium (left 5 trial requests)

    /player - control playback
    * Premium (left 5 trial requests)

    /gallery - show photo gallery
    * Premium (left 5 trial requests)

    /photo - take photo
    * Premium (left 5 trial requests)

    /rec - record audio
    * Premium (left 5 trial requests)

    /location - device location on the map
    /location last - show last location
    * Premium (left 5 trial requests)

    /device_search - search your device by loud alarm
    * Premium (left 5 trial requests)

    /download - upload files to your device
    * Premium (left 5 trial requests)

    /get_file - get file from device
    * Premium (left 5 trial requests)

    /install - install apk
    * Premium (left 5 trial requests)

    /detectmotion - Detect motion and take photo
    * Premium (left 4 trial requests)

    接下文
    第 2 条附言  ·  2018-01-29 17:44:25 +08:00
    接上文

    /tts - text to speech
    * Premium (left 5 trial requests)

    /videorec - record video
    * Premium (left 5 trial requests)

    /screenshot - take screenshot
    * Premium (left 5 trial requests)

    /screen_rec - record screen (Need Root)
    * Premium (left 5 trial requests)

    /taskmanager - close selected running application
    * Premium (left 5 trial requests)

    /script - execute js script, example: rc.startApp("com.example.packagename"), more: https://remote-bot.com/script/
    * Premium (left 5 trial requests)

    /shell - Command Line Terminal, /shell "cd storage; mkdir example" - execute shell command directly
    * Premium (left 5 trial requests)

    /tasker - call Tasker commands, /tasker "taskname" - execute Tasker task directly
    * Premium (left 5 trial requests)

    /restore_backup - Restore/Backup keyboard, aliases, etc.
    * Premium (left 5 trial requests)

    /log - bot conversation log
    * Premium (left 4 trial requests)

    /reboot - reboot device (need Root)
    * Premium (left 5 trial requests)

    /fastboot - reboot to fastboot
    * Premium (left 5 trial requests)

    /recovery - reboot to Recovery Mode
    * Premium (left 5 trial requests)

    /shutdown - power off device (need Root)
    * Premium (left 5 trial requests)
    18 条回复    2018-09-25 14:21:42 +08:00
    myhomedog
        1
    myhomedog  
       2018-01-29 14:10:23 +08:00
    看看可否写个教程?
    34C
        2
    34C  
       2018-01-29 14:41:00 +08:00
    我的安卓二奶机装了个 ifttt 转发短信,平时也是扔在家里充着电,反正会打那个电话的都是骚扰电话
    20015jjw
        3
    20015jjw  
       2018-01-29 16:08:54 +08:00 via Android
    termux 确实强
    woscaizi
        4
    woscaizi  
       2018-01-29 16:31:26 +08:00 via iPhone
    跑 web server 外部可以访问吗?有公网 IP 吗?确实很方便。
    gstqc
        5
    gstqc  
    OP
       2018-01-29 17:17:59 +08:00
    @woscaizi 你手机是什么 IP 就什么 IP
    可以在手机上跑一些 VPN 客户端或者内网穿透工具,把 web server 在公网服务器上映射出去
    gstqc
        6
    gstqc  
    OP
       2018-01-29 17:28:18 +08:00
    @myhomedog 1. 手机安装 Remote Bot for Telegram,部分高级功能需要付费解锁,目前付费途径只有 Google Play
    然后按照流程点几下就创建好 bot 了
    如果你想在其他 Telegram 上控制 bot,在 Remote Bot for Telegram 里填一下帐号的用户名,客户端会校验这个用户名
    然后在 Telegram 上给 bot 发消息可以了

    2. 安装 Termux,Termux:Boot 和 Termux:API 是 Termux 的两个插件,在 Play 市场是收费的,不过本身源码是开源的,可以下载第三方打包的 apk
    然后 pkg install openssh 就可以安装 ssh 客户端和服务端,根据 Termux:Boot 的文档创建个启动项目,这样开机就会启动 Termux 并启动你指定的程序比如 sshd
    剩余的,和普通 Linux 基本一样,你可以安装 nginx, php, python, mysql 等等

    0. Telegram 需要跨墙
    huanxianghao
        7
    huanxianghao  
       2018-01-29 17:53:23 +08:00
    刚好我也有个二奶安卓机啊,多谢,我回去试试。
    wellsc
        8
    wellsc  
       2018-01-29 17:59:13 +08:00
    IFTTT 也很好用
    wangkq
        9
    wangkq  
       2018-01-29 19:53:22 +08:00
    感谢楼主 又拓宽了自己的视野 正好瞅着每天两个手机。有个问题想问一下,bot 上传短信和未接电话这个有次数限制吗?
    gstqc
        10
    gstqc  
    OP
       2018-01-29 20:00:04 +08:00
    @wangkq 没有
    如果有需求,又装有 Play Store 的话,可以解锁 Premium,$2.49
    greenskinmonster
        11
    greenskinmonster  
       2018-01-29 20:07:43 +08:00 via Android
    谢谢分享,有点意思的样子
    Citrus
        12
    Citrus  
       2018-01-29 20:36:49 +08:00
    Remote Bot for Telegram 这个有点怂啊。。。不开源,权限还这么大,你怎么知道它把你的信息发到哪去了。。。
    gstqc
        13
    gstqc  
    OP
       2018-01-29 20:55:44 +08:00 via Android
    @Citrus 理论上,Remote Bot for Telegram 只需要和 Telegram 以及 Google Play 连接
    有小动作的话,还是比较明显的
    Citrus
        14
    Citrus  
       2018-01-29 21:21:00 +08:00 via iPhone
    @gstqc 可是,安卓并没有按域名限制 App 访问外网的接口。。。如果后台偷偷搞,还真不太好发现啊。。。总不能抓包一抓抓一天吧。
    missdeer
        15
    missdeer  
       2018-01-29 21:58:37 +08:00 via Android
    termux 真神器
    P99LrYZVkZkg
        16
    P99LrYZVkZkg  
       2018-01-30 10:06:42 +08:00
    多谢,已买。
    brotherlegend
        18
    brotherlegend  
       2018-09-25 14:21:42 +08:00
    楼主,好像锁屏后 ssh 进手机的 termux 就很卡。 有没有什么办法能解决呢?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3609 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 04:53 · PVG 12:53 · LAX 21:53 · JFK 00:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.