1

I purchased a new Motorola Moto G6 with the intention to try out using LineageOS instead of the stock rom.

Here's everything that used to appear in the About section of the Settings. Keep in mind I selected Portuguese so I'll be translating some labels:

Software channel: retin

Android version: 8.0.0

Android security patch level: 2018-04-01

Base band version: M450_03.08.10.51R ALI_INDIADSDS_CUST

Kernel version: 3.18.71-perf-ga4749e5

hudsoncm@ilclbld32 #1

Fri Mar 30 11:53:22 CDT 2018

Version number: OPS27.82-45

This is my first time messing with phones like this. I am a Computer Engineer, though.

I started following the instructions here. I enabled developer options in the settings, enabled USB debugging and allowed OEM unlocking.

Then I unlocked the bootloader. I'm using ADB and Fastboot that came with Android Studio.

I ran fastboot oem get_unlock_data, got the code, inserted in on the Motorola website, got the email with the unlock key and unlocked it with fastboot oem unlock UNIQUE_KEY.

Then I installed TWRP 3.3.1-0. No problems there.

Then I had to search for the link to download LineageOS and GApps because it looked like the steps I was following were incomplete.

I downloaded LineageOS from here and GApps from here. For the latter, I chose ARM64, Android 10.0 and full. I transfered them to the internal storage using Android Studio Device File Explorer.

Then I followed the YouTube video from the first link. I had trouble wiping because of encryption, so it seems. I followed this to proceed. Using a pass or a pin didn't work. The next solution, Repair File System, was unavailable. I could only see Change File System. Then I formatted /data to EXT2 then back to EXT4 and it worked.

Then I tried to flash LineageOS. I got error 255. I looked here. Apparently, I should have used a 64 bit TWRP. I found one here and flashed it. Then I was able to flash both LineageOS and GApps. No error messages here.

Then I rebooted without installing the TWRP app. I got the following:

Start Up Failed:

Your device didn't start up successfully.
Use the Software Repair Assistant on computer
to repair your device.
Connect you device to your computer to get
the Software Repair Assistant.

AP Fastboot Flash Mode (Secure)
Error: failed to load kernel!
Fastboot Reason: Fall-through from normal boot mode
USB connected

I searched and didn't find much. I looked for the Software Repair Assistant but it seems it's only good to reinstall the stock ROM. I still want to install LineageOS, though.

I found some results about flashing boot.img and some other stuff, but I'm too afraid to hard brick my phone to follow any instructions that haven't been written specifically for my situation.

I still can access TWRP. I wiped and installed again to double check that there wasn't any error messages during flashing and then again to try installing the TWRP app, but the prompt for that didn't show up.

Please advise on what to do to complete installing LineageOS on my Moto G6.

Thanks in advance.

Update 2020-12-15: It seems that the tutorial I followed has been updated. Now there are no steps missing. I'll try again using the files provided there.

Update 2020-12-16: I'm currently trying to flash stock ROM in order to follow the latest instructions. I'm using Lenovo Rescue and Smart Assistant but it's been on Wait for matching firmware, don't unplug your device for quite a while now. In the meanwhile, I'm downloading a stock ROM that more closely matches my device. I found out about the command fastboot getvar all so I'll post the output here:

(bootloader) version: 0.5
(bootloader) version-bootloader: moto-sdm450-C3.09
(bootloader) product: ali
(bootloader) board: ali
(bootloader) secure: yes
(bootloader) hwrev: PVT2
(bootloader) radio: 5
(bootloader) storage-type: emmc
(bootloader) emmc: 32GB SAMSUNG GD6BMB RV=08 PV=01 FV=0000000000000001
(bootloader) ram: 3GB SAMSUNG LP3 DIE=8Gb M5=01 M6=06 M7=00 M8=5F
(bootloader) cpu: SDM450
(bootloader) cid: 0x0032
(bootloader) channelid: 0xc0
(bootloader) securestate: flashing_unlocked
(bootloader) iswarrantyvoid: yes
(bootloader) max-download-size: 534773760
(bootloader) reason: Fall-through from charger boot mode
(bootloader) imei: [REDACTED]
(bootloader) meid:
(bootloader) date: 08-11-2018
(bootloader) sku: XT1925-13
(bootloader) carrier_sku: XT1925-13
(bootloader) battid: SB18C18509
(bootloader) iccid:
(bootloader) cust_md5:
(bootloader) max-sparse-size: 268435456
(bootloader) current-time: "Tue May  9  7: 0:46 UTC 1972"
(bootloader) ro.build.fingerprint[0]: motorola/ali/ali:8.0.0/OPS27.82-45
(bootloader) ro.build.fingerprint[1]: /56:user/release-keys
(bootloader) poweroffalarm: 0
(bootloader) ro.build.version.full[0]: Blur_Version.27.81.56.ali.retail.
(bootloader) ro.build.version.full[1]: en.US
(bootloader) ro.build.version.qcom: LA.UM.6.6.r1-04400-89xx.0
(bootloader) version-baseband: M450_03.08.10.51R ALI_INDIADSDS_CUST
(bootloader) kernel.version[0]: Linux version 3.18.71-perf-ga4749e5 (hud
(bootloader) kernel.version[1]: soncm@ilclbld32) (gcc version 4.9.x 2015
(bootloader) kernel.version[2]: 0123 (prerelease) (GCC) ) #1 SMP PREEMPT
(bootloader) kernel.version[3]:  Fri Mar 30 11:53:22 CDT 2018
(bootloader) sbl1.git: git=MBM-NG-VC3.09-0-g4650d8f
(bootloader) rpm.git: git=MBM-NG-VC3.04-0-g02798db
(bootloader) tz.git: git=827710b-dirty
(bootloader) devcfg.git: git=827710b-dirty
(bootloader) keymaster.git: git=827710b
(bootloader) cmnlib.git: git=827710b
(bootloader) cmnlib64.git: git=827710b
(bootloader) prov.git: git=827710b-dirty
(bootloader) aboot.git: git=MBM-NG-VC3.09-0-g225f207
(bootloader) frp-state: no protection (0)
(bootloader) ro.carrier: retin
(bootloader) current-slot:
(bootloader) slot-suffixes: _a
(bootloader) slot-count: 1
(bootloader) slot-successful:_a: INVALID
(bootloader) slot-successful:_b: INVALID
(bootloader) slot-bootable:_a: INVALID
(bootloader) slot-bootable:_b: INVALID
(bootloader) slot-retry-count:_a: unknown
(bootloader) slot-retry-count:_b: unknown
all: listed above
Finished. Total time: 0.082s

