- Устанавливаем Flash Tool в Linux для прошивки смартфонов
- Подготовительный этап
- Установка зависимостей и запуск FlashTool
- Заключение
- Install SP Flash Tool on Ubuntu
- Steps to Install SP Flash Tool on Ubuntu for Flashing Mediatek Android Device.
- Fix Common Errors while installing SP Flash Tool
- Conclusion
- How to Install SP Flash Tool on Ubuntu for MediaTek Android Flashing
- Troubleshooting
- eV@gabond: e-Xperience
- Search blog
- Saturday, January 6, 2018
- Install & Use SP Flash Tool in Linux/Ubuntu Systems
- >> Download Links:
- >> Watch the video below to learn how to use the SP Flash Tool in Linux:
Устанавливаем Flash Tool в Linux для прошивки смартфонов
Некоторые пользователи своих девайсов предпочитают перепрошить свой смартфон на Android кастомной прошивкой, самая популярная прошивка – LineageOS. В подавляющем большинстве прошиваются смартфоны в Windows, но, сегодня мы разберемся как прошить ваш девайс в Linux с помощью утилиты Flash Tool. Данная утилита прошивает Android смартфоны работающие на процессоре MTK. Утилита Flash Tool является одной из самых популярных утилит в своем роде, установить ее можно так же и в операционной системе Linux, все действия мы будем выполнять в Ubuntu 20.04, но, инструкция подойдет и для всех производных от Ubuntu, как вариант Pop OS, Linux Mint и так далее. Насчет Fedora и других RPM ориентированных систем, ничего сказать не могу, так как не проверял.
P.S. Все действия которые вы совершаете с телефоном, выполняются на ваш страх и риск. За не рабочий аппарат, в результате всех описанных действий в данной статье автор ответственности не несет. Данная инструкция проверена на телефоне Blackview BV5800, прошивался сей девайс в Ubuntu 20.04, а точнее в Kubuntu.
Подготовительный этап
Первым делом необходимо скачать саму утилиту Flash Tools для Linux, рекомендую скачивать именно с 4pda, а не с левых сайтов. Так же, если вдруг по какой-то причине 4pda не доступен, то Flash Tool версий 5.2020, 5.2016, 5.2012 вы можете скачать по ссылке ниже:
И так, после того как вы скачали архив с утилитой Flash Tool, его необходимо распаковать, предполагается, что вы его скачали в директорию загрузки и туда же распаковали.
Установка зависимостей и запуск FlashTool
Теперь необходимо открыть терминал, перейти в директорию с распакованным FlashTool и дать права на исполнение файлам flash_tool, flash_tool.sh, выполнив команды:
Как перемещаться по директория в терминале вы можете прочесть в этой статье.
Следующим шагом добавляем вашего пользователя в группу uucp, это делается для получения прав на запись в виртуальный COM-порт. Я буду добавлять пользователя “cyber-x”, вы же замените данное имя на имя вашего пользователя:
Когда все выше описанные действия сделаны, необходимо выйти из системы и снова зайти, либо, как вариант, перезагрузить компьютер. Следующем этапом будет установка пакета “51-android.rules”, данный пакет можно получить с GitHub. Это делается для того, что бы ваш Android девайс определился в системе Linux COM-порту. Для получения с GitHub мы воспользуемся утилитой git и клонируем данный репозиторий, предварительно сменив директорию на домашнюю, выполнив команду “cd”:
Если вдруг у вас не установлена утилита “git”, то выполните команду “sudo apt install git”.
Заходим в директорию “android-udev-rules” и тут нам нужно скопировать файл под названием “51-android.rules” в директорию вашей системы “/etc/udev/rules.d/”, копировать мы будем командой “cp”, о которой вы можете прочесть тут. И так, переходим в директорию и копируем данный файл, копировать необходимо с правами root пользователя:
Далее перезагружаем правила udev командой:
Выключаем ваш Android девайс и в выключенном состоянии подключаем его к компьютеру под управлением Linux. Нам необходимо, что бы телефон определился в системе, для этого выполним команду:
В конце вывода полученных данных должно быть примерно следующее, тут главное ttyACM0, если это значение имеется, значит все OK:
Возвращаемся к Flash Tool и запускаем из терминала скрипт от имени root пользователя выполнив команду:
Перед началом прошивки в утилите необходимо выставить настройки, заходим в Options- Download и ставим галочки напротив всех 2-х пунктов:
В строке “Scatter-loading File” указываем путь к scatter файлу, который прилагается к прошивкам. Выбираем один из режимов – Download Only или Firmware Upgrade и нажимаем кнопку Download:
Режим Download Only (прошивка без потери данных) – снимаем галочки с Preloader и Userdata в Flash Tool, при этом произойдёт обычное обновление прошивки. Если оставить галочку на пункте Userdata – все пользовательские данные будут стерты.
Режим Firmware Upgrade (прошивка всех разделов), при этом IMEI не слетает, используется в случае, если хотите получить чистый Android смартфон с новой прошивкой.
Заключение
Прошивка телефонов – рисковое занятие, при неправильно выбранной прошивке можно получить неработоспособный телефон. Зачем вообще прошивают телефоны? Хотя бы для того, что бы получить кастомную прошивку, или получить root права на телефоне.
Данная инструкция лишь воссоздает все действия, которые я проделывал прошивая свой Android смартфон в Linux, основана она на инструкции взятой с 4pda. Более подробно о работе с утилитой Flash Tool читайте все на том же форуме перейдя по ссылке.
Что касаемо остальных дистрибутивов Linux, то вероятней всего данную инструкцию придется адаптировать, в зависимости от вашего дистрибутива Linux. А так как я пользуюсь Kubuntu и Pop OS, то с уверенностью могу сказать, что все описанные действия работоспособны.
В любом случае читайте внимательно инструкцию которая прилагается к прошивке, так как в данной статье основной упор был сделан исключительно на установку Flash Tool в операционной системе Linux. Безусловно, перепрошить телефон в Linux можно и без Flash Tool, но, с ней это сделать намного удобней.
А на этом сегодня все, надеюсь, данная статья будет вам полезна.
Хотелось бы выразить огромную благодарность тем, кто принимает активное участие в жизни и развитии журнала, огромное спасибо вам за это.
Журнал Cyber-X
Источник
Install SP Flash Tool on Ubuntu
Are you a MediaTek Smartphone user? Smartphone Flash Tool is the best tool to flash your phone quickly without taking any risk.
Many guides for rooting and flashing Mediatek Android devices depends on a tool called Smartphone Flash Tool. For users of Windows PCs, there is no problem at all, as the SmartPhone Flash Tool runs flawlessly after installing all the Mediatek VCOM USB drivers.
However, the latest versions of Ubuntu such as (16.04 – 17.10) have made changes to specific dependencies, so getting SP Flash Tool to communicate with your Mediatek Android phone can be somewhat of a headache if you’re running the latest Ubuntu versions.
Requirements:
Steps to Install SP Flash Tool on Ubuntu for Flashing Mediatek Android Device.
Step 1: First of all, you need to download and install the libpng12-0 package from the above download section.
Step 2: You need to install manually by clicking on the .deb file and choose “Open with Software Install”.
Step 3: To install libusb-dev package, run
sudo apt-get update
sudo apt install libusb-dev
Step 4: After installing the libusb-dev package, now download the latest version of SP Flash Tool for Linux from the above download section.
Step 5: After downloading and installing the SP Flash Tool, right-click on the newly extracted SmartPhone Flash Tool folder and choose “Open in Terminal.”
Step6: As soon as the terminal opens, type the following commands into it:
chmod +x flash_tool
sudo adduser username dialout
Step 7: Type following command in the terminal, if you want to run SP Flash Tool.
Step 8: That’s it. If you follow each and every above steps correctly, you can easily install SP Flash Tool on Ubuntu for Flashing Mediatek Android Phones.
Fix Common Errors while installing SP Flash Tool
1. If you are facing error such as “Phone will not connect or USB port not found.”
Open a terminal and run following commands
dmesg / grep usb
Now look for your MediaTek entry, and copy the idProduct string. Now in the terminal, type the following commands:
sudo gedit /etc/udev/rules.d/80-persistent-usb.rules
Now add the below command by replacing the idProduct with yours to the file and save them.
2. If you receive the error such as “S_BROM_CMD_JUMP_DA_FAIL (2035)”
Make sure you have installed libusb-dev properly. If so, we need to blacklist Ubuntu’s modem manager, (because it controls port /dev/ttyACM0, which is disabling SmarPhone Flash Tool from running properly).
Type in the terminal:
sudo gedit /etc/udev/rules.d/20-mm-blacklist-mtk.rules
After typing the above command in the terminal, insert the below two lines into the text file:
Then in the open terminal type the following command
sudo service udev restart
Conclusion
That’s it. If you follow every step correctly, you can easily install the SP Flash Tool on Ubuntu. If you have any doubts regarding this article, you can reply in the comment section below.
Источник
How to Install SP Flash Tool on Ubuntu for MediaTek Android Flashing
Many of Appual’s guides for rooting and flashing Mediatek-based Android devices rely on a tool called SP Flash Tool. For users of Windows PCs, this is usually no problem at all, as the SP Flash Tool runs flawlessly after installing all the proper Mediatek VCOM drivers.
However, the latest versions of Ubuntu (16.04 – 17.10) have made changes to certain dependencies, and getting SP Flash Tool to communicate with your Mediatek-based Android device can be somewhat of a headache if you’re running one of the latest Ubuntu versions.
This guide will show you how to properly set up the dependencies required for SP Flash Tool on Linux.
Requirements:
First you need to download and install the libpng12-0 package – SP Flash Tool is dependant on this package, but it was not included in the latest Ubuntu releases. So you will need to download and install it manually. Just right click on the .deb file and choose “Open with Software Install”.
You also need to install install libusb-dev package, so run:
sudo apt-get update
sudo apt install libusb-dev
Now download the latest SP Flash Tool for Linux, and extract it anywhere on your computer. I just left it inside the Downloads folder, it works fine.
Now right click on the newly extracted SP Flash Tool folder and choose “Open in Terminal”.
In the terminal type the following commands:
chmod +x flash_tool
sudo adduser username dialout
newgrp – dialout
And now you can run SP Flash Tool by typing in the terminal:
Troubleshooting
Phone will not connect / USB port not found:
Open a terminal and run:
dmesg | grep usb
Now look for your MediaTek device entry, and copy the idProduct string. Now in the terminal, type:
And then add the following line (replacing the idProduct with yours) to the file, and save.
If the terminal displays dialogue about timing out while trying to find the USB port, it may help to keep disconnecting your phone and trying different USB ports.
If you receive the error “S_BROM_CMD_JUMP_DA_FAIL (2035)”
Make sure you installed libusb-dev as instructed earlier in this guide. If so, we will need to blacklist Ubuntu’s modem manager (because it controls port /dev/ttyACM0, which is disabling SP Flash Tool from running properly).
Type in the terminal:
Then insert these two lines into the text file:
Then in the terminal: sudo service udev restart
Источник
eV@gabond: e-Xperience
Search blog
Saturday, January 6, 2018
Install & Use SP Flash Tool in Linux/Ubuntu Systems
>> Download Links:
- SP Flash Tool (Linux/Windows): http://bit.ly/2CZkTER
- SN Write Tool (Windows only): http://bit.ly/2Aw22Ov
- Lenovo A7700 Stock Firmwares: http://bit.ly/2lXlFd2
You can also follow the tutorial here: http://bit.ly/2lWjFlj, and I strongly recommend you to follow the steps there. Below, I will point out the main step you have to note, from the above tutorial, for a successful installation, and that step is Step 4 which reads as follows:
«Now we come to the interesting part, which cost me 2 weeks of (futile) research and frustration. Finally I found Sergio Riveros tutorial on mibqyyo. Thanks to him again and again and again for this priceless piece of information.
Quote:
«The ‘modemmanager’ package integrated by default within Linux Ubuntu 14.04 and later is not compatible with the MTK Flash Tool for Linux.»
To put it in different words: The modem manager controls port /dev/ttyACM0 and disables the Flash Tool. So we blacklist it for the two MTK vendor IDs the flash tool uses:
You insert these two lines:
Save the file, exit and restart udev:
Switch your phone on (fastboot mode will suffice) and off again.»
>> Watch the video below to learn how to use the SP Flash Tool in Linux:
Источник