Friday, August 11, 2017

rooting - How to root MTK based mobile devices using a Linux PC?


It is easy to root an MTK device in MS Windows using powerful tool like SP Flash Tools, or a one-click root solution. Can it be done (especially with that flash tool) using a Linux machine?


I've Lenovo P780 (Chipset: Mediatek MT6589) and a Linux machine running Ubuntu 14.04.



Answer



Rooting MTK based 'China' phones using SP Flash Tool.


I've tested this on my Ubuntu 14.04 laptop by rooting a Lenovo P780. @Paul Mahieu tested on Huawei Ascend Y221 using Ubuntu 16.04 and reports that it works.


First of all, install libusb-dev pacakage:


apt-get install libusb-dev

Now you need to download SP Flash Tool v5 from here.



Assuming it is downloaded to your Downloads directory extract it's content:


cd Downloads 
unzip SP_Flash_Tool_*.zip

Enter the extracted directory, and run it with root privileges:


cd SP_Flash_Tool_*
sudo ./flash_tool.sh

Pretty simple, right?


Now you have flashtool setup on your Linux box. There are plenty of guides for rooting, flashing recovery and so on for doing whatever you intend to do. The tool will dump important debugging information to the terminal from which you ran it. This is very useful if you ever get stuck.



The only error I got is this:


S_BROM_CMD_JUMP_DA_FAIL 

The reason and its solution is mentioned in this XDA thread:



This is because the 'modemmanager` package integrated by default within Linux Ubuntu 14.04 and later is not compatible with the MTK Flash Tool.



We can solve this issue by creating a udev rule blacklisting modemmanager for MediaTek devices. Create a file sudo gedit /etc/udev/rules.d/20-mm-blacklist-mtk.rules with the following contents:


ATTRS{idVendor}=="0e8d", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="6000", ENV{ID_MM_DEVICE_IGNORE}="1"


Restart udev for the changes to take effect:


service udev restart

If you run into more errors, you could get a hint about what is wrong from here: Flashtools errors and their solutions! - MIUI


Here is a guide on installing adb and fastboot on Ubuntu.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...