[Android Software Development] levone1:
Just tested recompiling without any changes. First on Kali Linux via VNC from android:

import and decompile

oot@localhost:~# apktool if /root/Desktop/framework-res.apk
I: Framework installed to: /root/.local/share/apktool/framework/1.apk
root@localhost:~# apktool if /root/Desktop/SystemUI.apk
I: Framework installed to: /root/.local/share/apktool/framework/127.apk
root@localhost:~# apktool d root/Desktop/SystemUI.apk
Input file (root/Desktop/SystemUI.apk) was not found or was not readable.
root@localhost:~# apktool d /root/Desktop/SystemUI.apk
I: Using Apktool 2.3.1 on SystemUI.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /root/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

then recompile

root@localhost:~# apktool b /root/SystemUI
I: Using Apktool 2.3.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" W: /tmp/brut_util_Jar_4676092785708897757.tmp: 1: /tmp/brut_util_Jar_4676092785708897757.tmp: @8: not found
W: /tmp/brut_util_Jar_4676092785708897757.tmp: 1: /tmp/brut_util_Jar_4676092785708897757.tmp: ���: not found
W: /tmp/brut_util_Jar_4676092785708897757.tmp: 1: /tmp/brut_util_Jar_4676092785708897757.tmp: ���: not found
W: /tmp/brut_util_Jar_4676092785708897757.tmp: 1: /tmp/brut_util_Jar_4676092785708897757.tmp: ���������������/lib64/ld-linux-x86-64.so.2GNU: not found
W: /tmp/brut_util_Jar_4676092785708897757.tmp: 1: /tmp/brut_util_Jar_4676092785708897757.tmp: ELF: not found
brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 2): [/tmp/brut_util_Jar_4676092785708897757.tmp, p, --forced-package-id, 127, --min-sdk-version, 26, --target-sdk-version, 26, --version-code, 26, --version-name, 8.0.0, --no-version-vectors, -F, /tmp/APKTOOL7360816952389223871.tmp, -0, arsc, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/SystemUI/res, -M, /root/SystemUI/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:492)
at brut.androlib.Androlib.buildResources(Androlib.java:426)
at brut.androlib.Androlib.build(Androlib.java:305)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:75)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 2): [/tmp/brut_util_Jar_4676092785708897757.tmp, p, --forced-package-id, 127, --min-sdk-version, 26, --target-sdk-version, 26, --version-code, 26, --version-name, 8.0.0, --no-version-vectors, -F, /tmp/APKTOOL7360816952389223871.tmp, -0, arsc, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/SystemUI/res, -M, /root/SystemUI/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:456)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 2): [/tmp/brut_util_Jar_4676092785708897757.tmp, p, --forced-package-id, 127, --min-sdk-version, 26, --target-sdk-version, 26, --version-code, 26, --version-name, 8.0.0, --no-version-vectors, -F, /tmp/APKTOOL7360816952389223871.tmp, -0, arsc, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/SystemUI/res, -M, /root/SystemUI/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:450)
... 6 more
W: /tmp/brut_util_Jar_4676092785708897757.tmp: 58: /tmp/brut_util_Jar_4676092785708897757.tmp: @ui: not found
W: /tmp/brut_util_Jar_4676092785708897757.tmp: 59: /tmp/brut_util_Jar_4676092785708897757.tmp: Syntax error: "(" unexpected

I've never seen errors like '���������������/lib64/ld-linux-x86-64.so.2GNU: not found' before...

Then the same apk, with no modification, on Win10:

import and decompile with no errors, and on recompile,

Microsoft Windows [Version 10.0.16299.248]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\>apktool b \SystemUI
I: Using Apktool 2.3.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
S: WARNING: Could not write to (C:\Users\abiga_000\AppData\Local\apktool\framework), using C:\Users\ABIGA_~1\AppData\Local\Temp\ instead...
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable
W: ERROR: 9-patch image C:\SystemUI\res\drawable-xhdpi\pip_dismiss_scrim.9.png malformed.
W: No marked region found along edge.
W: Found along left edge.
W: ERROR: Failure processing PNG image C:\SystemUI\res\drawable-xhdpi\pip_dismiss_scrim.9.png
W: fakeLogOpen(/dev/log_crash, O_WRONLY) failed
W: fakeLogOpen(/dev/log_security, O_WRONLY) failed
Exception in thread "main" W: fakeLogOpen(/dev/log_crash, O_WRONLY) failed
W: fakeLogOpen(/dev/log_security, O_WRONLY) failed
brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\ABIGA_~1\AppData\Local\Temp\brut_util_Jar_3175253299851036248.tmp, p, --forced-package-id, 127, --min-sdk-version, 26, --target-sdk-version, 26, --version-code, 26, --version-name, 8.0.0, --no-version-vectors, -F, C:\Users\ABIGA_~1\AppData\Local\Temp\APKTOOL1852731750061554102.tmp, -0, arsc, -0, arsc, -I, C:\Users\ABIGA_~1\AppData\Local\Temp\1.apk, -S, C:\SystemUI\res, -M, C:\SystemUI\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:492)
at brut.androlib.Androlib.buildResources(Androlib.java:426)
at brut.androlib.Androlib.build(Androlib.java:305)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:75)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\ABIGA_~1\AppData\Local\Temp\brut_util_Jar_3175253299851036248.tmp, p, --forced-package-id, 127, --min-sdk-version, 26, --target-sdk-version, 26, --version-code, 26, --version-name, 8.0.0, --no-version-vectors, -F, C:\Users\ABIGA_~1\AppData\Local\Temp\APKTOOL1852731750061554102.tmp, -0, arsc, -0, arsc, -I, C:\Users\ABIGA_~1\AppData\Local\Temp\1.apk, -S, C:\SystemUI\res, -M, C:\SystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:456)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\ABIGA_~1\AppData\Local\Temp\brut_util_Jar_3175253299851036248.tmp, p, --forced-package-id, 127, --min-sdk-version, 26, --target-sdk-version, 26, --version-code, 26, --version-name, 8.0.0, --no-version-vectors, -F, C:\Users\ABIGA_~1\AppData\Local\Temp\APKTOOL1852731750061554102.tmp, -0, arsc, -0, arsc, -I, C:\Users\ABIGA_~1\AppData\Local\Temp\1.apk, -S, C:\SystemUI\res, -M, C:\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:450)
... 6 more
W: fakeLogOpen(/dev/log_crash, O_WRONLY) failed
W: fakeLogOpen(/dev/log_crash, O_WRONLY) failed
W: fakeLogOpen(/dev/log_security, O_WRONLY) failed
W: fakeLogOpen(/dev/log_security, O_WRONLY) failed

C:\>

Obviously, it's complaining about a 9patch, which is an easy fix, but I've never seen that stuff about 'fakeLogOpen(/dev/log_security, O_WRONLY) failed', etc...

I've looked through root folders to try to imagine what other files I might need to import, but can't tell...

Thanks for any ideas