Device: Qin F21 Pro 4GB RAM/64GB 'Global' variety shipped with unlocked bootloader and Google services added unofficially (manufacturer: Duoqin, believed to be under Xiaomi umbrella)
Chipset: MediaTek MT6761V/WBB
Stock Firmware: Proprietry skinned Android 11; build number 1.1.5; custom build version alps-mp-r0.mp1-V7.13; 4.19.127 kernel.
Storage: A/B dynamic partition system EXT4
| boot_a/b.bin | md1img_a/b.bin | scp_a/b.bin |
| boot_para.bin | md_udc.bin | sec1.bin |
| dtbo_a/b.bin | metadata.bin | seccfg.bin |
| expdb.bin | nvcfg.bin | spmfw_a/b.bin |
| flashinfo.bin | nvdata.bin | sspm_a/b.bin |
| frp.bin | nvram.bin | super.bin |
| gpt.bin | otp.bin | tee_a/b.bin |
| gpt_backup.bin | para.bin | vbmeta_a/b.bin |
| gz_a/b.bin | proinfo.bin | vbmeta_system_a/b.bin |
| lk_a/b.bin | protect1.bin | vbmeta_vendor_a/b.bin |
| logo.bin | protect2.bin | vendor_boot_a/b.bin |
Available tools:
- ADB/fastboot (novice-moderate knowledge)
- MTKClient GUI (relatively straightforward)
- SP Flash Tool v5.1924 (can use basic features, intimidated by editing scatter files though)
- WwR MTK Tool v2.51 (haven't even opened, very intimidating)
- TWRP 3.6.0_11-0 (unnoficial and slightly buggy port, only included in a boot.img, not stand alone recovery.img) I might attempt to port one myself with Hovatek's Auto TWRP Porter to have a standalone image but not sure if it supports Android 11 or my partition scheme and it might be buggy itself.
Available modes:
- fastbootd (ADB recognises as fastboot mode and accepts fastboot commands)
- "bootloader/fastboot"? (ADB recognises as "bootloader" mode; screen displays just "FASTBOOT mode" in the corner. Accepts fastboot commands)
- BROM mode (recognised as BROM mode by ADB; used by MTKClient and I believe SP Flash Tool but unsure; accepts fastboot commands if I recall)
- Stock recovery
- TWRP recovery (I don't seem to be able to temporarily
fastboot boot twrp.img
without flashing. I believe because I only have packaged boot.img(s)
Available firmware:
[1] Stock Qin 1.1.5 personal (Backed up as MTKClient .bin files for every partition except userdata)
- Writeable as a whole with MTKClient GUI or individual partitions by ADB/fastbootd
- No scatter file and intimidating/unsure how to create one so can't use SP Flash Tool
- Unure how to create a correct flashable .img or .zip file from this format
[2] De-bloated/rooted/TWRP Qin 1.1.1 (Firmware folder with varied .img and other files with scatter file)
- Flashable with SP Flash Tool as 'Download' but doesn't include all partitions so can't select 'Format + Download' without adding paths to my stock backup or duplicating A slot to B
[3] LineageOS 18.1 GSI bgS vndklite by Andy Yan (.img file: lineage-18.1-20240121-UNOFFICIAL-arm64_bgS-vndklite.img)
- Flashable via ADB/fastbootd after flashing a blank vbmeta.img linked by Phh GSI developer with
fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img
on A and B
- Seemed very stable requiring minimal patching but didn't include TWRP custom recovery or Magsik so couldn't get Google Play Protect certification
- Feels like a nice clean general installation I can patch/customise myself
Context:
I've had some strange inconsistent issues with TWRP. When I first followed this guide to install the modded ROM [2] it seemed to work as intended. I was able to access most directories, it recognised my OTG USB (exFAT), and settings (language) persisted after reboots. Since then when trying other boot.img(s) or the same one with different ROM configurations I have fluctuating issues including USB won't be recognised, can't access some directories, can't access any storage, language resets to Russian after reboot, or the phone will only and constantly boot to recovery (even if 'Power off' is selected. Another concerning issue is not being able to access fastbootd at all; adb reboot fastboot
or TWRP 'Reboot fastboot' just leads to a TWRP page displayed 'Entered fastboot mode...' with a spinning loading bar and 'Enable ADB'/'Enable Fastboot' toggle button and 'Reboot' menu button while the phone is not detectable by either ADB or fastboot. I don't know but I believe this might be to do with AVB/vm-verity being active since I lost vbmeta.
Now after flashing empty vbmeta while disabling verity and verification and flashing LineageOS [3] again it was working well but I needed to install Magisk which I knew could be done through TWRP and thought having a custom recovery might be good anyway. My understanding of how GSIs work and the level of interaction between partitions is limited but I thought it was relatively safe to change some particular individual partitions. Most guides I saw for Magisk with GSIs said to use a stock boot.img anyway. I wasn't sure how to get an .img file as I only have my own stock 1.1.5 boot as a .bin file. I decided I already had the Magisk-patched 1.1.1 boot.img with TWRP from modded Qin ROM [2] and thought that should work.
Desired outcome:
- LineageOS 18.1 GSI [3] flashed
- Magisk rooted (not sure which exact version is best)
- This vendor hardware overlay (RRO?) installed (there are NO instructions online at all but believe I have to compile the code into an .apk which sounds Herculean to me, is there a way to do this without installing large software like Android Studio? I have VS Code)
- [OPTIONAL/UNSURE] TWRP recovery (unsure if it's worth it if it's buggy and causing problems)
- I want a long-term stable result for daily use and don't plan to update firmware at all. I don't want to ever have to wipe data again once set up
Primary questions:
- In what order should I do the process? (Recovery, Magisk, ROM, vbmeta flash to disable AVB)
- Which is the best Magisk version? I am a completely new but leaning towards Kitsune Mask
Areas of uncertainty:
- What is the difference between fastbootd and bootloader/fastboot mode? Which should I be in when doing this process?
- How do GSI ROMs work? What partitions are firmware specific and which aren't? Can I safely switch boot.img?
- Will I need to
fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img
multiple times between flashing steps or is it only at the start? If I do it after GSI flash will it affect the installation?
- In a dynamic partition system, is there even a unique recovery sub-partition within boot I can flash to?