yashsingh1/xdaforums huggingface dataset:
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
The images I have been using are:

lineageos:

lineage-17.1-20210329-UNOFFICIAL-sofiar-images.zip

sha256sum: c57d69ade235f5c76c6eea038ad29f81e522ef713ea00b89c10010a52d6cf17f

TWRP:

https://xdaforums.com/t/sofia-p-r-recovery-wip-twrp-3-4-0-0.4128353/

twrp-3.4.0-0-sofia-test9.img

drive.google.com

stock-rom (sofia)

Motorola Moto G Power XT2041-4-SS Stock ROM Firmware (Flash File)

Download the official Motorola Moto G Power XT2041-4-SS Stock Firmware (Flash File) for your Motorola Smartphone. We also provide all other Motorola Stock Firmware.

motostockrom.com

adb|fastboot vrs: ( Linux ( gentoo ))

dev-util/android-tools-9.0.0_p3-r1
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
You need to update adb|fastboot to latest versions, AND use the twrp.img from the thread
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Mr oua:
I'm using something called "minimal adb and fastboot"

I already have someting that computer calls "platform-tools-r31.0.1-windows" and it has an adb and fastboot on it, but I don't know how to use it. The minimal one has a desktop icon I can use to acess it but platform tools does not.

Edit: just downloaded the twrp image file onto my computer
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
SO, to be clear, *ASSUMING YOU HAVE UNLOCKED BOOTLOADER* what you need to do ( so far ) is:

1) download the lineageos*.zip and twrp*.img as shown above in the thread.

2) move them to the directory that you plan to use adb|fastboot from

3) install latest verson of adb and fastboot *in the same directory* you have placed the above

4) unzip the lineageos zip ( take note that the *.img files are in a sub-directory )

5) use the hardware keys to enter fastboot (NOT fastbootD)

6) once in fastboot:

> fastboot boot twrp.img

7) once in twrp:

> adb reboot fastboot

8) once in fastbootD *AND* in the directory containing {boot,product,system,vbmeta}.img:

""" The syntax is 'fastboot flash <partition> [ <filename> ]' where '<partition>' is a partname and '<filename>' is an arbitrary name that in this case is the *matching* one of the *.img files. """

> fastboot set_active a

> fastboot flash boot boot.img

> fastboot flash system system.img

> fastboot flash product product.img

> fastboot flash vbmeta vbmeta.img

> fastboot -w

> fastboot reboot
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
you will want to use adb and fastboot from the CMD....you can EITHER "cd" to the directory where adb is installed OR add the directory to the PATH variable
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
It is best to use the most recent android*SDK in the case of windows
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
that android "platform-tools-r31.0.1-windows" is the latest...you need to make sure it is in your PATH variable and use it from the CMD.

here is a video on adding to PATH ( or search in your lang ):
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Mr oua:
Where do I download the latest adb and fastboot? I tried using adb reboot fastboot in twrp and replaced the adb and fastboot files of "minimal adb and fastboot" with the ones from platform tools I have on my PC beforehand and it's still outdated.

Edit: took a long time to reply nd did not see yours

Edit 2: I'm taking a break, see you and the video in an hour maybe.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
fastbootD says "fastbootd" in BIG RED TEXT at the top of the screen...so if you are not sure if you are in fastbootD mode, then you are NOT
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
You can download the latest android tools here:

SDK Platform Tools release notes | Android Studio | Android Developers

Android SDK Platform-Tools is a component for the Android SDK.

developer.android.com
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Mr oua:
I added the "platform-tools-r31.0.1-windows" to my path. What do I do next to use it in cmd?

Note: The folder itself is just called "platform-tools"
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
open the cmd or powershell by pressing the windows key and typing CMD or Powershell.

also, connect to irc on freenode #xda-devs for real-time communication
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
well, i accidentally flashed twrp to the recovery instead of what i intended...now i dont have fastbootD anymore...i think my device may well be garbage unless there is some way around this
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
OK, so i used > adb push lineageos-17.1-20210329-UNOFFICIAL-sofiar.zip sdcard

