Question Anyone know how to unbrick an OP9 on Linux? I do not use Windows - OnePlus 9

Hello all,
Yes, this is another request to unbrick an OP9 from a Lineage recovery installation, but I don't have, nor want to have Windows. Not certain if this question has been asked before but due to choices, I will not use Windows anywhere except QEMU. I run Artix Linux (a rolling release based on Arch, with OpenRC), and as some of you may know, Linux does not have native .exe support. I have tried WINE for use on MSM tool, no luck as I only have the factory option from the dropdown only. I've tried QEMU and Win7, Win10, and Win11 (granted they are all debloated versions to speed boot times). The only error I'm getting is during a USB passthrough error when loading EDL mode. The last thing I tried was a python script that unpacks payload.bin for setting up fastboot flashing in a specific order. It requires a recovery.img, but I don't have it making this method useless. I do not have a windows machine in the home nor do my neighbors. How can I stick with Linux and unbrick my OP9?
Thanks all,
Your fellow Linux enthusiast.

Hello,
If you need this recovery.img, did you try to extract it from payload. bin using payload dumper ?

sbute said:
Hello,
If you need this recovery.img, did you try to extract it from payload. bin using payload dumper ?
Click to expand...
Click to collapse
Yes I used the payload dumper script on the latest version of OOS for the OP9. There was no recovery, and I found a similar post stating it was built into the boot.img file. I still was unable to get recovery working afterward, but that method was good for Android 11 only.

Ok, I'm a linux user too, I endeed up installing a small partition of windows on dual boot just to run msm tool on OP9. But I know you don't want that. Did you try flashing partitions in fastboot ? There 's a thread about that in this forum .

sbute said:
Ok, I'm a linux user too, I endeed up installing a small partition of windows on dual boot just to run msm tool on OP9. But I know you don't want that. Did you try flashing partitions in fastboot ? There 's a thread about that in this forum .
Click to expand...
Click to collapse
I should take a look but that is what I tried, maybe I didn't flash the partitions correctly

Wich rom did you come from ? Can't you get the right recovery from their website ?

sbute said:
Wich rom did you come from ? Can't you get the right recovery from their website ?
Click to expand...
Click to collapse
you have to receive the image from oneplus themselves and it's the full image including recovery

Ah ok, you're on stock rom. Maybe wait for other user's advice

fl0wedm said:
Hello all,
Yes, this is another request to unbrick an OP9 from a Lineage recovery installation, but I don't have, nor want to have Windows. Not certain if this question has been asked before but due to choices, I will not use Windows anywhere except QEMU. I run Artix Linux (a rolling release based on Arch, with OpenRC), and as some of you may know, Linux does not have native .exe support. I have tried WINE for use on MSM tool, no luck as I only have the factory option from the dropdown only. I've tried QEMU and Win7, Win10, and Win11 (granted they are all debloated versions to speed boot times). The only error I'm getting is during a USB passthrough error when loading EDL mode. The last thing I tried was a python script that unpacks payload.bin for setting up fastboot flashing in a specific order. It requires a recovery.img, but I don't have it making this method useless. I do not have a windows machine in the home nor do my neighbors. How can I stick with Linux and unbrick my OP9?
Thanks all,
Your fellow Linux enthusiast.
Click to expand...
Click to collapse
What did you do to brick the phone? Did you just flash LineageOS recovery? What happens when you try to boot the phone? Can you access bootloader mode?

you don't need to install windows for that
you can use WinPE
Hiren's BootCD PE
or in Linux
you can use edl tool from github and manually flash firmware , its too hard and terrible but here you go
GitHub - bkerler/edl: Inofficial Qualcomm Firehose / Sahara / Streaming / Diag Tools :)
Inofficial Qualcomm Firehose / Sahara / Streaming / Diag Tools :) - GitHub - bkerler/edl: Inofficial Qualcomm Firehose / Sahara / Streaming / Diag Tools :)
github.com
fl0wedm said:
my OP9
Click to expand...
Click to collapse

Related

Honor 8 flash appliaction throught fastboot

