找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 9846|回复: 43

[其他设备] R1 OtaService 反编译的一些发现, 手动本地升级方法

[复制链接]
发表于 2019-2-19 10:28 | 显示全部楼层 |阅读模式
本帖最后由 kavana 于 2019-2-21 09:38 编辑

引用楼下的发现, 手动本地升级方案

升级方法1(简单)
1. otaprop.txt里的ota_byRouter=2
2. ota_debug_url=http://192.168.0.xxx/update_normal.zip (自己架的http服务)
3. ota_debug_md5= update_normal.zip的MD5值
4. 将otaprop.txt adb push 到 /sdcard/, update_normal.zip放到服务器根目录
4. 重启后会提示要重新连接网络,按提示连接网络后就会自动开始升级
5. 升级后,要把/sdcard/里的otaprop.txt和update_debug.zip删除,否则又会提示连接网络然后再次升级


升级方法2
1:架设http 服务器, 劫持域名 p.to
2:服务器根架设 otaupgrade 文件夹里面放入md5.txt 及 update.zip 两个文件,其中update.zip 就是升级文件(有的版本需要升级多次,一次一次升级,升级顺序同以前ota顺序)md5.txt的内容为update.zip的md5值,同otaprop.txt值
3:建立一个 wifi名为 Phicomm_Factory_OTA 密码为 fei123456 的无线(与http服务器通网段)
4:改otaprop.txt Otabyroute=后值由0改为1
5:上传 otaprop.txt 到 /sdcard/
6:重启, 长按按钮重新连接wifi













反编译到的参数:
以下配置从/sdcard/ota.txt中读取出, 决定重启后进入的模式

#工厂模式
ota_byRouter = 1
FACTORY_UPDATE_BIN_FILE = "/sdcard/update_factory.zip";
FACTORY_UPDATE_BIN_URL = "http://p.to/otaupgrade/update.zip";
FACTORY_UPDATE_INFO_FILE = "/sdcard/update_factory_md5andfilesize.txt";
FACTORY_UPDATE_INFO_URL = "http://p.to/otaupgrade/md5.txt";
工厂模式对wifi有需求

#Debug 模式
ota_byRouter = 2
ota_debug_url=
ota_debug_md5=

#Debug1 模式
ota_byRouter = 3
ota_debug1_url=
ota_debug1_md5=

当然 ota_byRouter = 0 就是默认的模式了, 所以有4个升级模式

是否能进入对应模式还需要测试, 设备不在身边

反编译后的源码下载 https://u3946967.ctfile.com/fs/3946967-337361124



点评

应该可以搭配使用,免去自建http R1 升级文件 自建服务器 最新可用 https://www.right.com.cn/forum/thread-462830-1-1.html  发表于 2019-2-20 13:23

评分

参与人数 2恩山币 +2 收起 理由
yf*** + 1 率全体恩山路由党以及党魁向你学习!
Gee*** + 1 强大的恩山!(以下重复1万次)

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
发表于 2019-3-4 21:57 | 显示全部楼层
实测最简单的方法:

adb connect xx.xx.xx.xx
adb push otaprop.txt
adb reboot

otaprop.txt内容如下:
  1. #Update 'ota_init_upgrade_flag' value
  2. #Sun Jan 21 00:00:04 GMT+08:00 2018
  3. ota_debug1_md5=
  4. ota_init_upgrade_flag=1
  5. update_cfg_version=1.1
  6. ota_fw_bin_md5=4bab3b0d58690475cf24c861dd805359
  7. ota_enviro_model=0
  8. ota_debug1_ssid=
  9. ota_byRouterMD5=
  10. ota_pre_fw_ver=1.0.0.3331
  11. ota_debug_url=http://3.301055.xyz/file/ota/firmware/incremental-ota-3331-3448.zip
  12. ota_debug1_psw=
  13. ota_fw_bin_url=http://home.phicomm.com/file/ota/firmware/incremental-ota-3331-3448.zip
  14. ota_update_mode=initial_update
  15. ota_mqtt_ifbyBG=0
  16. ota_bootthenpublish=0
  17. ota_debug1_url=
  18. ota_cur_fw_ver=1.0.0.3448
  19. ota_byRouter=2
  20. ota_fw_bin_size=10633740
  21. ota_debug_md5=4bab3b0d58690475cf24c861dd805359
复制代码


升级成功后:
adb connect xx.xx.xx.xx
adb shell sh rm /sdcard/otaprop.txt

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 10:36 | 显示全部楼层
可以啊,支持楼主,R1复活有望
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 10:45 | 显示全部楼层
居然是http的链接
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 14:06 | 显示全部楼层
帮顶帮顶帮顶
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 14:26 | 显示全部楼层
这意思是工厂模式能够本地升级?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 14:33 来自手机 | 显示全部楼层
楼主牛逼了,今晚回家试。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 15:40 | 显示全部楼层

可见factory模式要链接一个wifi

本帖最后由 1976105947 于 2019-2-19 15:41 编辑

