Thursday, January 29, 2009

How to debug any default application in Android....

This post describes the detail procedure how to debug default applications that comes with Android source code...
Step 1: First launch emulator from command line (by typing Emulator command) 

Step 2: Then launch DDMS using command line (by typing DDMS command)

Step 3: Start your application in emulator which you want to debug and you can check the process into DDMS (DDMS will automatically sync with emulator on 8700 port) 

Step 4: Start eclipse and open your source project (you will get one error regarding port 8700, please ignore it this is due to DDMS already sync on 8700 port)

Step 5: Put break pointer in your source code to debug it

Step 6: Right click on your project -> Debug as -> Debug Configurations then you will see Debug configuration window

Step 7: Right click on 'Remote Java Application' and select 'New' then give name 'android-debug' or anything you like.

Step 8: Set the 'Project' to your source project

Step 9: Keep the 'Host' set to 'localhost', but change 'Port' to 8700.

Step 10: Click the 'Debug' button and navigate in your application on emulator.

HAPPY DEBUGGING..........

Saturday, January 17, 2009

How to remove default/preloaded applications like browser,camera,contacts...

Suppose u have developed a new contact application which is much better than the preloaded contact application in android..so when u want to install it eclipse will throw u bunch of error saying "Please uninstall the contact application first by adb uninstall "package name".

When u tried to do that...Alas...it did not work...saying FAILED

The reason for this is that u don't have the root access and u have only read only access..So to change the access and remove the contacts(any application) follow the below instructions..

1.Start your emulator
2.execute "adb shell" in on terminal from SDK_ROOT/tool folder
3.#mount -o remount,rw /dev/block/mtdblock3 /system
This will mount your system folder with read/write permission
4.#go to system/apps folder
cd /system/apps
5.#rm application.apk
i.e. rm contacts.apk
Bingo Check your emulator.The default application is gone.Now u can install your application with eclipse.
N.B.:This is required to remove the apps already present in emulator...If u want to remove some of the application u've installed then just do
adb uninstall yourpackgae
or
adb shell
#cd /data/app
#rm yourapp.apk

So enjoy Being an Android Programmer........

Android Books

As I promised i am back with...a santa clause's bag with gifts for u...Download the following books...
Android Essentials....

Android Programmer's guide:


So download these books...and be an ANDROID!!!!!!!!!!!!

What is Android??

Look left..Look Right...Go straight..Turn Left....Is this what android means??A hardwired mcu controlled robos??Shake urself...here comes the OPEN SOURCE complete mobile stack provided by google...Download it and Play with it.Believe me you won't have much more fun anything other than this.
So to get started....
http://code.google.com/android/ for all the info on android..
If u are intelligent enough den u won't look further..and u won't gimme a damn  shit..after this...still if u r dumb...den go to..
http://source.android.com/download for complete android source code...
That's all u have to do to get the fun out of work....Then What i m doing..with such a crap blog??
U'll find out soon..with my next blog......[:P]..
Till den...Kabhi Alvida Na kehna...Phir Milenge..Chalte Chalte..