Greetings
Does any1 know is there a (windows) app to works with phone bootloader to flash images for Honor like DC unlocker.
Looking forward for it.
StratOS_HTC said:
Greetings Does any1 know is there a (windows) app to works with phone bootloader to flash images for Honor like DC unlocker.
Looking forward for it.
Click to expand...
Click to collapse
Have you looked at SRK Tool? Could possibly help. Looks like they made some provisions for using it with the Honor 8 in the changelog.
https://forum.xda-developers.com/showthread.php?p=66627614
And according to this it works with the bootloader for Huawei devices.
Obviously when messing with system partitions be careful too. It's possible to brick the device. You already unlocked your bootloader I imagine. Are you trying to flash a different version or something?
EDIT: I keep seeing these instances for Huawei too where you can flash a system image simply by making a folder called "dload" in the root of your internal storage and just placing your system image(or UPDATE.APP file) in there and just rebooting your device into recovery mode to automatically install the image. Might be easier if you have such a file.
Thank you for support.Have used a lot of flashing and found out that the flashing sequence is important.Some flashes can only be done with use of recovery.
The sequence is problem.
Made some success with init.d support on boot.img and some initrd changes allready.
Have made own autoroot package with init.d for CF superuser and it's working.
Trying to make script with adb and fastboot now or TWRP update zip recovery script for it.
(Dev block raw copy)
Looking for program support to check out for sequence and online status of flashing of original Huawei .app.

A newer version of SP Flash tool for Linux

I want to root some phones that have a MTK MT6755 SoC, and first I want to do some full backup of their flash. In order to do so, I have to use SP Flash Tool.
The latest version of SP Flash Tool is 5.1524.00, at least for windows users. I'm working on linux all the time, and I don't really operate on windows. The version of SP Flash Tool for linux seems to be a little bit outdated because it's 5.1520.00.
This version was fine for my older phones, but for the new ones only the 5.1524.00 seems to accept my scatter.txt file and the problem is in the newer SoC.
Does anyone know whether (and when) a newer version of SP Flash Tool will be released for linux? Maybe is there a way to do some stuff to make the older version of SP Flash Tool work with the MT6755 SoC on linux?
morfikov said:
Does anyone know whether (and when) a newer version of SP Flash Tool will be released for linux? Maybe is there a way to do some stuff to make the older version of SP Flash Tool work with the MT6755 SoC on linux?
Click to expand...
Click to collapse
SPFT Linux, I use v5.1712 for the MT6737T. Readback all your partitions for backups.
How to setup on linux.
So is this website outdated?
https://spflashtool.com/
I downloaded the newest version from the link you've provided, but it seems that SP Flash Tool needs to be updated:
Code:
SP_Flash_Tool_v5.1728_Linux/flash_tool: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
And I have this lib installed:
Code:
# dpkg -l | grep libpng
ii libpng16-16:amd64 1.6.32-3 amd64 PNG library - runtime (version 1.6)
I had to install the lib from here: https://packages.debian.org/jessie/libpng12-0 , but it seems to work well, and also it loads my scatter file without a problem.

DOOGEE S70 Lite - Root Method done - Searching for Custom Recovery

