How nimafanniasl/mi439-repartitioner works
Main Components
• Mi439_repartition Module: This is the primary tool for dynamic partition resizing. It contains the standard Android update package structure under META-INF, with critical files like updater-script and update-binary that TWRP uses.
• Mi439_restore_original_partition_table Module: This module allows reverting to the stock partition layout. It is structured similarly to the repartition module.
• CI/CD Pipeline: Although secondary to the user-facing functionality, the presence of .github/workflows/build.yml indicates that the project uses GitHub Actions for building or validating the package.
Establish Relationships and Interactions
• How the user initiates flashing the Mi439_repartition.zip or Mi439_restore_partitions.zip via TWRP.
• That the update-binary serves as the executable component, while the updater-script contains the step-by-step instructions for repartitioning or restoring.
• That these operations may interact with the device’s bootloader and underlying partition management system.
• Optionally, include a branch representing the CI/CD process where code commits trigger builds and tests via GitHub workflows, ensuring the packages are correctly formed before release.
Architectural Patterns and Design Principles
• Since the project leverages the Android update package structure, it follows a declarative and script-based approach prescribed by the custom recovery environment.
• Separation of concerns: one module manages partition resizing while the other handles restoration.
• That the design prioritizes safety (for instance, always restoring before subsequent repartitioning) by incorporating rules in the update process.