[TWRP] A8M Ported Moto One 5G Ace TWRP (An Experimental Work In Progress)

Search This thread

Tomspector

Senior Member
  • Haha
Reactions: Articul8Madness

h3xmind

Senior Member
Oct 20, 2015
72
32
Moto G 5G
I have a request to the developers.
Can you please build this twrp?
I'm trying to build it.
But I don't know how to solve the error.
I don't think I can build it.
I’ll definitely try asap. Just to be clear, I develop compilers and interpreters for programming languages, some pretty low-level stuff. I use the linux environment. I played some time ago with Android development, created a match 3 game and some other minor apps. I have more than a decade of development experience in different areas. I unlocked pretty much every phone I had and installed custom roms. But I‘ve never built a twrp. However, this should not prevent me from successfully building it. I’m just saying this to let you know that it might take some extra time to get to the solution.

May I ask what error are you getting? Do you have experience in software development?
 
  • Like
Reactions: Articul8Madness

PEACH-PIT

Senior Member
Jan 22, 2018
104
25
I’ll definitely try asap. Just to be clear, I develop compilers and interpreters for programming languages, some pretty low-level stuff. I use the linux environment. I played some time ago with Android development, created a match 3 game and some other minor apps. I have more than a decade of development experience in different areas. I unlocked pretty much every phone I had and installed custom roms. But I‘ve never built a twrp. However, this should not prevent me from successfully building it. I’m just saying this to let you know that it might take some extra time to get to the solution.

May I ask what error are you getting? Do you have experience in software development?
I'm just an enthusiast. I have no development experience.
I don't know anything difficult.
 
Last edited:
  • Like
Reactions: Articul8Madness

PEACH-PIT

Senior Member
Jan 22, 2018
104
25
The build was successful.
Unfortunately, this is not working.
The driver taken from the smartphone itself is not enough.
The touch panel does not work because the driver for the touch panel in recovery mode is missing.
Probably it has to be done like the moto g 5g plus twrp.
It is not possible to port moto g 5g plus drivers to moto g 5g.
It was too difficult to figure out for me.
 
Last edited:

h3xmind

Senior Member
Oct 20, 2015
72
32
Moto G 5G
The build was successful.
Unfortunately, this is not working.
The driver taken from the smartphone itself is not enough.
The touch panel does not work because the driver for the touch panel in recovery mode is missing.
Probably it has to be done like the moto g 5g plus twrp.
It is not possible to port moto g 5g plus drivers to moto g 5g.
It was too difficult to figure out for me.
Where did you take the driver from? I know you can extract the proprietary blobs from the phone itself. I suppose the touch screen drivers are there.
 

PEACH-PIT

Senior Member
Jan 22, 2018
104
25
Where did you take the driver from? I know you can extract the proprietary blobs from the phone itself. I suppose the touch screen drivers are there.
I rooted the file and copied it using file explorer.
However, there should be no need to copy the firmware because it is loaded from the main unit using load_modules.sh.

I think the touch panel does not work with twrp because load_modules.sh is not working.
I don't think it will work unless you modify the touch panel related part of load_modules.sh.
It's too difficult for me to figure out what to do.
 
Last edited:

fddm

Senior Member
Feb 24, 2011
237
161
I rooted the file and copied it using file explorer.
However, there should be no need to copy the firmware because it is loaded from the main unit using load_modules.sh.

I think the touch panel does not work with twrp because load_modules.sh is not working.
I don't think it will work unless you modify the touch panel related part of load_modules.sh.
It's too difficult for me to figure out what to do.
Mind sharing a build if it actually boots? I might be able to fix it depending on the issue.

Touch is usually not strictly required, since you can emulate it over adb or use mouse over otg. Have any basic functions been tested at all?
 

PEACH-PIT

Senior Member
Jan 22, 2018
104
25
I'm sorry, but I'm not going to publish the garbage.
Sure, it can be controlled with an otg mouse, but that doesn't mean it's finished.
This is the procedure I followed.
The touch panel does not work. Garbage is output.
Please tell me what is wrong.

