--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
Hi Ying,Thanks for reply. I know you are an expert in Android compiling. I have one confusion: if I want to modify ActivityManager.java(which is in Android.jar) and rebuild to have a new android.jar, I should compile1. The whole Android source code(several GB)2. A certain branch of the whole Android source code.3. Just a few .jars related to android.jarPlease help
在 2012年9月21日星期五UTC-4下午1时47分28秒,Ying Wang写道:
Hi Ying,
Thanks for all your guidance. I have finally built Android Source and SDK. But I am still not sure how to build self-modified android.jar(javalib.jar) in the fast way as you indicated.
Here is what I did: I made small modification to the ActivityManager.java which is located at out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/src/android/app, that is, I added annotation in it and change existing " throw new RuntimeException("Stub!") " to " throw new RuntimeException("Stubmodified!") ". Then I used the command
$ lunch full-eng && make -j showcommands out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/javalib.jar
to build a new javalib.jar. After that, I just unzip the new javalib.jar to .class files, and consequently decompile .class files to .java files. However, I did not find my changes in ActivityManager.java.
I wonder if I did something wrong or my method itself is totally wrong. Then, how to make modification to android.jar/Android framework, and apply the new one on emulator/devices?
Thanks for having your time
Hi YingActually, I found it is absurd to change files under out directory after I submitted last post. But I am not sure where is the source code corresponds to out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/javalib.jar. Then I briefly searched the whole Android Source, and found /frameworks/base/core directory likely to be the source code for building. So I modified the ActivityManager.java under /frameworks/base/core/java/android.app/. However, after building using $ lunch full-eng && make -j showcommands out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/javalib.jar, I did not find my modification in the new javalib.jar.I wonder if I found the wrong source directory or anything else?Thanks very much
在 2012年9月24日星期一UTC-4下午12时30分59秒,Ying Wang写道: