Re: [android-building] frameworks.jar is hitting the maximum number of member classes?

1,450 views
Skip to first unread message

Jean-Baptiste Queru

unread,
Jul 17, 2012, 9:14:55 AM7/17/12
to android-...@googlegroups.com
Please discuss this on android-platform. There's little that can be
done at the build level, this is really a platform issue.

JBQ

On Mon, Jul 16, 2012 at 12:23 PM, iceandfire <arham...@gmail.com> wrote:
> So I was compiling AOSP JB and ran it to this issue.
>
> frameworks.jar is now the maximum number of member classes. Too many
> methods: 65641; max is 65536.
>
>
> I applied the patch from CyanogenMod which splits the frameworks.jar into 2
> parts. Still the problem persists.
>
>
> Is AOSP or Google fixing this?
>
> --
> 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



--
Jean-Baptiste M. "JBQ" Queru
Technical Lead, Android Open Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Rama Velpuri

unread,
Oct 25, 2012, 1:01:45 PM10/25/12
to android-...@googlegroups.com
Hi Raymond,

Thanks for the update..

I made changes in Android.mk as you refered and when I tried to build, I am getting error as "Target java module does not define any source or resource files.  Stop."

Could you please review attached make file and suggest any changes.

Thanks in advance.

Regards,
Rama


On Thu, Oct 25, 2012 at 3:37 AM, Raymond Hong <raymond...@gmail.com> wrote:
Hi Rama,

Soon I'll contact you. Please wait.

BR,
Raymond

2012년 10월 25일 목요일 오전 3시 28분 59초 UTC+9, Rama Velpuri 님의 말:
Hi Raymond,

I am also facing this issue.

If you don't mind, could you please send your Android.mk file. 

Thanks in advance..
Rama

On Monday, July 23, 2012 11:18:44 PM UTC-4, Raymond Hong wrote:
Hi JBQ,
 
My question is related to the building system.
 
My team considers using jarjar repackaging tool (http://code.google.com/p/jarjar/) to divide framework.jar into 2 jar files, framework.jar and framework2.jar.
The step is below.
  • In frameworks/base/Android.mk we defined framework2.jar module which includes source files to be extracted from framework.jar

LOCAL_SRC_FILES := $(framework2_srcs)

  • framework2.jar includes some classes of framework.jar
jarjar_zap_classes := \

        telephony/java/com/android/internal/telephony/%

framework2_srcs := $(filter $(jarjar_zap_classes), $(LOCAL_SRC_FILES)) # this should be declared before "include $(BUILD_JAVA_LIBRARY)" of framework.jar

  • use LOCAL_JARJAR_RULES for framework.jar to extract classes from framework.jar

zap com.android.internal.telephony.**

  • modified some makefiles, build/core/dex_preopt.mk, frameworks/base/tool/layoutlib/Android.mk and system/core/rootdir/init.rc for supporting framework2.
The build was successful and it ran well on the device. This also reduced the method references in dex file. Any problem or risk when using this tool?
 
The latest version of jarjar is 1.4 but AOSP has 1.0rc8. In above build the tool didn't remove emptry directory from framework.jar after extracting.
 
Thank you,
Raymond
Android.mk

Mateor

unread,
Oct 26, 2012, 2:20:48 PM10/26/12
to Android Building
I gave him those changes. As well as another commit I submitted
upstream to you guys: http://review.cyanogenmod.com/#/c/24626/

And on top of that I sent a BUNCH of other classes that could be also
moved into framework2.jar. But they are trying to inject something
like an additional 3000 methods. Even with all those changes I sent, I
think they are still about 700 methods shy.

I had suggested Raymond jarjar rules method early, since the gap was
so large. I tried to do it myself early on in this battle, but
couldn't get it to work. By that time, I had found enough movable
classes, so I reverted to that.

If you know how to correctly use the jarjar rules, I would also be
interested in how to do that properly.

On Oct 26, 12:37 am, cdesai <chirayudes...@gmail.com> wrote:
> https://groups.google.com/forum/#!msg/android-platform/sR6I2ldCxwU/iT...
>  :)
>
> We moved some classes to framework2.jar
>
> https://github.com/CyanogenMod/android_frameworks_base/commit/854f6f7...https://github.com/CyanogenMod/android_build/commit/a75d678c0347ee0cc...https://github.com/CyanogenMod/android_system_core/commit/d9cf17ba333...

Conley Owens

unread,
Oct 26, 2012, 2:31:44 PM10/26/12
to android-...@googlegroups.com
As JBQ suggested, this discussion is best kept in the android-platform thread.

Thanks,

Rama Velpuri

unread,
Oct 30, 2012, 1:22:43 PM10/30/12
to android-...@googlegroups.com
I have observed AOSP 4.2 is released. 

I am curious to know whether this issue is fixed in that release?

Any input is greatly appreciated which helps our project milestones..
Reply all
Reply to author
Forward
0 new messages