Experience with root (Magisk) and GSI (LineageOS) on Ulefone Armor X5 Pro [≈3MB pictures]

Part 0 - Preface

Warning: This is BY NO MEANS to be treated as a ready-to-use tutorial and therefore posted as blog entry (nevertheless all steps are listed at the bottom in short form). It is an experience report to the best of my knowledge. The description might contain fatal errors.
Modification involves the risk of data loss and may end with an unusable device without any possibility of recovery!

Anyone attempting such things does so at their own risk!
The Ulefone Armor X5 Pro is the only one of my Android devices that I bought new. As mobile internet use is out of the question for me and security-related things should never be done on a phone for me, there were only two criteria for the purchase decision: Low price and robustness. The latter is particularly important for a clumsy idiot with trembling hands.

It should be clear that you can't expect great support for such a cheap Chinese device. Nevertheless, the number of updates that have been delivered since the end of 2020 is remarkably low: Zero. Not a single one. Nada. Magikarp used splash!

On the official download page, which redirects to Google Drive, there are two stock ROMs. One for Android 10 and one for 11 with a note to only use the version that was pre-installed... followed by a warning of a "brick" in case of non-compliance. Particularly annoying as version 11 was apparently maintained (at least from the date stamp) and version 10 was not.
Google Drive links on Ulefone page are dead for all devices. A little note on top says to contact support for download. → :shit:
Either that or search on other sites. It can be found, but I won't link anything (would probably be a dead link soon)

The mention of "at least from the date stamp" is important, because the 10 file has a date of 2021, but does not contain an update compared to the pre-installed version - a flashing according to the instructions ends with "Android security update July 5, 2020"
:shit:Great!:shit:
Now to the positive. The device is several years old and no longer under warranty... so get on with it! Do something with it, Sina, and finally learn how to use these things!
Bootloader unlock is remarkably simple. The standard command
fastboot flashing unlock
takes effect immediately. After confirming with [Volume up] (or was it [Volume down]?), the user profile is deleted and from then on the smartphone starts with a 5-second delay and the crappy "Orange State" warning.
👍 So far so good👍

Let’s get started:
Part 1 – Magisk

The installation of the latest, stable Magisk - currently 26.4 - is trivial. The stock ROM for the MediaTek chipset already comes in individual partitions. Consequently, boot.img is easily available. Install Magisk App, select boot.img, patch it and
fastboot flash boot magisk_patchedXZY.img
That was all. No disable verity, no flash vbmeta or whatever else you find when searching on automatically created pages. That's how easy it is to become root on this device. That's how it should be!
Nothing stands in the way of adding Busybox for a decent set of Unix utilities as a Magisk module - as well as a module for "systemless debloating". Goodbye, "Google Apps" garbage!

In principle, everything would be fine at this point. If it weren't for the problem with the lack of updates mentioned in the spoiler above. The July 2020 patch level is surely not the best and Android 10 has already been discontinued anyway.
So, if you're going to do it, do it properly:

Part 2 – Custom ROM

Trying to find a "real" adjusted custom ROM for such an exotic low-cost model is... hopeless. The same goes for TWRP: nothing. What talented developer would sit down and do something like that? Well, luckily there are still the generic system images (GSI) for all devices that came at least with Android 8. However, skepticism as to whether something like this really works as intended is appropriate.
Quickly download a suitable image (A/B, arm64): lineage-20.0-20240112-UNOFFICIAL-arm64_bvN.img.xz and hammer a few lines into the terminal in a frenzy of success. Easy to find instructions say to leave the proprietary vendor partition untouched and flash the generic image to system.

fastboot erase cache✔️Fine.​
fastboot erase userdata✔️ Fine. Factory reset again. No problem. Everything is already empty.​
fastboot erase system ❌ NOPE! „Partition table doesn't exist“​
fastboot_Fehler.png
That's right. Not the partition supposedly does not exist, no, the entire partition table does not exist. You got to be kidding me. Smells like a faulty error message→ 🤦‍♀️
Pfanne.gif

Back to the search engine. What do you find after an exhausting search? Aha. Devices shipped with at least Android 10 have a complex nested "super" partition, which contains vendor, product and system as dynamic partitions (variable size). To hell!
fastboot flash super super.img✔️ Works.​
Do you have to learn how to create a customized super.img with lpmake? No. You need a counterintuitive approach: You need to realize that fastboot is not fastboot. On newer [sic!] devices there are two different fastboot:
fastboot reboot fastboot
starts in fastbootd and within this system the "super" partition is opened. Deleting and flashing the individual components is possible.
fastboot erase system✔️
fastboot flash system lineageXZY.img✔️
fastboot reboot

Part 3 – Result