I thought I had 1925-3 but it's a XT1925-13... Explains why I received a charger with India standard pins in Brazil... At least it came with an adapter.

Later today, the Lenovo tool worked (I closed it, opened it again and followed the instructions to the letter).

I got the screenshot from Magisk Manager as requested.

MagiskManager

6
  • If you bought the phone with the plan to install LineageOS, why haven't you chosen a device with official LineageOS support? Unofficial custom ROMs may work or not, usually the chance is much higher getting a working ROM for on officially supported device.
    – Robert
    Dec 15, 2020 at 10:56
  • @Robert I did a quick search before purchasing and I found that tutorial for this device so I imagined it was ok. I had no idea there was this difference between official and unofficial.
    – GuiRitter
    Dec 15, 2020 at 10:59
  • @alecxs Thanks, I'll try that tonight. I wiped those referenced in the video: Dalvik / ART Cache, Cache, System and Data,
    – GuiRitter
    Dec 15, 2020 at 11:53
  • 1
    okay these partitions can be wiped safely. do not wipe vendor, modem/radio efs or any other firmware related partitions, LineageOS requires a working underlaying stock firmware and most likely comes with it's own system.img + boot.img only (the latter one should be already dm-verity disabled)
    – alecxs
    Dec 15, 2020 at 12:04
  • @alecxs I tried to install no-verity-opt-encrypt-6.1.zip but it failed. I got this error from the log: /tmp/updater[63]: .: config.sh: No such file or directory. I tried after wiping as before and after installing LineageOS and GApps. Speaking of which, I tried with the GApps provided by the now fixed tutorial I was following.
    – GuiRitter
    Dec 16, 2020 at 2:25

1 Answer 1

1
  • install stock ROM + firmware (do not accidentially re-lock bootloader)

  • make sure device is working fine before trying to install custom ROM

  • boot custom recovery from fastboot

    fastboot boot mali.img
    
  • format userdata partition from TWRP menu

  • reboot bootloader

  • boot custom recovery from fastboot (again)

  • backup boot, recovery, system, vendor (just in case)

  • copy backup to PC

    adb pull /sdcard/TWRP
    
  • wipe system, vendor

  • install LineageOS flashable zip

  • reboot and wait for LineageOS is booted successfully


After this, try to install GApps

  • reboot bootloader
  • boot custom recovery from fastboot (again)
  • install OpenGApps flashable zip
  • format userdata partition from TWRP menu
  • reboot and wait for LineageOS is booted successfully

If all wents well, done.

If device goes into boot-loop it must be related to GApps. start again by wiping system, vendor and install LineageOS again. In Magisk Manager check the SAR (system-as-root) section.

Only if your device is SAR (system-as-root) that workaround may help

  • bind mount /system_root/system

    adb shell
    mount -w /system
    mkdir /system_root
    mount -o bind /system /system_root
    umount /system
    mount -o bind /system_root/system /system
    
  • install GApps flashable zip


If still not working flash another stock ROM+firmware (Android 8.1.0 or Android 9.0) and try again.

Also try other custom ROMs. I recommend to only flash official custom ROMs with Status: Stable (for example RevengeOS or Resurrection Remix)

4
  • Note: this is the most non-invasive install method without installing TWRP or rooting and preserving encryption
    – alecxs
    Dec 17, 2020 at 11:07
  • Yes, thank you! Successfully installed LineageOS and GApps. I used Sensor Box for Android to test it's sensors. Also tested the camera, sound recording, GPS and voice calls. All working! I'll try to re-lock the bootloader now to keep it cleaner.
    – GuiRitter
    Dec 18, 2020 at 3:48
  • Additional question, if I may: I read several mentions about OTA updates as I worked on this. I received some updates as I was configuring it for the first time. Does that mean that OTA updates are already enabled for me?
    – GuiRitter
    Dec 18, 2020 at 3:49
  • 1
    Do NOT re-lock bootloader, that will brick your device. Google Play updates will work as usual. For FOTA updates custom recovery is required, you must flash TWRP. But seriously i doubt unofficial ROMs will receive FOTA. "Never touch a running system" :)
    – alecxs
    Dec 18, 2020 at 7:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .