Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resources merger fails while adding no resources #14

Closed
Unbrick opened this issue Jan 29, 2017 · 6 comments
Closed

Resources merger fails while adding no resources #14

Unbrick opened this issue Jan 29, 2017 · 6 comments

Comments

@Unbrick
Copy link

Unbrick commented Jan 29, 2017

Sorry to annoy you again but i encountered another issue: (in a different project than last time)

My Project setup is the following:
I'm trying to patch a normal apk without any additional resources patched in, all resources are taken from the :source project.

While doing a gradle build, gradle throws me the following error:

:patched:mergeDebugResources C:\Users\Admin\StudioProjects\Patched\patched\build\intermediates\exploded-aar\Patched\source\unspecified\res\values\ids.xml: Error: ' ' is not a valid resource name character :patched:mergeDebugResources FAILED

(too long for here, migrated it to hastebin)
https://hastebin.com/ovirexewek.vbs

Til now i tried several different gradle options but none of them worked. I'm inviting you to a private repo in case you want to try at the project itself.

Thanks for your efforts!

@Lanchon
Copy link
Member

Lanchon commented Jan 29, 2017

maybe the resource names were mangled by some obfuscator. check that the decompiled resources in the .apk.aar APK library produced by ':source' are valid. see:
http://stackoverflow.com/questions/35240635/error-is-not-a-valid-resource-name-character

also, could this maybe be a bug in build tools? check this one:
https://code.google.com/p/android/issues/detail?id=195443

@Unbrick
Copy link
Author

Unbrick commented Jan 29, 2017

Checked the source resource names for invalid characters like colons or spacing, they are all fine and valid. Additionally Gradle reports a space as invalid resource identifier which doesn't make any sense at all. Looks to me like a Gradle error.

@Lanchon
Copy link
Member

Lanchon commented Jan 29, 2017

i'm sorry i've no time to investigate, but sure looks intriguing. you can try downgrading build-tools maybe and see what happens.

@Unbrick
Copy link
Author

Unbrick commented Jan 30, 2017

Just thought a little bit about it...apktool is using a framework-res.apk do decompile resources afaik. Maybe we just could replace the one you are shipping and try another one. But i can't find it in your modified apktool version, could you give me a hand?

@Lanchon
Copy link
Member

Lanchon commented Jan 30, 2017

i'm not shipping a modded apktool. apktool provides its own framework which is based on AOSP and should work for all independent apps.

it is not enough when you want to process an app that came embedded in a OEM rom and uses the rom's private api extensions. for example: an OEM's stock FM radio app that uses a proprietary radio API designed and implemented by the OEM on their android.

dxp fully supports your frameworks:

@Lanchon
Copy link
Member

Lanchon commented Jun 27, 2019

UPDATE: solution here

@Lanchon Lanchon closed this as completed Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants