redmi-fire-devs / twrp_device_xiaomi_fire

TWRP Device Tree for Xiaomi Redmi 12
https://twrp.me/xiaomi/xiaomiredmi12.html
GNU General Public License v3.0
6 stars 5 forks source link

How to flash it after unlocking the phone? #2

Closed AmazingPerson1334 closed 8 months ago

AmazingPerson1334 commented 9 months ago

Uh... hello. So I'm working on a project of mine which I will try to port postmarketOS to Redmi 12... and I need some help about flashing the TWRP image for Xiaomi Redmi 12 in your previous repository.

Now I flashed TWRP before but it was on a completely different device ( A Samsung J7 Prime specifically) and I tried to flash an Android 14 gsi on the Redmi 12 but I got the phone pretty much bricked and got a replacement phone. I don't want to do the same mistake again.

I would pretty much appreciate clear instructions on how to flash properly after unlocking the phone.

AntarcticShaurant commented 9 months ago

Hello! May i ask what steps did you follow to flash the GSI?

Also, please avoid using the recovery from my old repository, since it doesn't support decryption, and is full of bugs, since it's too old.

Me and @shub876 almost done testing the recovery; in fact we're currently fixing MTP and fastbootd, then we'll only have to fix a little bug on backups and we'll be able to release it.

AmazingPerson1334 commented 9 months ago

Thanks for the heads up, I'll wait for the release then. Again, when you release it I would appreciate some instructions because I'm really new to the Xiaomi devices.

AmazingPerson1334 commented 9 months ago

Also I can't remember the exact steps with the GSI flashing.

That's all I got for now.

Have a nice day / night!

AntarcticShaurant commented 9 months ago

Also I can't remember the exact steps with the GSI flashing.

That's all I got for now.

Have a nice day / night!

No problem, have a nice day/night as well!

AntarcticShaurant commented 8 months ago

Hello, i know it's been a while, but we've encountered an unexpected bug, while flashing recovery zips (even thought i should've fixed it by now, i need to test the new build).

The recovery is pretty much stable right now, so if you want I'll tell you how to flash the recovery and the GSI below, and once I'll have tested the recovery, I'll push it to SourceForge and link it here (might even post the img in the releases, I'll think about it later).

Recovery flashing:

GSI flashing:

Edit1: Feel free to close the issue if you don't need anything else. Otherwise, just ask!

Edit2: Oh by the way, could you tell me what did you mean by brick your device? did you end up in a bootloop? you couldn't reboot to fastboot? etcetera, since if it's something like this, it's pretty much fixable, no need for a replacement phone.

AmazingPerson1334 commented 8 months ago

yes I did end up in a bootloop, couldn't get into fastboot too so I thought I completely botched it. I was very stupid and actually I discovered that I could have used mtkclient and fastboot again to resolve the issue

AmazingPerson1334 commented 8 months ago

So yeah I didn't know much about the device then

AmazingPerson1334 commented 8 months ago

It happened again, and that's how I discovered my device wasn't completely bricked.

Also fastboot boot doesn't work on my device, did you tried fastboot booting with your device?

And I made a postmarketOS (linux port) for Redmi 12 in the meantime (the kernel was a painful experience to successfully compile, I had to consult a maintainer for samsung-gta7litewifi, which also had a mediatek soc and the same kernel version, to fix it)

AmazingPerson1334 commented 8 months ago

I only got the display and the usb otg, external and internal storage working. But couldn't find a way to make touchscreen work (and the battery too, it says that it's 1% in XFCE4 and then shuts down). FTS_TS complains it couldn't find a bin file in dmesg. Do you know how to get the touchscreen working?

AntarcticShaurant commented 8 months ago

actually I discovered that I could have used mtkclient and fastboot again to resolve the issue

Exactly, that's what i meant. It happens, so no problem.

It happened again

Also fastboot boot doesn't work on my device, did you tried fastboot booting with your device?

And I made a postmarketOS (linux port) for Redmi 12 in the meantime!

Yep, the MT6769H doesn't support fastboot booting, that's why i wrote

fastboot flash boot recovery.img

and it's a recurring problem, since there are a lot MTK devices that don't support it. Also congrats for postmarket!

I only got the display and the usb otg, external and internal storage working. But couldn't find a way to make touchscreen work (and the battery too, it says that it's 1% in XFCE4 and then shuts down). FTS_TS complains it couldn't find a bin file in dmesg. Do you know how to get the touchscreen working?

About the touchscreen part, did you include the related blobs? you might want to check in recovery/root/vendor/firmware/ in this DT. Also, in my opinion we're going a bit off topic right now, should we move this conversation on your repo's Discussions? or maybe something like Telegram or Email?

AmazingPerson1334 commented 8 months ago

I'll prefer the email option and I grabbed those blobs and put those blobs in postmarketos rootfs (to /vendor/firmware/) but it didn't work sadly.

AntarcticShaurant commented 8 months ago

Alright, contact me on Shaurant@proton.me, i'll check your repo in the meanwhile.