The Sumsung Galaxy Prevail is a really nice low budget phone. And without doing any special tweaks to it it can be kind of limited. The hardware itself limits us with quite a few things. Unfortantly their isn’t much we can do about the hardware part of the phone. However we can modify apps and tweak Android Settings in a manner to use the hardware in ways that we would like the phone to work. However to achieve such things with the phone we need to have root privileges. And the phone doesn’t come with root. This means we have to root it ourselves.
Generally the way to root an Android device is by flashing it. However do to the limitations on the Samsung Prevail we can’t root the phone this way. However with Samsung Prevail depending on which updates you have you may be able to have use other exploits to root the phone. I’ve listed the firmware versions that currently have known exploits below.
- ED13 = Android 2.2 Froyo (Has usable exploit)
- EE14 = Android 2.2 Froyo (Has usable exploit)
- EJ06 = Android 2.3 Gingerbread (Has usable exploit)
- FA19 = Android 2.3 Gingerbread (No known Exploit)
As you can see with all except the most recent ROM their is exploits. Which means unless you have installed the latest update to the phone you will be able to root the phone.
Note: If you do have the latest update installed on your phone. You can always downgrade the phone. Unlike with iPhones and iPod touches. If you end up bricking your phone you can always get it unbricked. You can achieve this with the ODIN tool
Rooting the Prevail
In order to root the Prevail you will need to first install the drivers
. To do this simply click on the installer for the drivers and follow the instructions. Once the drivers have been installed you will need to use ADB which is part of the Android SDK
. However their is a kit out created by a 3rd party developer named Shabby Penguin who has shipped the ADB tool along with a nice batch file he made and everything else needed to root the prevail. The kit is very nice and will let you root the prevail with simply one click of your mouse. You can get the kit here
However once again since this kit is by a 3rd party you may want to study it to make sure it isn’t malicious. I have done this and know that it is perfectly safe.
If your using the kit you simply need to turn on USB Debugging on your phone. To do this you go to Settings > Applications > Development and check the box that says USB Debugging. Once this has been done you simply need to plug in the phone into your computer using the USB cable that your phone shipped with. Once you have done this you will click on the One Click Root batch file. Then your phone will start to get rooted.
Of course using the One Click root tool takes the fun out of learning. We should know what the One Click root does in order to understand what is going on. So what is the One Click root doing?
Well the One Click root tool uses the Push Pull exploit. Pretty much what it does is it uses the ADB tool that App developers use to push Apps they make to their phone for testing purposes. So if we wanted to root the phone manually we would use the Android SDK. Then we would fire up our command prompt. From here we would navigate to the ADB tool.
Once we’re at the ADB tool we can start to root the phone manually. To do this we will first want attempt to setup a temperary root for the phone. To do this we will need to mess with few files on the phone. The two files we will need to access are the following.
- dumpState_app_native.log (located in the /data/log/ directory of the phone)
- local.prop (located in the /data/ directory of the phone)
So what we will do is first issue the following commands.
adb shell "rm /data/log/dumpState_app_native.log 2>/dev/null"
The above command removes the file dumpState_app_native.log. Next we will need to create a symlink of the local.prop file and have it in placed where the dumpState_app_native.log file was. This will let us play nice with our phone. To do this we will issue the following commands.
adb shell "ln -s /data/local.prop /data/log/dumpState_app_native.log 2>/dev/null"
Now we will need to check the process of the current apps that are running on the phone. This assures us that their isn’t any apps that will detect that we are trying to root the phone. To check this we will issue following commands.
adb shell "app_process /dev/null"
Next we will issue the following commands.
adb shell "echo "ro.kernel.qemu=1" > /data/local.prop 2>/dev/null"
Once we have done this we will need to have ADB restart the phone. To do this we will type the following commands.
Imediately after we issue the above command we will want to have ADB connect back to the phone. If we don’t connect right away we will have to start over again. To make sure we connect right away we can issue the following commands.
Once we are connected again we will issue the following commands.
adb shell "rm /data/local.prop 2>/dev/null"
I explained above what the command does.
adb shell "rm /data/log/dumpState_app_native.log 2>/dev/null"
Once again you should know what the command does.
Now we will need to delete some other crap off of the phone. The crap is in read only directories. So we will need to mount and remount these directories and set the permissions to read and write. To do this we will type the following commands.
adb.exe shell mount -o remount,rw -t rfs /dev/stl12 /system
Now we need to push a file called rootsetup which is on our computer on to our phone in to the /data/local/tmp/ directory. To do this we will issue the following commands.
adb.exe push rootsetup /data/local/tmp/rootsetup
Note: The above assumes that the rootsetup file is in the same directory as the adb.exe program is in on your computer. If it is in different location for example your ADB is in the root drive of your computer and the root setup file is in C:\Users\Username\Downloads directory then the above command should look like the following.
adb.exe push C:\Users\Username\Downloads\rootsetup /data/local/tmp/rootsetup
Now we will set the permissions of the rootsetup file to be 755. To do this we will issue the following commands.
adb.exe shell chmod 755 /data/local/tmp/rootsetup
Now we will run the rootsetup program on the phone. To do this we will type the following commands.
adb.exe shell /data/local/tmp/rootsetup
Once rootsetup is done executing we will want to remove it. To do this we will type the following.
adb.exe shell rm /data/local/tmp/rootsetup
Now we will synchronize our phone by typing the following commands.
adb.exe shell sync
Now we can place the root file which is called su onto our phone into the /system/xbin directory. To do this we will type the following commands.
adb.exe push su /system/xbin/su
Now technically our phone is officially rooted. However to utilize root privileges we may want to install the SuperUser app. This app can be installed in one of two locations. Either the /system/app directory or the /data/app directory. I usually prefer the data app directory. This way link2sd can create a symlink and place it on the second partition on my SD card. Depending on where you want this app you will issue one of the following commands.
adb.exe push Superuser.apk /data/app/Superuser.apk
The above command puts the Superuser app in the /data/app directory.
adb.exe push Superuser.apk /system/app/Superuser.apk
The above command puts the Superuser app in the /system/app directory.
Note: You could also just skip adding the Superuser.apk file using the ADB tool. And simply install it from the Android Market later. Either way you will still want to some other things to the phone which I state below.
Quite a few apps that require root privileges also need to use busybox. So we will also install that. To do that we will type the following.
adb.exe push busybox /system/xbin/busybox
In order for things such as busybox to run smoothly we will want to add the remount program. To do this we will type the following.
adb.exe push remount /system/xbin/remount
Now we will need to set the permissions for everything. The permissions for busybox and remount should be set to 755. The su program needs to have the permissions set to 6755. And the group it should belong to should be root.
So first we will set the permissions for remount and busybox. To do this we will type the following.
adb.exe shell chmod 755 /system/xbin/busybox
adb.exe shell chmod 755 /system/xbin/remount
Now we will change the group owner for su to root. We will do this by typing the following.
adb.exe shell chown root.shell /system/xbin/su
Now we will change the permissions of su by typing the following.
adb.exe shell chmod 6755 /system/xbin/su
Some root programs look for root in the /system/bin directory. So we could go threw the trouble of also adding root to that directory. Or we could simply save space on the phone and some time. By simply creating a symlink. To do this we will type the following.
adb.exe shell ln -s /system/xbin/su /system/bin/su
Now that we have put busybox on the phone. Lets go and install it. To do this we will type the following.
adb.exe shell /system/xbin/busybox --install -s /system/xbin
Now the last thing we will need to do is remove the file called zergRush. If we don’t do this the phone may get unrooted when we restart it. To remove this file we will type the following.
adb.exe shell rm /data/local/zergRush
Now lets unsync adb from the phone. To do this we will type the following.
We now have a fully rooted phone ready to use root enabled apps.