[ROM][UNOFFICIAL] LineageOS 18.1 for Moto G8/G Fast [RAV]

Nashiro10

Member
Oct 15, 2017
9
1
13
I don't know where you can get the drivers, but you can test if you need them. I didn't; the platform tools were enough.

Start the phone in bootloader mode (Power + Volume down) and check if fastboot finds your device:

Code:
fastboot devices
If it does, boot into fastbootd via
Code:
 fastboot reboot fastboot
then check again with
Code:
fastboot devices
If your device is listed in both cases you should be good to go.
I got it finally working
turns out my pc was identified 2 devices so uninstalled them and tried the steps again
this time my pc identified my phone is fastbootd and i flashed the rom
only complain is the display cutout settings doesnt work lol
thank you for the help

Edit: If i want to update the rom i use the recovery and update from adb sideload?
 
Last edited:

Sjll

Recognized Developer
Jun 4, 2017
411
424
83
Chongqing
I followed the steps and successfully have the ROM flashed, however the battery percentage is always stuck at 0. Has anyone else encountered this issue? Here is a result of adb:

Code:
adb shell dumpsys batterystats
Battery History (0% used, 0 used of 4096KB, 0 strings using 0):

Per-PID Stats:
  PID 2063 wake time: +5s45ms
  PID 2736 wake time: +20ms
  PID 2063 wake time: +27ms
  PID 2736 wake time: +2s141ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: +6ms
  PID 0 wake time: +7s828ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: +20ms
  PID 2674 wake time: +3s28ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: 0
  PID 2063 wake time: +2ms
  PID 2063 wake time: 0
  PID 2063 wake time: +1ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: +16ms
  PID 2063 wake time: +6ms
  PID 2063 wake time: +3ms
  PID 2063 wake time: +10ms
  PID 2063 wake time: +4ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: +10ms
  PID 2063 wake time: +3ms
  PID 2063 wake time: +2ms
  PID 2063 wake time: +3ms
  PID 2063 wake time: +3ms
  PID 2063 wake time: +5ms
  PID 2063 wake time: +5ms
  PID 2063 wake time: +4ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: +4ms
  PID 2063 wake time: +4ms
  PID 2063 wake time: +2s583ms
  PID 2063 wake time: +7ms
  PID 2063 wake time: +3ms
  PID 2063 wake time: +5ms
  PID 2063 wake time: +5ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: +4ms
  PID 2063 wake time: +7ms
  PID 2063 wake time: +5ms
  PID 2063 wake time: +8ms
  PID 2063 wake time: +9ms
  PID 2063 wake time: +11ms
  PID 2063 wake time: +9ms
  PID 2063 wake time: +4ms
  PID 2063 wake time: +6ms
  PID 2063 wake time: +7ms
  PID 2063 wake time: +3ms
  PID 2063 wake time: +5ms
  PID 2063 wake time: +2ms
  PID 2063 wake time: +6ms
  PID 2063 wake time: +6ms
  PID 2063 wake time: +2ms
  PID 2063 wake time: +11ms
  PID 2063 wake time: +4ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: +8ms
  PID 2063 wake time: +2ms
  PID 2063 wake time: +2ms
  PID 2063 wake time: +23ms
  PID 2063 wake time: +6ms
  PID 2063 wake time: +7ms
  PID 2063 wake time: +5ms
  PID 2063 wake time: 0
  PID 2063 wake time: +750ms
  PID 2063 wake time: +2ms
  PID 2063 wake time: +25ms
  PID 2063 wake time: +4ms
  PID 2063 wake time: +6ms
  PID 2063 wake time: +4ms
  PID 2063 wake time: +823ms
  PID 2063 wake time: +5ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: +11ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: +6ms
  PID 2063 wake time: +10ms
  PID 2063 wake time: +8ms
  PID 2063 wake time: +2ms
  PID 0 wake time: +321ms
  PID 2063 wake time: +5ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: +7ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: +1s923ms
  PID 2063 wake time: +11ms
  PID 2063 wake time: +8ms
  PID 2063 wake time: +1ms
  PID 2063 wake time: +2s46ms
  PID 3974 wake time: +1m0s823ms
  PID 4035 wake time: +12s163ms
  PID 2063 wake time: +15s891ms
  PID 2063 wake time: +2ms
  PID 2063 wake time: +341ms
  PID 2063 wake time: +2ms
  PID 2063 wake time: +8ms

