patchrom icon indicating copy to clipboard operation
patchrom copied to clipboard

Issues when porting

Open abielzulio opened this issue 10 years ago • 22 comments

unzip >/dev/null "system/framework/.apk" -d out unzip: cannot find or open system/framework/.apk, system/framework/.apk.zip or system/framework/.apk.ZIP.

No zipfiles found. make: *** [out/apktool-if] Error 9

What should i do?

abielzulio avatar Jul 20 '14 11:07 abielzulio

I just looked closer at your error and it looks like the build process can't find your stockroom.zip? Did you follow the other steps? Boot into recovery and do:

source build/envsetup.sh
mkdir YOURDEVICE
cd YOURDEVICE
../tools/releasetools/ota_target_from_phone -r
cp ../YOURDEVICE/makefile .
make workspace
make firstpatch

Following those steps will get you started for MIUI development. It will create the difference files that you simply use to patch and port your device.

Please let us know which device you are trying to build or port, and which branch you are attempting (also which OS you are running this from) and we can help you solve the issue. It's much easier if you are on Linux or Mac.

cmbaughman avatar Jul 20 '14 14:07 cmbaughman

Okay, my first issues has been fixed by edit my device makefile.

Now i got this error

unzip >/dev/null /home/fantastical/workspace/android/patchrom/taoshan/out/target_files.zip "system/framework/.apk" -d out caution: filename not matched: system/framework/.apk make: *** [out/apktool-if] Error 11

I am trying to build for taoshan (Sony Xperia L) with kitkat branch. I am used CM/FXP (4.4.4) as base. I am on Ubuntu 14.10.

BTW seems it generated target_files.zip, not stockrom.zip.

abielzulio avatar Jul 20 '14 22:07 abielzulio

Can you help me to set up my device makefile? @cmbaughman

abielzulio avatar Jul 21 '14 10:07 abielzulio

To fix just rename target_files.zip to stockrom.zip like it says on the makefile and drag the .zip out of the "out" folder but keep it in the xblade(or whatever you named it) folder.

Then type the "make workspace"

ghost avatar Jul 21 '14 10:07 ghost

Error still same

Would you like to check taoshan makefile here https://github.com/abielzuliom/taoshan-patchrom/blob/master/Makefile ?

It seems messed out @RealiableCandy4

abielzulio avatar Jul 21 '14 10:07 abielzulio

Try downloading cyanogenmod ROM and renaming the .zip to stockrom.zip then replacing it with the one in xblade folder and see what happens when you "make workspace"

ghost avatar Jul 21 '14 10:07 ghost

I used FreeXperia Project (CM for Xperia) at this moment

EDIT: Now is working! Thanks for the tip!

BTW how to do clean workspace in case i want to start "make workspace" again from zero? @RealiableCandy4

On Jul 21, 2014 5:32 PM, "Goodwill Mzumala" [email protected] wrote:

Try downloading cyanogenmod ROM and renaming the .zip to stockrom.zip then replacing it with the one in xblade folder and see what happens when you "make workspace"

— Reply to this email directly or view it on GitHub https://github.com/MiCode/patchrom/issues/67#issuecomment-49591047.

abielzulio avatar Jul 21 '14 10:07 abielzulio

Now i have a new problem again when do "make fullota"

build out/services.jar... #@ rm -rf out/services.jar.out /home/fantastical/patchrom/tools/apktool --quiet b out/services.jar.out out/services.jar [738,10] Label "goto_miui" is not defined. Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: /home/fantastical/patchrom/taoshan/out/services.jar.out/smali/com/android/server/NetworkManagementService.smali at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45) at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33) at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:66) at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50) at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:37) at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:257) at brut.androlib.Androlib.buildSources(Androlib.java:214) at brut.androlib.Androlib.build(Androlib.java:205) at brut.androlib.Androlib.build(Androlib.java:176) at brut.apktool.Main.cmdBuild(Main.java:228) at brut.apktool.Main.main(Main.java:79) make: *** [out/services.jar] Error 1

http://pastebin.com/C1yLZGur

What to do now? I give up at smali '_'

abielzulio avatar Jul 21 '14 11:07 abielzulio

Make a png image with name is ic_lockscreen_ime.png then put it to res/drawable-hdpi Vào 21-07-2014 18:43, "Abiel Zulio M" [email protected] đã viết:

Now i have a new problem again

/home/fantastical/patchrom/miui/src/miui/res overlay/v5/platform/v19/frameworks/base/core/res/res/layout/keyguard_screen_password_portrait.xml:> 137: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/ic_lockscreen_ime'). make: *** [out/framework-res.apk] Error 1

I guess my base ROM doesn't have ic_lockscreen_ime. What to do now?

— Reply to this email directly or view it on GitHub https://github.com/MiCode/patchrom/issues/67#issuecomment-49595823.

minhdangoz avatar Jul 22 '14 04:07 minhdangoz

Already fixed that by take ic_lockscreen_ime.png from my Android SDK (xxhdpi) and then put it to my framework-res/res/drawable-xxhdpi

But my phone is HDPI, it is okay? I don't know how to resize it even make a new one as you talked about.

xxhdpi : 90x90 hdpi : 36x36 (i guess)

abielzulio avatar Jul 22 '14 04:07 abielzulio

48x48 On Jul 22, 2014 11:52 AM, "Abiel Zulio M" [email protected] wrote:

Already fixed that by take ic_lockscreen_ime.png from my Android SDK (xxhdpi) and then put it to my framework-res/res/drawable-xxhdpi

But my phone is HDPI, it is okay? I don't know how to resize it even make a new one as you talked about.

