Hovatek Forum MOBILE Android [Tutorial] How to use MTK Client to back up Mediatek firmware
Try our Online TWRP Builder..its free!
Can't login? Please, reset your password.


[Tutorial] How to use MTK Client to back up Mediatek firmware

[Tutorial] How to use MTK Client to back up Mediatek firmware

Pages (5): 1 2 3 4 5 Next
hovatek
hovatek
hovatek
Administrator
49,570
18-11-2021, 01:11 PM
#1



This guide will explain how to back up or dump a Mediatek Android device's firmware using MTK Client. This will come in very handy for those with secure boot

Requirements


Steps to backup Mediatek firmware using mtkclient


Follow the steps below to dump a Mediatek device's firmware using mtkclient



  1. Open the mtkclient folder, right-click the address bar at the top and copy the address

    [Image: How-to-unlock-Mediatek-bootloader-using-...ent-1.webp]

  2. Launch the Command prompt and type cd <space> then paste the address you copied and tap enter

    [Image: How-to-unlock-Mediatek-bootloader-using-...ent-2.webp]

  3. You're set to run commands

    [Image: How-to-unlock-Mediatek-bootloader-using-...ent-3.webp]

  4. Run the following commands

    Code:

    python setup.py install
    pip3 install -r requirements.txt

    If you get a Python error then try

    Code:

    py -3 setup.py install
    py -3 -m pip install -r requirements.txt

  5. To backup the boot and vbmeta partitions for example, you run the command below then connect the device in BROM mode

    Code:

    python mtk r boot,vbmeta boot.img,vbmeta.img

    or

    Code:

    py -3 mtk r boot,vbmeta boot.img,vbmeta.img

  6. To backup a single partition -say boot -, the command would be

    Code:

    python mtk r boot boot.img

    or

    Code:

    py -3 mtk r boot boot.img

  7. To do a full backup to a folder called out, the command would be

    Code:

    python mtk rl out

    or

    Code:

    py -3 mtk rl out

  8. You should see the dumped file(s) once MTK client is done


Important Notice
  • You might find mtk client as quite slow with doing full dumps or dumping large partitions. You could instead just use it to disable security using the command

    Code:

    python mtk payload

    or

    Code:

    py -3 mtk payload

    Once this is successful, leave the device connected then proceed with backing up with WWR v2.51

  • The partition names might be different for A/B devices i.e with _a or _b suffix
  • If you get '[LIB]: ←[31mError on sending emi: unpack requires a buffer of 12 bytes←[0m' then delete mtkclient/Loader/MTK_AllInOne_DA_5.1824.bin
  • If you encounter 'pip3' is not recognized as an internal command or external, an operable program or a batch file. then try
    Code:

    py -3 -m pip install -r requirements.txt
  • You can also use MTK Client GUI by running
    Code:

    python mtk_gui

    or

    Code:

    py -3 mtk_gui


Video Transcript
Quote:In this video tutorial, I'll be explaining how to back up or dump the firmware of your Mediatek Android device using MTK Client. This procedure doesn't require (an unlocked) bootloader. Locked or unlocked, this procedure is going to work just fine. Now first, you need to download MTK client, you need to have installed your Mediatek USB drivers, you need to install Python and make sure you tick add to path when installing Python and you also need to install USBDK. I'll link to all these in the description.

Now, once you have these in place, you open the MTK client folder then you right-click and then click copy address. Now you launch your command prompt and then you cd to the location of your mtkclient. Now the first thing you do is to install requirements. If you've already done this, you can skip this part. So copy this, make sure you have an internet connection. After that, you run this. So now, I'm going to be backing up. These are the formats I'll be using. Now, to backup, I'm backing up the boot image first. This is the command I'm using. When you're backing up just one partition, you need the partition name and the file you intend to save it as. I'm backing up the boot partition and I want to save the file as boot.img.

This is the command I'll be running. So you paste this here and you tap Enter. Now, you need to power off and boot the device into BROM mode. It might vary with the model and then connect it to the PC. So now you check the... I have a connection so I'm going to backup now. I'll have to re-run the command. I'll have to disconnect. I had an interruption there. OK, the problem is from my command. I have a and b here so what I should backup is boot_a. I'll locate it on the list here. Am I skipping it? Here, boot_a. My partition name is actually boot_a. This is because my device is A/B, I forgot to add that. So this is the actual command I'm supposed to run because my device is A/B but if yours is A only, you just run the regular boot to be your partition name so you go again.

Alright, so that worked. So I have my boot image here. Here you can see the list of partitions which the tool can detect alright, so any partition you want to backup needs to be from this list. So if I want to do vbmeta for example, I'll go vbmeta_a because a is my active slot OK? You can backup all whether A or B whatever you want to backup. I will just stick with A. So let's say I want to backup two partitions for example or multiple ones, the command is simple. This command is what we'll be running. Mine is AB so I'll modify this. boot_a then you leave a space then this will be the output file name which you want OK? So python mtk r the partitions separated by commas.

Don't forget mine is A/B, that's why I have _a. If yours isn't AB, you skip this _ active slot or whatever slot you want to back. and then space file names separated by commas. Don't forget they need to be respective; boot_a before vbmeta_a boot before vbmeta don't forget, don't make that mistake of mixing them up. So I'm good to run this command. I'll scroll back to where I stopped. So, now I want to back up two partitions. I think I can delete this to avoid any issues. Now BROM mode and I connect. I'm using an LG K51 so my brom mode is my Google home key and volume down button. It could vary with devices of course. Alright, so I have my vbmeta and boot backed up. So that's how to backup or dump the firmware of your Mediatek Android device using MTK client
This post was last modified: 05-11-2023, 08:31 AM by hovatek.

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.
Damien052
Damien052
Damien052
Junior Member
30
25-11-2021, 03:30 AM
#2
This method works perfectly for me. But what should I do if my phone does not have vbmeta. Does vbmeta = metadata ?
My phone is an Tecno pouvoir 3 (lb7)

Main - boot_para
Main - recovery
Main - para
Main - tranfs
Main - tkv
Main - expdb
Main - frp
Main - nvcfg
Main - nvdata
Main - metadata
Main - protect1
Main - protect2
Main - seccfg
Main - persist
Main - sec1
Main - proinfo
Main - md1img
Main - md1dsp
Main - spmfw
Main - mcupmfw
Main - gz1
Main - gz2
Main - nvram
Main - lk
Main - lk2
Main - loader_ext1
Main - loader_ext2
Main - boot
Main - logo
Main - odmdtbo
Main - tee1
Main - tee2
Main - vendor
Main - system
Main - cache
Main - userdata
Main - flashinfo
This post was last modified: 25-11-2021, 03:36 AM by Damien052.
hovatek
hovatek
hovatek
Administrator
49,570
25-11-2021, 10:34 AM
#3
(25-11-2021, 03:30 AM)Damien052 This method works perfectly for me. But what should I do if my phone does not have vbmeta. Does vbmeta = metadata ?
My phone is an Tecno pouvoir 3 (lb7)

Your model runs on Oreo so this is normal

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.
Timmylog
Timmylog
Timmylog
Experienced Member
88
25-11-2021, 11:36 AM
#4
(25-11-2021, 03:30 AM)Damien052 This method works perfectly for me. But what should I do if my phone does not have vbmeta. Does vbmeta = metadata ?
My phone is an Tecno pouvoir 3 (lb7)

Main - boot_para
Main - recovery
Main - para
Main - tranfs
Main - tkv
Main - expdb
Main - frp
Main - nvcfg
Main - nvdata
Main - metadata
Main - protect1
Main - protect2
Main - seccfg
Main - persist
Main - sec1
Main - proinfo
Main - md1img
Main - md1dsp
Main - spmfw
Main - mcupmfw
Main - gz1
Main - gz2
Main - nvram
Main - lk
Main - lk2
Main - loader_ext1
Main - loader_ext2
Main - boot
Main - logo
Main - odmdtbo
Main - tee1
Main - tee2
Main - vendor
Main - system
Main - cache
Main - userdata
Main - flashinfo

You're using Android 8 so vbmeta partition doesn't exist. It's from Android 9 and up that it does exist.
Although you should patch your boot image with magisk if you intend to flash any custom images. i.e, twrp, GSI, etc :-)
Damien052
Damien052
Damien052
Junior Member
30
25-11-2021, 04:35 PM
#5



Ok. I understand now. Thank you !
wesside89048
wesside89048
wesside89048
Junior Member
19
02-12-2021, 11:51 PM
#6
i was wanting to ask,you said in this post you were working on k-51,which button would be the google home button??i am sorry to bother,but brom on this k-51 has been eluding me,t.yfor your time
hovatek
hovatek
hovatek
Administrator
49,570
03-12-2021, 12:09 PM
#7
(02-12-2021, 11:51 PM)wesside89048 i was wanting to ask,you said in this post you were working on k-51,which button would be the google home button??i am sorry to bother,but brom on this k-51 has been eluding me,t.yfor your time

There are 3 buttons on the left, from the top to button is Volume increase , Volume decrease, Google Home

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.
abdulmataz
abdulmataz
abdulmataz
Newbie
1
15-12-2021, 09:42 PM
#8
(03-12-2021, 12:09 PM)hovatek
(02-12-2021, 11:51 PM)wesside89048 i was wanting to ask,you said in this post you were working on k-51,which button would be the google home button??i am sorry to bother,but brom on this k-51 has been eluding me,t.yfor your time

There are 3 buttons on the left, from the top to button is Volume increase , Volume decrease, Google Home
Pls what is the brom mode for gionee M7L
dpol
dpol
dpol
Senior Member
187
20-03-2022, 06:45 PM
#9
Hi, Hovatek, sir,

This actually worked on Tecno Pova 2 (A/B device). But, I have two questions on this.

1. Please, how can I make the full backup command "python mtk rl out" backup the firmware in .img format instead of .bin and including the scatter file and preloader (in order to make it SP Flash Tool friendly....img, scatter file).
2. Is there a way to exclude Userdata from the backup?

Thank you.
This post was last modified: 20-03-2022, 06:56 PM by dpol.
dpol
dpol
dpol
Senior Member
187
20-03-2022, 10:21 PM
#10



(20-03-2022, 06:45 PM)dpol Hi, Hovatek, sir,

This actually worked on Tecno Pova 2 (A/B device). But, I have two questions on this.

1. Please, how can I make the full backup command "python mtk rl out" backup the firmware in .img format instead of .bin and including the scatter file and preloader (in order to make it SP Flash Tool friendly....img, scatter file).
2. Is there a way to exclude Userdata from the backup?

Thank you.

Found solution to this. 

1a. I used the same procedure described above for backing up two partitions (I backed up 18 partitions). I indicated the backup extension to be .img for the partitions.
1b. So, to make the dumped firmware SP Flash Tool friendly, I copied the scatter and preloader files from a stock firmware (old version) I got before; then, did the checksum and that's it. But, I'd rather just pass "python mtk w ..." command to flash it instead. Big Grin One would save themselves a lot of SP Flash trouble with that.

2. I did not add userdata partition to the line of command. And that solved that.


Thank you.
Pages (5): 1 2 3 4 5 Next
Users browsing this thread:
 2 Guest(s)
Users browsing this thread:
 2 Guest(s)
YtWhTl
live chat
whatsapp telegram instagram