Rooting is no longer necessary if going directly to CM7 or newer custom ROM via Odin/Heimdall, athough you will need ADB (steps 1-4). AFTER STEP 4, skip to Post 3.
Backup your data before starting, just in case.
1. Get ADB set up on your computer.
-Download the Android-SDK for linux. [This is the development package for Android]
-Extract the /tools directory to your desktop. [You may have to install 7zip onto your computer first. It's in the Ubuntu repositories.]
-Make directory "bin" and move the ADB executable to there:
mkdir -p ~/bin
mv ~/Desktop/tools/adb ~/bin/
2. Gather some Information
-On your phone, go to Settings-Applications-Development and check USB debugging.
-Plug your phone into the computer. [*Regular mode, not download mode]
-On computer, in Terminal, type "lsusb" without the quotes
One of the output lines should be similar to this:
"Bus 001 Device 002: ID 04e8:681c Samsung Electronics Co., Ltd"
-Write down the first 4 characters after ID. These are the Vendor ID (in this example, 04e8). The Bus & Device will be different each time you plug/unplug the phone or restart the computer.
-In Terminal, type "ID" without the quotes to get your user name and group name if you are unsure what these are
3. Set a Udev rule so you can use ADB
-Open a text editor as root. In Terminal with Kubuntu, this is "kdesudo kate".
-Paste the following line into the text editor and then modify:
SUBSYSTEM=="usb", SYSFS{idVendor}=="<your phone's vendor ID>", OWNER="<your username>" GROUP="<your group name>"
For the Fascinate in the example above, "<your phone's vendor ID>" is replaced with "04e8". You keep the quotes but get rid of the <> when you put in your information.
-Save this file as "etc/udev/rules.d/51-android.rules"
-Also save file as "lib/udev/rules.d/51-android.rules"
[Note: you actually only need 1 of these, but which one varies from system to system]
-In Terminal, cd to etc/udev/rules.d and type "ls" to verify your new file is there. Also check lib/udev/rules.d.
-Restart udev or entire computer to get this to take effect
[Note- some instructions suggest setting a udev.rule that gives permissions 0666 which grants permissions to the entire world. My way only gives permissions to the one user who needs them, which is safer. The rule priority number 51 is somewhat arbitrary and other numbers will work.]
4. Check your work
-In Terminal, type "lsusb" like you did earlier
One of the output lines should be similar to this:
"Bus 001 Device 002: ID 04e8:681c Samsung Electronics Co., Ltd"
-This time, you are interested in the numbers after Bus & Device, which have probably changed from earlier if you restarted your computer.
-In Terminal, type "ls -l /dev/bus/usb/001/002" EXCEPT 001/002 is Bus/Device from the example above, substitute Bus/Device numbers from your "lsusb" output line.
-If the output line you get includes your username and groupname rather than "root root" you may continue. Otherwise reread and repeat Steps 2 & 3.
-*Make sure your phone is still in USB debugging mode. There should be a red triangle with an exclamation point in the status bar of the phone.
-In Terminal, type "sudo adb devices" [*sudo is only needed the first time you run adb.]
You should see your phone listed.
THE REMAINING STEPS ARE OUTDATED and still here for historic reference only.
PLEASE SKIP TO POST 3
5. Download the Root Package (No Longer Available) http://www.multiupload.com/REM0RO3FSQ
Driver downloads are not needed for Linux.
6. Extract the 4 files to /bin
This is the folder you created in Step 1 and should have ADB in it already.You can extract to the desktop and then move as you did in step 1.
7. Move into the /bin directory and verify.
In Terminal, type "cd bin" and then "ls" to make sure all 5 files are there.
8. Push these files to the phone and run the root:
In Terminal, copy and paste each following line one at a time (press enter after each line):
adb push su /sdcard/su
adb push rage.bin /data/local/tmp/rage.bin
adb push busybox /sdcard/busybox
adb shell
[Note: this should change your prompt to just a $ because now you are remotely on your phone]
cd /data/local/tmp
chmod 0755 rage.bin
./rage.bin
[Note: This will check the process limit, find the ADB process number, and then spawn processes to reach this limit. It will return you quickly to a $ prompt, but IS NOT DONE. WAIT for a line similar to "[+] Forked 3705 childs." and it to kick you back to your home directory prompt. The first time I ran it my phone got an email while it was running and locked up. After 20 minutes I closed the Terminal and restarted Step 8. This time it completed in less than a minute.]
9. Make the Root permanent
-In Terminal and back in your /bin directory, type "adb shell"
This time you should get a # prompt instead of a $ prompt. This means you are remotely on your phone as root.
-Copy and paste each following line one at a time (press enter after each line):
mount -t rfs -o remount,rw /dev/block/stl9 /system
cd /system/xbin
cat /sdcard/su > su
cat /sdcard/busybox > busybox
chmod 4755 su
chmod 4755 busybox
exit
adb install Superuser.apk
10. Verify you have root.
-Restart phone.
-In terminal, type "adb shell"
You should get a $ prompt
-In terminal, type "su"
A popup should appear on the phone asking for superuser permissions.
When granted, the shell prompt should change to #
When you install and run a program which requires root, the same pop-up should appear to request root access. Then when you open SuperUser, it should list the programs that have been granted root access.
Backup your data before starting, just in case.
1. Get ADB set up on your computer.
-Download the Android-SDK for linux. [This is the development package for Android]
-Extract the /tools directory to your desktop. [You may have to install 7zip onto your computer first. It's in the Ubuntu repositories.]
-Make directory "bin" and move the ADB executable to there:
mkdir -p ~/bin
mv ~/Desktop/tools/adb ~/bin/
2. Gather some Information
-On your phone, go to Settings-Applications-Development and check USB debugging.
-Plug your phone into the computer. [*Regular mode, not download mode]
-On computer, in Terminal, type "lsusb" without the quotes
One of the output lines should be similar to this:
"Bus 001 Device 002: ID 04e8:681c Samsung Electronics Co., Ltd"
-Write down the first 4 characters after ID. These are the Vendor ID (in this example, 04e8). The Bus & Device will be different each time you plug/unplug the phone or restart the computer.
-In Terminal, type "ID" without the quotes to get your user name and group name if you are unsure what these are
3. Set a Udev rule so you can use ADB
-Open a text editor as root. In Terminal with Kubuntu, this is "kdesudo kate".
-Paste the following line into the text editor and then modify:
SUBSYSTEM=="usb", SYSFS{idVendor}=="<your phone's vendor ID>", OWNER="<your username>" GROUP="<your group name>"
For the Fascinate in the example above, "<your phone's vendor ID>" is replaced with "04e8". You keep the quotes but get rid of the <> when you put in your information.
-Save this file as "etc/udev/rules.d/51-android.rules"
-Also save file as "lib/udev/rules.d/51-android.rules"
[Note: you actually only need 1 of these, but which one varies from system to system]
-In Terminal, cd to etc/udev/rules.d and type "ls" to verify your new file is there. Also check lib/udev/rules.d.
-Restart udev or entire computer to get this to take effect
[Note- some instructions suggest setting a udev.rule that gives permissions 0666 which grants permissions to the entire world. My way only gives permissions to the one user who needs them, which is safer. The rule priority number 51 is somewhat arbitrary and other numbers will work.]
4. Check your work
-In Terminal, type "lsusb" like you did earlier
One of the output lines should be similar to this:
"Bus 001 Device 002: ID 04e8:681c Samsung Electronics Co., Ltd"
-This time, you are interested in the numbers after Bus & Device, which have probably changed from earlier if you restarted your computer.
-In Terminal, type "ls -l /dev/bus/usb/001/002" EXCEPT 001/002 is Bus/Device from the example above, substitute Bus/Device numbers from your "lsusb" output line.
-If the output line you get includes your username and groupname rather than "root root" you may continue. Otherwise reread and repeat Steps 2 & 3.
-*Make sure your phone is still in USB debugging mode. There should be a red triangle with an exclamation point in the status bar of the phone.
-In Terminal, type "sudo adb devices" [*sudo is only needed the first time you run adb.]
You should see your phone listed.
THE REMAINING STEPS ARE OUTDATED and still here for historic reference only.
PLEASE SKIP TO POST 3
5. Download the Root Package (No Longer Available) http://www.multiupload.com/REM0RO3FSQ
Driver downloads are not needed for Linux.
6. Extract the 4 files to /bin
This is the folder you created in Step 1 and should have ADB in it already.You can extract to the desktop and then move as you did in step 1.
7. Move into the /bin directory and verify.
In Terminal, type "cd bin" and then "ls" to make sure all 5 files are there.
8. Push these files to the phone and run the root:
In Terminal, copy and paste each following line one at a time (press enter after each line):
adb push su /sdcard/su
adb push rage.bin /data/local/tmp/rage.bin
adb push busybox /sdcard/busybox
adb shell
[Note: this should change your prompt to just a $ because now you are remotely on your phone]
cd /data/local/tmp
chmod 0755 rage.bin
./rage.bin
[Note: This will check the process limit, find the ADB process number, and then spawn processes to reach this limit. It will return you quickly to a $ prompt, but IS NOT DONE. WAIT for a line similar to "[+] Forked 3705 childs." and it to kick you back to your home directory prompt. The first time I ran it my phone got an email while it was running and locked up. After 20 minutes I closed the Terminal and restarted Step 8. This time it completed in less than a minute.]
9. Make the Root permanent
-In Terminal and back in your /bin directory, type "adb shell"
This time you should get a # prompt instead of a $ prompt. This means you are remotely on your phone as root.
-Copy and paste each following line one at a time (press enter after each line):
mount -t rfs -o remount,rw /dev/block/stl9 /system
cd /system/xbin
cat /sdcard/su > su
cat /sdcard/busybox > busybox
chmod 4755 su
chmod 4755 busybox
exit
adb install Superuser.apk
10. Verify you have root.
-Restart phone.
-In terminal, type "adb shell"
You should get a $ prompt
-In terminal, type "su"
A popup should appear on the phone asking for superuser permissions.
When granted, the shell prompt should change to #
When you install and run a program which requires root, the same pop-up should appear to request root access. Then when you open SuperUser, it should list the programs that have been granted root access.