to push the rom over and install on the device and that also did not work, the process showed partition mounting errors.

The device still has fastbootD however...so that is good
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
I have just flashed back to stock!!! it works, and I tried again to flash lineageos following the method here using the images posted at the beginning/top of this thread...and with the same result...device boots back to "AP Fastboot Flash Mode (Secure)" but will not boot into lineage
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
If anyone else bricks thier device, I successfully used the stock rom here:

Motorola Moto G Power XT2041-4-SS Stock ROM Firmware (Flash File)

Download the official Motorola Moto G Power XT2041-4-SS Stock Firmware (Flash File) for your Motorola Smartphone. We also provide all other Motorola Stock Firmware.

motostockrom.com

for anyone using linux, here is a bash script that you can put in the Firmware directory, just paste this in a file called "flash.sh" ( or whatever you want to call it ) and remember to $ chmod +x flash.sh; then run it like this:

username@computer ~/Phone/sofia/roms/stock/Motrola..QPM30.80../Firmware $ ./flash.sh

#!/bin/bash

fastboot flash partition gpt.bin &&

fastboot flash bootloader bootloader.img &&

fastboot flash vbmeta vbmeta.img &&

fastboot flash radio radio.img &&

fastboot flash bluetooth BTFM.bin &&

fastboot flash dsp dspso.bin &&

fastboot flash logo logo.bin &&

fastboot flash boot boot.img &&

fastboot flash dtbo dtbo.img &&

fastboot flash recovery recovery.img &&

fastboot flash super super.img_sparsechunk.0 &&

fastboot flash super super.img_sparsechunk.1 &&

fastboot flash super super.img_sparsechunk.2 &&

fastboot flash super super.img_sparsechunk.3 &&

fastboot flash super super.img_sparsechunk.4 &&

fastboot flash super super.img_sparsechunk.5 &&

fastboot flash super super.img_sparsechunk.6 &&

fastboot flash super super.img_sparsechunk.7 &&

fastboot flash super super.img_sparsechunk.8 &&

fastboot flash super super.img_sparsechunk.9 &&

fastboot flash super super.img_sparsechunk.10 &&

fastboot flash super super.img_sparsechunk.11 &&

fastboot flash super super.img_sparsechunk.12 &&

fastboot flash super super.img_sparsechunk.13 &&

fastboot flash super super.img_sparsechunk.14 &&

fastboot flash super super.img_sparsechunk.15 &&

fastboot erase carrier &&

fastboot erase userdata &&

fastboot erase metadata &&

fastboot erase ddr &&

fastboot oem fb_mode_clear
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
THIS IS DONE FROM "AP Fastboot Flash Mode (Secure)" mode !!!*NOT*!!! fastbootD mode
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
the one that says "images" is for flashing with fastboot, the other is for adb sideload with TWRP or push to device and flash from *within* TWRP
[Moto G Power ROMs, Kernels, Recoveries, & Other De] a123qwertz567:
Is this the desired way to update from asienth's LOS version without the need of a complete wipe?

What apps did you lose? Did you lose any user data like images or files?
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Leroy_Sparks:
I'm having trouble getting MicroG working on this ROM.

When I go into the Self-Check page, the "System grants signature spoofing permission" is unchecked (as is "System spoofs signature"). On other phones, I use nanodroid patcher - but on this phone/ROM it fails displaying "!! ROM has native signature spoofing already!.

Am I missing something or does this ROM not work with microG?
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Leroy_Sparks:
Replying to my own question:

I had installed via F-Droid, so just as an experiment I uninstalled all MicroG items, then installed it via Magisk and it works. Also, then installed Aurora Store via F-Droid and it kept failing, went to uninstall it and realized it was a 3 year-old version. Downloaded an updated version and it ran fine. Don't trust F-Droid any longer....
[Moto G Power ROMs, Kernels, Recoveries, & Other De] sifrax:
I lost all apps but settings remembered what I changed. To be honest, I had some issues with flashing over asineth's ROM but I usually do not follow how-to until someting breaks :)
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
Any update on how to flash? It did NOT work when i tried it...followed the instructions and even helped someone in irc chat...seemed to work fine for them, but not for me...any input, feedback, or ideas?
[Moto G Power ROMs, Kernels, Recoveries, & Other De] sifrax:
What do you mean? It works for me any others here in this thread.

