Motorola G54 G64 Wiki

A16 QPR2

LunarisAOSP 3.12

Vanilla Gapps

Me use this

Download
A16 QPR2

LineageOs 23.2

Vanilla Gapps

Btw it is Banned By slutKnight666 lmao

Download
A16 QPR2

HalcyonOs 16.2

Vanilla Gapps

I AM NOT KIDNAPPED BY MOSSADTHRIVED!!!

Download
A16 QPR2

Crdroid 12.11

Vanilla Gapps

Don't use this , it's just here cause i love crdroid's logo and name and Now days they are tweaking

Download
Note For first Timers

Prerequisites :

Bootloader Unlocked

Usb driver and platform tools

IF YOU COMING FROM STOCK ROM
  • - Formatting with Recovery is MUST during clean flash.
  • - Any slot must not be empty, meaning if you have ever used blankflash or flashed stock ROM using RSA or got a new phone, then make sure you got atleast one ota, otherwise don't flash!
Unlocking Bootloader

Getting your device ID

  • - In developer options, enable "OEM unlocking".
  • - Connect your phone with your PC using the cable.
  • - Put your device in fastboot mode by holding vol- after clicking the restart button.
# Make sure the device is recognisable by the PC in fastboot mode
fastboot devices

# Get your device ID
fastboot oem get_unlock_data
# Output example
(bootloader) Unlock data:
(bootloader) 0A40040192024205#4C4D3556313230
(bootloader) 30373731363031303332323239#BD00
(bootloader) 8A672BA4746C2CE02328A2AC0C39F95
(bootloader) 1A3E5#1F53280002000000000000000
(bootloader) 0000000
 
# Join all the lines together into one continuous and This will be your Device String
0A40040192024205#4C4D355631323030373731363031303332323239#BD008A672BA4746C2CE02328A2AC0C39F951A3E5#1F532800020000000000000000000000

