Easier ADB/Fastboot Usage Mac/Linux - HTC Wildfire S

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.

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

[TOOL]ADB + Fastboot v1.0.31 for OS X/4.3 [NOW Includes ADB & Fastboot][08-17-2013]

[TOOL]ADB + Fastboot v1.0.31 for OS X/4.3 [NOW Includes ADB & Fastboot][08-17-2013]
ADB & FASTBOOT FOR OS X​
There has been some confusion since I discuss using Fastboot in this post, but the zip only contained ADB. This is completely my fault and I apologize. Either way I've updated the .zip to include ADB & Fastboot.​UPDATED: 08/17/2013 - Added Fastboot to adb-1.0.31-mac.zip​
I've seen several people having issues on OS X trying to use ADB since the release of Android 4.3. In my case ADB recognized my device, but each time I ran adb devices my device would be reported as offline. I downloaded the SDK from Google several times and always ended up with ADB v1.0.29 (4.2.2).
This will should solve your OS X & ADB issues if you're running Android 4.3. This ONLY includes the ADB & Fastboot executable files and is for Mac OS X ONLY. I, like many others, do not need the full SDK. If you're not an app developer, like myself, this is all you need to have ADB working on your machine.
For any new OS X users I'll add a how to just so you don't have to go search for it else where:
How to setup ADB + Fastboot on OS X
Note: This is for not for developers. This only includes ADB & Fastboot and is not the full Android SDK
Step 1: Download the ZIP containing ADB & Fastboot
Step 2: Extract the ZIP to the directory of your choice
Step 3: Optional Create an environment variable
1. Open Terminal
2. Type cd to take you to your home directory.
Code:
cd
3. Type touch .profile to create a hidden file in your home directory named .profile
Code:
touch .profile
4. Type open -e .profile to open the file you just created in TextEdit
Code:
open -e .profile
5. In the file, add the following:
Code:
export PATH=${PATH}:/PathToDirectoryWhereYouExtractedTheZIP
6. Save the file and close TextEdit, quit Terminal, and relaunch the Terminal
Step 4: In Terminal type adb devices, you should see your phone's corresponding serial number Ex: HXM1005HNF012345 device
Code:
adb devices
Note: If you choose not to create an environment variable from Step 3 it effects two things:
1. You will need to cd to the directory containing ADB each time you want to run ADB.
2. When executing ADB commands you will need to add ./ in front of ADB. Ex: ./adb devices
Dropbox Download
Alternate Download

[TOOL]ADB + Fastboot v1.0.31 for OS X/4.3 [NOW Includes ADB & Fastboot][08-17-2013]

[TOOL]ADB + Fastboot v1.0.31 for OS X/4.3 [NOW Includes ADB & Fastboot][08-17-2013]
ADB & FASTBOOT FOR OS X​
There has been some confusion since I discuss using Fastboot in this post, but the zip only contained ADB. This is completely my fault and I apologize. Either way I've updated the .zip to include ADB & Fastboot.​UPDATED: 08/17/2013 - Added Fastboot to adb-1.0.31-mac.zip​
I've seen several people having issues on OS X trying to use ADB since the release of Android 4.3. In my case ADB recognized my device, but each time I ran adb devices my device would be reported as offline. I downloaded the SDK from Google several times and always ended up with ADB v1.0.29 (4.2.2).
This will should solve your OS X & ADB issues if you're running Android 4.3. This ONLY includes the ADB & Fastboot executable files and is for Mac OS X ONLY. I, like many others, do not need the full SDK. If you're not an app developer, like myself, this is all you need to have ADB working on your machine.
For any new OS X users I'll add a how to just so you don't have to go search for it else where:
How to setup ADB + Fastboot on OS X
Note: This is for not for developers. This only includes ADB & Fastboot and is not the full Android SDK
Step 1: Download the ZIP containing ADB & Fastboot
Step 2: Extract the ZIP to the directory of your choice
Step 3: Optional Create an environment variable
1. Open Terminal
2. Type cd to take you to your home directory.
Code:
cd
3. Type touch .profile to create a hidden file in your home directory named .profile
Code:
touch .profile
4. Type open -e .profile to open the file you just created in TextEdit
Code:
open -e .profile
5. In the file, add the following:
Code:
export PATH=${PATH}:/PathToDirectoryWhereYouExtractedTheZIP
6. Save the file and close TextEdit, quit Terminal, and relaunch the Terminal
Step 4: In Terminal type adb devices, you should see your phone's corresponding serial number Ex: HXM1005HNF012345 device
Code:
adb devices
Note: If you choose not to create an environment variable from Step 3 it effects two things:
1. You will need to cd to the directory containing ADB each time you want to run ADB.
2. When executing ADB commands you will need to add ./ in front of ADB. Ex: ./adb devices
Dropbox Download
Alternate Download

Run Backtrack 5 On Android Devices (Step By Step)

1. Download terminal emulator,android vnc and arm version of backtrack.
2. Extract the content of img file and transfer it in to memory of android devices.
3. Install BusyBox and start it.
4. Open terminal emulator. use "cd" command to get in backtrack directory where extracted content is saved on memory card of device. In this case command is
cd /sdcard/BT5
5. Type "sh bootbt" and we will be in Backtrack.
commend
su
cd/sdcard/bt5
sh bootbt
startvnc
download from torrent
BackTrack 5 ARM Edition Quick Start
This image has been developed and tested on the you yureka. Your mileage may vary on other devices.
As this image runs in a chroot, you will need to have your device rooted. There are numerous tutorials on the subject online and are not included here.
***Rooting your device will potentially void its warranty and we are not in any way resposible if you brick your device while rooting it.***
### IMPORTANT POINTS ###
1. Since the image runs in a chroot, there is no root password set.
2. There are 2 scripts under /usr/bin/ 'startvnc' and 'stopvnc' that are set to start with the Xoom's default resolution.
3. The current vnc password is set to 'toortoor' and can be changed by running 'vncpasswd'
4. This image is a work in progress and suggestions/tips from the community are always welcome.
### GETTING STARTED ###
1. Once you have downloaded the ARM BT package, save the files in a convenient location. The steps below assume they are in the platform-tools folder of the Android SDK.
2. Go to your platform-tools directory and proceed to make a directory on the device to store BT5:
./adb shell
mkdir /sdcard/BT5
exit
3. Copy over the busybox install files:
./adb push busybox /sdcard/
./adb push installbusybox.sh /sdcard
4. Install busybox on the device:
./adb shell
cd /sdcard/
sh installbusybox.sh
exit
5. Transfer the required BT5 files to the device:
./adb push fsrw /sdcard/BT5/
./adb push mountonly /sdcard/BT5/
./adb push bootbt /sdcard/BT5/
./adb push bt5.img.gz /sdcard/BT5/
./adb push unionfs /sdcard/BT5/
6. Uncompress the image and start BT5:
./adb shell
su
cd /sdcard/BT5
gunzip bt5.img.gz
sh bootbt
If all goes well, you'll be in the BT5 chroot:
# sh bootbt
net.ipv4.ip_forward = 1
[email protected]:/# ls /pentest/
backdoors database exploits passwords scanners stressing voip
cisco enumeration forensics python sniffers tunneling web
[email protected]:/#

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