1. Change .APK to .ZIP and unzip it. There is classes.dex in the folder.
2. Download dex2jar(http://code.google.com/p/dex2jar/) to convert classes.dex to classes.
. dex2jar.sh PATH_TO_CLASSES_DEX/classes.dex
The command should generate classes_dex2jar.jar
3. Download jdgui(http://mac.softpedia.com/dyn-postdownload.php?p=48710&t=4&i=1) to unzip jar file.
Open jdgui and choose classes_dex2.jar.jar. All folder and java file should be browsed in JDGUI.
Save all source.
4. Download android-apktool(https://code.google.com/p/android-apktool/downloads/list). Choose "apktool1.5.2.tar.bz2" and "apktool-install-macosx-r05-ibot.tar.bz2"(This depends on platform).
. apktool d PATH_TO_APK/xxx.apk
All resource and xml file are generated in APK_NAME folder
Monday, September 23, 2013
Friday, June 14, 2013
Compile Android Apps
Command
1. make: compile all Android system
2. make [package name]: the package name can be found in packages/apps/xx/Android.mk
or
mmm packages/apps/Package_name
The APK and odex will generate in out/target/product/generic/system/app/xxx.apk
3. make snod: this command will regenerate system.img
4. Remove default sign key
Put 3rd apk into system.img
1. put apk into out/target/product/generic/system/app/
2. make snod
1. make: compile all Android system
2. make [package name]: the package name can be found in packages/apps/xx/Android.mk
or
mmm packages/apps/Package_name
The APK and odex will generate in out/target/product/generic/system/app/xxx.apk
3. make snod: this command will regenerate system.img
4. Remove default sign key
zip –d xxx.apk META-INF/*
Put 3rd apk into system.img
1. put apk into out/target/product/generic/system/app/
2. make snod
Tuesday, May 28, 2013
Run GCM demo by app engine server
GCM api
1. Create google api project about GCM
2. Create server key. This api key will be used fot setting up server application.
Create App Engine project
1. Apply one project in app engine. Input project name and project url name.
Peoject url name will be used in Android application.
2. Download App engine SDK for JAVA
Set up Server Application
1. Android SDK Manager, install Extras > Google Cloud Messaging for Android Library.
2. In a text editor, edit PATH_TO_ANDOIRD_SDK/extras/google/gcm/
3. In a shell window, go to the PATH_TO_ANDOIRD_SDK/extras/google/gcm/
4. ant -Dsdk.dir=PATH_APP_ENGINE_SDK/appengine-java-sdk-1.8.0/ compile
1. Create google api project about GCM
2. Create server key. This api key will be used fot setting up server application.
Create App Engine project
1. Apply one project in app engine. Input project name and project url name.
Peoject url name will be used in Android application.
2. Download App engine SDK for JAVA
Set up Server Application
1. Android SDK Manager, install Extras > Google Cloud Messaging for Android Library.
2. In a text editor, edit PATH_TO_ANDOIRD_SDK/extras/google/gcm/
samples/gcm-demo-appengine/src/com/google/android/gcm/demo/server/ApiKeyInitializer.java
and replace the existing text with the API key obtained above.3. In a shell window, go to the PATH_TO_ANDOIRD_SDK/extras/google/gcm/
samples/gcm-demo-appengine
directory.4. ant -Dsdk.dir=PATH_APP_ENGINE_SDK/appengine-java-sdk-1.8.0/ compile
It will generate WebContent/. The code will be upload to App engine, so we don't need to launch server in our local side.
Upload Server Application to App Engine
1. From the appengine-java-sdk directory, run:
bin\appcfg.cmd update PATH_TO_ANDOIRD_SDK/extras/google/gcm/samples/gcm-demo-appengine/WebContent/
2. Open http://appspot.com
3. It should show "no devices registered" page.
Set up Android Application
- Using a text editor, open
PATH_TO_ANDOIRD_SDK/extras/google/gcm/samples/gcm-demo-client/src/com/google/android/gcm/demo/app/CommonUtilities.java
and set the proper values for theSENDER_ID
andSERVER_URL
constants. - In a shell window, go to the
gcm-demo-client
directory. - Use the SDK's
android
tool to generate theant
build files: android update project --name GCMDemo -p . --target android-16
4. ant clean debug
5. It will generate GCMDemo-debug.apk in bin/ folder
6. Install APK in devices.
7. Done.
Tuesday, June 26, 2012
Git ignore
- Keep your .gitignore file.
- Clear your GIT cache. Don’t worry, this won’t delete any of your local files, just what GIT is tracking.
git rm -r --cached .
- Add everything in your project. Your .gitignore file will exclude what you want to ignore now and start tracking the good stuff.
git add .
- Commit your changes.
git commit -m "Now my .gitignore file works correctly!"
Tuesday, April 3, 2012
compile Android Apps
Command
1. make: compile all Android system
2. make [package name]: the package name can be found in packages/apps/xx/Android.mk
or
mmm packages/apps/Package_name
The APK and odex will generate in out/target/product/generic/system/app/xxx.apk
3. make snod: this command will regenerate system.img
Put 3rd apk into system.img
1. put apk into out/target/product/generic/system/app/
2. make snod
or
1. mkdir packages/apps/MyApp
2. vi Android.mk
LOCAL_PATH:=$(call my-dir)
include $(CLEAR_VARS)
LOCAL_POST_PROCESS_COMMAND:=$(shell cp -r $(LOCAL_PATH)/*.apk $TARGET_OUT)/app/)
3. make
Generate AIDL stub
1. make: compile all Android system
2. All system AIDL will convert java code in android_source/out/target/common/obj/JAVA_LIBRARIES/.....
1. make: compile all Android system
2. make [package name]: the package name can be found in packages/apps/xx/Android.mk
or
mmm packages/apps/Package_name
The APK and odex will generate in out/target/product/generic/system/app/xxx.apk
3. make snod: this command will regenerate system.img
Put 3rd apk into system.img
1. put apk into out/target/product/generic/system/app/
2. make snod
or
1. mkdir packages/apps/MyApp
2. vi Android.mk
LOCAL_PATH:=$(call my-dir)
include $(CLEAR_VARS)
LOCAL_POST_PROCESS_COMMAND:=$(shell cp -r $(LOCAL_PATH)/*.apk $TARGET_OUT)/app/)
3. make
Generate AIDL stub
1. make: compile all Android system
2. All system AIDL will convert java code in android_source/out/target/common/obj/JAVA_LIBRARIES/.....
Friday, February 17, 2012
gimap
use telnet to connect gimap.
1. openssl s_client -crlf -connect imap.gmail.com:993
2. . login xxx@gmail.com PASSWORD
3. . list "" "*"
4. use other command. such as close, store, create, delete....
1. openssl s_client -crlf -connect imap.gmail.com:993
2. . login xxx@gmail.com PASSWORD
3. . list "" "*"
4. use other command. such as close, store, create, delete....
Monday, January 16, 2012
Git- Can't locate Error.pm : on Mac OS X
install Git on Mac. When I put "git add -i", then show "Can't locate Error.pm in @INC ....."
I found the answer on internet as belowTamsler:
sudo perl -MCPAN -e 'install Error'
I found the answer on internet as belowTamsler:
sudo perl -MCPAN -e 'install Error'
Subscribe to:
Posts (Atom)