How to setup and use SP Flash Tool on Ubuntu 20.04/later/other Distro based on Ubuntu 20.04/later - Upgrading, Modifying and Unlocking

Hello!
I had problems with setup SP Flash Tool on Ubuntu/Kubuntu 20.04. So here is a guide, how to do it .
1. Download SP Flash Tool for Linux: https://spflashtool.com/download/
2. Extract it, and rename folders, so that there are files in the "Flash Tool" folder
3. Delete "Lib"folder
4. Type this commands:
Code:
sudo add-apt-repository ppa:linuxuprising/libpng12
sudo apt update
sudo apt install libpng12-0
sudo apt install libusb-dev
5. Type
Code:
cd ~/Downloads/"Flash Tool"
sudo chmod a+x flash_tool
sudo chmod a+x flash_tool.sh
sudo ./flash_tool
If you have problem with " libqtwebkit4.so.4", follow this steps:
Open Terminal and type:
Code:
sudo add-apt-repository ppa:rock-core/qt4
sudo apt update
sudo apt install libqtwebkit4
SP Flash Tool will now works.
Voila!

Hello,I don't seem to have a field for the Scatter txt.Any ideas?

Show screenshot

It's alright,I used a Windows PC to do it,but thanks for the reply anyway

Hi had trouble as attached.I deleted lib and renamed folder all I got is bland screen.Attach will show.
Did it all again,and just named the extracted folder.
Went through your commands and it worked
Downloaded upgradeed Ubuntu 20
And truly,Thank You for your work.

Oldlearner said:
Hi had trouble as attached.I deleted lib and renamed folder all I got is bland screen.Attach will show.
Did it all again,and just named the extracted folder.
Went through your commands and it worked
Downloaded upgradeed Ubuntu 20
And truly,Thank You for your work.
Click to expand...
Click to collapse
This worked for me: https://github.com/P0cL4bs/WiFi-Pumpkin-deprecated/issues/53#issuecomment-309120875
Basically, its adding
Code:
QT_X11_NO_MITSHM=1
in the system variable file.

The first cmd is not working this is my download as there been updates on the site is my drive correct .. this cmd not workingsudo add-apt-repository ppa:linuxuprising/libpng12

Related

Easier ADB/Fastboot Usage Mac/Linux

Let's pretend you're running Mac OS X or Linux. You might have your adb and fastboot files in a directory such as:
Code:
~/Android/
Which means to execute the command you have to
Code:
cd ~/Android/
then execute
Code:
./adb
You must be thinking, "There has to be a similar way!" Well, there is!
Code:
sudo cp ~/Android/adb /usr/bin
followed by
Code:
sudo cp ~/Android/fastboot /usr/bin
Now, all you have to do, no matter what you're present location in your file system is to simply type whichever command you want. This will probably speed up using the commands and make your time in terminal a little easier.
It is much more efficient to add the ~Android dir to PATH.
If you ever update your android sdk you'd have to copy the files again.
so better:
Code:
export PATH=~/Android:$PATH
if you want it persistent just change your ~/.profile file (depending on your distribution)
same would work in Windows, there you have to set PATH in the system settings.

Ubuntu 12.04lts x64 and adb / fastboot android one x

