Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,811,847 Members 52,996 Now Online
XDA Developers Android and Mobile Development Forum

Resource package name is not necessarily the same as app package name

Tip us?
 
alirazeen
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 3
Join Date: May 2014
Default Resource package name is not necessarily the same as app package name

I'd like to report a possible bug. I searched the forums and it doesn't seem like anyone else has reported this yet but I apologize in advance if this is a repost.

When the handleInitPackageResources(InitPackageResourcesPar am) method is called, I assume that resparam.res.getPackageName() should return the package name of the resources being loaded. However, this does not seem to work as expected. Let's take for example the Googe Hangouts app.

The Hangouts app has the application package name "com.google.android.talk". However, the package name of the resources is "com.google.android.apps.babel" and not "com.google.android.talk". This can be verified by doing the following:

Code:
aapt dump badging [path_to_hangouts_apk]
At the head of the output, you should notice package: name='com.google.android.talk' . This is the application package name. Now try:

Code:
aapt dump resources [path_to_hangouts_apk]
Now, at the head of the output, you should notice Package 0 id=127 name=com.google.android.apps.babel. This is the package name of the resources. It would be great if resparam.res.getPackageName() returns "com.google.android.apps.babel" instead of "com.google.android.talk".

If I try to access resource IDs of Google Hangouts using the resparam.res.getIdentifier method, and by passing "com.google.android.talk" as the argument to defPackage, I do not get any valid IDs. However, If I pass "com.google.android.apps.babel" as the argument, I get the resource IDs correctly.

Let me know if I can provide more information to help fix this bug. Thanks!
 
pandaweb
Old
#2  
Member
Thanks Meter 21
Posts: 63
Join Date: Jan 2009
Could this be related to the issue I am facing here: http://forum.xda-developers.com/xpos...urces-t2760606
aka pandroid
aka bbbenji

The Germ Series, DroidMod & HelloDroid bootanimations
benji.so
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes