[Android Software/Hacking General [Developers Only]] Dante63:
Hello @evildog1 ,

I hope you are good,

I have a small issue with Samsung Health 6.17.0.019.apk

The decompilation is a success and without any modification, the compilation fails as follows:

W: invalid resource directory name: D:\Users\XXXXXXX\Desktop\APK Easy Tool v1.59.2 Portable\1-Decompiled APKs\Samsung Health 6.17.0.019 (min SDK26)\res navigation
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\XXXXXXX\AppData\Local\Temp\brut_util_Jar_3186243757032375124.tmp, p, --forced-package-id, 127, --min-sdk-version, 26, --target-sdk-version, 29, --version-code, 6170019, --version-name, 6.17.0.019, --no-version-vectors, -F, C:\Users\XXXXXXX\AppData\Local\Temp\APKTOOL7315293953049277207.tmp, -e, C:\Users\XXXXXXX\AppData\Local\Temp\APKTOOL10583008943639759684.tmp, -0, arsc, -I, C:\Users\XXXXXXX\AppData\Local\apktool\framework\1.apk, -S, D:\Users\XXXXXXX\Desktop\APK Easy Tool v1.59.2 Portable\1-Decompiled APKs\Samsung Health 6.17.0.019 (min SDK26)\res, -M, D:\Users\XXXXXXX\Desktop\APK Easy Tool v1.59.2 Portable\1-Decompiled APKs\Samsung Health 6.17.0.019 (min SDK26)\AndroidManifest.xml]

The path "navigation" exists but I am not sure why it's firing back, the length of the path is not the issue as I tried shortening it by placing the folder in the Drive directly, decompiles but doesn't compile back, any clue why this is happening?

Appreciate your help ♡

UPDATE 1:

I have done more research and I have seen the suggestion of using AAPT2, when I did that, I faced the following error:

W: D:\Users\XXXXXXX\Desktop\APK Easy Tool v1.59.2 Portable\1-Decompiled APKs\Samsung Health 6.17.0.019 (min SDK26)\res\values\public.xml:7466: error: resource 'drawable/$avd_hide_password__0' has invalid entry name '$avd_hide_password__0'. Invalid character '$avd_hide_password__0'.
W: D:\Users\XXXXXXX\Desktop\APK Easy Tool v1.59.2 Portable\1-Decompiled APKs\Samsung Health 6.17.0.019 (min SDK26)\res\values\public.xml:7467: error: resource 'drawable/$avd_hide_password__1' has invalid entry name '$avd_hide_password__1'. Invalid character '$avd_hide_password__1'.
W: D:\Users\XXXXXXX\Desktop\APK Easy Tool v1.59.2 Portable\1-Decompiled APKs\Samsung Health 6.17.0.019 (min SDK26)\res\values\public.xml:7468: error: resource 'drawable/$avd_hide_password__2' has invalid entry name '$avd_hide_password__2'. Invalid character '$avd_hide_password__2'.
W: D:\Users\XXXXXXX\Desktop\APK Easy Tool v1.59.2 Portable\1-Decompiled APKs\Samsung Health 6.17.0.019 (min SDK26)\res\values\public.xml:7469: error: resource 'drawable/$avd_show_password__0' has invalid entry name '$avd_show_password__0'. Invalid character '$avd_show_password__0'.
W: D:\Users\XXXXXXX\Desktop\APK Easy Tool v1.59.2 Portable\1-Decompiled APKs\Samsung Health 6.17.0.019 (min SDK26)\res\values\public.xml:7470: error: resource 'drawable/$avd_show_password__1' has invalid entry name '$avd_show_password__1'. Invalid character '$avd_show_password__1'.
W: D:\Users\XXXXXXX\Desktop\APK Easy Tool v1.59.2 Portable\1-Decompiled APKs\Samsung Health 6.17.0.019 (min SDK26)\res\values\public.xml:7471: error: resource 'drawable/$avd_show_password__2' has invalid entry name '$avd_show_password__2'. Invalid character '$avd_show_password__2'.

I haven't found a fix yet, if I do, I will update my post, otherwise, I most likely failed and waiting for your advice, thanks...

UPDATE 2:

I decided to rename whatever entry I find with such character as a fix, yey but no lol, here is what I bumped into:

W: brut_util_Jar_3107085892419179312.tmp W 06-16 01:51:28 14028 8668 ApkAssets.cpp:137] resources.arsc in APK 'C:\Users\XXXXXXX\AppData\Local\apktool\framework\1.apk' is compressed.
W: D:\Users\XXXXXXX\Desktop\APK Easy Tool v1.59.2 Portable\1-Decompiled APKs\Samsung Health 6.17.0.019 (min SDK26)\AndroidManifest.xml:56: error: unexpected element <queries> found in <manifest>.

I am getting a headache looking for a solution, but I must do that, for the sake of enabling set features so people can sync SHM with SH...

UPDATE 3:

I realized I am using old apktool.jar, 2.4.1, so I switched to 2.5.0...

Fingers crossed? lol

FINAL UPDATE:

Yep, it works now...