Ubuntu 12.04lts x64 and adb / fastboot android one x - HTC 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

Related

OS X .bash_profile

Ok, so i was creating a bash profile following a tutorial to use ADB through terminal
- Download the Android SDK for Macintosh at: Android SDK | Android Developers
- Extract it
- Download Fastboot for OSX (If not included with SDK)
- Extract fastboot and place it in your /tools folder.
- Open up a terminal window
- type: pico .bash_profile (this will create a .bash_profile)
- type the following in the new screen: export PATH=$
{PATH}:<sdkfolder>/tools
- Hit CNTRL + X
- Hit Y (for yes to save)
- It will return you to the terminal screen… type: exit
- Restart terminal.
Click to expand...
Click to collapse
it worked the first time, but i just tried opening terminal again and it wouldn't work, so i started doing it again and i got to where i type export path=$ etc etc. now i screwed up and terminal thought my android SDK was in /users/myname/sdkfolder and not users/myname/android.....no worries i just renamed android to asdkfolder and all was well....
but now when i open terminal i get
-bash: {PATH}:: command not found
i can type
cd /users/myname/sdkfolder/tools and it will change directories but adb shell or fastboot devices doesn't work.
i'm super confused and i've tried googling solutions and found this thread
http://www.droidforums.net/forum/ha...-changing-path-terminal-new-bash-profile.html
who had a similar problem but i'm still stuck.
Last login: Fri Jul 2 21:51:52
-bash: {PATH}:: command not found
new-host:~ myname$ cd /users/myname/sdkfolder/tools
new-host:tools myname$ adb shell
-bash: adb: command not found
new-host:tools myname$ fastboot devices
-bash: fastboot: command not found
new-host:tools myname$
bump for help
i started off using a bash profile and decided it wasn't necessary. just navigate to the folders you need to via terminal. from what i understand it causes more problem then its worth. i know this doesn't answer any questions just my .02 good luck.
I think the new SDK moves ADB to platform-tools.
So if you installed in folder "SDK" the new path should be...
"export PATH=${PATH}:/SDK/platform-tools"
you have to tell the terminal where to look for the command if it isn't in your profile.
I just navigate to the folder my sdk stuff is in then use a ./ infront of the command
Example
./adb shell instead of adb shell

How to enable adb and fastboot to flash boot.img on last Ubuntu 12.10

