# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.

deviceinfo_format_version="0"
deviceinfo_name="Motorola Moto Edge 40 Pro"
deviceinfo_manufacturer="Motorola"
deviceinfo_codename="motorola-rtwo"
deviceinfo_year="2023"
deviceinfo_dtb="qcom/sm8550-motorola-rtwo"
deviceinfo_arch="aarch64"

# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="2400"
deviceinfo_getty="ttyMSM0;115200"
deviceinfo_no_framebuffer="true"

# Small base initramfs (fits init_boot) + a separate initramfs-extra.
deviceinfo_create_initfs_extra="true"

# Bootloader: Android 13 GKI. The kernel goes in boot, the DTB + cmdline +
# initramfs in vendor_boot. init_boot holds the generic (first-stage)
# ramdisk - it MUST be replaced with pmOS's, or the stock AOSP /init runs.
# Lessons folded in from device-motorola-dubai (the closest working
# Motorola mainline port) and the stock LineageOS images.
deviceinfo_flash_method="fastboot"
deviceinfo_flash_fastboot_partition_dtbo="dtbo"
deviceinfo_flash_fastboot_partition_vbmeta="vbmeta"
# 'earlycon' is REQUIRED on Motorola - without it the ABL reboots the
# phone immediately (see device-motorola-dubai/kernel-cmdline.conf).
deviceinfo_kernel_cmdline="console=ttyMSM0,115200n8 earlycon"
deviceinfo_generate_bootimg="true"
deviceinfo_header_version="4"
deviceinfo_bootimg_qcdt="false"
deviceinfo_flash_pagesize="4096"
# Stock uses base 0 (mkbootimg defaults to 0x10000000, dtb ends up outside
# RAM). os_* to satisfy anti-rollback on the boot image.
deviceinfo_bootimg_custom_args="--base 0x00000000 --kernel_offset 0x00008000 --ramdisk_offset 0x01000000 --tags_offset 0x00000100 --dtb_offset 0x01f00000 --os_version 16.0.0 --os_patch_level 2026-08-01"
deviceinfo_flash_sparse="true"

# UFS storage
deviceinfo_rootfs_image_sector_size="4096"

# A/B device (androidboot.slot_suffix=_a). UFS controller: 1d84000.ufshc.
# Dynamic "super" partition (group "mot_dp_group", ~9.94 GB) holds
# system/system_ext/product/vendor/vendor_dlkm/system_dlkm. Resolve the real
# node from the initramfs debug shell:
#   ls -l /dev/disk/by-partlabel/super
# then uncomment (both fields = the super partition, A and B share it here):
# deviceinfo_super_partitions="/dev/disk/by-partlabel/super /dev/disk/by-partlabel/super"
