MiCode / legacy-patchrom

反编译/重编译Android ROM移植MIUI2.3技术 (A disassemble and reassemble Android ROM to port MIUI2.3 technology)
http://micode.net/forum-55-1.html
214 stars 78 forks source link

can't build service.jar #6

Open DarthJonathan opened 12 years ago

DarthJonathan commented 12 years ago

I'm building this for samsung galaxy w thats GT-I8150, and i get passed the systemui.apk error but i got stucked at the service as much as everyone has :D the error says :

build .build/services.jar...

cp -r services.jar.out/ .build/services /home/jonathan/MiCode/tools/add_miui_smail.sh .build/services_miui .build/services /home/jonathan/MiCode/tools/apktool b .build/services .build/services.jar Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml at brut.androlib.Androlib.readMetaFile(Androlib.java:142) at brut.androlib.Androlib.build(Androlib.java:159) at brut.androlib.Androlib.build(Androlib.java:154) at brut.apktool.Main.cmdBuild(Main.java:182) at brut.apktool.Main.main(Main.java:67) Caused by: brut.directory.PathNotExist: apktool.yml at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103) at brut.androlib.Androlib.readMetaFile(Androlib.java:138) ... 4 more make: *\ [.build/services.jar] Error 1

Thx For Your Help

chirayudesai commented 12 years ago

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml

copy from i9100 services.jar folder :p

DarthJonathan commented 12 years ago

THANKS YU ARE A LIFE SAVER XD

DarthJonathan commented 12 years ago

oops still getting the same error :(

chirayudesai commented 12 years ago

wont be the same, must be something else :P

DarthJonathan commented 12 years ago

if i use "make apktool-if" i get this error jonathan@jonathan-VirtualBox:~/MiCode/i8150$ make apktool-if

build .build/framework-res.apk...

cp -r framework-res .build /home/jonathan/MiCode/tools/apktool b .build/framework-res .build/framework-res.apk Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml at brut.androlib.Androlib.readMetaFile(Androlib.java:142) at brut.androlib.Androlib.build(Androlib.java:159) at brut.androlib.Androlib.build(Androlib.java:154) at brut.apktool.Main.cmdBuild(Main.java:182) at brut.apktool.Main.main(Main.java:67) Caused by: brut.directory.PathNotExist: apktool.yml at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103) at brut.androlib.Androlib.readMetaFile(Androlib.java:138) ... 4 more make: *\ [.build/framework-res.apk] Error 1 can someone help me? thx

chirayudesai commented 12 years ago

same again :P Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml

check all directories (of the decompiled apps n frameworks) - for missing apktool.yml

DarthJonathan commented 12 years ago