Daily stats:
  Current start time: 2021-02-23-00-05-00
  Next min deadline: 2021-02-24-01-00-00
  Next max deadline: 2021-02-24-03-00-00
    Package changes:
      Update com.topjohnwu.magisk vers=4834
      Update com.topjohnwu.magisk vers=4834
      Update com.estrongs.android.pop vers=15012
      Update com.estrongs.android.pop vers=15012
      Update com.estrongs.android.pop vers=0
      Update com.estrongs.android.pop vers=0
      Update com.ghisler.android.TotalCommander vers=744
      Update com.ghisler.android.TotalCommander vers=744

Statistics since last charge:
  System starts: 9, currently on battery: false
  Estimated battery capacity: 4000 mAh
  Min learned battery capacity: 4104 mAh
  Max learned battery capacity: 4104 mAh
  Time on battery: 0ms (0.0%) realtime, 0ms (--%) uptime
  Time on battery screen off: 0ms (--%) realtime, 0ms (--%) uptime
  Time on battery screen doze: 0ms (--%)
  Total run time: 1h 6m 41s 670ms realtime, 1h 6m 41s 670ms uptime
  Discharge: 0 mAh
  Screen off discharge: 0 mAh
  Screen doze discharge: 0 mAh
  Screen on discharge: 0 mAh
  Device light doze discharge: 0 mAh
  Device deep doze discharge: 0 mAh
  Start clock time: 2021-02-21-13-47-24
  Screen on: 0ms (--%) 0x, Interactive: 0ms (--%)
  Screen brightnesses: (no activity)
  Connectivity changes: 7

  CONNECTIVITY POWER SUMMARY START
  Logging duration for connectivity statistics: 0ms
  Cellular Statistics:
     Cellular kernel active time: 0ms (--%)
     Cellular Sleep time:  0ms (--%)
     Cellular Idle time:   0ms (--%)
     Cellular Rx time:     0ms (--%)
     Cellular Tx time:   
       less than 0dBm:  0ms (--%)
       0dBm to 8dBm:  0ms (--%)
       8dBm to 15dBm:  0ms (--%)
       15dBm to 20dBm:  0ms (--%)
       above 20dBm:  0ms (--%)
     Cellular data received: 0B
     Cellular data sent: 0B
     Cellular packets received: 0
     Cellular packets sent: 0
     Cellular Radio Access Technology: (no activity)
     Cellular Rx signal strength (RSRP): (no activity)
Your persist partition mighe be broken, flash stock and flash Los again please.

I got it finally working

turns out my pc was identified 2 devices so uninstalled them and tried the steps again

this time my pc identified my phone is fastbootd and i flashed the rom

only complain is the display cutout settings doesnt work lol

thank you for the help



Edit: If i want to update the rom i use the recovery and update from adb sideload?
No, still fastbootd, OTA will remove vendor partition.
 
  • Like
Reactions: Nashiro10

Nashiro10

Member
Oct 15, 2017
9
1
13
So...I do the same steps i did to install the rom to update it?
Install all the images in separate?

EDIT: Meanwhile the display cutout is not working
I found a Temporarily solution
Install Super status bar
Its free and you'll be able to see your notifications again with a bit of customization
Funny that the app knows where the hole punch is lol
 
Last edited:
  • Like
Reactions: LeithJones

TheShanMan

