Closed Zapeth closed 3 years ago
You can do it from EDL mode. You will be missing some partition information you can later retrieve from any of the other firmware update packages, but at least you'll be able to dump all of the partitions. The stock kernel is hacked to prevent you from dumping some of the partitions.
Check out EDL tools from here: https://github.com/bkerler/edl
And run: ./edl.py rl dumps --skip=userdata --genxml
while in EDL mode in the modem
Check out EDL tools from here: https://github.com/bkerler/edl And run:
./edl.py rl dumps --skip=userdata --genxml
while in EDL mode in the modem
You mean this should be executed from the rootfs partition or from phone userspace (emmc/sd)?
In case of the former, whats the best/cleanest way to install the necessary requirements for edl.py
? (python3, pip and dependencies).
In case of the latter, I'm guessing the installation instructions are still applicable for the pinephone (distro differences notwithstanding)?
You need to run this from the Pinephone, it wouldn't fit in the modem :). Simply follow the installation instructions for linux and you're set
If running stock firmware, you can run adb reboot edl
to force reboot into EDL mode, then run the command. It should take a while to download everything as EDL is relatively slow
Thanks, I managed to dump the partitions now (which is basically all data that is listed here).
It would be even better if the firmware files that were used for flashing the stock version were available, but I guess this should suffice (assuming its safe to use them for re-flashing?)
Also here's the sha-1 of my dumped modem.bin
, maybe this can still be matched between different devices? -> 09353AF136AC401CABDFB572FDD3B0A4E4B320D7
If it has never been mounted rw maybe, but don't think so since you're probably also dumping the empty space at the end of the partition. If you want to do that you're better just doing shasum's of the files themselves.
Since that firmware version is not available at my repo, can you share it with me so I can make a flashable package? I would need all files except usr_data, misc and efs partitions
As @Zapeth I've dumped stock PinePhone modem firmware (pmOS edition). It certainly would be useful to have flashable package of it, just in case. Here is archive with my backup files: https://skv.freedombox.rocks/export/mobian/EG25GGBR07A08M2G_01.001.01.001.tar.xz
Will ./edl.py wf dump.bin
restore modem to original state if full backup was made before using ./edl.py rf flash.bin
?
'The stock kernel is hacked to prevent you from dumping some of the partitions.' Making backup using EDL will not have this limitation?
When you dump via EDL you bypass any limitation inserted by Quectel, so yes, you read everything, as you should being the owner of your device :)
Don't try (at least at this point with edl tools) to flash it back with EDL. I broke (without remedy) a modem this way when something went south and marked some sectors in the partition table as badblocks
Tomorrow will download your file and make a flashable package. Thanks!
Thanks @AndreySV for providing your files, I haven't gotten around to find a suitable file host for uploading mine yet.
However comparing the dumped files, almost all partitions are identical anyway, so I guess the empty partition space didn't end up being an issue afterall (in regards to reproducibility).
Okay, pushed! I have only diverted from the default branch for the kernel, recovery, modem and system partition, as all the rest should be identical or almost identical, and I wouldn't want to mess around with bootloaders without reasons as this is first a recovery repo and second a firmware archive (don't want anyone bricking because they selected the wrong branch)
I also added some other firmware versions I had but hadn't published (in case you're curious) https://github.com/Biktorgj/quectel_eg25_recovery/branches/all
I was curious about all the different firmware versions that were available online, so I compiled a list of my findings:
* ... binary identical to A08M2G_01.002.01.002 branch (except this one also includes the pdfs about the release changes) ** ... hash of dumped
modem
partition (due to lack of official flashable files) *** ... mentioned in release notes of later firmware version, no publicly available files foundThe fw-version information was taken from the
/usr/bin/quectel_daemon
file in therootfs
partition, the modem-timestamp from the/Ver_Info.txt
file in themodem
partition.I couldn't find any flashable files for the stock version online, so I tried dumping them from my phone. However I was only able to get the ubifs volumes for
rootfs
andmodem
, I'm not sure howboot
andrecovery
partitions can be dumped (if at all). And even those dumped ubifs volumes seem to include unallocated data, so I'm not sure if those are safe for flashing.Though any hints about properly dumping them would be appreciated (first time working with this kind of stuff).