assert fail when build a 9-patch png file.
Information
- Apktool Version (
apktool -version) - 2.40 - Operating System (Mac, Linux, Windows) - win10
- APK From? (Playstore, ROM, Other) - playstore
Stacktrace/Logcat
W: Program: C:\Users\Erik\AppData\Local\Temp\brut_util_Jar_10176546015605450442.tmp W: File: E:\test\aapt\aapt-3-master\aapt-v24\src\Images.cpp, Line 811 W: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 3)): [C:\Users\Erik\AppData\Local\Temp\brut_util_Jar_10176546015605450442.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 28, --version-code, 815, --version-name, 3.37.0, --no-version-vectors, -F, C:\Users\Erik\AppData\Local\Temp\APKTOOL11594291946795145807.tmp, -0, arsc, -0, res/drawable/var_bg_black.9.png, -0, res/drawable/var_bg_panel_side_shadow.9.png, -0, res/drawable/var_bg_white.9.png, -0, res/drawable-mdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, png, -0, ........
I build a aapt.exe use the code from https://github.com/iBotPeaches/platform_frameworks_base . I build sucess after I comment the line checkNinePatchSerialization(&imageInfo.info9Patch, unknowns[p_index].data); at line 1253 in file Images.cpp
My aapt version code base: https://github.com/eriklu/aapt-apktool_v28
the 9-patch file looks normal in android studio.

I changed the exp
Include stacktrace here
Steps to Reproduce
apktool
Frameworks
If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files
(.apks that live in /system/framework or /system/priv-app)
APK
If this APK can be freely shared, please upload/attach a link to it. Locus Map has a free version can be download from play studio or amazon . The download url is:https://www.locusmap.eu/download/
Questions to ask before submission
- Have you tried
apktool d,apktool bwithout changing anything? Yes - If you are trying to install a modified apk, did you resign it? build fail
- Are you using the latest apktool version? Yes
I patched the aapt.exe straightly, and it is built successful. I think I have done something wrong when I built aapt.exe from source. I have a biginer with compiling android source code. Maybe misused or ingored a important DEFINE. I don't know.