Getting your unlock key

  • - Copy the device ID string, making sure there are no spaces.
  • - Paste it into the "Make sure your device is unlockable" field on the unlock portal (you'll need to log in first), then tap Can my device be unlocked?
  • - Scroll To bottom to see Request Unlock Key button . Agree to the terms and tap it.
  • - You'll receive your unlock key via the email address you used to log in.

Unlocking command

fastboot oem unlock yourUnlockKey

A16 ROM Instructions

Clean Flash (coming from a different ROM)

# Download ROM zip and vendor_boot.img first
# Boot to bootloader
fastboot reboot fastboot
fastboot --skip-reboot update rom_cancunf_initial_install.zip
fastboot reboot bootloader
fastboot reboot recovery
# Format data with the recovery, then click apply for update
adb sideload ROM*.zip
# Reboot to system

A15 ROM Instructions

Clean Flash (coming from a different ROM)

# Download ROM zip and vendor_boot.img first
# Boot to bootloader
fastboot reboot fastboot
fastboot flash vendor_boot vendor_boot.img
fastboot reboot bootloader
fastboot reboot recovery
# Format data with the recovery, then click apply for update
adb sideload ROM*.zip
# Reboot to system

Cancunf Rom Guide

LineageOS 23.2 Android 16 QPR2

0 Setup Git Config

Configure your global git. Git is needed to work with repo and the syncing process; otherwise, you will be unable to sync and cherry-pick commits.

git config --global user.email "yourGmail@gmail.com"
git config --global user.name "Your Name"

1 Create Source Directory

Create your ROM folder where all your source will be stored.

mkdir lineage
cd lineage

2 Initialize and Sync Source

Initialize the local repository with your ROM manifest and sync.

# Initialize local repository , can add --depth=1 for making sync faster
repo init -u https://github.com/LineageOS/android.git -b lineage-23.2 --depth=1 --git-lfs --no-tags

# Clone manifest which includes dt ,kernel,display feature etc. 
git clone https://github.com/Perspective2077/cancunf-Manifest --depth=1 -b main .repo/local_manifests

# Sync source code ,  --force-sync if you had source earlier and want to eveything fresh
repo sync -c -j$(nproc --all)

3 Rom Flags (optional)

Add flags if the rom have flags option in lineage_cancunf.mk under # ROM FLAGS , check their telegram support

micro device/motorola/cancunf/lineage_cancunf.mk

4 Setup Signing Keys

Generate signing keys for secure OTA updates and verified boot.

git clone -b main https://github.com/LineageOS/scripts.git /tmp/lineage-scripts
mkdir -p vendor/lineage-priv
mv /tmp/lineage-scripts/lineage-priv-template vendor/lineage-priv/keys
rm -rf /tmp/lineage-scripts
cd vendor/lineage-priv/keys
./keys.sh
cd ../../..

5 Build the ROM

Set up the build environment and start the compilation process.

. build/envsetup.sh
lunch lineage_cancunf-bp4a-user
mka bacon

6 Package Initial-Install Zip

Packaging initial zip which basically flashes vendor_boot.img and boot.img.

Download & Setup Payload Dumper Go

Download payload-dumper-go from the official repository

wget https://github.com/ssut/payload-dumper-go/releases/download/1.3.0/payload-dumper-go_1.3.0_linux_amd64.tar.gz 
tar -xzf payload-dumper-go_1.3.0_linux_amd64.tar.gz
chmod +x payload-dumper-go
sudo mv payload-dumper-go /usr/local/bin/
payload-dumper-go -p boot,vendor_boot -o rom YOUR_ROM.zip
cd rom
echo "require board=cancunf" > android-info.txt
cat <<EOF > fastboot-info.txt
version 1
flash boot
flash vendor_boot
reboot bootloader
EOF
zip -r9 rom_cancunf_initial.zip *

Rename YOUR_ROM.zip to match your actual build name and variant before distributing it.

7 Setup GoFile Upload Script

Download and configure the GoFile upload script to easily share your builds.

Download & Configure Upload Script
# Download the raw script
wget -O upload.sh https://raw.githubusercontent.com/Sushrut1101/GoFile-Upload/master/upload.sh
chmod +x upload.sh

# Move it into your local bin so it's available on PATH
mkdir -p ~/bin
mv upload.sh ~/bin/upload.sh

# Make sure ~/bin is on PATH (add to ~/.bashrc if it isn't already)
export PATH="$HOME/bin:$PATH"

8 Building AOSP + extra links

So to build aosp you'll need the bring ups what specific rom have , example changing refrences in AndroidProducts and lineage_cancunfto whatever the AOSP rom uses , mostly custom you need to find their bring up commits. and use pixelos device tree cause lineageos dt depends on lineageos settings.


All links you probably will need

# Device tree
git clone -b sixteen-qpr2 https://github.com/sarthakroy2002/device_motorola_cancunf device/motorola/cancunf
# Prebuilt kernel repo
git clone -b sixteen-qpr2 https://github.com/sarthakroy2002/device_motorola_cancunf-kernel device/motorola/cancunf-kernel

# motorola cam extension
git clone -b sixteen-qpr2 https://github.com/sarthakroy2002/vendor_motorola_cancunf vendor/motorola/cancunf

# motorola cam
git clone -b sixteen https://github.com/yaap/vendor_motorola_cancunf-motcamera vendor/motorola/cancunf-motcamera

# Display features
git clone -b master https://github.com/cyberknight777/android_packages_apps_DisplayFeatures packages/apps/DisplayFeatures

# Mediatek hardware
git clone -b sixteen https://github.com/yaap/hardware_mediatek hardware/mediatek

# Mediatek seplociy
git clone -b sixteen https://github.com/yaap/device_mediatek_sepolicy_vndr device/mediatek/sepolicy_vndr

# Cherry pick commit for moto gesture needed if you using pixelOS device tree cause our smart tree owner didn't included a lineageos dt
git -C device/motorola/cancunf remote add 2by2 https://github.com/2by2-Project-Devices/android_device_motorola_cancunf.git
git -C device/motorola/cancunf fetch 2by2
git -C device/motorola/cancunf cherry-pick 42403f68003b2ed3de8d508042c4d7696b2f4f60 || true
git -C device/motorola/cancunf checkout --theirs app/MotoActions/src/org/lineageos/settings/device/TouchKeyHandler.java
sed -i '/GESTURE_REQUEST = 0;/a\
private static final int GESTURE_WAKELOCK_DURATION = 3000;' \
device/motorola/cancunf/app/MotoActions/src/org/lineageos/settings/device/TouchKeyHandler.java
git -C device/motorola/cancunf add app/MotoActions/src/org/lineageos/settings/device/TouchKeyHandler.java
git -C device/motorola/cancunf cherry-pick --continue
Usb Driver
Platform tools