SP FLASH TOOL - LINUX UBUNTU (chapter 1)

cleopatra81

Active Member
Mar 13, 2016
126
165
43
Milan
#1
SP FLASH TOOL - LINUX UBUNTU - Chapter 1°

Successfully tested on Ubuntu 14.04 LTS

Above all, we have to set the environment before to install Sp Flash Tool.
Please follow very carefully all the next steps.

STEPS :

Step 1 - Installing rar & unrar and 7-zip

Above all you have to install rar & unrar and 7-zip.
It is because many roms are in rar or zip archives.
To install rar & unrar, open terminal and type the next commands :

sudo apt-get install rar

sudo apt-get install unrar

To install 7zip, open terminal and type the next commands :

sudo apt-get install p7zip-full

The full 7zip package that supports a lot of archive formats.
To extract a compress file, just right click on archive file and then click on Extract Here from the menu.
To compress a file, right-click on the file, click on Compress option.
Then, select the .7z, or .zip, or .rar and click Create button.

Step 2 - Installing Java 8

At first, you need to add Java webupd8team PPA repository on Ubuntu. Then, install Oracle Java 8.
Open the terminal and type the following commands :

sudo add-apt-repository ppa: webupd8team / java

sudo apt-get update

sudo apt-get install oracle-java8-installer

To check if Oracle Java 8 has been properly installed, execute the following command :

java -version




Step 3 - Install ADB and Fastboot

Open the terminal and type the following command :

sudo apt-get install Android-tools-adb-fastboot android-tools

To check if the ADB version installed on Ubuntu, type the following command :

adb version

If you see the following version :

Android Debug Bridge version 1.0.31

Then it comes to the old one, so I suggest you type the following commands :

# wget -O - https ://skia.googlesource.com/skia/+archive/cd048d18e0b81338c1a04b9749a00444597df394/platform_tools/android/bin/linux.tar.gz | tar -zxvf - adb

# sudo mv adb /usr/bin/adb

# sudo chmod +x /usr/bin/adb

After doing that, you will have to re-check the adb version installed by typing the following command :

adb version

You should see the next writing : Android Debug Bridge version 1.0.32




Step 4 - Solve problems within the device not recognized

If, by opening a terminal and typing the following command :

adb devices

It will return this :

List of devices attached
? ? ? ? ? no permissions


Then, it is necessary to intervene on the 51-android.rules.
Open the terminal and type the following command :

sudo gedit /etc/udev/rules.d/51-android.rules

It will appears a file similar to a txt; copy and paste the following text :

[HASHTAG]#MediaTek[/HASHTAG]

SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", MODE="0666"

Then, save and close the file.
If it will does not works, open the terminal and type the following command :

sudo nano /etc/udev/rules.d/51-android.rules

You will see a file like a txt; copy and paste the following text :

# udev rule to detect android devices
# These rules refer to http: //developer.android.com/tools/device.html

# Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev"
# Archos
SUBSYSTEM=="usb", ATTR{idVendor}=="0e79", MODE="0666", GROUP="plugdev"
# Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev"
# Azpen Onda
SUBSYSTEM=="usb", ATTR{idVendor}=="1f3a", MODE="0666", GROUP="plugdev"
# BQ
SUBSYSTEM=="usb", ATTR{idVendor}=="2a47", MODE="0666", GROUP="plugdev"
# Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666", GROUP="plugdev"
# Fairphone
SUBSYSTEM=="usb", ATTR{idVendor}=="2ae5", MODE="0666", GROUP="plugdev"
# Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666", GROUP="plugdev"
# Fujitsu Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", GROUP="plugdev"
# Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666", GROUP="plugdev"
# Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
# Haier
SUBSYSTEM=="usb", ATTR{idVendor}=="201e", MODE="0666", GROUP="plugdev"
# Hisense
SUBSYSTEM=="usb", ATTR{idVendor}=="109b", MODE="0666", GROUP="plugdev"
# HTC, Wiko
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
# Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", GROUP="plugdev"
# Intel
SUBSYSTEM=="usb", ATTR{idVendor}=="8087", MODE="0666", GROUP="plugdev"
# K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666", GROUP="plugdev"
# KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666", GROUP="plugdev"
# Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666", GROUP="plugdev"
# Lab126
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", MODE="0666", GROUP="plugdev"
# Lenovo
SUBSYSTEM=="usb", ATTR{idVendor}=="17ef", MODE="0666", GROUP="plugdev"
# LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="plugdev"
# Meizu
SUBSYSTEM=="usb", ATTR{idVendor}=="2a45", MODE="0666", GROUP="plugdev"
# Micromax
SUBSYSTEM=="usb", ATTR{idVendor}=="1ebf", MODE="0666", GROUP="plugdev"
# Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", GROUP="plugdev"
# MTK
SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", MODE="0666", GROUP="plugdev"
# NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666", GROUP="plugdev"
# Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666", GROUP="plugdev"
# Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666", GROUP="plugdev"
# OnePlus Two (unknown vendor's name)
SUBSYSTEM=="usb", ATTR{idVendor}=="2a70", MODE="0666", GROUP="plugdev"
# Oppo
SUBSYSTEM=="usb", ATTR{idVendor}=="22d9", MODE="0666", GROUP="plugdev"
# OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666", GROUP="plugdev"
# Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10a9", MODE="0666", GROUP="plugdev"
# Pegatron
SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", MODE="0666", GROUP="plugdev"
# Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666", GROUP="plugdev"
# PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666", GROUP="plugdev"
# Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
# Rockcwell Electronics
SUBSYSTEM=="usb", ATTR{idVendor}=="2207", MODE="0666", GROUP="plugdev"
# SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666", GROUP="plugdev"
# Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
# Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666", GROUP="plugdev"
# Sony
SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666", GROUP="plugdev"
# Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666", GROUP="plugdev"
# Spreadtrum
SUBSYSTEM=="usb", ATTR{idVendor}=="1782", MODE="0666", GROUP="plugdev"
# T & A Mobile Phones
SUBSYSTEM=="usb", ATTR{idVendor}=="1bbb", MODE="0666", GROUP="plugdev"
# Teleepoch
SUBSYSTEM=="usb", ATTR{idVendor}=="2340", MODE="0666", GROUP="plugdev"
# Texas Instruments UsbBoot
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", MODE="0666", GROUP="plugdev"
# Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666", GROUP="plugdev"
# Wearners
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
# Wileyfox
SUBSYSTEM=="usb", ATTR{idVendor}=="2970", MODE="0666", GROUP="plugdev"
# XiaoMi
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", MODE="0666", GROUP="plugdev"
# YU
SUBSYSTEM=="usb", ATTR{idVendor}=="1ebf", MODE="0666", GROUP="plugdev"
# Zebra
SUBSYSTEM=="usb", ATTR{idVendor}=="05e0", MODE="0666", GROUP="plugdev"
# ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", GROUP="plugdev"
# ZUK
SUBSYSTEM=="usb", ATTR{idVendor}=="2b4c", MODE="0666", GROUP="plugdev"

Then, you need to change the permissions on the files by typing the following command :

sudo chmod a+r /etc/udev/rules.d/51-android.rules

Now you need to recharge the rules by typing the following commands :

sudo udevadm control --reload-rules

sudo service udev restart

sudo udevadm trigger

If you have not yet created the plugdev group and added your name to the group,
enter the following commands :

groupadd plugdev

useradd -G plugdev cleopatra81 (change my name with your)

sudo service udev restart

Then restart the udev by typing the following commands :

sudo udevadm control --reload-rules

sudo service udev restart

Then, connect your phone to Ubuntu with usb cable, open the terminal and type the next command :

lsusb

You should see "Mediatek Inc." (Bus 00X Device 00X: ID).




To be continued in Chapter 2°
 
Likes: mrsim

mrsim

KingOfNoobs
Staff member
Mar 1, 2014
16,207
2,366
113
47
London UK
#2
you changed the title yourself...?
thank you for the very detailed tutorial...awesome work...:emoji_ok_hand::emoji_ok_hand::emoji_ok_hand: