Showing posts with label Hacks and Mods. Show all posts
Showing posts with label Hacks and Mods. Show all posts

December 27, 2011

How to root your Android phone

So rooting your phone gives you lot of freedom and brings out your phones abilities to the maximum.
There are many guides available to root your phone. I am just gonna mention that here.
Note: This method is for rooting Android 2.1 phones. It doesn't workout for 2.2 and higher versions(Which i am not sure of) If this process shows up a failure then try the method mentioned at the bottom of the post for rooting.

But before you get started, don’t forget to enable USB debugging on your phone by going to Settings->Applications->Development and enabling “USB Debugging



how to root your android phone

Also you need Android SDK kit and also latest Java version installed in your PC. You can download Java from Java's official website. Also you need to have the necessary drivers of your mobile brand upto date.
I am referring to Kies for Samsung. Sony Ericsson PC companion for SE phones. Without all the above this process wont work out.

Now we are set up to start things. Download Super One Click. Extract the zip.
Click the Super One Click icon to run it. When Super One Click launches, you’ll see several large buttons at the top of the screen. Make sure your phone is connected to the computer via USB and that the debugger can “see” it (activity will start logging). Make sure your SD card is not mounted, and go ahead and click “Root” in Super One Click.

You’ll see the scrolling activity as SuperOneClick does it’s job, with “OK”appearing after each task. You may see warnings, but so long as it doesn’t “hang” on waiting for device, things should keep scrolling until it finally returns the “Success!”message.
android root access 


At this point, check out the installed apps on your phone and you should see a “Superuser” icon that looks like a Droid skull and crossbones. If you see it, you’re rooted. If you don't , I’d suggest rebooting even if you do see it, as I had some issues getting rooted apps to work until I actually rebooted my own device. 

how to root android
When you open up Supe rUser, you’ll see that you can configure notifications so that no app can actually run with root access unless you give it permission.


android root access

Whenever you run an app that requires root (superuser), you’ll see a notification requesting permission. I like this because it also means that if an app gets installed and tries to utilize superuser access without your knowledge, it can’t.
how to root android
If you check off “Remember”, the program gets added to the list of “approved”apps with superuser access. You can see the ones on your list when you click on the “Apps” tab.
how to root your android phone
As you can see, once you have SDK installed and connected to your phone, the process is as simple as installing and running Super One Click. The program takes care of rooting your phone from the PC. Finally, you can enjoy a rooted Android phone, and all of the fun and excitement that offers!

You can also unroot the phone using the unroot button over there in Super One Click. The General fact is that your phone loses its warranty once its rooted. So to recover it you can pretty much unroot it for claiming it. So don't worry. :)

Well the above method isn't successful for Android 2.2 and higher. I am not sure of it though but here is the widely followed method for rooting 2.2 and higher phones.

For rooting Android 2.2 and higher:
Download this zip file for rooting. Root
Copy it to your memory card.
Then enter into recovery mode.
There are different methods for entering into recovery on different mobile phones. So search for your method in the internet.
Now in the recovery mode Select " Install custom zip from SD card or similar option to it and then install the zip and reboot the phone. You would have your phone rooted.
To unroot download this zip file Unroot and follow the same steps.

How to make your friends believe that you have the latest Android version installed in your Android mobile

You need a rooted phone, Root Explorer or any Explorer which gets you access to system files.
To root your phone see here.
To download Root Explorer see here.

Open Root explorer.
Open system folder.
You will find a file called build.prop.
Press and hold the file to get a menu.
Select Open in Text Editor.
In the line " ro.build.version.release=" edit the existing version and enter the desired version you want.
For example if the actual line reads
ro.build.version.release=2.3.4

The edited line should be something like this
ro.build.version.release=4.0.1

Now save the file and reboot the phone. Now go to Settings and Select About phone to find your Android Version to be 4.0.1! Happy fooling your friends :)

December 23, 2011

Decompiling and Compiling Using baksmali and smali

Today its gonna be about modifying jar and apk files using baksmali and smali which i learnt over the internet.
First you need to download the necessary files.
Download and extract this zip to your pc. baksmali and smali
If you don't have notepad++ ,download it here.
If you don't have 7zip, download it here.

After this follow the below instructions.

Decompiling:


I am going to decompile an “android.policy.jar” of a custom rom.
But you can use this procedure to decompile apk files also by editing the smali code.
 
1.bat is the decompiler file. 
Now you need to open this file using notepad ++ and edit the file name inside.
You can edit this bat file and rename the jar/apk name to what jar/apk file your working with. 
  
In my case am gonna use anroid.policy.jar
Then rename 2.bat in the same way to classes.dex

 
Copy the anroid.policy.jar file that you want to edit to the folder
 
 
Now Double Click Command Prompt.bat. Its a windows batch file for this folder.
Then type 1 and press enter.
 

The displayed info might change but the result would be that you would get a folder called Classout in the folder.

Now double click your way through the folders until you reach the smali code.
Now open the required smali code file with notepad++ only and then edit the required code and save the file.
Compiling:
                
Now we will recompile the classout folder to get the new classes.dex” file
                      Back to command prompt type 2 then press enter.
 There would be a new classes.dex file created and ready in your folder. 
Now right click on the android.policy.jar and select 7zip -> Open archive.


You will have a open “android.policy.jar” (not unzipped) to drop “classes.dex” in.
Click on class.dex and while holding down button drag and drop into open “android.policy.jar” window.

                                         Click Yes to finish the copy.
Close window and copy “android.policy.jar” to your phone and replace the existing android.policy.jar file to test. Keep a back up of the original though in case something messes up :) 

A result of the above decompiling and compiling would be this following screen shot. I have added a footer line at the bottom of my Sony Ericsson W8. I use Ginger dx ROM and I removed Doixanh's signature at the bottom. Sorry Doixanh. No offense.