Installing Custom ROM on Cubot KingKong Mini

Search This thread

snoopy29

Senior Member
May 21, 2021
90
19
How did you kill them? I've killed one KKM2, immediate bootloop and ignores all buttons.

I'm compiling lineage 17.1 without su, primarily for the KKM2 which can't edit /system, see the GSI thread for a binary. It's my daily driver and working great.
 

landsome

Senior Member
May 4, 2015
604
158
After a few weeks trying to revive both KKM1 and 2 without any advance and, given that there isn't anything equivalent to this form factor, I finally decided to get another KKM1.

So far so good. Flashed CAOS 11 v308_gapps on top of latest stock and everything is working fine, including BT audio.
Don't you get incredible battery drain on the KKM1 during phone calls? This is what simply kills the phone for me. I could get used to all the other minuses, but to lose 25-30% over one hour on the phone is terrible.
 

snoopy29

Senior Member
May 21, 2021
90
19
It's only a 2000maH battery, I wouldn't expect much more from any other device, and it depends heavily on how far away you are from a mast.
 

landsome

Senior Member
May 4, 2015
604
158
It's only a 2000maH battery, I wouldn't expect much more from any other device, and it depends heavily on how far away you are from a mast.
Thanks. I have a Sony XZ1c with about 1900mah battery left after years of use and an XZ2c with around 2000mah (to the extent that months of AccuBattery use can give an accurate estimate). One hour on the phone eats up about a third as much. I realize these were old flagships etc., but I find the difference huge. After 3-4 longer (but not very long) calls I basically have to recharge the KKM1.
 

fasser

Member
Oct 13, 2010
15
7
Samsung Galaxy Tab S
How did you kill them? I've killed one KKM2, immediate bootloop and ignores all buttons.

I'm compiling lineage 17.1 without su, primarily for the KKM2 which can't edit /system, see the GSI thread for a binary. It's my daily driver and working great.
Both of them stopped booting overnight on their own. First was a KKM1 which I had for about a year and never flashed out of stock ROMs. After trying to factory reset it and reflashing with SP flash tools it even stopped responding to USB. It still shows the boot screens and sometimes can access recovery, but it looks like the partition table is damaged.

After that one failed I got a KKM2, tested it for a while on stock and after a few weeks started flashing AOSP. One night it just froze and, after a force reset, it doesn't even show the boot or battery status screens. It still connects via USB but looks like the preloader got damaged, so it won't continue to boot/recovery/fastboot or even enter META mode when signaled by SP flash.
 

fasser

Member
Oct 13, 2010
15
7
Samsung Galaxy Tab S
Don't you get incredible battery drain on the KKM1 during phone calls? This is what simply kills the phone for me. I could get used to all the other minuses, but to lose 25-30% over one hour on the phone is terrible.

As @snoopy29 said, you have to remember that this phone's battery is quite small. In my case it's not a problem as my phone usage is very little, but I do find annoying how hot the terminal gets after a 10-15 minute conversation.
 

landsome

Senior Member
May 4, 2015
604
158
By the way, has anyone found a ROM with microG built in that works well (as a ROM, not only as microG)?

I don't mean a ROM where I can install microG (I have done that, with various degrees of success, on a couple of different ROMs), but one where it's built into the ROM itself - and is updated relatively frequently.
 

W0153R

Member
Jul 26, 2008
11
4
The lk.img attached to TWRP earlier in the thread didn't work for me with the A061C_V07_20201113 ROM for the KingKong Mini 2. I modified the lk.img in that ROM, at first to get rid of Orange State notification but got it to pass SafetyNet as well after also selecting the SafetyNet feature in Phh settings (on CAOS 11 308 but it should be universal).

Edit: Also, something I didn't see mentioned anywhere is that you have to allow unlocking in developer options before you can unlock the bootloader. I struggled with a "unlock failed" error for way too long..
 

Attachments

  • lk-mod2.img
    774.4 KB · Views: 47
Last edited:
  • Like
Reactions: snoopy29

snoopy29

Senior Member
May 21, 2021
90
19
I've just had a 22 min conversation, phone up to ear. KKM2. Lineage 17.1 (my rom).

Battery loss - 3%. Screen a little warm but probably a lot from my ear. Back top section (motherboard) luke warm.

I haven't a problem with this performance.
 

snoopy29

Senior Member
May 21, 2021
90
19
The lk.img attached to TWRP earlier in the thread didn't work for me with the A061C_V07_20201113 ROM for the KingKong Mini 2. I modified the lk.img in that ROM, at first to get rid of Orange State notification but got it to pass SafetyNet as well after also selecting the SafetyNet feature in Phh settings (on CAOS 11 308 but it should be universal).

Edit: Also, something I didn't see mentioned anywhere is that you have to allow unlocking in developer options before you can unlock the bootloader. I struggled with a "unlock failed" error for way too long..
I'll test this myself in a moment. Curious, how did you modify it?
 

landsome

Senior Member
May 4, 2015
604
158
I've just had a 22 min conversation, phone up to ear. KKM2. Lineage 17.1 (my rom).

Battery loss - 3%. Screen a little warm but probably a lot from my ear. Back top section (motherboard) luke warm.

I haven't a problem with this performance.
Thanks. I have heard it's not a problem with the kkm2, just kkm1 it seems (it was in fact reported on this thread in its early days).
 

W0153R

Member
Jul 26, 2008
11
4
I'll test this myself in a moment. Curious, how did you modify it?
I looked up the Orange State message part, zeroed that (and the Red State message) out and underneath that is a flag (forgot what it's called) that gets set to the different states, I changed that to always report green.

Also, this seems to fix the bluetooth microphone echo for me. I made a crude little Magisk module to do it for me, I'll see if I can get a proper regex together..

Edit: the flag is called androidboot.verifiedbootstate and it's probably possible to modify it without lk.img..

Edit2: with regards to the bluetooth echo, the following regex's work for me:
Bash:
sed -i ':a;N;$!ba;s%<route type="mix" sink="voice tx"\n[ ]*sources="Voice Call In"/>\n[ ]*%%g'

sed -i ':a;N;$!ba;s%<mixPort name="voice tx" role="sink" maxOpenCount="1" maxActiveCount="1">\n[ ]*<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"\n[ ]*samplingRates="8000,16000,32000,44100,48000"\n[ ]*channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>\n[ ]*</mixPort>\n[ ]*%%g'
If someone smarter than me can make a Magisk module out of this.. I´ve got no clue where to start, I think post-fs-data.sh but I don't have time for it right now.
 
Last edited:

snoopy29

Senior Member
May 21, 2021
90
19
I looked up the Orange State message part, zeroed that (and the Red State message) out and underneath that is a flag (forgot what it's called) that gets set to the different states, I changed that to always report green.

Also, this seems to fix the bluetooth microphone echo for me. I made a crude little Magisk module to do it for me, I'll see if I can get a proper regex together..

Edit: the flag is called androidboot.verifiedbootstate and it's probably possible to modify it without lk.img..

Edit2: with regards to the bluetooth echo, the following regex's work for me:
Bash:
sed -i ':a;N;$!ba;s%<route type="mix" sink="voice tx"\n[ ]*sources="Voice Call In"/>\n[ ]*%%g'

sed -i ':a;N;$!ba;s%<mixPort name="voice tx" role="sink" maxOpenCount="1" maxActiveCount="1">\n[ ]*<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"\n[ ]*samplingRates="8000,16000,32000,44100,48000"\n[ ]*channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>\n[ ]*</mixPort>\n[ ]*%%g'
If someone smarter than me can make a Magisk module out of this.. I´ve got no clue where to start, I think post-fs-data.sh but I don't have time for it right now.

If it's generic send to PHH for inclusion in his work and it'll make it into all the treble roms.
 

Vuche

Senior Member
A quick review and summary of my installation of GSI AOSP treble on my King Kong Mini 1:

As I had already tried to install the original Cubot Android 10 firmware of the KKM2 on my KKM1, I had already unlocked the bootoader to backup my original KKM1 firmware with TWRP, mainly to have a backup of the nvram that had to be wiped after because of a different partitioning for Android 10. Basically I did good because the only way to restore IMEIs and full nvram was by restoring my full backup of the original Andoid 9 install.

I followed the steps I could find on this thread between page 1 and 9 after downloading PHH AOSP 10 and 11 trebel roms.
Only trouble I went through was that I directly installed AOSP 11 with gapps, but it kept telling me my phone wasn't certified and gapps was crashing every 2 seconds or so.
So I flash AOSP 10 to see if I had the same problem and everything went smoothly, with gapps working, so I set my account to install some basic apps. I then upgraded to the lasted AOSP 11 with gapps through fastboot, keeping everything without wipe. And it worked!

So now I have a working KKM1 with Android 11 and June security update! I didn't try calling or using GPS yet, but for the rest, everything looks neat and works fluently. And I guess I can trust AOSP that there's no malware or backdoor installed by default in it, so even better than if Cubot itself would provide us with a working Android 10 or 11.

Thanks for everyone who's helping in this forum, I still have to hit some thumbs up buttons now that I could install the latest ROM.
 
Last edited:

snoopy29

Senior Member
May 21, 2021
90
19
The lk.img attached to TWRP earlier in the thread didn't work for me with the A061C_V07_20201113 ROM for the KingKong Mini 2. I modified the lk.img in that ROM, at first to get rid of Orange State notification but got it to pass SafetyNet as well after also selecting the SafetyNet feature in Phh settings (on CAOS 11 308 but it should be universal).

Edit: Also, something I didn't see mentioned anywhere is that you have to allow unlocking in developer options before you can unlock the bootloader. I struggled with a "unlock failed" error for way too long..

How did you flash this, I've tried both

/fastboot flash lk /home/andrew/Downloads/lk-mod2.img
/fastboot flash lk2 /home/andrew/Downloads/lk-mod2.img

And receiving partition doesn't exist (in proper fastboot mode)
 

W0153R

Member
Jul 26, 2008
11
4
You have to use root on linux to flash it, I don't know about windows or mac. I think I only flashed lk, maybe I did both, but you have to be in one of the fastboot modes, I can't remember which. If it doesn't work in the first one, do fastboot reboot fastboot so you get the other fastboot (the screen on your phone will be different) and try again..
 

Lava79

Member
Sep 9, 2021
9
3
Hi everybody !
New owner of a KKM2 I would like to install LOS Rom, but last time I did was 2016 on a Redmi 3S.
I've read Highbiker's post message #163 but my english and smartphone's knowledge seem to be a little rusty.
Could someone tell me or point me a link to do so ?
Thanks.
 

CHAYIM

New member
Sep 17, 2021
1
0
הצלחתי לשורש את ה- KING KONG MINI2.
אני מצליח להזין את קבצי המערכת,
אבל בלי לשנות או למחוק.
האם יש לאחד פתרון?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    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://xdaforums.com/t/installing-custom-rom-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.
    4
    So i got myself a KKM2 Pro. This is an native arm64, not an binder64.
    The procedure was nearly the same as in #163.

    This is what I did:

    1. Download KKM2 Pro stock rom from Cubot website and unpack it somewhere.
      Download product_gsi.img from this post.

    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.

    3. adb reboot bootloader

    4. once in bootloader mode
      fastboot flashing unlock

    5. Then confirm unlock on the phone

    6. Note the location of the vbmeta.img, boot.img and recovery.img files from the stock ROM
      fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
      fastboot flash boot boot.img
      fastboot flash recovery recovery.img

    7. reboot to fastboot
      fastboot reboot fastboot

    8. After device is in real fastboot mode (the screen is different to that of bootloader fastboot mode)
      flash product_gsi.img as per aforementioned post
      fastboot flash product product_gsi.img
      finally flash system
      fastboot flash system SYSTEM.img
    I used system-squeak-arm64-ab-vndklite-gapps-secure.img.xz from phh.
    Device boots and looks fine, but no further tests were made yet. Will report back if i had time to test.


    Bonus steps:
    i also flashed lk_patched.img to remove the orange state warning. I modified the stock v02 lk.img.

    1. reboot to bootloader
      adb reboot bootloader

    2. fastboot flash lk lk_patched.img
    4
    I see that there are all kinds of instructions floating around in this thread with all kind of extra commands that you do not need to use at all.

    Here is my comprehensive HowTo for our King Kong Mini 2:

    For the KKM2 we need a A64 or A64binder32 image.
    It can be either VNDK or VNDKLITE.
    VNDKLITE is only needed if you want to use a read/write system.
    If you use a systemless root version, e.g. Magisk, you do not need VNDKLITE necessarily but you can always choose it if you want.

    I am using LeOS Android 12.1 on my kkm2 as I want to be as degoogled as possible.
    Because it is so light, the battery time is quite good.


    - download and unpack the gsi.img.xz file you chose
    - put the unpacked .img together with the vbmeta.img file (attached below) in e.g. your home folder
    - in Linux make sure the android-tools package is installed, in Windows make sure platform-tools is installed

    - Boot into your phone, go to settings, about phone and tick 7 times on build number. Developer options will be activated
    - In settings again there will now be Developer options (probably under system). Switch on OEM/bootloader unlocking and USB debugging
    - connect your phone with the cable to the computer
    - open a terminal or command prompt in the folder of the .img files and tick these commands:
    - adb devices
    (the phone should give a message to trust the computer)
    - adb reboot bootloader
    (phone reboots into bootloader/fastboot mode)
    - fastboot flashing unlock
    (you will be asked on the phone to confirm unlocking it)
    - fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
    -fastboot reboot fastboot
    (phone reboots in fastbootd mode)
    -fastboot flash system GSI-VNDK(lite)-a64-bvN.img
    (on the phone choose):
    -Enter recovery
    -Wipe data/factory reset
    -Reboot system now

    That's all.

    when upgrading your gsi, you only need to flash system again in fastbootd and don't need to data/factory reset (dirty flashing). Sometimes this also works between gsi's, but not always.

    (ps:
    you can skip the adb part by booting into bootloader/fastboot mode:
    -hold volume up button while long pressing the power button on the phone
    -in the little menu move with volume up to fastboot and select it with volume down)

    It is known that with some PHH based gsi's the sound sometimes crackles a bit on some Mediatek devices. It is not yet clear what causes it.
    I am playing around with these settings, somehow the crackling is being influenced by the brightness settings. The weird thing is that on our KKM1 with LineageOS A11, we don't have these crackling problems. Please share your experiences with this.

    Phh Treble settings
    Misc features
    tick:
    -Use linear screen brightness
    -Force Enable Camera2APIHAL3
    -Bluetooth workarounds / Mediatek

    in developer options I changed:
    -Animator duration scale .5x

    happy flashing!
    3
    Note to moderators : we have been polluting the Kingkong Mini / Kingkong Mini 2 thread with news, speculations and comments on the Cubot Pocket since April 23rd.
    I think, both KKM / KKM2 and Pocket lovers would benefit from a split of the thread…

    Cobus.
    I have moved the posts relating to the Pocket HERE. You can continue the conversation there. As and when development takes place for this device, you can make a request for a new forum as described by my colleague @Timmmmaaahh! above.