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?!

hanan
  • 532
  • 2
  • 7
  • 23

1 Answers1

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

Dmitry Kochin
  • 3,830
  • 4
  • 22
  • 14