Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

incremental update #42

Closed
nareto opened this issue Aug 29, 2022 · 2 comments
Closed

incremental update #42

nareto opened this issue Aug 29, 2022 · 2 comments

Comments

@nareto
Copy link

nareto commented Aug 29, 2022

I've seen this mentioned in various issues, but haven't grasped what the definitive solution is: the most recent firmware updates are only incremental, so they have only a payload.bin file and no boot.img, which is what is needed for Magisk.

In this case, how do we get the correct boot.img? I would rather avoid the alternative procedure described in the "Boot into Emergency Download (EDL) 9008 mode" section on Tho85's blog, because AFAIU it involves googling for some random binary file called prog_emmc_ufs_firehose_Sdm636_ddr.elf whose purpose I don't understand and which I can't anyways find from a trusted source

The long version: my specific situation and what I tried

I just received a MaxLumi2. At first I downloaded the latest firmware available on this page (3.2), however this seems not decryptable: when running the script on the update.upx I get ValueError: The decrypted data seems not a zip package

So I got my fingerprint:

$ adb shell "getprop ro.vendor.build.fingerprint"
ONYX/BOOX/BOOX:11/RKQ1.210614.002/200:userdebug/release-keys

and the usual MaxLumi2 strings from the GetBoxxUpxKeysApp (they are the same as ones in the README).

I built this url

http://en-data.onyx-international.cn/api/firmware/update?where={"buildNumber":0,"buildType":"user","deviceMAC":"","lang":"en_US","model":"MaxLumi2","submodel":"","fingerprint":"ONYX/BOOX/BOOX:11/RKQ1.210614.002/200:userdebug/release-keys"}

which however doesn't work. If I remove the fingerprint like this

http://en-data.onyx-international.cn/api/firmware/update?where={"buildNumber":0,"buildType":"user","deviceMAC":"","lang":"en_US","model":"MaxLumi2","submodel":"","fingerprint":""}

I do indeed get a JSON file with a download URL. The downloaded update.upx though is incremental (has only the payload, no boot.img), which brings me to the original question

@mrwm
Copy link

mrwm commented Sep 1, 2022

Hi @nareto, as the README noted,

Note 3: payload.bin can be extracted with https://github.com/cyxx/extract_android_ota_payload.


These are the steps I took to extract files for my device.

  1. Download the latest update.upx from README note 2
  2. Decrypt the file using the python script command from the README
  3. Clone the payload extraction tool and enter the folder
    • git clone https://github.com/cyxx/extract_android_ota_payload.git && cd extract_android_ota_payload
  4. Without any prep, the script won't work, so set up the python environment for the payload script with virtualenv
    • python3 -m venv venv
  5. Activate the environment with source venv/bin/activate
  6. Then use pip to install the required python modules
    • eg: pip install protobuf==3.20 (the script needs an old protobuf version)
  7. Make the extraction folder
    • eg: mkdir extract
  8. Then move payload.bin to the extract_android_ota_payload/ folder and run the payload script:
    • python3 extract_android_ota_payload.py payload.bin extract/
  9. Once you're done, deactivate the virtual environment with deactivate
  10. The extracted files should then be in the folder specified.

I hope this helps.

@nareto
Copy link
Author

nareto commented Sep 4, 2022

Thanks @mrwm ! Had somehow missed that in the README. Was able to get the boot.img and patch it in Magisk

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants