본문 바로가기
App hacking

[apktool]apk 리패키징 오류: invalid resource directory name

by m_.9m 2022. 8. 16.

🔥 에러문

 

apktool b Yoosee_V00.46.00.87.apk-decompiled -o Yosee.apk

I: Using Apktool 2.6.1
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
W: invalid resource directory name: C:\Users\K1220\Desktop\Yoosee_V00.46.00.87.apk-decompiled\res navigation
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\K1220\AppData\Local\Temp\brut_util_Jar_74812983767987638007981311668351226864.tmp, p, --forced-package-id, 127, --min-sdk-version, 22, --target-sdk-version, 31, --version-code, 863, --version-name, 00.46.00.87, --no-version-vectors, -F, C:\Users\K1220\AppData\Local\Temp\APKTOOL7292279582998619721.tmp, -e, C:\Users\K1220\AppData\Local\Temp\APKTOOL15074378701004910574.tmp, -0, arsc, -I, C:\Users\K1220\AppData\Local\apktool\framework\1.apk, -S, C:\Users\K1220\Desktop\Yoosee_V00.46.00.87.apk-decompiled

 

🔥 해결방법:

--use-aapt2 옵션을 추가

apktool b --use-aapt2 Yoosee_V00.46.00.87.apk-decompiled

I: Using Apktool 2.6.1
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs... (/lib)
I: Copying libs... (/kotlin)
I: Copying libs... (/META-INF/services)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...