yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Lens_flare:
just see above it ;]

java.lang.NoSuchFieldError: no field with name='mMediaPreloadEnabled' signature='Z' in class Landroid/webkit/WebSettingsClassic;

Patch that
[Android Software Development] AdhvanIt:
@Lens_flare:

Acouple of days late, but here's that radio log you asked for.

To recap: signal display issue shows due to (i think) IccCard telling RIL to use GSM display. This is with IccCard smali files properly diffed or replaced.
[Android Software Development] Lens_flare:
yaa, congrats, icccard issue fixed - you have EVDO now(or potentially have, as it shows in service state).

see that:

E/RILJ ( 2244): Exception processing unsol response: 1010Exception:java.lang.RuntimeException: getDataCallState, no ifname

method getDataCallState is faulty, you should investigate a source code of your ril class to see if something needs to be added.
[Android Software Development] AdhvanIt:
Thing is, EVDO was always showing connected in phone state through settings, as well as in roam control.

As for that method.. I've looked through all of the smali in telephony and telephony/cdma and can not find anything with that reference either in my aosp base framework or miui.

And display is still not working. Heh.

Source would be the only way to find it?
[Android Software Development] Megalith27:
Hi again...

I am getting this error

[ 10-19 05:27:04.590 2183: 2183 E/dalvikvm ]

ERROR: couldn't find native method

[ 10-19 05:27:04.590 2183: 2183 E/dalvikvm ]

Requested: Landroid/webkit/HTML5VideoViewProxy;.nativeOnSizeChanged:(IIII)V

[ 10-19 05:27:04.590 2183: 2183 E/JNIHelp ]

RegisterNatives failed for 'android/webkit/HTML5VideoViewProxy', aborting

[ 10-19 05:27:04.590 2183: 2183 F/libc ]

Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 2183 (zygote)

Can I copy that smali from CM? Since "diffing" it seems overcomplicated? Sorry for all the troubles and question...learning curve is steep
[Android Software Development] AdhvanIt:
You're going to want to copy the full HTML5 smali tree from CM.

Sent from another Galaxy [S2]
[Android Software Development] Megalith27:
Did that, thanks a lot...

Now I got this error

[ 10-19 06:21:49.583 2192: 2192 E/PhonePolicy ]

Could not preload class for phone policy: com.android.internal.policy.impl.PhoneWindow$ContextMenuCallback

But it didn't stop at that...but stopped at this one

[ 10-19 06:21:51.012 2548: 2548 E/dalvikvm ]

Requested: Lcom/android/server/PowerManagerService;.nativeCpuBoost:(I)V

[ 10-19 06:21:51.012 2548: 2548 E/JNIHelp ]

RegisterNatives failed for 'com/android/server/PowerManagerService', aborting

So do I need to patch PhoneWindow.smali, as well? I can't find PhoneWindow$ContextMenuCallback in neither of roms...
[Android Software Development] Megalith27:
Holly ****!!!! The rom finally booted...you guys rock!!!!!!!!!

So excited right now

Thank you all vey much
[Android Software Development] v1r0x:
You can ignore that error

You can diff PowerManagerService or replace it.

Same error as in the other post?

If not, post a logcat ;)
[Android Software Development] Lens_flare:
Source code is a definitve way to go, if cm dev changed lot of code to make cdma work, you should provide such changes on any rom that using that baseband and corresponding libs.
[Android Software Development] Megalith27:
Yeah...that was an early celebration....booted twice normally...then I restarted it after restoring my apps with MyBackUp Root app...and it bootloops again...With all kinds of errors...like the one below...

[ 10-19 09:53:26.272 2527: 2542 E/System ]

************ Failure starting core service

java.lang.RuntimeException: There can be only one required verifier

at com.android.server.pm.PackageManagerService.getRequiredVerifierLPr(PackageManagerService.java:1281)

at com.android.server.pm.PackageManagerService.<init>(PackageManagerService.java:1244)

at com.android.server.pm.PackageManagerService.main(PackageManagerService.java:842)

at com.android.server.ServerThread.run(SystemServer.java:212)

How do I solve that? And why it didn't bootloop because of that on first two boots?:crying:
[Android Software Development] Lens_flare:
looks familiar... WTF exception, right?

Have you modded any APK? Sure you done it right?
[Android Software Development] Megalith27:
Yeah, it is familiar...you have mentioned about this on your third post...which says "probably caused by the framework file was assembled" but I haven't modded any app....like I said...I did factory reset and flashed rom...it booted up normally...I set my google account...then installed mybackup root app from GStore...then restored my apps...and reboot....and this is what happened...