I suggest use Linux, not Windows you avoid unnecessarily problems. Otherwise I firstly flashed TWRP into recovery. So I updated the first post (I have TWRP 3.5.0_10_0 and it works well).
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Quantumstate:
I used fastboot, booting into fastbootd, and it works just fine. You have to follow the instructions precisely though.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Mr oua:
I'm back.

My phone just crashed while using NewPipe, and now I can't get into my phone because I can't enter my password since the keyboard won't show up anymore. Does anyone have a possible solution?

It says "Password required after device restarts" on the password screen.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Beetle84:
Tried flashing a keyboard addon zip, from nikgapps or somewhere similar?
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Mr oua:
no

edit: is there any keyboard addon zip that isn't gapps in any way?
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Mr oua:
Update: I'm trying to flash twrp onto my phone through linux mint, but it says "target didnt report max download size"
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Mr oua:
I restarted my laptop, which made the twrp flash actually work for some reason.

I deleted locksettings.db so I could get in without the password it wouldn't let me enter; and now my phone is in a screen that says "phone is starting..." and it doesn't seem to be getting anywhere. I can at least access the system settings.

Update: rebooted into recovery mode multiple times, locksettings.db and the shm and wal counterparts refuse to be deleted. They keep showing up no matter how many times I delete them in twrp.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
havnt used windows in years...i run gentoo linux....i must be stuck on something silly, however plz give me some insight, could we chat maybe? I'd really like to debug this and even get the device moved to official. Im no newb to linux, and am happy to share experience and collaborate...any insight into the device and what is the error in my particular use case would be appreciated
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
thats a nice hack!!! the deletion of the locksettings.db...NICE!!!
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
where did you get twrp?....and how do i flash it?
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
I must be missing some step, "like boot into the system without power off, or WITH power off, or not the right rom, or i have a weird model, or the stock firmware is incorrect", or something....i just used my script to reflash to stock as i posted before as i tried to redownload the rom and flash again which DID NOT WORK, i am using linux and up to date adb and fastboot. another rom like crdroid or whatever will do fine...but i really want to get this device flashed with something reasonable....otherwise it is just a paperweight, and ill need a new one. Ive NO idea where im going wrong here....ive got a linux computer, bash/python skillz, phone repair tools, screwdrivers, suction cups, glue, spudgers, clamps....whatever....just have no idea what is different in my case...how is it working for you guys and not me?
[Moto G Power ROMs, Kernels, Recoveries, & Other De] tcaudill01:
I use Windows so I have zero knowledge of a Linux install. I don't use twrp but the stock recovery/fastbootd method.

I haven't read all of your posts, but do you have access to a windows pc? It may be worth your time to find a friend that will let you install from their windows pc.

Sorry I haven't gotten any more advice. Good luck.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Mr oua:
I'm trying to reflash the operating system on my phone since that is the only solution I'm left with, and I can't get into fastbootd. It says "fastboot: usage: unknown reboot target fastboot"

Edit: nvm, I'll just perform a regular factory reset since I just learned it will keep my os.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Quantumstate:
Hey Beetle, How can I get the battery bar across the top of the screen like in Havoc?

And how can I set the date/time in the top-center?
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
See my posts about flashing to stock, it works for me on linux. If you are using windows, there are instructions on the site i linked to.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Psyb3rN4ut:
Thank you for the advice, however both adb and fastboot seem to work just fine, i use them often for moving files around, updates, and installing apps. The use of windows or linux i dont think is the issue, however some devices have required windows ( or a windows app at least ) for bootloader unlocking ( ODIN ). In my experience, linux is better suited to development in general and also android, however if there is some underlying cause that you are considering that may be easier to deal with on windows, please share.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] tcaudill01:
My only reason for suggesting windows is that is what I use and I know it works for me. I rarely use the linux environment so I am not sure what does and doesn't work there or what parameters may need to be set.

