[Q] Android ADK and 64 bt ubuntu - please help - Android Software/Hacking General [Developers Only]

Ok, so I've a newly installed 64bit ubuntu, and I've just downloaded the android SDK.
I managed to run the "android command the first time round whereby I successfully downloaded android versions 2.3+
I was very clever and did this through the terminal, by going in to my android SDK directory, and then tools (for me cd /android/tools)
and then I typed android, and the gui came up..... all good.
I then decided I needed to add this directory to my path, I did some jiggery pokery here, not too much, but I cant say exactly what I did, but now, when I try to run the android command, from the correct directory all I get is the following:
Code:
[email protected]:~/android/tools$ dir
adb_has_moved.txt dmtracedump hprof-conv NOTICE.txt zipalign
android draw9patch layoutopt proguard
ant emulator lib source.properties
apkbuilder etc1tool mksdcard sqlite3
ddms hierarchyviewer monkeyrunner traceview
[email protected]:~/android/tools$ android
android: command not found
I know this must be down to some kind of path error, but i'm lost as to how to correct it. I've googled all over, but every explanation seems geared towards someone with more linux knowledge than mine. Please may someone explain really simply how I fix this? thanks

Related

Android SDK 1.5 trouble in Linux

I am a new to using Linux, I just downloaded the SDK 1.5 and I am having some trouble getting the tools to work properly. For example. If I try to open the emulator it will just sit there and do nothing. I cannot get adb to work either. I set it up / the instructions. Any ideas on what I am missing? Thanks
easiest way to fix the adb problem is to move your adb command that is included in the SDK into your /usr/bin or /bin directory. if you have a problem with either of those then type cd ~/<sdk>/tools followed by ./adb the "./" tells the phone to run the command in the current directory, otherwise you could just type the directory to adb to run it i.e. ~/SDK/tools/adb that's all you need. as far as the emulator i have no idea because i have never gotten it up and running properly
How do I add the ADB command to usr/bin?
You can do as followed:
- Run the Terminal
- cd to your sdk/tools directory
- Run these command:
Code:
#./adb kill-server
#./adb devices
If you see your HTC has been remounted, it's done!
sudo mv ~/sdk/tools/adb /usr/bin/adb
tubaking182 said:
sudo mv ~/sdk/tools/adb /usr/bin/adb
Click to expand...
Click to collapse
Got it thanks for your help! I still can't get the emulator to work. Oh well Thanks again
What version of Linux? Are you using 64 Bit? What is the result of typing
Code:
java -version
You created the AVD, right?
What do you get when you type:
Code:
android list avd
stovenator said:
What version of Linux? Are you using 64 Bit? What is the result of typing
Code:
java -version
Ubuntu version 9.04 & 64 Bit
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
You created the AVD, right?
What do you get when you type:
Code:
android list avd
Click to expand...
Click to collapse
bash: android: command not found
They made a change in 1.5 SDK that you must specifiy the virtual device you want the emulator to run. if you just double click on "emulator", it will print the error to console and exit.
So first cd to the tools directory of the sdk and type android[return]
you will be given the commands that android (the program) will accept. you can also do this for emulator.
Great!! Everything is working well now. Thanks for everyones help!!
How Do I get fastboot working in Ubuntu?
jordanjf86 said:
How Do I get fastboot working in Ubuntu?
Click to expand...
Click to collapse
http://andblogs.net/fastboot/
fastboot is included in the 1.5 sdk, once you get adb working it should start working as well.
billc.cn said:
fastboot is included in the 1.5 sdk, once you get adb working it should start working as well.
Click to expand...
Click to collapse
Actually it doesn't seem to be in the Linux 1.5 SDK; I had to build it. It's in the Windows SDK, though. Kinda weird.
Android SDK 1.5 emulator trouble in windows
hi i m new to xda and to android i m not tech savy
i install sdk 1.5 i try ddms it works good what when i try to lanch emulator nothing happnes and i try by going in command promt im getting this error can any one help me out in this
C:\Documents and Settings\jass>emulator
emulator: ERROR: You did not provide the name of an Android Virtual Device
with the '-avd <name>' option. Read -help-avd for more information.
If you *really* want to *NOT* run an AVD, consider using '-data <file>'
to specify a data partition image file (I hope you know what you're doing).
karan09 said:
hi i m new to xda and to android i m not tech savy
i install sdk 1.5 i try ddms it works good what when i try to lanch emulator nothing happnes and i try by going in command promt im getting this error can any one help me out in this
C:\Documents and Settings\jass>emulator
emulator: ERROR: You did not provide the name of an Android Virtual Device
with the '-avd <name>' option. Read -help-avd for more information.
If you *really* want to *NOT* run an AVD, consider using '-data <file>'
to specify a data partition image file (I hope you know what you're doing).
Click to expand...
Click to collapse
First, this is the wrong thread for such a question. This thread is about SDK issues in Linux, and you're asking about using debugging tools in Windows.
Second, if you say yourself that you are "not tech savvy", then I'm not quite sure why you are wanting to play with the SDK tools. I don't mean this in a derogatory way; I'm just not sure what it is that you're trying to accomplish.
That said, Android dev docs can be found here, and information specifically about the emulator is here.
- Chris

[HOWTO] Guide to running ADB under Fedora 11 (and equivalent distros)

Ok, I have fedora 11 installed on most of my computers, since i love this distro to death. My big thing was trying to get adb to work. This is my guide to get it to work, for now.
First things first. Navigate to /etc/udev/rules.d as root. Create a rules file called 50-android.rules (touch 50-android.rules). NOTE: You are better off looking at the contents and picking a rules number set other than what is listed. Sometimes udev is picky. For the newbies, so if any rules start with '50', then change the number by one or two, like 51 or 52. Paste this into the file:
Code:
SUBSYSTEM=="usb",ATTRS{idVendor}=="0bb4",SYMLINK+="android_adb",MODE="0666"
Make sure you use ATTRS, not ATTR or SYSFS, since this is a newer updated udev system.
After that, run udevadm control --reload-rules to reload your rules files. Now just run ./adb devices as root to make sure it recognized your HTC dream. I am working on this fix right now so you don't need to be root, keep patient. Now you can adb shell into your device either as root OR normal user, just as long as you start the server as root. This is a permissions problem, and hopefully I can fix this and/or find a fix soon.
I wrote this because i searched high and low through google, and only found a few good parts as far as a fix. Hopefully this helps a few people out there.
Just wondering if this has helped anyone. If not, delete this thread or do whatever with it....
I have adb on my eeepc 900 with f11 I believe this method works too as well. although it says it has been tested with ubuntu, it works pretty well with f11.
http://www.talkandroid.com/android-sdk-install-guide/
Installing The Android SDK
First you will need to download the Android SDK pack .zip archive, once downloaded find a suitable installation location on your machine and extract the zipped files.
Please note: This installation location will be referred to as $SDK_ROOT from now on through this tutorial
Alternatively you can add /tools to your root path which will prevent the need to specify the full path to the tools directory along with enabling you to run Android Debug Bridge (adb) along with other command line tools.
To add /tools:
Linux
1. Edit the ~/.bash_profile or ~/.bashrc files looking for a line that sets the PATH variable.
2. Add the full path location to your $SDK_ROOT/tools location for the PATH variable.
3. If no PATH line exists you can add the line by typing the following:
4. export PATH=${PATH}:<path to your $SDK_ROOT/tools>
Click to expand...
Click to collapse
It helped me, since the creation of the file my OpenSuSE 11.0 recognizes the phone perfectly
Thanks a lot for your hint.
thanks it helped me. ill be looking forward to getting it to work without root
just use sudo instead
Just a heads up for user's using Ubuntu 9.10, this isn't needed. I connected my G1 to it and ran ADB with no adjustments to udev or anything else.
Pretty much it works out of the box.
Here is my version
download the .tgz file from googlecode
http://developer.android.com/sdk/index.html
sudo tar -xzvf android-sdk_r3-linux.tgz
Click to expand...
Click to collapse
Code:
sudo gedit ~/.bash_profile
heres my bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH=$PATH:/android-sdk-linux/tools
Click to expand...
Click to collapse
logout
login
connect android g1 device via usb to pc
open a terminal
Code:
adb devices
if you cant get a device try it with superuser.
Don't you think that this is all just a little bit excessive?
To make it work in F11, just do this;
Download SDK, extract.
To use, type:
/path/to/sdk/tools/adb
Another option is to edit the /etc/profile and add
PATH=$PATH:/<Path to android-sdk>/tools
This option will allow any user to use the adb tools when logged in or if you
su -
into another user
I wrote a short guide as well for Windows and Ubuntu. Might help others.
Unfortunately, as anyone with a passing acquaintence with ADB knows, the scrolling issue can be a killer. I swear the other day I pressed "up" twice and it composed "rm /sdcard/rootfs.img /sdcard/system.ext2" and executed it. We run Android on our SD's btw.. Was not cool. Instead, I use ADB via telnet and it works beautifully. Here's how:
Code:
adb shell telnetd &
adb forward tcp:9999 tcp:23
Now type this: "telnet localhost 9999"
Enter "root" and hit enter
Finally update PATH: "export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin"
Okay, so 4 lines to enter and you have a "regular, sane" shell connection to the phone and you can actually scroll through history and text without it jumbling the text and executing random code. Enjoy.
lbcoder said:
Don't you think that this is all just a little bit excessive?
To make it work in F11, just do this;
Download SDK, extract.
To use, type:
/path/to/sdk/tools/adb
Click to expand...
Click to collapse
that works too as well but i would rather open up a terminal and type
sudo adb devices
sensimila said:
that works too as well but i would rather open up a terminal and type
sudo adb devices
Click to expand...
Click to collapse
WHY would you want to make it *MORE COMPLICATED*??
There is NO NEED for root.
/path/to/adb ...
THATS ALL.
This is kind of funny... i wrote this because i had trouble with it, so i am just sharing my fix...
In case this is interesting to someone:
The fix mentioned in the first post has to be applied to open SuSE x86 and x64 edition to make the G1 work. The external device works without it, but not the adb device.
Thanks again!
Just wanted to come and post that this does work with OpenSUSE 11.2 x86. Did this hoping to get adb to work with my LG Ally and it does. Thanks!
(Still) works for me on 64bit SUSE 11.4.
Before adding this file, I could not access my device with adb, received permissions errors.
Added this file, and I can shell into my device.
Permissions on adb itself was not the problem, it was access to the device when udev found it.
[edit]Actually used the lines from http://developer.android.com/guide/developing/device.html[/edit]

[java][debian][armv6][jre1.6][jdk 7] [jdk 8]

woo, I found this gem on a search and ended up at talk.maemo.org in the n900 section.
oracle released an armv6/armv7 headless 1.6 jre binary set! way back in april, but I hadn't seen it until today.
works in debian squeeze on my armv6 (msm7627) optimus v... it runs, but I haven't put it through its paces yet for any real testing.
I thought someone might enjoy this since for a long time it was really hard to find a jre for arm debian except for icedtea, which isn't as compatible with some things as the oracle release hopefully is.
here is the post including a download link for the jre.
another post by the same user points to an arm-friendly java7 download as well.
thank you Fabry.
official Oracle java jdk now released for ARM Linux!
download page
editbsolete.
since the sun java6 jdk is available for download to arm devices through debian apt-get, but it has a set of binaries which won't work on the armv6, someone enterprising might be able to patch the jre binaries into the jdk for a usable armv6 jdk.
/end edit
edit:
to use the 1.6 jre...
download it from Oracle
copy it to /opt in your armel debian install (or chroot)
untar it there
Code:
cd /opt
tar -xzvf ejre-1_6_0_25-fcs-b06-linux-arm-vfp-eabi-headless-14_apr_2011.tar.gz
ln -s /opt/java/ejre1.6.0_25/bin/java /usr/bin/java
thank you Dak.
after that, you should be able to use java at the command line.
further down in the first linked thread are instructions for linking the jre to fennec, probably adaptable to iceweasel.
edit:
newer JDK!
JDK 8 (with JavaFX) for ARM Early Access
for armv6 hard float applications. Installation instructions for the Raspberry Pi are linked from that page. You have to accept a license agreement.
I know this was quite a long time ago, but you state that sun-java6-jdk is in debian repositories for arm, but I am not finding it.
Is there a download link for sun-java6-jdk on arm?
Hope you see this.
Take care man. And thanks for the great info!
DiehlC said:
I know this was quite a long time ago, but you state that sun-java6-jdk is in debian repositories for arm, but I am not finding it.
Is there a download link for sun-java6-jdk on arm?
Hope you see this.
Take care man. And thanks for the great info!
Click to expand...
Click to collapse
It showed up back then when google searching for the package, but apt-get won't bring it in because of the jre dependency it can't fulfill.
they must've realized and removed it.
It may be possible to get the x86 .deb and repack it with the jre binaries or something... I actually had it installed on some chroot on my android phone to try building the android emulator on-device (which eventually worked, but the dang thing wouldn't boot in qemu.)
I'll dig around and see if I've still got it, but no guarantees.
bigsupersquid said:
It showed up back then when google searching for the package, but apt-get won't bring it in because of the jre dependency it can't fulfill.
they must've realized and removed it.
It may be possible to get the x86 .deb and repack it with the jre binaries or something... I actually had it installed on some chroot on my android phone to try building the android emulator on-device (which eventually worked, but the dang thing wouldn't boot in qemu.)
I'll dig around and see if I've still got it, but no guarantees.
Click to expand...
Click to collapse
I reolize this topic is a bit older but thought it would be worth letting you all know that installing orical's Java is way easier on Android running Linux. I've been at it awile and have a script set up to fully install the soft float version of JDK 7 and am working on a downloader script (it is actually a tall order reliably downloading the source from orical reliably) to incorperate in when debugged. Eventually I'll be testing/writing one for hard float versions too but for now you all can find what has been tested as working with "Debian Kit" from here https://github.com/S0AndS0/Debian-Kit-Mods check the readme for how to modify for your preferred version of Java and enjoy
Update 02272014- the java downloading script I mentioned earlier is now ready for testing; you may use it to download jre or jdk either hard float or soft float (4 options) and the installer script has been updated for soft float jdk version 7u51. I'll be working on making the download script call up the installer scripts today too
Update 03032014- try the "ARM_Linux_Mods" script in the above github; it will step you through the download and installation of Java JDK soft or hard float.
bigsupersquid said:
woo, I found this gem on a search and ended up at talk.maemo.org in the n900 section.
oracle released an armv6/armv7 headless 1.6 jre binary set! way back in april, but I hadn't seen it until today.
works in debian squeeze on my armv6 (msm7627) optimus v... it runs, but I haven't put it through its paces yet for any real testing.
I thought someone might enjoy this since for a long time it was really hard to find a jre for arm debian except for icedtea, which isn't as compatible with some things as the oracle release hopefully is.
here is the post including a download link for the jre.
another post by the same user points to an arm-friendly java7 download as well.
thank you Fabry.
official Oracle java jdk now released for ARM Linux!
download page
editbsolete.
since the sun java6 jdk is available for download to arm devices through debian apt-get, but it has a set of binaries which won't work on the armv6, someone enterprising might be able to patch the jre binaries into the jdk for a usable armv6 jdk.
/end edit
edit:
to use the 1.6 jre...
download it from Oracle
copy it to /opt in your armel debian install (or chroot)
untar it there
Code:
cd /opt
tar -xzvf ejre-1_6_0_25-fcs-b06-linux-arm-vfp-eabi-headless-14_apr_2011.tar.gz
ln -s /opt/java/ejre1.6.0_25/bin/java /usr/bin/java
thank you Dak.
after that, you should be able to use java at the command line.
further down in the first linked thread are instructions for linking the jre to fennec, probably adaptable to iceweasel.
edit:
newer JDK!
JDK 8 (with JavaFX) for ARM Early Access
for armv6 hard float applications. Installation instructions for the Raspberry Pi are linked from that page. You have to accept a license agreement.
Click to expand...
Click to collapse
I'm working on AOSP. I copied all extracted tar file to somewhere inside system folder. When I type
Code:
java -version
It says:
Code:
/system/bin/sh: java: No such file or directory
But it exist!
In other side, I typed
Code:
ln -s /system/ejre1.6.0_25/bin/java /usr/bin/java
and it said:
Code:
4 /system/linux_arm_sflt/jre/bin/java 4 /system/bin/java
What should I do now?
UPDATE:
When I run java directly Or symbolink), it says:
Code:
/system/bin/sh: java: can't execute: Permission denied
And when I run it with busybox, it says:
Code:
java: applet not found
UPDATE:
Even when I root my device, I get above errors.
dr_jacky_2005 said:
thank you Dak.
after that, you should be able to use java at the command line.
further down in the first linked thread are instructions for linking the jre to fennec, probably adaptable to iceweasel.
edit:
newer JDK!
JDK 8 (with JavaFX) for ARM Early Access
for armv6 hard float applications. Installation instructions for the Raspberry Pi are linked from that page. You have to accept a license agreement.
I'm working on AOSP. I copied all extracted tar file to somewhere inside system folder. When I type
It says:
But it exist!
In other side, I typed
and it said:
What should I do now?
UPDATE:
When I run java directly Or symbolink), it says:
And when I run it with busybox, it says:
UPDATE:
Even when I root my device, I get above errors.
Click to expand...
Click to collapse
you have to run Java in a Linux chroot.
Android shell can't handle it (system/bin/sh is definitely Android path)
bigsupersquid said:
you have to run Java in a Linux chroot.
Android shell can't handle it (system/bin/sh is definitely Android path)
Click to expand...
Click to collapse
What do you mean by run it in a Linux chroot?
If you means run it after type SU command, I did.
I root my device, then I can use su command in shell.
But if you means something else, please explain more in detail.
Thanks.
dr_jacky_2005 said:
What do you mean by run it in a Linux chroot?
If you means run it after type SU command, I did.
I root my device, then I can use su command in shell.
But if you means something else, please explain more in detail.
Thanks.
Click to expand...
Click to collapse
here's an example of how to use a chroot for Nexus 10
you can also look up lil debi, linuxonandroid, and variations of "chroot (debian, Ubuntu) on Android" with Google, for more information.
bigsupersquid said:
here's an example of how to use a chroot for Nexus 10
you can also look up lil debi, linuxonandroid, and variations of "chroot (debian, Ubuntu) on Android" with Google, for more information.
Click to expand...
Click to collapse
All of these installed a virtual Linux that can access with VNC!
But I want to put java binary and its libraries in my Android source, and compile it; then run my jar file with for wxampel installed terminal amulator.apk, or from PC (adb shell command).
Is that possible?
dr_jacky_2005 said:
All of these installed a virtual Linux that can access with VNC!
But I want to put java binary and its libraries in my Android source, and compile it; then run my jar file with for wxampel installed terminal amulator.apk, or from PC (adb shell command).
Is that possible?
Click to expand...
Click to collapse
probably not. the Java binary relies on Linux libraries, like libc instead of bionic. not seen anything about running Java under Android except for their dalvik java.
bigsupersquid said:
probably not. the Java binary relies on Linux libraries, like libc instead of bionic. not seen anything about running Java under Android except for their dalvik java.
Click to expand...
Click to collapse
Do you mean if I install a buildroot on my device, or pure linux from first (there is no android on my device anymore), then I can use JRE for armv7 and run a jar with GUI?
dr_jacky_2005 said:
Do you mean if I install a buildroot on my device, or pure linux from first (there is no android on my device anymore), then I can use JRE for armv7 and run a jar with GUI?
Click to expand...
Click to collapse
I've not had tons of luck getting Linux to run natively on devices, but if you can do it, yes that should work.
i like enlightenment as gui (e17) for debian on mobile device, if you're going that way.

[Linux/Mac] ADB & Fastboot (Un)Install Script [Team BlueRidge]

[Linux/Mac] ADB & Fastboot Install Script
I have created a script to be used to install ADB and Fastboot on a Mac or a Linux computer. Simply run the script in Terminal or a similar application and it will copy ADB and Fastboot to /usr/local/bin/
Also, as of Version 3.1 this also installs the JDK for Linux-based systems.
While advanced users probably won't need this, it would be good for new users who need help using the ADB and Fastboot commands.
You can see the source at GitHub.
Download
If you have any problems or errors, let me know.
Changelog:
20171202
Moved entirely to GitHub
On Debian-based Linux, installs the adb and fastboot packages
Other systems, the binaries are pulled from Google's website
Executables are given +x permissions
Version 5.0
Hosted on GitHub and Google Code
Uses latest adb and fastboot (as of April 3, 2014)
Install to /usr/local/bin/
Version 4.1
Uses cp rather than mv
Hosted on GitHub again
Team BlueRidge project
Version 4.0
Now installs adb and fastboot to /usr/bin/ which is a more appropriate directory for the files.
Includes Readme now!
Version 3.1
Added JDK Install for Linux
Version 3
Created separate scripts for Linux & Mac
Updated uninstall script
Version 2.1.1
Fixed errors in installer
Version 2.1
More code efficient.
Better comments in script.
Version 2
Combined installer scripts into one Universal
Updated Uninstall.sh to remove udev rules
Version 1.1
Added udev rules for Linux
Version 1
Initial release
Linux
Didn't work on linux, I suggest making a seperate script for linux, I believe the problem is where it detects linux. It gets sudo but nothing more. I ran each command by itself under linux and it worked. Thanks.
shootind5nukes said:
Didn't work on linux, I suggest making a seperate script for linux, I believe the problem is where it detects linux. It gets sudo but nothing more. I ran each command by itself under linux and it worked. Thanks.
Click to expand...
Click to collapse
Thanks! I'll fix that and post an update soon!
JDK is now installed on Linux systems!
Now hosted on Google Code rather than GitHub.
Now installs to /usr/bin/, which is a more appropriate directory as these files are not required for normal system booting or are required for the general functions of your operating system.
i know this thread is old but i need some help.
my devices are not showing up after running the script.
i used adb devices and ./adb devices
boneskid1 said:
i know this thread is old but i need some help.
my devices are not showing up after running the script.
i used adb devices and ./adb devices
Click to expand...
Click to collapse
Does it say that ADB is not found or your devices?
Try enabling ADB (USB Debugging) on your device if it says no devices were found.
Gingerbread: Settings>Applications>Development>USB Debugging
Ice Cream Sandwich: Settings>Developer options>Android debugging
Thanks!!!! This worked perfectly. Using Ubuntu 11.10.
romuloxiii said:
Thanks!!!! This worked perfectly. Using Ubuntu 11.10.
Click to expand...
Click to collapse
I'm happy I could help! Don't forget to click "Thanks" if you liked it!
If you have any issues in the future with it, please feel free to let me know!
Good news!!! This is now a Team BlueRidge project and is on Team BlueRidge's GitHub
since tar.gz files are linux that means I download the zip file on my mac right? sorry if the question is obvious
prflash3 said:
since tar.gz files are linux that means I download the zip file on my mac right? sorry if the question is obvious
Click to expand...
Click to collapse
Download whichever for whichever platform. It's the script inside that you use that matters.
Trying to run the script on OSX, but when I am prompted to enter my password I can't type anything. Please help.
Ditto ul49, being prompted for a password, please advise
Simply type your account password. It won't look like anything is being typed but it is. This is how the "sudo" command works. It is for security.
really glad i found this.
i run "sh "sh script name" and i get this error
ADB-Install-Linux.sh: 5: ADB-Install-Linux.sh: Syntax error: newline unexpected
not sure if it's installed or what
thanks for making this set of scripts and if u could advise me on that error id be grateful.
---------- Post added at 05:46 PM ---------- Previous post was at 05:44 PM ----------
crazy
apt-get install android-tools-fastboot
and
apt-get install android-tools-adb
worked
Just released the first update in two years. Sorry to leave this project unmaintained. The files are now hosted by Team BlueRidge as Google Code no longer supports downloads.
First, thank you very much for putting this together for fellow users. While I'm not the most savy of guys I thought I might just share my experience while installing this ADB + Fastboot package on my MacBook Pro (mid 2012) running OS X Mavericks 10.9.3 in the hopes that somebody might benefit from it as well.
So here it goes:
I tried running the installation script found in "Androidv5.zip" which up until now is the latest version (I think). The script failed to install:
"This will install ADB and Fastboot on your computer.
Root Permissions required. Please type your password.
Password:
Changed directory to /Users/User/Downloads/Androidv5
Moving ADB
cp: /usr/local/bin/adb: No such file or directory
ADB Moved to /usr/local/bin/adb
moving Fastboot
cp: /usr/local/bin/fastboot: No such file or directory
Fastboot moved to /usr/local/bin/fastboot
You may now run Android Debug Bridge and Fastboot commands
Have a nice day."
So I figured I'd open the script file and run each command manually but they would still not work. I then decided to open the target directory
from terminal and it couldn't find it either, so I openned the /usr/ directory to find where the /bin/ directory was... and I found it at | /usr/bin | instead of | /usr/local/bin |.
I ran the commands in the script again manually one by one with the target directory set to | /usr/bin | and then closed terminal and reopened. After that I tried running "adb devices" and the output was "permission denied".
I then applied a "chmod 775 /usr/bin/adb" "chmod 775 /usr/bin/fastboot", closed & reopened terminal and voilà it worked!
Again I'm not a savy guy... there might probably be a better way to do this or perhaps I didn't run the install script as it was supposed to but anyway I decided to let you guys know how it went just in case it proves useful to somebody else....
Then again thanks a lot for sharing this! I finally have ADB + Fastboot on my Mac without having to nag about downloading the Android SDK. :laugh: :good:

[Q] cannot run MyFirstApp on windows 7 with adb and AVD

It seems it is not an easy thing to start android development. I followed the official instruction and tried to run the MyFirstApp example from developer.android.com on my Windows 7 64bit machine with AVD. But after 2 days effort, I am still cannot make it work for me in Eclipse and in adb command line.
The best I reached in command line approach is the following -- the second block with italic words shows the error I got:
Code:
E:\Workspace\MyFirstApp>ls bin
AndroidManifest.xml build.prop
AndroidManifest.xml.d classes
MyFirstApp-debug-unaligned.apk classes.dex
MyFirstApp-debug-unaligned.apk.d classes.dex.d
MyFirstApp-debug.apk dexedLibs
MyFirstApp.ap_ proguard.txt
MyFirstApp.ap_.d res
[I][B]E:\Workspace\MyFirstApp>adb install bin\MyFirstApp-debug.apk
failed to copy 'bin\MyFirstApp-debug.apk' to '/data/local/tmp/MyFirstApp-debug.a
pk': No such file or directory
rm failed for /data/local/tmp/MyFirstApp-debug.apk, No such file or directory[/B][/I]
I hope somebody can help me about these:
1. I am in Windows with AVD, why adb want to find /data/local/tmp, which is linux style location?
2. where does the adb try to copy the apk file to? My SDK is installed under "C:\Users\myname\AppData\Local\Android\android-sdk". There is no space in the address path. The source apk file is ready and should not be the cause of that error, I think.
3. Any configuration of the installed SDK needs to be modified in Windows machine? I think the SDK manager should be able to figure out what the machine is and download/install appropriate components for the user. Is that right?
I have similar or the same issue by using Eclipse.
thanks,

Categories

Resources