I usually flash a new ROM for my One X in win7 but I'm sick of restarting computer and logging back into windows everytime I want to do something with my One X. Is there a guide or tutorial or can something let me know how to use fastboot / adb for flashing ROMS. When I try for example; "fastboot flash boot boot.img", it just says unknown command. I'm in the right folder in terminal btw.
try this in the terminal:
sudo apt-get install -y android-tools-adb android-tools-fastboot
This will install the fastboot and adb commands so you can use them in the terminal.
*For adb to work properly you must be working as root (sudo)
svenvv said:
try this in the terminal:
sudo apt-get install -y android-tools-adb android-tools-fastboot
This will install the fastboot and adb commands so you can use them in the terminal.
*For adb to work properly you must be working as root (sudo)
Click to expand...
Click to collapse
Thanks. I put in what you wrote but...
[email protected]:~$ sudo apt-get install -y android-tools-adb android-tools-fastboot
[sudo] password for kris:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package android-tools-adb
E: Unable to locate package android-tools-fastboot
It worked in 12.10 Did a bit of googling though, this keeps popping up:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install android-tools*
Thanks. I just tried
wget http://dl.google.com/android/android-sdk_r21.1-linux.tgz
tar xzvf android-sdk_r21.1-linux.tgz
cd android-sdk-linux/tools./android sdk
And now I'm downloading sdk tools, etc through the sdk manager, so hopefully that works, if not I'll try your method.
Cheers
This message did pop up though while installing
Stopping ADB server failed (code -1).
Unable to run 'adb': Cannot run program "/home/kris/android-sdk-linux/platform-tools/adb": error=2, No such file or directory.
Starting ADB server failed (code -1).
Starting The adb server should be done as root, otherwise you'll het errors. Fastboot should work without root though.
Verstuurd van mijn HTC One X met Tapatalk
Still doesn't work after installing the tools...
Sent from my HTC One X using xda premium
shinigamikris said:
Still doesn't work after installing the tools...
Sent from my HTC One X using xda premium
Click to expand...
Click to collapse
Did you do as above, sudo first then adb commands?
Sent from my HTC One X using xda app-developers app
treebill said:
Did you do as above, sudo first then adb commands?
Sent from my HTC One X using xda app-developers app
Click to expand...
Click to collapse
[email protected]:~/android-sdk-linux/platform-tools$ dir
aapt aidl dexdump fastboot llvm-rs-cc renderscript
adb api dx lib NOTICE.txt source.properties
[email protected]:~/android-sdk-linux/platform-tools$ sudo fastboot erase cache
sudo: fastboot: command not found
[email protected]:~/android-sdk-linux/platform-tools$ sudo adb reboot recovery
sudo: adb: command not found
[email protected]:~/android-sdk-linux/platform-tools$ fastboot erase cache
fastboot: command not found
Am I doing this right?
Tried fastboot with sudo and without, am trying adb with sudo. Or am I putting in the wrong commands?
First (only once): chmod 777 fastboot
(Make it executable)
Tot start:
sudo ./fastboot [command]
I'll try this in the morning. Cheers.
Sent from my HTC One X using xda premium
This method works on raring:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install android-tools-adb
sudo apt-get install android-tools-fastboot
svenvv said:
First (only once): chmod 777 fastboot
(Make it executable)
Tot start:
sudo ./fastboot [command]
Click to expand...
Click to collapse
Thankyou! Working perfect now. Haven't tested adb functions though but was mainly after fastboot. Cheers
hey people, I've got a problem as well with the fastboot commands on ubuntu, but a different one. ADB works without fault but in fastboot after a command it keeps saying :waiting for device
Am I missing a driver or something?
oh btw it started happening when I updated from 12.10 to 13.04
any help is welcome!
@Bram89
Try sudoing.
TToivanen said:
@Bram89
Try sudoing.
Click to expand...
Click to collapse
Great, Thanks!! sudo fastboot command worked
the easiest way is to download the sdk without the extra eclipse package, download the adb/fastboot tools with the SDK manager and then adding that folder in the .bashrc

[HOWTO] / [GUIDE] Compile Loki_patch and execute

Things you will need:
Cygwin- http://www.cygwin.com/setup.exe
ADB- http://developer.android.com/sdk/index.html
Loki Patch source- https://github.com/djrbliss/loki
These are the steps i took to compile and use loki_patch.
I will assume you have the android sdk setup and ready, I will assume your SDK is under c:/AndroidSDK(this is how mine is setup)
Pulling aboot.img using adb:
You can copy cmd.exe into the folder where adb is located and run it from there so you do not have to navigate to the folder manually, or just run cmd.exe and navigate to the adb folder, for me it is c:\AndroidSDK\sdk\platform-tools.
Once you are in your adb file path and your phone is connected and in debug mode follow these instructions to pull aboot.img from your phone.
Original instructions from djrbliss here https://github.com/djrbliss/loki
[email protected]:~$ adb shell
[email protected]:/ $ su
[email protected]:/ # dd if=/dev/block/platform/msm_sdcc.1/by-name/aboot of=/data/local/tmp/aboot.img
[email protected]:/ # chmod 644 /data/local/tmp/aboot.img
[email protected]:/ # exit
[email protected]:/ $ exit
[email protected]:~$ adb pull /data/local/tmp/aboot.img
3293 KB/s (2097152 bytes in 0.621s)
Now you should have the file aboot.img in the platform-tools folder(where the adb.exe file is located)
Copy this file to your desktop so you know where it is.
Installing gcc with Cygwin:
Original Instructions came from here http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html
Step 0: Download and run the cygwin installer.
Step 1: Select “Install from Internet”
Step 2: Install to default location
Step 3: Use default local package directory (click next)
Step 4: Use whatever internet connection settings (click next)
Step 5: Select a mirror (use the one already selected, click next)
Step 6 (a): In the “Select Packages” expand “Devel”:
Step 6 (b): Select gcc, gdb, and make
Step 7: click next and follow the rest of the installation instructions.
Ok, now that gcc is installed we can compile the loki_patch source to make the executable.
Go here https://github.com/djrbliss/loki
You should see a file called loki_patch.c, click this link and it will open and you can see all the code.
Select the code from top to bottom and right click, copy.
Now right click on your desktop and select new> text file.
Open this text file and paste the code into it, go to file and save as loki_patch.c (make sure you have your file extensions turned on so you can save this as a c source and not a txt file).
We should now have a file called loki_patch.c on the desktop, keep it there for now.
Open up windows explorer and navigate to the following:
c:\cygwin\home\<username>\
(You will see a few files and a kitchen folder)
Create a new folder in here called compile.
Now, let's go back to the desktop and copy loki_patch.c and aboot.img and paste those into the compile folder you just created.
Go ahead and run cygwin.
Now we need to change directories, so let's type the following:
cd compile
We should now be in the compile folder.
Lets compile this code so we can use it, type the following command:
gcc loki_patch.c -o loki_patch
We should now have a file in the compile folder called loki_patch.exe( windows added this .exe, the file extension can be left alone or deleted)
Now you need a boot.img file to patch, grab one from a rom or kernal and copy this into the compile folder.
Once all the files are in the compile folder run the following command to patch the boot.img file:
./loki_patch boot aboot.img boot.img boot.lok
We should now have a boot.lok file in the compile folder, hope this helps and i hope i didnt leave anything out, i will try and update this with screen shots later.
Nice work..thanks
C13v3r0n3 first link is Broken: Cygwin, my friend!!
TheAxman said:
Nice work..thanks
Click to expand...
Click to collapse
And that's why you guys rock because that's all greek to me.
"If you ain't first yer last"
Sent from my rockin ATT S4

