[Nexus 5 General] David_Vaz:
Get this errors:

davidvaz@davidvaz ~/Escritorio/Android-MIUI-Porting-kitkat/hammerhead $ ./prep_rom

rm: cannot remove ‘/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/port/system/lib’: Directory not empty
cp: cannot create regular file ‘../port/system/app/SprintHiddenMenu.apk’: File exists
cp: cannot create regular file ‘../port/system/app/OmniTorch.apk’: File exists
cp: cannot create regular file ‘../port/system/app/CellBroadcastReceiver.apk’: File exists
cp: cannot create regular file ‘../port/system/app/DSPManager.apk’: File exists
cp: cannot create regular file ‘../port/system/app/qcrilmsgtunnel.apk’: File exists
cp: cannot create regular file ‘../port/system/app/shutdownlistener.apk’: File exists
cp: cannot create regular file ‘../port/system/app/OmaDmclient.apk’: File exists
cp: cannot create regular file ‘../port/system/app/Stk.apk’: File exists
cp: cannot stat ‘/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/raw_miui/system/etc/permissions/com.google.android.maps.xml’: No such file or directory
I: Framework installed to: /home/davidvaz/apktool/framework/9.apk
I: Framework installed to: /home/davidvaz/apktool/framework/1.apk
I: Framework installed to: /home/davidvaz/apktool/framework/8.apk
Destination directory (/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/jars/miui/services.jar.out) already exists. Use -f switch if you want to overwrite it.
I: Using Apktool 2.0.0-Beta9 on framework.jar
I: Baksmaling...
I: Copying assets and libs...
I: Copying unknown files/dir...
I: Copying original files...
I: Using Apktool 2.0.0-Beta9 on android.policy.jar
I: Baksmaling...
I: Copying assets and libs...
I: Copying unknown files/dir...
Destination directory (/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/jars/cm/services.jar.out) already exists. Use -f switch if you want to overwrite it.
Destination directory (/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/jars/cm/framework.jar.out) already exists. Use -f switch if you want to overwrite it.
Destination directory (/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/jars/cm/android.policy.jar.out) already exists. Use -f switch if you want to overwrite it.
Destination directory (/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/jars/cm/telephony-common.jar.out) already exists. Use -f switch if you want to overwrite it.
Destination directory (/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/framework-res.apk) already exists. Use -f switch if you want to overwrite it.
I: Using Apktool 2.0.0-Beta9 on Settings.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/davidvaz/apktool/framework/1.apk
I: Loading resource table from file: /home/davidvaz/apktool/framework/8.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Loading resource table from file: /home/davidvaz/apktool/framework/9.apk
Cleaning up unclosed ZipFile for archive /home/davidvaz/apktool/framework/9.apk
I: Decoding values */* XMLs...
I: Baksmaling...
I: Copying assets and libs...
I: Copying unknown files/dir...
I: Copying original files...
Destination directory (/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk) already exists. Use -f switch if you want to overwrite it.
I: Using Apktool 2.0.0-Beta9 on MiuiHome.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/davidvaz/apktool/framework/1.apk
I: Loading resource table from file: /home/davidvaz/apktool/framework/8.apk
I: Renamed manifest package found! Fixing...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling...
I: Copying assets and libs...
I: Copying unknown files/dir...
I: Copying original files...
Destination directory (/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/DownloadProviderUi.apk) already exists. Use -f switch if you want to overwrite it.
cp: cannot stat ‘/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/jars/cm/framework.jar.out/smali/android/net/wifi/WifiChannel.smali’: No such file or directory
cp: cannot create regular file ‘/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/jars/miui/services.jar.out/smali/com/android/server/location/’: No such file or directory
Auto merge complete. Time for manual merges :/
Merge nativeSetStylusIconEnabled()
./prep_rom: line 186: /Applications/DiffMerge.app/Contents/MacOS/DiffMerge: No such file or directory
Merge nativeCpuBoost
./prep_rom: line 190: /Applications/DiffMerge.app/Contents/MacOS/DiffMerge: No such file or directory
Merge getLte* and toggleMobileNetwork
./prep_rom: line 198: /Applications/DiffMerge.app/Contents/MacOS/DiffMerge: No such file or directory
Doing haxxx
sed: can't read s/package="miui"/ \
package="com.android.systemui"/: No such file or directory
sed: can't read s/package="miui"/ \
package="com.miui.home"/: No such file or directory
OK, lets do framework-res
First, set voice_capable and sms_capable to true
Then replace networkAttributes with:
<item>wifi,1,1,1,-1,true</item>
<item>mobile,0,0,0,-1,true</item>
<item>mobile_mms,2,0,2,60000,true</item>
<item>mobile_supl,3,0,2,60000,true</item>
*MORE*
<item>mobile_ia,14,0,2,-1,true</item>
<item>bluetooth,7,7,2,-1,true</item>

Replace radioAttributes with:
<item>1,1</item>
<item>0,1</item>
<item>7,1</item>

Finished with framework-res
Everything is done :) Rebuilding now....
I: Using Apktool 2.0.0-Beta9 on Settings.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building apk file...
I: Using Apktool 2.0.0-Beta9 on DownloadProviderUi.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building apk file...
I: Using Apktool 2.0.0-Beta9 on MiuiSystemUI.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:32: error: Error declaring public resource drawable/seekbar_progress for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:33: error: Error declaring public resource drawable/seekbar_thumb for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:213: error: Error declaring public resource drawable/seekbar_bg for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:214: error: Error declaring public resource drawable/seekbar_progress_mask for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:215: error: Error declaring public resource drawable/seekbar_progress_primary for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:216: error: Error declaring public resource drawable/seekbar_thumb_disabled for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:217: error: Error declaring public resource drawable/seekbar_thumb_focused for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:218: error: Error declaring public resource drawable/seekbar_thumb_normal for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:219: error: Error declaring public resource drawable/seekbar_thumb_pressed for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:523: error: Error declaring public resource dimen/seekbar_height for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:574: error: Error declaring public resource id/home for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:584: error: Error declaring public resource id/icon for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:661: error: Error declaring public resource id/content for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:685: error: Error declaring public resource id/title for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:1014: error: Error declaring public resource style/TextAppearance for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:1025: error: Error declaring public resource style/Animation for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:1034: error: Error declaring public resource style/Widget.SeekBar for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:1035: error: Error declaring public resource style/Widget.SeekBar.Vertical for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:64: error: Public entry identifier 0x7f020182 entry index is larger than available symbols (index 386, total symbols 380).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:64: error: Public symbol drawable/intruder_bg_pressed declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:65: error: Public entry identifier 0x7f020183 entry index is larger than available symbols (index 387, total symbols 380).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:65: error: Public symbol drawable/notification_icon_area_smoke declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:66: error: Public entry identifier 0x7f020184 entry index is larger than available symbols (index 388, total symbols 380).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:66: error: Public symbol drawable/notification_icon_filter_disabled_mask declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:63: error: Public entry identifier 0x7f020181 entry index is larger than available symbols (index 385, total symbols 380).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:63: error: Public symbol drawable/notification_item_background_legacy_color declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:62: error: Public entry identifier 0x7f020180 entry index is larger than available symbols (index 384, total symbols 380).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:62: error: Public symbol drawable/recents_callout_line declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:61: error: Public entry identifier 0x7f02017f entry index is larger than available symbols (index 383, total symbols 380).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:61: error: Public symbol drawable/status_bar_notification_row_background_color declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:60: error: Public entry identifier 0x7f02017e entry index is larger than available symbols (index 382, total symbols 380).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:60: error: Public symbol drawable/status_bar_recents_app_thumbnail_background declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:59: error: Public entry identifier 0x7f02017d entry index is larger than available symbols (index 381, total symbols 380).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:59: error: Public symbol drawable/system_bar_background declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:58: error: Public entry identifier 0x7f02017c entry index is larger than available symbols (index 380, total symbols 380).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:58: error: Public symbol drawable/ticker_background_color declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:531: error: Public entry identifier 0x7f07005a entry index is larger than available symbols (index 90, total symbols 90).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:531: error: Public symbol dimen/notification_panel_margin_left declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:699: error: Public entry identifier 0x7f08009d entry index is larger than available symbols (index 157, total symbols 154).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:699: error: Public symbol id/notification_inspect_item declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:698: error: Public entry identifier 0x7f08009c entry index is larger than available symbols (index 156, total symbols 154).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:698: error: Public symbol id/status_bar_toggle_sync_active declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:696: error: Public entry identifier 0x7f08009a entry index is larger than available symbols (index 154, total symbols 154).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:696: error: Public symbol id/torch declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:697: error: Public entry identifier 0x7f08009b entry index is larger than available symbols (index 155, total symbols 154).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:697: error: Public symbol id/torch_hint declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:1036: error: Public entry identifier 0x7f0f0016 entry index is larger than available symbols (index 22, total symbols 22).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:1036: error: Public symbol style/ActionBar declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:1037: error: Public entry identifier 0x7f0f0017 entry index is larger than available symbols (index 23, total symbols 22).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:1037: error: Public symbol style/ActionBar.Split declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:1038: error: Public entry identifier 0x7f0f0018 entry index is larger than available symbols (index 24, total symbols 22).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:1038: error: Public symbol style/Theme.NoTitle.FullScreen declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:1039: error: Public entry identifier 0x7f0f0019 entry index is larger than available symbols (index 25, total symbols 22).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res/values/public.xml:1039: error: Public symbol style/Theme.Toggle.Arrangement declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_3706840648573728915.tmp, p, --forced-package-id, 8, --min-sdk-version, 19, --target-sdk-version, 19, --rename-manifest-package, com.android.systemui, --version-code, 19, --version-name, 4.4-4.3.14, -F, /tmp/APKTOOL1835127830393119387.tmp, -0, arsc, -I, /home/davidvaz/apktool/framework/1.apk, -I, /home/davidvaz/apktool/framework/8.apk, -I, /home/davidvaz/apktool/framework/9.apk, -S, /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res, -M, /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:435)
at brut.androlib.Androlib.buildResources(Androlib.java:363)
at brut.androlib.Androlib.build(Androlib.java:286)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:236)
at brut.apktool.Main.main(Main.java:88)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_3706840648573728915.tmp, p, --forced-package-id, 8, --min-sdk-version, 19, --target-sdk-version, 19, --rename-manifest-package, com.android.systemui, --version-code, 19, --version-name, 4.4-4.3.14, -F, /tmp/APKTOOL1835127830393119387.tmp, -0, arsc, -I, /home/davidvaz/apktool/framework/1.apk, -I, /home/davidvaz/apktool/framework/8.apk, -I, /home/davidvaz/apktool/framework/9.apk, -S, /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res, -M, /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:470)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:416)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_3706840648573728915.tmp, p, --forced-package-id, 8, --min-sdk-version, 19, --target-sdk-version, 19, --rename-manifest-package, com.android.systemui, --version-code, 19, --version-name, 4.4-4.3.14, -F, /tmp/APKTOOL1835127830393119387.tmp, -0, arsc, -I, /home/davidvaz/apktool/framework/1.apk, -I, /home/davidvaz/apktool/framework/8.apk, -I, /home/davidvaz/apktool/framework/9.apk, -S, /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/res, -M, /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiSystemUI.apk/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:464)
... 6 more
I: Using Apktool 2.0.0-Beta9 on MiuiHome.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:498: error: Error declaring public resource id/title for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:505: error: Error declaring public resource id/content for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:545: error: Error declaring public resource id/checkbox for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:597: error: Error declaring public resource id/up for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:634: error: Error declaring public resource id/body for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:635: error: Error declaring public resource id/message for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:1069: error: Error declaring public resource style/Theme for included package miui
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:655: error: Public entry identifier 0x7f0700b1 entry index is larger than available symbols (index 177, total symbols 173).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:655: error: Public symbol id/customize declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:653: error: Public entry identifier 0x7f0700af entry index is larger than available symbols (index 175, total symbols 173).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:653: error: Public symbol id/delete declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:652: error: Public entry identifier 0x7f0700ae entry index is larger than available symbols (index 174, total symbols 173).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:652: error: Public symbol id/home_mark declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:656: error: Public entry identifier 0x7f0700b2 entry index is larger than available symbols (index 178, total symbols 173).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:656: error: Public symbol id/picktheme declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:654: error: Public entry identifier 0x7f0700b0 entry index is larger than available symbols (index 176, total symbols 173).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:654: error: Public symbol id/status_bar_toggle_sync_active declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:651: error: Public entry identifier 0x7f0700ad entry index is larger than available symbols (index 173, total symbols 173).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:651: error: Public symbol id/thumbnail declared here is not defined.
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:1090: error: Public entry identifier 0x7f0f0015 entry index is larger than available symbols (index 21, total symbols 21).
/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res/values/public.xml:1090: error: Public symbol style/apply_dialog declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_7757619582064511704.tmp, p, --forced-package-id, 8, --min-sdk-version, 19, --target-sdk-version, 19, --rename-manifest-package, com.miui.home, --version-code, 10000, --version-name, 1.0, -F, /tmp/APKTOOL7140656150150885916.tmp, -0, arsc, -I, /home/davidvaz/apktool/framework/1.apk, -I, /home/davidvaz/apktool/framework/8.apk, -S, /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res, -M, /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:435)
at brut.androlib.Androlib.buildResources(Androlib.java:363)
at brut.androlib.Androlib.build(Androlib.java:286)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:236)
at brut.apktool.Main.main(Main.java:88)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_7757619582064511704.tmp, p, --forced-package-id, 8, --min-sdk-version, 19, --target-sdk-version, 19, --rename-manifest-package, com.miui.home, --version-code, 10000, --version-name, 1.0, -F, /tmp/APKTOOL7140656150150885916.tmp, -0, arsc, -I, /home/davidvaz/apktool/framework/1.apk, -I, /home/davidvaz/apktool/framework/8.apk, -S, /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res, -M, /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:470)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:416)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_7757619582064511704.tmp, p, --forced-package-id, 8, --min-sdk-version, 19, --target-sdk-version, 19, --rename-manifest-package, com.miui.home, --version-code, 10000, --version-name, 1.0, -F, /tmp/APKTOOL7140656150150885916.tmp, -0, arsc, -I, /home/davidvaz/apktool/framework/1.apk, -I, /home/davidvaz/apktool/framework/8.apk, -S, /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/res, -M, /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/wip/apks/MiuiHome.apk/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:464)
... 6 more
I: Using Apktool 2.0.0-Beta9 on framework-res.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
I: Using Apktool 2.0.0-Beta9 on services.jar.out
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:244)
at brut.androlib.Androlib.build(Androlib.java:268)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:236)
at brut.apktool.Main.main(Main.java:88)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:240)
... 4 more
I: Using Apktool 2.0.0-Beta9 on framework.jar.out
I: Checking whether sources has changed...
W: Could not find resources
I: Building apk file...
I: Using Apktool 2.0.0-Beta9 on android.policy.jar.out
I: Checking whether sources has changed...
W: Could not find resources
I: Building apk file...
I: Using Apktool 2.0.0-Beta9 on telephony-common.jar.out
I: Checking whether sources has changed...
W: Could not find resources
I: Building apk file...
./prep_rom: line 252: 7za: command not found
*MORE*
./prep_rom: line 268: 7za: command not found
./prep_rom: line 273: /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/../tools/zipalign: cannot execute binary file
Zipaligned *.apk;
mv: cannot stat ‘/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/port/system/app/*.apk.zipalligned’: No such file or directory
./prep_rom: line 283: /home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/../tools/zipalign: cannot execute binary file
Zipaligned *.apk;
mv: cannot stat ‘/home/davidvaz/Escritorio/Android-MIUI-Porting-kitkat/hammerhead/port/system/priv-app/*.apk.zipalligned’: No such file or directory
Signing with correct keys
ZIP Complete. Signing now...
davidvaz@davidvaz ~/Escritorio/Android-MIUI-Porting-kitkat/hammerhead $

The ZIP build excellent.. the RIL... not work