Doogee N20 "TEE key not write, Google key not write" message

Search This thread

tiagao_extremo

Senior Member
Jan 8, 2014
70
3
After trying to root this smartphone, it ended up corrupting some system files. I reinstalled stock rom and this message showed up: TEE key not write, Google key not write:

Screenshot-20200323-181357.png


Using Google i ended up at this thread here in xda:

https://forum.xda-developers.com/general/help/ulefone-power-3s-problem-t3794521

But this method about using adb platform tools didn't worked for me. There's no Factory Mode even when listing all the packages installed. Is there any other recommendation of what i should do? This is actually very annoying? Thanks.

Listed packages:

package:com.android.fmradio
package:com.mediatek.gba
package:com.mediatek.ims
package:com.android.cts.priv.ctsshim
package:com.google.android.youtube
package:com.android.internal.display.cutout.emulation.corner
package:com.google.android.ext.services
package:com.android.internal.display.cutout.emulation.double
package:com.android.providers.telephony
package:com.google.android.googlequicksearchbox
package:com.android.providers.calendar
package:com.android.providers.media
package:com.google.android.onetimeinitializer
package:com.google.android.ext.shared
package:com.mediatek.location.lppe.main
package:com.android.wallpapercropper
package:com.teslacoilsw.launcher
package:com.android.protips
package:com.android.documentsui
package:android.auto_generated_rro__
package:com.android.externalstorage
package:com.mediatek.ygps
package:com.mediatek.simprocessor
package:com.android.htmlviewer
package:com.mediatek.mms.appservice
package:com.android.companiondevicemanager
package:com.android.mms.service
package:com.android.providers.downloads
package:com.google.android.apps.messaging
package:com.adups.fota
package:com.mediatek.engineermode
package:com.android.partnerbrowsercustomizations.example
package:com.qiku.face.unlock
package:com.mediatek.omacp
package:com.google.android.configupdater
package:com.android.soundrecorder
package:com.mediatek.wfo.impl
package:com.android.defcontainer
package:com.android.providers.downloads.ui
package:com.android.vending
package:com.android.pacprocessor
package:com.android.simappdialog
package:com.android.internal.display.cutout.emulation.tall
package:com.android.certinstaller
package:com.android.carrierconfig
package:com.google.android.marvin.talkback
package:com.adups.privacypolicy
package:android
package:com.android.contacts
package:com.android.egg
package:com.android.mtp
package:com.android.nfc
package:com.android.stk
package:com.android.launcher3
package:com.android.backupconfirm
package:com.sprd.screencapture
package:com.android.statementservice
package:com.google.android.gm
package:com.google.android.apps.tachyon
package:com.mediatek.mdmlsample
package:com.android.settings.intelligence
package:com.mediatek.providers.drm
package:com.android.systemui.theme.dark
package:com.google.android.setupwizard
package:com.android.providers.settings
package:com.android.sharedstoragebackup
package:com.mediatek.batterywarning
package:com.google.android.music
package:com.android.printspooler
package:com.android.dreams.basic
package:com.android.se
package:com.android.inputdevices
package:com.google.android.apps.wellbeing
package:com.android.bips
package:com.mediatek
package:com.google.android.apps.nbu.files
package:com.example
package:com.mediatek.duraspeed
package:com.android.musicfx
package:com.google.android.apps.docs
package:com.google.android.apps.maps
package:com.google.android.webview
package:com.android.server.telecom
package:com.google.android.syncadapters.contacts
package:com.android.keychain
package:com.android.camera
package:com.google.android.calculator
package:com.android.chrome
package:com.android.dialer
package:com.google.android.packageinstaller
package:com.google.android.gms
package:com.google.android.gsf
package:com.google.android.ims
package:com.google.android.tts
package:com.google.android.gmsintegration
package:com.android.calllogbackup
package:com.google.android.partnersetup
package:com.google.android.videos
package:com.android.proxyhandler
package:com.google.android.feedback
package:com.google.android.printservice.recommendation
package:com.google.android.apps.photos
package:com.google.android.calendar
package:com.android.managedprovisioning
package:com.mediatek.calendarimporter
package:com.mediatek.thermalmanager
package:com.mediatek.callrecorder
package:com.android.providers.partnerbookmarks
package:com.android.smspush
package:com.mtk.telephony
package:com.android.wallpaper.livepicker
package:com.google.android.gms.policy_sidecar_aps
package:com.google.android.backuptransport
package:com.android.storagemanager
package:com.android.bookmarkprovider
package:com.android.settings
package:com.themonsterit.EngineerStarter
package:com.fineos.superscreenshot
package:com.mediatek.mdmconfig
package:com.mediatek.lbs.em2.ui
package:com.android.cts.ctsshim
package:com.android.vpndialogs
package:com.android.phone
package:com.android.shell
package:com.android.wallpaperbackup
package:com.android.providers.blockednumber
package:com.android.providers.userdictionary
package:com.android.emergency
package:com.android.location.fused
package:com.android.deskclock
package:com.android.systemui
package:com.android.bluetoothmidiservice
package:com.cryptotel.chamelephon
package:com.android.traceur
package:com.mediatek.mtklogger
package:com.mediatek.sensorhub.ui
package:com.android.bluetooth
package:com.android.wallpaperpicker
package:com.android.providers.contacts
package:com.android.captiveportallogin
package:com.google.android.inputmethod.latin
package:com.google.android.apps.restore
 