Builing your own Ouya Kernel

Hi,
I made a tutorial explaining how to compile the ouya's kernel from scratch.
I made this tutorial because I needed to enable the nfs protocol versions 3 and 4 to use file shares from my Synology NAS. The ouya's kernel enabled by default only comes with version 2 and i had problems to mount my NFS shares.
Let's start. my english is not very good then ignore the grammatical errors.
Let's first download the required files. I'm on the premise that you have an ubuntu linux installed on your machine.
*** DOWNLOAD OUYA FIRMWARE ***
1. Open your browser and type:
https://devs.ouya.tv/api/firmware_builds
2. Search for a string like this:
http://cds.t2z5c2q6.hwcdn.net/ota/RC-OUYA-1.2.1084-r1_ota.zip (this is the latest version of ouya firmware)
3. Download it:
$ wget http://cds.t2z5c2q6.hwcdn.net/ota/RC-OUYA-1.2.1084-r1_ota.zip
2. Create a directory an put the file there:
$ mkdir ouyafiles
4. unzip it:
$ unzip RC-OUYA-1.2.1084-r1_ota.zip
5. Now you have a lot of files and directories. We need only one. The name of file is: boot.img. We need to unzip this file to retrieve the ramdisk file that will be needed along with the compiled kernel. For this we need to download the following perl script:
$ wget http://www.enck.org/tools/split_bootimg_pl.txt
5. Rename the script and change the permissions to execute:
$ mv split_bootimg_pl.txt split_bootimg.pl
$ chmod 755 split_bootimg.pl
6. Run this command to unpack the file:
$ ./split_bootimg.pl boot.img
7. Now you have 2 files: boot.img-kernel and boot.img-ramdisk.gz. We only need the boot.img-ramdisk.gz. Lets unzip this again and rename the unzipped file:
$ gzip -dc ../boot.img-ramdisk.gz | cpio -i
$ mv boot.img-ramdisk ramdisk
8. OK. Now you have this file. We will use it later in the tutorial.
*** DOWNLOAD ANDROID NDK ***
1. Open the Browser and paste this URL: http://developer.android.com/tools/sdk/ndk/index.html
2. Download the Linux 64-bit (x86) package file:
$ wget http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86_64.tar.bz2
3. Unzip it:
$ tar -jxvf android-ndk-r9d-linux-x86_64.tar.bz2
4. Rename the unzipped directory to "ndk":
$ mv android-ndk-r9d ndk
5. Load the environment variables:
$ export CROSS_COMPILE=/your_home_directory/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
$ export ARCH=arm
Obs.: (remember the /your_home_directory/ is the default home directory that you user in linux uses to work).
*** DOWNLOAD THE OUYA KERNEL SOURCE ***
1. Open your browser and go to this URL:
https://github.com/ouya/ouya_1_1-kernel
2. In the right side of the page you will have a download button called "Download ZIP". Click and Download it.
3. Unpack it and rename the unzipped directory to "kernel"
4. Maybe the /kernel/drivers/pci/Kconfig file will corrupt before unzip the file. Kconfig is a symbolic link. Remove it and Download again using the command inside the kernel/drivers/pci/ directory:
$ wget https://raw.githubusercontent.com/ouya/ouya_1_1-kernel/master/drivers/pci/Kconfig
6. Now you have the default ouya kernel for compile!
*** RECOVER .CONFIG FILE FROM OUYA ***
1. You need to retrieve a file that is in ouya. To retrieve the file you need install the package android-tools-adb. use the following command:
$ sudo apt-get install android-tools-adb
2. Now you have to connect your ouya via usb. By default your ouya don't enable adb. You need to go to DEVELOPMENT screen on your ouya and enable “ADB: ON”.
3. Fine. Now test if the adb is connecting. Try this commands:
$ adb start-server
$ adb devices (this will show something like this “1234567890ABCDEF device”)
PS.: if no devices appears... you need to search in the internet about “how to use adb to connect android devices”
4. Now you will pull the config file:
$ adb pull /proc/config.gz config.gz (this will pull config.gz to your computer)
5. Unzip it and copy to kernel directory:
$ gunzip config.gz
$ cp config /your_home_directory/kernel/.config
6. Now your kernel is ready to compile. We're ensuring that the standards are consistent settings. From now on it is your responsibility to enable and disable kernel configurations.
*** REBUILDING KERNEL ***
1. Go to Kernel Directory:
$ cd /your_home_directory/kernel/
2. Make sure to run the environment variables CROSS_COMPILE and ARCH described above in the tutorial.
$ export CROSS_COMPILE=/your_home_directory/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
$ export ARCH=arm
3. Use this command to change some settings:
$ make menuconfig
4. Use this command to build the kernel after you change your new settings:
$ make
5. Some warnings will display in your console... its normal.
6. if the process run ok you 'll have a bzImage file under the directory kernel/arch/arm/boot
7. copy this file to the same directory where you store the ramdisk file.
*** UPLOAD THE NEW KERNEL AND THE RAMDISK TO OUYA ***
1. You will need to install the fastboot on linux using this command:
$ apt-get install android-tools-fastboot
2. Now you have to reboot your device in bootloader mode:
$ adb reboot-bootloader
3. You can check if you devices enters in this mode using this command:
$ fastboot devices
4. If it works. You can upload your new kernel and the default ramdisk:
$ fastboot flash:raw boot ./zImage ./ramdisk
The system should now boot with your custom kernel installed!
*** DOWNLOAD OUYA FIRMWARE ***
$ mv boot.img-ramdisk ramdisk
Click to expand...
Click to collapse
Why do we need this? Can't we simply copy it from an existing OUYA machine?
ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
Click to expand...
Click to collapse
The current android-ndk-r10e only has androideabi-4.8 and androideabi-4.9. Can I use them, too?
Edit: I got an error ("unknown CPU architecture") with android-ndk-r10e and arm-linux-androideabi-4.8 so I used android-ndk-r9d with arm-linux-androideabi-4.6, and that worked.
6. if the process run ok you 'll have a bzImage file
Click to expand...
Click to collapse
It's actually a zImage file (without the b).
Thank you so much for the tutorial!

