TWRP tree for 'rtwo' Moto Edge+ 2023
  • Makefile 63.4%
  • Shell 36.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Darth Imperivious 7a9f38b495
Update README.md
2025-01-09 21:21:52 -05:00
prebuilt Add everything except the recovery folder 2025-01-09 20:33:19 -05:00
recovery/root Add the rest (90 modules) 2025-01-09 20:58:14 -05:00
Android.mk Add everything except the recovery folder 2025-01-09 20:33:19 -05:00
AndroidProducts.mk Add everything except the recovery folder 2025-01-09 20:33:19 -05:00
BoardConfig.mk Add everything except the recovery folder 2025-01-09 20:33:19 -05:00
bootimg.mk Add everything except the recovery folder 2025-01-09 20:33:19 -05:00
device.mk Add everything except the recovery folder 2025-01-09 20:33:19 -05:00
mkbootimg Add everything except the recovery folder 2025-01-09 20:33:19 -05:00
README.md Update README.md 2025-01-09 21:21:52 -05:00
system.prop Add everything except the recovery folder 2025-01-09 20:33:19 -05:00
twrp.dependencies Add everything except the recovery folder 2025-01-09 20:33:19 -05:00
twrp_rtwo.mk Add everything except the recovery folder 2025-01-09 20:33:19 -05:00
vendor.prop Add everything except the recovery folder 2025-01-09 20:33:19 -05:00
vendorsetup.sh Add everything except the recovery folder 2025-01-09 20:33:19 -05:00

Motorola Edge 40 Pro/Motorola Edge+ 2023/Moto X40 (Codename: "rtwo") TWRP Port

This is a TWRP device tree for the Motorola Edge 40 Pro/Motorola Edge+ 2023/Moto X40.

Note

This family of phones uses boot.img's kernel to boot the recovery (kind of like recovery-on-boot, except recovery is on a second ramdisk). As a result, an empty kernel image is provided as a workaround (the TWRP build system needs a kernel image). Do not flash the recovery.img generated by the build system when building. Otherwise, it will throw you

No valid operating system found

when attempting to boot into recovery mode (Android itself will still boot fine, only recovery is affected until you flash a proper image).

Attempting to boot using fastboot boot will not work; it must be flashed to recovery. Since it has no kernel, fastboot boot recovery.img will result in the same No valid operating system found error.

Working Features

  • It can boot
  • Touchscreen
  • File Manager (can browse /system)
  • Can read (and possibly write) internal storage (you have to mount from terminal currently). Exception is /data, which is encrypted.
  • CPU Temperature
  • Brightness

Non-working features

  • USB (and in turn adb, mtp, this is top priority)
  • Battery percentage (LineageOS recovery has the same issue)
  • fastbootd (please do not try to boot into fastbootd, it may throw your device into a state where it can only boot into Android when "fastboot boot boot.img" is used, and it can only be exited when stock/LineageOS recovery.img is flashed).
  • /data partition with FBE (FBE just does not work)

Untested

  • Flashing
  • Sideload
  • Anything else that you may use TWRP for normally

Instructions to Build

Same as all other TWRP (Android 12.1) device trees (when you git clone, the device tree is supposed to be located in device/motorola/rtwo, and no branch is required). However, ignore the existing recovery.img in the /out/target/product/rtwo directory and instead run this command from within the root directory of the build system:

out/host/linux-x86/bin/mkbootimg --ramdisk out/target/product/rtwo/ramdisk-recovery.img --base 0x00000000 --pagesize 4096 --dtb device/motorola/rtwo/prebuilt/dtb.img --os_version 14 --os_patch_level 2024-12-01 --header_version 4 --output recovery.img

This will generate a recovery.img (stored in the root directory of the build system) which is bootable on these devices.

This is to avoid the No valid operating system found error, which can occur if the recovery.img is not in the format generated from the command above.

Credits