Using Linux Mint instead of Windows...(SOLVED!!) - EVO 4G Q&A, Help & Troubleshooting

SOLVED! Followed the Guide in Post #5, than kept getting an error saying libncurse.so.5 cannot be found. I than opened the Package Manager and downloaded everything in the sun-java6-sdk and anything related to it. Than searched for anything of libncurse and installed those. than got a libc++ (or similar) missing than went back to Package Manager and download anything with libc++ in it. Afterwards, ran fine.
One quirk, as I'm sure this will be general knowledge to any Linux user but I am still a newbie at it. In root # i had to do ./adb to run the command, running just # abd gave me errors, exiting root back to $ alowed me to just use $ adb and not have to do ./adb
I know it's pretty shoddy, I think i downloaded 250MB of stuff I'm not sure I need. lol. I searched for the libncurse.so.5 file and had a lot of em, i think the package that actually did the trick was a ncurse32bit package, as I am on a 64 bit system. So take that into consideration
downloaded the android sdk, extracted it, however, when i use terminal and goto the tools folder and use adb
i get...
[email protected] /usr/bin/android-sdk/tools $ adb
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'aub' from package 'aub' (universe)
Command 'dab' from package 'bsdgames' (universe)
Command 'zdb' from package 'zfs-fuse' (universe)
Command 'mdb' from package 'mono-debugger' (universe)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'ab' from package 'apache2-utils' (main)
adb: command not found
Click to expand...
Click to collapse
I read something about adding it to path, and i went into my .profile and added in the :/usr/bin/android-sdk/tools after the $PATH yaddayadda but it still didn't work.
Any help is appreciated. This is really the only thing keeping me from wiping the 120gb partition for Win7 and using Linux only(which only has a 21gb partition)

