Installing Custom ROM on Cubot KingKong Mini

Search This thread

Lava79

Member
Sep 9, 2021
9
2
Hi !
Tried the UNOFFICIAL TWRP 3.4.0 linked by birdibird. Did :

1. adb rboot boatloader
2. fastboot flashing unlock ( works like an erase user data )
3. fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot flash boot boot.img
fastboot flash recovery TWRP.img
4. fastboot reboot recovery
( TWRP replaces the 2nd CUBOT's fastboot, could be considering as the official's recovery )
5. access TWRP recovery
( unable to flash LOS17 ROM because I didn't know which location to choose to flash )

SO, I DID AFTER :
1, 2, 3 ( with flashing offical recovery )
4. fastboot reboot fastboot
5. fastboot flash system LOS17.img
6. fastboot reboot boatloader
7. fastboot flash recovery TWRP.img
8. fastboot reboot recovery
9. acces TWRP recovery, unable to flash magisk, no verity opt, and gapps,
because system need to be launched otherwise u got no system folder and no possibility to install.

SO, DID :
1,2,3,4,5,
6. launched sytem
7. same as 6,7,8.
9. This time ( at least ! ), i was able to launch install of magisk, no verity and gapps ( for LOS17, arm(32)-9.0 not arm64 nor android 10 )
BUT, the installations are not working :
"invalid zip file format"
"error installing zip file /external_sd"
"failed to mount /system_root (invalid argument)"

Tried by "internal storage" too but got folders with letters and numbers reaching to nothing and impossible to find zip's files.

So guys, where did i miss something ?
 

rebeco

Member
Jan 20, 2022
5
0
Hi !
Tried the UNOFFICIAL TWRP 3.4.0 linked by birdibird. Did :

1. adb rboot boatloader
2. fastboot flashing unlock ( works like an erase user data )
3. fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot flash boot boot.img
fastboot flash recovery TWRP.img
4. fastboot reboot recovery
( TWRP replaces the 2nd CUBOT's fastboot, could be considering as the official's recovery )
5. access TWRP recovery
( unable to flash LOS17 ROM because I didn't know which location to choose to flash )

SO, I DID AFTER :
1, 2, 3 ( with flashing offical recovery )
4. fastboot reboot fastboot
5. fastboot flash system LOS17.img
6. fastboot reboot boatloader
7. fastboot flash recovery TWRP.img
8. fastboot reboot recovery
9. acces TWRP recovery, unable to flash magisk, no verity opt, and gapps,
because system need to be launched otherwise u got no system folder and no possibility to install.

SO, DID :
1,2,3,4,5,
6. launched sytem
7. same as 6,7,8.
9. This time ( at least ! ), i was able to launch install of magisk, no verity and gapps ( for LOS17, arm(32)-9.0 not arm64 nor android 10 )
BUT, the installations are not working :
"invalid zip file format"
"error installing zip file /external_sd"
"failed to mount /system_root (invalid argument)"

Tried by "internal storage" too but got folders with letters and numbers reaching to nothing and impossible to find zip's files.

So guys, where did i miss something ?

I triyed with adb sideload in order to install Magisk zip file, but did not work because twrp cannot mount system partition.
 

birdibird

Senior Member
Apr 9, 2005
377
21
I triyed with adb sideload in order to install Magisk zip file, but did not work because twrp cannot mount system partition.
which los17 image are you using? It needs to be a rw -> vndklite

long time ago that I actively used twrp (that was on my kkm1), but just from memory you will need to flash decrypt and factory reset/format data in twrp and flash the system.img with twrp or fastboot or spflashtool afterwards to be able to have twrp access the rom.
-> this is from memory, so please tell me if I am wrong.
I flashed this twrp on this device (kkm2) just to test it, and noticed that it could not access my rom as it is encrypted (the original recovery could). I think 3.6.0 should be able to solve that?
 
Last edited:
  • Like
Reactions: Lukas+

Lava79

Member
Sep 9, 2021
9
2
Hi !
I did format data in TWRP before flashing Magisk, but even like this I always got :
Failed to mount /system root
Failed to mount /data

It seems for me that we have to flash Magisk before installing TWRP, dont u think ?
 

rebeco

Member
Jan 20, 2022
5
0
which los17 image are you using? It needs to be a rw -> vndklite

long time ago that I actively used twrp (that was on my kkm1), but just from memory you will need to flash decrypt and factory reset/format data in twrp and flash the system.img with twrp or fastboot or spflashtool afterwards to be able to have twrp access the rom.
-> this is from memory, so please tell me if I am wrong.
I flashed this twrp on this device (kkm2) just to test it, and noticed that it could not access my rom as it is encrypted (the original recovery could). I think 3.6.0 should be able to solve that?

Im using stock rom, dont know about a lOS for the kkm2 version.

I was triying this:

But cannot use this:
fastboot flash system YOUR_SYSTEM_IMAGE.img
(where put the correct image file name for lOS17)

The reason, it says the system partition does not exist.
 
Last edited:

birdibird

Senior Member
Apr 9, 2005
377
21
Im using stock rom, dont know about a lOS for the kkm2 version.

I was triying this:

But cannot use this:
fastboot flash system YOUR_SYSTEM_IMAGE.img
(where put the correct image file name for lOS17)

The reason, it says the system partition does not exist.
did you fastboot reboot fastboot?
try this one: https://leos-gsi.de/downloads/LeOS-S/Jan/LeOS-S-VNDKLITE-a64-bvS.img.xz
 
Last edited:

Lava79

Member
Sep 9, 2021
9
2
@rebeco : the "orange state" is normal thing, u got it soon u unlock the bootloader.
But, the bootloop in the "fastboot recovery"... Normallly u got a "dead android"...
Where did u get the .img u r flashing ? From the stock rom on Cubot's site ?
If it's not, do it, try from scratch : Power+VolUp, go bootloader, and flash everything from beginning.
 

birdibird

Senior Member
Apr 9, 2005
377
21
Orange state you can solve by flashing a patched lk.img with SPFlashtool. I shared mine already before, but I will attach it here again.
 

Attachments

  • lk-patched.img
    774.4 KB · Views: 30

Lukas+

Member
Jan 21, 2022
19
5
Hi. I've installed a
LeOS-S-VNDKLITE-a64-bvS
from here
and it works perfectly, also for intensive everyday use.
As for every today ROM installed in dynamic partitions, there are problems in real full usage of su binaries, but for now it's the best I found, from here, page 16.
 

Lukas+

Member
Jan 21, 2022
19
5
I found a working TWRP for the kkm2.
Flash with SPflashtool or fastboot.
I used TWRP 3.4.0 with Android 10 stock of my kkm2, but it wasn't able to mount in write mode the system, and I know it's a common problem.
Are you able to make it work, yes?
 

birdibird

Senior Member
Apr 9, 2005
377
21
I used TWRP 3.4.0 with Android 10 stock of my kkm2, but it wasn't able to mount in write mode the system, and I know it's a common problem.
Are you able to make it work, yes?
I only tested twrp on my already installed LeOS S phone, but it couldn't read the contents because it's encrypted as I said above. If I have a test device again, I will be able to play around and test things.
 

Lava79

Member
Sep 9, 2021
9
2
Hi !
Tried LeOS-Q version, good rom.
But the only thing i need is a LOS ( or LOS like ) rom + OpenGapps ( or another gapps like ).

Tried in a multiple way with adb/fastboot and with or without TWRP to install gapps but no way...
Any idea how i could do it ?
Because i'm becoming goat ! French version of "going nuts" !
 

Lava79

Member
Sep 9, 2021
9
2
@birdibird : The lk-patched.img u provided works fine with KK2.
I thought i have to flash every time i have to flashing unlock,
but once i did it, the orange state message never appeared again.

Anyone ever had the : "Invalid sparse file format at header magic" message before flashing rom ?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    New 4 inch coming. Looks similar base.

    a1_01.jpg
  • 7
    UPDATE 2021
    The original post was for the first King Kong Mini, for instructions for the King Kong Mini 2 go to page 9 in this thread:
    https://forum.xda-developers.com/t/...-on-cubot-kingkong-mini.4050815/post-84445303

    ======================

    The Cubot King Kong Mini was released in Q4 2019. It is one of the smallest Android phones on the market with a 4" screen. Like many cheap Mediatek devices, one cannot be sure of how "safe" or "secure" these devices are, so the security/privacy conscious may want to consider installing a custom ROM. Here are the instructions for installing Android AOSP on the Cubot King Kong Mini. Note: I am not responsible for any bricked devices.

    Download the Stock Rom from here and SP Flash Tool just in case you need to reinstall Stock. Download a system image, note you need to use an A/B arm32 image with 64 bindings. For example AOSP 9 is here.

    This process probably can be done with SP Flash Tool but I wasn't able to manage it due to the disable-verification flag required.

    Unzip the stock ROM and reboot the device to bootloader, connect via USB and unlock via:
    Code:
    sudo fastboot flashing unlock

    Note this will erase all data. Then on your computer navigate to the folder with the unzipped ROM (for me was NA_mt6761p_d936p_9101cmp_chuanqi_cc_256gbitp24d3_p_lte_3m-fdd-cs_mul_20191121-210020_songlixin_PC) and type
    Code:
    fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

    If you do not do this it seems to work without it but then it will bootloop when you try to switch it on. From here on it's standard.
    Code:
    fastboot flash boot boot.img
    fastboot flash recovery recovery.img

    Unzip the .xz image file you wish to use and type:
    Code:
    fastboot flash system SYSTEM.img
    where SYSTEM is the name of whatever image downloaded.


    Root
    For root install magisk manager and you have to patch the recovery to get root (not just boot as flashing boot alone doesn't give you root). So in magisk get it to patch you boot and recovery images and then put those on your computer, go to bootloader and use:
    Code:
    fastboot flash boot magisk_patched_boot.img
    fastboot flash recovery magisk_patched_recovery.img

    You can read more about magisk from recovery here.

    To get root then you need to reboot to recovery, hold power button + volume up and select Recovery. This will appear to boot as normal but you will have root when you do it this way and not when you boot normally. Unfortunately I do not have reception when I do this but do have root, other users have this problem but I have not found a solution.


    Note that I thought I bricked my phone a few times before getting this as nothing would happen after a failed boot and I couldn't switch it on, however what happens is you can't do anything until the battery has almost completely discharged, then when you hit the power button you'll get the no battery sign and when you plug in you can get to Recovery again. This is quite annoying if you've charged it quite high as you'll have to wait a long time to discharge and be tapping on the power button a lot!!


    What doesn't work
    Battery usage doesn't work, this can probably be fixed following this guide. If I get time I will attempt this.

    Other things to note, there is no TWRP yet so I don't have decent recovery options, this also makes it harder to use certain ROMS as you can't flash things like gapps if you install a ROM without it.
    The battery life is definitely worse using AOSP GSI than stock, maybe that vendor overlay would help with that though.

    I hope that helps others.
    5
    Hi,
    I have got the Cubot King Kong Mini 2 and I can confirm that exchanging the system to LOS17.1 is possible too.
    I did nearly the same as mekkadisu did (#39) for KKM1, but had to do a
    Code:
    fastboot reboot fastboot
    before flashing the system.



    This is what I did:
    1.) Flash the newer OS for King Kong Mini 2 from King Kong's site using the instructions and flash tool already there (quoted from #39).

    2.) Enable developer options by tapping the build number in Settings -> About Phone 7 times, Enable USB Debugging and Allow Bootloader Unlock from developer options (quoted from #39).

    3.) (quoted from #39)
    Code:
    adb reboot bootloader

    4.) once in bootloader mode (quoted from #39)
    Code:
    fastboot flashing unlock

    5.) Then confirm unlock on the phone (quoted from #39)

    6.) Note the locaton of the vbmeta.img, boot.img and recovery.img files from the stock ROM (quoted from #39)
    Code:
    fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
    fastboot flash boot boot.img
    fastboot flash recovery recovery.img

    7.) Now I did not flash the system directly, but rebooted to fastboot
    Code:
    fastboot reboot fastboot

    8.) After device is in real fastboot mode (the screen is different to that of bootloader fastboot mode)
    Code:
    fastboot flash system SYSTEM.img

    I used the lineage-17.1-20210114-UNOFFICIAL-treble_a64_bvS.img.xz



    Why did I do the "fastboot reboot fastboot":
    without rebooting to fastboot but direclty flashing the system, I got this error:
    Code:
    fastboot flash system lineage-17.1-20210114-UNOFFICIAL-treble_a64_bvS.img
    Sending sparse 'system' 1/10 (131068 KB)           OKAY [  4.898s]
    Writing 'system'                                   FAILED (remote: 'This partition doesn't exist')
    fastboot: error: Command failed

    After rebooting to fastboot it worked:
    Code:
    fastboot flash system lineage-17.1-20210114-UNOFFICIAL-treble_a64_bvS.img
    Resizing 'system'                                  OKAY [  0.004s]
    Sending sparse 'system' 1/5 (262140 KB)            OKAY [ 19.088s]
    Writing 'system'                                   OKAY [  4.061s]
    Sending sparse 'system' 2/5 (262140 KB)            OKAY [ 19.596s]
    Writing 'system'                                   OKAY [  4.036s]
    Sending sparse 'system' 3/5 (262140 KB)            OKAY [ 19.943s]
    Writing 'system'                                   OKAY [  4.048s]
    Sending sparse 'system' 4/5 (262140 KB)            OKAY [ 20.290s]
    Writing 'system'                                   OKAY [  3.721s]
    Sending sparse 'system' 5/5 (177556 KB)            OKAY [ 13.090s]
    Writing 'system'                                   OKAY [  2.879s]
    Finished. Total time: 110.773s

    I'm not an expert in flashing mobile devices, so I don't know, why I had to to that. I would be very happy if an expert could reply and maybe give me a hint as to what the problem was.
    3
    With KKM2 in TWRP it's impossible to mount system. Because KKM2 is shiped with Android 10 means dynamic partition respectively super partition. Thats a big difference to older android versions, e.g. explaned on youtube. On stock rom at least you can get read-only access to system using magisk. Most other custom roms have su buildin. So changes to /system can only be done "systemless". There is a buildin magisk module for. However it's very inconvenient in comparision to previous android versions (before 10). Is there a way to patch system offline and flash later? E.g. dismantle super.img to system and other partitions, patch the individual things, bundle partitions together back to super.img and flash it to KKM2? At the other hand cubot stock firmware contains system.img but flash tools doesnt flash it, only super.img. Why? What is system.img used for?

    OK, forget system, but how did you manage to access data partition? TWRP can mount data but all files are encrypted. With stock rom I had no success in running an unencrypted data partition. I tried format data with ext4 like descripted here. And I tried to apply DM-Verity Disabler or no-verity-opt-encrypt. But every time I rebooted stock rom, data was encrypted again. Without access to system partition those (old?) scripts wont work anymore. Is there another way for Android 10 (adb sideload, flash tool, ...)? TWRP would be nice for backup and revocery data partition. Have you found other ways for backup data partition? How do I get rid of encrypted data partition? Is this only possible with custom rom?

    Btw KKM2 battery is not like the KKM1! It looks like this. It's a Li-Polymer 3.000mAh battery, named CBT-A061.

    Flash Tool is very nice. With that you can remedy all flashing mistakes and begin from the start, nice phone.
    3
    anyone knows how to replace the boot image on KKM2 ?
    there's logo-verified.bin in default rom files ..
    would be also nice to replace the colorful "charging" screen when phone is switched off

    p.s. successfully loaded the logo-verified.bin in editor from here :
    logo editor
    edited and flashbed back with
    fastboot flash logo logo.bin
    Sending 'logo' (873 KB) OKAY [ 0.046s]
    Writing 'logo' OKAY [ 0.024s]

    battery animation is in the same file.


    Anyone managed to remove 5sec delay with open bootloader?
    The orange state is easy to remove, but delay remains ..
    2
    Upgraded to the 17 April 305 version of CAOS. No echo problems anymore.