Hi there,
I am one of the lucky DOOGEE S70 Lite owners and I want to start a move in developing the typical things like root (done) and TWRP and other tweaks.
In the end, my goal is to modify the system files to make my phone auto booting when a charger is plugged in (done). It shall be my navigation device for my motorcycle.
However I think many others of you may can make use of root privileges (done) or a nice custom recovery for this device. So I'm starting this thread to collect information, give status updates and forcing the development.
So let's start and see what we can do together.
So what do we have?
Status
Bootloader
Bootloader is locked on this phone by default.
There is an instruction to unlock it:
https://gearallnews.com/how-to-unlock-the-bootloader-of-doogee-s70-liteguide/
(gearallnews.com)
Note that there is an option in the Android "Developer Options" to configure Android shall not try to relock Bootloader and reset the change.
For me it worked and it seems that my bootloader was permanently unlocked. You see a warning on bootscreen.
Stock ROM
Stock ROM is available on the internet (Doogee S70 Lite_factory_MT6763T_8.1). Including all tools that are needed to download (flash) it to the phone. A scatter file is included for SP Flash Tool.
This should also help to unbrick the phone if needed.
https://www.getdroidtips.com/stock-rom-doogee-s70-lite-firmware/
(getdroidtips.com)
Tools
SP Flash Tool:
This tool can be used to download (flash) and readback (backup) the whole phone image. Scatter File can be used from the Stock ROM.
https://www.getdroidtips.com/download-smartphone-flash-tool/
(getdroidtips.com)
MTK Droid Tools
This tool is used to create scatter files and to build custom recovery images.
I was able to install and connect the tool but currently it is not working properly. See reply threads.
https://androidmtk.com/download-mtk-droid-tool
(androidmtk.com)
Root
Root can be installed with Magisk Manager.
See https://forum.xda-developers.com/showpost.php?p=79137797&postcount=5 for instuction.
Custom Recovery / CWMR / TWRP
Currently no custom recovery
Auto Boot on power / charger / USB connect
Enter the following commands in a connected ADB console:
Code:
adb reboot bootloader
fastboot oem off-mode-charge 0
fastboot reboot
Other Information
Enabling USB Debugging works as normal.
Relevant Specs
MediaTek Helio P23 (MT6763T)
2300 MHz Octa-core
ARM Mali-G71 MP2 770 MHz
RAM 4 GB
Screen 1080 x 2160 pixels, 403 ppi, 158 ppcm
Android 8.1 Oreo
I will update this first thread if we make progress.
Hope, many of you can help.
Flashtool
First step... Flashtool...
I installed all types of driver I was able to find.
Note that Win10 has to be started without the driver signation checks.
https://www.maketecheasier.com/install-unsigned-drivers-windows10/
And don't forget to run as admin.
Afterwards I was able to use SP Flash Tool to load scatter file of the downloaded Stock ROM.
Then I wrote down the end address until the cache/user data begins.
Then I used the readback function to dump my current image.
This was no problem.
Here some additional information:
https://www.getdroidtips.com/backup-restore-imei-nvram-data-mediatek/
So I am able to backup the current firmware and I guess flashing the stock ROM would also work.
Recovery
Next step... Recovery...
There are several instructions how to create custom recoveries for a MTK Device:
https://forum.xda-developers.com/showthread.php?t=2519432
https://www.youtube.com/watch?v=s66e-kwvKUU&t=1s
and so on
I took the latest version of MKT Droid Tools and was able to connect to the phone.
Hardware, Model, Build number, Build date UTC, Android v, Baseband v, Kernel v
All those fields were shown.
Uboot build v, LCD Driver IC, IMEI 1 and 2 were not shown...
And I had the following errors:
Code:
--->>> Connect to device <<<---
--- ERROR : --- TotalBytesPerChunk Not Found. Set default Page/Spare=2048/64 !!!
--- Unknown ROM structure, backup NOT possible!
ATTENTION! File /system/recovery-from-boot.p which restore factory recovery in case of phone switching on in a normal mode Is Found!
on the tab "root, backup, recovery"...
The button "To process file ROM_ from FlashTool" is locked.
So I'm stuck here...
Maybe I need an other version of MKT Droid Tools?
Or is it possible to use the scatter file somehow to fix this?
I have a dump of my original recovery and I have the scatter with the start and end addresses. Somehow it should be possible to generate a recovery image, isn't it?
I managed to make the phone auto booting when a charger or usb is connected.
That's handy if are like me and wanting to use this phone as a navigation device on the motor cycle.
Here is what I did:
Enable USB Debugging.
Connect Phone with your PC.
Open up a console in your adb directory.
Execute:
Code:
adb reboot bootloader
fastboot oem off-mode-charge 0
fastboot reboot
I just managed to root the device.
Magisk does the job!
Inspired by https://www.youtube.com/watch?v=sATW0cPT_uQ
* I took the "boot.img" file from the image download.
* Placed it on the phone.
* Opened up Magisk Manager.
* "Install" -> "Patch Boot Image File" -> select "boot.img"
* Wait until done.
* Copy the "patched_boot.img" to your PC.
* Open SP Flash Tool and select scatter file (from downloaded image)
* Uncheck all partitions except "boot".
* Update file for "boot" partition with the "patched_boot.img".
* "Download" and plugin phone.
* Flash should be done in seconds.
* Uplug and boot the phone.
* You should have root now managed by Magisk Manager
Have you manage to get a working recovery ?
Beda974 said:
Have you manage to get a working recovery ?
Click to expand...
Click to collapse
No.
But currently I don't see an urgent need for a custom recovery.
Image backups can be done with SP Flash Tool over USB.
And there is a working root method with Magisk Manager.
And it seems that there are not many others that are interested in developing for this device. So my effort in writing down these whole things seems to be useless. You are the first poster here.
Yep I have manage to Root my device with magisk but I want to flash some zip files.
I tried with flashfire, flashify ans rashr but none of thoses work.
GSIs work and you don't need to unlock the bootloader
Hey guys, so apparently you can flash stuff in spflashtool without unlocking the bootloader! Most arm64 a-only GSIs work, thanks to these devices being treble compatible. It will usually fail to boot the 1st time, then ask to factory reset. You NEED the scatter file. I took a screenshot of my phone with the magisk patched-boot.img in the slot. BTW I have the Doogee s70 (not lite), but it should work given that you only need your device's scatter file to backup and flash stuff.
Now we need to figure out how to get gapps on without a custom recovery
I have found a twrp recovery that works.
I just wanted to let everyone know that I found a twrp compatible recovery it's unofficial though so flash at your own risk. I used a unofficial one from the doogee s80 which is actually a twrp recovery from ulefone power 5 by Geo geo. It has the usual encryption bugs and can't flash system images so you will have to flash system images with fastboot or sptools. Also this device is somewhat project treble compatible I am currently running phhussons Android 9.0 asop gsi image on my s70 lite it took a combo of using the twrp recovery and fastboot to make it happen and I had to flash stock firmware on my device a couple times from incompatibility issues and making mistakes. The only bug or issue with the project treble Android 9.0 asop arm64gapps-A-su.img I've seen is mtk engineering mode won't open can send and recieve texts have 4g data can call and my imei number is fine. The reason I flashed the phhussons Andoid 9.0 asop is because one of the compatible phones they have listed is the blackview BV9500 pro this phone shares alot of the same hardware specs with the doogee s70 lite I flashed other project treble gsi images and had to many bugs to consider using them as a daily driver.
TWRP for doogee s70
https://4pda.ru/pages/go/?u=https%3A%2F%2Fyadi.sk%2Fd%2FO-OjCdbyDl_Lww&e=84420395
Help..
Hi, can someone help me? I need to install unoficial linageos 15.1 on my doogee s70 lite ARM64 processor...
Anyone knows what version should i install. Doogee isn't in the compatibility list.
Thanks
lucaspc82 said:
Hi, can someone help me? I need to install unoficial linageos 15.1 on my doogee s70 lite ARM64 processor...
Anyone knows what version should i install. Doogee isn't in the compatibility list.
Thanks
Click to expand...
Click to collapse
U can flash all Treble ROM ; Image for ARM64 A-only device
Unlock Bootloader ( fastboot oem unlock)
Erase system (fastboot erase system)
Install System (fastboot -u flash system name_of_system.img)
Beda974 said:
U can flash all Treble ROM ; Image for ARM64 A-only device
Unlock Bootloader ( fastboot oem unlock)
Erase system (fastboot erase system)
Install System (fastboot -u flash system name_of_system.img)
Click to expand...
Click to collapse
I needed to make work miracast. Finally i sold out the phone and bought an Ulefone Armor 6E. Thanks
Is there a beginner friendly way to root the S70?
doogee s70
Beda974 said:
U can flash all Treble ROM ; Image for ARM64 A-only device
Unlock Bootloader ( fastboot oem unlock)
Erase system (fastboot erase system)
Install System (fastboot -u flash system name_of_system.img)
Click to expand...
Click to collapse
Здравствуйте,я вижу что вы разработчик и хорошо в этом разбираетесь ,я к вам с просьбой и советом ,у меня смартфон doogee s70 ,android 8.1.0 MTK (MT6767T) ,TWRP ,Magisk + root ,это всё я уже установил ,а вот в чем вопрос: как и где мне можно взять прошивку android 10 Q на мой девайс, ???,заранее благодарю !!
---------- Post added at 10:11 PM ---------- Previous post was at 10:03 PM ----------
Beda974 said:
U can flash all Treble ROM ; Image for ARM64 A-only device
Unlock Bootloader ( fastboot oem unlock)
Erase system (fastboot erase system)
Install System (fastboot -u flash system name_of_system.img)
Click to expand...
Click to collapse
Я видел на сайте разработчиков android 10 ARM64 A-only ,его можно прошить на doogee s70 ,объясните пожалуйста !!
Buenas noches amigos me gustaría saber si se puede instalar Android 10 en mi Doogee s70lite

