• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

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

Search This thread
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.
 

Attachments

  • Flash Files.zip
    29.6 MB · Views: 102

h3xmind

Senior Member
Oct 20, 2015
69
26
Moto G 5G
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.
Hi. I appreciate a lot your efforts. I know the feeling when you progress with stuff like this. I'm sorry I have no time in these months to assist. Anyway, I hope you'll manage to go forward with this. Keep up with the good work. 👏
 
Hi. I appreciate a lot your efforts. I know the feeling when you progress with stuff like this. I'm sorry I have no time in these months to assist. Anyway, I hope you'll manage to go forward with this. Keep up with the good work. 👏
CAn you at least tell me how to port a TWRP on Android 10? Can't find any useful information with the new filetypes.
 

jumpup

Senior Member
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.
This is tremendously amazing work. TWRP would be a killer feature with the 5G Ace. Couple that with Lenovo having released the source code, and this forum may get popping again!
 
  • Like
Reactions: Articul8Madness
I'm not sure what you mean by filetypes. Do you mean the A/B partitions (and the fact that there's no separate recovery partition) or something else?
I was referring to the super_sparsechunk type files that when you look at their "filetype" it has 0 image by its name if its super_sparsechunk.0, 1 if its super_sparsechunk.1 and the like. This is different than the old basic img files that read .img. This is where the learning curve for me kicks in.
 
  • Like
Reactions: h3xmind

h3xmind

Senior Member
Oct 20, 2015
69
26
Moto G 5G
I was referring to the super_sparsechunk type files that when you look at their "filetype" it has 0 image by its name if its super_sparsechunk.0, 1 if its super_sparsechunk.1 and the like. This is different than the old basic img files that read .img. This is where the learning curve for me kicks in.
I see. Thanks for the explanation. I'm not sure if this could help, but a quick search on google led me to this (a bit old) video:

I'm really busy until the end of the month so I can't really dedicate my time to this stuff though I would love to.
 

h3xmind

Senior Member
Oct 20, 2015
69
26
Moto G 5G

jhjhjhjhjhjh

Senior Member
Mar 14, 2017
270
126
Seems the US version of this phone isn't popular enough for dev support...oh well I have R/W access so I was able to delete system app bloatware and I have xposed installed. Stock Reteu firmware is working perfectly on Metro...good luck everybody.. I'm looking for a new 5G phone..
 
  • Like
Reactions: Articul8Madness

PEACH-PIT

Senior Member
Jan 22, 2018
100
22
Unfortunately, there are no developers here.
All we can produce is a ported twrp where the touchscreen does not work.
The touchscreen does not work due to problems with the porting tool and the smartphone.
I heard that if you build it from source yourself, it will work.
But I can't find any tutorials for android 10+ and I don't even know what files I need.
 
  • Like
Reactions: Articul8Madness
Unfortunately, there are no developers here.
All we can produce is a ported twrp where the touchscreen does not work.
The touchscreen does not work due to problems with the porting tool and the smartphone.
I heard that if you build it from source yourself, it will work.
But I can't find any tutorials for android 10+ and I don't even know what files I need.
I posted the source code. The guys over on the Moto One 5G know what tools you need. I was using Carliv's kitchen to build but I've never built before - they had the same problem as us with the touchscreen and had to make modules. That counts me out because that's above my paygrade, lol.
 

fddm

Senior Member
Feb 24, 2011
156
107
I posted the source code. The guys over on the Moto One 5G know what tools you need. I was using Carliv's kitchen to build but I've never built before - they had the same problem as us with the touchscreen and had to make modules. That counts me out because that's above my paygrade, lol.

Not entirely sure what you mean. If your doing some kind of frankenstein recovery, I'm sure you just failed to copy some module or firmware, obviously the ts works in the official software.
1.) Find out what touchscreen chipset your device uses (you can use kernel log or system info apps or whatever)
2.) Determine which kernel module supports it (all modules built will be in your kernel config)
3.) modprobe that module from adb in your recovery. If it doesn't just work, you will receive some error on the command line or dmesg that you can use to fix it. Could need a configuration file or something, idk. It's likely an opensource module that you can read through and I bet you can find specific info online since your not the first to hit this issue.