dunno i done what u said i still stuck at service.jar errorr :(

DarthJonathan commented 12 years ago

i'd copy all apktool.yml from the i9100 folder keeps getting that error :(

chirayudesai commented 12 years ago

did u do it like this?

make apktool-if /path/to/framework-res.apk

also, open apktool.yml - u'll understand what it means - check all the files again then

DarthJonathan commented 12 years ago

okey i passed the framework-res error but still stucks at the service.jar

DarthJonathan commented 12 years ago

i've tried this jonathan@jonathan-VirtualBox:~/MiCode/i8150$ make apktool-if /services.jar.out install framework resources... /home/jonathan/MiCode/tools/apktool if .build/framework-res.apk I: Framework installed to: /home/jonathan/apktool/framework/1.apk /home/jonathan/MiCode/tools/apktool if /home/jonathan/MiCode/miui/system/framework/framework-miui-res.apk I: Framework installed to: /home/jonathan/apktool/framework/6.apk unzip JONATHAN_ROM_RC4.zip system/framework/twframework-res.apk -d .build Archive: JONATHAN_ROM_RC4.zip replace .build/system/framework/twframework-res.apk? [y]es, [n]o, [A]ll, [N]one, [r]ename: y inflating: .build/system/framework/twframework-res.apk
/home/jonathan/MiCode/tools/apktool if .build/system/framework/twframework-res.apk I: Framework installed to: /home/jonathan/apktool/framework/2.apk make: *\ No rule to make target `/services.jar.out'. Stop. jonathan@jonathan-VirtualBox:~/MiCode/i8150$

sphanley commented 12 years ago

Try re-unpacking the services.jar from your source rom. What you should end up with is a folder called services.jar.out that contains two things -- a folder called smali and a file called apktool.yml. If that's not what you have than you did something wrong.

DarthJonathan commented 12 years ago

nope it just came out with : "META-INF" and "classes.dex" whyyy???? :( i really want to use thiss :(

chirayudesai commented 12 years ago

you need to decompile it, not extract :P

DarthJonathan commented 12 years ago

i don't know whats wrong :(

DarthJonathan commented 12 years ago

i think the jar files isn't deodexed yet XD and i don't know how to do that :D

DarthJonathan commented 12 years ago

i don't under stand on my services.jar it only have manifest and classes.dex

DarthJonathan commented 12 years ago

OHHH with apktool?? i really a noob here :(

DarthJonathan commented 12 years ago

it says apktool : command not found :(

DarthJonathan commented 12 years ago

nope never mind i figureit out the apk tool now still stuck at service jar AFTER I DECOMPILE IT!!! heres the error : . build/envsetup.sh PORT_ROOT = /home/jonathan/MiCode ANDROID_TOP = ANDROID_OUT = USE_ANDROID_OUT = ANDROID_BRANCH = jonathan@jonathan-VirtualBox:~/MiCode$ cd i8150 jonathan@jonathan-VirtualBox:~/MiCode/i8150$ make zipfile

build .build/services.jar...

cp -r services.jar.out/ .build/services /home/jonathan/MiCode/tools/add_miui_smail.sh .build/services_miui .build/services /home/jonathan/MiCode/tools/apktool b .build/services .build/services.jar Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml at brut.androlib.Androlib.readMetaFile(Androlib.java:142) at brut.androlib.Androlib.build(Androlib.java:159) at brut.androlib.Androlib.build(Androlib.java:154) at brut.apktool.Main.cmdBuild(Main.java:182) at brut.apktool.Main.main(Main.java:67) Caused by: brut.directory.PathNotExist: apktool.yml at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103) at brut.androlib.Androlib.readMetaFile(Androlib.java:138) ... 4 more make: *\ [.build/services.jar] Error 1 jonathan@jonathan-VirtualBox:~/MiCode/i8150$

chirayudesai commented 12 years ago

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml

same thing again do this now

cd i8150 ls -al services.jar.out

DarthJonathan commented 12 years ago

NOO I GOT IT!!!! THX MAN!!! I OWE YOUU XD !!! but now when i dcompile systemui it shows lotta error cuz i dont have the framework 1.apk and 2 apk how can i make that thx!!!

DarthJonathan commented 12 years ago

NVMM I GET IT XD

DarthJonathan commented 12 years ago

now is the system ui TT

DarthJonathan commented 12 years ago

it says thhis Can't find framework resources for package of id: 6. You must install proper framework files, see project website for more info.

sphanley commented 12 years ago

Add the /tools subfolder from the patchrom folder to your path, and make sure that you used "apktool d" to decompile all of the files in question.

DarthJonathan commented 12 years ago

alright it's done now im stuck pretty much like everyone else :P code : Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2005995886871531299.tmp, -I, /home/jonathan/apktool/framework/1.apk, -S, /home/jonathan/MiCode/i8150/.build/SystemUI/res, -M, /home/jonathan/MiCode/i8150/.build/SystemUI/AndroidManifest.xml] at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301) at brut.androlib.Androlib.buildResources(Androlib.java:248) at brut.androlib.Androlib.build(Androlib.java:171) at brut.androlib.Androlib.build(Androlib.java:154) at brut.apktool.Main.cmdBuild(Main.java:182) at brut.apktool.Main.main(Main.java:67) Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2005995886871531299.tmp, -I, /home/jonathan/apktool/framework/1.apk, -S, /home/jonathan/MiCode/i8150/.build/SystemUI/res, -M, /home/jonathan/MiCode/i8150/.build/SystemUI/AndroidManifest.xml] at brut.util.OS.exec(OS.java:83) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191) ... 6 more make: *\ [.build/MIUISystemUI.apk] Error 1 jonathan@jonathan-VirtualBox:~/MiCode/i8150$

DarthJonathan commented 12 years ago

SOMEONEE PLEASEE HELP THE SYSTEMUI.APK ERRORR

sphanley commented 12 years ago

Trust me DarthJonathan, if anyone figures it out it'll certainly be posted here. Until then, you're just spamming.

chirayudesai commented 12 years ago

try using the correct aapt binary - i.e. from 2.3

DarthJonathan commented 12 years ago

woke thanks!!!!! i have a complete build now!!!! THANKS!!! but the settings and theme manager keep on crashing and fc's if in the settings i click any option :(

Flatzki commented 12 years ago

hey, i wanna port miui for the galaxy mini und have the same error like darth in the begin of this tropic... my error :(

inflating: .build/ZIP/system/build.prop
/home/flatzki/Downloads/MiCode-PatchRom-a6a023f/tools/apktool d -f /home/flatzki/Downloads/MiCode-PatchRom-a6a023f/miui/system/framework/services.jar .build/services_miui I: Baksmaling... I: Copying assets and libs...

build .build/services.jar...

cp -r services.jar.out/ .build/services cp: Aufruf von stat für „services.jar.out/“ nicht möglich: Datei oder Verzeichnis nicht gefunden make: *\ [.build/services.jar] Fehler 1 flatzki@flatzki-1015PE:~/Downloads/MiCode-PatchRom-a6a023f/01$ C

what have u do to fix it.. thx