Phase 05 — Build Adaptation
Status: 🔴 Not started. Blocked on: Phase 04 (NA2 firmware must be extracted first).
The core porting work. Given that a direct partition-level port is impossible (different SoC, different kernel, different partition scheme — see Compatibility Matrix), the viable approaches are:
- APK extraction (highest confidence): Extract Onyx apps (knote2, kreader2, AI assistant, etc.) from NA2 system.img and sideload on NA1 Android 10.
- GSI approach: Flash Android 11 GSI on NA1 using NA1’s own vendor partition (Treble is enabled, VNDK 29). Then install NA2 Onyx apps.
- Feature-level port: Cherry-pick specific NA2 improvements as APK updates.
APK Extraction Procedure (Approach 1)
# Mount NA2 system.img
sudo mount -o loop,ro firmware/na2-v4.1.1-extracted/system.img /mnt/na2-system
# Extract target APKs
cp /mnt/na2-system/app/knote2-release/knote2-release.apk /tmp/
cp /mnt/na2-system/app/kreader2-release/kreader2-release.apk /tmp/
# ... repeat for all desired apps
# Sideload on NA1
adb install /tmp/knote2-release.apk
fstab Adaptation (for system image approach)
NA2 fstab uses f2fs for userdata and UFS-specific encryption flags (inlinecrypt_optimized / emmc_optimized). NA1 uses ext4 with FDE footer encryption. The fstab.emmc variant in NA2’s vendor is the closest starting point but still requires changes to match NA1’s static partition layout (no super partition, no logical flag).
Key changes needed: remove logical flag from system/vendor/product/system_ext, change userdata FS from f2fs to ext4, change encryption to forceencrypt=footer, remove slot-select flags.