FP3 custom rom development based on released source code

This looks fishy. That tool, among a number of others are all listed on
https://androidmtk.com/download-qpst-flash-tool (scroll down to section “Alternative Qualcomm Flash Tool”

they all have different names, they all claim to be able to flash firmware for “any qualcomm chipset” - they all call it “download” when really they mean flashing a firmware onto the device, and they are all shady windows programs from shady webpages with zero other content.

I downloaded one of those zip files. automatic virus analysis failed because (what a surprise) the zip its password protected (with the password written on the webpage in cleartext) hindering automatic analysis

I went to the trouble and unzipped it, extracted the files from the msi installer and sent them to virustotal. No known malware was detected, but the heuristics went bonkers:


TL;DR don’t dare installing and executing that stuff unless you do it on a virtual machine running on a RAM disk on a battery powered raspberry in a sealed room with lead walls, and burn it afterwards. Connect your phone at your own risk, especially if its unlocked. If the malware is any good, it might actually install itself on your phone.

Edit: After snooping a bit more in the contents, it looks like there is some actual qualcomm tools in there, but they are from 2015 and likely don’t support the newer chips like the 632, so don’t get your hopes up too high.

Edit2: Since I didn’t want to upload every single file to virustotal for checking i re-zipped the unpacked folder (without password) these are the results:

while nothing specific has been found, I have to say, this does not look safe


btw if these “qualcomm downloader” tool were to work, then THIS here https://www.96boards.org/documentation/consumer/guides/qdl.md.html would work, too. has anyone checked that?

Edit: This uses edl modem this page describes how edl mode is engaged if available

Edit again: Neither adb nor aboot on the FP3 know anything about the “edl” which is likely because thats qcom msm based chipsets specific (which have that emergency bootloader hardcoded in the main cpu - great for unbricking!)
apparently there is even a special USB cable for these chipsets that shorts a pin to force boot the phone into edl mode - available from some forensic supply shops.

probably wont help us, as this is a USB2 cable and FP3 is USB3/USB-C - its possible that something equivalent exists for the SDM6xx series, but since qcom doesn’t release docu and there is nothing in the wild… the msm series had the advantage that there are dev boards openly sold and tools for download from qcom. while for the newer SDM those are only available for OEMs.

It seems like Fairphone the company isn’t even the OEM. The more I learn about the firmware and the device itself, it looks like Fairphone outsourced parts of phone design and manufacturing to a company in far east - which did the actual hardware design. As such the knowledge and NDA’s are between that company and qualcomm, while Fairphone is out of the loop and doesn’t even have that info about their own phone.

I don’t know that for certain, but there are indications, such as the Service Menu app, (com.arima.servicemenu) - it doesn’t include an “about” info anywhere, but this here might make sense:

another bit of info is the info from customer support that qualcomm NDA related info is not known to fairphone employees even. Which would totally make sense if Arima designed and certified the phone for Fairphone.


FP3 is actually USB2/USB-C


btw, must see easter egg:

adb pull /system/priv-app/ServiceMenu/ServiceMenu.apk
mkdir ServiceMenu
cd ServiceMenu
unzip ../ServiceMenu.apk
vlc res/raw/testvideo2.3gp


res/raw/test.mp3 : “I will be” from “Avril Lavigne”, Album “The best damn thing” 2007 (cut off after 27 sec)
res/raw/speaker.mp3: beautiful excerpt from “故乡的云” by “徐美澜” - as listed here

res/raw/test_sound.mp3 – actually a RIFF wav file! 4.8 seconds of spanish music
res/raw/test_sound1.mp3 – an actual audio test file - useful for testing mic and speakers



that again makes it more likely that there are hidden extra functions on the unused wires (serial, etc…)

1 Like

There is also a free and open source tool for EDL on github:

But to properly use that we need a corresponding loader file which I couldn’t find so far.

The FP3 can be switched to EDL mode by powering it off and then keeping both volume buttons pressed while connecting the cable. (screen will stay black)

It is then detected when running edl.py. It prints some device info and complains about missing loader file. Then any further executions of edl.py result in “unknown sahara mode” until the phone is power cycled. (press the power button very long, power off again and redo the volume keys + cable)

Qualcomm Sahara / Firehose Client (c) B.Kerler 2018-2019.
__main__ - Trying with no loader given ...
__main__ - Waiting for the device
__main__ - Device detected :)
__main__ - Mode detected: sahara
Device is in EDL mode .. continuing.
Library.sahara -HWID: 0x000ba0e100000000
Serial: XXX
SBL Version: 0x00000000

