Coder Social home page Coder Social logo

patcher-oss's Introduction

Boot Image Patcher [arm32 sar boot image patcher] v1 OSS

Patcher to make kernel boot ramdisk on ARM32 SaR devices.

EOL: necessary changes have been merged into magisk master

Not supported.

Requirements:

Windows:

  • 7-Zip (download and install)

Linux:

  • p7zip-full (install using your distro's package manager)

Common:

  • python (latest)
  • arm32-SAR boot image

Short Instructions:

  • Supply Android boot image as first argument to the main.py script
  • Flash the new boot image

patcher-oss's People

Contributors

r0rt1z2 avatar yaalex3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

patcher-oss's Issues

Doesn't work on Redmi 6 boot.img

Hello. I ran into a strange problem. Patcher works with Redmi 6A boot.img, but does not work with Redmi 6 boot.img. I'm trying to understand the reason. The log is attached

C:\Users\yarpopkov\Desktop\patcher-oss-main>python main.py boot.img
INFO: Found 7-Zip at: C:\Program Files\7-Zip\7z.exe
INFO: Unpacking kernel data...
INFO: Patching kernel data...
INFO: Packing kernel data...
Traceback (most recent call last):
  File "C:\Users\yarpopkov\Desktop\patcher-oss-main\main.py", line 192, in <module>
    main()
  File "C:\Users\yarpopkov\Desktop\patcher-oss-main\main.py", line 53, in main
    BootWork(in_fn)
  File "C:\Users\yarpopkov\Desktop\patcher-oss-main\main.py", line 82, in init
    p = Patch(zimg_fobj)
  File "C:\Users\yarpopkov\Desktop\patcher-oss-main\main.py", line 102, in init
    self.split_zimg(zimg_file)
  File "C:\Users\yarpopkov\Desktop\patcher-oss-main\main.py", line 138, in split_zimg
    raise Exception(
Exception: ERROR: Can't find offset of orig GZIP size field

C:\Users\yarpopkov\Desktop\patcher-oss-main>

Getting issue when running main.py

Getting the following issue

$ ./main.py ~/Documents/Redmi\ 8A\ Files/boot.img-zImage 
Traceback (most recent call last):
  File "/home/user/patcher-oss/./main.py", line 138, in <module>
    main()
  File "/home/user/patcher-oss/./main.py", line 35, in main
    raise Exception('File not found')
Exception: File not found

Can't patch latest Xiaomi Redmi 8A kernel

Traceback (most recent call last):
  File "/tmp/patcher-oss/./main.py", line 138, in <module>
    main()
  File "/tmp/patcher-oss/./main.py", line 36, in main
    Patch(zimg_fn)
  File "/tmp/patcher-oss/./main.py", line 49, in __init__
    self.split_zimg(zimg_fn)
  File "/tmp/patcher-oss/./main.py", line 68, in split_zimg
    raise Exception(
Exception: ERROR: Didn't find IMG magic number

Patch error

Когда я пытаюсь пропатчить свой boot.img программа выдает ошибки:
INFO: Found 7-Zip at: C:\Program Files\7-Zip\7z.exe
Traceback (most recent call last):
File "C:\Users\Владимир\Desktop\patcher-oss-main\main.py", line 201, in
main()
File "C:\Users\Владимир\Desktop\patcher-oss-main\main.py", line 56, in main
BootWork(in_fn)
File "C:\Users\Владимир\Desktop\patcher-oss-main\main.py", line 89, in init
p = Patch(zimg_fn)
File "C:\Users\Владимир\Desktop\patcher-oss-main\main.py", line 112, in init
self.split_zimg(zimg_fn)
File "C:\Users\Владимир\Desktop\patcher-oss-main\main.py", line 135, in split_zimg
d = mmap.mmap(zimg_file.fileno(), zimg_size, access=mmap.ACCESS_READ)
OSError: [WinError 8] Недостаточно ресурсов памяти для обработки этой команды

Раньше, когда я пытался распаковать с помощью сторонней утилиты она жаловалась на отсуствие рамдиска, но когда ссылка вела на сайт с этой утилитой у меня получилось пропатчить своё ядро

Модель телефона: Redmi 8a
Ссылка на ядро: https://drive.google.com/file/d/11cUZT4GAjT6530BIXR6FJPmQrjAQ5vCK/view?usp=sharing

How to Patch my boot img?

Hi,

I am using Redmi 8A (olivelite) device. I want to root my device, for which I need to patch my rom's boot image.

But in a video tutorial shown here, to patch boot image, we need to use this site and do like that.

But now the link is redirecting to this github and I don't have idea how to do that.

Please help.

usage confusing need more guide (and also facing many strange bugs?...)

I tried to run it on my PC(win10) but failed...

C:\Users\rightester\Desktop\temp>py
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
C:\Users\rightester\Desktop\temp>py main.py
  File "main.py", line 18
    Refer to README.md for additional instructions."""
                                                     ^
SyntaxError: invalid syntax

So I once tried to delete all the "f" before the string and it can run but will exit with low version warning

C:\Users\rightester\Desktop\temp>py main.py boot.img
ERROR: Python version too old. at least 3.9.0

(Oh no this is so weird, I just install the py 3.9.1 for this warning but it's still not working...)(actually 3.7.5 won't raise SyntaxError (?) (maybe it require only 3.9.0?)

Anyway, I annotated(#) that line, added a line "pass", and tried to run it again, and...

C:\Users\rightester\Desktop\temp>py main.py boot.img
ERROR: Can't found IMG magic number

oh...
the tested two boot.img files are Redmi7A MIUI global version and CN version, so maybe not the version's problem
I have no idea if I have properly settled down the environment

Can any more detailed guide or tutorial be added to this project for more easily getting started ?

I browse this repo because the redirect of the link patcher.yaalex.tk , thanks for this website I got my Redmi7A rooted. but there are other guys asking for the method to root and stuck on the step packing the boot img...

Sorry for disturbing, thanks for glancing, hope to be replyed soon(

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.