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

3 posts
Thanks Meter: 1
By alirazeen, Junior Member on 22nd May 2014, 07:21 PM
Post Reply Subscribe to Thread Email Thread
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 "". However, the package name of the resources is "" and not "". This can be verified by doing the following:

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

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

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

Let me know if I can provide more information to help fix this bug. Thanks!
23rd May 2014, 01:11 PM |#2  
Thanks Meter: 22
Could this be related to the issue I am facing here:
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes