Skip to main content

Posts

Showing posts with the label android

Divide : Separate work and play on one device

Recently I came across this beautiful app, while searching for good email app for corporate account. This app not only helps you in managing your emails, but also divides your work life from normal life, which can be accessed like switching between launchers. From Play Store: Divide delivers the ultimate mobile productivity tool to get work done securely on your Android device. Check your work email, view your calendar, look up contacts and more, all in one encrypted workspace without worrying about your privacy or the threat of your company wiping your device. Divide syncs with Exchange ActiveSync, Google Apps, and Lotus Notes and offers a complete BYOD solution for individuals and IT. Link: Divide

Reverse Engineering : Android Dex files to Class files

In my previous post, we have seen how to extract the contents of img file . After extraction, you will find that most of the files have ".dex" extension. These are Compiled Android application code files. In order to convert them into executable format (.class or .jar), you can use dex2jar tool. Extract it to a proper location and open the terminal to this location. Now run the following command: ./d2j-dex2jar.sh <Path-to-dex_file> It will bundle the dex files into a jar file, and stores it in the current directory. dex2jar can also be used to convert dex files into variuos other formats. For detailed info, click here .

Reverse Engineering : Extract contents from .img file

Unyaffs is a program to extract files from a YAFFS2 file system image. Currently it can only extract images created by mkyaffs2image. Download the source from here . Compiling : Extract the contents into a suitable place and run the following command make Usage : unyaffs [options] <image_file_name> [<extract_directory>] Options: -d detection of flash layout, no extraction -b spare contains bad block information -c <chunk size> set chunk size in KByte (default: autodetect, max: 16) -s <spare size> set spare size in Byte (default: autodetect, max: 512) -t list image contents -v verbose output -V print version Source: Official github repository

Android: Failure [INSTALL_FAILED_UID_CHANGED]

Today, I tried to install an application from command line and I found this error: Failure [INSTALL_FAILED_UID_CHANGED] After Googling for a while, I found the reason. This happens when there is application data from older version is still present. To resolve this, clear/delete the following directory: /data/data/<PACKAGE_NAME> To do this, open terminal and type the following commands: adb shell cd /data/data/ rm -r <PACKAGE_NAME> exit Now try to install the application. Viola.

Setting up / Working with Android Source code

1. Install Ubuntu 10.04, as the Android root is built on it. 2. Update the system - Run Update manager and install new packages 3. Update the system settings: Proxy (IF REQUIRED) Adding Repository 4. Install sun java 6 Install java Change the default version . 5. Installing required packages: sudo apt-get install git-core gnupg flex bison gperf build-essential \zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \libxml2-utils xsltproc 6. Upgrade git 7. Installing Repo: mkdir ~/bin PATH=~/bin:$PATH curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo chmod a+x ~/bin/repo 8. Initialising a Repo client: mkdir WORKING_DIRECTORY cd WORKING_DIRECTORY repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1 If any error saying "HTTP request failed", open file "~/bin/...

Problems importing Android Source Code into Eclipse

Errors on the project build path when using Eclipse When I debug the framework source using Eclipse, there are some errors on the project build path. Error messages I saw are the following : Project 'Android' is missing required library: 'out/target/common/obj/JAVA_LIBRARIES/google-common_intermediates/javalib.jar' Project 'Android' is missing required library: 'out/target/common/obj/JAVA_LIBRARIES/gsf-client_intermediates/javalib.jar' Solution: Goto Project>Properties and libraries section and edit first one to "out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/javalib.jar"  and remove second one. Missing required library when import the android source 4.0 to Eclipse After this, the build path errors were gone, but I got about 200 errors referring to missing types. This could only be another classpath problem for Eclipse. Here are the extra libraries, that we have to add to the .classpath file: <c...

Porting LEWA ROM to any device(NOOBS guide)

PREREQUISITES : adb- This will help you out in deadly conditions winRAR - For opening zip files Notepad++ - For editing text ROMS YOU WILL NEED : Base ROM : CM7/MiUi/old Lewa(didn't tried on stock rom) For Your Device LewaOS ROM : Get it from official site. STEPS TO PORT : Open both ROMs using winRAR in two windows..No Need To Extract Go to '/system' and delete '/system/app', '/system/framework' and '/system/media' folder from Base ROM (CM7) Copy '/system/app' , '/system/framework' and '/system/media' folder from LewaOS to Base ROM. Copying can be done by simply drag and drop between the winRAR windows   Go To '/system/bin' of Base ROM --Copy all files present in '/system/bin' to LewaROM. --Now from LewaROM copy all files from '/system/bin' folder to '/system/bin' of Base ROM --This replaces all existing files of same name and adds missing files   Go To '/system/e...

Create your own custom ROM for any Android device (from XDA)

Don't want to spend time reading? Have a look at the videos here You can find a detailed guide, which keeps on updating in this thread . This guide is for the one who have little experience with Android. Also covers some good advanced topics.

Building Your Application for Release using Eclipse ADT

After you finish configuring your application you can build it into a release-ready .apk fle that is signed and optimized. The JDK includes the tools for signing the .apk file (Keytool and Jarsigner); the Android SDK includes the tools for compiling and optimizing the .apk file. If you are using Eclipse with the ADT plugin or you are using the Ant build script from the command line, you can automate the entire build process. In preparation for signing your application, you must first ensure that you have a suitable private key with which to sign. Following Keytool command generates a private key: $ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 Running the example command above, Keytool prompts you to provide passwords for the keystore and key, and to provide the Distinguished Name fields for your key. It then generates the keystore as a file called  my-release-key.keystore . The keystore and key are protec...

ChildBrowser Android

First you need to get ready with the phonegap running properly. It's here . First download the source from here Now follow these procedure:  1. To install the plugin, move  www/childbrowser.js  to your project's www folder and include a reference to it in your html file after phonegap<version>.js. <script type="text/javascript" charset="utf-8" src="phonegap<version>.js"></script> <script type="text/javascript" charset="utf-8" src="childbrowser.js"></script> 2. Copy the image files folder www/childbrowser to your project's www folder.Here you can edit the code or add any other files, but keep the folder named "ChildBrowser" as it is. Because, it is being referenced from others locations. 3. Create a directory within your project called " src/com/phonegap/plugins/childBrowser " and copy " src/com/phonegap/plugins/childBrowser/ChildBrowser.java ...