[Android Q&A, Help & Troubleshooting] chrisjardine12:
Hello,

I am having issues recomping my LGSystemUI.apk even without modifications.

I have deodexed the apk successfully a guide on here (someone was told to deodex the apk for a similar problem)

I have installed framework-res.apk and lge-res.apk to the apk tool folder (version apktool-install-windows-r05-ibot.tar.bz2) successfully as well as the LGSystemUI.apk. Decompiling goes smoothly but I get the same error every time I try to recompile and it's driving me absolutely insane! NOTE: I installed framework, etc into both C:\baksmali and C:\apktool in hopes that one of them would work--this is the code for C:\baksmali but it is the same output in both folders when recompiling. I tried both apktool b LGSystemUI LGSystemUInew.apk and apktool b C:\baksmali\LGSystemUI LGSystemUInew.apk

Edit: This is on the Optimus F3

C:\baksmali>apktool if framework-res.apk
I: Framework installed to: C:\Users\Chris\apktool\framework\1.apk

C:\baksmali>apktool if lge-res.apk
I: Framework installed to: C:\Users\Chris\apktool\framework\2.apk

C:\baksmali>apktool if LGSystemUI.apk
I: Framework installed to: C:\Users\Chris\apktool\framework\127.apk

C:\baksmali>apktool d LGSystemUI.apk
I: Using Apktool 2.0.0-RC2 on LGSystemUI.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Chris\apktool\framework\1.apk
I: Loading resource table from file: C:\Users\Chris\apktool\framework\2.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...

C:\baksmali>apktool b LGSystemUI LGSystemUI-new.apk
I: Using Apktool 2.0.0-RC2 on LGSystemUI
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" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\Chris\
AppData\Local\Temp\brut_util_Jar_1310886965740495272.tmp, p, --forced-package-id
, 2, --min-sdk-version, 16, --target-sdk-version, 16, --rename-manifest-package,
com.android.systemui, --version-code, 16, --version-name, 4.1.2-LS720ZV5.136819
3247, -F, C:\Users\Chris\AppData\Local\Temp\APKTOOL7534181060513143275.tmp, -0,
arsc, -I, C:\Users\Chris\apktool\framework\1.apk, -I, C:\Users\Chris\apktool\fra
mework\2.apk, -S, C:\baksmali\LGSystemUI\res, -M, C:\baksmali\LGSystemUI\Android
Manifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:449)
at brut.androlib.Androlib.buildResources(Androlib.java:383)
at brut.androlib.Androlib.build(Androlib.java:286)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [C:\Users\Chris\AppData\Local\Temp\brut_util_Jar_1310886965740495
272.tmp, p, --forced-package-id, 2, --min-sdk-version, 16, --target-sdk-version,
16, --rename-manifest-package, com.android.systemui, --version-code, 16, --vers
ion-name, 4.1.2-LS720ZV5.1368193247, -F, C:\Users\Chris\AppData\Local\Temp\APKTO
OL7534181060513143275.tmp, -0, arsc, -I, C:\Users\Chris\apktool\framework\1.apk,
-I, C:\Users\Chris\apktool\framework\2.apk, -S, C:\baksmali\LGSystemUI\res, -M,
C:\baksmali\LGSystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:487)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:434)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Chris\Ap
pData\Local\Temp\brut_util_Jar_1310886965740495272.tmp, p, --forced-package-id,
2, --min-sdk-version, 16, --target-sdk-version, 16, --rename-manifest-package, c
om.android.systemui, --version-code, 16, --version-name, 4.1.2-LS720ZV5.13681932
47, -F, C:\Users\Chris\AppData\Local\Temp\APKTOOL7534181060513143275.tmp, -0, ar
sc, -I, C:\Users\Chris\apktool\framework\1.apk, -I, C:\Users\Chris\apktool\frame
work\2.apk, -S, C:\baksmali\LGSystemUI\res, -M, C:\baksmali\LGSystemUI\AndroidMa
nifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:481)
... 6 more
Caused by: java.io.IOException: Cannot run program "C:\Users\Chris\AppData\Local
\Temp\brut_util_Jar_1310886965740495272.tmp": CreateProcess error=5, Access is d
enied
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at brut.util.OS.exec(OS.java:84)
... 7 more
Caused by: java.io.IOException: CreateProcess error=5, Access is denied
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 more

C:\baksmali>apktool b C:\baksmali\LGSystemUI LGSystemUInew.apk
I: Using Apktool 2.0.0-RC2 on LGSystemUI
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\Chris\
AppData\Local\Temp\brut_util_Jar_6183905094663782385.tmp, p, --forced-package-id
, 2, --min-sdk-version, 16, --target-sdk-version, 16, --rename-manifest-package,
com.android.systemui, --version-code, 16, --version-name, 4.1.2-LS720ZV5.136819
3247, -F, C:\Users\Chris\AppData\Local\Temp\APKTOOL1830770158558091930.tmp, -0,
arsc, -I, C:\Users\Chris\apktool\framework\1.apk, -I, C:\Users\Chris\apktool\fra
mework\2.apk, -S, C:\baksmali\LGSystemUI\res, -M, C:\baksmali\LGSystemUI\Android
Manifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:449)
at brut.androlib.Androlib.buildResources(Androlib.java:383)
at brut.androlib.Androlib.build(Androlib.java:286)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [C:\Users\Chris\AppData\Local\Temp\brut_util_Jar_6183905094663782
385.tmp, p, --forced-package-id, 2, --min-sdk-version, 16, --target-sdk-version,
16, --rename-manifest-package, com.android.systemui, --version-code, 16, --vers
ion-name, 4.1.2-LS720ZV5.1368193247, -F, C:\Users\Chris\AppData\Local\Temp\APKTO
OL1830770158558091930.tmp, -0, arsc, -I, C:\Users\Chris\apktool\framework\1.apk,
-I, C:\Users\Chris\apktool\framework\2.apk, -S, C:\baksmali\LGSystemUI\res, -M,
C:\baksmali\LGSystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:487)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:434)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Chris\Ap
pData\Local\Temp\brut_util_Jar_6183905094663782385.tmp, p, --forced-package-id,
2, --min-sdk-version, 16, --target-sdk-version, 16, --rename-manifest-package, c
om.android.systemui, --version-code, 16, --version-name, 4.1.2-LS720ZV5.13681932
47, -F, C:\Users\Chris\AppData\Local\Temp\APKTOOL1830770158558091930.tmp, -0, ar
sc, -I, C:\Users\Chris\apktool\framework\1.apk, -I, C:\Users\Chris\apktool\frame
work\2.apk, -S, C:\baksmali\LGSystemUI\res, -M, C:\baksmali\LGSystemUI\AndroidMa
nifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:481)
... 6 more
Caused by: java.io.IOException: Cannot run program "C:\Users\Chris\AppData\Local
\Temp\brut_util_Jar_6183905094663782385.tmp": CreateProcess error=5, Access is d
enied
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at brut.util.OS.exec(OS.java:84)
... 7 more
Caused by: java.io.IOException: CreateProcess error=5, Access is denied
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 more

C:\baksmali>

Thanks for your time.