How can i install Lineage OS on Doogee X95 ?

So, I want to install Lineage OS instead of Android 10 Go Edition on my Doogee X95, but I can't find any TWRP build for the Doogee X95, so the thing is: How can i do to install Lineage OS on Doogee X95 ? Can anyone help me please ?
The Dogee X95 is a low-end phone, hence Android 10 GO got pre-installed what IMO is absolutely correct.
Of course you can try to flash LOS via ADB Sideload method.
Read
Generic system images | Android Open Source Project
source.android.com
Use this GSI arm64 A-only
[DISCONTINUED][GSI][11] LineageOS 18.x GSI (all archs)
Background: This is a natural continuation/extension of the LineageOS 17.x GSIs I've been making since November 2019. LineageOS is a free, community built, aftermarket firmware distribution of Android, which is designed to increase performance...
forum.xda-developers.com
Unlock bootloader first
Ok i'll check that right now
Ok so i checked for ADB Sideload, but it seems like i need TWRP, and there is no TWRP build for the Doogee X95, so i think i'll try to use the Lineage OS GSI image, and i'll see how can i install it
LR7875, there is a problem with the GSI you told me to use, it's an ARM64; and when i install Droid Hardware Info, it say that i'm using an ARMv7 (armeabi-v7a, armeabi) CPU, same for Treble Check that's saying that i use a 32-bit ARM CPU, but if i check on google the Doogee X95 it says that, it is, indeed, a 64-bit ARM CPU, but the thing is why is it saying that i use a 32bit ARM if it is a 64bit ARM ? Is it safe to use the ARM64 A-Only GSI ?
DidierSardine said:
Ok so i checked for ADB Sideload, but it seems like i need TWRP, and there is no TWRP build for the Doogee X95, so i think i'll try to use the Lineage OS GSI image, and i'll see how can i install it
Click to expand...
Click to collapse
ADB Sideload is a mode bootloader boots into to allow to flash ROMs located on computer: has really nothing to do with TWRP.
Code:
adb devices
adb reboot sideload
adb sideload <ROM-ZIP>
ARMV7 CPU is 32-bit CPU. Hence you can only flash ROMs what are compiled for ARMV7 CPUs.
Ok i'll try to flash the A-only ARM 32bit rom of Lineage OS using sideload, i hope it will works
Hum i just remembered the Lineage OS is a .xz Archive containing the .img, what should i do ?
adb sideload lineage-18.1-20210808-UNOFFICIAL-treble_arm_avS.img (extracted .img file)
or
adb sideload lineage-18.1-20210808-UNOFFICIAL-treble_arm_avS.img.xz (archive)
Sorry, you need to flash arm (32) GSIs, not 64
DidierSardine said:
Hum i just remembered the Lineage OS is a .xz Archive containing the .img, what should i do ?
adb sideload lineage-18.1-20210808-UNOFFICIAL-treble_arm_avS.img (extracted .img file)
or
adb sideload lineage-18.1-20210808-UNOFFICIAL-treble_arm_avS.img.xz (archive)
Click to expand...
Click to collapse
Flash the extracted .IMG file.
jwoegerbauer said:
ADB Sideload is a mode bootloader boots into to allow to flash ROMs located on computer: has really nothing to do with TWRP.
Code:
adb devices
adb reboot sideload
adb sideload <ROM-ZIP>
Click to expand...
Click to collapse
As far as I have concerned it is impossible to ADB sideload a custom ROM via stock recovery.
Also a GSI is a system image, which is impossible to ADB sideload because you cannot dump it into a zip. For ADB sideloadable zips the zip always contains a META-INF file which vertified the ROM.
Hence it is only flashable in fastboot.
The original poster also needs a vbmeta.img from stock rom and flash it in fastboot with a special command, to disable boot vertification (even if bootloader unlocked you still need to disable vertification)
Because you quoted me: WTF? Has nothing whatsoever to do with what I said.
jwoegerbauer said:
Because you quoted me: WTF? Has nothing whatsoever to do with what I said.
Click to expand...
Click to collapse
I mean how can he ADB sideload without twrp
@DidierSardine
If your phone is Project Treble enabled ( should be - but verify this ) then take note that TWRP isn't needed at all to flash a GSI ROM.
How-to in detail is described here:
How to flash a Generic System Image (GSI) on Project Treble supported devices
So your device supports Project Treble, what does that mean for you? It means you can flash a Generic System Image such as LineageOS or Resurrection Remix! Enjoy AOSP-based custom ROMs! Here's a guide on how to install these ROMs.
www.xda-developers.com
Ok, so, i don't flash it using adb sideload, but using fastboot (as described in the link you sent), but the thing is, in the Flash GSI without TWRP section, there is that line:
fastboot -u flash system name_of_system.img
but the thing is: I have to put in the Lineage OS GSI .img file (lineage-18.1-20210808-UNOFFICIAL-treble_arm_avS.img) or the system.img file, because i don't have the system.img file of Lineage OS, and i don't know how can i get it. So i have to put "lineage-18.1-20210808-UNOFFICIAL-treble_arm_avS.img" instead of "name_of_system.img"
like this:
fastboot -u flash system lineage-18.1-20210808-UNOFFICIAL-treble_arm_avS.img
?
Yes, if it's a 32-bit image
Ok thanks, i'll try this right now
I've a problem, when i do
fastboot erase system
i get this error: FAILED (remote: 'not allowed in locked state')
but the thing is: my bootloader is unlocked, so why is it happening ?

