[GUIDE] Beginner's guide - first steps with a MTK phone

Status
Not open for further replies.
Search This thread

bluefirebird

Senior Member
Mar 23, 2013
1,027
5,037
carliv.eu
DISCLAIMER:
Rooting your phone and using custom Recoveries and ROMS have risks and may result in bricking your device, and has nothing to do with Google or the device manufacturers. In case of any mishap I am not responsible if you brick/ruin your phone in any way.
Basic computer skills are required and minimal knowledges about phones and phones utilities too.
Make sure that whatever you do, you are doing it at your own responsibility.


This guide may be obsolete now for the new MTK SOC's powered phones, but it will give you some ideeas about how MTK phones world works (especially if you are new to this).

Why this thread?
- Because of all those PMs I receive with questions about how to do this or how to do that.
These things aren't they covered here on XDA?
- Some of them are, some don't, or they are spread over the forum in different sections, different threads. Also I will present here my vision about how to do things, and in some parts is different than the others existent.

I tried to document all steps with images for a better understanding, and to make it easy for people who don't understand well English (also I don't claim that my English is very good, but I'm trying).

1. If you want to use your phone as you buy it, then this thread is not for you, but if you want to use a custom recovery, to install a custom ROM, or some modds, keep reading.

2. First big step in our journey is to root your phone, which most of you know that means to get root (administrator) access to your phone's OS - just a simple definition. With an unrooted phone, you can't do much, and that means you will use it pretty much as you buy it - see first point.
There are multiple methods to root your phone, through an application from your phone, with an executable software from your PC or by flashing a zip modd from recovery (only for custom recoveries).
A. The best rooting application at the moment (in my opinion), is Framaroot.apk, developed by alephzain - please stop by his thread and drop a thanks, or if you can buy his donnation app from Playstore to support his work. You can download this app from official thread.
B. For rooting with a software from PC, I know three big candidates: oneclickroot, kingoroot and srsroot. I know there are more, but I mentioned only the best known.
C. Rooting zip archives are two, to choose from: chainfire's and koush's. Although, these require to have a custom recovery installed.

Any method you choose, be sure to check the phone models reported to work for, and look for your model.

Next, I will present step by step what I call "the beginner's routine":
  • root the phone;
  • make a nvram backup;
  • make a stock ROM backup;
  • generate a custom CWM and flash it;
  • patch to unsecure the boot and flash it;
  • get a Root File explorer;
  • create a custom recovery by porting one.

Prerequisites:
  • you must have an account on XDA; if you don't, then create one - and remember, at beginning you will not be allowed to post but you can hit Thanks for people I will mention here.
  • use a computer with Windows XP or 7 (I don't know if it will be any problem in vista or windows 8, but I didn't tried them, so I can't tell).
  • a phone with MTK CPU, obviously!
  • these tools:
    • MTKDroidTools of rua1's - download it from his thread and hit Thanks or donate to him, please
    • SPFlashTools or MTKFlashTools.
    • MTK USB Drivers and your phone manufacturer's USB Drivers if they provide that.
      For MTK USB Drivers, there are many sources, but I couldn't find any official source. Few known sources: here and here.
      * ADDED: For windows 7 and xp I repacked all MTK needed drivers, bundled with latest google usb drivers and using windows driver installer. Some of the drivers are not digitally signed, so when the prompt window ask you if you want to install unsigned driver (it will be several times) select yes or ok. The advantage is that this method is easier than manual method and also will create an entry in installed programs, and later if you want you can uninstall them in control panel uninstall program. Before installing this you need to remove old drivers installations - use usbdeview (download it x86 or X64), and look for VendorId 0bb4 and 0e8d, and uninstall every device with these Ids. Packed drivers are attached to this post; take what corresponds to your windows version. Unpack the archive, open the folder and run dpinst.exe. More info inside: read info.txt (especially for XP).
    • Install all needed drivers.
    • A good text editor (Notepad++ or Geany) installed.
    • Adb installed in your computer from Android: here, here and here you can learn how.

Credits and Thanks:
@alephzain - Framaroot developer
@rua1 - developer of MTKDroidTools
@Chainfire - SuperSU developer
@Koush - so many things!!!
@michfood - developer of Boot Recovery pack/unpack tool
and, even if it is not presented here, but because I use a lot his tools in Linux:
@bgcngm - for his Unpack/Repack scripts
 
Last edited:

bluefirebird

Senior Member
Mar 23, 2013
1,027
5,037
carliv.eu
1. Root the phone.

For this step I choose to use Framaroot.apk, first because I don't like to install unnecessary software on my computer, and second because it supports a very large number of MTK phones. So, go to alephzain's thread and download the apk, then connect your phone to PC with USB debugging enabled, turn on USB Mass storage and copy Framaroot.apk to your sdcard root, or in internal storage if you don't have a sdcard in your phone. Eject phone's USB storages from PC, and turn off USB Mass storage from phone.

uc


Go to apps drawer, find File Manager, open it, navigate to location where you placed Framaroot.apk touch on it and install it. After that go back in apps drawer and open the newly appeared Framaroot. In that window you have to specify which exploit to use for getting root access. If you don't know it's not a problem, you can try each one until you see the Success message (for me was Barahir). If none of them works, then you have to find a different method to root. After success patching, reboot the phone and then you will see SuperSU.apk in your apps drawer. Now you have root access!

uc




2. Install a Root Explorer.

I prefer ESFileManager, but you can choose what you like. This can be installed free from Playstore, or if you have it downloaded in your PC, use same steps as in Framaroot case, and install it.
Then open the app and let's activate the Root Explorer in it.
But, here you can choose a different view style instead of default big icons - I like Medium Icon view.

uc


Touch on Globe symbol from upper left corner to open Advanced Tools menu, and select Tools (last one). In the list that opens, scroll down until you see Root Explorer entry and touch "OFF" button to activate it. You will be prompted to Grant Superuser access - Grant it! Then, touch on "Root Explorer" text and in the popup window select Read/Write, and in next window select all radios from RW column.
That's it, ESFileManager is now a powerfull Root Explorer.

uc


uc
 
Last edited:

bluefirebird

Senior Member
Mar 23, 2013
1,027
5,037
carliv.eu
3. Make a backup.

This means actually make two backups, one for nvram and one for the whole stock ROM. Why to make a backup for nvram? Because it is very easy in MTK phones to mess up with it, and you may loose IMEI, mac address or to have other connectivity issues. This backup will be your insurance.

For this you need MTKDroidTools. Download it from rua1's thread (link in OP) and unzip it in a folder named "MTKDroidTools" on your primary (system) partition - this is important, and in other locations you may experience errors and malfunction.
Connect your phone in usb debugging mode to PC, then start MTKDroidTools as administrator and wait untill you see that MTKDroidTools recognize it and loads its data. The following pictures will show you how to check if you have usb debugging activated, and how MTKDroidTools looks with loaded phone data. In most of the phones, adb gets root access immediately, but in some "branded" ones that has to be achieved by click on the "ROOT" button next to "Adb Terminal" - Notice that if you don't see that ROOT button, that means you have already "root in shell". Also, if you have chainfire's SuperSU you will be prompted in the phone to grant root access to adbd, but if you have koush's Superuser, adbd gets root access by default.

uc


Now, as I said first thing is to do a nvram backup. Click on "IMEI/NVRAM" button and next select both methods (bin and zip folder) and click on "Backup".
After that, it's time to do a stock ROM backup. This is important if you are going to try different custom ROMs and modds. This will assure you that you always have a way to start from the beginning in a clean state. Also makes easy to unbrick your phone if you have the misfortune to brick it.

uc


Click on "root,backup,recovery" tab, and click on "Backup" button, then wait to finish. Be patient, this will take a while, and you can see progress logs in side window. At the end, a popup will prompt you to pack the backup. Now you know it is finished. I don't pack these backups, but you do what you think.

uc


In this stage first thing I do is to generate a scatter file. You have one in that backup made before, or you can get one from stock firmware archive if the phone's manufacturer provide that, but let's see how to do it as it is, to understand the process, or to learn how to get one if we loose it or we are unsure if the one we have is good for our phone (this is important, because using a wrong scatter file it may damage your phone).
So, return to "Phone Informations" tab and click on "Blocks Map" button. A window opens with your phone partition structure. Click on "Create Scatter File" button and save it somewhere in your computer.

uc


Mission complete for backup; you are assured now.
 
Last edited:

bluefirebird

Senior Member
Mar 23, 2013
1,027
5,037
carliv.eu
4. Generate a custom recovery.

This is mandatory if you want to use an easy way to backup, restore, flash or wipe ROMs and modds. Fortunately, rua1 has included in his tool all you need to generate one for your phone. This method is successfull for almost every MTK phone, but not for all. There isn't an universal method for anything.
So, enter again in "root, backup, recovery", select the radio "To choose the boot.img file" - by default is selected "Install already prepared files" - and click on "Recovery and Boot" button.

uc


When prompted, select the boot.img from previous backup folder and click Yes to make CWM recovery automatically. First you will be prompted to flash a patched boot.img in your phone - click Yes to get an unsecured boot, then next message will ask you to install the new created recovery in your phone. Click Yes and Yes to reload the phone in recovery mode.

uc


The phone will shut down and reboot in recovery. Now you can see your custom recovery in place.

GOOD TO KNOW: you can't generate a recovery everytime you want to flash one, to use MTKDroidTools for flashing, and the adb method may not work for many MTK phones.
The most known method to flash a new recovery is by using SPFlashTools or MTKFlashTools, and an alternative method is with MobileUncle application from phone, but I will show detailed the FlashTools method. One thing though: if you want to use MobileUncle application, you have to use it from /system/app folder, not from /data/app. Many users say that the MobileUncle doesn't work to flash recovery: it show success, but rebooting to recovery reveal the old one. The reason? They installed MobileUncle from market, and that place the app in /data/app as a user app. In custom ROMs where the app is placed in system by ROM developer, the problem won't manifest. So, if you want to use MobileUncle, make it a system app not user app.

uc


In order to do that, grab a copy of any of these tools from DR_MOOSAVI's thread (link in OP), unzip it in a folder "MTK_Flash_tool" in your primary(system) partition (C in my case), and notice the name have to not contain any spaces or special characters. In that folder create a new folder "Resources" or ROM or whatever name you want, also without spaces or special characters, and place in it your scatter file and recovery img you want to flash. Open Flash_Tool executable as administrator.
IMPORTANT: Your phone is not connected to the PC now. Swtich it off and wait, you will connect it later.

Continue in next post.
 
Last edited:

bluefirebird

Senior Member
Mar 23, 2013
1,027
5,037
carliv.eu
In Flash_Tools program window click on load scatter file, navigate to that folder you created and select your scatter. Now you can see your phone's partition structure. If the recovery you want to flash is named "recovery.img" it will be selected automatically, if not you have to click on recovery row in Location column and select your recovery from that folder.

uc


uc


Then click on "Download" button.
Now connect your phone to PC, just like that in power off. Some models enter automatically in download mode and the flashing process begins, but others don't. For some it is necessary to connect them without battery (battery removed), other need to press briefly Power and Vol Down button at same time and release them immediately. That you have to find for your phone from forums, other users, or by trying. When the phone enter in download mode you will see a red bar down in Flash_Tool window, followed by a yellow or other color one (that means the flashing process is taking place).

uc


At the end a popup with a green circle or green checkmark will let you know that the flash was a success. Deconnect the cable and reboot the phone, or reboot it in recovery to see if the wanted recovery is installed. The most common method to boot in recovery from power off is to press Power and Vol UP at same time, and keep them pressed untill you see the logo, then release Power but keep pressing Vol Up untill the recovery UI appears. If Power and Vol Up doesn't work for you, start the phone normaly and connect the phone to PC, then open a command prompt window, and type " adb reboot recovery", then hit Enter during bootanimation. The phone will stop loading and will boot in recovery.

uc
 
Last edited:

Napst3r88

Senior Member
Feb 14, 2013
199
39
Alexandria
Thank you sir I will try to port cwm to my mtk mobile

Sent From MTK-MT6572

---------- Post added at 03:31 PM ---------- Previous post was at 03:01 PM ----------

Sir now my mobile with ext4
Now in your thread about porting carliv cwm.. there is only custpack and ubifs ...!! Where is for ext4

Sent From MTK-MT6572
 

bluefirebird

Senior Member
Mar 23, 2013
1,027
5,037
carliv.eu
  • Like
Reactions: tedyman and yuweng

iZLeeP

Senior Member
Jan 23, 2014
528
151
Manila
Great guide @carliv.

Just a bit confused, as I usually flash custom recovery first before rooting my MTK phones (same goes for all my android devices). So, maybe, rooting and flashing custom recovery is interchangeable as the first step for MTK phones depending on their availability.
 

bluefirebird

Senior Member
Mar 23, 2013
1,027
5,037
carliv.eu
Great guide @carliv.

Just a bit confused, as I usually flash custom recovery first before rooting my MTK phones (same goes for all my android devices). So, maybe, rooting and flashing custom recovery is interchangeable as the first step for MTK phones depending on their availability.

Yeah, well the next step in my guide is "do a stock ROM backup", and if you flash a custom recovery, that will not be a complete stock backup. With my method, any time, after flashing the stock backup, unroot and you will be in stock initial state.
I hope it's more clear now.
 
  • Like
Reactions: yuweng

iZLeeP

Senior Member
Jan 23, 2014
528
151
Manila
Yeah, well the next step in my guide is "do a stock ROM backup", and if you flash a custom recovery, that will not be a complete stock backup. With my method, any time, after flashing the stock backup, unroot and you will be in stock initial state.
I hope it's more clear now.

Got it. So this is more suited for those who do not have the original firmware for restoring their devices in case something goes wrong which is so like MTK phones. In any case, your guide is spot on. Hope the moderators would give this a sticky, if possible, since MTK phones are scattered all over xda.
 

rnovino

Senior Member
Nov 7, 2012
104
37
How to Port to Device that have recovery-from-boot.p

Hello Everyone, and hello to @carliv,

Thanks to this Tutorial I have Manage to port in on a MT6582 and MT6572 Device with ext4 partition, but I just want to share some tips when porting the latest build of the carliv the tutorial here is complete except for one thing just in case you are ending up on a custom recovery not booting up and when you use the MTK Droid Root and Tools you will see this

-->Connect Device<--
there is a file blah blah - recovery-from-boot.p <----


8eqcxwQ.png


Now that mess up the things but before we dig into that let me first share on how I got my Carliv Custom Recovery to Bootup

on the Tutorial there is a section that you need to use the MTK Unpacked tool right now once you have done that do all the other things that is written in the tutorial it will guide you on the whole process but on my end even though I followed the tutorial and all are correct I still end up on a Bootloop well I discovered that you need to copy the init file from the RUA1 CWMR that you got from the MTK Droid Root and Tools and overwrite the one on the Carliv Recovery after that once you have finish until on the Overwriting of the Kernel and Kernel header pack your Carliv Recovery using the MTK pack tool and now Flash it on your Device it will now boot :highfive:

BUT WAIT!! yes! it will boot but it will boot on the STOCK RECOVERY and that is because like what I said the recovery-from-boot.p is the culprit of the issue now you need to root your device which is on my end I used framaroot and then download the ES file manager and also follow the instruction of carliv on how to have the full ROOT R/W access and on your device, once your have done that got to this folders and delete this 3 files.

Be sure you have the R/W access or else this files will not be deleted :(

/system/recovery-from-boot.p
/system/etc/recovery-install.sh
/system/etc/recovery-resources.bin <--- I am not just sure if this is the right filename but it is almost the same will check it once again once I got to stock rom again :fingers-crossed:

and now once you have rebooted your smartphone to recovery mode it will now boot to the Carliv Custom Recovery.

But also take note that if you don't have that 3 files on your device your just good to go and it will boot to Carliv Custom Recovery without any issues.

it's just that 3 files makes the custom recovery always boot to stock recovery even though you do something else

hope this tip helps for some people having issue on a bootloop carliv custom recovery on doing the manual porting ;)

and don't forget to hit the thanks button if this helps :victory:
 
Last edited:

iZLeeP

Senior Member
Jan 23, 2014
528
151
Manila
/system/recovery-from-boot.p
/system/etc/recovery-install.sh
/system/etc/recovery-resources.bin <--- I am not just sure if this is the right filename but it is almost the same will check it once again once I got to stock rom again :fingers-crossed:

Removing recovery-from-boot.p is enough, I think. Besides, CTR asks if you want to disable recovery-install.sh. That prevents the ROM from flashing stock recovery.
 

rnovino

Senior Member
Nov 7, 2012
104
37
Removing recovery-from-boot.p is enough, I think. Besides, CTR asks if you want to disable recovery-install.sh. That prevents the ROM from flashing stock recovery.

it depends on the unit, I just deleted the recovery-from-boot.p and still it boots up on the stock recovery that's why I needed to trace other files that still makes it boot on stock recovery, but then again not all units will have the same issues as mine ;)
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 99
    DISCLAIMER:
    Rooting your phone and using custom Recoveries and ROMS have risks and may result in bricking your device, and has nothing to do with Google or the device manufacturers. In case of any mishap I am not responsible if you brick/ruin your phone in any way.
    Basic computer skills are required and minimal knowledges about phones and phones utilities too.
    Make sure that whatever you do, you are doing it at your own responsibility.


    This guide may be obsolete now for the new MTK SOC's powered phones, but it will give you some ideeas about how MTK phones world works (especially if you are new to this).

    Why this thread?
    - Because of all those PMs I receive with questions about how to do this or how to do that.
    These things aren't they covered here on XDA?
    - Some of them are, some don't, or they are spread over the forum in different sections, different threads. Also I will present here my vision about how to do things, and in some parts is different than the others existent.

    I tried to document all steps with images for a better understanding, and to make it easy for people who don't understand well English (also I don't claim that my English is very good, but I'm trying).

    1. If you want to use your phone as you buy it, then this thread is not for you, but if you want to use a custom recovery, to install a custom ROM, or some modds, keep reading.

    2. First big step in our journey is to root your phone, which most of you know that means to get root (administrator) access to your phone's OS - just a simple definition. With an unrooted phone, you can't do much, and that means you will use it pretty much as you buy it - see first point.
    There are multiple methods to root your phone, through an application from your phone, with an executable software from your PC or by flashing a zip modd from recovery (only for custom recoveries).
    A. The best rooting application at the moment (in my opinion), is Framaroot.apk, developed by alephzain - please stop by his thread and drop a thanks, or if you can buy his donnation app from Playstore to support his work. You can download this app from official thread.
    B. For rooting with a software from PC, I know three big candidates: oneclickroot, kingoroot and srsroot. I know there are more, but I mentioned only the best known.
    C. Rooting zip archives are two, to choose from: chainfire's and koush's. Although, these require to have a custom recovery installed.

    Any method you choose, be sure to check the phone models reported to work for, and look for your model.

    Next, I will present step by step what I call "the beginner's routine":
    • root the phone;
    • make a nvram backup;
    • make a stock ROM backup;
    • generate a custom CWM and flash it;
    • patch to unsecure the boot and flash it;
    • get a Root File explorer;
    • create a custom recovery by porting one.

    Prerequisites:
    • you must have an account on XDA; if you don't, then create one - and remember, at beginning you will not be allowed to post but you can hit Thanks for people I will mention here.
    • use a computer with Windows XP or 7 (I don't know if it will be any problem in vista or windows 8, but I didn't tried them, so I can't tell).
    • a phone with MTK CPU, obviously!
    • these tools:
      • MTKDroidTools of rua1's - download it from his thread and hit Thanks or donate to him, please
      • SPFlashTools or MTKFlashTools.
      • MTK USB Drivers and your phone manufacturer's USB Drivers if they provide that.
        For MTK USB Drivers, there are many sources, but I couldn't find any official source. Few known sources: here and here.
        * ADDED: For windows 7 and xp I repacked all MTK needed drivers, bundled with latest google usb drivers and using windows driver installer. Some of the drivers are not digitally signed, so when the prompt window ask you if you want to install unsigned driver (it will be several times) select yes or ok. The advantage is that this method is easier than manual method and also will create an entry in installed programs, and later if you want you can uninstall them in control panel uninstall program. Before installing this you need to remove old drivers installations - use usbdeview (download it x86 or X64), and look for VendorId 0bb4 and 0e8d, and uninstall every device with these Ids. Packed drivers are attached to this post; take what corresponds to your windows version. Unpack the archive, open the folder and run dpinst.exe. More info inside: read info.txt (especially for XP).
      • Install all needed drivers.
      • A good text editor (Notepad++ or Geany) installed.
      • Adb installed in your computer from Android: here, here and here you can learn how.

    Credits and Thanks:
    @alephzain - Framaroot developer
    @rua1 - developer of MTKDroidTools
    @Chainfire - SuperSU developer
    @Koush - so many things!!!
    @michfood - developer of Boot Recovery pack/unpack tool
    and, even if it is not presented here, but because I use a lot his tools in Linux:
    @bgcngm - for his Unpack/Repack scripts
    44
    1. Root the phone.

    For this step I choose to use Framaroot.apk, first because I don't like to install unnecessary software on my computer, and second because it supports a very large number of MTK phones. So, go to alephzain's thread and download the apk, then connect your phone to PC with USB debugging enabled, turn on USB Mass storage and copy Framaroot.apk to your sdcard root, or in internal storage if you don't have a sdcard in your phone. Eject phone's USB storages from PC, and turn off USB Mass storage from phone.

    uc


    Go to apps drawer, find File Manager, open it, navigate to location where you placed Framaroot.apk touch on it and install it. After that go back in apps drawer and open the newly appeared Framaroot. In that window you have to specify which exploit to use for getting root access. If you don't know it's not a problem, you can try each one until you see the Success message (for me was Barahir). If none of them works, then you have to find a different method to root. After success patching, reboot the phone and then you will see SuperSU.apk in your apps drawer. Now you have root access!

    uc




    2. Install a Root Explorer.

    I prefer ESFileManager, but you can choose what you like. This can be installed free from Playstore, or if you have it downloaded in your PC, use same steps as in Framaroot case, and install it.
    Then open the app and let's activate the Root Explorer in it.
    But, here you can choose a different view style instead of default big icons - I like Medium Icon view.

    uc


    Touch on Globe symbol from upper left corner to open Advanced Tools menu, and select Tools (last one). In the list that opens, scroll down until you see Root Explorer entry and touch "OFF" button to activate it. You will be prompted to Grant Superuser access - Grant it! Then, touch on "Root Explorer" text and in the popup window select Read/Write, and in next window select all radios from RW column.
    That's it, ESFileManager is now a powerfull Root Explorer.

    uc


    uc
    44
    5. How to port a custom recovery.

    Check my new guide.
    42
    4. Generate a custom recovery.

    This is mandatory if you want to use an easy way to backup, restore, flash or wipe ROMs and modds. Fortunately, rua1 has included in his tool all you need to generate one for your phone. This method is successfull for almost every MTK phone, but not for all. There isn't an universal method for anything.
    So, enter again in "root, backup, recovery", select the radio "To choose the boot.img file" - by default is selected "Install already prepared files" - and click on "Recovery and Boot" button.

    uc


    When prompted, select the boot.img from previous backup folder and click Yes to make CWM recovery automatically. First you will be prompted to flash a patched boot.img in your phone - click Yes to get an unsecured boot, then next message will ask you to install the new created recovery in your phone. Click Yes and Yes to reload the phone in recovery mode.

    uc


    The phone will shut down and reboot in recovery. Now you can see your custom recovery in place.

    GOOD TO KNOW: you can't generate a recovery everytime you want to flash one, to use MTKDroidTools for flashing, and the adb method may not work for many MTK phones.
    The most known method to flash a new recovery is by using SPFlashTools or MTKFlashTools, and an alternative method is with MobileUncle application from phone, but I will show detailed the FlashTools method. One thing though: if you want to use MobileUncle application, you have to use it from /system/app folder, not from /data/app. Many users say that the MobileUncle doesn't work to flash recovery: it show success, but rebooting to recovery reveal the old one. The reason? They installed MobileUncle from market, and that place the app in /data/app as a user app. In custom ROMs where the app is placed in system by ROM developer, the problem won't manifest. So, if you want to use MobileUncle, make it a system app not user app.

    uc


    In order to do that, grab a copy of any of these tools from DR_MOOSAVI's thread (link in OP), unzip it in a folder "MTK_Flash_tool" in your primary(system) partition (C in my case), and notice the name have to not contain any spaces or special characters. In that folder create a new folder "Resources" or ROM or whatever name you want, also without spaces or special characters, and place in it your scatter file and recovery img you want to flash. Open Flash_Tool executable as administrator.
    IMPORTANT: Your phone is not connected to the PC now. Swtich it off and wait, you will connect it later.

    Continue in next post.