Open ghost opened 10 years ago
The PDF is trying to say that if you are porting MIUI to a new device that you need to copy one of the make files from one of the already ported devices. In other words, remove the make file in your xblade directory. Now follow these steps:
source build/envsetup.sh
mkdir YOURDEVICE
cd YOURDEVICE
Now reboot into recovery and from your terminal run:
../tools/releasetools/ota_target_from_phone -r
Now copy this from my public gist and place in your new device directory and name it makefile: (https://gist.github.com/cmbaughman/26256314be61da19520d)
make workspace
make firstpatch
Let us know if you have any issues after that and specifically let us know what device you are working on, and which branch, so we can help solve your issues.
Thank very REALLY appreciate the help :) it worked. I am trying to port to Xperia Z1 C6903 using the kitkat branch. I used Official CM11 Snapshot as stockrom.zip since i had issues with "make workspace" when using the .zip built from the command
../tools/releasetools/ota_target_from_phone -r
I'm having another issue may i please have your help? If so, the issue im having is the building of the framework-res.apk when i type
make fullota
the output is:
My-iMac:honami Me$ make fullota
>>> Install framework resources for apktool...
install framework-miui-res.apk
/Users/Me/patchrom/tools/apktool --quiet if
/Users/Me/patchrom/miui/XXHDPI/system/framework/framework-miui-res.apk
/Users/Me/patchrom/tools/apktool --quiet if
/Users/Me/patchrom/miui/XXHDPI/system/framework/framework-res.apk miui
unzip >/dev/null stockrom.zip "system/framework/*.apk" -d out
install out/system/framework//framework-res.apk
<<< install framework resources completed!
>>> build out/framework-res.apk...
#for call ./customize_framework-res.sh
/bin/bash: /Users/Me/patchrom/tools/aapt: cannot execute binary file
make: *** [out/framework-res.apk] Error 126
My-iMac:honami Me$
i suspect its apktool in the tools folder because when I tried to port MIUI v5 previously using another method i had trouble compiling the modified framework-res.apk for MIUI v5
This is definitely an apktool error. I am wondering if it has the right framework-res.apk registered? You may want to try this first do:
apktool if /path/to/cm/framework-res.apk
Then try again. If that doesn't do it, run this and post the output (hoping it will give us a little more detail):
make -e log=verbose fullota
Let me know if that does any good, or post the verbose version of the error and I'll see if we can get further along. It's a process, but I remember when I first used patchrom to build MIUI for the HTC CDMA Shooter (Evo 3D), how happy I was on that first boot. The smali is the toughest part, but you'll get used to it after a while of practice.
Sorry it didn't work. Here's the verbose:
My-iMac:honami Me$ make -e log=verbose fullota
>>> Install framework resources for apktool...
Jul 20, 2014 10:51:25 PM brut.androlib.res.AndrolibResources installFramework
INFO: Framework installed to: /Users/Me/Library/apktool/framework/2.apk
Jul 20, 2014 10:51:26 PM brut.androlib.res.AndrolibResources installFramework
INFO: Framework installed to: /Users/Me/Library/apktool/framework/3.apk
Jul 20, 2014 10:51:26 PM brut.androlib.res.AndrolibResources installFramework
INFO: Framework installed to: /Users/Me/Library/apktool/framework/4.apk
Jul 20, 2014 10:51:26 PM brut.androlib.res.AndrolibResources installFramework
INFO: Framework installed to: /Users/Me/Library/apktool/framework/5.apk
install framework-miui-res.apk
/Users/Me/patchrom/tools/apktool --verbose if
/Users/Me/patchrom/miui/XXHDPI/system/framework/framework-miui-res.apk
Jul 20, 2014 10:51:27 PM brut.androlib.res.AndrolibResources installFramework
INFO: Framework installed to: /Users/Me/Library/apktool/framework/6.apk
/Users/Me/patchrom/tools/apktool --verbose if
/Users/Me/patchrom/miui/XXHDPI/system/framework/framework-res.apk miui
Jul 20, 2014 10:51:27 PM brut.androlib.res.AndrolibResources installFramework
INFO: Framework installed to: /Users/Me/Library/apktool/framework/1-miui.apk
unzip stockrom.zip "system/framework/*.apk" -d out
Archive: stockrom.zip
signed by SignApk
inflating: out/system/framework/framework-res.apk
install out/system/framework//framework-res.apk
Jul 20, 2014 10:51:28 PM brut.androlib.res.AndrolibResources installFramework
INFO: Framework installed to: /Users/Me/Library/apktool/framework/1.apk
<<< install framework resources completed!
>>> build out/framework-res.apk...
#for call ./customize_framework-res.sh
/bin/bash: /Users/Me/patchrom/tools/aapt: cannot execute binary file
make: *** [out/framework-res.apk] Error 126
My-iMac:honami Me$
Cmbaughman I'm having issues with my initial build. I have my makefile installed but getting a "/bin/bash line 0: cd: stockrom: no such file or directory" also a "make: *\ [stockrom.zip] Error 1". Now I have my makefile in a stockrom directory I created within patchrom. I'm getting these errors when I type "make fullota" in the "/patchrom/stockrom$ directory. I'm in my initial build "make fullota" build. What am I doing wrong? Appreciate the help, thumbs up.
kat0072@VPCSA35GG:~/patchrom/m7ul$ make fullota unzip >/dev/null stockrom.zip -d out/ZIP
build out/framework-res.apk... add miui overlay resources ls: cannot access /home/kat0072/patchrom/miui/src/miui/res-overlay/v5/platform/v17/frameworks/base/core/res/res/[^v]_: No such file or directory WARING[CHECK]: out/framework-res/res/values-mcc460-mnc01 : no such directory WARING[CHECK]: out/framework-res/res/values-mcc460-mnc01-zh-rCN : no such directory WARING[CHECK]: out/framework-res/res/values-mcc460-mnc01-zh-rTW : no such directory WARING[CHECK]: out/framework-res/res/values-mcc460-mnc03 : no such directory WARING[CHECK]: out/framework-res/res/values-mcc460-mnc03-zh-rCN : no such directory WARING[CHECK]: out/framework-res/res/values-mcc460-mnc03-zh-rTW : no such directory WARING[CHECK]: out/framework-res/res/values-xxhdpi : no such directory /home/kat0072/patchrom/tools/removeredef.py >/dev/null out/framework-res /home/kat0072/patchrom/tools/apktool --quiet b out/framework-res out/framework-res.apk Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL8605491656149880459.tmp, -x, -S, /home/kat0072/patchrom/m7ul/out/framework-res/res, -M, /home/kat0072/patchrom/m7ul/out/framework-res/AndroidManifest.xml] at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358) at brut.androlib.Androlib.buildResources(Androlib.java:283) at brut.androlib.Androlib.build(Androlib.java:206) at brut.androlib.Androlib.build(Androlib.java:176) at brut.apktool.Main.cmdBuild(Main.java:228) at brut.apktool.Main.main(Main.java:79) Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL8605491656149880459.tmp, -x, -S, /home/kat0072/patchrom/m7ul/out/framework-res/res, -M, /home/kat0072/patchrom/m7ul/out/framework-res/AndroidManifest.xml] at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336) ... 5 more Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL8605491656149880459.tmp, -x, -S, /home/kat0072/patchrom/m7ul/out/framework-res/res, -M, /home/kat0072/patchrom/m7ul/out/framework-res/AndroidManifest.xml] at brut.util.OS.exec(OS.java:93) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355) ... 6 more Caused by: java.io.IOException: Cannot run program "aapt": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) at java.lang.Runtime.exec(Runtime.java:617) at java.lang.Runtime.exec(Runtime.java:485) at brut.util.OS.exec(OS.java:84) ... 7 more Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.
(UNIXProcess.java:186) at java.lang.ProcessImpl.start(ProcessImpl.java:130) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) ... 10 more /home/kat0072/patchrom/build/porting.mk:193: recipe for target 'out/framework-res.apk' failed make: * * [out/framework-res.apk] Error 1 kat0072@VPCSA35GG:~/patchrom/m7ul$
PLEASE HELP ME TO FIX THIS ISSUE....
Got the answer:
sudo apt-get install lib32stdc++6 lib32z1
I am not sure what you mean by the comment in the brackets in the steps:
I read the pdf and i am still confused. Am i supposed to make a file called makefile, if so where do i put it?
Here is what i got when i put the command:
I have searched everywhere for the past week and cant seem to a solution. Can i Request a detailed explanation of this cause the pdf isnt helping at all. any help would be greatly appreciated