Last edited:

Morphine1

Senior Member
Sep 23, 2014
490
671
Andalusia.
Try to restart the phone or install trough TWRP recovery.
It should work 99%
No twrp for this device, I patched the boot with magisk and flashed via fastboot.

I'm not sure what to do but this has to be something pretty new, and I hope our research can help others.

For now I noticed the Serial number is 0123456789ABCDEF

But the IMEIs are correct, I can use sim data and all is ok except the damn red watermark not write Googlekey/not write TEE

This blackview max1 has a projector so it really sucks having the watermark projected into the wall..

I will keep trying with the last apk file you shared for this model, but I don't know what else to try. Might give it a look to that SN Write tool as well.
 

IosifMihaescu

Member
May 14, 2020
25
10
No twrp for this device, I patched the boot with magisk and flashed via fastboot.

I'm not sure what to do but this has to be something pretty new, and I hope our research can help others.

For now I noticed the Serial number is 0123456789ABCDEF

But the IMEIs are correct, I can use sim data and all is ok except the damn red watermark not write Googlekey/not write TEE

This blackview max1 has a projector so it really sucks having the watermark projected into the wall..

I will keep trying with the last apk file you shared for this model, but I don't know what else to try. Might give it a look to that SN Write tool as well.
Ok, keep trying and if it don't work, the only thing is to install the APK trough TWRP; I had almost the same problem, I fixed it by installing the APK trough TWRP.
 
  • Like
Reactions: Morphine1

Morphine1

Senior Member
Sep 23, 2014
490
671
Andalusia.
Ok, keep trying and if it don't work, the only thing is to install the APK trough TWRP; I had almost the same problem, I fixed it by installing the APK trough TWRP.

Could you tell me what changes do you do to the original mtksystemui apk to get rid from the red watermark?

no luck still, and I do not have TWRP for this device, unless someone knows how to make a twrp for it
 

Morphine1

Senior Member
Sep 23, 2014
490
671
Andalusia.
It's getting really annoying , because after I replace the modded mtksystemui.apk in privapp folder and restart the service with the command, ( adb shell
su
pkill -TERM -f com.android.systemui; am startservice --user 0 -n com.android.systemui/.SystemUIService )
the phone works well, it has navbar and statusbar. but it cannot be restarted or shutdown, because after rebooting the systemui becomes glitchy without navbar and without statusbar, also black wallpaper.

