All credit is to @ars18. He did the reverse engineering and everything. Translating his masterpiece python to Java is trivial
Edit: I forgot to mention. I was able to test both the termux pr and the app from my qin f25 which apparently uses the same encryption for the IMEI. I wonder how many other phones are like it
I only tested the LD0B_001 and only on device. I don’t think I should test more cus it’ll fail. The f25 is dual sim which means the firmware is probably setup differently. The only thing that is the same is the path and the file LD0B_001. It only changed sim 1 and keeps SIM 2 untouched.
I just checked myself. (I can send it you still want)
As you wrote ony the docs, block #2 is untouched by your tool. On this phone (probably also on any 2 sim MT67xxx) the second block is copy paste of the first 1 for sim 2. You can easily add to your code to check if block 2 is padding or a second sim and if a second sim let the user choose how many of them to edit…