Don't use this , it's just here cause i love crdroid's logo and name and Now days they are tweaking
DownloadBootloader Unlocked
Usb driver and platform tools
Getting your device ID
# 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
fastboot oem unlock yourUnlockKey
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
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
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"
Create your ROM folder where all your source will be stored.
mkdir lineage
cd lineage
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)
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
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 ../../..
Set up the build environment and start the compilation process.
. build/envsetup.sh
lunch lineage_cancunf-bp4a-user
mka bacon
Packaging initial zip which basically flashes vendor_boot.img and boot.img.
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.
Download and configure the GoFile upload script to easily share your builds.
# 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"
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.
# Device treegit clone -b sixteen-qpr2 https://github.com/sarthakroy2002/device_motorola_cancunf device/motorola/cancunf# Prebuilt kernel repogit clone -b sixteen-qpr2 https://github.com/sarthakroy2002/device_motorola_cancunf-kernel device/motorola/cancunf-kernel# motorola cam extensiongit clone -b sixteen-qpr2 https://github.com/sarthakroy2002/vendor_motorola_cancunf vendor/motorola/cancunf# motorola camgit clone -b sixteen https://github.com/yaap/vendor_motorola_cancunf-motcamera vendor/motorola/cancunf-motcamera# Display featuresgit clone -b master https://github.com/cyberknight777/android_packages_apps_DisplayFeatures packages/apps/DisplayFeatures# Mediatek hardwaregit clone -b sixteen https://github.com/yaap/hardware_mediatek hardware/mediatek# Mediatek seplociygit 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 dtgit -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