/*
* Decompiled with CFR 0_132.
*/
package com.phicomm.speaker.otaservice.upgrade;

public class SysOTAGlobal {
    public static final String[] CLEANUP_IGNORE_LIST;
    public static final boolean DEBUG_HTTP = true;
    public static final boolean DEBUG_MQTT = true;
    public static final boolean DEBUG_OTA_SERVICE = true;
    public static final boolean DEBUG_SYSTEM_MONITOR = true;
    public static final boolean DEBUG_UPGRADER = true;
    public static final String DEFAULT_CFG_VERSION = "1.1";
    public static final String DEVICE_HW_PROPERTY = "ro.build.fxhwmodel";
    public static final String DEVICE_HW_VERSION = "V3.0.0";
    public static final String DEVICE_MODE = "R1";
    public static final String DEVICE_TYPE = "phicomm_echo";
    public static final String FACTORY_OTA_KEY = "fxotamode";
    public static final String FACTORY_OTA_VALUE = "factory";
    public static final String FACTORY_WIFI_PSW = "fei123456";
    public static final String FACTORY_WIFI_SSID = "Phicomm_Factory_OTA";
    public static final String FILE_PATH_AGING_TEST_AUDIO = "";
    public static String OTA_CFG_FILE_LOCAL;
    public static final String OTA_CFG_FILE_NAME = "/sdcard/otaprop.txt";
    public static String OTA_LOG_FILE_PATH;
    public static final int SYS_REBOOT_TIME = 600;

    static {
        OTA_LOG_FILE_PATH = "/sdcard/otaservice/log/";
        OTA_CFG_FILE_LOCAL = "otaprop.txt";
        CLEANUP_IGNORE_LIST = new String[]{OTA_CFG_FILE_NAME, "/sdcard/update_normal.zip.tmp", "/sdcard/update_test.zip.tmp", "/sdcard/update_debug.zip.tmp", "/sdcard/update_factory.zip.tmp", "/sdcard/update_factory_md5andfilesize.txt", "/sdcard/unidata", "/sdcard/unisound"};
    }
}
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 15:42 | 显示全部楼层
1976105947 发表于 2019-2-19 15:40
/*
* Decompiled with CFR 0_132.
*/

可见factory模式要连接一个wifi

点评

Phicomm_Factory_OTA  发表于 2019-2-19 15:53
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 18:58 来自手机 | 显示全部楼层
按照你提供的反编译内容已经成功了,谢谢。

点评

请问能写个简单教程吗?  详情 回复 发表于 2019-2-19 19:34
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 19:17 | 显示全部楼层
prioner 发表于 2019-2-19 18:58
按照你提供的反编译内容已经成功了,谢谢。

大神  求教

点评

过一阵会有教程的,节日快乐。过程我发微信群了。  详情 回复 发表于 2019-2-19 19:30
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 19:30 来自手机 | 显示全部楼层
1976105947 发表于 2019-2-19 19:17
大神  求教

过一阵会有教程的,节日快乐。过程我发微信群了。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 19:34 | 显示全部楼层
prioner 发表于 2019-2-19 18:58
按照你提供的反编译内容已经成功了,谢谢。

请问能写个简单教程吗?

点评

简单描述 1:架设http 服务器 2:服务器根架设 otaupgrade 文件夹里面放入md5.txt 及 update.zip 两个文件,其中update.zip 就是升级文件(有的版本需要升级多次,一次一次升级,升级顺序同以前ota顺序)md5.txt的内  详情 回复 发表于 2019-2-19 19:58
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 19:37 | 显示全部楼层
prioner 发表于 2019-2-19 19:30
过一阵会有教程的,节日快乐。过程我发微信群了。

哥  求拉微信交流群  微信号a1976105947
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 19:44 | 显示全部楼层
prioner 发表于 2019-2-19 19:30
过一阵会有教程的,节日快乐。过程我发微信群了。

节日快乐
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-19 19:58 来自手机 | 显示全部楼层
shanlan 发表于 2019-2-19 19:34
请问能写个简单教程吗?

简单描述
1:架设http 服务器
2:服务器根架设 otaupgrade 文件夹里面放入md5.txt 及 update.zip 两个文件,其中update.zip 就是升级文件(有的版本需要升级多次,一次一次升级,升级顺序同以前ota顺序)md5.txt的内容为update.zip的md5值,同otaprop.txt值
3:建立一个 wifi名为 Phicomm_Factory_OTA 密码为 fei123456 的无线(与http服务器通网段)
4:改otaprop.txt Otabyroute=后值由0改为1
5:上传 otaprop.txt 到 /sdcard/
6:重启

点评

问下第5步 otaprop.txt 到 /sdcard/ 怎么上传  详情 回复 发表于 2019-2-19 22:09
请问MD5.txt的内容是什么格式的?有例子吗?  详情 回复 发表于 2019-2-19 20:05
好的,谢谢你,我现在试试。  详情 回复 发表于 2019-2-19 20:01
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-26 00:31

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表