[Motorola Razr 5G Guides, News, & Discussion] BigZucc:
I have been messing around with GSI roms on this device for a little over a month, and I've created some Magisk modules and an Xposed module to begin to fix the issues with the Cli display.

Disclaimers (READ THESE!!):

There are still a number of other issues with GSIs on this device, so I wouldn't recommend doing this if you use your razr as your main phone.

If you brick your device, it is your own responsibility. I am not responsible for any damage that my modules or advice might cause to your device. Do not blame me for bricking your device.

This is not written to be easy for beginners. If this is your first time modifying a device's firmware, I would advise against starting with this phone. But I would highly recommend you to start on a different device that has less restrictions and is much cheaper.

If I do not mention how to do something, you should look up a guide first before asking me. The guides that other people write are likely going to be much better and easier to understand than one I can write.

Please note that these modifications may not work on your device if the hardware is slightly different, even if it has the same model number as mine. These modifications are mainly a proof of concept, but I am open to modifying them to work on more devices.

If you are curious about how any of these modifications work, see the readme on the modules' github repositories.

By following the steps in this post, you accept that you may end up with either an expensive paperweight, or a mostly functional device with a GSI rom.

These modifications have been tested on my XT2071-3

First thing to do is to make sure you have a way of recovering your phone if it soft bricks. I downloaded the stock rom from lolinet. Make sure you have a rom that is the same version as your current rom. Motorola leaves anti-rollback enabled even if you have an unlocked bootloader.

If mess up, you can just restore it using fastboot (look up a guide)

If you really messed up, you can always try to use the "Rescue and Smart Assistant Tool", but that may be a last resort due to privacy concerns.

If you really really messed up, you may have to use a blank flash. I haven't ever had to use a blank flash, so I can't vouch for whether or not it will work. (don't do it if you don't have to)

The build number of the OS I used when installing the GSI is: RPSS31.Q1-40-34-15-10-15

Spoiler content hidden.

Spoiler content hidden.

Spoiler content hidden.

Spoiler content hidden.

Downloads:

Razr5G Synaptics Touchscreen Device Associations

Razr5G Foldable Device Fixes

Cli Lid Functions

Unofficial Lineage Recovery

While I could build my own GSI rom to deal with all of these issues, I chose not to since it would take more time. There is also another advantage of these modifications, which is that they can be applied to a wide variety of GSIs without having to modify each one manually.

Also, Motorola won't let a $1000+ phone boot with a modified vendor partition, for whatever reason.

This was my first time ever making a magisk module, my first time ever making an Xposed module, my first time ever working with the Android system on this low of a level, and my first time installing a GSI rom.

I may update this post with more progress in the future.