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

I have no idea whether my experience report has or will interest anyone here. Probably not. So what? Nevertheless, a small update at this point:

The Ulefone Armor X5 Pro has now been in practical use since January 2024 and is running stably and better than ever before. Automatic backup with Seedvault and with Neo Backup is active.

Understandably the developer AndyYan responsible for this outstanding GSI ROM decided to reduce support for the older LinageOS 20 (Android 13) variant from monthly updates to quarterly. With Android 15 in beta phase this is certainly expected to reduce the already insane amount of work maintaining multiple versions at once.

At this point I want to say: Thank you, AndyYan! Thank you for the hard work you have put and still put into these free operating systems!

There is a good chance that LineageOS 21 GSI will not boot on my Ulefone. See here for an example [XDA Forum] of older devices failing to boot. Not gonna try myself as everything is working so good right now.

Homescreen_Neu.jpg CurrentPatchlevel.png

==================================
= WARNING: Problematic topic ahead =
==================================

In short: Do not store confidential data on such a phone!


Circumstances from the world of politics (complete toxic waste if you even touch on political issues online, let alone deal with such topics in an argumentative way) have made me put my IT (in the sense of the two non-synonymous sub-areas “privacy” and “security”) to the test and massively improve it.
To make a long story short: A GSI on a China phone in orange state does not allow for practical storage of private data - despite some damage limitation measures taken.

Blabbering about possible attacks and loopholes on open systems such as PCs or Android phones in the orange state would be off-topic here and I will leave it at the suggestion that PC procedures (very long diceware passphrase, tamper evidence, emergency poweroff, live system/plausible deniability/hidden containers...) cannot be adequately carried out on an open smartphone. Just opening the bus ticket to be allowed to board the bus would become impossible.

I have installed a few measures on the Ulefone to mitigate the threat situation a little (rather beginner traps). Shelter is used to separate two profiles. This is less for security reasons and more to protect the battery. All the permanently active jokers (like Threema Push) can be stopped from wasting power and data by freezing the app when not in use.
To create a barrier at least against casual attackers, I move photos to a separately encrypted area. What can be typed alphanumerically + special characters on a touchscreen in adequate time and reliability (and also reliably gets stuck in my sick brain) just reaches an entropy of approx. 60 bits. Unfortunately, a good graphics card can crack that in too short a time.
 

Blog entry information

Author
KleinesSinchen
Views
726
Comments
1
Last update

More entries in Personal Blogs

More entries from KleinesSinchen

General chit-chat
Help Users
  • No one is chatting at the moment.
  • S @ salazarcosplay:
    hunter x hunter
  • S @ salazarcosplay:
    he has not allowed anyone to continue it for him for example
  • Xdqwerty @ Xdqwerty:
    @salazarcosplay, theres a dragon ball af mod for budokai 3
  • Xdqwerty @ Xdqwerty:
    updated ship of harkinian, gonna install some hd texture pack
  • Xdqwerty @ Xdqwerty:
    I might download rayman revolution for my ps3
  • BigOnYa @ BigOnYa:
    I may try the new ram site, and download more RAM to my Switch. Not sure if ddr3 is the right ram
    for it tho. Edit- no it uses floppy Ram, just like @AncientBoi
    +1
  • Xdqwerty @ Xdqwerty:
    aeiou
  • BigOnYa @ BigOnYa:
    And sometimes Z
  • SylverReZ @ SylverReZ:
    @K3Nv2, MAGA supporters be wearing tin foil hats lol.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, whats maga?
  • BigOnYa @ BigOnYa:
    It stands for Maniacs Against General Acceptance
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, people rejecting general consensus about stuff?
    +1
  • BigOnYa @ BigOnYa:
    Yup, nuh its really just Trump followers
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, im not american so i dont care about trump
    +1
  • Xdqwerty @ Xdqwerty:
    or us elections
  • BigOnYa @ BigOnYa:
    Me niether, us north Koreans don't care
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    i don't care either, even if i'm american
  • BakerMan @ BakerMan:
    truth be told, i agree with psi, i dislike both candidates, but i'd probably vote trump simply because the economy was better during his presidency
  • AngryCinnabon @ AngryCinnabon:
    Just be careful, if trump ends up winning and using project 2025 America might really change...for the worse.
  • AngryCinnabon @ AngryCinnabon:
    I'm not american and even that sends shivers down my spine.
  • AngryCinnabon @ AngryCinnabon:
    anything that offers trump an opportunity to become an actual dictator
    is bad in my book, i could care less if it wasn't for that...
  • K3Nv2 @ K3Nv2:
    Canada: America's Russia
  • NinStar @ NinStar:
    people are so dramatic that I can't even tell if they are being serious
    NinStar @ NinStar: people are so dramatic that I can't even tell if they are being serious