Simply tools & scripts for myself, but feel free to can use this for development, or etc.
To use this tools, unzip motorola stock rom zip and git clone
it into that.
bash extract-superimg.sh
The super.img will output to: ../ (Stock ROM directory)
The inside images will output to: output/
bash convert-to-sparse.sh
NOTE: For A14, Use extracted image directly. sparse image are not working with OTA update.
The sparse images will output to: output/raw/
This process needed for flashing via fastbootd, or use as prebuilt vendor image.
bash mount-all.sh
The images will mounted to:
- output/system/
- output/system/system_ext
- output/system/product
- output/system/vendor
After mount these, you can refer this guide to extract blobs and use it for custom rom developments.