Hey Guys,
I ported this based off the sticky.
I have not tested as i dont have a epic. But it should work just fine.
http://www.mrcellphoneunlocker.com/one_click_root_epic.tar.gz
shabbypenguin
http://www.mediafire.com/?hk59z8j5dve6tgf
its a cleaned up version specifically for linux users running bash shell
Let me know.
Thanks!
Step 1: Download software
Step 2: untar it.
step 3: chmod 755 run.sh
step 4: put phone in debug mode.
step 5: plug it in.
step 6: ./run.sh
rhcp0112345 said:
Hey Guys,
I ported this based off the sticky.
I have not tested as i dont have a epic. But it should work just fine.
http://www.mrcellphoneunlocker.com/one_click_root_epic.tar.gz
Let me know.
Thanks!
Click to expand...
Click to collapse
Good stuff thank you very much.
Nice I didn't want to install windows again
Let me know how she works.
as, i said have no way to test it. but it should be 100% since its just a port based off a working version.
Walkthough
So I put this in the root of my mac (in the mac hd), now what? What do I run? How do I run the run.sh if that is the file i should run...I put the phone in debug mode...do I need to install drivers? What is next?
Cheers,
N00b
OP updated with step by step. I figured linux/osx users would know what to do
Not yet.....
I tried the step by step and it didn't work.
I run chmod 755 run.sh in terminal and that executed, then did the debug mode for the phone and plugged it in. But ./run.sh - returned no such file or directory...so i rran sh run.sh and then it started running the script but gave the following:
-bash: ./run.sh: /bin/bash^M: bad interpreter: No such file or directory
Jayhover85-MacBookne click root exploit jayhover85$ sh run.sh
run.sh: line 2: ehco: command not found
: command not found
run.sh: line 3: adb: command not found
run.sh: line 4: adb: command not found
run.sh: line 5: adb: command not found
run.sh: line 6: adb: command not found
run.sh: line 7: adb: command not found
: command not found
(127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.045 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.127 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.129 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.127 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.080 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.083 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.126 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.127 ms
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.088 ms
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.042 ms
ping statistics ---
10 packets transmitted, 10 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.042/0.097/0.129/0.033 ms
: command not found
make it RW and move files
: command not found
run.sh: line 13: adb: command not found
run.sh: line 14: adb: command not found
run.sh: line 15: adb: command not found
run.sh: line 16: adb: command not found
run.sh: line 17: adb: command not found
run.sh: line 18: adb: command not found
run.sh: line 19: adb: command not found
run.sh: line 20: adb: command not found
: command not found
set permissions
: command not found
run.sh: line 23: adb: command not found
run.sh: line 24: adb: command not found
run.sh: line 25: adb: command not found
run.sh: line 26: adb: command not found
run.sh: line 27: adb: command not found
: command not found
: command not found
run.sh: line 30: ehco: command not found
: command not found
': not a valid identifieraha
run.sh: line 32: adb: command not found
: command not found
Dont forget to install SuperUser from market
: command not found
: command not found
HELP!!! N00b
You can download the android sdk and then;
cd /HD/androidsdk/tools
Adb server-start
And then follow the instructions to push or adb shell. I did joeykrims on my mac. You have to be in the adb directory of the androidsdk before you can start adb
Sent from my SPH-D700 using XDA App
No dice yet...
I have the android sdk now, and once int he tools folder i tried Adb server-start.....said no such command...
I'd like to use the above one click version as I'm not proficient at push and pull but maybe being a n00b I'm just missing something here.... need a step by step.
Tried: /showthread.php?p=8069686&posted=1#post8069686[/url]
But i'm the last post...where i got the push to start but couldn't get mount to work....thoughts?
Success!
I've used the download link above. I got it working. Not sure if the typographical errors are cosmetic or needed to be fixed. I will say the shell script was in DOS format and there are a few "ehco" commands instead of echo
Got superuser and titanium backup sitting pretty on my new epic 4G.
EDIT:
Follow quote link or click page 2 to get to shabbypengiun's post (can't quote URLs yet as I'm too new.) It includes the required adb binary and a nicely cleaned up script.
shabbypenguin said:
its a cleaned up version specifically for linux users running bash shell
Click to expand...
Click to collapse
here http://www.mediafire.com/?hk59z8j5dve6tgf
its a cleaned up version specifically for linux users running bash shell
shabbypenguin said:
its a cleaned up version specifically for linux users running bash shell
Click to expand...
Click to collapse
Just noticed I can't quote the URL since I'm a new user lol.
Nice work. I was curious if the whole SDK was needed or if you could simply drop in the adb binary. Does it make any difference if the adb binary is from release 6 of the SDK instead of the latest release 7? Just noticed that from your zip. Otherwise an awesome cleanup.
PS. <3 All your base
version 6 should work just fine, honestly not sure if adb needs anything else. i have the sdk installed so it may very well not work if people dont have it. got a guy working on possibly being able to use an apk to inject the code which will make for a universal much easier time for everyone
had to add my own touch in there
shabbypenguin said:
version 6 should work just fine, honestly not sure if adb needs anything else. i have the sdk installed so it may very well not work if people dont have it. got a guy working on possibly being able to use an apk to inject the code which will make for a universal much easier time for everyone
had to add my own touch in there
Click to expand...
Click to collapse
Thanks for the retouch. I just commend in the script. To point to ADB
I figured if you are on linux or osx. you know command prompt
yours had the idea down but even with adb in my bin folder the script was pulling back command not found. some people link it, some create udev some just throw it where-ever. this way here it loads regardless. plus with the adb shell /data/local/root.sh command it kills adb hence why i had to add in pauses, i added a 10 second pause and it would check for devices (on my system it wouldnt pull anything up after that) then it would wait another ten seconds and bam there would be my device.
when noobnl makes a new version of the one click ill update it but im hoping we wont have to have one click root things for much longer and instead can rely on custom kernels.
Speaking of custom kernels...
shabbypenguin said:
when noobnl makes a new version of the one click ill update it but im hoping we wont have to have one click root things for much longer and instead can rely on custom kernels.
Click to expand...
Click to collapse
I just had to play with your script to turn it into a one click andromeda for linux. The zip still has all the original files including the win32 binaries from the stickied release, the only difference is the adb linux binary and a happy run.sh. I'm not sure if it was a previous typo but after adding sudo all the way through I haven't run into any issues.
I have three epics all running the kernel now. I found the best way to go was put the phone in usb debugging, turn the phone off, and then turn the phone on, plug it in after reaching the home screen and only then letting the script do its thing. Call me paranoid.
I'm assuming a lot of the rm cleanup is a catch-all for current and previous roots so I just left those in there. Take a peek at all my mistakes and let me know what you think.
EDIT: Removed attachment to avoid confusion with my latest update, check out this post.
yea sorry i should have mentioned to run the whole script as sudo
ill prolly update the root later tonight, your kernel flasher looks good im on windows right now but ill test it out later today
I get a number of errors on my device when I try to run the latest version of the script, "cannot execute binary"
are you doing the oneclick root or the andromeda flasher?
either way your issue may be that adb isnt set as an exeuctable
Oooh, hadn't even thought about that
Sent from my SPH-D700 using XDA App
Related
When I first attempted to install the SDK, I found tutorials that only had bits and pieces about the whole procedure. A lot of Google searches and hours of eye strain. I wanted to write a solid tutorial, but instead of publishing it in a personal blog, I chose to publish it here on xda-developers. This is the definite forum to come to if you are interested in Android/G1/HTC Dream development or costumization. I wrote this to make the enlarge the knowledge of this community.
!! THIS TUTORIAL IS FOR THE LATEST UBUNTU RELEASE: JAUNTY JACKALOPE 9.04 !!
!!START -------------------------------------- Optional Preparation --------------------------------------
This applies if you -
Are interested in installing Ubuntu for the first time.
Are/will be reinstalling Ubuntu from scratch.
Want to keep your SDK installation easy to reach.
Want to keep things nice and clean.
And your machine -
Has a second hard drive.
Has free space for another small partition.
This procedure will make things easier during installation of the SDK and in the long run. Hopefully you've read about partitions. If you are dualbooting, please read this first to get an idea of what you're doing.
While installing Ubuntu and on the Prepare Disk Space screen (partition editor), select "Specify partitions manually (Advanced)"
On the Create Partition dialog, select the following options:
Type for the new partition: Primaryor Logical if you're dualbooting and know what you are doing.
New partition size in megabytes: 5120MB (5GB) might work. BUT:
ccyrowski said:
It should be noted that if you ever plan on compiling kernels and/or cupcake ROM's you will NEED ubuntu8.04. You'll also need at least 10GB.
Click to expand...
Click to collapse
Location for the new partition: Beginning
Use as: Ext4 or Ext3Filesystem doesn't matter. (?)
Mount point: /AndroidSDKEnter this manually
Complete Ubuntu installation as usual.
-------------------------------------- Optional Preparation -------------------------------------- END!!
You will now install the SDK.
!!START -------------------------------------- Installing Android SDK --------------------------------------
Installing the SDK is the easiest of all.
Download the SDK.169.9 MB [http://developer.android.com/sdk/download.html?v=android-sdk-linux_x86-1.5_r3.zip]
Right-click and select Extract Here.
Move the contents of the android-sdk-linux_x86-1.5_r3 directory to your desired location.If you followed Optional Installation, move the contents to your /AndroidSDK directory in the root of your filesystem.
Close directory window.
-------------------------------------- Installing Android SDK -------------------------------------- END!!
You will now set up your bashrc file and UDEV to recognize your HTC Device.
!!START -------------------------------------- ADB + FASTBOOT --------------------------------------
The Android Debug Bridge (adb) is one of the tools that will help you the most when you run into flashing problems or running shell commands directly from your machine. UDEV will not recognize your G1 out of the box, but we will configure it with some rules so it can connect.
We will work with /AndroidSDK as the location of your sdk. If this is not your setup, I think you're smart enough to figure it out.
Editing .bashrc file to use tools from /AndroidSDK/tools/ directory -
Go to your home folder.Example: /home/wddglr/
Press Control + H to view hidden files.
Look for your .bashrc file and double click to open it with gedit.
Add the following lines to the top of the file:
Code:
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools
IMPORTANT NOTE
savethechicken said:
This is the way that I have my .bashrc file setup. For those having problems with it not recognizing the adb as a command try this...
Code:
export PATH=$PATH:/AndroidSDK/tools
I removed the {} around ${PATH} and it is working if I had them on it would say that it didn't recognize the command. Removed them and all works well.
Click to expand...
Click to collapse
Setting up UDEV to recognize HTC Device -
Type the following into a terminal (Applications > Accessories > Terminal):
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
Now add the following line to the blank file:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Click save and close.
To restart udev, open up a terminal and enter:
Code:
sudo /etc/init.d/udev restart
Setting up fastboot -
Download this fastboot binary from http://android-dls.com.130.4 KB [http://android-dls.com/files/linux/fastboot]
Once downloaded to your desktop, right click and select Properties.
Navigate to the Permissions tab and configure the following option:Execute: [√] Allow executing file as program
Click Close.
Move the fastboot bianary to your /AndroidSDK/tools/ directory.
Reboot.
-------------------------------------- ADB + FASTBOOT -------------------------------------- END!!Now you can use adb and fastboot directly from any terminal. If you chose to do the Optional Preparation, you can now save your Eclipse Workspace and your downloaded/custom ROMs/Themes in this new /AndroidSDK directory keeping things easier to reach and safe from evil disk errors or other mishaps!!! :OIf you are having problems, send me a PM. I will be happy to help.
*applaudes* awesome. Should be added to helpful threads.
very nice! perhaps add a "(How-To)" prefix to thread??
Everything was going great in setting this up until I got to this part "gedit /etc/udev/rules.d/51-android.rules"
I cannot find "51-android.rules" inside of "rules.d"
Any thoughts>?
nicholasbithell said:
Everything was going great in setting this up until I got to this part "gedit /etc/udev/rules.d/51-android.rules"
I cannot find "51-android.rules" inside of "rules.d"
Any thoughts>?
Click to expand...
Click to collapse
it does not exist, you will make it.
do the command as stated above.
Code:
gksu gedit /etc/udev/rules.d/51-android.rules
Damn you beat me to it!
I was just thinking earlier about doing this same "How-To" guide, I was surprise to see it posted just now.
Anyways, great job!
Can someone sticky this thread. Now I have ADB & fastboot on my Win7, Ubuntu, and OS X Partition. Thank you wddglr.
bravo...linux rocks even better now!...
Awesome tutorial for setting this up. Have been using adb/sdk on ubuntu since oct. but this would have saved me some headaches back in the first couple of weeks.
The onlything that is not clear and/or confuses me is
Setting up the udev to recognize the device.
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Have never used this (will now to see if it will do anything) and the only problem i have is that sometimes i have to kill-server to get it to connect correctly but i have seen this happen to almost everyone on many forums since the 9.04 came out. And even after putting this file on the computer i have had the problem.
savethechicken said:
Awesome tutorial for setting this up. Have been using adb/sdk on ubuntu since oct. but this would have saved me some headaches back in the first couple of weeks.
The onlything that is not clear and/or confuses me is
Setting up the udev to recognize the device.
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Have never used this (will now to see if it will do anything) and the only problem i have is that sometimes i have to kill-server to get it to connect correctly but i have seen this happen to almost everyone on many forums since the 9.04 came out. And even after putting this file on the computer i have had the problem.
Click to expand...
Click to collapse
It happens to me also from time to time. especially when i reboot and want to go into adb while the device is rebooting. although that file, 51-adndroid.rules, is what helped me get adb to recognize the device. the guide on developer.android.com talked about 50-android.rules but after a few deep searches i found this: http://groups.google.com/group/android-developers/browse_thread/thread/1d3488c601243686
Okay A few questions for you....
First I fixed the whole "couldnt find the (51-android.rules) file now I am having issues with executing ADB!
When in terminal this is what I get...
"[email protected]:/home/nick# /AndroidSDK/tools/adb
bash: /AndroidSDK/tools/adb: cannot execute binary file
[email protected]:/home/nick#"
and I also noticed something different from when I start terminal the first lines now state
"bash: : command not found
[email protected]:~$"
I dont remember the first line ever being there, but I could be mistaken!
Any help would be greatly appreciated!
Edit: You state creating "Mount point: /AndroidSDK" During Installation, and what I did was Just place my AndroidSDK at root so it is at "/AndroidSDK". I dont know if this makes a difference.
I am actually running ubuntu 8.10 ha! I just tried to update But I keep getting errors! is there anything I can change to get this to work on ubuntu 8.10?
nicholasbithell said:
First I fixed the whole "couldnt find the (51-android.rules) file now I am having issues with executing ADB!
When in terminal this is what I get...
"[email protected]:/home/nick# /AndroidSDK/tools/adb
bash: /AndroidSDK/tools/adb: cannot execute binary file
[email protected]:/home/nick#"
and I also noticed something different from when I start terminal the first lines now state
"bash: : command not found
[email protected]:~$"
Edit: You state creating "Mount point: /AndroidSDK" During Installation, and what I did was Just place my AndroidSDK at root so it is at "/AndroidSDK". I dont know if this makes a difference.
I am actually running ubuntu 8.10 ha! I just tried to update But I keep getting errors! is there anything I can change to get this to work on ubuntu 8.10?
Click to expand...
Click to collapse
okay, a few things -
seems like your .bashrc file isn't setup right (?)
make sure that the two lines you inserted into it are on separate line
Code:
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools
because maybe export PATH=${PATH}:/AndroidSDK/tools got commented on accident if you copy pasted.
When copying your SDK to the root of your filesystem, did you copy it as your own user or as root? you can use:
Code:
gksu nautilus
to copy system files with complete root privileges.
What exactly are you trying to update, Ubuntu or ... ? There shouldn't be a difference to get this working on 8.10, the only thing that seemed to change was the 51-android.rules file. Maybe this can help -
renaming it to 50-android.rules with
Code:
gksu nautilus
and deleting any backups (use CTRL+H to view hidden files).
restarting udev using:
Code:
sudo /etc/init.d/udev restart
Remember this is for 9.04, not 8.10. I hope this helps.
wddglr said:
okay, a few things -
seems like your .bashrc file isn't setup right (?)
make sure that the two lines you inserted into it are on separate line
Code:
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools
because maybe export PATH=${PATH}:/AndroidSDK/tools got commented on accident if you copy pasted.
When copying your SDK to the root of your filesystem, did you copy it as your own user or as root? you can use:
Code:
gksu nautilus
to copy system files with complete root privileges.
What exactly are you trying to update, Ubuntu or ... ? There shouldn't be a difference to get this working on 8.10, the only thing that seemed to change was the 51-android.rules file. Maybe this can help -
renaming it to 50-android.rules with
Code:
gksu nautilus
and deleting any backups (use CTRL+H to view hidden files).
restarting udev using:
Code:
sudo /etc/init.d/udev restart
Remember this is for 8.10, not 9.04. I hope this helps.
Click to expand...
Click to collapse
Okay this is how I moved my "AndroidSDK" Folder to root....
[email protected]:~$ su
Password:
[email protected]:/home/nick# mv /home/nick/Desktop/AndroidSDK /
[email protected]:/home/nick#"
And I went to the bashrc file and it is entered in there correctly.
This is still what I get even after restarting Udev...
" bash: : command not found
[email protected]:~$ adb
bash: /AndroidSDK/tools/adb: cannot execute binary file
[email protected]:~$ su
Password:
[email protected]:/home/nick# adb
bash: adb: command not found"
Edit: This is what my .bashrc file looks like, well the top part of it anyways....
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
Okay your .bashrc is setup right and it's recognizing adb and its directory.
I would say it's something to do with permissions. since you moved it under su, you are not the owner so i would say that you'd have to change the permissions of /AndroidSDK
you can do that with -
Code:
gksu nautilus
Navigate to /
Right click on /AndroidSDK and select Properties
Click on Permissions tab
Select your user account as the owner
hopefully now it will function correctly
wddglr said:
Okay your .bashrc is setup right and it's recognizing adb and its directory.
I would say it's something to do with permissions. since you moved it under su, you are not the owner so i would say that you'd have to change the permissions of /AndroidSDK
you can do that with -
Code:
gksu nautilus
Navigate to /
Right click on /AndroidSDK and select Properties
Click on Permissions tab
Select your user account as the owner
hopefully now it will function correctly
Click to expand...
Click to collapse
I dont understand what this line does...
"gksu nautilus"
when i type it in it asks me for my administrative password and then after i put it in it hangs for a sec and then back to...
bash: : command not found
[email protected]:~$ gksu nautilus
[email protected]:~$
nautilus is the file browser, while using gksu nautilus you can use the file browser under root privileges
wddglr said:
nautilus is the file browser, while using gksu nautilus you can use the file browser under root privileges
Click to expand...
Click to collapse
I dont have Nautilus as a file browser I have Thunar I believe.
Then gksu thunar
wddglr said:
nautilus is the file browser, while using gksu nautilus you can use the file browser under root privileges
Click to expand...
Click to collapse
For permissions it says that I am the owner and the group (I=Nick) for Others it says Read and Write, Access says Read and write. So it seems it has all the right permissions. Any other Ideas?
Partitioning HD
First off, thank you for this thread, it's most excellent. I have a question that is slightly off topic, but not so much. I have Ubuntu 9.04 installed on my recovery partition. This partition is only 10 GB, while I have Vista on my main. I have almost 100 GB free on my main drive, and what I want to know is, if I resized my partitions to give more space to Ubuntu, how would it affect my comp? (if at all). And which OS should I be on while resizing, Ubuntu or Vista?
Is there any step by step tutorial to get my htc magic rooted
I can only find posts where they say it is like on windows but without installing files but i have no idea how to enter that prompts on terminal
it would be much appreciated any help. I know i am not the only one interested
cesardeluxe said:
Is there any step by step tutorial to get my htc magic rooted
I can only find posts where they say it is like on windows but without installing files but i have no idea how to enter that prompts on terminal
it would be much appreciated any help. I know i am not the only one interested
Click to expand...
Click to collapse
The commands are the same. Just like Linux users can follow Windows directions but with some substitutions.
Download the SDK here: http://developer.android.com/sdk/1.5_r3/index.html
Follow the instructions here: http://developer.android.com/sdk/1.5_r3/installing.html
Once you have the SDK setup, you can follow the steps given in the rooting threads/wiki. Any time it says to enter a command you do it in your terminal (which on OSX i think is Terminal.app, use Spotlight to find it).
Hope this helps a bit.
i dont get this:
Code:
On a Mac, look in your home directory for .bash_profile and proceed as for Linux. You can create the .bash_profile if you haven't already set one up on your machine
i don't have that .bash_profile how do i create it?
thanks
Google easy to use and always there for you.
Clinton
yeah but all tutorials are made for xp or even linux.
I have tried to create it using vi command then edited with the path o the sdk tools
but when i type adb it doesn't do anything
i am stuck there
Did you check my link for your bash_profile ? This help at all?
Clinton
cesardeluxe said:
yeah but all tutorials are made for xp or even linux.
I have tried to create it using vi command then edited with the path o the sdk tools
but when i type adb it doesn't do anything
i am stuck there
Click to expand...
Click to collapse
Try reading this:
http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/
Sounds like the Path variable may be in a different file. It is the same on linux, I think it can be in a few places.
Irf you want to use adb without messing with your path you can do the following:
Code:
cd <android-sdk-location>/tools
./adb devices
This is convoluted so get that PATH working and everything should be nice and easy! Good luck.
I use a Mac, and when I was getting started I used the linux tutorials with no problem.
i can push the 2 files using commands to my sd. Adb devices shows my htc ok
but after i enter to fastboot mode the device is no longe shown
i type
Code:
./fastboot boot recovery-new.img
but the only thing i get is
Code:
-bash: fastboot: command not found
i am on tools directory on terminal
i think fastboot is not in the tools directory ...
i'd rather say the error is caused by that then a missing connection.
Does the phone write "FASTBOOT USB" ?
if you type "ls", can you find a file named fastboot in your directory?
cesardeluxe said:
i can push the 2 files using commands to my sd. Adb devices shows my htc ok
but after i enter to fastboot mode the device is no longe shown
i type
Code:
./fastboot boot recovery-new.img
but the only thing i get is
Code:
-bash: fastboot: command not found
i am on tools directory on terminal
Click to expand...
Click to collapse
The files have to be executable. You can do that by running:
Code:
chmod -R +x /path/to/tools
This makes all the files in the tools directory executable with ./
About the .bashrc or .bash_profile if you don't have one in your home directory you can safely make one. With the following command:
Code:
echo "export PATH=$PATH:/path/to/tools/" > ~/.bashrc
or if the file exists just do:
Code:
echo "export PATH=$PATH:/path/to/tools/" >> ~/.bashrc
Remember to restart the shell after you are done with this.
the reason adb work for you is because adb is in tools directory
fastboot does not. You have to get fastboot somewhere else
Whenever you get command not found, you can run another command to check
ls <program you ran>, and see what happened
Example
in your tools directory, where you have no problem running adb push, try doing "ls adb", without the quote
in your tools directory, where you have problem running fastboot, try doing "ls fastboot", without the quote
and you should see what's going on
BTW, this is fairly basic unix environment. If you are having trouble at this stage, you need to get yourself more familiar with unix environment, which is what osx is based on
I am sorry, but i don't really know where's good tutorial on unix
On google, i just search for "mac osx unix shell tutorial:, and come across this site
http://www.osxfaq.com/tutorials/LearningCenter/
Hope this help
Edit 1: btw, here's where you can find fastboot for MAC. Put it in your tools directory. IF you keep the filename as is, you need to type fastboot-mac whenever you see someone mention fastboot
http://www.htc.com/www/support/android/adp.html
yeah you're right fastboot is not on that tools directory. in fact i have looked into the whole sdk folder and i can't find it.
thanks
hey i managed to apply the update thanks to having fastboot-mac on tools folder
but after booting i go to terminal to apply the final step and i get this
Code:
MBdeluxe:tools cesarleon$ ./adb shell flash_image recovery /sdcard/recovery-new.img
error reading /sdcard/recovery-new.img header: Is a directory
what's wrong ?
thank you people
cesardeluxe said:
hey i managed to apply the update thanks to having fastboot-mac on tools folder
but after booting i go to terminal to apply the final step and i get this
Code:
MBdeluxe:tools cesarleon$ ./adb shell flash_image recovery /sdcard/recovery-new.img
error reading /sdcard/recovery-new.img header: Is a directory
what's wrong ?
thank you people
Click to expand...
Click to collapse
Are u sure that recovery.img got transferred properly? Maybe check the rights on it (it not read only or something). What if you mount the sdcard in OS X and copy and paste (vs push)?
If you're trying to flash the recovery image, try
Code:
adb shell mount -a
adb push recovery-new.img /system/recovery.img
adb push recovery-new.img /sdcard/recovery-new.img
adb flash_image recovery /sdcard/recovery-new.img
Hope that helps
adb shell mount -a
Click to expand...
Click to collapse
didn´t work i think the parameter a is not correct
well this is almost the last step! thank you all for your explanations
cesardeluxe said:
hey i managed to apply the update thanks to having fastboot-mac on tools folder
but after booting i go to terminal to apply the final step and i get this
Code:
MBdeluxe:tools cesarleon$ ./adb shell flash_image recovery /sdcard/recovery-new.img
error reading /sdcard/recovery-new.img header: Is a directory
what's wrong ?
thank you people
Click to expand...
Click to collapse
Very odd error message
Do this to check what your phone's sdcard looks like
Code:
adb shell ls -l /sdcard/recovery-new.img
Next, you should grab the file from your phone to your computer. This step assume you are in your tools directory
Code:
adb pull /sdcard/recovery-new.img recovery-new-phone.img
Finally, try to compare the file you have on your computer against the one you got from your phone, and see if they are the same. This assume you have your working recovery-new.img in tools directory
Code:
diff recovery-new.img recovery-new-phone.img
I have not try this diff command, and I assume it'l handle binary diff
If diff can not handle binary file, do ls and check file size. both file should match
Code:
ls -l recovery-new.img recovery-new-phone.img
If your computer and phone recovery-new.img are not the same, download to phone again
cesardeluxe said:
didn´t work i think the parameter a is not correct
well this is almost the last step! thank you all for your explanations
Click to expand...
Click to collapse
You will get Failed Mounts when u run
Code:
adb shell mount -a
You CAN ignore them.
See here: http://forum.xda-developers.com/showthread.php?p=4029461
This may not be the right way to do it but I always just downloaded the recovery to the tools directory of the android sdk. Then fire up the phone in fastboot mode and do:
./fastboot flash recovery recovery-new.img
(replacing recovery-new.img with the name of the downloaded img file.)
I'm sure there is a reason people are doing it the other way, but for myself one command to do the flash is alot easier!
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]
Downloaded and extracted the SDK from Android's website. Copied the path to my $PATH and when I run 'adb' I get this:
dyld: Symbol not found: ___stack_chk_guard
Referenced from: /Users/Brainchild/Desktop/android-sdk-mac_x86/platform-tools/adb
Expected in: /usr/lib/libSystem.B.dylib
Trace/BPT trap
Click to expand...
Click to collapse
I've searched and nothing I find either works or is relevant. I've no idea what to do from here.
himom said:
Downloaded and extracted the SDK from Android's website. Copied the path to my $PATH and when I run 'adb' I get this:
I've searched and nothing I find either works or is relevant. I've no idea what to do from here.
Click to expand...
Click to collapse
Can you clearly explain what you did? Are you trying to create a variable to run ADB in terminal without having to write the whole path down?
if so do this:
cd ~
pico bash .bash_profile
type:
export PATH${PATH}:/where you smacked your sdk (should end with platform-tools)
control-x
Y
Close terminal and restart
Should work magical wonders and awesomeness.
himom said:
Downloaded and extracted the SDK from Android's website. Copied the path to my $PATH and when I run 'adb' I get this:
I've searched and nothing I find either works or is relevant. I've no idea what to do from here.
Click to expand...
Click to collapse
Type
Code:
cd /Users/Brainchild/Desktop/android-sdk-mac_x86/platform-tools/adb
Hit enter.
Then type an adb command with your device plugged in your computer. Make sure to put a "./" with no quotes or spaces before any adb or fastboot command.
It should look something like this:
Code:
./adb remount
Hit enter. It should say "remount successful" if it does than you are good. If not than let us know
NOTE: does not work with gingerbread 2.3.x. The exploit used by this (and SuperOneClick) does not work on gingerbread. It won't hurt anything if you try to run it (at least not in my experience) but it does not root the phone.
I put together a couple shell scripts that are meant to make rooting and unrooting a G2x on Mac or Linux dead simple (folks claim it works on the Optimus 2X as well). I only tested the linux version on Ubuntu 10.10 (32 and 64-bit) so let me know if you run into any issues. Some folks have had success using the gingerbreak app to root the G2x so that may be an option too - though I haven't tried it myself.
I was motived to do so after reading mhaedo's excellent thread that uses SuperOneClick (http://forum.xda-developers.com/showthread.php?t=1039985). Head over there if you want to root from Windows or want to use SuperOneClick via mono on Linux/Mac.
The scripts use the same files as SuperOneClick 1.8 so mad props to CLShortFuse. Note that they won't work on PowerPC macs.
If you like the scripts please click the Thanks button. To root, download the attached G2xRootMacLinux zip file, expand it and:
enable USB debugging on your phone (Settings -> Applications -> Development)
connect your phone via USB. no drivers or android sdk needed.
double-click root.command (Mac) or run it as you would any shell script (Linux)
wait for the script to finish and your phone to reboot
Unroot is similar but run unroot.command instead of root.command. It's only designed to unroot devices rooted with the root.command script.
I also created a thread for flashing clockworkmod (or stock) recovery from the mac though it's not as simple. If you want clockworkmod for a safety net when installing ROMs (highly recommended) check it out and click Thanks if it helps: http://forum.xda-developers.com/showthread.php?t=1099281
Problems/Issues
If you get something like "No connected device found" when running the script make sure usb debugging is enabled, the phone is powered on and plugged in to the computer via USB.
On Mac OS X EasyTether is known to cause adb to break, which is what the scripts use to talk to the phone. I'll look into a fix in the scripts to disable/enable the kernel module automatically but if you have EasyTether installed you can try the steps at http://www.mobile-stream.com/easytether/android_faq.html#adbmacosx before running root/unroot.
If you're still getting "No connected device found" and you're on a mac, try the following and post the results:
open Terminal (Applications -> Utilities)
type the following: sudo tail -Fn 0 /var/log/kernel.log (that's a zero)
plug the phone into the computer
copy the lines that show up in Terminal and post them here
If you want to learn more about how the G2x is rooted I put a small Readme.txt file in the tar that explains what the scripts do. You could always read the shell scripts too
Edit: hypmatize helped me find a bug when the path to the script had a space in it. fixed in 0.4
Edit: Kdogg71 and artismyrevolt helped me find and fix some permissions problems on some stock linux distros. fixed in 0.5
Works great! Thanks!
Very nice, thanks!
Rad, thank you for this.
I keep getting command not found... do I need to run this with su privileges? if so, how? This is what I see in the Terminal window:
Checking for connected device...
/Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 10: ensureDevice: command not found
/Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 12: isRooted: command not found
/Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 21: checkForExitEarly: command not found
/Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 23: pushAndRunPsneuter: command not found
Waiting for device...
/Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 28: ensureDevice: command not found
Remounting /system read/write...
/Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 35: remount: command not found
Pushing su to /system/bin/su...
/Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 38: push: command not found
/Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 39: shell: command not found
Pushing busybox to /system/bin/busybox...
/Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 42: push: command not found
/Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 43: shell: command not found
Installing Superuser.apk android application...
/Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 46: push: command not found
Removing psneuter from device...
/Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 49: removePsneuter: command not found
Rebooting device...
reboot: Operation not permitted
I'm running 10.6 (snow leopard) btw
followed everything in the instructions
hypmatize said:
I'm running 10.6 (snow leopard) btw
followed everything in the instructions
Click to expand...
Click to collapse
Worked fine for me, 10.6.
Thanks for the root, worked perfectly.
was incredibly fast and easy. on 10.6.7 here as well.
thanks for the hard work!
hypmatize said:
I keep getting command not found... do I need to run this with su privileges? if so, how? This is what I see in the Terminal window:
Checking for connected device...
/Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 10: ensureDevice: command not found
...
Rebooting device...
reboot: Operation not permitted
I'm running 10.6 (snow leopard) btw
followed everything in the instructions
Click to expand...
Click to collapse
Are you running this by double clicking the root.command file or are you running it via terminal? I'll PM you with some more info not fit for public consumption
you are awesome!! i prefer not to use adb so i hadn't rooted my g2x until now!! thank you so much.
Thank you so much it worked like a charm... quick fast and easy... Much better experience than with my returned Atrix (Mac 10.4)
The scripted functions cannot find my device...
Code:
Checking for connected device...
No connected device found.
Press Enter to quit:
I use ubuntu 10.10 32-bit and USB Debugging is enabled. I tried disconnecting and reconnecting the device.
Any thoughts? Thanks for the work.
EDIT: adb shows me this:
Code:
List of devices attached
???????????? no permissions
Does this work on Windows?
Sent from my LG-P999 using XDA App
Arcadia310 said:
Does this work on Windows?
Sent from my LG-P999 using XDA App
Click to expand...
Click to collapse
Thread title clearly says G2x Easy Root for Mac and Linux. Below is the one for Windows.
http://forum.xda-developers.com/showthread.php?t=1039985
Kdogg71 said:
The scripted functions cannot find my device...
Code:
Checking for connected device...
No connected device found.
Press Enter to quit:
I use ubuntu 10.10 32-bit and USB Debugging is enabled. I tried disconnecting and reconnecting the device.
Any thoughts? Thanks for the work.
EDIT: adb shows me this:
Code:
List of devices attached
???????????? no permissions
Click to expand...
Click to collapse
Start your adb server with sudo first. Then try it.
Like this:
adb kill-server
sudo adb devices
Then see if your script works.
Kdogg71 said:
The scripted functions cannot find my device...
Code:
Checking for connected device...
No connected device found.
Press Enter to quit:
I use ubuntu 10.10 32-bit and USB Debugging is enabled. I tried disconnecting and reconnecting the device.
Any thoughts? Thanks for the work.
EDIT: adb shows me this:
Code:
List of devices attached
???????????? no permissions
Click to expand...
Click to collapse
Yes, sorry, I forgot about the udev permissions on Linux. I'd like it to work without messing with sudo or permissions (manually). Let me see what I can do.
Very good job guys only a few steps away from Custom Roms, Kernels and Sim Unlock it looks like
artismyrevolt said:
Start your adb server with sudo first. Then try it.
Like this:
adb kill-server
sudo adb devices
Then see if your script works.
Click to expand...
Click to collapse
Thanks, that did it. I tried a number of things as root...looks like I overlooked starting adb as root.
I am rooted now, tested with "su" from terminal emulator; it is persistent through reboots, in case anyone was doubtful.
That was too easy. Thank You!!!!!!!!
Sent from my LG G2X using XDA App
Perfect! Used this to get the stock signature line in email (see http://forum.xda-developers.com/showthread.php?t=1048757&highlight=signature)
Worked like a charm!
O2x P990 rooted as well
It works fine with O2x P990.
Time to get UMA functionality from T-mobile stock rom...