hello
After install a many times the adb and fastboot on ubuntu 12.04 with a lot of work to enable them i found on last ubuntu 12.10 a very simple way to do it.
Connect your phone with usb debugging enable to you computer.
Just tape adb on terminal and it ask you to install it than do it of course same for fastboot...
Test with this command if it s work
sudo adb devices
You can now flash boot or recovery in terminal place the boot.img on home folder than tape:
cd
fastboot flash boot boot.img
if you have problem like stuck on "waiting for device" do this:
Create a file named android.rules in /tmp with this followings contents:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
than run theses following commands:
sudo cp /tmp/android.rules /etc/udev/rules.d/51-android.rules
sudo chmod 644 /etc/udev/rules.d/51-android.rules
sudo chown root. /etc/udev/rules.d/51-android.rules
sudo service udev restart
sudo killall adb
disconnect your phone than reconnect, run adb devices*to confirm that now it has permission to access the phone.
With just this everything working ok for me on ubuntu 12.10 with fresh install...and nothing more
I want to thanks the ubuntu team because they work for that...
Sorry for my english
JEZ69 said:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
Click to expand...
Click to collapse
Thanks knew how to get the tools but this fixed my fastboot for me! Worked for my Asus Transformer just had to modify the vender id to match my device with the lsusb command sure it will work for all devices that way.
Wine isn't working for this? Would be perfect
Skickat från min HTC One X via Tapatalk 2
Thank you for this guide. It helped me to get working fastboot on Linux Mint 15.
Take a look here too
http://forum.xda-developers.com/showthread.php?t=2302780
JEZ69 said:
hello
After install a many times the adb and fastboot on ubuntu 12.04 with a lot of work to enable them i found on last ubuntu 12.10 a very simple way to do it.
Connect your phone with usb debugging enable to you computer.
Just tape adb on terminal and it ask you to install it than do it of course same for fastboot...
Test with this command if it s work
sudo adb devices
You can now flash boot or recovery in terminal place the boot.img on home folder than tape:
cd
fastboot flash boot boot.img
if you have problem like stuck on "waiting for device" do this:
Create a file named android.rules in /tmp with this followings contents:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
than run theses following commands:
sudo cp /tmp/android.rules /etc/udev/rules.d/51-android.rules
sudo chmod 644 /etc/udev/rules.d/51-android.rules
sudo chown root. /etc/udev/rules.d/51-android.rules
sudo service udev restart
sudo killall adb
disconnect your phone than reconnect, run adb devices*to confirm that now it has permission to access the phone.
With just this everything working ok for me on ubuntu 12.10 with fresh install...and nothing more
I want to thanks the ubuntu team because they work for that...
Sorry for my english
Click to expand...
Click to collapse
it's because do you need root permissions, use the root user, or add the " sudo " before the commands like : " sudo fastboot flash boot boot.img "
sorry for my english.
matt95 said:
Take a look here too
http://forum.xda-developers.com/showthread.php?t=2302780
Click to expand...
Click to collapse
Nice one. I totally missed that one.
Sent from my Nexus 7 using Tapatalk 4 Beta
slebit said:
Nice one. I totally missed that one.
Sent from my Nexus 7 using Tapatalk 4 Beta
Click to expand...
Click to collapse
it is pretty hidden that's why
You can get fastboot to work with downloading with
sudo apt-get install fastboot
and all commandos must begin with sudo.. I you try it with out this it tell you <waiting for devices>
Gesendet von meinem HTC One X mit Tapatalk 2
-Happy Feet- said:
You can get fastboot to work with downloading with
sudo apt-get install fastboot
and all commandos must begin with sudo.. I you try it with out this it tell you <waiting for devices>
Gesendet von meinem HTC One X mit Tapatalk 2
Click to expand...
Click to collapse
i prefer installing them manually so that you know where your dev path is located
no go
I'm on ubuntu 12.04 trying to get my fastboot commands to work from the home dir. and without "sudo ./fastboot" it's fine and works and all but why should "adb" work from anywhere but not "fastboot" I've googled all over the place and have done a ton of stuff which has only netted my to the point of when I do something like "fastboot devices" instead of getting "waiting for device" or "permission denied" I get a cursor blink and then back to command prompt and no desired result.
htc dna plugged in and in fastboot usb.
sdk, adb android linux installed and updated, edited 51 rules and even made a 99 rules in /etc/udev...inputed all the various chmods..
anyone have anything to add?

How to flash boot.img linux

Recently switched to linux mint.
Can some one tell me the commands for flashing boot.img
I have looked but can't find any info about it.
Cheers
Sent from my HTC One X
sudo add-apt-repository ppa nilarimogard/webupd8
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot
Commands are the same as they are for windows. Use sudo.
Sent from my One X
The command is the same
Instead, for recovery, is this:
"sudo -s
./fastboot-linux flash recovery recovery.img"
Cheers ppl
Sent from my HTC One X
Does this still work? Im on Ubuntu 13.10 and have KDE Newest version. Someone walk m through this?
VividTheMan said:
Does this still work? Im on Ubuntu 13.10 and have KDE Newest versierasomeone walk m through this?
Click to expand...
Click to collapse
Hi vivid all you need to do is reboot phone to bootloader with cmd adb reboot bootloader,then erase cache with cmd sudo fastboot erase cache ,then flash boot.img with cmd sudo fastboot flash boot boot.img ,or type sudo fastboot flash boot then drag and drop boot.img into command window ,then erase cache again and that's your kernel flashed.

[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.

How to setup and use SP Flash Tool on Ubuntu 20.04/later/other Distro based on Ubuntu 20.04/later

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

Categories

Resources