• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Question Anyone try any GSI ROMs on the G Power 2021?

Search This thread

thebestofall007

Senior Member
May 29, 2017
53
9
I had to flash my phone back to stock, as I am able to run adaway and magisk with it no problem, as well as have my google apps. I'd keep the GSI ROMs on my phone if I was able to run those two programs and use magisk as my rooting method, and run Gapps at the same time. So far I can't do that with the ones I found. They're a different breed for sure compared to a proper ROM.
 

Mkami

Senior Member
May 25, 2012
101
13
Toronto
Update, I found a ROM that has magisk as the root manager and gapps included. It is android 11 and also a lineage OS ROM, and you can download it here: https://gigenet.dl.sourceforge.net/project/treblerom/LiR/2021.09.15/lir-v313-210915-arm64-bgZ.img.xz. It works well so far.
Hey there, how were you able to sucessfully flash it into your moto g? I tried but i keep getting this..


Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system lir-v313-210915-arm64-bgZ.img
target reported max download size of 804474880 bytes
Invalid sparse file format at header magic
error: write_sparse_skip_chunk: don't care size 95372660 is not a multiple of the block size 4096
sending sparse 'system_b' 1/2 (785616 KB)...
error: write_sparse_skip_chunk: don't care size 95372660 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 95372660 is not a multiple of the block size 4096
OKAY [ 19.475s]
writing 'system_b' 1/2...
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 19.589s
 

Mkami

Senior Member
May 25, 2012
101
13
Toronto
Hello gents do any of you guys know how I can fastboot a rom or gsi? when I try I keep getting a failed message or this message here:

target reported max download size of 804474880 bytes
Invalid sparse file format at header magic
error: write_sparse_skip_chunk: don't care size 95372660 is not a multiple of the block size 4096
sending sparse 'system_b' 1/2 (785616 KB)...
error: write_sparse_skip_chunk: don't care size 95372660 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 95372660 is not a multiple of the block size 4096
OKAY [ 19.475s]
writing 'system_b' 1/2...
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 19.589s


all the help I can get would be greatly appreciated it!
 

thebestofall007

Senior Member
May 29, 2017
53
9
Hey there, how were you able to sucessfully flash it into your moto g? I tried but i keep getting this..


Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system lir-v313-210915-arm64-bgZ.img
target reported max download size of 804474880 bytes
Invalid sparse file format at header magic
error: write_sparse_skip_chunk: don't care size 95372660 is not a multiple of the block size 4096
sending sparse 'system_b' 1/2 (785616 KB)...
error: write_sparse_skip_chunk: don't care size 95372660 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 95372660 is not a multiple of the block size 4096
OKAY [ 19.475s]
writing 'system_b' 1/2...
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 19.589s
I got the "Invalid sparse file format at header magic" error as well, but it wasn't detrimental to the flash, however, I had to delete and recreate my system partition when I first flashed ROMs with these commands:
Code:
fastboot delete-logical-partition system_a
fastboot delete-logical-partition system_b
fastboot create-logical-partition system_a 100000
fastboot create-logical-partition system_b 100000

Then erase userdata:
Code:
fastboot erase userdata

Also, make sure your phone is in fastbootd mode, not bootloader mode when you flash.
 

Mkami

Senior Member
May 25, 2012
101
13
Toronto
I got the "Invalid sparse file format at header magic" error as well, but it wasn't detrimental to the flash, however, I had to delete and recreate my system partition when I first flashed ROMs with these commands:
Code:
fastboot delete-logical-partition system_a
fastboot delete-logical-partition system_b
fastboot create-logical-partition system_a 100000
fastboot create-logical-partition system_b 100000

Then erase userdata:
Code:
fastboot erase userdata

Also, make sure your phone is in fastbootd mode, not bootloader mode when you flash.
Awesome thanks! I'll give it a try now, are these the steps?
 

Mkami

Senior Member
May 25, 2012
101
13
Toronto
I got the "Invalid sparse file format at header magic" error as well, but it wasn't detrimental to the flash, however, I had to delete and recreate my system partition when I first flashed ROMs with these commands:
Code:
fastboot delete-logical-partition system_a
fastboot delete-logical-partition system_b
fastboot create-logical-partition system_a 100000
fastboot create-logical-partition system_b 100000

Then erase userdata:
Code:
fastboot erase userdata

Also, make sure your phone is in fastbootd mode, not bootloader mode when you flash.
I get this now

Program Files (x86)\Minimal ADB and Fastboot>fastboot delete-logical-partition system_a
fastboot: usage: unknown command delete-logical-partition

Program Files (x86)\Minimal ADB and Fastboot>fastboot delete-logical-partition system_b
fastboot: usage: unknown command delete-logical-partition

Program Files (x86)\Minimal ADB and Fastboot>fastboot create-logical-partition system_a 100000
fastboot: usage: unknown command create-logical-partition

Program Files (x86)\Minimal ADB and Fastboot>fastboot create-logical-partition system_b 100000
fastboot: usage: unknown command create-logical-partition
 