I'm just trying to eliminate as many variables as possible to help figure out why this won't install for you. It probably going to end up being something simple that we have overlooked.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] sifrax:
Hi,

I'm not here every day 2 jobs and kids ;-) so the best way to reach me might be Telegram or Matrix (by PM I can share contact).

TWRP I got from Telegram group:

here
[Moto G Power ROMs, Kernels, Recoveries, & Other De] h0miemaru:
What's up everyone. I know lineage 18 is out now. Is it possible to flash it on the moto g power? I successfully flashed 17.1 on my phone using the sideload feature of twrp. Just wondering is 18 will work. Thanks!!
[Moto G Power ROMs, Kernels, Recoveries, & Other De] sifrax:
Hi,

eventualy I'll try to update building mechanism although I'm not sure when.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] sifrax:
OK, so I gave LOS18.1 build try one hour. Here is my result for now, any help is welcome:

[ 99% 624/626] including out/soong/late-lineage_sofiar.mk ...
[ 99% 625/626] finishing build rules ...
vendor/lineage/build/tasks/kernel.mk:122: warning: ***************************************************************
vendor/lineage/build/tasks/kernel.mk:123: warning: * Using prebuilt kernel binary instead of source *
vendor/lineage/build/tasks/kernel.mk:124: warning: * THIS IS DEPRECATED, AND IS NOT ADVISED. *
vendor/lineage/build/tasks/kernel.mk:125: warning: * Please configure your device to download the kernel *
vendor/lineage/build/tasks/kernel.mk:126: warning: * source repository to kernel/motorola/trinket
vendor/lineage/build/tasks/kernel.mk:127: warning: * for more information *
vendor/lineage/build/tasks/kernel.mk:128: warning: ***************************************************************
[100% 626/626] writing build rules ...
out/build-lineage_sofiar-package.ninja is missing, regenerating...
[ 99% 627/629] initializing packaging system ...
[ 99% 628/629] including distdir.mk ...
[100% 629/629] writing packaging rules ...
Starting ninja...
FAILED: ninja: 'out/target/product/sofiar/kernel', needed by 'out/target/product/sofiar/boot.img', missing and no known rule to make it
13:29:16 ninja failed with: exit status 1

#### failed to build some targets (03:02 (mm:ss)) ####

>> [Tue Apr 27 13:29:16 UTC 2021] Failed build for sofiar
>> [Tue Apr 27 13:29:16 UTC 2021] Finishing build for sofiar
>> [Tue Apr 27 13:29:16 UTC 2021] Cleaning source dir for device sofiar
13:29:17 ************************************************************
13:29:17 You are building on a machine with 15.5GB of RAM
13:29:17
13:29:17 The minimum required amount of free memory is around 16GB,
13:29:17 and even with that, some configurations may not work.
13:29:17
13:29:17 If you run into segfaults or other errors, try reducing your
13:29:17 -j value.
13:29:17 ************************************************************
13:29:18 Entire build directory removed.

#### build completed successfully (2 seconds) ####
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Banana_sam:
Ahoy there matey's! So I just wanna say I've still been rocking the first build of this ROM that was originally posted. I haven't had any issues with it, but now I'm considering installing the new build, because something I just now realized is that locking apps doesn't work fully on the first version. When I pin lock an app it works fine when opening the app from the app drawer or homescreen. However if I open the locked app via the list of apps from androids settings menu, it opens the app with no pin needed. Is this issue fixed in the latest build?

I've got a different older phone with lineage 17.1 installed, and the app locking works fully, needing the pin every time even when opening the app from the settings menu.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Quantumstate:
I don't see anything in LOS that's not in stock.