You can make something out of devices that do not receive any official support if the bootloader can be unlocked.
The smartphone works for the most part - at least at first glance.
Calls work. Mobile data connection too. Magisk 26.4 is running. Neobackup can restore apps+data. Playback of an audio drama via a Bluetooth speaker went well. Camera takes pictures. Flashlight okay. No excessive battery drain. Maybe even better than before. Time will show. With stock ROM it only lasted about two weeks for 100%→30%… PATHETIC.
WiFi is not working correctly: WPA2/WPA3 is selected under security on the Fritz!Box. Connection attempts from the Ulefone fail. Reducing the security options to WPA2 only leads to success. Assumption: Android 13 is trying to connect with WPA3 and the smartphone's hardware does not support it.

Overall, a big plus for the Ulefone Armor X5 Pro. LineageOS 20 will remain on my phone
All in all, a much cooler thing than showing off the latest 1000€ swank phone full of bloatware.

A few screenshots and photos from/of the device:
Lockscreen.jpg Homescreen.jpg Version.png Foto3.jpg
Foto2.jpgFoto1.jpg

Part 4 - Quick Summary

From 💩Google-infested💩 stock ROM to rooted device with Android 13/LineageOS 20:​

  1. Backup personal data!!
  2. Download and unpack the stock ROM from Ulefone with the PC. Also use the PC to download the desired GSI ROM (for A/B, arm64) - in my case LineageOS 20
    • Install Magisk app and patch boot.img from the stock ROM
    • Copy the patched file to the PC
  3. Activate developer options, USB debugging on, authorize PC
    • Allow OEM unlock in the developer options
    • adb reboot bootloader
    • fastboot flashing unlock ((And then agree to DELETE ALL DATA)
  4. Get root access
    • fastboot flash boot Magisk_patchedXZY.img → Rooting process finished if staying on stock ROM.
  5. Flash GSI ROM
    • fastboot erase cache
    • fastboot erase userdata
    • fastboot reboot fastboot →[fastbootd starts]
    • fastboot erase system
    • fastboot flash system lineageXYZ.img
    • fastboot reboot
After a few minutes LineageOS 20 should be ready. USB debugging without the need for authorization is active. So it is open like a barn door. If everything went well, it should be switched off.

Comments

There are no comments to display.

Blog entry information

Author
KleinesSinchen
Views
605
Last update

More entries in Personal Blogs

More entries from KleinesSinchen

General chit-chat
Help Users
  • Veho @ Veho:
    That's a relief to hear. Do you know what happened?
  • SylverReZ @ SylverReZ:
    @BakerMan, Any idea what happened? I hope that your brother's doing good.
  • BakerMan @ BakerMan:
    Well, from what I've heard from my parents, he had a seizure last night, perhaps an epileptic episode, fucking died, had a near death experience, my dad called the paramedics, they showed up, took him to the hospital, and he woke up covered in tubes, and started complaining.
  • BakerMan @ BakerMan:
    He couldn't eat until after his MRI, when he had a bomb pop.
  • BakerMan @ BakerMan:
    What matters now is that he's doing alright.
  • Veho @ Veho:
    But you still don't know what it was?
  • Veho @ Veho:
    Has he had seizures before?
  • The Real Jdbye @ The Real Jdbye:
    apparently stress can cause seizures, my brother had one during a test once
  • The Real Jdbye @ The Real Jdbye:
    never had one before that, and never had one since
  • Redleviboy123 @ Redleviboy123:
    Question about game texture chanching Do i need an own game id?
  • The Real Jdbye @ The Real Jdbye:
    @Veho for those that want to
    experience being sonic the hedgehog
  • Veho @ Veho:
    Ah, you mean
    furries.
    +1
  • The Real Jdbye @ The Real Jdbye:
    well, sonic fans are a whole separate thing from furries
  • The Real Jdbye @ The Real Jdbye:
    like bronys
  • The Real Jdbye @ The Real Jdbye:
    sonic porn is too weird even for me
  • Dumpflam @ Dumpflam:
    bruh
  • Dumpflam @ Dumpflam:
    guys how do i delete a post
  • The Real Jdbye @ The Real Jdbye:
    you don't
  • The Real Jdbye @ The Real Jdbye:
    you can report it and request deletion
  • BakerMan @ BakerMan:
    Also, no, that was his first time having a seizure, and hopefully the last
    +1
  • K3Nv2 @ K3Nv2:
    Ea play raised priced to $6 a month lol
  • BigOnYa @ BigOnYa:
    Same with uremum, she's now $2 a month
  • K3Nv2 @ K3Nv2:
    Also seizures come and and go they don't have an off switch like that it all depends
    K3Nv2 @ K3Nv2: Also seizures come and and go they don't have an off switch like that it all depends