[GUIDE][LINUX]How to setup adb and fastboot on Linux for the Robin

Hello Robiners ,
it's been a long time I unlocked my bootloader , but I remember I wrestle a long time to make fastboot able to see my device. Here how to do it :
Requirement:
• Ubuntu (tested on 16.04LTS an 18.04LTS) or Linux
• Admin Password
• Basic knowledge about Linux command line
Step 1 :
Open the terminal and enter this code :
Code:
sudo add-apt-repository ppa:nilarimogard/webupd8
Code:
sudo apt-get update
Code:
sudo apt-get install android-tools-adb android-tools-fastboot
Step 2 :
Enter the command
Code:
adb device
Try two or three time and see if your device is recognized (worked on Ubuntu 18.04 LTS the second time)
Step 3 : (Tested and working on Ubuntu 16.04LTS and 18.04LTS )
Enter this command:
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
This will open the 51-android.rules , this file is created when you install fastboot and adb
Go all the way to the bottom of the file and add this code:
Code:
# Nextbit
SUBSYSTEM=="usb", ATTR{idVendor}=="2c3f", MODE="0666", GROUP="plugdev"
Then save and exit gedit.
Step 4:
Enter those command:
Code:
adb kill-server
Code:
adb start-server
Congratulation , your adb is ready to work properly now .
If this helped you press the thank button :good:
Oups , it looks like I posted on the wrong section , my apologies.

Categories

Resources