I have a version where I modded framework-res.apk to enable physical keyboard...but I never got a chance to copy it to phone and flash it...

EDIT: Here is the full logcat

Please, help
[Android Software Development] Lens_flare:
that is, a framework issue, the only thing - you should find it out by yourself ;[

Potentially it could be literally every smali you diffed/replaced.
[Android Software Development] Megalith27:
Does this mean, I should start from scratch? But why this didn't happen on first two boots?
[Android Software Development] Lens_flare:
I'd split and check smali one by one.

pure random, something accessed on unavailable code and thrown that.
[Android Software Development] Megalith27:
Spasibo :(

Sorry, I ran out of "thanks"
[Android Software Development] AdhvanIt:
This little cosmetic bug is quickly becoming the bane of my existence. Haha.

Thanks for all the help, Lens. I'll look into it and see what I can find.

Sent from another Galaxy [S2]

Edit: I heard you got an E4GT to dev for. If you need any help getting wimax (or anything else) functional, let me know. I'd love to be able to repay the advice you've given me in here.

Starting tip: don't use CM as a base right now unless you're going to use a nightly prior to 9/22. The ones that boot have a lot of other little things broken.:)
[Android Software Development] mscreater:
i have a provlem about port miui on jb

here is the log,do you know how to fix it .in framework.jar->/android\os\SystemProperties.smali i can't find the sentence "Landroid/os/SystemProperties;.<clinit> ()V“

D/dalvikvm( 122): DEX prep '/system/framework/apache-xml.jar': unzip in 373ms, rewrite 1923ms

D/dalvikvm( 122): Trying to load lib libjavacore.so 0x0

D/dalvikvm( 122): Added shared lib libjavacore.so 0x0

D/dalvikvm( 122): Trying to load lib libnativehelper.so 0x0

D/dalvikvm( 122): Added shared lib libnativehelper.so 0x0

W/dalvikvm( 122): VFY: register index out of range (1 >= 1)

W/dalvikvm( 122): VFY: rejecting opcode 0x12 at 0x0002

W/dalvikvm( 122): VFY: rejected Landroid/os/SystemProperties;.<clinit> ()V

W/dalvikvm( 122): Verifier rejected class Landroid/os/SystemProperties;

W/dalvikvm( 122): Exception Ljava/lang/VerifyError; thrown while initializing Landroid/os/Build;

W/dalvikvm( 122): Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Landroid/os/StrictMode;

F/libc ( 122): Fatal signal 11 (SIGSEGV) at 0x0000002c (code=1), thread 122 (zygote)
[Android Software Development] v1r0x:
The method is just "<clinit> ()V" or

.method static constructor <clinit>()V

Maybe you can copy complete SystemProperties.smali

In my latest builds I'm using CM10 SystemProperties
[Android Software Development] mscreater:
Yes, i have fix the problem , but have other problem,

now i am doing port miui to my jb cm10, it may be different from cm9, do you have some port log? for example, which smail should replace or which smail should patch and so on, thank you
[Android Software Development] v1r0x:
It's device specific.

For example I had to replace whole Camera*.smali tree in framework.jar, cause miui cam doesn't work for my device.

Afair there is a list of files everyone should replace/diif in first post.
[Android Software Development] Lens_flare:
It was a hard day when I asked for that (almost inadequate :D), for me one 4g device would be enough ;P
[Android Software Development] IdeosDev:
been trying to fix this for so long time but still failed.

E/dalvikvm( 118): ERROR: couldn't find native method

E/dalvikvm( 118): Requested: Landroid/content/res/AssetManager;.splitThemePackage:(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I

E/JNIHelp ( 118): RegisterNatives failed for 'android/content/res/AssetManager', aborting

I used winmerge to add on those that doesn't have but there's some which is the

I/dalvikvm( 118): Could not find method android.content.res.AssetManager.addRedirectionsNative, referenced from method android.content.res.AssetManager.close

W/dalvikvm( 118): VFY: unable to resolve direct method 9829: Landroid/content/res/AssetManager;.addRedirectionsNative (I)V

that can't be replaced :(

anyone can help me on merging this?
[Android Software Development] Lens_flare:
Seem to me Meld diff viewer is also present on Windows, try that one.
[Android Software Development] swapnilraj:
Replaced the two libs as Cosmicdan said now the rom goes pat the kernel logo but is stuck at the Miui Bootanimation.
[Android Software Development] CosmicDan:
It;s not that hard, diff the AssetManager smali and add the missing method "addRedirectionsNative".
[Android Software Development] IdeosDev:
Yes i did and added from CM9 Based > MIUI

but when some problem is the whole thing is on Yellow Highlight on winmerge

which is the one spamming the logcat but tutorial state cannot replace them.

Can some one help me differentiate the one (i can upload both assetmanager if someone can help)
[Android Software Development] Lens_flare:
Cm9? I thought nexus upgraded to JB since 2.8.10..
[Android Software Development] IdeosDev:
I am using frm Arc build and tat assetmanager is holding me up
[Android Software Development] Lens_flare:
nothing unusual here, you just have to realize that miui is now based on stock roms, which are far from AOSP(excluding nexus where AOSP=stock).
[Android Software Development] CosmicDan:
You can only port Arc builds to other stock-ICS firmware Xperia 2011 devices, basing it on CM9 will be extremely difficult. You will never get GSM/CDMA working due to custom telephony framework.

I would offer to help you with this problem, but you will have problems 1000% more difficult down the line. And I don't have the time to help with every difficult problem that will inevitably turn up.

You are best using a base from the same brand as your brand and using a stock ROM. Or at least with the same hardware type. What is your RIL type, board, device, CPU and GPU?
[Android Software Development] IdeosDev:
thanks i know about it :)

Ok :)

this the assetmanager

cm9 assetmanager : http://www.mediafire.com/download.php?fct001bfyzm6wuu

The assetmanager to be patch : http://www.mediafire.com/download.php?8png4b7xb180ho2

It's also msm7x27 semcril for X8

Great thanks for cosmic that willing to offer help to me :o
[Android Software Development] CosmicDan:
Use stock ICS ROM, not CM9. No patching required. Faster and less bugs. Copy all bin/libs from ICS to MIUI, done.
[Android Software Development] IdeosDev:
X8 doesn't have stock ics rom.

Only 2011 Line Up have those :)

that why i require patching
[Android Software Development] Megalith27:
Help Needed

Guys,

After redoing some of the work, I was able to port and boot the rom.

I have a favor to ask though, if someone can have a look at my boot-logcat and help me to identify any existing issues that rom has and may be elaborate on how to fix them.

Thank you all in advance, very much appreciated
[Android Software Development] swapnilraj:
Replaced the two libs as CosmicDan said now the rom goes pat the kernel logo but is stuck at the Miui Bootanimation.Here is the logcat http://pastebin.com/tMND4E1e
[Android Software Development] CosmicDan:
Requested: Landroid/content/res/AssetManager;.splitThemePackage:(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)IE/JNIHelp ( 180): RegisterNatives failed for 'android/content/res/AssetManager', aborting

Read Post #2. All of it. Learn how to merge/edit Smali and read logcats.

