I hope anybody at Google or AOSP answer this thread.
Basic procedure is like below:
1) build framework.jar with all source codes
2) extract some packages/classes from framework.jar and make framework2.jar by using jarjar tool before running dex tool.
3) add framework2.jar to BOOTCLASSPATH and DEXPREOPT_BOOT_JARS. this was already told.
There are something to do for 2)
PRODUCT_PACKAGES += framework2
2) frameworks/base/Android.mk
LOCAL_SRC_FILES := ... # all java files for framework.jar
...
# files to be removed from framework.jar
framework2_candidate := \
telephony/java/com/android/internal/telephony/% \
...
framework2_srcs := $(filter $(framework2_candidate), $(LOCAL_SRC_FILES))
LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
...
LOCAL_MODULE := framework
...
include $(BUILD_JAVA_LIBRARY)
...
framework_built := $(call java-lib-deps,framework)
framework_built += $(call java-lib-deps,framework2)
...
framework_docs_LOCAL_JAVA_LIBRARIES += framework2
...
framework_docs_LOCAL_ADDITIONAL_JAVA_DIR := $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
framework_docs_LOCAL_ADDITIONAL_JAVA_DIR += $(call intermediates-dir-for,JAVA_LIBRARIES,framework2,,COMMON)
...
include $(CLEAR_VARS)
LOCAL_MODULE := framework2
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(framework2_srcs)
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_JAVA_LIBRARIES := bouncycastle core core-junit ext framework
LOCAL_DX_FLAGS := --core-library
LOCAL_NO_EMMA_INSTRUMENT := true
LOCAL_NO_EMMA_COMPILE := true
include $(BUILD_JAVA_LIBRARY)
3) frameworks/base/jarjar-rules.txt
zap com.android.internal.telephony.**
4) frameworks/base/tools/layoutlib/Android.mk
built_framework_dep := $(call java-lib-deps,framework)
built_framework_classes := $(call java-lib-files,framework)
built_framework_dep += $(call java-lib-deps,framework2)
built_framework_classes += $(call java-lib-files,framework2)
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
LOCAL_JAVA_LIBRARIES := core core-junit ext framework framework2 $(LOCAL_JAVA_LIBRARIES)
endif
else
LOCAL_JAVA_LIBRARIES := core ext framework framework2 $(LOCAL_JAVA_LIBRARIES)
endif # LOCAL_SDK_VERSION
Raymond
2012년 9월 10일 월요일 오후 10시 48분 49초 UTC+9, Mateor 님의 말:
This has been working for us, but as of 9/09/2012, the additions we add to the framework.jar again put it over the limit.
The split into framework2.jar created some space, but I am going to need some more space. That means that this is coming down the pipe to everyone else sooner rather than later.
CM, even after splitting the framework.jar into two, is only has 250 methods breathing room. My projest can no longer fit in this space.
Any suggestions? It looks like Steve moved all the classes he could. I have heard that there are some rils I can move pver to buy some time?