I really think the solution is near but I don't know what else to do.
 

IosifMihaescu

Member
May 14, 2020
25
10
It's getting really annoying , because after I replace the modded mtksystemui.apk in privapp folder and restart the service with the command, ( adb shell
su
pkill -TERM -f com.android.systemui; am startservice --user 0 -n com.android.systemui/.SystemUIService )
the phone works well, it has navbar and statusbar. but it cannot be restarted or shutdown, because after rebooting the systemui becomes glitchy without navbar and without statusbar, also black wallpaper.

I really think the solution is near but I don't know what else to do.
If it works after adb shell command and after restart goes to have problems, the only solution I know is to install it with TWRP in this location: \system\system\priv-app\MtkSystemUI
Why this location? Because this location is only accessible from TWRP recovery.
Example:
The accessible location from any root explorer is:
\system\priv-app\MtkSystemUI
The accessible location from TWRP is:
\system\system\priv-app\MtkSystemUI
It seems to be the same, but isn't.
However, Try to find out if exists another way to access this location: \system\system\priv-app\MtkSystemUI
Because the only way I know to access that location, is from TWRP.
 
  • Like
Reactions: Morphine1

Morphine1

Senior Member
Sep 23, 2014
490
671
Andalusia.
If it works after adb shell command and after restart goes to have problems, the only solution I know is to install it with TWRP in this location: \system\system\priv-app\MtkSystemUI
Why this location? Because this location is only accessible from TWRP recovery.
Example:
The accessible location from any root explorer is:
\system\priv-app\MtkSystemUI
The accessible location from TWRP is:
\system\system\priv-app\MtkSystemUI
It seems to be the same, but isn't.
However, Try to find out if exists another way to access this location: \system\system\priv-app\MtkSystemUI
Because the only way I know to access that location, is from TWRP.

I'm gonna go work on this again now.

Question sir, your serial number was affected?
My current serial number is 0123456789ABCDEF
IMEI numbers are fine. just the serial number is a generic one.

Perhaps trying to fix the serial number would help to make this annoying red watermark vanish.

So is your Serial Number ok??
 

Morphine1

Senior Member
Sep 23, 2014
490
671
Andalusia.
Progress: I have managed to insert the correct IMEI and S/N (used S/N Writer tool)

However, the annoying red water mark is still there! I can't believe this, MTK so ****ty

So the final solution would be to cheat on the MTKsystemui apk, that's the only possible way?

Alright @IosifMihaescu you said TWRP can flash in system/system/priv-app, but I have already said there's no twrp for the blackview max1

however, I found a twrp in youtube for this device a couple dys ago, the guy uploaded it to mediafire, here
this twrp can boot but it cannot mount anything, so it's like not having twrp in the end.

I have been looking for ways to flash without twrp, found flash gordon here in xda, made a flashable zip with the mtksystemui apk, but didn't work for now either.

I guess my next step is finding someone to fix the twrp i found on youtube, and handle a working TWRP so that I can use the file manager.

Really, what a nightmare.
 
Last edited:

IosifMihaescu

Member
May 14, 2020
25
10
Progress: I have managed to insert the correct IMEI and S/N (used S/N Writer tool)

However, the annoying red water mark is still there! I can't believe this, MTK so ****ty

So the final solution would be to cheat on the MTKsystemui apk, that's the only possible way?

Alright @IosifMihaescu you said TWRP can flash in system/system/priv-app, however I have already said there's no twrp for the blackview max1

I found a twrp in youtube for this device, the guy uploaded it to mediafire, here
this twrp can boot but it cannot mount anything, so it's like not having twrp in the end.

I have been looking for ways to flash without twrp, found flash gordon here in xda, made a flashable zip with the mtksystemui apk, but didn't work for now either.

I guess my next step is finding someone to fix the twrp i found on youtube, and handle a working TWRP so that I can use the file manager.

Really, what a nightmare.
Really sorry, I don't know how else to help you, sorry.
 
G

GERLANCUBOTX19S

Guest
IosifMihaescu, Could you tell me what changes do you do to the original mtksystemui apk to get rid from the red watermark? or modify for me for CUBOT X19s?
 

hideungareng

New member
Jun 6, 2021
2
0
Bandung Barat
please help me... i have china mobile after flashing complete always come red text googlekey/teekey fail and cant make phone call or download apps on plastore try delete via adb no app called factorymode or watermark :( how to solved this problem guys 🙏
 

Attachments

  • IMG_20210601_022757.png
    IMG_20210601_022757.png
    8.1 MB · Views: 11
Last edited:

flairepathos.info

Senior Member
Dec 8, 2018
148
20
South Africa
I have the same issue!
The issue appear after formatting and flashing a non backuped ROM, because the TEE (Trusted Execution Environment) key it's not written or it's not the phone's original.
The red sentence (TEE key not write Google key not write) it is positioned in the system app: com.android.systemui
However, I read online that "maybe" could be solved with SN Write Tool (google it), I have not yet been able to try it for various reasons.
If by chance I solve it, I will tell you!
But for now nothing.
Hi Doogee N20 google key tee key not wite, Doogee Y9 plus google key not write fix
so check out this website and create account to access files
There is a tool called sn writer, it will fix the google attestation key for you (just look on youtube for how to use sn writer)
Its in the doogee y9 plus software folder

else install a custom gsi rom like pixel experience 10 gsi arm64 AB , it will also fix the annoying red writing

(I dont have screenshots because I logged in from PC)
 

SamuraiR3apr

New member
Mar 27, 2023
1
0
I solved the "TEE key not write, Google key not write" issue!
Now I tell you how to solve the issue 100%:
IMPORTANT FOLLOW STEP BY STEP IF YOU DON'T WANT TO HAVE PROBLEMS! ONLY FOR DOOGEE N20!
Make a backup of System and Userdata partition first for precaution!
Requirements:
- The phone must be rooted
- TWRP Recovery (Optional)
- Root File Manager (e.g. Es File Manager)
- A PC with adb installed
- The modded APK that you will find in the attachments
Method:
- Enter the root file manager and navigate to \system\priv-app\MtkSystemUI
- Rename the apk that you will find inside the folder from "MtkSystemUI.apk" to "MtkSystemUI.apk.bck"
- Copy the modded APK and insert it in the \system\priv-app\MtkSystemUI folder
- Enter the PC and run this adb command
(Tips: when entering adb shell right click to paste, "ctrl+v" not work in adb shell. When you run the "su" command you will be asked to provide root access to the adb shell on your phone)

adb shell
su
pkill -TERM -f com.android.systemui; am startservice --user 0 -n com.android.systemui/.SystemUIService

IF you restart the phone and "TEE key not write......" reappears, follow these steps:
- IMPORTANT! Copy the modified apk to the SD card in case of encrypted userdata!
- Restart the phone in recovery mode
- Entered TWRP recovery tap on Advanced and tap on File Manager
- Once in the file manager navigate to \external_sd and look for the folder where you put it; Eg \external_sd\Download (Only if you have inserted the modified apk in the SD card).
- Tap on the modified apk and then tap on "Copy File"
- Now navigate to \system\system\priv-app\MtkSystemUI and tap on the button at the bottom right.
- Restart normally
- Enjoy!:good:
Hi. I have a question.

Once I've completed the process then it's sorted.

If I flash the firm in download mode only as per normal and not format all, would watermark return?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    After trying to root this smartphone, it ended up corrupting some system files. I reinstalled stock rom and this message showed up: TEE key not write, Google key not write:

    Screenshot-20200323-181357.png


    Using Google i ended up at this thread here in xda:

    https://forum.xda-developers.com/general/help/ulefone-power-3s-problem-t3794521

    But this method about using adb platform tools didn't worked for me. There's no Factory Mode even when listing all the packages installed. Is there any other recommendation of what i should do? This is actually very annoying? Thanks.

    Listed packages:
    ecc...

    I solved the "TEE key not write, Google key not write" issue!
    Now I tell you how to solve the issue 100%:
    IMPORTANT FOLLOW STEP BY STEP IF YOU DON'T WANT TO HAVE PROBLEMS! ONLY FOR DOOGEE N20!
    Make a backup of System and Userdata partition first for precaution!
    Requirements:
    - The phone must be rooted
    - TWRP Recovery (Optional)
    - Root File Manager (e.g. Es File Manager)
    - A PC with adb installed
    - The modded APK that you will find in the attachments
    Method:
    - Enter the root file manager and navigate to \system\priv-app\MtkSystemUI
    - Rename the apk that you will find inside the folder from "MtkSystemUI.apk" to "MtkSystemUI.apk.bck"
    - Copy the modded APK and insert it in the \system\priv-app\MtkSystemUI folder
    - Enter the PC and run this adb command
    (Tips: when entering adb shell right click to paste, "ctrl+v" not work in adb shell. When you run the "su" command you will be asked to provide root access to the adb shell on your phone)

    adb shell
    su
    pkill -TERM -f com.android.systemui; am startservice --user 0 -n com.android.systemui/.SystemUIService

    IF you restart the phone and "TEE key not write......" reappears, follow these steps:
    - IMPORTANT! Copy the modified apk to the SD card in case of encrypted userdata!
    - Restart the phone in recovery mode
    - Entered TWRP recovery tap on Advanced and tap on File Manager
    - Once in the file manager navigate to \external_sd and look for the folder where you put it; Eg \external_sd\Download (Only if you have inserted the modified apk in the SD card).
    - Tap on the modified apk and then tap on "Copy File"
    - Now navigate to \system\system\priv-app\MtkSystemUI and tap on the button at the bottom right.
    - Restart normally
    - Enjoy!:good:
    1
    I have the same issue!
    The issue appear after formatting and flashing a non backuped ROM, because the TEE (Trusted Execution Environment) key it's not written or it's not the phone's original.
    The red sentence (TEE key not write Google key not write) it is positioned in the system app: com.android.systemui
    However, I read online that "maybe" could be solved with SN Write Tool (google it), I have not yet been able to try it for various reasons.
    If by chance I solve it, I will tell you!
    But for now nothing.
    1
    I did that, and the internal memory it's encrypted. After that i used a pen drive through the usb otg, but there was a error message when i tried to copy the file to the system partition. Do you want me to share a photo of the error message?

    Since you know a lot about this device, do you know if it's possible to set the selinux policy to permissive definitely? I need to set it everytime i reboot by using the terminal command.
    Install this app: https://drive.google.com/file/d/16MvDOlGNZ3v3yNMoeYyAGGE3WjcruHQC/view?usp=drivesdk
    This app sets selinux to permissive automatically at boot.
    1
    Hello sir. I have a blackview max 1 with this red message. I assume I cannot use the same systemui apk... I have rooted it and need to get rid from this message. Could you help? I replaced the apk and the system got the navbar removed, the message was gone, but no navigation buttons and no qs tile notification pulldown panel either.

    Any solution? Thanks

    Yes, the SystemUI mod apk given in this thread is only for Doogee N20.
    However, If you send me your phone's original SystemUI apk, I can try to mod it.
    Just send me your Blackview Max 1 SystemUI.
    1
    Thank you so much. I'm uploading it right now. Attached file

    I saw about using SN Write Tool , Here and Here
    but to be honest that would be a bit of a headache.

    Hopefully I can get rid of this text by just replacing your modded systemui for the Blackview Max 1.

    Can you try to reupload it with https://wetransfer.com/upload
    Because when I try to download it from the attached files, it gives me an Error 404.