When will people learn to read first before asking questions that are already answered.... I'm going to be ignoring things like this in future. If we answer every little question like this over and over, technically *we* have ported MIUI to all these new devices. But we never get credit or thanks, no....
[Android Software Development] v1r0x:
E/dalvikvm( 180): ERROR: couldn't find native method
E/dalvikvm( 180): Requested: Landroid/content/res/AssetManager;.splitThemePackage:(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I
E/JNIHelp ( 180): RegisterNatives failed for 'android/content/res/AssetManager', aborting

This is your error.

The solution should be in OP (diff the AssetManager.smali)

Edit: argh, 2late^^
[Android Software Development] swapnilraj:
Sorry for not doing stuff on my own but I really need help on patching. I am using Meld Diff Viewer and it shows a lot of differences.

EDIT:

I copied everything except the differences in lines numbers.
[Android Software Development] Lens_flare:
why not to just test it out?

As you replacing libs, you should know that you need also to change libandroidfw.so to bypass AssetManager error.
[Android Software Development] swapnilraj:
You mean I'll need to edit the lib itself or copy from somewhere. Really sorry for sounding like a noob.
[Android Software Development] Lens_flare:
you said you changed libs, grab that one from where you grabbd those 2 and here you go.
[Android Software Development] swapnilraj:
Really not getting it See I in my first attempt copied libandroidruntime.so to my port from the Gnex MIUI rom -Stuck at the kernel Logo

Second Attempt

Copied libandroidruntime.so libsystem_server.so from CM10 to my port now it is stuck at the bootanimation.

EDIT:I guess I need to copy libandroid_fw.so from CM10, but my ported ROM already has the CM10 libs.
[Android Software Development] Lens_flare:
ah wait you started to port without libs changed.. ook.

I also have to send you to 2nd post as It (I presume) answers your question fully.
[Android Software Development] Master_T:
EDIT: solved, nevermind
[Android Software Development] Lens_flare:
according to log, you don't have aapt near apktool.
[Android Software Development] v1r0x:
Is it in your path?

I think you have to do the following:

ln -s /usr/local/bin/aapt /path/to/android-sdk/platform-tools/aapt
[Android Software Development] CosmicDan:
Please don't edit your posts with "solved" and erase it all, it really helps to leave problems when people google for error messages.

Make sure you use the latest faapt binary from iBot's server (rename it), it's what he uses for latest miuiandroid.com translation packs and has the best compatibility.
[Android Software Development] AdhvanIt:
Well that's not ENTIRELY correct.

My second post has thanks and mentions Lens for all the help I've gotten in here.;)

http://xdaforums.com/showthread.php?p=31615247
[Android Software Development] CosmicDan:
Fair enough. Obviously I was just a bit frustrated with seeing the same questions oooovvveerrrr and oooovvveeerrr again..... it's as if they never even skimmed over the guide, and it feels kinda rude. Then again I didn't write it, luckily because Lens is a lot more patient and tolerant than I :D
[Android Software Development] Lens_flare:
I/Bluetooth HeadsetBase( 4229): Error processing <AT*SEAM="MW600",13>
W/AudioTrack( 6097): dead IAudioTrack, creating a new one from obtainBuffer() TI
D 7549
I/Bluetooth HeadsetBase( 4229): Error processing <AT+CLAN?>
I/Bluetooth HeadsetBase( 4229): Error processing <AT*EIPS=2,1>
I/Bluetooth HeadsetBase( 4229): Error processing <AT+COLP=1>
I/Bluetooth HeadsetBase( 4229): Error processing <AT+CCLK?>

looks like BT couldn't correctly respond to AT command, which is kernel thing though.
[Android Software Development] AdhvanIt:
Guess that's why I didn't catch it. I'll see if a newer kernel makes a difference.

Thank you.
[Android Software Development] sorullo_xgrx:
Does anyone know where could I find this smali..

E/AndroidRuntime( 3262):	at com.android.phone.MiuiPhoneApp.updateProximitySensorMode(MiuiPhoneApp.java:185)

---------- Post added at 12:45 PM ---------- Previous post was at 12:44 PM ----------

I have looked on framework.jar, services.jar, framework2.jar but i just cant find it..
[Android Software Development] AdhvanIt:
I'd imagine it's in the phone.apk

Link the full log, please. The piece you posted isn't where your problem is.

Sent from another galaxy [S2]
[Android Software Development] denseye:
great guide and discussion ... really :good:

I'm trying to port jeally bean ROM since several days, and I can't get rid of my errors (I replaced all smali from step 2)

Any ideas ?

here are my logcat errors : http://pastebin.com/y8G40Lu0

Thanks
[Android Software Development] Lens_flare:
10-22 05:04:21.058: E/AndroidRuntime(285): *** FATAL EXCEPTION IN SYSTEM PROCESS: android.server.ServerThread
10-22 05:04:21.058: E/AndroidRuntime(285): java.lang.RuntimeException: Error receiving broadcast Intent { act=android.hardware.usb.action.USB_STATE flg=0x20000010 (has extras) } in com.android.server.MountService$1@40da49b0
10-22 05:04:21.058: E/AndroidRuntime(285): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:765)
10-22 05:04:21.058: E/AndroidRuntime(285): at android.os.Handler.handleCallback(Handler.java:615)
10-22 05:04:21.058: E/AndroidRuntime(285): at android.os.Handler.dispatchMessage(Handler.java:92)
10-22 05:04:21.058: E/AndroidRuntime(285): at android.os.Looper.loop(Looper.java:137)
10-22 05:04:21.058: E/AndroidRuntime(285): at com.android.server.ServerThread.run(SystemServer.java:946)
10-22 05:04:21.058: E/AndroidRuntime(285): Caused by: java.lang.IllegalArgumentException
10-22 05:04:21.058: E/AndroidRuntime(285): at com.android.server.MountService.getVolumeState(MountService.java:1408)
10-22 05:04:21.058: E/AndroidRuntime(285): at com.android.server.MountService.notifyShareAvailabilityChange(MountService.java:1036)
10-22 05:04:21.058: E/AndroidRuntime(285): at com.android.server.MountService.access$1300(MountService.java:96)
10-22 05:04:21.058: E/AndroidRuntime(285): at com.android.server.MountService$1.onReceive(MountService.java:566)
10-22 05:04:21.058: E/AndroidRuntime(285): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:755)
10-22 05:04:21.058: E/AndroidRuntime(285): ... 4 more

