Thursday, 13 February 2014

How to enable the proguard to protect our andoid source code?


1) Open the project.properties file in our andoid app.

 there is a option to enable the proguard.

sample:

#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

just delete the " # "  symbol from the above line.

result will be like this:

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

2) Suppose,if we are using any external jar files then we will be facing some problems,To avoid such problems we

 have to use the keep,dontwarn option.

-keep class javax.** { *; }
-keep class org.** { *; }
-keep class twitter4j.** { *; }



-dontwarn javax.management.**
-dontwarn java.lang.management.**
-dontwarn org.apache.log4j.**
-dontwarn org.apache.commons.logging.**
-dontwarn org.slf4j.**
-dontwarn org.json.**

For more Details, Visit the below link:

http://developer.android.com/tools/help/proguard.html
http://www.simpligility.com/2010/12/hints-for-using-proguard-on-your-android-app/

Friday, 23 November 2012

How to get the Xml resource file from apk


Step1:
  Download the apktool, apktool installer from following link

http://code.google.com/p/android-apktool/downloads/detail?name=apktool-install-windows-r04-        brut1.tar.bz2

http://code.google.com/p/android-apktool/downloads/detail?name=apktool1.4.1.tar.bz2&can=2&q=

         apktool xx.tar will give you apktool.jar                                                                      
         apktool-install-XX.tar will give you apktool.bat. This bat file uses apktool.jar so both should be in      same folder.

Step2:
download framework-res.apk file and put it in same folder.  
         http://www.2shared.com/complete/MIFn5Cuo/framework-res.html

Now open the command prompt:

Navigate to the root directory of APKtool.bat and type the following command:

Ex:

d:raj\apktool\ apktool if   framwork-res.apk      

d:raj\apktool\ apktool d   sample.apk  

 



 Enjoy.........

how to extract the apk to get source code easy way


Step 1:
Get the apk (sample.apk) to specified(sample_1) folder and rename it to zip format (sample.zip) unzip(extract) that file with in the folder.

Step 2:
download the dex2jar from this link: http://code.google.com/p/dex2jar/downloads/list
   
copy this zip to sample_1 and unzip(extract) that file with in this folder..

Step 3:
download the  java de compiler from this link: http://java.decompiler.free.fr/?q=jdgui

        copy this to sample_1  and unzip(extract) that file with in this folder.

Step 4:

Open the dex2jar folder, copy source apk file within dex2jar folder.

Step 5:
Open the command prompt(browse your dex2jar folder)  Type  following code in command prompt

Ex:
D:sample\dex2jar\dex2jar.bat sample.apk

You will get sample_dex2jar.jar file within sample_1

Step 6:

Run the jd-gui.exe.

Click  File-->select the sample_dex2jar.jar where it is stored.

      Now you will get the all java code.

Thursday, 22 November 2012

ADB server didn’t ACK, failed to start daemon


             These error Can be solved by using following step.

Step 1: CTRL+Shift+Esc to open the task manager , which has adb.exe within  process tab and end (kill) that process

Step 2: Now, close the eclipse, which is currently running on my computer.

Step 3: Again, restart eclipse then solved that problem.

Sunday, 18 November 2012

How to install external apk to our Android Emulator Easy way?


    Step 1: Get the apk you want to install.

    Step 2: Select the the DDMS option in your Eclipse.

    Step 3: Go to File Explorer(Refer the image)


   Step 4: With in the File Explorer select Data-->apps. There is a list of application installed in our emulator.

   Step 5: Select any one from there.

   Step 6: Now, Click the mobile icon(on the Right side of our File Explorer) to push the apk file to Device.


  Step 7: Now, select the apk you want to install from your computer.



  Step 8: apk will install successfully, now go to your emulator(search the
              app now install) there is a application which we install now.


 Enjoy..




Wednesday, 7 November 2012

PC Keyboard not Working in Emulator after Upgrade Android os version to 4.1 (Jelly Bean)

Step :1
   
          Windows-->AVD Manager-->  Select the emulator you want to edit.

Step :2
 
          Click Edit--->Hardware---->New--->Click Accelerometer Dropdown-->select Keyboard support      --> Ok.

Step :3
       
        On hardware -->Value--->Change to "yes"(Default "no"). ---->Edit  AVD..

Step :4
     
       Start The Emulator again..

  Now Pc Keyboard will work in JellyBean(4.1) Emulator.


             Enjoy...........




Thursday, 21 June 2012

SQLite Database Browser to open table from Android application


http://sourceforge.net/projects/sqlitebrowser/files/latest/download

Just download the SQLite Database browser from above link.

Install the SQLite Database browser


* Open the android DDMS

* Select file Explorer

* Data ---->data -->select your package name--->open database folder.

* Select the database ...Click the save icon(first from left) on file explorer menu.

* Save it .. where you want

* Open the SQLite browser click open icon..select your database name..open your db .

* Click browse Data tab.. select your table name from the drop down list(near search icon).

*Table will open.