thebestofall007

Senior Member
May 29, 2017
53
9
I get this now

Program Files (x86)\Minimal ADB and Fastboot>fastboot delete-logical-partition system_a
fastboot: usage: unknown command delete-logical-partition

Program Files (x86)\Minimal ADB and Fastboot>fastboot delete-logical-partition system_b
fastboot: usage: unknown command delete-logical-partition

Program Files (x86)\Minimal ADB and Fastboot>fastboot create-logical-partition system_a 100000
fastboot: usage: unknown command create-logical-partition

Program Files (x86)\Minimal ADB and Fastboot>fastboot create-logical-partition system_b 100000
fastboot: usage: unknown command create-logical-partition

You may need to update your adb/fastboot directly from google here (assuming you are using windows, I use linux mint).
It looks like you may be using an older version of adb/fastboot that doesn't recognize those commands. I had to do that as well because the version I had was older than dinosaurs and didn't recognize the "--force" argument.
 
Last edited:

Mkami

Senior Member
May 25, 2012
101
13
Toronto
You may need to update your adb/fastboot directly from google here (assuming you are using windows, I use linux mint).
It looks like you may be using an older version of adb/fastboot that doesn't recognize those commands. I had to do that as well because the version I had was older than dinosaurs and didn't recognize the "--force" argument.
I get this message now

C:\Program Files\platform-tools>fastboot delete-logical-partition system_a
Deleting 'system_a' FAILED (remote: '')
fastboot: error: Command failed

C:\Program Files\platform-tools>fastboot delete-logical-partition system_b
Deleting 'system_b' FAILED (remote: '')
fastboot: error: Command failed

C:\Program Files\platform-tools>fastboot create-logical-partition system_a 100000
Creating 'system_a' FAILED (remote: '')
fastboot: error: Command failed

C:\Program Files\platform-tools>fastboot create-logical-partition system_b 100000
 

thebestofall007

Senior Member
May 29, 2017
53
9
Hey thanks, so before I proceed what are the steps to fastbooting that GSI rom you recommended, thanks!
1. update your adb/fastboot with the google link I showed.
2. enable usb debugging in System>Developer Options>USB Debugging.
3. connect your phone to your computer with USB cable. when prompt comes up on phone, allow the debugging.
4. issue command
Code:
adb reboot recovery
to reboot phone to recovery.
5. when the dead android robot shows, hold down power and press vol up to get to menu. select enter fastboot (third option down).
6. when in fastboot mode, enter the commands to delete and recreate the system partition.
Code:
fastboot delete-logical-partition system_a
fastboot delete-logical-partition system_b
fastboot create-logical-partition system_a 100000
fastboot create-logical-partition system_b 100000
7. flash the image with this command:
Code:
fastboot flash system <name of image>
8. clear userdata with
Code:
fastboot erase userdata
9. enter command
Code:
fastboot reboot
to reboot the phone.
 
  • Like
Reactions: mario0318 and Mkami

thebestofall007

Senior Member
May 29, 2017
53
9
I get this message now

C:\Program Files\platform-tools>fastboot delete-logical-partition system_a
Deleting 'system_a' FAILED (remote: '')
fastboot: error: Command failed

C:\Program Files\platform-tools>fastboot delete-logical-partition system_b
Deleting 'system_b' FAILED (remote: '')
fastboot: error: Command failed

C:\Program Files\platform-tools>fastboot create-logical-partition system_a 100000
Creating 'system_a' FAILED (remote: '')
fastboot: error: Command failed

C:\Program Files\platform-tools>fastboot create-logical-partition system_b 100000
I forgot to ask, is your bootloader unlocked?
 

Mkami

Senior Member
May 25, 2012
101
13
Toronto
1. update your adb/fastboot with the google link I showed.
2. enable usb debugging in System>Developer Options>USB Debugging.
3. connect your phone to your computer with USB cable. when prompt comes up on phone, allow the debugging.
4. issue command
Code:
adb reboot recovery
to reboot phone to recovery.
5. when the dead android robot shows, hold down power and press vol up to get to menu. select enter fastboot (third option down).
6. when in fastboot mode, enter the commands to delete and recreate the system partition.
Code:
fastboot delete-logical-partition system_a
fastboot delete-logical-partition system_b
fastboot create-logical-partition system_a 100000
fastboot create-logical-partition system_b 100000
7. flash the image with this command:
Code:
fastboot flash system <name of image>
8. clear userdata with
Code:
fastboot erase userdata
9. enter command
Code:
fastboot reboot
to reboot the phone.
Hey! thanks so much for your guided steps so everything worked but now I get a pop up that says "the disc image file is corrupted". Yes my phone is bootloader unlocked
 

Mkami

Senior Member
May 25, 2012
101
13
Toronto
Hey! thanks so much for your guided steps so everything worked but now I get a pop up that says "the disc image file is corrupted". Yes my phone is bootloader unlocked
Update, I found a ROM that has magisk as the root manager and gapps included. It is android 11 and also a lineage OS ROM, and you can download it here: https://gigenet.dl.sourceforge.net/project/treblerom/LiR/2021.09.15/lir-v313-210915-arm64-bgZ.img.xz. It works well so far.
I am trying to use this image after extracting the image from the zip file. When I try to fastboot it to the phone I get that disc corrupted message
 