Nrre said:
downloaded the android sdk, extracted it, however, when i use terminal and goto the tools folder and use adb
i get...
I read something about adding it to path, and i went into my .profile and added in the :/usr/bin/android-sdk/tools after the $PATH yaddayadda but it still didn't work.
Any help is appreciated. This is really the only thing keeping me from wiping the 120gb partition for Win7 and using Linux only(which only has a 21gb partition)
Click to expand...
Click to collapse
Since the android sdk doesn't actually install on your computer but placed there by you, you must make sure everything is in place for it to work properly. I am relatively new to linux myself, but this is what i've done to get it working properly:
create /etc/init.d/adbd
you will need to do this as root.
Code:
gksu gedit /etc/init.d/adbd
paste this into the file
Code:
#!/bin/sh
#
# For ADB deamon (Android Device Bridge)
#
case "$1" in
start)
/usr/bin/android-sdk/tools/adb start-server
;;
stop)
/usr/bin/android-sdk/tools/adb kill-server
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
now run this:
Code:
sudo ln -s /etc/init.d/adbd /etc/rc2.d/S10adbd
What you just did there was make sure adb daemon started as root whenever you booted (if you don't start it as root you will get errors later on down the road)
I'm not sure about mint, but on ubuntu its easier to just add the tools folder to your /etc/environment file.
Code:
gksu gedit /etc/environment
the file should look something like this:
Code:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/bin/android-sdk/tools"
go ahead and reboot just to make sure everything sticks. You should be good from then on.
You could add the path to your profile, but then if you have to run something as sudo, or if you have another user trying to do something similar, it could be a headache. If you don't have a /etc/environment, or if the above still doesn't work, go ahead and see if you have a ~/.bashrc.
edit that:
Code:
gksu gedit ~/.bashrc
add this to the bottom:
Code:
export PATH=${PATH}:/usr/bin/android-sdk/tools
let me know if this works, and if there are any more experienced linux users out there who notice any mistakes of mine, or have better advice please chip in. I just know I went through a huge amount of frustration to get adb to work properly, through much trial and error. this is the culmination of what i went through that was easiest for me. BTW i stole that code for the daemon to startup as root from somewhere else.
EDIT: I just realized my daemon is still not starting on boot? although, with the above script i can start it via:
Code:
sudo service adbd start
someone smarter than me, chip in and tell me what i'm doing wrong?
OP, you can always start the daemon yourself as root by typing
Code:
sudo /usr/bin/android-sdk/tools/adb start-server
EDIT: woops. I fixed the code above, as well as fixed my problem. on creating a link to rc2.d i typed "s10adbd" originally and it should be "S10adbd".
OP, this is a great example why paying attention to capital/lower case letters are super important when learning linux.
i changed my link and everything works on my system.

think i'm still doing it wrong. i didn't have a .bashrc file but i did have a bash.bashrc file.
i know linux mint is based off ubuntu.
here is my command line after doing everything above
richard-laptop richard # /usr/bin/android-sdk/tools/adb start-server
/usr/bin/android-sdk/tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
richard-laptop richard # sudo service adbd start
adbd: unrecognized service
richard-laptop richard # adb shell
adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
Click to expand...
Click to collapse
think i'll take the laptop into work and mess with it tonight.

If you don't setup a your bash file, you can issue adb commands by using standard terminal commands from the /tools directory:
user:~$ ./adb start-server
Click to expand...
Click to collapse
To setup your .bash file, right from Google:
# On Linux, edit your ~/.bash_profile or ~/.bashrc file. Look for a line that sets the PATH environment variable and add the full path to the tools/ directory to it. If you don't see a line setting the path, you can add one:
export PATH=${PATH}:<your_sdk_dir>/tools
Click to expand...
Click to collapse
From terminal, you can run
user:~$ gedit ~/.bashrc
Click to expand...
Click to collapse

Nrre said:
think i'll take the laptop into work and mess with it tonight.
Click to expand...
Click to collapse
Please follow these instructions (source = wiki.cyanogenmod.com):
Ubuntu: Android SDK, ADB, Fastboot.
There are various great tutorials online to help you set these options up for Windows, but the process of setting this up in Ubuntu Linux is rather fragmented across various different forums, and can be rather confusing! This is a tutorial I have put together after having real trouble setting it up myself, after trawling through numerous forums, and getting help from many very helpful folks on various forums including this one!
Tutorial: This will show you how to complete the basic set up of the Android sdk, and then how to enable the 'adb' and 'fastboot' connections so as to allow you to issue commands from the terminal directly to your phone.
Disclaimer: As always, you follow this tutorial at your own risk, nobody is forcing you to! I take absolutely no responsibility for damage to your computer / mobile phone etc. This is the process I have followed, and it is working fine!
Basic Android sdk installation and set-up:
You will need to download the following files before you start:
android_sdk_r05-linux_86.tgz [1]
Fastboot [2]
1. Extract the 'android_sdk_r05-linux_86.tgz' file to your 'Home' folder and rename it to 'sdk' to make things easier later on.
2. Move the fastboot file in to the 'Tools' folder inside the 'sdk' folder.
3. Now right click on both the 'fastboot' and 'adb' files (inside the tools folder) and choose 'Properties' and then the 'Permissions' tab, and ensure they both have the 'allow executing file as program' box is ticked...Now reboot the computer, sorted!
Set up ubuntu to recognize your phone, and the adb/fastboot commands in the terminal
1.Open your 'Home' folder. Press 'Ctrl' & 'H' at the same time to view hidden files, and then open the '.bashrc' file and add the following text to the top of the file:
#AndroidDev PATH
export PATH=$PATH:/home/username/sdk/tools
2.Obviously you will need to replace 'username' with your own...Save the file and exit.
3.Now log-in as root.
3. Navigate to the following directory in the root filesystem: /etc/udev/rules.d/
4. Create the following empty file:
(ubuntu 10.04)
99-android.rules
(ubuntu 9.10)
70-android.rules
(ubuntu 7.10/8.04)
51-android.rules
5. You then need to edit the file with the following text (depending on your version of ubuntu):
ubuntu 7.10/8.04/9.10:
SUBSYSTEM==”usb”, ATTRS{idVendor}==”0bb4”, MODE=”0666”
SUBSYSTEM==”usb”, ATTRS{idVendor}==”18d1”, MODE=”0666”
SUBSYSTEM==”usb”, ATTRS{idVendor}==”22b8”, MODE=”0666”
ubuntu 6.06:
SUBSYSTEM==”usb_device”, SYSFS{idvendor}==”0bb4”, MODE=”0666”
SUBSYSTEM==”usb_device”, SYSFS{idvendor}==”18d1”, MODE=”0666”
SUBSYSTEM==”usb_device”, SYSFS{idvendor}==”22b8”, MODE=”0666”
6. Save this file, and then open the terminal and enter the following command:
chmod a+rx /etc/udev/rules.d/70-android.rules
Change the '70' to '51' depending on your version of ubuntu.
For a list of the vendor ID's go here: VendorID's [3]
7. Now reboot the computer.
8. Open Terminal, and issue the following commands:
su
cd /home/username/sdk/tools/
./adb kill-server
./adb start-server
You will now be able to open a terminal and carry out 'adb' and 'fastboot' commands directly.
Credit and thanks to:
koalaboy, Apostasy, Cloverdale, wddglr, JgeZau.
EDIT: I have followed this tutorial to the letter myself today on my laptop to prove it works, for both yours the reader, and my own peace of mind as the writer! Enjoy, it works flawlessly!
Click to expand...
Click to collapse
I have followed these directions more than once and each time they work flawlessly. This should work with Linux Mint, since Mint's based off Ubuntu.
For Part 4, use Ubuntu 10.04 when creating the empty file and for Part 5, use this SUBSYSTEM: SUBSYSTEM==”usb”, ATTRS{idVendor}==”0bb4”, MODE=”0666” and paste that into your 99-android.rules file.

followed to a T.
not sure how to log in as root, so i just 'run as administrator' i can't find anything on root for this.
i still get the following after i do that entire guide
richard-laptop richard # cd /home/richard/sdk/tools
richard-laptop tools # ./adb kill-server
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
richard-laptop tools # ./adb start-server
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
Click to expand...
Click to collapse

Nrre said:
followed to a T.
not sure how to log in as root, so i just 'run as administrator' i can't find anything on root for this.
i still get the following after i do that entire guide
Click to expand...
Click to collapse
To login in as root, you enter:
Code:
sudo su
As for the "error while loading shared libraries: libncurses.so.5" -- I've never seen that error before. Might be Linux Mint problem? I currently run Ubuntu 10.04 32 Bit.

when i do SU it asks my password and the $ becomes a #
i assume that is root? i dont have to do SUDO i just did SU
yeah if i do SUDU SU i get a 'SUDO command not found'
gonna post this over on the linux mint forums see if they can help me to.

Nrre said:
when i do SU it asks my password and the $ becomes a #
i assume that is root? i dont have to do SUDO i just did SU
yeah if i do SUDU SU i get a 'SUDO command not found'
gonna post this over on the linux mint forums see if they can help me to.
Click to expand...
Click to collapse
Wait... wait.. are you trying to do following instructions on your phone or on your computer?
If you run su on your phone, sure you'll get root (# sign). But the command, sudo su was meant for your computer. The instructions I listed are for your computer with Linux Mint installed.

yeah i'm doing it on my computer =P
if i do SUDU SU it gives me that error, but SU gives me #
so...i was hoping it'd all be teh same since Mint is based off ubuntu and half my updates are ubuntu files.

[email protected] ~ $ sudu
No command 'sudu' found, did you mean:
Command 'sudo' from package 'sudo' (main)
Command 'sudo' from package 'sudo-ldap' (universe)
Command 'tudu' from package 'tudu' (universe)
sudu: command not found
[email protected] ~ $ SUDU su
SUDU: command not found
[email protected] ~ $ SUDU SU
SUDU: command not found
Click to expand...
Click to collapse
so, not sure what else to do.

sudo
not sudu

elegantai said:
sudo
not sudu
Click to expand...
Click to collapse
balls, well i still get the same result after i go through and make all the changes and use SUDO SU instead of just SU, i get the same prompt with #
this is still my end result.
richard-laptop richard # cd /home/richard/sdk/tools/
richard-laptop tools # ./adb kill-server
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
richard-laptop tools # ./adb start-server
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
Click to expand...
Click to collapse
makes me feel like i'm missing a file somewhere. i did download the newest android sdk and not the older version that is in the guide. but i still installed the packages for android 2.1 and 2.2
suppose i'll delete it all and start over.
EDIT: Went through, put in proper vendor IDs and noticed i put Richard in the Path and not richard, still, says it's missing the same "libncurses.so.5" so...not sure what to do. =/

I don't know that error either, but looking at this thread:
http://bbs.archlinux.org/viewtopic.php?id=66878
sounds like it could be a java issue? Didn't think to ask, have you installed the java sdk? which version of java are you running?

now that i think about it...i don't believe i downloaded a new java...
the worse news is my win7 got corrupted somehow =P so now i only have Linux so time to dig in and try this out.
I'd download the stuff now but I'm tethering through my phone so i'm lucky to get 600kbps download speeds in this reception area.
I could step 10 feet outside and hit 1200kbps though. So i formatted the HD and reinstalled Linux Mint. Once i get home I'll look into the JDK as that makes sense now that I think about it to.
EDIT: Should I install Eclipse also? Installing Android SDK and Java6 JDK right now. I really just want to use ADB for now to send commands to phone etc.

No need for eclipse.. That's just for actual development

ADB Error: /home/richard/sdk/tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
'adb start-server' failed.
Click to expand...
Click to collapse
this shows up int he Android SDK/AVD manager as i install all the packages...
EDIT: opened up software manager, and downloaded every sun-java package, than installed everything that showed up when i typed libncurses ... once it's done will reboot and try again =P
2nd EDIT: i decided to search for libncurses.so.5 and i have 3 of em, one in usr/lib, /lib64 and something else.
so..not sure where else to put it, went into synaptics thing or something and downloaded ncurses32bit as i noticed none of my lib32 folders had it...giving it a go.
btw... my .bashrc is .profile, i copied .profile and renamed it to .bashrc and my prompt stopped showing up in terminal...linux is so weird.
3rd EDIT: Just isn't meant to be. got to ./adb kill-server and instead of missing the libncurse.so.5 i am now missing..
richard-laptop tools # ./adb kill-server
./adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Click to expand...
Click to collapse
off i go to hunt this package down

it's working...finally
however...
richard-laptop tools # adb devices
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'aub' from package 'aub' (universe)
Command 'dab' from package 'bsdgames' (universe)
Command 'zdb' from package 'zfs-fuse' (universe)
Command 'mdb' from package 'mono-debugger' (universe)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'ab' from package 'apache2-utils' (main)
adb: command not found
richard-laptop tools # ./adb devices
List of devices attached
HT*********** device
Click to expand...
Click to collapse
i have ot do ./adb and not just adb
EDIT: exit su, and in $, lets me just do adb.
THANK YOU EVERYONE <3 Wish I could +rep or Thanks your post here.!!
changed title to reflect it. was a good 'thrown under the bus' into linux. now to read up more on it. w/out losing half my CCNA knowledge i've gathered...ha

Enjoy Linux. You'll enjoy it once you get used to it.
Sent from my PC36100 using XDA App

Nrre said:
it's working...finally
however...
i have ot do ./adb and not just adb
EDIT: exit su, and in $, lets me just do adb.
THANK YOU EVERYONE <3 Wish I could +rep or Thanks your post here.!!
changed title to reflect it. was a good 'thrown under the bus' into linux. now to read up more on it. w/out losing half my CCNA knowledge i've gathered...ha
Click to expand...
Click to collapse
Since this has been solved, I would advise posting the resolution on the first page -- so new users are aware of what exactly you had to do to fix it.

Related

How To Use ADB On Mac With Htc Hero

I've spent hours trying to workout how to use adb
I'm using Amon_RA's recovery image and want to run a BART backup but it forces you to use adb, which i can't workout
help please!!!
Did you download the Android SDK for OS X?
Please give us some more information, such as the steps you've taken and any errors or other information you get from the Terminal.
yes i have downloaded the sdk from the website
but everytime i even check what devices are connected etc it fails
i open terminal, drag the tools folder into it, it then ses its created a directory
when i try to put in the commands "adb devices" or "bart" however, it ses there is no such command
do i need to put my phone into recovery, or mass storage or something
im stumped
You need to add the tools directory to PATH variable on your computer
Here's how you do it (the alternative way is easier):
Run this in Terminal
Code:
cd
nano .bash_profile
a text editor will open. add this:
Code:
export PATH=${PATH}:/path-to-android-sdk/tools
where you replace "path-to-android-sdk" with the real path.
Alternatively you could run this command in the terminal:
Code:
echo -e "\nexport PATH=${PATH}:/path-to-android-sdk/tools" >> .bash_profile
What you have done is to tell the shell to also look inside the tools directory when entering a command
Oh, in addition to Repp's suggestions, I know in Linux (and I dunno about everyone else) I need to be root to run adb properly. So maybe become root on the Mac. To do so, you need to be an Admin user, not a regular user, and at the Terminal, type
Code:
sudo -s
and then enter your user password when prompted.
okay ive done that, i dont know if it came back with the right response tho
i tried the first method and got into the text editor, i then typed what you said and it returned no response, i dont know if this is correct?
if so what do i do next?
Rather than altering your path, you can also navigate to the sdk/tools directory and run adb like so:
Code:
./adb devices
But you have to be inside the directory where the "adb" command lies.
Also, see my note above regarding root users.
Aah sorry. Just save and exit (press Ctrl+X and answer yes to whether or not you want to save). You could also try the alternative way.
craig0r said:
Oh, in addition to Repp's suggestions, I know in Linux (and I dunno about everyone else) I need to be root to run adb properly. So maybe become root on the Mac. To do so, you need to be an Admin user, not a regular user, and at the Terminal, type
Code:
sudo -s
and then enter your user password when prompted.
Click to expand...
Click to collapse
I have always used it as normal user and it has worked. Don't know why you would need to be root
how dyou get into the directory?
i usually just drag the tools folder into terminal.
is this correct?
DaNiEl FrEnCh said:
how dyou get into the directory?
i usually just drag the tools folder into terminal.
is this correct?
Click to expand...
Click to collapse
At the Terminal type
Code:
cd /Users/YourUserName/path/to/android_sdk/tools/
./adb devices
Repp said:
I have always used it as normal user and it has worked. Don't know why you would need to be root
Click to expand...
Click to collapse
Yeah, it's weird, but it works for me.
You change directory in the terminal with the command cd. So if I wanted to go to the Desktop directory I would write:
Code:
cd ~/Desktop
(~ is like a shortcut for your home directory which is the same as the directory /Users/your-username)
Did any of the methods work (they should )?
to repp, ive done that, all i need to know now is how to use the bart backup function from Amon_RA's recovery image, in adb
craig0r said:
Yeah, it's weird, but it works for me.
Click to expand...
Click to collapse
And it doesn't if you're not root?
DaNiEl FrEnCh said:
to repp, ive done that, all i need to know now is how to use the bart backup function from Amon_RA's recovery image, in adb
Click to expand...
Click to collapse
And it worked?
Unfortunately I have never done that so I can't help you there
how can i check if it worked?
Just run adb from any directory which is not the tools directory.
For example:
Code:
cd
adb devices
where the first line (cd) changes directory to your home directory (the command cd without a path does that) and the other one should list connected devices. As long as it doesn't say
Code:
-bash: adb: command not found
or anything like that, you should be fine
EDIT: If you want to use adb, you don't have to do the "cd" part first. This time only
its working now i can seee what devices i have
Code:
Dans-MacBook:tools Dan$ ./adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT98DL900002 device
but the main reason i want to use it, is to use it with Amon_RA's recovery
i neeed to do a BART backup so i can switch from the 2.1 rom from lox too 3.0 from modaco
I have never used BART, but unless I'm mistaken, it does almost the same thing as a nandroid backup (?). You could try that instead. Don't know about Amon_RA, but it's possible from MoDaCo's fastboot (linked to and explained how to install here)
other than that, there's nothing I can do
Repp said:
And it doesn't if you're not root?
Click to expand...
Click to collapse
That's right. Probably something to do with permissions in /dev/. It doesn't bother me enough to go hunting the problem down.

[HOWTO] ADB for Macintosh Users Only for complete beginners!

I AM NOT RESPONSIBLE FOR ANY PROBLEMS YOU CAUSE!
So you are stumbling around XDA and you really want some kind of app or something, but you think you cant because you have a Mac, well I am here to tell you wrong.
The biggest and most used mistake for mac users when trying to use ADB is this:
HTML:
Inas-iMac:~ Hans$ /AndroidSDk/tools
-bash: /AndroidSDk/tools: is a directory
Inas-iMac:~ Hans$
Well this is how you do it!
Watch this!
http://www.youtube.com/watch?v=GLAMG4xU_lE
To make your phone go into debug mode go to settings/applications/development and check debug
DO NOT MOUNT PHONE! Just let it be
I did not go to deep into the process because this is made for complete beginners!
Why not follow the official SDK install instructions and add the path to bash_profile..
developer.android.com/sdk/installing.html#Installing
In my opinion that's not too hard for a newbie.. (i managed to do that) And after doing that you don't need to change directories with cd command, you can just type adb whatevercommand from your home dir which is the default location when you open the terminal.
Drag and drop is a little a fail.... one can add "alias" (linux can do it, probably mac too)
Little How-to:
Code:
$ nano ./bashrc
add and adapt the following line to bashrc:
Code:
alias adb="/home/carbonyle/android-sdk-linux_86/tools/adb"
now you just have to type "adb" from a terminal emulator to run it, eg:
Code:
$ adb shell
# reboot recovery
or
Code:
adb install ./Download/myFavortiteApp.apk
and so on...
ps: we don't need to "adb remount" at worst we can just "adb kill-server" then "adb start-server" if the device is not accessible

I'm lost. Need rooting help.

I'm lost as hell. I found this thread:
http://www.androidpolice.com/2010/06...credible-next/
I did the unrevoked thing and I see this icon called SuperUser Permissions in my app list.
Am I able to proceed and fully root or do I have to re-do the root with the Toast method? This looks too complicated and by the way I tried the ./adb thing on my mac and I get errors saying "No such file or directory".
gqstatus0685 said:
This looks too complicated and by the way I tried the ./adb thing on my mac and I get errors saying "No such file or directory".
Click to expand...
Click to collapse
adb isn't installed on a Mac out of the box; You'll need to go download the Android SDK. Untar it somewhere (I put it in ~/), then open a term, do:
Code:
cents-macbook-pro:~ $ cd android-sdk-mac_86/tools/
cents-macbook-pro:~/android-sdk-mac_86/tools $ ./adb
CentroniX said:
adb isn't installed on a Mac out of the box; You'll need to go download the Android SDK. Untar it somewhere (I put it in ~/), then open a term, do:
Code:
cents-macbook-pro:~ $ cd android-sdk-mac_86/tools/
cents-macbook-pro:~/android-sdk-mac_86/tools $ ./adb
Click to expand...
Click to collapse
Massive Brain Freeze.. What do you mean by "(I put it in ~/)"?
I downloaded the Android SDK already. I understand what terminal is so when I download the Android SDK where do I place it?
Am I pointing terminal to the directory? Android SDK is currently in a folder on my desktop.
gqstatus0685 said:
Massive Brain Freeze.. What do you mean by "(I put it in ~/)"?
I downloaded the Android SDK already. I understand what terminal is so when I download the Android SDK where do I place it?
Am I pointing terminal to the directory? Android SDK is currently in a folder on my desktop.
Click to expand...
Click to collapse
~ in most flavors of Unix/Linux is short for your home directory. In MacOS, ~ is /Users/<username>. *nix pro-tip:
Code:
cents-macbook-pro:~ $ echo ~
/Users/cent
So in my case, ~ is short for /Users/cent.
If it's on your desktop, open a terminal and type:
Code:
cd ~/Desktop/android-sdk-mac_86/tools
-OR-
Code:
cd /Users/cent/Desktop/android-sdk-mac_86/tools
And then you can proceed to issue your adb commands. Just remember to prefix it with "./", which tells MacOS to look in the current directory for the adb command.
Code:
cents-macbook-pro:~/android-sdk-mac_86/tools $ ./adb devices
List of devices attached
HT05RHL1XXXX device
Ok. I think I'm just going to pay someone to do this for me. I'm getting a migraine.
So I'm basically typing the below:
~/android-sdk-mac_86/tools $ ./adb devices (Do I type this in one line)
List of devices attached
HT05RHL1XXXX device
I ran the thing and it doesn't show my phone listed.
I've got the time, if you have the money!
1. Make sure USB debugging is enabled. On your phone, go to Settings -> Applications -> Development, and make sure "USB debugging" is checked.
2. Make sure your USB cable is connected to your phone and computer.
3. Open a terminal
4. Type "cd ~/Desktop/android-sdk-mac_86/tools" and press enter.
5. Type "./adb devices" and press enter.
If it lists your device, you're then good to go to start following the rooting instructions!
You're the best dude. It was the USB debugging that was giving me the problem.
Good deal man, glad you got that part worked out! Have fun getting your root on!
this is the easiest way to do it....it worked for me
http://forum.xda-developers.com/showthread.php?t=701152
Do i have to keep dubugging mode on or can I turn it off before I root it. I did the command:
"cd ~/Desktop/android-sdk-mac_86/tools"
and then
adb push PC36IMG.zip /sdcard (Doesn't do anything. I tried without the space and some stuff popped up. Can I just manually put it on my SDcard?
gqstatus0685 said:
Do i have to keep dubugging mode on or can I turn it off before I root it. I did the command:
"cd ~/Desktop/android-sdk-mac_86/tools"
and then
adb push PC36IMG.zip /sdcard (Doesn't do anything. I tried without the space and some stuff popped up. Can I just manually put it on my SDcard?
Click to expand...
Click to collapse
Debugging mode needs to stay on if you want to use adb. You can turn it off once you root, but it won't hurt to leave it on.
The push command should tell you the number of bytes transfered. You need to make sure that the file you are pushing is in the current directory you're in (tools), or manually enter the path, like "./adb push ~/Downloads/PC36IMG.zip /sdcard"
But yes, you can mount the card as a disk drive and copy the file there in Finder.

How to Root Kindle on Mac or Linux! {video tutorial}

For those of you with Mac OSX or Linux, you can root it using this method:
Step 1. Go to Settings->More->Device and make sure “Allow Installation of Applications” is checked “ON”.
Step 2. Connect your Kindle Fire to your computer via micro-USB cable. And hit “Disconnect” to turn off the USB disk drive mode.
Step 3. Download KindleFireRootMacLinux.zip and unzip to the root directory of your hard disk such as c:\KindleFireRoot.
Download KindleFireRootMacLinux.zip
Step 4. Open up a terminal.
Step 5. Browse to the KindleFireRootMacLinux directory by typing:
cd Downloads/KindleFireRootLinux
Step 6. Type:
mkdir ~/.android
cp adb_usb.ini ~/.android/.
*Note – You might have to add “sudo” for Ubuntu
Step 7. Type:
For Mac:
./adb-mac kill-server
./adb-mac devices
For Linux:
./adb-linux kill-server
./adb-linux devices
If you get a bunch of numbers and letters, that means you are good to go.
Step 8. Type:
For Mac:
sh runmemac.sh
For Linux:
sh runmelinux.sh
Step 9. Your Kindle Fire should do its rooting and reboot.
You can verify you have SuperUser app by going to Settings->More->Applications->All Applications.
Yay!
I do not have anything show up when I do the devices command. I am running a mac.
soundslikemitch said:
I do not have anything show up when I do the devices command. I am running a mac.
Click to expand...
Click to collapse
What do you get?
Did you do this step?
cp adb_usb.ini ~.android/.
soundslikemitch
I had this issue as well and zedomax is correct, you have to make sure that this file resides in your own $HOME/.android folder. While cp adb_usb.ini ~.android/. works you may want to try 'cp adb_usb.ini $HOME/.android` as well. I also had the issue where my fire wasn't being shown while executing ./adb devices which required me to reboot and then it seemed to start getting picked up without issue.
Hope this helps and thanks zedomax for the tutorial
There's a problem with the original instructions: adb needs to be restarted after editing adb_usb.ini. You need to run
./adb-mac kill-server
or
./adb-linux kill-server
to make it work without rebooting your computer.
SifJar said:
There's a problem with the original instructions: adb needs to be restarted after editing adb_usb.ini. You need to run
./adb-mac kill-server
or
./adb-linux kill-server
to make it work without rebooting your computer.
Click to expand...
Click to collapse
thanks forgot to put that in the instructions, fixed!
Moving it to my home folder in .android worked!
But apparently this broke the video store.
No-go for me. Tried all above instructions and nothing shows up in devices. The thing that had me thrown off a bit is the instructions don't exactly match.
I want to follow exactly so is step 6 necessary since the zip file already has the android directory with the file already in it?
soundslikemitch said:
Moving it to my home folder in .android worked!
But apparently this broke the video store.
Click to expand...
Click to collapse
I figured out how to fix the video store. Amazon seems to be looking for the existence of the file /system/bin/su so just rename it if you want to watch videos.
i.e.
Code:
mv /system/bin/su /system/bin/su2
reboot
I am still able to type "su2" and get root and I am able to play videos.
Another solution is installed voodoo OTA rootkeeper (free) from the market place. Once installed you can temporarily remove root, then restart the amazon video service and voila. Once the service is started you can re-enable root for the duration that the service is active (not rebooted) you will have root and amazon video.
you have "mkdir ~.android"
The more common syntax, and what worked for me as your syntax didn't, is:
mkdir ~/.android
This is under Mac OS X 10.6.8
None of these instructions have worked for me, I have spent countless hours trying to do this via Windows (the windows tutorial) and on mac. My device never shows up and it does not root. I have tried restarting my fire, unplugging and plugging back in, etc. I am running Lion 10.7.1. Please help, if possible, pm me so we can chat via Google Chat or something.
Also had the same problem (with Lion 1.7.2 ): Waiting for device...
I used this commands to get it working: (first you have to follow instructions from zedomax step 1-5)
cd downloads/
cd KindleFireRootMacLinux/
mkdir ~/.android
cp adb_usb.ini ~/.android
./adb-mac kill-server
./adb-mac devices
after device is shows up enter:
sh runmemac.sh
After this the KF will reboot and get rooted!
The OSX instructions did not work for me either. I ended up busting out my Windows Laptop and followed the guide and programs from rootkindlefire.com
masterc1111 said:
Also had the same problem (with Lion 1.7.2 ): Waiting for device...
I used this commands to get it working: (first you have to follow instructions from zedomax step 1-5)
cd downloads/
cd KindleFireRootMacLinux/
mkdir ~/.android
cp adb_usb.ini ~/.android
./adb-mac kill-server
./adb-mac devices
after device is shows up enter:
sh runmemac.sh
After this the KF will reboot and get rooted!
Click to expand...
Click to collapse
Doesnt work, it still does not show up under devices and the command runemac.sh just says it is waiting for the device.
I don't know why this may work, but try adding a trailing slash to the cp command; cp adb_usb.ini ~/.android/
Also, this works great under (Sabayon) Linux. Very great little script you have here. Only way it could be easier would be if it did the copying and all that on its own.
The problem I had was that the terminal kept saying "waiting for device." I originally downloaded the "KindleFireRootMacLinux" folder to my desktop. I substituted "desktop" for "download" in the prompts. I tried to root it at least 10 times with no success. The terminal never recognized my kindle. Then I moved the "KindleFireRootMacLinux" folder to the "Downloads" folder and it worked the first time. I'm assuming that some of the code is looking in the downloads folder. Try to move it there and see if that works.
bsoplinger said:
you have "mkdir ~.android"
The more common syntax, and what worked for me as your syntax didn't, is:
mkdir ~/.android
This is under Mac OS X 10.6.8
Click to expand...
Click to collapse
Dude! Thanks so much for pointing out the syntax issue. I tried to do this for nearly an hour... couldn't get it to see my device. But after adding the "/" as you so cleverly suggested, voila. Success!
Thanks a million!
root ran ok
should su show up in apps? Nevermind found it
I searched for the voodoo file and it doesn't show up in the app store. If its on the Android Market then I guess you'd have to download and install that first right?
EDIT: which is explained here - how to get market on fire
http://forum.xda-developers.com/showthread.php?t=1349902

(Guide) How to logcat, ADB, shell, etc

ADB:-
Android Debug Bridge
Very useful program made itself by Google for Programmers and developers. Its based on command line and basically communicates with your Android to respond to certain commands. There is vast amount of knowledge about adb but its most useful commands limit to getting:-
Logcat:-
A real time log of what is happening in background of our devices. It is really useful for developers to see which component has malfunctioned and helps to narrow down their search for what failed and what needs to be fixed. Several times users are asked to give logcats of their devices which are giving errors. We will go in detail that how to get logcats in every and easiest way possible.
App Installation and Management:-
adb proves really handy if you want to install apks directly from your PC or want to batch install or delete them.
Shell Execution:-
You must have heard of Terminal Emulator. It is an app for android to execute shell commands(linux commands) which are basically present as applets in /system/bin, /system/sbin or /system/xbin(in our case) folders. A very imporant applet called busybox is installed there mainly used for execution of basic commands during root browsing or ROM installation. Many times updater script of ROMs use busybox commands to install it. Well, these commands can be initiated from your device too but they can be initiated from adb also making it easy for programmers.
Pushing and Pulling:-
Most used commands of adb. adb makes it a piece of cake for new device developers to get an ideo of structure and basic knowledge of devices by pulling command. We can pull out i.e copy any files or folders from our devices to our PC, even the root directories without rooting the devices. It help rooters and ROM chefs of new devices to get an idea and implement their mods on them. Pushing is also very useful command. It copies your files and folders from PC to your device. Very useful in pushing some /system apps and other things
Remounting and setting permissions
Basic commands:-
Of-course basic commands such as reooting and rebooting in recovery ode and download mode are supported.
Others:-
There are several other features of adb such as fastboot, aapt, etc
Setting up ADB
Pre Requirements:-
A little amount of brain
PC(This is a windows guide, if asked I will add linux and mac guide later)
Java Runtime environment or Java Developing kit
Your Device Drivers
An Android Device
Assuming you all these ready and working properly, we continue
If you are having trouble completing Pre-Requisites, there are several guides featuring them too
Start
1. First Download Android SDK. Roughly about 70 MB
2. There may be any compressed zip file or exe file
If zip file, then extract it to C:\android-sdk
If exe file then double click on it and install it in C:\ Drive(or any other drive you want)
3. Now to get adb and other tools, you need to download 'Platform Tools'
To download them, go to the android-sdk folder and double click on SDK Manager
It will ask you which package to download? However, it is your choice which package to Download, but here, we will only talk about platform
Tools. So, simply tick on Platform Tools and click on install. Once you have done it. Go to the platform-tools folder in the directory where you installed android-sdk. You will find several files there like adb, fastboot, aapt, etc
4. Now, you can backup the whole folder of android-sdk to any external storage that will make you not download package
again if you want to. You can have it placed in any computer and run it as it does not require registry to work
5. Now, you are just one step away from using adb. Next step is SKIPPING SETTING ENVIRONMENT VARIABLE
Many guides on internet say that it is to be done for making it easy for users and if you have some basic knowledge of Command Prompt,
you will know that to execute any application with command prompt, you first need to change the directory to the one where application is
placed. And to skip changing the directories every time you open CMD, you need to put that application is environment variable. Howeve, we will not do so.
6. Type cmd in the search bar. Copy cmd.exe from there. Go to the directory where you have installed android-sdk. Go to platform-tools folder. Paste cmd there, right click on it and in the settings, select Run as Administrator.
7. You are done. Now what to do in it?
ADB Commands
Type adb in command prompt. And several commands will show up on your screen. It is very difficult to analyse these all commands, so we will only talk about most used and important commands
Connect your device via USB cable
And open the CMD in platform-tools folder(Make a shortcut of it on desktop). And type the suitable commands
Code:
adb devices
Will show the list of devices attached to the PC andtheir serial numbers. If this shows up correctly on your PC, then it means that everything is fine for continuing.
Logcat
Code:
adb logcat
It will display the real time log of your device
Best time to do it is when your device boots up
Now, many users ask me how to copy the logcat and upload it from CMD
There are several methods:-
1. Right click on the Title Bar of Command Prompt. Hover the cursor over edit and select mark. Select all the things you want to copy and then click enter. All the things will be copied to clipboard.
2. This is the correct way of getting logcat saved.
Code:
adb logcat > logcat.txt
This command will create a logcat.txt document in platform-tools folder with the complete logcat of the device. Ofcourse you can type any name instead of logcat.txt
3. I prefer taking logcat this way as it neatly compiles logs of different time
Code:
adb logcat -v long > logcat.txt
This is a very nice way to get logcat.
Installing Apps
Code:
adb install %PATH OF APK%
This will install an app on your Android
For example, if my app AreeB.apk is in G:\ drive (G:\AreeB.apk)
Then I will type
Code:
adb install G:\AreeB.apk
Be sure your apk is not in a folder that has space in its name, else the command will break at space bar.
For eg:-
G:\Program Files\AreeB.apk
Mounting
However, I never found any problem in tweaking with system files with adb, but some users said that they couldn't do it, so the problem was that their system partition was mounted as Read Only(R/O)
So, it is necessary now to tell how to mount system partition as Read Write(R/W)
Code:
adb remount
It is easiest way to do so, if it does not work then
There is another method that we will discuss in ADB Shell commands section
Pushing and Pulling
For pushing,
Type
Code:
adb push %PATH TO BE PUSHED% %PATH WHERE TO BE PUSHED%
Suppose I have an app named SystemUI.apk(PATH = G:\SystemUI.apk) which I want to push in /system/app/ on my android(or in other words, install an app as a system app). Then I would type
Code:
adb push G:\SystemUI.apk /system/app/
More examples
G:\Dance.txt file to be pushed in Dance folder in sdcard
Code:
adb push G:\Dance.txt /sdcard/Dance/
OR
Code:
adb push G:\Dance.txt /mnt/sdcard/Dance/
G:\Movies folder to be transferred in SDCARD in Videos Folder
Code:
adb push G:\Movies /sdcard/Videos/
G:\system\framework\framework-res.apk to be pushed in /system/framework/
Code:
adb push G:\system\framework\framework-res.apk /system/framework/
For pulling,
push command replaces with pull and paths are swapped
Code:
adb pull %PATH TO BE PULLED FROM% %PATH TO PLACE PULLED FILE%
Example,
All system apps are to be pulled to G:\ROM\system\app
Code:
adb pull /system/app G:\ROM\system\app\
build.prop to be extracted to desktop
Code:
adb pull /system/build.prop C:\Users\Areeb\Desktop\
However, if a folder is in platform-tools folder, you don't need to type full path
Suppose if I type
Code:
adb pull /system/ system
Then a folder named system will be created inside platform-tools with all the files in system in it
If a file is in platform-tools folder, then also no need to type full path
For example,
There is an app name DeskClock.apk in this folder then, to push it to /system/app, type
Code:
adb push DeskClock.apk /system/app/
ADB Shell Commands
This mode of adb allows you to execute linux shell commands from your PC
These commands can aldo be executed through the mobile using Terminal Emulator
To initiate shell mode
Type
Code:
adb shell
You will get an prompt like this
sh-3.2#
Now you are in shell mode
adb commands won't work here and a new set of commands will work here. But we will only go in a little detail here.
Assuming you are in adb shell mode, I will only type commands that will work on shell. Note:- These commands won't work if you type them alone on cmd. But, these command will directly work on your mobile's Terminal Emulator
As these commands can also work on mobile, I am going to tell you a way of taking logcat on mobile
Type
Code:
logcat
You will see log of your device
To save this
Type
Code:
logcat > /sdcard/log.txt
A file named log.txt will be generated in sdcard
Uninstalling Applications
Code:
cd /data/app
This will change the directory to /data/app
Code:
ls
This will show the list of files in there
Suppose, there is an app named com.opera.browser (Opera Mobile) you want to uninstall it
Type
Code:
rm -r com.opera.browser
This will uninstall the app
Mounting Command:-
Code:
mount -o rw,remount system /system/
Miscellanous commands:-
su: Initiates root request
du: Shows files, folders and size
date: Shows todays date
surfaceflinger: Shows your bootanimation (Tested on GB)
grep: Used to search through text files
chmod: Sets permission to files
sh: Initiates shell mode
echo: Displays the text you wrote with the command. Analogous to PRINT command on QBasic
Forgot next ones, will write later
Credits
Google: For Android and several searchings
Samsung: For Galaxy Ace s5830I
Broadcom: For their Open Sourceness
XDA Forums : For the precious knowledge
My Uncle: For gifting me this Phone
My Teachers: For teaching me English(I would not be here without them)
You: For future Thanks
Till now, thats it, will add some more things later
If any problem, I will add it too
Suggestion? They are welcome
Nice thread , every thing is very clearly stated.
Thx, Nice guide.
I suggest to change the 'remount' command in:
mount -o remount,rw /system
As the effect is the same and it works universally (at least, should)
Sent from my GT-5660 using xda app-developers app
ItachiSama said:
I suggest to change the 'remount' command in:
mount -o remount,rw /system
As the effect is the same and it works universally (at least, should)
Sent from my GT-5660 using xda app-developers app
Click to expand...
Click to collapse
I use the command you mentioned every time. Thanks for reminding. I can't remember why I wrote that command there!

Categories

Resources