You can find it compiled here.
You have to run “export CXXFLAGS=-pthread” in Manjaro and Arch to compile it.
After cloning it’s git, run the below.
git checkout 05a9615a5b70334d14f95fd194b0f34d482d3803
Nothing will work in Windows, USB redirection is to slow.
That doesn’t seem to work in Linux either.
Serial Port No data within five seconds. Resource temporarily unavailable
You also have to run autoreconf and automake.
Based on that message, I’m guessing it doesn’t like my computer.
Don’t use the file some site said, tried with the flasher in the image file from the blankflash. It failed because no XML file. Now to make my own XML file, by copying the one from the site that doesn’t work. XML is fine, the programmer doesn’t work.
Well, flashing gpt worked. That was a test, to see if it’ll even work. You have to do the power button + volume down trick to get it to work, the program will get an error and stop, keep running the command, until it can find ttyUSB0. Using watch -n 1 lsusb might not be fast enough.
Now to find the Python script that makes that file. That’s faster then trying to figure out how to modify the one I have.
Do you need more then GPT? Probably. And the thing I flashed was wrong, you have to extract it. Most likely.
The number of disk sectors is 4294967295, fdisk -l gpt_main0.bin told me so.
Anyone know how to get the ParseGPT Python script to work? I got a partition.xml file, but I still need a rawprogram0.xml.
Going to try using the programmer for my phone, but the other files from the other file. Doesn’t matter if it works, I’m to lazy to make a rawprogram0.xml file.
[xml]
[/xml]
That’s how you flash gpt_main0.bin, if you use 0 for start, it won’t work. But phone is still dead. Now to see if I can tell what sector the other partitions start at.
Nice! Somehow I revived it, in fast boot. Well, I accidentally flashed gpt_main0.bin to xbl_a. I forgot to change the filename.
[xml]
[/xml]
If xbl.elf doesn’t work, replace with gpt_main0.bin. Probably should boot TWRP. Don’t think the flashing is going to work. Need the fastboot it came with. No idea how to flash or boot anything. It just hangs.
Plugged it into USB 3.0 hub, “Failed to load/authenticate boot image: Load Error”.
Excellent, got the working fastboot. Now I can run a flash all, or see if TWRP boots now. Yes, it does.
How did I get it to flash the stock bootloader? I already forgot. Just keep messing with it. Oh, I think plugging into the hub made the flashing work.
Apparently qboot doesn’t work in Manjaro. Or on my computer.
I used gpt_parser.py to get the partition.xml file, which I used the values to make the XML.
I may or may not write a complete how to. And if I do, it’ll probably be on my other site, there’s a how to category on there.
emmcdl -p ttyUSB0 -f programmer.elf -x rawprogram0.xml -SetActivePartition 0
That’s the command I used. You get the programmer.elf from the blankflash after extracting the image, and you get gpt_main0.bin by extracting gpt.bin that you get from extracting the image.
That is for the Moto X4, that XML probably won’t work for anything else. If you like piecing stuff together, then you should be able to unbrick your Moto X4 with the above info, in Linux. If using Windows, you can probably use QFIL. And qboot might work in Windows as well. Might even work in a different Linux distro. Downgrading the kernel enough could make it work.
The X4 seems to be fully functional, I put my SIM card in, and it got a signal. It shows my WiFi. Didn’t actually connect, I plan on selling it. So I can buy a Nokia 7.1 most likely, you can’t unlock the bootloader, unless that was some other brand. Or they changed something. If the Nokia gets bricked, it’ll be under warranty. Sounds like some Nokia phones can be unlocked, that’s a bummer.