thebestofall007

Senior Member
May 29, 2017
53
9
I am trying to use this image after extracting the image from the zip file. When I try to fastboot it to the phone I get that disc corrupted message
Try downloading it again. The image may very well have been corrupted in the download, and you may need to do a checksum to check integrity and make sure it's not corrupt. The md5 checksum of this file from the site is e31577a6b6cbced5aad3fbc2b852de72.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Sorry I've been gone for a while. Seems like MMS/SMS and headphone jack detection is broken. Everything else is working.
    Same goes for the LineageOS GSI I'm using that is also based on PHH's work.

    I got a question: Would you know how to determine if this device tree would work for this phone?

    https://github.com/MrNerd/MotoGPower_2020_DT

    I know it says 2020 on it, but I looked through some of it and it points to Borneo. Mr. Nerd told me he used a python script to generate this tree.

    Update: I just got word that motorola is releasing the device tree and kernel tree:

    https://github.com/MotorolaMobilityLLC/kernel-msm/issues/374




    I'm trying to pitch together the necessary source code (kernel and device tree files) to get the ball rolling on a proper custom ROM (NOT a GSI) for this phone (especially LineageOS).
  • 2
    I'm looking at an android 11 based GSI rom right now. The main problem is that I can't get TWRP to work properly.
    Just saying, you don't need TWRP to flash GSIs.
    2
    Hey thanks, so before I proceed what are the steps to fastbooting that GSI rom you recommended, thanks!
    1. update your adb/fastboot with the google link I showed.
    2. enable usb debugging in System>Developer Options>USB Debugging.
    3. connect your phone to your computer with USB cable. when prompt comes up on phone, allow the debugging.
    4. issue command
    Code:
    adb reboot recovery
    to reboot phone to recovery.
    5. when the dead android robot shows, hold down power and press vol up to get to menu. select enter fastboot (third option down).
    6. when in fastboot mode, enter the commands to delete and recreate the system partition.
    Code:
    fastboot delete-logical-partition system_a
    fastboot delete-logical-partition system_b
    fastboot create-logical-partition system_a 100000
    fastboot create-logical-partition system_b 100000
    7. flash the image with this command:
    Code:
    fastboot flash system <name of image>
    8. clear userdata with
    Code:
    fastboot erase userdata
    9. enter command
    Code:
    fastboot reboot
    to reboot the phone.
    2
    I unlocked the bootloader but I didn't erase user data.
    Ah if that doesn't work try "system_a" instead. Anyway you always have to erase the data partition or it could cause problems.
    2
    GOOD NEWS! I FINALLY GOT IT TO BOOT THE GSI.


    I had to initially update my ADB/fastboot drivers on my linux mint system (the one I'm flashing with) because the one that comes from the repositories is older than dinosaurs and doesn't recognize the --force option:

    Code:
    wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
    unzip \platform-tools-latest-linux.zip
    sudo cp platform-tools/adb /usr/bin/adb
    sudo cp platform-tools/fastboot /usr/bin/fastboot


    Next I had to wipe my userdata like triggerlord said, as that did cause me problems the first time. So I wiped userdata with

    Code:
    fastboot erase userdata

    I then flashed with the force argument. Here is the output:

    sudo fastboot --force flash system system-roar-arm64-ab-vanilla.img
    Resizing 'system_a' OKAY [ 0.008s]
    Sending sparse 'system_a' 1/4 (458752 KB) OKAY [ 20.873s]
    Writing 'system_a' OKAY [ 2.666s]
    Sending sparse 'system_a' 2/4 (458752 KB) OKAY [ 20.548s]
    Writing 'system_a' OKAY [ 2.665s]
    Sending sparse 'system_a' 3/4 (458752 KB) OKAY [ 20.779s]
    Writing 'system_a' OKAY [ 2.581s]
    Sending sparse 'system_a' 4/4 (161956 KB) OKAY [ 7.270s]
    Writing 'system_a' OKAY [ 1.246s]
    Finished. Total time: 78.651s


    I wouldn't recommend using the force argument.. That might change the logical partition to a physical one and the LSA might fail to flash the stock ROM. Worst case that might brick it.
    yes, I agree with you. I was able to use LMSA to restore my phone thank goodness and it didn't hurt it.

    TWRP can natively flash GSIs. You just have to change the image type from flashable zip to img.
    For some reason, I wasn't able to flash the image with TWRP, as the flash didn't finish, and I got no error message either, strangely, and the image wouldn't boot.

    The main problem with this vanilla image is that the mobile/cell network doesn't work and has wifi-only networking. It was fun trying it out, though! Does anyone know one that does work with cell network?
    1
    If you do try one I'd recommend trying the latest build of PHH's AOSP. You'll want to use one of these images.