Code:
mkdir ~/twrp
cd ~/twrp
mkdir -p /device/motorola/kiev
repo init -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-10.0
.repo/repo/repo sync
The rest. https://github.com/moto-sm7250/android_device_motorola_kiev.git
to select android10.
Then copy all of its contents into the kiev folder.
Code:
. build/envsetup.sh
export LC_ALL=C
lunch omni_kiev-eng
make -j4 recoveryimage 2>&1 | tee twrp_$(date '+%Y%m%d_%H-%M-%S').log

That's it.
You will have a piece of garbage with a non-functioning touch screen.
I don't know why.
 
Last edited:

h3xmind

Senior Member
Oct 20, 2015
72
32
Moto G 5G
I've been trying to fix weird errors for days just to find out that my hard drive was near to failure. I replaced it with a spare ssd and managed to compile the recovery as described by @PEACH-PIT.

I also added some display drivers from the stock rom, maybe this will fix the touch screen issue. Haven't tried it yes as my bootloader is still locked. Anyway, if anyone wants to try it at his own risk, the recovery can be downloaded here: google drive. I wouldn't use it to do anything serious.

CAUTON: DO NOT FLASH! To test the recovery you can boot into it without flashing. I'm not responsible for any damage you make to your device by using this recovery.

go into fastboot mode then run:

fastboot boot recovery.img
 
Last edited:

PEACH-PIT

Senior Member
Jan 22, 2018
104
25
I've been trying to fix weird errors for days just to find out that my hard drive was near to failure. I replaced it with a spare ssd and managed to compile the recovery as described by @PEACH-PIT.

I also added some display drivers from the stock rom, maybe this will fix the touch screen issue. Haven't tried it yes as my bootloader is still locked. Anyway, if anyone wants to try it at his own risk, the recovery can be downloaded here: google drive. I wouldn't use it to do anything serious.

CAUTON: DO NOT FLASH! To test the recovery you can boot into it without flashing. I'm not responsible for any damage you make to your device by using this recovery.

go into fastboot mode then run:

fastboot boot recovery.img
The touch panel is still not functioning even after adding the driver.
There should be no need to add a driver.
According to the module, it is supposed to load the driver directly from the device.
That's all I know.
I don't know how to fix it.
 

h3xmind

Senior Member
Oct 20, 2015
72
32
Moto G 5G
The touch panel is still not functioning even after adding the driver.
There should be no need to add a driver.
According to the module, it is supposed to load the driver directly from the device.
That's all I know.
I don't know how to fix it.
Thanks for your feedback. I'll eventually unlock my bootloader and test for myself.

