2

I am facing an error while try to repack an apk with apkool. below is the error trace.


W: error: invalid file path 'C:\Users\ccre\res\drawable2\abc_ic_search_api_material.xml'.
W: error: invalid file path 'C:\Users\ccre\res\drawable2\abc_ic_voice_search_api_material.xml'.
W: error: invalid file path 'C:\Users\ccre\res\drawable2\abc_item_background_holo_light.xml'.
W: error: invalid file path 'C:\Users\ccre\res\drawable2\abc_list_divider_material.xml'.
W: error: invalid file path 'C:\Users\ccre\res\drawable2\abc_list_selector_background_transition_holo_dark.xml'.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\HOMA~1\AppData\Local\Temp\brut_util_Jar_3949150857603741809118973406025728052.tmp, compile, --dir, C:\Users\ccre\res, --legacy, -o, C:\Users\ccre\build\resources.zip]

Does anyone tell me what is wrong here and why this error [error: invalid file path] is shown while the file is there?!

1

It seems that APK resources were obfuscated with AndroResGuard. ApkTool can (mostly) decompile it but compilation is performed with standard aapt2 and it does not understand 'drawable2' resource type, so it complains about invalid file path.

You can find more info on this issue here: https://github.com/iBotPeaches/Apktool/issues/1719

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.