Wednesday, July 25, 2012

Eclipse JAVA Syntax Coloring and Element

Do you know?? Eclipse can identify below 29 element of java syntax.

Abstract classes, method invocations
Annotations & element references
Auto(un)boxed expressions
Brackets
Classes
Constants
Deprecated members
Enums
Fields
Inherited files, method invocations
Interfaces
Keyword 'return'
Keywords excluding 'return'
Local variable declarations
Local variable references
Method delarations
Methods
Numbers
Operators
Others
Parameter variables
Static fields
Static method invocations
Strings
Type arguments
Type variables

I'm trying to setup powerful readable coloring for my eclipse.

Would you like to try this??

Open your eclise Window -> Preferences -> Java -> Editor -> Syntax Coloring


This is my example ( still developing )


Sunday, February 5, 2012

chagne avd data partition size

just add following line to your avd/config.ini


disk.dataPartition.size=512

Wednesday, January 18, 2012

sign your apk with platform key for using shared system id

you can find the key in your AOSP code.

normally you can find here AOSP_HOME/build/target/product/security

execute this command in that dir.

1.
$ openssl pkcs8 -inform DER -nocrypt -in platform.pk8 -out platform.pem
2.
$ openssl pkcs12 -export -in platform.x509.pem -inkey platform.pem -out platform.p12 -password pass:android -name androiddebugkey
3.
$ /usr/lib/jvm/java-6-sun/bin/keytool -importkeystore -deststorepass android -destkeystore platform.jks -srcstoretype PKCS12 -srcstorepass android -srckeystore platform.p12
then you can get platform.jks file can be used on eclipse.

copy platform.jks to your key dir.

and open eclipse -> window -> preferences -> Android -> build



then your application is signed with platform key and system user id application can be ran.

remember, your Androidmanifest.xml need "android:sharedUserId="android.uid.system"

debug and modify android core app ( like settings ) on eclipse, window

First of all, you need compiled AOSP(http://source.android.com/) which API Level you want to use.

In my case, i'm using API 15 and vbox_x86 Env.

in your AOSP_HOME

@bgpark:ics$ . build/envsetup.sh
@bgpark:ics$ lunch vbox_x86-eng
@bgpark:ics$ make -j12


I think you already know this one.



Select Add Library by right mouse click










and make user library with System Library check option.
















add some jar files.
for example, we need 2 shared jar for Settings project.

add guava_intermediates\classes.jar by add External jar and change reference order.

now you can build without any problems.



You will need this article for run your core app with appropriate authority.
http://stoned-android.blogspot.com/2012/01/sign-your-apk-with-platform-key-for.html