Senior Member
Oct 29, 2013
80
8
28
I'm not entirely sure if I'm already good to go with fastbootd (don't really understand it completely yet). But before trying anything else I got a fastbootd screen when I did "fastboot reboot fastboot". So does that mean I don't have to go through the fastbootd procedure before starting?

I installed the recovery according to the OP but then it didn't go into fastbootd and now I get a bootloop. Does that imply I wasn't as fastbootd ready as I thought I was? Or what might the issue be?

I'm trying to install on a stylus FYI.

EDIT: Interestingly, I did a lenovo rescue and when it was done, it booted into fastbootd. Guess that fastbootd was still queued up! Hahaha!
 
Last edited:

tree95763

Member
May 24, 2016
14
3
3
Not quite sure where i am going wrong. Android 10, unlocked rooted fastboot d. Everything is great til about the third system part then error message: "FAILED (remote : Operation not permitted)" tried going to product then back. no go.
 

TheShanMan

Senior Member
Oct 29, 2013
80
8
28
I'm not entirely sure if I'm already good to go with fastbootd (don't really understand it completely yet). But before trying anything else I got a fastbootd screen when I did "fastboot reboot fastboot". So does that mean I don't have to go through the fastbootd procedure before starting?

I installed the recovery according to the OP but then it didn't go into fastbootd and now I get a bootloop. Does that imply I wasn't as fastbootd ready as I thought I was? Or what might the issue be?

I'm trying to install on a stylus FYI.
Any thoughts on avoiding this bootloop? I'd like to give this another go this weekend, or if there are no ideas then maybe I'll try a different rom but I'd love to stick with LOS.
 

TheShanMan

Senior Member
Oct 29, 2013
80
8
28
For what it's worth, I just flashed crDroid with no issues according to https://forum.xda-developers.com/t/rom-crdroid-unofficial-rav-sofia-6-x.4168659/. So it doesn't seem that my setup for doing this is wrong. I'd like to give Lineage another go. Maybe my failure the first time was a fluke? As someone whose rom installing experience is very new (albeit plenty of twrp'ing and rooting in the past), it would be nice to hear some ideas on my bootloop, but if not, there's no reason I can't just try a second time and see what happens.
 

TheShanMan

Senior Member
Oct 29, 2013
80
8
28
Gave it a go, and same thing. "fastboot flash recovery recovery.img" and then "fastboot reboot fastboot" results in the blue motorola boot screen appearing for a moment, and then rebooting (bootloop). I even checked the md5 of the recovery.img file and it matches. Does that mean the stylus (2020 version, XT2043-4) isn't compatible?

Is installing the recovery necessary? I don't have to do that with the crdroid rom I linked to above. Curious if that's a step I can skip and maybe that would get me past this bootloop issue.

EDIT: Would using the unofficial twrp for the stylus be a viable recovery to follow these instructions with hopefully better success? https://forum.xda-developers.com/t/recovery-unofficial-twrp-3-5-0.4155041/

EDIT 2: twrp takes over for fastbootd I guess... "fastboot reboot fastboot" takes me into twrp fastboot mode. So I guess twrp is no good for this. But since I can get into fastbootd without the recovery, I guess I'll try following all the instructions except installing the recovery. Guessing that won't work but until I get some guidance on this, it's something to try at least.

My guess at this point: this rom (or more accurately, the recovery) isn't compatible with the stylus/power devices.
 
Last edited:

ycdroid

New member
Feb 28, 2021
2
0
1
I have got a weird problem: After flashing ( recovery.img + lineage-18.1-rav-20210222-sjll.zip ) the battery reports 0% charge, 0 Volts, and 100% capacity.
Flashed with the full battery, everything else seems to work. Left overnight unplugged, recharged in the morning, the battery still show 0%.
The phone is new XT2045-3 Moto g fast from retailer in Canada (Mfr. date on the retail box: 2020-11-07). Battery was fine out of box.

When flashing I did encounter this issue where the system.img there was an error message of not enough space available.
So i went and flashed the product.img first, and after that repeated the system.img step once again, and it did flash with no errors!.
The phone rebooted and this is when i first noticed the 0% battery issue.

Re-flashed everything again, this time i did an earlier version ( recovery.img + lineage-18.1-rav-20210127-sjll.zip ) - all went smooth, no errors, the phone boots, but it did not fix the battery issue.

Now thinking going back to stock ROM for a full factory recovery, but the problem is that I can't download the stock ROM.
The official Motorola site at ( https://motostockrom.com/?s=XT2045-3 ) rejects downloads saying the file too busy been requested many times.

Thanks a lot for helping out, and building the LineageOS for this phone.


Any help on where to get the official ROM for factory recovery?

EDIT:
So i tried succesfully flashing TWRP, and finally
went back to the Stock ROM from lolinet.
The battery operation went back to normal.

So i decided to flash the LineageOS 18.1 once again : carefully observing all the steps - this time I flashed the lineage-18.1-rav-20210127-sjll.zip and sure enough I have got the the same exact error:

c:\los>fastboot flash recovery recovery.img
Sending 'recovery_a' (24924 KB) OKAY [ 0.731s]
Writing 'recovery_a' OKAY [ 0.337s]
Finished. Total time: 1.123s

c:\los>fastboot reboot fastboot
Rebooting into fastboot OKAY [ 0.001s]
< waiting for any device >
Finished. Total time: 17.637s

c:\los>fastboot set_active a
Setting current slot to 'a' OKAY [ 0.094s]
Finished. Total time: 0.096s

c:\los>fastboot flash:raw boot boot.img
Sending 'boot_a' (65536 KB) OKAY [ 2.097s]
Writing 'boot_a' OKAY [ 0.843s]
Finished. Total time: 3.018s

c:\los>fastboot flash dtbo dtbo.img
Sending 'dtbo_a' (8192 KB) OKAY [ 0.216s]
Writing 'dtbo_a' OKAY [ 0.140s]
Finished. Total time: 0.410s

c:\los>fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
Rewriting vbmeta struct at offset: 0
Sending 'vbmeta_a' (8 KB) OKAY [ 0.001s]
Writing 'vbmeta_a' OKAY [ 0.004s]
Finished. Total time: 0.060s

c:\los>fastboot erase metadata
Erasing 'metadata' OKAY [ 0.025s]
Finished. Total time: 0.070s

c:\los>fastboot flash system system.img
Resizing 'system_a' FAILED (remote: 'Not enough space to resize partition')
fastboot: error: Command failed

c:\los>


At this point I decided not to proceed any further and upon reboot i got stuck in a bootloop...

Any ideas?
 
Last edited:

ycdroid

New member
Feb 28, 2021
2
0
1
fastboot flash system system.img
Resizing 'system_a' FAILED (remote: 'Not enough space to resize partition')
fastboot: error: Command failed
Hi, I managed to flash it have booted LineageOS succesfully . Solved the issue by ignoring the above error, and proceeding with the last remaining command "fastboot flash product product.img".
After that I basically repeated the entire set of commands once more, and this time all of them finish succesfully without errors.

Rebooted the phone, and everything seems to work, including hte battery charge.
Was almost ready to return this Moto G fast back to retailer, and walk away :)
 

Nashiro10

Member
Oct 15, 2017
9
1
13
Hi!
Here's a little help for y'all having problem trying to flash the rom
This phone is a little different to flashing stuff to it, which i found out the bad way lol so here's a quick guide so you have a higher chance to flash the rom without any issue! (I dont guarantee it'll work, its something i tested and worked all the times i flashed roms to my poor phone lol)

I'd strongly recommend you do a clean install (Factory reset from stock Android 10) and backup your important stuff before you do lol
Do the first steps
A mistake i made in the begining is that after i flashed the recovery i decided to boot the phone back to the stock rom which caused a brick, so after you flash the recovery.img there's no turning back (Use the recovery tool that motorola gives so you can restore your device to stock if the phone fails to boot or flashing returns with an error, but make sure its on fastboot, not fastbootd when you plug your phone to the computer to restore it)
Continue the steps and
when you get to flashing the images
Simply flash the product.img before the system.img
Like this
fastboot set_active a
fastboot flash:raw boot boot.img
fastboot flash dtbo dtbo.img
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot erase metadata
fastboot flash product product.img
fastboot flash system system.img

I suppose that the product.img has the data that the phone needs so it knows where the system.img files belong to or how to divide them to the right spots so it doesn't return with the "Not enough space" error (Dunno im kinda a noob at that)

And boom!
Also you can do this with every rom you try for this phone
always flash product.img before system.img
I had the most luck out of it with it lol, Enjoy!