If your wondering how to build the kernel, I can help a little, but it's incomplete:

Kernel source:

Build instructions:

Snapdragon LLVM Toolchain:

Retail config is on your device:
/proc/config.gz

The instructions don't cover the qcom toolchain, you just take the files here:
snapdragon-llvm-8.0.6-linux64.tar.gz/toolchains/llvm-Snapdragon_LLVM_for_Android_8.0/prebuilt/linux-x86_64/*
and place them here:
$my_top_dir/vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/

When building, skip the cat command, and place your config manually to $kernel_out_dir/.config

The step I haven't done is build a device tree. It's not that it's too difficult, I just haven't put in the time required to do it. It's not strictly necessary to achieve for my goals since I only wanted modules and know how to patch the kernel to be able to use them.
 
Last edited:
  • Like
Reactions: RETIEF and h3xmind
Not entirely sure what you mean. If your doing some kind of frankenstein recovery, I'm sure you just failed to copy some module or firmware, obviously the ts works in the official software.
1.) Find out what touchscreen chipset your device uses (you can use kernel log or system info apps or whatever)
2.) Determine which kernel module supports it (all modules built will be in your kernel config)
3.) modprobe that module from adb in your recovery. If it doesn't just work, you will receive some error on the command line or dmesg that you can use to fix it. Could need a configuration file or something, idk. It's likely an opensource module that you can read through and I bet you can find specific info online since your not the first to hit this issue.

If your wondering how to build the kernel, I can help a little, but it's incomplete:

Kernel source:

Build instructions:

Snapdragon LLVM Toolchain:

Retail config is on your device:
/proc/config.gz

The instructions don't cover the qcom toolchain, you just take the files here:
snapdragon-llvm-8.0.6-linux64.tar.gz/toolchains/llvm-Snapdragon_LLVM_for_Android_8.0/prebuilt/linux-x86_64/*
and place them here:
$my_top_dir/vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/

When building, skip the cat command, and place your config manually to $kernel_out_dir/.config

The step I haven't done is build a device tree. It's not that it's too difficult, I just haven't put in the time required to do it. It's not strictly necessary to achieve for my goals since I only wanted modules and know how to patch the kernel to be able to use them.
This recovery I built in this thread I used Hovatek's tool to do. I have never built a recovery and I was hoping if someone got the ball rolling we could get a dev to jump in. That hasn't happened.

The guys with the other variant of this phone said they had to create modules. Go to the Moto One 5G forums and see the thread. They had the same problems too, but they had more dev support than we do.

I have never built a TWRP, let alone from source, so half of what you sent I have no idea what it is or how to decompile it (yet).

I have posted the entire Kernel Motorola released its in the other thread. The Device Tree is official and out on github.
 

h3xmind

Senior Member
Oct 20, 2015
69
26
Moto G 5G
Guys, I'm a developer, just that I'm still really busy. I'm following your posts and have looked into some of the stuff, just I'm proceeding slowly due to lack of time. I'll post as soon as I have something working.
 
  • Like
Reactions: Articul8Madness

Tomspector

Member
Oct 14, 2018
39
5
Guys, I'm a developer, just that I'm still really busy. I'm following your posts and have looked into some of the stuff, just I'm proceeding slowly due to lack of time. I'll post as soon as I have something working.
Is this the correct twrp for this phone?


Later guys, keep up the good work
 
  • Haha
Reactions: Articul8Madness

PEACH-PIT

Senior Member
Jan 22, 2018
100
22
  • Like
Reactions: Articul8Madness

PEACH-PIT

Senior Member
Jan 22, 2018
100
22
Guys, I'm a developer, just that I'm still really busy. I'm following your posts and have looked into some of the stuff, just I'm proceeding slowly due to lack of time. I'll post as soon as I have something working.
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.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    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.