How toraidl/coloros_port works
This repository is a ColorOS ROM porting and packaging project for supported OnePlus and Oppo devices. The documented user workflow supplies a base ROM and a port ROM to port.sh; the intended result is an automatically ported package. The tree contains image extraction and conversion tools, filesystem/configuration patchers, device-specific release and overlay assets, and OTA/flash utilities. The README does not document the script’s internal call sequence, and port.sh was not sampled, so those connections are shown as unverified rather than asserted.
Main entry points: port.sh Port orchestrator · imgextractor.py Image extraction · functions.sh Shared functions · lpunpack.py Dynamic partition unpack
Components 18
Port workflow
- Port orchestrator
port.sh - Shared functions
functions.sh
Image processing
- Dynamic partition unpack
bin/lpunpack.py - Image extraction
bin/imgextractor/imgextractor.py - Ext4 image reader
bin/imgextractor/ext4.py - Dat image conversion
bin/Linux/x86_64/sdat2img.py
ROM adaptation
- SELinux context patch
bin/contextpatch.py - Filesystem config patch
bin/fspatch.py - Smali method patch
bin/patchmethod.py - Advanced Smali patch
bin/patchmethod_v2.py - VBMeta patch
bin/patch-vbmeta.py - Device overlays
devices/OnePlus8T/overlay - OP4E5D release rules
devices/OP4E5D/releasetools.py - OnePlus9R release rules
devices/OnePlus9R/releasetools.py
Package and flash
- OTA packaging tools
otatools/bin - Device flashing tools
bin/flash - Ported ROM package
Other components
- ROM porter
Connections 17
- ROM porter → Port orchestrator: runs with ROMs
README.md - Port orchestrator → Dynamic partition unpack: may unpack
- Port orchestrator → Image extraction: may extract
- Image extraction → Ext4 image reader: imports
bin/imgextractor/imgextractor.py - Port orchestrator → Dat image conversion: may convert
- Port orchestrator → SELinux context patch: may patch
- Port orchestrator → Filesystem config patch: may patch
- Port orchestrator → Smali method patch: may patch
- Port orchestrator → Advanced Smali patch: may patch
- Port orchestrator → VBMeta patch: may patch
- Port orchestrator → Device overlays: may apply
- Port orchestrator → OP4E5D release rules: may configure
- Port orchestrator → OnePlus9R release rules: may configure
- Port orchestrator → OTA packaging tools: may package with
- Port orchestrator → Ported ROM package: produces
- Ported ROM package → Device flashing tools: may flash via
- Port orchestrator → Shared functions: may use