本帖最后由 johnnyit 于 2019-10-11 10:17 编辑
POST /remote/ota/v2 HTTP/1.1
Host: api.mina.mi.com
Accept: */*
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Connection: keep-alive
Cookie: xx
Accept-Language: zh-cn
Content-Length: 358
Accept-Encoding: br, gzip, deflate
User-Agent: MiSoundBox/2.0.41 CFNetwork/978.0.7 Darwin/18.5.0
Pragma: no-cache
Cache-Control: no-cache
checksum=62c355fbae2104aa60519734893f86a5&deviceId=xx--xx&extra={"cfe":1000002,"linux":1,"rootfs":1,"weight":1,"sqafs":1,"ramfs":1}&hardware=S12A&requestId=EIaICW2rNvhmwD515YuG2OonkkYcG0&url=http://www.abc.com/mico_all.bin&version=1.44.4
#Cookie :补全
以上代码为POST请求数据。
替换自己的bin文件即可http://www.abc.com/mico_all.bin
收集的bin 下载地址:mico_all_f86a5_1.44.4.bin
mico_all_6f987_1.24.14.bin
mico_all_a3691_1.24.5.bin
https://bigota.miwifi.com/xiaoqiang/rom/s12a/mico_all_c731c_1.52.1.bin
自行选择对应的bin文件。
降级后出现异常请初始化小爱音箱,或升级最新版本即可解决。
扩展:
经过一下午的分析解析了小爱音箱的bin文件,修改了ssh登录,封装后发现无法安装。
在自定义升级过程中发现有固件验证,暂无突破,后续工作等大神接入。
小爱同学系统目录
补充内容:curl 请求
需要补全Cookie&设备ID&requestId三个参数
url=https%3A//bigota.miwifi.com/xiaoqiang/rom/s12a/mico_all_f86a5_1.44.4.bin为需要升级/降级的固件地址。
curl -H "Host: api.mina.mi.com" -H "Accept: */*" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -H "Cookie: userId=xxx;serviceToken=xxx;cUserId=xxxx;sn=xxx" -H "Accept-Language: zh-cn" -H "User-Agent: MiSoundBox/2.0.41 CFNetwork/978.0.7 Darwin/18.5.0" -H "Pragma: no-cache" -H "Cache-Control: no-cache" --data-binary "checksum=62c355fbae2104aa60519734893f86a5&deviceId=设备ID&extra=%7B%22cfe%22%3A1000002%2C%22linux%22%3A1%2C%22rootfs%22%3A1%2C%22weight%22%3A1%2C%22sqafs%22%3A1%2C%22ramfs%22%3A1%7D&hardware=S12A&requestId=随机数&url=https%3A//bigota.miwifi.com/xiaoqiang/rom/s12a/mico_all_f86a5_1.44.4.bin&version=1.44.4" --compressed https%3A//api.mina.mi.com/remote/ota/v2
请求返回内容
{"code":0,"message":"Success","data":""}
附件为python可执行脚本
ota_v2.py
(1.23 KB, 下载次数: 296)
|