MiCode / patchrom

Use disassemble/assemble technology to porting miui to misc android devices
http://micode.net/forum-55-1.html
494 stars 370 forks source link

Issues when porting #67

Open abielzulio opened 10 years ago

abielzulio commented 10 years ago

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?

cmbaughman commented 10 years ago

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.

abielzulio commented 10 years ago

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/targetfiles.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 commented 10 years ago

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

ghost commented 10 years ago

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"

abielzulio commented 10 years ago

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

ghost commented 10 years ago

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"

abielzulio commented 10 years ago

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" notifications@github.com 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 commented 10 years ago

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 '_'

minhdangoz commented 10 years ago

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" notifications@github.com đã 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.

abielzulio commented 10 years ago

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)

minhdangoz commented 10 years ago

48x48 On Jul 22, 2014 11:52 AM, "Abiel Zulio M" notifications@github.com 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.

abielzulio commented 10 years ago

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

http://pastebin.com/C1yLZGur

minhdangoz commented 10 years ago

Did you resolve all the conflicts in temp/reject? On Jul 22, 2014 5:11 PM, "Abiel Zulio M" notifications@github.com 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.

abielzulio commented 10 years ago

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?

minhdangoz commented 10 years ago

Haha, I have no idea ! On Jul 22, 2014 8:31 PM, "Abiel Zulio M" notifications@github.com 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.

abielzulio commented 10 years ago

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 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 commented 10 years ago

No help? :(

minhdangoz commented 10 years ago

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...

abielzulio commented 10 years ago

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

minhdangoz commented 10 years ago

No. I have done Vào 31-07-2014 13:26, "Abiel Zulio M" notifications@github.com đã 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.

abielzulio commented 10 years ago

Then how did you fixed that? On Jul 31, 2014 1:37 PM, "minhdangoz" notifications@github.com wrote:

No. I have done Vào 31-07-2014 13:26, "Abiel Zulio M" notifications@github.com đã 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.

minhdangoz commented 10 years ago

I said that you must resolve the conflicts !

2014-07-31 15:49 GMT+07:00 Abiel Zulio M notifications@github.com:

Then how did you fixed that? On Jul 31, 2014 1:37 PM, "minhdangoz" notifications@github.com wrote:

No. I have done Vào 31-07-2014 13:26, "Abiel Zulio M" notifications@github.com đã 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