[Android Software/Hacking General [Developers Only]] Whookid:
Problems when trying to run the following command:

./auto_patcher cm-10.1.1-p5110.zip tabletUI cm latest

Log below:

ROOT= /home/username/Desktop/auto-patcher
TOOL= /home/username/Desktop/auto-patcher/patch_tools.tgz
ROM= /home/username/Desktop/auto-patcher/cm-10.1.1-p5110.zip
ROMX= /home/username/Desktop/auto-patcher/cm-10.1.1-p5110.zip

### checking for updates ###

Updater: Auto-Patcher is already up to date

### verify tools ###
/usr/bin/patch
/bin/tar
/usr/bin/jar
/usr/bin/java
/bin/cpio

### verify ROM ###
### running ./auto_patcher cm-10.1.1-p5110.zip tabletUI cm latest
PATH= /home/username/Desktop/auto-patcher/tmp20130711095552:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

### unzip patch tools ###

### unzip patch patches ###

... result of ROM check: RIL= SamsungExynos4RIL

### probe rom type ###
#### Standard Build Query ####
# VER= v2.9.924
# OS= linux-gnu 64bit
# VID= 4.2.2
# PID= tabletUI
# MID= cm_p5110-userdebug
# RID= cm
# ANDR= 4.2
# BDID= 20130710
# DID= espresso10wifi
# BID= latest
Patches are tabletUI/4.2/cm/latest

Current HEAD: 66207c170451c8b49ca4ab3deaf3c148c61b8326 Remove CDMA and GSMServiceStateTracker patches

### DELETE FILES=
### COPY FILES=
### JAR FILES= system/framework/android.policy.jar system/framework/services.jar
### APK FILES= system/framework/framework-res.apk system/app/SystemUI.apk
### IMG FILES=
### TXT FILES=

### unzip rom ###

### create updater script ###

... using Clockworkmod installer ...
# generated updater-script
ui_print("");
ui_print("");
ui_print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
ui_print("* *");
ui_print("* * The Auto-Patcher * *");
ui_print("* * * * * *");
ui_print("* * by mateor * *");
ui_print("* *");
ui_print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
ui_print("");
ui_print(" Attention");
ui_print(" ************************************");
ui_print("");
ui_print(" There is nothing that can go wrong here");
ui_print(" that reflashing your ROM won't fix.");
ui_print("");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0755, 0755, "/system/addon.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm(0, 2000, 0755, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/etc");
set_perm(0, 0, 0644, "/system/vendor/etc/audio_effects.conf");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/drm");
set_perm(0, 0, 0644, "/system/vendor/lib/drm/libdrmwvmplugin.so");
set_perm(0, 2000, 0755, "/system/vendor/lib/egl");
set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/librank");
set_perm(0, 0, 06755, "/system/xbin/procmem");
set_perm(0, 0, 06755, "/system/xbin/procrank");
set_perm(0, 0, 06755, "/system/xbin/su");
unmount("/system");
ui_print(" .");
ui_print(" .");
ui_print(" done!");

### create restore.zip ###

### decompile system files ###

... decompile android.policy.jar ...

... decompile services.jar ...
inflated: system/framework/framework-res.apk

... installing framework files ...

... decompile framework-res.apk ...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...

... decompile SystemUI.apk ...
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/username/apktool/framework/1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
### copy patch tabletUI/4.2/cm/latest ###
### delete patch tabletUI/4.2/cm/latest ###
### jar patch tabletUI/4.2/cm/latest ###

... apply android.policy.patch ...
GARBAGE= tmp/system/framework/android.policy.jar.out/smali/com/android/internal/policy/impl/PhoneWindowManager.smali.orig
GARBAGE=

... apply services.patch ...
GARBAGE=
GARBAGE=
### apk patch tabletUI/4.2/cm/latest ###

... apply framework-res.apk.patch ...
Reversed (or previously applied) patch detected! Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file res/values/bools.xml.rej
GARBAGE=
GARBAGE= tmp/system/framework/framework-res.apk.out/res/values/bools.xml.rej

... apply SystemUI.apk.patch ...
1 out of 1 hunk FAILED -- saving rejects to file smali/com/android/systemui/statusbar/tablet/TabletStatusBar.smali.rej
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file 'smali/com/android/systemui/statusbar/policy/BatteryController$BatteryStateChangeCallback.smali.rej'
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file 'smali/com/android/systemui/statusbar/policy/BatteryController$SettingsObserver.smali.rej'
4 out of 5 hunks FAILED -- saving rejects to file smali/com/android/systemui/statusbar/policy/BatteryController.smali.rej
1 out of 1 hunk FAILED -- saving rejects to file 'smali/com/android/systemui/statusbar/policy/CircleBattery$SettingsObserver.smali.rej'
Reversed (or previously applied) patch detected! Skipping patch.
25 out of 25 hunks ignored -- saving rejects to file smali/com/android/systemui/statusbar/policy/CircleBattery.smali.rej
Reversed (or previously applied) patch detected! Skipping patch.
6 out of 6 hunks ignored -- saving rejects to file smali/com/android/systemui/statusbar/policy/CircleDockBattery.smali.rej
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file 'smali/com/android/systemui/statusbar/policy/DockBatteryController$DockBatteryStateChangeCallback.smali.rej'
Reversed (or previously applied) patch detected! Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file smali/com/android/systemui/statusbar/policy/DockBatteryController.smali.rej

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!! error: failed patching SystemUI.apk!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Any help would be appreciated ;)