Library.sahara - Couldn't find a loader for given hwid and pkhash :(

This edl prog is a good thing to dig into.

You don’t have any loader in the Loaders dir :

for (dirpath, dirnames, filenames) in os.walk(“Loaders”):
return self.loaderdb
if self.hwidstr in self.loaderdb:
logger.error(“Couldn’t find a loader for given hwid and pkhash :(”)

Install EDL loaders
“mkdir examples”
Copy all your loaders into the examples directory
“./fhloaderparse.py examples” -> will autodetect and rename loader structure and copy them to the “Loaders” directory
Or rename Loaders manually as msmid_pkhash[8 bytes].bin

Here is more ressources : https://alephsecurity.com/2018/01/22/qualcomm-edl-1/
(They also reversed a msm-8953 loader)


I’ve uploaded the qpst files to a dynamic malware analysis to see the behavior, and to see if we could get the loaders to inspect it :

  • I didn’t find any loader, we need to go deeper ;
  • The msi didn’t work on the sandbox ;
  • The exe looks suspicious. Some of the suspicious behaviors are because it is an installer.

Arima (our final assembly partner) in China.




"The final assembly of our Fairphone 3 is done by our partner, Arima. The company’s headquarters are in Taiwan, with Fairphone production taking place at one of their manufacturing facilities in Suzhou, China."

Cool, that means I actually googled up the correct Arima. There’s at least a dozen companies by that name, but this one matched best.
I guess this indeed means any technical questions regarding the phones insides need to be answered - at least indirectly by Arima.

Maybe we should cut out the middleman and ask them nicely - directly. Does anyone here write or speak Mandarin (or Taiwanese)?


also related:


More info about malware from fake 4.2.2 build (QPST.2.7.422.msi)
MSI package (QPST.2.7.422.msi) was embedded/tampered with qualcomm.exe which is a .NET based malware that logs your keystrokes and sends it to attacker’s server.

to make sure we speak of the same thing, (as the original post only said “google for QPST” and unfortunately google isn’t giving everyone the same search results.

QPST can be found at “qpsttool dot com” in quite many versions. the zip files there are

  • not password protected
  • include a single .exe which is supposedly an installer, as well as a driver package

some (older) versions can also be found on “qpstflash dot com”.

  • the zip files there are password protected (password is given on the webpage
  • zip includes an msi installer and a setup.exe to supposedly run it
  • the msi can be manually extracted with a tool like “msiextract” to analyse the contents

as such the same version of the tool from both sites differ at least one of these sites is definitely distributing malware, no question about that. but that does not mean the other one is clean.


Hi all, finally, I’ve managed to capture some short uart/whatever transmissions from a booting phone on pin T.
Here is a snapshot:

The data is still raw samples as I recorded them with a Bitscope Micro. I hope to find time to work on postprocessing soon.

Here is the raw data and the analysis script (more to come):

Cheers, Michael



if you have your phone already open: can you check if this pad traces to the top or the bottom module? (by just continuity checking the connector pins)
just o see if there is a change of a hidden uart mode in the headphone jack or usb connector

1 Like

Have you soldered anything? Maybe it is time to try the uart console, and if it is one, the built image.

1 Like

To continue with the EDL.

Some commands don’t need the loader. (example: -gpt) I don’t think we’ll have a lot without the loader…

The loader for the device is (probably) on the partition sdl1. Which isn’t entire with the diff updates.


Hi, it is already closed but I will try next time. Good idea to check for connections elsewhere :slight_smile:

1 Like

Hi, yes I soldered thin wires onto the pads and then closed the device. Now can measure without the need of four hands :slight_smile: . Currently I just can measure an analog signal since I do not yet have uart hardware for 1.7v signals yet.


The weird thing about that signal is the inversion. Why is the binary part between 0 and -1.8V but then jumps to +1V ? Is that an artefact of how it was measured? What was your used ground pin?

1 Like


Changing a few lines in the python script:

-		data += t[i*10+k] * 2**(8-k)
-	print(hex(data), ' ', end='')
+		data += t[i*10+k+1] * 2**(k)
+	print(str(chr(data)), end='')

Reveals the following:

Android Bootloader - UA

…I guess this is part of “Android Bootloader - UART_DM Initialized!!!” from


Please if you’re going to look at LK sources, at least look at ones from the correct chipset: https://source.codeaurora.org/quic/la/kernel/lk/tree/?h=LA.UM.7.6.2.r1-09200-89xx.0 (tag LA.UM.7.6.2.r1-09200-89xx.0) - something similar (but definitely at least slightly modified) is likely running as bootloader on the FP3.