Anyway, I checked the BoardConfig.mk file (from https://github.com/moto-sm7250/android_device_motorola_kiev.git) and I saw tha some of the parameters are different from those I extracted directly from my phone.
 
Last edited:

h3xmind

Senior Member
Oct 20, 2015
72
32
Moto G 5G
@PEACH-PIT When you boot into recovery and run

adb devices

on your pc, can you see the device listed? If yes, can you run

adb shell

and then, e.g.,

getprop

Just to see that we can get into the phone and get some output from it.
 
Last edited:

fddm

Senior Member
Feb 24, 2011
237
161
I'm sorry, but I'm not going to publish the garbage.
Sure, it can be controlled with an otg mouse, but that doesn't mean it's finished.
This is the procedure I followed.
The touch panel does not work. Garbage is output.
Please tell me what is wrong.

Code:
mkdir ~/twrp
cd ~/twrp
mkdir -p /device/motorola/kiev
repo init -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-10.0
.repo/repo/repo sync
The rest. https://github.com/moto-sm7250/android_device_motorola_kiev.git
to select android10.
Then copy all of its contents into the kiev folder.
Code:
. build/envsetup.sh
export LC_ALL=C
lunch omni_kiev-eng
make -j4 recoveryimage 2>&1 | tee twrp_$(date '+%Y%m%d_%H-%M-%S').log

That's it.
You will have a piece of garbage with a non-functioning touch screen.
I don't know why.
I was hoping you'd save me bandwidth and time, but nvm. After I compiled and booted it up, I connected to it with adb and ran /system/bin/load_modules.sh. It threw out a bunch of signature errors like this:
Code:
insmod: failed to load /vendor/lib/modules/module.ko: Required key not available
This error means it failed the module signature check because the kernel is stock and signatures are enforced. To address this, I patched the module_sig_check function that looks like this:
so it just jumps right to 'info->sig_ok = true' rather than checking anything.

Here's my patched kernel:
After rebuilding with this(place in the prebuilt folder), the touchscreen works as expected.
 

Skel40

Senior Member
Dec 27, 2019
326
160
Moto G 5G
I was hoping you'd save me bandwidth and time, but nvm. After I compiled and booted it up, I connected to it with adb and ran /system/bin/load_modules.sh. It threw out a bunch of signature errors like this:
Code:
insmod: failed to load /vendor/lib/modules/module.ko: Required key not available
This error means it failed the module signature check because the kernel is stock and signatures are enforced. To address this, I patched the module_sig_check function that looks like this:
so it just jumps right to 'info->sig_ok = true' rather than checking anything.

Here's my patched kernel:
After rebuilding with this(place in the prebuilt folder), the touchscreen works as expected.
This is definitely a step in the right direction for finally getting TWRP to work. I tested the gz and it showed errors. Is it possible the image file is corrupted somehow?
 

fddm

Senior Member
Feb 24, 2011
237
161
This is definitely a step in the right direction for finally getting TWRP to work. I tested the gz and it showed errors. Is it possible the image file is corrupted somehow?
That's just the patched kernel, not the recovery or an archive. If you really want play with it, here's it built:
Just keep in mind this is SyberHexen's work and it's unfinished/unreleased.
 
Last edited:

PEACH-PIT

Senior Member
Jan 22, 2018
104
25
I was hoping you'd save me bandwidth and time, but nvm. After I compiled and booted it up, I connected to it with adb and ran /system/bin/load_modules.sh. It threw out a bunch of signature errors like this:
Code:
insmod: failed to load /vendor/lib/modules/module.ko: Required key not available
This error means it failed the module signature check because the kernel is stock and signatures are enforced. To address this, I patched the module_sig_check function that looks like this:
so it just jumps right to 'info->sig_ok = true' rather than checking anything.

Here's my patched kernel:
After rebuilding with this(place in the prebuilt folder), the touchscreen works as expected.
I replaced it and built it.
When the device is protected by a password, the touch panel does not work on the password input screen.
But the main screen touch panel does work.
 
Last edited:

Skel40

Senior Member
Dec 27, 2019
326
160
Moto G 5G

Skel40

Senior Member
Dec 27, 2019
326
160
Moto G 5G
That's just the patched kernel, not the recovery or an archive. If you really want play with it, here's it built:
Just keep in mind this is SyberHexen's work and it's unfinished/unreleased.
Ok thanks for letting me know
 

fddm

Senior Member
Feb 24, 2011
237
161
When the device is protected by a password, the touch panel does not work on the password input screen.
The file init.recovery.qcom.rc defines the service and when it should be ran. Just need to find a more appropriate trigger I guess. Looks to me like it should start working if you connect it to a computer.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Follow the following at your own risk! I am not responsible for any mishaps with your devices. This will NOT obviously work for Verizon, AT&T, and Cricket phones.

    Okay, So I've been asking questions, playing, unpacking, and repacking, trying tools, etc. And I got a very experimental port of TWRP happening. VERY EXPERIMENTAL.

    THINGS TO KNOW AFTER THE EXCITEMENT DIES DOWN:
    For starters, yes THIS DOES BOOT TO TWRP! I'm quite proud about that. This is my first ever port of anything like this. I mostly just fiddle with making bootable stock roms, and not too much since Android 9 and this new nuts file system. Anyway, I set out to try and get a TWRP together for this phone and that happened, so I'm proud of myself I didn't get discouraged.

    Having said that, it has ZERO touchscreen functionality. From my research this was also an initial problem for the peeps over at the Moto One 5G Plus variant (Nairo) before they worked out the bugs. Hopefully they will take mercy on us and come give some feedback.

    Also, this is a port. I used @Hovatek's Qualcomm tool to accomplish this since unpacking, repacking, copying and pasting a port from Nairo in the Carliv Image Kitchen or Android Image Kitchen just soft bricked my phone. It also doesn't help the traditional porting methods prior to Android 9 don't work anymore. They came up with a great tool, Gawd Bless Em'.

    Should you try this for hoots and giggles just know you will have to hard reset. Android will force a factory reset because of the vbmeta flashing, and your phone will be factory brand spanking new. Backup your contacts, pics, messages, and anything else you want to keep just in case.

    I'm not going to put detailed instructions on this just yet since it's experimental - this is really for folks that know what they're doing with their phone.

    Notes:
    You must have the bootloader unlocked and be rooted with Magisk for this to fly. Can't say how this would work on locked bootloaders without root so proceed cautiously on that.

    1. Flash VBmeta first. The VBMeta is a blank file and that's to make sure DM-Verity isn't acting up (which as of now I'm 50% certain it is and that's why I had to go ahead and factory reset). The commands to disbale dm-verity didn't work for me. If anybody knows how to get that shut off please add to the discussion.

    2. I didn't replace my original recovery. I just did fastboot boot recovery image to see if it would load. I wouldn't advise flashing it to replace the current recovery as it might seriously bootloop.


    If anybody wants to try and work on this with me (or take over since I'm a hobbyist at best) then by all means share. But at least now we're getting somewhere, slowly but surely.

    Today was a good day in hacking Android 10 on this phone.
    4
    Hey guys. To get confidence in what I'm doing, I took an old Moto G5S Plus (sanders) and managed to compile a fully working TWRP for it. There were some issues I had to overcome, but in the end it worked. I used it to flash ArrowOS 11 on it. Works like a charm!

    Anyway, that was an older phone and I suppose some things were easier back then. However, since I didn't have experience in this kind of development, this experiment was a useful step forward in building a fully functional TWRP for Moto G 5G. We'll see how things will proceed in the next weeks. I hope next weekend I'll manage to find time for this.

    Cheers! :)
    3
    Guys, I made it. Here it is: google drive

    I haven't fully tested it yet, so don't flash it and don't use it for anything serious.

    But the touchscreen works!

    I'll test it and post when it's ready for serious things. This weekend I'll try to clean some things up and upload everything to github with instructions in order to support further development by the community.
    3
    I'm sorry, but I'm not going to publish the garbage.
    Sure, it can be controlled with an otg mouse, but that doesn't mean it's finished.
    This is the procedure I followed.
    The touch panel does not work. Garbage is output.
    Please tell me what is wrong.

    Code:
    mkdir ~/twrp
    cd ~/twrp
    mkdir -p /device/motorola/kiev
    repo init -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-10.0
    .repo/repo/repo sync
    The rest. https://github.com/moto-sm7250/android_device_motorola_kiev.git
    to select android10.
    Then copy all of its contents into the kiev folder.
    Code:
    . build/envsetup.sh
    export LC_ALL=C
    lunch omni_kiev-eng
    make -j4 recoveryimage 2>&1 | tee twrp_$(date '+%Y%m%d_%H-%M-%S').log

    That's it.
    You will have a piece of garbage with a non-functioning touch screen.
    I don't know why.
    I was hoping you'd save me bandwidth and time, but nvm. After I compiled and booted it up, I connected to it with adb and ran /system/bin/load_modules.sh. It threw out a bunch of signature errors like this:
    Code:
    insmod: failed to load /vendor/lib/modules/module.ko: Required key not available
    This error means it failed the module signature check because the kernel is stock and signatures are enforced. To address this, I patched the module_sig_check function that looks like this:
    so it just jumps right to 'info->sig_ok = true' rather than checking anything.

    Here's my patched kernel:
    After rebuilding with this(place in the prebuilt folder), the touchscreen works as expected.
    2
    This is definitely a step in the right direction for finally getting TWRP to work. I tested the gz and it showed errors. Is it possible the image file is corrupted somehow?
    That's just the patched kernel, not the recovery or an archive. If you really want play with it, here's it built:
    Just keep in mind this is SyberHexen's work and it's unfinished/unreleased.