[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] NZedPred:
Some progress on the touch screen issue

The touch screen issue (touch screen is unresponsive, even within TWRP) has been a really difficult issue to try and track down, not least because there are no specific steps to reproduce the issue as it seems to happen randomly. However, I have finally been able to replicate it by following a certain procedure, albeit one that I wouldn't consider standard practice. Anyway...

How to restore functionality.

As we have known for some time, most of the time a full fastboot flash will restore touch screen functionality

Additionally, it is possible to restore from TWRP using either a mouse (e.g. through an OTG dongle) or using TWRP commands. However, this will not work with the Aroma installer - mouse input is not supported. This page here has some information on the TWRP commands via adb (e.g. adb shell twrp install /sdcard/name-of-zip-file.zip) https://www.pocketables.com/2014/10/using-twrps-new-adb-interface.html

So for the above, the options are to flash a recent nougat build without the Aroma installer (refer to my Nougat thread), or to flash an Oreo build without the Aroma installer. At present, there are only a few soak test Oreo builds that didn't use the aroma installer - they are here: https://www.androidfilehost.com/?w=files&flid=281529

With the limited testing I've been able to do, it seems necessary for a clean flash, to boot into the clean flash (at this point the touch screen will be back), and to complete the setup wizard through to the end (even if you elect to skip steps, as long as you finish it).

After that, you should be able to flash the most recent Oreo zips as desired. If for any reason it doesn't work, try the steps again.

How to recreate the issue.

Needless to say, don't follow these steps unless you want to break your touch screen functionality in order to try out the fix and to help me work out the different scenarios that work/don't work in getting functionality back!

I have managed to recreate the issue by doing the following. Of course, it is highly, highly unlikely that anyone actually did these steps, but it helps highlight what happens when it goes wrong.

Take a TWRP backup of system, data, boot from a TWRP flashable Oreo stock rom.

Perform a factory reset

Flash an old nougat TWRP stock rom (I have one I kept for myself of the January 2017 security patch release)

Boot into said Nougat rom and complete the setup

In TWRP restore the backup from the first step. NOTE - this backup does not contain the modem / firmware partition, which is not compatible with stock Oreo.

Reboot, and you will notice the following

You will bootloop at least once

Following this bootloop, if you finally get to the System, or try and go back to TWRP, you will no longer have touch screen functionality

At this point, even if you flashed the modem / firmware partitions (e.g. using the Soak Test 1 firmware zip I have on AFH) and factory reset, touch screen functionality would not return.

It seems that you need to go through the steps as above, i.e. full clean flash

of nougat

and boot into system.

What I think this means.

I'm now fairly confident that the underlying issue is linked to the flashing of the modem/firmware partition. As a general rule, only my TWRP Flashable Stock ROMs (Nougat and Oreo) will be touching that partition, so it is highly unlikely that anything other than my ROMs will experience the issue.

The underlying cause is of course more difficult to track down. I've recreated the issue by taking steps that I'm pretty certain a normal person wouldn't take. That suggests that there's an intermittent issue with either TWRP, the update-binary that I have been including with the zips, or something about the stock rom is failing on the first boot in isolated instances. It won't be related to the Aroma installer, as the first case of touch screen failure happened before I released a version with it.

UPDATE - I'm now fairly confident that the underlying issue is that the Oreo builds are not able to be applied safely over "old" nougat builds. So if, for example, you have the original Nougat build that the phones came with, and tried to upgrade to Oreo, you would get this issue. However, if you have a more recent release of Nougat (e.g. June 2018 security patch release), the Oreo upgrade would be fine. Additionally, what is probably important is the

most recent stock rom you had installed (and booted into)

.

To be safe, if you have never been on stock Oreo before, and you aren't sure what build of stock Nougat you were last on, upgrade to the latest stock Nougat builds before upgrading to stock Oreo.

Next steps.

Hopefully this information helps people out should they encounter this issue. If anyone does experience this, please take note of exact steps that were followed (i.e. everything - what you flashed in what order, what options were selected in the aroma installer, was it a clean flash, how did you do the factory reset, did you restore anything, etc) and send me this information.