xxhdpi : 90x90 hdpi : 36x36 (i guess)

— Reply to this email directly or view it on GitHub https://github.com/MiCode/patchrom/issues/67#issuecomment-49698114.

minhdangoz avatar Jul 22 '14 07:07 minhdangoz

How about this issue? Trying to make fullota but i faced this. Can someone help me at smali? :|

http://pastebin.com/C1yLZGur

abielzulio avatar Jul 22 '14 10:07 abielzulio

Did you resolve all the conflicts in temp/reject? On Jul 22, 2014 5:11 PM, "Abiel Zulio M" [email protected] wrote:

How about this issue? Trying to make fullota but i faced this. Can someone help me at smali? :|

http://pastebin.com/C1yLZGur

— Reply to this email directly or view it on GitHub https://github.com/MiCode/patchrom/issues/67#issuecomment-49720631.

minhdangoz avatar Jul 22 '14 10:07 minhdangoz

What should i do with this smali? http://pastebin.com/GgeQMG73

In my errors said

[738,10] Label "goto_miui" is not defined.

How to define that?

abielzulio avatar Jul 22 '14 13:07 abielzulio

Haha, I have no idea ! On Jul 22, 2014 8:31 PM, "Abiel Zulio M" [email protected] wrote:

What should i do with this smali? http://pastebin.com/GgeQMG73

In my errors said > [738,10] Label "goto_miui" is not defined.

How to define that?

— Reply to this email directly or view it on GitHub https://github.com/MiCode/patchrom/issues/67#issuecomment-49738727.

minhdangoz avatar Jul 22 '14 13:07 minhdangoz

Lol, thought you were master at this.

New error again :|

build out/services.jar... #@ rm -rf out/services.jar.out /home/fantastical/patchrom/tools/apktool --quiet b out/services.jar.out out/services.jar Ignoring duplicate virtual method definition: Lcom/android/server/StatusBarManagerService;->setStatus(ILandroid/os/IBinder;Ljava/lang/String;Landroid/os/Bundle;)V Ignoring duplicate virtual method definition: Lcom/android/server/LockSettingsService;->setRawLockPassword([BI)V [738,10] Label "goto_miui" is not defined. [1004,10] Label "goto_miui" is not defined. [1008,25] mismatched tree node: Landroid/net/RouteInfo; expecting I_CATCHES [1012,4] mismatched tree node: I_STATEMENT_FORMAT35c_METHOD expecting <UP> Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: /home/fantastical/patchrom/taoshan/out/services.jar.out/smali/com/android/server/NetworkManagementService.smali at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45) at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33) at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:66) at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50) at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:37) at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:257) at brut.androlib.Androlib.buildSources(Androlib.java:214) at brut.androlib.Androlib.build(Androlib.java:205) at brut.androlib.Androlib.build(Androlib.java:176) at brut.apktool.Main.cmdBuild(Main.java:228) at brut.apktool.Main.main(Main.java:79) make: *** [out/services.jar] Error 1

abielzulio avatar Jul 22 '14 13:07 abielzulio

No help? :(

abielzulio avatar Jul 24 '14 13:07 abielzulio

You must resolve the conflicts Have you ever patch file? for example patch -p1 < filename.diff

And you get the same issue like the first time I have patched MIUI. Go to out/temp/reject open the *.rej files. focus to "!", "-" and "+" ! means you need to edit, replace...

  • remove
  • add, append... Compare android_smali vs miui_smali you you will the changes betwwen android_smali (AOSP) vs miui_smali Compare $device_dir/smali vs android_smali .... very hard ! you should better give up !

minhdangoz avatar Jul 29 '14 10:07 minhdangoz

@minhdangoz How about you? Did you gave up too?

abielzulio avatar Jul 31 '14 06:07 abielzulio

No. I have done Vào 31-07-2014 13:26, "Abiel Zulio M" [email protected] đã viết:

@minhdangoz https://github.com/minhdangoz How about you? Did you gave up too?

— Reply to this email directly or view it on GitHub https://github.com/MiCode/patchrom/issues/67#issuecomment-50717838.

minhdangoz avatar Jul 31 '14 06:07 minhdangoz

Then how did you fixed that? On Jul 31, 2014 1:37 PM, "minhdangoz" [email protected] wrote:

No. I have done Vào 31-07-2014 13:26, "Abiel Zulio M" [email protected] đã viết:

@minhdangoz https://github.com/minhdangoz How about you? Did you gave up too?

— Reply to this email directly or view it on GitHub https://github.com/MiCode/patchrom/issues/67#issuecomment-50717838.

— Reply to this email directly or view it on GitHub https://github.com/MiCode/patchrom/issues/67#issuecomment-50719246.

abielzulio avatar Jul 31 '14 08:07 abielzulio

I said that you must resolve the conflicts !

2014-07-31 15:49 GMT+07:00 Abiel Zulio M [email protected]:

Then how did you fixed that? On Jul 31, 2014 1:37 PM, "minhdangoz" [email protected] wrote:

No. I have done Vào 31-07-2014 13:26, "Abiel Zulio M" [email protected] đã viết:

@minhdangoz https://github.com/minhdangoz How about you? Did you gave up too?

— Reply to this email directly or view it on GitHub https://github.com/MiCode/patchrom/issues/67#issuecomment-50717838.

— Reply to this email directly or view it on GitHub https://github.com/MiCode/patchrom/issues/67#issuecomment-50719246.

— Reply to this email directly or view it on GitHub https://github.com/MiCode/patchrom/issues/67#issuecomment-50733400.

Thanks and Best regards,

Jimmy Lâm

minhdangoz avatar Jul 31 '14 11:07 minhdangoz