💾 Archived View for alaskalinuxuser.ddns.net › 2023-11-16.gmi captured on 2024-09-29 at 00:22:13. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
">
77w, https://alaskalinuxuser3.ddns.net/wp-content/uploads/2023/11/aospdtgen-
300x273.png 300w" sizes="(max-width: 677px) 100vw, 677px" />
Last post we looked at extracting/downloading your OTA zip from your phone.
Now, if you have your OTA zip you can use dumpyara to extract it, and then
aospdtgen to create a LineageOS tree for it. Here I use my OTA zip which I
downloaded (cf1f7c3fa1596c87f045cee1508823c98667fa06.zip) :
$ pip3 install dumpyara
$ python3 -m dumpyara ./cf1f7c3fa1596c87f045cee1508823c98667fa06.zip
Dumpyara
Version 1.0.2
[INFO] Step 1 – Extracting archive
[INFO] Step 2 – Preparing partition images
[INFO] Found multipartition image: payload.bin
Extracting ‘boot.img’
Extracting ‘dtbo.img’
Extracting ‘lk.img’
Extracting ‘md1img.img’
Extracting ‘preloader.img’
Extracting ‘product.img’
Extracting ‘scp.img’
Extracting ‘spmfw.img’
Extracting ‘sspm.img’
Extracting ‘system.img’
Extracting ‘tee.img’
Extracting ‘vbmeta.img’
Extracting ‘vbmeta_system.img’
Extracting ‘vbmeta_vendor.img’
Extracting ‘vendor.img’
[INFO] Pattern super not found
[INFO] Step 3 – Extracting partitions
[INFO] Extracting boot
[INFO] Cloning AIK…
[INFO] Extracting dtbo
[INFO] Extracting product
[INFO] Extracting system
[INFO] Extracting vendor
[INFO] Step 4 – Finalizing
[INFO] Creating all_files.txt
Done! You can find the dump in /home/alaskalinuxuser/Documents/phones/catS42g/
OTA_from_10_to_12/cf1f7c3fa1596c87f045cee1508823c98667fa06
alaskalinuxuser@alaskalinuxuser-CF-52NKE102M:~/Documents/phones/catS42g/
OTA_from_10_to_12$
$ pip3 install aospdtgen
$ mkdir aospdtgen
$ python3 -m aospdtgen -o ./aospdtgen/ ./
cf1f7c3fa1596c87f045cee1508823c98667fa06/
Android device tree generator
Version 1.0.0
[INFO] Figuring out partitions scheme
[WARNING] Unknown HAL type native
[INFO] Parsing build props and device info
[INFO] Parsing fstab
[INFO] Extracting boot image
[INFO] Cloning AIK…
[INFO] Getting list of rootdir files
[INFO] Generating proprietary files list
Done! You can find the device tree in aospdtgen
And then you have a LineageOS device tree, ready to build! Typically you would
use it to build the same version of Android your OTA zip file was for. Here is
a link to the tree I got from aospdtgen so you can take a look at the final
results:
https://gitlab.com/alaskalinuxuser/aosp_device_cat_s42
Linux – keep it simple.