Giter VIP home page Giter VIP logo

breed-mt7621-xiaomi-r3g.bin-reset-button-changer's Introduction

Breed bootloader breed-mt7621-xiaomi-r3g.bin reset button patcher

Description

This script purpose is to change the GPIO number of the reset button in the bootloader file BREED compiled for xiaomi mi router 3g. Tested with breed versions r1338, r1286.

Smartbox devices

Reset button:

  • GPIO 7 - Beeline SmartBox PRO/WiFire S1500.NBN
  • GPIO 14 - Beeline SmartBox TURBO+/Beeline SmartBox TURBO/Etisalat Sercomm S3
  • GPIO 4 - Beeline SmartBox GIGA
  • GPIO 3 - Beeline SmartBox Flash/MTS WG430223

Usage

To change reset GPIO number to 5: ./breed_magic --src breed.bin --dst breed_mod.bin -r 5

Passed tests

This script was tested with breed-mt7621-xiaomi-r3g.bin versions: r1286, r1338 Patched binary for smartbox flash/giga/turbo/pro was tested on smartbox flash with boot breed from RAM. boot breed 0x80001000

Patching and testing video

Screen recording with the script patching demo and testing its launch on a real device https://raw.githubusercontent.com/legale/breed-mt7621-xiaomi-r3g.bin-reset-button-changer/main/demo.mp4

IMPORTANT

repo has compiled lzma version 4.62. Higher versions are not working.

breed-mt7621-xiaomi-r3g.bin-reset-button-changer's People

Contributors

legale avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

hassan4mz

breed-mt7621-xiaomi-r3g.bin-reset-button-changer's Issues

FileNotFoundError: [Errno 2] No such file or directory: 'tmp_lzma_data.bin'

anch@DELL-WORK:~/pad_anch/breed-mt7621-xiaomi-r3g.bin-reset-button-changer$ ./breed_magic -s breed-mt7621-xiaomi-r3g/breed-mt7621-xiaomi-r3g_r1338.bin -d breed_turbo.bin -r 14
Checking original breed image...
Looking for breed magic number 0x37540178 928252280... 0x06388 25480
Breed header offset 0x06388 25480
Lzma data offset 0x06398 25496
Lzma bin data length 0x1652e 91438
Checking uimage header data length... ok
Checking breed header lzma length... ok
Checking uimage header data checksum... ok
Checking uimage header checksum... ok
Checking nand header checksum... ok
Looking for breed magic number 0x37540178 928252280... 0x06388 25480
Breed header offset 0x06388 25480
Lzma data offset 0x06398 25496
Lzma bin data length 0x1652e 91438
Decompressing lzma data...
lzma properties:
dict_size 0x2000000 33554432
lc 0x1 1
pb 0x2 2
lp 0x2 2
Exec: ./lzma d tmp_lzma_data.lzma tmp_lzma_data.bin 2>/dev/null
Done.
Traceback (most recent call last):
File "./breed_magic", line 430, in
ret = patch_breed(kwargs["src"], kwargs["dst"], kwargs["rstkey"], breed_magic_int)
File "./breed_magic", line 271, in patch_breed
breed_bin_data = unpack_lzma_bin(breed["lzma_bin"])
File "./breed_magic", line 84, in unpack_lzma_bin
with open(dst, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'tmp_lzma_data.bin'

хотя файл tmp_lzma_data.lzma создался
anch@DELL-WORK:~/pad_anch/breed-mt7621-xiaomi-r3g.bin-reset-button-changer$ ll tmp_lzma_data.lzma
-rw-r--r-- 1 anch anch 91438 Apr 19 11:12 tmp_lzma_data.lzma

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.