Problems installing Lineage on Moto G5 w TWRP TWRP is fine.

I have lineage-15.1-20180415-UNOFFICIAL-cedric.zip in the Downloads folder on the 'phone.

On attempting to flash this, TWRP fails with: "Updater process ended with ERROR: 255".

Advice elsewhere suggested unzipping the package, then removing the first 2 lines of file at META_INF>Com>Google>Android>UpdaterScript. These refer to the 'Cedric' device name - but I have no real idea what they mean.....

I did this, but as I'm on a mac, could not follow the instructions relating to re-creating the archive as they were Windows specific ('Add to rar' was suggested). So I tried straight zip archiving.

Attempting to flash the archive thus created, TWRP now fails with : "Invalid zip file format!".

Would be grateful for advice on how to create the appropriate file format using a mac.

I have an app called 'Keka', which offers as options 7z, Zip, Tar, Gzip, Bzip2. Are any of these appropriate?

Thank you!
I installed yesterday with latest TWRP (3.2.1-0) and same lineage image as you (lineage-15.1-20180415-UNOFFICIAL-cedric.zip) and got the same error.

Try again and after failing, in TWRP go to Advanced -> Copy Log. Get the log file in your computer (adb pull /sdcard/recovery.log, you may need to change location of the log file) and open it with any editor or just cat recovery.log.

If you see a line saying:

E:Can't execute '/tmp/updater': Exec format error


Then it probably is due to having the bad TWRP. You need the 64 bits one instead of the regular one. You can get it from https://androidfilehost.com/?w=files&amp;flid=236353. Flash this new TWRP and then Lineageos and optionally gapps.

BTW I didn't need to mess with the zip image, I used the downloaded one without any modifications.