Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on compiling framework-miui-res #16

Open
sijav opened this issue Jul 12, 2013 · 7 comments
Open

Error on compiling framework-miui-res #16

sijav opened this issue Jul 12, 2013 · 7 comments

Comments

@sijav
Copy link

sijav commented Jul 12, 2013

I'm getting this =>

build out/framework-miui-res.apk...
/home/sijav/patchrom/tools/apktool --quiet d -f /home/sijav/patchrom/miui/HDPI/system/framework/framework-miui-res.apk out/framework-miui-res
ls: cannot access overlay/framework-miui-res/res/[^v]: No such file or directory
ls: cannot access overlay/framework-miui-res/res/values
: No such file or directory
/home/sijav/patchrom/tools/apktool --quiet b out/framework-miui-res out/framework-miui-res.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL4606917418578351403.tmp, -x, -I, /home/sijav/apktool/framework/1.apk, -I, /home/sijav/apktool/framework/2.apk, -I, /home/sijav/apktool/framework/3.apk, -I, /home/sijav/apktool/framework/4.apk, -I, /home/sijav/apktool/framework/5.apk, -S, /home/sijav/patchrom/nypon/out/framework-miui-res/res, -M, /home/sijav/patchrom/nypon/out/framework-miui-res/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/APKTOOL4606917418578351403.tmp, -x, -I, /home/sijav/apktool/framework/1.apk, -I, /home/sijav/apktool/framework/2.apk, -I, /home/sijav/apktool/framework/3.apk, -I, /home/sijav/apktool/framework/4.apk, -I, /home/sijav/apktool/framework/5.apk, -S, /home/sijav/patchrom/nypon/out/framework-miui-res/res, -M, /home/sijav/patchrom/nypon/out/framework-miui-res/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
res/drawable-hdpi/select_text_highlight.png:0: error: Resource entry select_text_highlight is already defined.
res/drawable-hdpi/select_text_highlight.9.png:0: Originally defined here.
res/drawable-xhdpi/select_text_highlight.png:0: error: Resource entry select_text_highlight is already defined.
res/drawable-xhdpi/select_text_highlight.9.png:0: Originally defined here.
make: *** [out/framework-miui-res.apk] Error 1

@adityaf
Copy link

adityaf commented Aug 6, 2013

Hello sir I'm porting MIUI to grand! Using patchrom! I have diffed all frameworks! The problem is with framework.jar and framework2.jar they are not getting optimized!
Here is lil of logcating! U suggest me some thing?? I guess its releated to the method index problem??
Code:

D/dalvikvm( 132): DEX prep '/system/framework/ext.jar': unzip in 42ms, rewrite 625ms
D/dalvikvm( 132): DexOpt: --- BEGIN 'framework.jar' (bootstrap=1) ---
I/ServiceManager( 131): Waiting for service broadcom.tvservice...
E/dalvikvm( 366): Out-of-order entry types: 0x12fb then 0x12fb
E/dalvikvm( 366): Trouble with item 611 @ offset 0x1593a8
E/dalvikvm( 366): Cross-item verify of section type 1003 failed
E/dalvikvm( 366): ERROR: Byte swap + verify failed
I/ServiceManager( 288): Waiting for service media.audio_policy...
E/dalvikvm( 366): Optimization failed
W/dalvikvm( 132): DexOpt: --- END 'framework.jar' --- status=0xff00, process failed
E/dalvikvm( 132): Unable to extract+optimize DEX from '/system/framework/framework.jar'
D/dalvikvm( 132): Unable to process classpath element '/system/framework/framework.jar'
I/ServiceManager( 134): Waiting for service broadcom.tvservice...
D/dalvikvm( 132): DexOpt: --- BEGIN 'framework2.jar' (bootstrap=1) ---
E/dalvikvm( 367): outsSize (6) > registersSize (4)
E/dalvikvm( 367): Trouble with item 3051 @ offset 0x168d10
E/dalvikvm( 367): Swap of section type 2001 failed
E/dalvikvm( 367): ERROR: Byte swap + verify failed
E/dalvikvm( 367): Optimization failed
W/dalvikvm( 132): DexOpt: --- END 'framework2.jar' --- status=0xff00, process failed
E/dalvikvm( 132): Unable to extract+optimize DEX from '/system/framework/framework2.jar'
D/dalvikvm( 132): Unable to process classpath element '/system/framework/framework2.jar'

@lvxudong
Copy link

lvxudong commented Aug 7, 2013

You have duplicate methods in framework.jar,use smali-1.4.2 to find it and reslove it.

@adityaf
Copy link

adityaf commented Aug 7, 2013

Okay i have done smali but i didn't found any duplicate method. Though i found this
framework/smali/android/widget/Editor$SuggestionsPopupWindow.smali[552,16] no viable alternative at input 'suggestionIsDuplicate'

@lvxudong
Copy link

lvxudong commented Aug 7, 2013

E/dalvikvm( 366): Out-of-order entry types: 0x12fb then 0x12fb
this log means that there are duplicate methods in framework.jar
use smali-1.4.2 to smali back out/framework and it will prompt duplicate method

@adityaf
Copy link

adityaf commented Aug 7, 2013

Yeah! I used smali over out/framework i got nothing
aditya@aditya-Inspiron-5520:/patchrom/baffin/out$ smali framework
aditya@aditya-Inspiron-5520:
/patchrom/baffin/out$

And after that i recompiled it by apktool i got this
W: Unknown file type, ignoring: framework.jar.out/smali/com/android/internal/statusbar/IStatusBarService$Stub.smali~
W: Unknown file type, ignoring: framework.jar.out/smali/com/android/internal/statusbar/IStatusBar$Stub.smali~
W: Unknown file type, ignoring: framework.jar.out/smali/com/android/internal/telephony/IIccPhoneBook$Stub.smali~
W: Unknown file type, ignoring: framework.jar.out/smali/com/android/internal/telephony/SMSDispatcher.smali~
W: Unknown file type, ignoring: framework.jar.out/smali/com/android/internal/telephony/CallerInfoAsyncQuery.smali~
W: Unknown file type, ignoring: framework.jar.out/smali/com/android/internal/telephony/gsm/GsmServiceStateTracker.smali~
Ignoring duplicate direct method definition: Lcom/android/internal/telephony/gsm/SmsMessage;->parseSmsSubmit(Lcom/android/internal/telephony/gsm/SmsMessage$PduParser;I)V
Ignoring duplicate instance field definition: Lcom/android/internal/telephony/cdma/CdmaServiceStateTracker;->mIntentReceiver:Landroid/content/BroadcastReceiver;
W: Unknown file type, ignoring: framework.jar.out/smali/com/android/internal/app/ResolverActivity.smali~
W: Unknown file type, ignoring: framework.jar.out/smali/android/view/inputmethod/InputMethodManager.smali~
W: Unknown file type, ignoring: framework.jar.out/smali/android/media/MediaScanner$MyMediaScannerClient.smali~
W: Unknown file type, ignoring: framework.jar.out/smali/android/telephony/PhoneNumberUtils.smali~

@HuChundong
Copy link

have u solved this error? i have the same problem

@minhdangoz
Copy link

I have the same issue
any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants