• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Tutorial flashing GSI image for Oukitel K9

Search This thread

gilius2k15

Member
Apr 7, 2018
39
11
EDIT: Funny you should reply when I hit a stroke of genius... I wrote this before seeing your reply, @TiTiB!

Eureka! The OP's guide is both missing steps and poorly written which led to even a senior member @TiTiB giving up on this. Fortunately, I just figured out a repeatable, working method for installing and I just got LineageOS installed. It is so easy, actually!

Here are the tools you will need to gather!

Minimal ADB and Fastboot 1.4.3
"vbmeta.img" from Android 10 GSI available here: developer .android .com/topic/generic-system-image/releases
Your GSI of choice (I used LineageOS). Extract the .img file and rename it to "system.img". You will need this later!

Now for the main steps you will need to follow!

1) Install Minimal ADB and Fastboot 1.4.3.
2) Copy "vbmeta.img" and "system.img" to "C:\Program Files (x86)\Minimal ADB and Fastboot".
3) Enable developer mode on your Ouketel K9. You do this, while in the Settings app, going to About and tapping on Build number 7 times.
4) While in the Settings app on your Ouketel K9, go to System->Advanced->Developer Options and enable both "OEM unlocking" and "Enable USB Debugging."
5) Now connect your Ouketel K9 to your computer via USB cable. Then get it into the bootloader. You do this, while in a powered off state, by holding volume up and power button, and choosing Fastboot mode.
6) From your computer's start menu, run Minimal ADB and Fastboot as administrator.
7) Run the following commands from the command prompt window that just appeared:
> fastboot devices
> fastboot flashing unlock
> fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
> fastboot erase system
> fastboot flash system system.img
> fastboot -w
> fastboot reboot
8) Finished!

You may have noticed "fastboot flashing unlock." This command is very necessary and often overlooked! @Levered's obscure references to "already unlocked bootloader" and "Please unlocked your bootloader, if that" refer to this command. He didn't realize he didn't actually tell us this command. I literally just stumbled on it here:

www. getdroidtips. com/flash-twrp-recovery-android/#comment-131543
I managed to flash Lineage 18.1/Android 11, but there was one extra step needed in addition to the above! And I already tried flashing vendor.img from the stock rom without success too.
IMPORTANT: if it automatically goes into TWRP recovery (= fail!) after running fastboot reboot (step 8) then you need to click (in TWRP) on Advanced > ADB Sideload and run this command from your PC: adb sideload Magisk-v21.4.zip (and gapps if you want it - pico is usually best: https://sourceforge.net/projects/opengapps/files/arm64/test/20210130)
Note: there are reports of the most recent two versions of Magisk not working properly at the time of writing, so I used 21.4 as the recommended version.
Note also: gapps needs to be installed ahead of Magisk, and you may need to resize system partition first by following the Format option followed by the Repair File System option before going back to ADB Sideload:

The bootloop issue and the need for Magisk (normally used for rooting) is, apparently, due to something called "dm verity" being enabled by default on all phone's stock boot images:
https://forum.xda-developers.com/t/always-bootloop-after-flashing-any-gsi.4188041/

FYI - here's where I got the main files:
1) vbmeta from Android 11 generic system image:
2) LineageOS 18.1/Android 11 GIS image:
(the one ending in "arm64_bvS.img.xz")

BTW, I don't know how well the GSI rom will work with this phone yet - haven't tested - but LineageOS 18.1/Android 11 is a Godsend when it comes to using a connected mouse, native "Files" app, freeform windows and the Taskbar 6.0 app as part of a desktop experience. Android 9 just didn't make the cut, hence freeform windows were not officially supported that time nor before, and caused apps to constantly crash. I think Android 10 might be somewhere in the middle, as I need to test that too.
 
Last edited:
I managed to flash Lineage 18.1/Android 11, but there was one extra step needed in addition to the above! And I already tried flashing vendor.img from the stock rom without success too.
IMPORTANT: if it automatically goes into TWRP recovery (= fail!) after running fastboot reboot (step 8) then you need to click (in TWRP) on Advanced > ADB Sideload and run this command from your PC: adb sideload Magisk-v21.4.zip (and gapps if you want it - pico is usually best: https://sourceforge.net/projects/opengapps/files/arm64/test/20210130)
Note: there are reports of the most recent two versions of Magisk not working properly at the time of writing, so I used 21.4 as the recommended version.
Note also: gapps needs to be installed ahead of Magisk, and you may need to resize system partition first by following the Format option followed by the Repair File System option before going back to ADB Sideload:

The bootloop issue and the need for Magisk (normally used for rooting) is, apparently, due to something called "dm verity" being enabled by default on all phone's stock boot images:
https://forum.xda-developers.com/t/always-bootloop-after-flashing-any-gsi.4188041/

FYI - here's where I got the main files:
1) vbmeta from Android 11 generic system image:
2) LineageOS 18.1/Android 11 GIS image:
(the one ending in "arm64_bvS.img.xz")

BTW, I don't know how well the GSI rom will work with this phone yet - haven't tested - but LineageOS 18.1/Android 11 is a Godsend when it comes to using a connected mouse, native "Files" app, freeform windows and the Taskbar 6.0 app as part of a desktop experience. Android 9 just didn't make the cut, hence freeform windows were not officially supported that time nor before, and caused apps to constantly crash. I think Android 10 might be somewhere in the middle, as I need to test that too.
I have successfully installed this Lin 18 gsi installed gapps and used su to root. The os is smooth and works great overall. I'm still having a hard time installing magisk. The partition should be a/b. The root works with most apps. Isolation storage app failed to run core.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    What tool do I use to unlock the bootloader?
    You might not be able to...like me. See my previous posts. Maybe of particular interest is the one with a link to a temporary root solution, which worked for me.
    2
    EDIT: Funny you should reply when I hit a stroke of genius... I wrote this before seeing your reply, @TiTiB!

    Eureka! The OP's guide is both missing steps and poorly written which led to even a senior member @TiTiB giving up on this. Fortunately, I just figured out a repeatable, working method for installing and I just got LineageOS installed. It is so easy, actually!

    Here are the tools you will need to gather!

    Minimal ADB and Fastboot 1.4.3
    "vbmeta.img" from Android 10 GSI available here: developer .android .com/topic/generic-system-image/releases
    Your GSI of choice (I used LineageOS). Extract the .img file and rename it to "system.img". You will need this later!

    Now for the main steps you will need to follow!

    1) Install Minimal ADB and Fastboot 1.4.3.
    2) Copy "vbmeta.img" and "system.img" to "C:\Program Files (x86)\Minimal ADB and Fastboot".
    3) Enable developer mode on your Ouketel K9. You do this, while in the Settings app, going to About and tapping on Build number 7 times.
    4) While in the Settings app on your Ouketel K9, go to System->Advanced->Developer Options and enable both "OEM unlocking" and "Enable USB Debugging."
    5) Now connect your Ouketel K9 to your computer via USB cable. Then get it into the bootloader. You do this, while in a powered off state, by holding volume up and power button, and choosing Fastboot mode.
    6) From your computer's start menu, run Minimal ADB and Fastboot as administrator.
    7) Run the following commands from the command prompt window that just appeared:
    > fastboot devices
    > fastboot flashing unlock
    > fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
    > fastboot erase system
    > fastboot flash system system.img
    > fastboot -w
    > fastboot reboot
    8) Finished!

    You may have noticed "fastboot flashing unlock." This command is very necessary and often overlooked! @Levered's obscure references to "already unlocked bootloader" and "Please unlocked your bootloader, if that" refer to this command. He didn't realize he didn't actually tell us this command. I literally just stumbled on it here:

    www. getdroidtips. com/flash-twrp-recovery-android/#comment-131543
    1
    Please make sure you have download Generic GSI from Google and already unlocked bootloader.

    Here the link ( Download Generic GSI )

    Choose ARM64+GMS / ARM64, if you want to flash android Q treble rom, just download Android Q only.

    Let's start it.

    1. Flash to stock firmware using MTK Tools

    2. Extract vbmeta.img from Generic GSI.

    3. Connect to usb to device (enter fastboot mode) hold volume up and power button, choose fastboot mode.

    4. Type this and make sure using generic vbmeta.img
    Code:
    fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

    5. Next erase file system

    Code:
    fastboot erase system

    6. a) Flash file system

    Code:
    fastboot flash system ######.img
    # = your file system name

    or

    6. b) Using TWRP > Flash> Click image> find img to flash> Select system>then swipe to flash


    7.
    Code:
    fastboot -w

    8.
    Code:
    fastboot reboot

    PLEASE TAKE NOTE OUKITEL K9 IS A/B DEVICES

    Test
    Working GSI:
    system-quack-arm64-ab-gapps.img.xz

    Evolution X , Lineage 17.1 - All Working

    Havoc 3.3 - RIL bugs, no simcard detect

    All GSI Rom list you can find here : Phhusson GSI
    1
    Additional information I have discovered

    The vbmeta generic file is needed http://www.mediafire.com/file/lpdpocvn76n7cyo/vbmeta.img/file
    The rom is https://www.mediafire.com/file/i9jo...20200413-UNOFFICIAL-treble_arm64_bvN.img/file
    The Trebel test app stated the my Oukitel k9 was A only I found out it is A/B this rom works.

    Also after flashing Lineage 17 there is not enough space for Gapps. Solution after flash reboot recovery again go to wipe select system select repair then adjust size of partition. Then reboot to recovery again then flash Gapps. I have successfully flashed Gapps stock and works great. Note I flashed Magisk last. So far this GSI works great, better than the phones original. Xposed works! Gravity box beta 6 works. Apps now auto start properly.

    Thank you.