you should port usb(stage 4) additionally, though.

and not all smali should be changed, guide is only partially applicable to JB
[Android Software Development] denseye:
OK, instead of recompiling, I replaced modified xml file in apk archive

and ROM booted :cyclops:

now I have to investigate the dozens of errors remaining :p
[Android Software Development] v1r0x:
You shouldn't use the apk created in <decompiled-apk-folder>/dist

Instead you should copy the resources.arsc from <decompiled-apk-folder>/build/apk into your original apk
[Android Software Development] CosmicDan:
Yep, if you want to recompile APK's and use them on MIUI you need to either hack the package manager or sign the entire ROM with the same keyset. But that is overkill as long as you keep the original AndroidManifest.xml and META-INF folder.
[Android Software Development] thetrisatria:
cosmicdan, do you have magnifying glass text edit on your latest build?

lost it since, 2.9.29 :(

read your post before, still got no luck with webview editing!
[Android Software Development] CosmicDan:
Nope. I think they are only on MIUI4.1, I have not done any CM10 porting for a while - only stock Sony. Which doesn't have it.
[Android Software Development] Lens_flare:
For me there is no magnifying glass but at last I have cursors and they are working, uhm.. not ideal tbh.

receipt:

html5*

webview*

WebSettingClaasic.smali:

that's where a bummer.

You should add only 2 methods and fields they represent, keyword will be webgl and mediapreload. Just one moment, it has a hidden native declaration that is in red zone (block which different from other), something like:

goto
end method
.method
end method

"end method" should be replicated as in CM, so you will have 2 "end method" there. Hope it makes sense.

Also, to make it finally work I changed smali that log suggested me later when I tried to select something. Name is somewhat like SelectionCallback
[Android Software Development] denseye:
thanks for the tip ;)
[Android Software Development] thetrisatria:
i used to have it before, but now i just have working cursor like yours. anyway i'm not good in java (at all :P)
[Android Software Development] irberserk:
Im stucked on powermanagerserver.smali, i read the guide but the picture in the guide not works. I don't understand if i must diff the two file or just added only "off".
[Android Software Development] Peteragent5:
Are the port results better if you port from the same chipset/cpu as your Device?
[Android Software Development] CosmicDan:
If it's the same brand and you have a stock ICS ROM, yes. In the case of Xperia 2011 device, there is absolutely no smali changes required to port from Arc S.
[Android Software Development] Peteragent5:
By brand do you mean chipset/cpu or Manufacturer?

Btw, I noticed that MIUIAndroid supports non-Qualcomm chipset/cpu devices better than the ones that are Qualcomm.

E.g Translation in pictures that have chinese text, miuiandroid bootanimation, settings app - miui logo etc...
[Android Software Development] CosmicDan:
00:41:54.875 Error AndroidRuntime 1645 FATAL EXCEPTION: main
00:41:54.875 Error AndroidRuntime 1645 java.lang.RuntimeException: Unable to create application com.android.phone.MiuiPhoneApp: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.android.internal.telephony.LGEQualcommUiccRIL

You need the LG RIL smali's. Are both the ROM you are porting from and to an LG Android?

Chipset, CPU, and Radio. Some HTC's have the same Chipset and CPU as SEMC devices but a different radio (different RIL class). Yeah, MIUIAndroid are a little slack with the translations sometimes. Not a problem for porting to MIUIAustralia, since I/we use our own logo's and build translations from scratch.
[Android Software Development] irberserk:
Yes the base ril (my base cm9 is LGEQualcommUiccRIL) the rom i ported is another lg and ril is LGEQualcommRIL, in the folder com-android-internal-telephony i have open the phonefactory.smali but i haven't found any reference to RIL( I read the guide) what must i do?i have copied LGEQualcommUiccRIL from base to port and now?thanks for help :=)
[Android Software Development] Peteragent5:
Does anyone know how to fix sdcard?
[Android Software Development] CosmicDan:
There is definitely a reference to RIL in PhoneFactory. Are you sure you were looking at the MIUI one?

You probably also need QualcommShared, and maybe some other ones.
[Android Software Development] irberserk:
the problem is solved copying also qualcoom shared ril but im stuck in this moment with a phonemanager problem :(

Inviato dal mio LG-E400 con Tapatalk 2
[Android Software Development] CosmicDan:
I don't see any logcat....
[Android Software Development] irberserk:
I have solved ;) thanks all but i have done an error my phone is ldpi lg e400 e the miui was hdpi now i see all very tiny xD