[Moto Z2 Force  Guides, News, & Discussion] Technical:
What is Google’s Project Treble?

You should read here some Frequently Asked Questions (FAQ) thanks to Recognized Developer [MENTION=1915408]phhusson[/MENTION]

This is an index for (all) Treble Projects or also Generic System Image (GSI) list.

This is the known compatible device list.

This is a Guide to build Project Treble GSI ROMs from source

Motorola Z2 Force is NOT a Project Treble compatible device, but it IS a semi-compatible. This means that you can move toward Treble ROMs with some previous steps.

Moving from Lineage 15.1 toward Oreo Treble ROMs

1. Unlock your bootloader or, if it is already unlocked, you can, optionally, download and use a flashall solution to turn back to stock if necessary.

2. Flash and boot Lineage ROM 15.1. Here you have guides to do it. Better if you flash to both slots (changing between then via fastboot set_active other command. This is necessary to get boot and vendor partitions compatible with Treble images.

3.

Backup everything

you need (see step n.6 below).

4. Remove PINs, passwords, fingerprints.

Now you can follow the default flashing GSI procedures:

1. Download an Android 8.1 (Oreo) Treble system image (ARM 64 with partition type A/B in our case) and move it to phone sdcard (or external one).

2. Remove all PIN, password, fingerprint security and allow USB Debugging.

3. Uninstall Magisk and reboot the phone. Then reboot again into bootloader.

4. Boot (not flash) TWRP Treble (via fastboot boot <twrp.img file name>)

5. Flash the downloaded Treble system image.

6. Flash Open GApps (Platform ARM64, Android 8.1) (if the GSI image does not include them).

7. Factory reset (or wipe data, Dalvik and cache partitions). You'll lose all your data.

8. Boot the phone and set it up, allowing USB Debugging.

9. Boot TWRP image file and then flash zip file it to make it permanent.

10. Reboot into flashed TWRP (mandatory).

11. Flash Magisk and reboot.

Know issues - Oreo

1. So-called "Technicolor" bug when moving into or out dark mode, or when using Substratum themes, when icons and the screen got weird colors effects and stripes. Generally, you could boot into recovery and wipe Dalvik/Cache.

2. ViPER4Android not always compatible with Treble.

3. VoLTE.

Moving from Lineage 15.1 toward Pie Treble ROMs

1. Requirements: have an Oreo Treble ROM already running.

2. Download an Android 9.0 (Pie) Treble system image (ARM 64 with partition type A/B in our case) and move it to phone sdcard (or external one).

3. Remove all PIN, password, fingerprint security and allow USB Debugging.

4. Uninstall Magisk and reboot the phone. Then reboot again into bootloader.

5. If you do not have TWRP yet, flash TWRP image via fastboot flash <twrp.img file name>

6. Reboot into TWRP.

7. Flash the downloaded Treble system image.

8. Flash Open GApps (Platform ARM64, Android 9) (if the GSI image does not include them).

9. Check if vendor partition is mounted via TWRP. If not, mount it.

10. Flash POST-sGSI 3 zip file. More info here.

11. Reflash TWRP.

12. Factory reset (or wipe data, Dalvik and cache partitions). You'll lose all your data (not sdcard).

13. Boot the phone and set it up, allowing USB Debugging. Reboot into TWRP.

14. Flash Magisk and reboot.

Old method:

1-9: The same as above.

10. Flash POST-sGSI zip files -1- and -2-.

11. Flash the Permissiver zip.

12. Factory reset (or wipe data, Dalvik and cache partitions). You'll lose all your data (not sdcard).

13. Boot the phone and set it up, allowing USB Debugging. If you can't boot, return to TWRP, flash/sideload the FBE_Disabler zip and wipe data as stated here. In this last case, you'll lose all your data including sdcard.

14. Flash Magisk and reboot.

Know issues - Pie

1. Message on each boot: "Android System: There's an internal problem with your device. Contact your manufacturer for details". Solution proposed by [MENTION=4525023]palbadi[/MENTION]. In details, fix for vendor mismatch popup:

A. In a root file manager, backup both \vendor\build.prop and \system\build.prop files.

B. Open \system\build.prop original file with a root text editor. Copy the line with ro.build.fingerprint variable, for instance:

ro.build.fingerprint=Android/treble_arm64_bvN/phhgsi_arm64_ab:9/PQ1A.181105.017.A1/64:userdebug/test-keys

C. Open \vendor\build.prop original file with a root text editor. Find the the line with ro.build.fingerprint variable, for instance:

ro.vendor.build.fingerprint=motorola/nash/nash:8.0.0/OPXS27.109-34-10/5:user/release-keys

D. Paste the copied system variable over the vendor one (replace).

E. Save the \vendor\build.prop file.

F. Reboot.

2. ViPER4Android not always compatible with Treble.

3. VoLTE.

4. The combination of TWRP + Magisk could let you without WiFi. You can try not flashing TWRP in any steps above, just booting it: fastboot boot <twrp.file.name>.img

Moving from Lineage 16 toward Pie Treble ROMs

1. Requirements: have Lineage 16 (Pie) already running.

2. Download an Android 9.0 (Pie) Treble system image (ARM 64 with partition type A/B in our case) and move it to phone sdcard (or external one).

3. Remove all PIN, password, fingerprint security and allow USB Debugging.

4. Uninstall Magisk (if you have it) and reboot the phone. Then reboot again into bootloader.

5. If you do not have TWRP yet, flash TWRP image via fastboot flash <twrp.img file name>

6. Reboot into TWRP.

7. Flash the downloaded Treble system image.

8. Flash Open GApps (Platform ARM64, Android 9) (if the GSI image does not include them).

9. Factory reset (or wipe data, Dalvik and cache partitions). You'll lose all your data (not sdcard).

10. Boot the phone and set it up, allowing USB Debugging. Reboot into TWRP.

11. Flash Magisk and reboot.

Know issues - Pie

1. Message on each boot about Vendor is not up-to-date.

2. ViPER4Android not always compatible with Treble. There is a solution here.

3. VoLTE.

4. The combination of TWRP + Magisk could let you without WiFi. You can try not flashing TWRP in any steps above, just booting it: fastboot boot <twrp.file.name>.img

5. If anytime you lost Wi-Fi (or your Mac address become 02:00:00:00:00:00), see this post.

Support

Discord support channel.

XDA Treble-Enabled Device Questions and Answers.

XDA Treble-Enabled Device Guides, News, & Discussion.

Treble-Enabled ROMs Development.