TWRP Recovery and patched boot for D09 Prime 2

I have a few things left to try and see if I can manage to edit the system partition, but so far it seems like you are right. And I agree that it’s no point backing it up when it’s exactly the same as is included in the firmware available on the forum.

3 Likes

Yes agreed… The image file is in firmware.
But I guess if modification is possible (by some method we have yet to discover) then it might be worth it :+1:

Thanks @noidremained
I have to say though…
Even with the userdebug build with full root permissions and verity disabled - I have still not been able to edit the image…
A10 is great in many ways but it is locked down so tightly.

I suspect that system-less is the only way, and using magisk modules.

I will be very interested to see how this pans out :+1::+1:

Agree that backup up the ‘Super’ is of little use.

Having root now I was hoping I could edit (with little optimism) the APN configs file to change the ATT user editable from false to true but no luck - it won’t save so apparently that is on the Super partition. I haven’t yet tried directly modifying the partition for those settings but I believe that would be very difficult also due to various lockdowns Anroid 10 has. Fortunately I know the SIM swap trick works but it’s a bit more difficult for others to do.

I agree about the super.img. I haven’t tried flashing firmware again. I think I have an app somewhere that can save essential NV Ram data. But if something went haywire and I had to reflash firmware I would definitely unlock, root and reinstall TWRP so as to restore NVram and data that way.

I am trying to rebuild the Prime 2 ROM for anyone who uses an AT&T based SIM for Tracfone, Straight Talk or similar services that go through AT&T so that you can edit the APN’s. I have no idea at this point if this will work until later tonight. I used SuperR’s Kitchen in Linux in a VirtualBox to achive the build. Due to the complexity of getting files in and out of a Ubuntu Linux VirtualBox I decided to just upload it. Once done I’ll download and install it to test. If it works out I’ll make it available here for anyone who may want it.

That is basically a included feature of TWRP to backup the super.img in case anything was accidentally modified, as not every smartphone has this rather convenient firmware flashing procedure like mediatek does.

2 Likes

Well that was a ton of fun :crazy_face: Upload aborted after about 80 minutes. So I decided to try getting it out of the Virtual box onto my computer - every which way to Sunday. Finally got the super.img. @none do you think it would be better to try flashing it with TWRP or SP Flashtool?

Well my mod didn’t work - not too surprised as it’s Android 10… Thank goodness for all involved in creating TWRP for this watch as I had a real problem after flashing my super.img in SP Flashtool. First time it went to a blank screen with a few dots near the bottom. I tried flashing a couple more times with slight variations of vbmeta.img and vbmeta_system.img but all black screened. So I went back to the stock super.img and still had the same black screen result. Fortunately I had backed up the super.img with TWRP and upon doing a restore with TWRP all was good. This was the first time I tried restoring the Super with TWRP - good to know that works too.

The one other option I could try with SuperR Kitchen is to make a signed zip of the super.img and the try flashing it with TWRP. Any thoughts on that?

Yes, because of the encryption.
As I said before, you can’t just cross flash image files which do not match your key.

There is some work going on to see if the “add APN” can be used on the watches. It is tricky as some stuff has been removed or disabled so that the OS is suitable for the watches. The firmware team in China are looking at it.

I will let you know

1 Like

did you use the super.img directly in superR kitchen? From what I can find it doesn’t seem like SuperR have support for super partitions. you could try with only the system.img and afterwards flash it through fastbootd (adb reboot fastboot instead of adb reboot bootloader)

1 Like

Thanks pablo11, While I resolved the APN problem on my watch with the hotswap trick I was hoping it might be an easier fix for others in that situation. At this point I’m still trying some things but don’t really expect to have success with the SuperR kitchen. Android 10 is a b**ch.

@noidremained, Yes I copied the super.img into the kitchen from the v1.4 ROM zip on my first try. Later I copied the whole ROM.zip file into the kitchen which extracted the system.img along with everything else. From there you can work on just the system.img So far I’m just winging it with the SuperR as I haven’t even read directions for using it although I’ve used other image kitchens. Some choices I am looking for help on were whether to use Meta_data, raw or sparse. I tried Meta_data and I’m fairly sure that was a wrong choice.

I noticed when I tried the first flash and got the black screen that it responded to fastboot so I was able to do ‘fastboot reboot recovery’ making it easy to restore with TWRP.

Thanks for your always knowledgeable help!

Could you please provide some photos with how the settings menu look with your original sim card inserted and how it looks after you made the workaround with the other sim card?

1 Like

@noidremained adb reboot fastboot ? don’t think I’ve seen that work on MTK - when you are doing adb reboot bootloader you have access to using fastboot unless I’ve forgotten something. Just for the heck of it I tried adb reboot fastboot and TWRP came up. Played around a bit more with SuperR but I don’t think people are having much luck with it on android 10. One more thing to try then I give up.

@none, I can try this with my other Prime 2 but as difficult as it was to get that done I don’t want to take a chance of losing the good working APN settings I now have. I’ll see what I can do after messing with this SuperR image I made (pretty sure I’ll be looking at a soft brick).

flashing system.img with fastboot results in error: system does not exist as I somewhat expected since it’s in the super.img. Worth a try anyway… rebooted and everything is fine.

@none, These pictures don’t show this very will but all the ATT Nxtgenphone APN settings are very grayed out and can’t be changed. The Straight Talk settings are brighter and can all be modified. I assume the lack of difference in brightness is my cameras autoexposure compensating. But to my eyes it is very different. Also note from the main APN screen there is no option to add another APN. Originally the APN settings menu only showed the ATT Nxtgenphone and it could not be modified at all.

Darn now I can’t get the SIM card out - never had that problem before…

Got it out - if anyone else runs into that problem try getting a fairly stiff but thin piece of paper, cut it to slightly less than width of the sim slot, bend up the tip a little and slip it in over the top of the sim card then pull out on the tray.

20210108_155154 20210108_155207 20210108_160037

1 Like

I guess it makes sense that it doesn’t work when you have twrp. There’s a difference between normal fastboot and fastbootd. Fastbootd is on the recovery partition together with recovery which makes it able to for example flash partitions that are part of the super partition

1 Like

My mistake I wasn’t aware of Fastbootd and had just assumed that was a typo. I’ll check it out later. :+1:

1 Like

So, you did not return your "review ’ samples?
The Sim card problem was in the early review samples.
The later ones have a different Sim tray and no problem.