Posts

Showing posts from October, 2011

Create your own shared-library

Below is the step of creating own shared-library: Create JAVA file, ex: c:\com.myactivity.java Compress to JAR, with command: jar cf c:\com.myactivity.jar c:\com.myactivity.java JAR is our library file. Create XML file (permission file), ex: c:\com.myactivity.xml, as below: <permissions> <library name="com.myactivity" file="/system/framework/com.myactivity.jar" /> </permissions>  Root the OS image: adb root (We assume that the image can be rooted.) Mount /system, commands are as belows: adb shell mount –o remount /system exit  Push JAR and XML file to OS image: adb push c:\com.myactivity.jar /system/framework/ adb push c:\com.myactivity.xml /system/etc/permissions/  Reboot device. After rebooted, the shared-library can be used correctly. Try using to test the library. <uses-library android:name="com.myactivity" android:required="true" />