Not worth it.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] panos79:
i gave up on custom rom using fastbootd or bootloader my device is XT2041-4 i did however flash a custom rom from moto g power thread using twrp seems our phone uses super inplace of system only reason i know this because i bricked my g power and kept trying to use fastboot flash system when i try super inplace of system WAM it worked, thanks for letting me share
[Moto G Power ROMs, Kernels, Recoveries, & Other De] panos79:
dont give up that is why its called development you might stumble accross something good YOU pave your own rode in this hobby of ours hope to hear back from you
[Moto G Power ROMs, Kernels, Recoveries, & Other De] JasonWD:
Maybe I'm reading too much into part of the output but it seems you're 0.5GB short of the suggested memory minimum? If someone were to run the same build on a machine with more ram, would that improve the odds of success?
[Moto G Power ROMs, Kernels, Recoveries, & Other De] PrettyDumbITGuy:
Hey all,

I apologize for the incredibly amateur questions, but I am very new to this (first android phone/first custom ROM load). I successfully installed Lineage 17.1 on my Moto G Power and I am glad to see the F-droid store there. However, there are some apps that I need for work from the google play store (unfortunately they are closed source). How can I get the google play store installed alongside F-droid? Also, any other tips/suggestions for a newbie are greatly appreciated.

Thanks!
[Moto G Power ROMs, Kernels, Recoveries, & Other De] sifrax:
Hi, thanks for reply, will try different server.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Leroy_Sparks:
If you are OK with having google apps (& eyes) on your phone, you can download and flash gapps (Google APPS). Open gapps (opengapps.org) is a very popular source. Depending on what google functionality you need, you select/download the package you need from the ARM64/android 10 version (for lineage 17).

Even the smallest packages pico or nano will install google playstore. If you prefer to avoid google framework you can simply download the apk files from places like apkmirror or apkpure. Many of us that avoid google as much as possible install microg and Aurora Store, but that can be a bit of a challenge for newbies.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] PrettyDumbITGuy:
Ideally I would like to avoid the Google botnet as much as possible. Infact this was largely the reason I decided to switch over to a custom ROM android phone. However, there are certain proprietary apps that I do need for work. If there is a way I could possibly get around Google to get to these apps that I need that would be fantastic.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Quantumstate:
All you need is APKPure or Aurora Store. They mirror everything in Play.

However some apps -require- certain aspects of the G**gle core (Lowes, Lyft, etc), in which case you can add the microG repo to F-Droid, and install microG Core. You might also need microG framework. This will fool them.

There's more at microG you can add for added functionality but I wouldn't go as far as to install their mapping or Play emulator as that actually uses the Play repo. For nav, Magic Earth is miraculous.

PS - Lineage is lame. I was very disappointed, and went back to Havoc 3.12 which is worthy of this phone.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] TaZeR369:
Could someone try to explain in simple terms why the FM Radio won't function on custom roms? And if there is anyway to get it working, perhaps by using a different app or modifying the current one somehow?
[Moto G Power ROMs, Kernels, Recoveries, & Other De] tcaudill01:
Some ROMs do have functioning FM (i.e. Arrow 11). From what I understand, the kernel has to have the proper hardware links (drivers) in order for the FM radio to function.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Quantumstate:
You can stream almost any radio station, police bands, fire bands, etc.
[Moto G Power ROMs, Kernels, Recoveries, & Other De] Banana_sam:
never heard of Magic Earth. its like an alternative to googles mapping api? so far the only thing ive needed microGs mapping for is to use the craigslist app, otherwise the CL app wont work.

in your opinion, do you feel like theres no use case for lineage 17.1? im new to custom roms and this is the first one ive tried. my motives for going with lineage was because i want to avoid botnet goolag as much as i can. i dont use any gapps, but just use microG incase theres apps or websites i need to pass safetycheck to access.

ive read a little bit(admittedly not as much as i should) about how lineage has some security issues, since its whats called a userdebug build(i need to read more to get a better idea of what this means) and this is supposed to be where a lot of its security flaws derive from. so my question to you is, do you think havoc 3.12 offers anything in terms of better/enhanced security or privacy that lineage doesnt already include?

there was a side by side performance/speed test ive watched on YT comparing lineage and havoc, havoc seemed to come out as the winner for that test. however im only interested in a rom for privacy and security. better mobile game play and things like adding nifty customization with the UI or whatever isnt all that important to me. so is it worth the switch for my use case?