Oukitel k15 pro

Hey does anyone know about a custom recovery for oukitel k15 pro? Or can I get away with using the stock recovery and a patched magisk file? If so does anyone have a up to date link.
Also would lineage work on this phone.
Thanks in advance
Lewickham2022 said:
Hey does anyone know about a custom recovery for oukitel k15 pro? Or can I get away with using the stock recovery and a patched magisk file? If so does anyone have a up to date link.
Also would lineage work on this phone.
Thanks in advance
Click to expand...
Click to collapse
There is no custom recovery. Oukitel haven't even posted the official Android 11 ROM on their Download Center website yet, even though I sent them a message about it a week or two ago.
I bought the phone, but haven't gotten it yet.
I wouldn' t do anything to modify the ROM without having the official ROM from Oukitel to unbrick the phone just in case something goes wrong with Magisk or something.
There are ways to extract the ROM with SP Flash Tool or maybe something else, so I would do that first.
For rooting I found this link for Oukitel wp12 with Android 11, I think I would try the same method with K15 Pro
Oukitel WP12 Magisk root bootloop
I'm trying to root an Oukitel WP12 with Magisk. I've downloaded the firmware from the vendor's link and flashed it successfully just like for other Oukitel phones (WP6, WP10). I could also create a magisk-patched boot image. I followed regular...
forum.xda-developers.com
Then, if that's not enough and we want a custom ROM like Lineage, for example, then we would have to use a GSI ROM like those from here
Generic System Image (GSI) list
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
and follow something like the fastboot method outlined here for wp5
GitHub - adil192/OukitelWP5TrebleTips: Sharing my experience with flashing a GSI on a friend's Oukitel WP5 (3GB model).
Sharing my experience with flashing a GSI on a friend's Oukitel WP5 (3GB model). - GitHub - adil192/OukitelWP5TrebleTips: Sharing my experience with flashing a GSI on a friend's Oukitel WP5...
github.com
Maybe there's a better link for GSI fastboot for Oukitel with Android 11
If you try anything, let me know. I'm waiting for my k15 pro to arrive, possibly next week.
I need it rooted, at least.
Let me know the outcome of rootin the k15 pro and if you succeed please tell me the steps. Also do you know if lineage will be compatible eventually?
Is there any news yet?
Lewickham2022 said:
Is there any news yet?
Click to expand...
Click to collapse
My phone came from AliExpress after 3.5 months, jeez. Got a refund, too, which I might return, never mind.
I dumped/backed up ROM partitions, except userdata because it's big and backup unnecessary, unless you want to keep your personal data in raw binary state for later, and rooted the phone.
You need MTK VCom drivers installed, e.g. from here:
Download MediaTek USB VCOM Drivers for Windows (32 & 64 bit)
Download MTK USB VCOM Drivers for Windows 10 to connect MediaTek phones even in a bricked state. Also, check the Installation guide.
www.ytechb.com
Use mtkclient:
mtkclient/README.md at main · bkerler/mtkclient
MTK reverse engineering and flash tool. Contribute to bkerler/mtkclient development by creating an account on GitHub.
github.com
I unlocked bootloader first. Remember UNLOCKING BOOTLOADER WIPES ALL DATA, returns to factory settings, back up all personal data to PC or SD card first!
To unlock bootloader, if you don't know, go to Settings, About Phone, tap 7 times on Build Number, You are Developer flashes on, go to System, Developer Options, OEM unlocking on, USB debugging on.
MTKCLIENT has a command to unlock the bootloader, it would surely work, I used Fastboot before I learned of mtkclient.
If using Fastboot, turn off phone. Hold Volume up and Power. Choose Fastboot. Connect phone.
You need Minimal Fastboot and ADB installed:
Download Minimal ADB and Fastboot Tool (all versions)
Download the latest version of Minimal ADB and Fastboot Tool which allow you to install and setup the ADB and Fastboot files on the computer.
androidmtk.com
Open CMD, type:
fastboot devices
if phone is listed, then type:
fastboot flashing unlock
fastboot reboot
Never re-lock the bootloader if your phone is rooted or GSI Lineage or other ROM other than original is installed. More than likely would brick the phone.
Everything is explained in mtkclient readme, line by line.
I used Windows 10, works on 11 too, there is a guide for Linux, and even a Ubuntu live image to use. Back up partitions first. Oukitel still haven't posted ROM, but can extract it from the phone, no problem.
Root is explained, need to get modified Magisk for MTK, and flash patched boot and empty vbmeta. It worked like a charm. There are guides on XDA on how to flash System GSI images to Android Super partition. Might try it later. One is here:
How to flash GSIs on devices with dynamic super partition
* Disclaimer * I am not responsible for bricked devices, dead SD cards, thermonuclear war, * or you getting fired because the alarm app failed. Please do some research * before flashing GSI! YOU are choosing to make these modifications, and if *...
forum.xda-developers.com
GSI Lineage images are here:
Andy Yan's personal builds // GSI - Browse /lineage-19.x at SourceForge.net
sourceforge.net
You couldn't add GAPPS, though, no TWRP, unless there is another way, doubt it. Could install replacement MicroG. Plenty other GSI images here:
Releases · phhusson/treble_experimentations
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
Good luck.
MarkR7 said:
My phone came from AliExpress after 3.5 months, jeez. Got a refund, too, which I might return, never mind.
I dumped/backed up ROM partitions, except userdata because it's big and backup unnecessary, unless you want to keep your personal data in raw binary state for later, and rooted the phone.
You need MTK VCom drivers installed, e.g. from here:
Download MediaTek USB VCOM Drivers for Windows (32 & 64 bit)
Download MTK USB VCOM Drivers for Windows 10 to connect MediaTek phones even in a bricked state. Also, check the Installation guide.
www.ytechb.com
Use mtkclient:
mtkclient/README.md at main · bkerler/mtkclient
MTK reverse engineering and flash tool. Contribute to bkerler/mtkclient development by creating an account on GitHub.
github.com
I unlocked bootloader first. Remember UNLOCKING BOOTLOADER WIPES ALL DATA, returns to factory settings, back up all personal data to PC or SD card first!
To unlock bootloader, if you don't know, go to Settings, About Phone, tap 7 times on Build Number, You are Developer flashes on, go to System, Developer Options, OEM unlocking on, USB debugging on.
MTKCLIENT has a command to unlock the bootloader, it would surely work, I used Fastboot before I learned of mtkclient.
If using Fastboot, turn off phone. Hold Volume up and Power. Choose Fastboot. Connect phone.
You need Minimal Fastboot and ADB installed:
Download Minimal ADB and Fastboot Tool (all versions)
Download the latest version of Minimal ADB and Fastboot Tool which allow you to install and setup the ADB and Fastboot files on the computer.
androidmtk.com
Open CMD, type:
fastboot devices
if phone is listed, then type:
fastboot flashing unlock
fastboot reboot
Never re-lock the bootloader if your phone is rooted or GSI Lineage or other ROM other than original is installed. More than likely would brick the phone.
Everything is explained in mtkclient readme, line by line.
I used Windows 10, works on 11 too, there is a guide for Linux, and even a Ubuntu live image to use. Back up partitions first. Oukitel still haven't posted ROM, but can extract it from the phone, no problem.
Root is explained, need to get modified Magisk for MTK, and flash patched boot and empty vbmeta. It worked like a charm. There are guides on XDA on how to flash System GSI images to Android Super partition. Might try it later. One is here:
How to flash GSIs on devices with dynamic super partition
* Disclaimer * I am not responsible for bricked devices, dead SD cards, thermonuclear war, * or you getting fired because the alarm app failed. Please do some research * before flashing GSI! YOU are choosing to make these modifications, and if *...
forum.xda-developers.com
GSI Lineage images are here:
Andy Yan's personal builds // GSI - Browse /lineage-19.x at SourceForge.net
sourceforge.net
You couldn't add GAPPS, though, no TWRP, unless there is another way, doubt it. Could install replacement MicroG. Plenty other GSI images here:
Releases · phhusson/treble_experimentations
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
Good luck.
Click to expand...
Click to collapse
Thanks for the reply. I had a few problems with micro g on MI A2. After flashing micro g in magisk is there a certain gapps I need to flash? Or can I just download Google services after flashing micro g
Lewickham2022 said:
Thanks for the reply. I had a few problems with micro g on MI A2. After flashing micro g in magisk is there a certain gapps I need to flash? Or can I just download Google services after flashing micro g
Click to expand...
Click to collapse
I was wrong about LineageOS not having GAPPS preinstalled. The link I gave you:
Andy Yan's personal builds // GSI - Browse /lineage-19.x at SourceForge.net
sourceforge.net
has this system image of LineageOS with GAPPS included, vndklite are read/write system images that I saw someone said were working on Oukitel phones with Android 11, and are generally probably best to use, so if you use that one, you don't need microG, which would have to be installed from F-Droid store or something like that:
https://sourceforge.net/projects/andyyan-gsi/files/lineage-19.x/lineage-19.1-20220410-UNOFFICIAL-arm64_bgS-vndklite.img.xz/download
G or g in the name of the system indicates that GAPPS are included.
I will try to flash that one myself sooner or later. It's based on Android 12, and if it doesn't work for some reason then we would have to drop to Lineage 18.1, but those aren't with GAPPS, so microG required:
Andy Yan's personal builds // GSI - Browse /lineage-18.x at SourceForge.net
sourceforge.net
There are other ROM with plenty of customizations that might be ok.
Corvus OS
Download Corvus OS for free. Corvus OS is another retarded ROM with many retarded Customization. First, it's inspired by Dirty Unicorns (thanks to Alex Cruz), but then we picked many other features too.
sourceforge.net
has GAPPS
Rest is here to choose from:
Generic System Image (GSI) list
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
Funny, I'm using Xiaomi Mi A2 Lite now.
Lewickham2022 said:
Thanks for the reply. I had a few problems with micro g on MI A2. After flashing micro g in magisk is there a certain gapps I need to flash? Or can I just download Google services after flashing micro g
Click to expand...
Click to collapse
OK, it is possible to install Android 11 GSI system images on this phone. Android 12 images do not work, something to do with incompatible boot partition.
It's possible to try out GSI system images without flashing by installing this app:
GitHub - VegaBobo/DSU-Sideloader: A simple app made to help users easily install GSIs via DSU's Android feature.
A simple app made to help users easily install GSIs via DSU's Android feature. - GitHub - VegaBobo/DSU-Sideloader: A simple app made to help users easily install GSIs via DSU's Android feat...
github.com
Root is useful, but not necessary. Seems not to work, maybe needs flashed empty vbmeta_system and vbmeta_vendor like indicated below and I restored all to stock ROM except for boot.img with Magisk 24.3 and empty vbmeta.img
If you managed to make full backup of ROM with mtkclient, enable USB debugging, unlock bootloader, then to flash GSI images or Lineage 18.1 based on Android 11 (it works, but no image with gapps unless found somewhere else) you have to have installed Google Android USB driver from here
Get the Google USB Driver | Android Studio | Android Developers
The Google USB Driver is required to perform adb debugging on Windows with Google devices.
developer.android.com
Unpack files, connect phone in recovery, power + volume up then power+ volume up fast click, choose fastboot, that gives you FastbootD (colorful menu), which is now used to flash system partitions. Connect phone, install driver with .inf file.
You also need Google platform tools
SDK Platform Tools release notes | Android Studio | Android Developers
Android SDK Platform-Tools is a component for the Android SDK.
developer.android.com
Unpack anywhere if on Windows.
Run cmd, then "fastboot devices" to see if phone gets detected, should be there.
From here get product_gsi.img:
[Tutorial] Magisk on GSI on devices with dynamic partition
I hope you already know how to flash GSI on devices with dyamic partition already. If not then you can follow this guide: https://forum.xda-developers.com/t/how-to-flash-gsis-on-devices-with-dynamic-super-partition.4256667/#post-85271987 If...
forum.xda-developers.com
In mtk client is an empty vbmeta file - vbmeta.img.empty or similar, needs to be flashed to vbmeta, vbmeta_system, and vbmeta_vendor to disable verification of boot for magisk, and system and vendor for GSI system images. Can be done with mtkclient or normal fastboot ( power + volume down, choose fastboot, connect phone, run cmd, then "fastboot flash vbmeta vbmeta.img.empty (could be renamed to anything simple, name doesn't matter))
Then
fastboot flash vbmeta_system vbmeta_img.empty
Then
fastboot flash vbmeta_vendor vbmeta.img.empty
Same file to all three partitions, disables verification, worked for me. Can be done with GUI in mtkclient, same thing. Or commands in mtkclient
"python w vbmeta vbmeta.img.empty"
Etc.
Back to FastbootD -
"fastboot reboot fastboot" or power + volume up for recovery then click them again, choose fastboot.
Or probably "adb reboot fastboot" if phone is running system.
Run cmd, "fastboot devices" to be sure phone is detected, then
"fastboot flash product product_gsi.img"
This resizes dynamic system partition when flashing system images. This only modifies internal logical partitions within SUPER partition that contains Product, System, and Vendor. SUPER can be restored with mtkclient or just fastboot, I guess, I restored with mtkclient, works.
Then you can flash any system based on Android 11, stock phhusson GSI works. the system needs to be arm64, ab (for A/B partitions, indicated by letter B in name), vndklite, G or Gapps (if you want them), V is vanilla - no gapps, S is superuser but seems to have conflicts with magisk if you want that as root later. N is no superuser/root.
Eg.
"fastboot flash system Lineage-18.1-2021214-UNOFFICIAL-treble_arm64_bvS-vndklite.img" Rename this to 1.img or whatever, simpler to type
"fastboot flash system.1.img" or something like that.
"Invalid Sparse System Image At Magic Header" appears, but doesn't matter, starts flashing in 30 seconds or so, 10 or 11 chunks, maybe 2-3 minutes per system image.
Then
"fastboot reboot" go to recovery, power +volume up, click them again, choose wipe user data, wipe cache to get rid of old settings and apps from previous system.
"fastboot reboot recovery" should work too.
Seems that on custom ROMs Magisk 24.3 app gives option to directly patch boot image without need for flashing patched boot.img. Not sure about that. Just flashing patched boot.img in fastboot gives root, anyway.
If you just want newest Magisk then flash empty vbmeta and then patched boot Magisk generates. Those can be done in normal fastboot. Works fine.
Everything seems to work.

Categories

Resources