yashsingh1/xdaforums huggingface dataset:
[Android Software Development] _polimorph_:
Hi guys!

I'm back with the same log that I posted a few while back trying to port GNex MIUI to CM10 4.1.2 for Salaxy S3, but now I have new information and feel there's hope:

?:??: W/?(?): --------- beginning of /dev/log/main
10-23 14:15:02.390: I/cm(1896): Welcome to Android 4.1.2 / CyanogenMod-10-20121022-UNOFFICIAL-i9300
10-23 14:15:02.395: I/cm(1897): _
10-23 14:15:02.405: I/cm(1898): __ __ _ ___ _ _ __ ___ __ _ _ _ _ __ __))
10-23 14:15:02.410: I/cm(1899): ((_ \(/'((_( ((\( ((_)((_( (('((\( ((`1( ((_)((_(
10-23 14:15:02.415: I/cm(1900): )) _))
10-23 14:15:02.420: I/cm(1901):
10-23 14:15:02.615: I/DEBUG(1913): debuggerd: Oct 22 2012 09:57:38
10-23 14:15:02.615: I/DEBUG(1913): --------- beginning of /dev/log/system
10-23 14:15:02.660: I/Vold(1911): Vold 2.1 (the revenge) firing up
10-23 14:15:02.700: I/macloader(1924): Writing murata to /data/.cid.info
10-23 14:15:02.700: D/macloader(1924): Setting permissions on /data/.cid.info
10-23 14:15:02.720: D/Vold(1911): Volume sdcard1 state changing -1 (Initializing) -> 0 (No-Media)
10-23 14:15:02.720: D/Vold(1911): Volume usbdisk0 state changing -1 (Initializing) -> 0 (No-Media)
10-23 14:15:02.745: I/Netd(1912): Netd 1.0 starting

The booting process is stopped here somewhere, but here's a catch: if I use instead of current libandroid_servers.so the file from a CM10 build released previously to October it boots flawless. I would use the new one but then I get this stupid no use log and bootloop.

Is there a way to see what are the differences between one lib and another, because I belive there might be new methods and new files In the latest builds that need to be copied/diffed from CM to port.

Can you find some explanation?
[Android Software Development] CosmicDan:
Are you trying to mix libs between CM10 and MIUI?

To see the exact error, go to adb shell and type

system_server

It will have a long error and (should) mention two so files. One of those mention libs are wrong, they must both be from same version ROM (otherwise they cannot link).

I have a feeling you are using some MIUI Libs. Reason old CM10 one works is because it is close to AOSP/Stock without many changes from CM team. So stick with the old lib if it works for you :) I myself don't port with CM9 anymore, I am happy on MIUI wuith stock 4.0.4 Xperia base. Much faster than CM9 ever was. If there is JB AOSP/Stock ROM for your device, use them for JB MIUI!
[Android Software Development] eminent1410:
Sorry for noob question again, in CM10 camera app included in gallery2.apk, so if I copy it, I will has 2 gallery @@!. Can you help me solve it? Can I copy libcamera*.so from MIUI to my based ROM (CM10)? thanks
[Android Software Development] Lens_flare:
even nexus S uses legacy camera (ics) to bypass issue you describing. No go.
[Android Software Development] irberserk:
I have a problem with apn and sim card here logcat: apn don't works and sim is recognised sometime and sometime not:

logcat
[Android Software Development] Lens_flare:
sure your ril class is lgequalcomm one? It might create RIL instead if you haven't defined it in phonefactory.

Otherwise, try to change gsm/gsmdataconnectiontracker.smali
[Android Software Development] irberserk:
My Ril is LGEQualcommUiccRIL :( i will try with gsmdata. With change you mean replace or diff?

ok. I have added not more the previus error but another:

new logcat

When i try to add apn there is this error
[Android Software Development] mingolianbeef:
Where was this when I wanted to port MIUICS and MIUIJB to the 3vo first lol?? Nonetheless, great job man, really outstanding, I would bet many parts of this can be used as a point of reference to more than just MIUI roms :)
[Android Software Development] thetrisatria:
Stock Sony much faster than CM9? Could you tell me the recipe? my port for Xperia Ray always laggy (for me CM9's faster)
[Android Software Development] CosmicDan:
1) Take Arc S MIUI ROM from miuiandroid.com

2) Delete these folders in Arc S ROM FIRST (remove Arc S stuff)...

/system/lib/hw
/system/lib/modules
/system/etc/wifi

....then copy those folders from any stock ICS ROM for your Xperia.

3) Also copy (replace) these files from any stock ICS ROM for your device to MIUI to get Wifi working fully:

/system/lib/libhardware_legacy.so
/system/bin/wpa_supplicant

4) Maybe you need to copy system/etc/sensors.conf from your base ICS to get compass and stuff working too.

Done. Dunno if Bluetooth works, I can't test it.

Please tell me your results/details in PM, so I can create MIUIAustralia.com port. Of course you will be credited. (it's a one ROM for all, selectable device from Aroma installer, and right now it's the fastest ICS ROM for Xperia Play thanks to my kernel).
[Android Software Development] _polimorph_:
The result of adb shell system_server is the same as the first time I tryied this: "Segmentation fault. Is there another way around finding the log output... it's crucial?

And can I lose some functionality by using CM10's old, maybe obsolete libandroid_servers.so?

EDIT: I tryied now to use all libs from last CM10 (including libwebcore.so which was the last one left used from MIUI) and the results are the same. I would give anything for a complete logcat.
[Android Software Development] Lens_flare:
I'm quite sure you are on RIL instead :p

those qualcomms doing the same crap when something goes wrong..

show me a radio log:

adb logcat -b radio

mere logcat is useless here.
[Android Software Development] CosmicDan:
You'll get segmentation fault if you try and run many other binaries too, it means it can't even map the usermemory to the kernel properly. Basically you have wrong libs/bins.

So you're using 100% original CM10 libs and bins and still get a segfault? That's wierd. I'd just use the old libs then yeah. And no, what functionality would you use? All CM9/CM10 functionality is useless in MIUI.
[Android Software Development] _polimorph_:
That's correct, 100% CM10 (except, of course, liblbesec.so and liblocSDK_2.5OEM.so). If you say it's nothing wrong I will continue using libandroid_servers.so from an older release and libwebcore.so from MIUI to avoid porting the webkit. You know I'm lucky :)

I also have news: using the latest CM10 builds there is new smali from CM10 that I must use: HeadsetBase*.smali family. (EDIT: from framework/smali/android/bluetooth.)
[Android Software Development] CosmicDan:
Yes, you are very lucky as you say :) I tried very first CM10 alpha release for my device and could not use libwebcore from MIUI :(
[Android Software Development] ak0r:
Hi, I manged to boot my MIUI based on JB. But some how it stuck on first screen. No response to touch, except soft buttons. I can feel vibrations when buttoons are pressed. The log cat show following: I found the line which may help:

Also threre are lots of unknown permission errors as follow:

And then it failed at

Also following error:

Thanks in advance

---------- Post added at 04:30 PM ---------- Previous post was at 04:17 PM ----------

Forget above post. I did replaced some smali and now I can boot to home. Almost every thing works except network. Can anyone tell me what should I have to do to get Network?
[Android Software Development] CosmicDan:
All of those errors you quoted can be ignored usually. To get network you probably need to port your RIL and Telephony framework from CM10.
[Android Software Development] ak0r:
Thanks CosmicDan for prompt reply. I already copied RIL* smali from CM10. But what's telephony framework?
[Android Software Development] CosmicDan:
Stuff in internal/telephony. Depends on your device what else you need. What is your brand/radio? Qualcomm or what? Usually RLE is not enough. You will also need RIL libs from base ROM (but you should already have them).

EDIT: Check your CM10 build.prop, will have line like "ril.class" or something. I'm pretty sure this is all in post 2 or 3....
[Android Software Development] ak0r:
I am porting to HTC Wildfire S.
[Android Software Development] irberserk:
Thanks all my data connection now works!But i have problem with calls. If i receive a call it's all ok i can hear who call me; but if i send a call i can hear who i called but he can't hear me.Another problem are the artefacts that i see sometimes in the screen.

LOGCAT
[Android Software Development] pratikmore:
Other person cant hear you then replace deodex phone.apk and class of ril.smali
[Android Software Development] Lens_flare:
so you only need RIL class.
[Android Software Development] irberserk:
I have already replaced all *ril.smali in framework under telephony folder.I must replace also phone.apk with my base phone.apk?
[Android Software Development] pratikmore:
Base phone.apk but deodex not odex.
[Android Software Development] ak0r:
Thanks. I copied the RIL*.smali again. And checking now. Will logcat help in this issue?
[Android Software Development] ak0r:
Statusbar does shows name of my network provider :P. build.prop doesn't contain ro.telephony.ril_class value
[Android Software Development] Lens_flare:
of course, you changed core component..

use radiolog to investigate an issue (of course you have to return miui phone.apk).

also use radiolog, maybe some request gone..
[Android Software Development] Lens_flare:
again wrong response..

such lazy devs :[

Seems modding phone.apk is the only way..
[Android Software Development] irberserk:
What i must change lol?xD
[Android Software Development] pratikmore:
Try to change whole telephony folder and use deodex phone.apk with permision rwrr.
[Android Software Development] ManCloud:
Have a big Problem...

My system wont boot...

did everything as said in the guide but doesnt seem to work...

as i can see there are no method or class errors but i dont get it..

maybe someone can help me ... i'm working on it for 3 days now xD

BTW: its miuiv4.1.

Base rom is latest cm10 build and Miui rom is latest nexus S build.
[Android Software Development] irberserk:
Thanks for help me,the permissions aren't a problem i re-flash every time the whole rom when i come back to home i will try, this trick,if no change i will try TO change miui port with another.My phone is a lg e400 with ldpi screen,arm v7 cpu.Do you know what maybe the Best miui for porting?

Sorry for the questions and thanks very much for the help :D

Inviato dal mio LG-E400 con Tapatalk 2
[Android Software Development] ak0r:
What's up with this error?

E/JNIHelp ( 452): Native registration unable to find class 'com/android/internal/app/ActivityTrigger', aborting

F/libc ( 452): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 452 (zygote)

---------- Post added at 11:57 PM ---------- Previous post was at 11:36 PM ----------

Might be this was bad compile. Now I am getting following errors:

E/BandwidthController( 300): runIptablesCmd(): failed /system/bin/iptables -t raw -N bw_raw_PREROUTING res=768

E/AudioTrack-JNI( 299): Can't find android/media/AudioFormat.ENCODING_AMRNB

E/AndroidRuntime( 299): Unable to register all android natives

I/ServiceManager( 98): service 'media.audio_flinger' died

I/ServiceManager( 98): service 'media.player' died

I/ServiceManager( 98): service 'media.camera' died

I/ServiceManager( 98): service 'media.audio_policy' died
[Android Software Development] irberserk:
In the telephony folder i must replace all *ril.smali files? not only LGEqualcomm ril and qualcomm.smali? i must replace also other ril as RIL$RILSender? in cat folder under telephony there are other .RIL i must replace also them?

Thanks to all :o
[Android Software Development] pratikmore:
Just copy the telephony folder from base framework.jar and paste it into miui framework.then you will get new framework just open it and pull out classes.dex and put that in miui framework which comes with rom.them paste that modified framework in miui rom and replace phone.apk with deodex phone.apk .try this method.
[Android Software Development] Lens_flare:
com/android/internal/app/ActivityTrigger

it's in framework.jar, just paste it from base.

Can't find android/media/AudioFormat.ENCODING_AMRNB

diff AudioFormat.smali, it's also in framework.jar.
[Android Software Development] Gumby63:
Okay I have a few errors here. First off, here is my log: http://dl.dropbox.com/u/31445433/logcattw.txt This is not a port of MIUI but I figured someone might be willing to help :)

I notice a lot of errors with ALSA, and then there is one specific smali error that I cannot locate in any jar. I'm hoping someone can point me in the right direction.

Here's that one error:

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

E/dalvikvm( 466): Requested: Lorg/apache/harmony/xnet/provider/jsse/NativeCrypto;.SSL_SESSION_compress_meth:(II)Ljava/lang/String;

E/JNIHelp ( 466): RegisterNatives failed for 'org/apache/harmony/xnet/provider/jsse/NativeCrypto', aborting
[Android Software Development] CosmicDan:
That framework file uses a native method from a lib but the lib you are using does not have it. Either try copying the original lib with that method (Find in files for SSL_SESSION_compress_meth in *.so with e.g. Notepad++) or hack the framework to remove all references to the method.
[Android Software Development] ak0r:
AudioFormat.smali not present in BASE :(
[Android Software Development] CosmicDan:
It has to be. It's in all ICS (and later) ROM's, probably GB too.
[Android Software Development] ak0r:
I'll check again. Probably I'll start from scratch. I am porting MIUI JB with CM10 as base.
[Android Software Development] Megalith27:
Guy, yet another problem here...

Ported the rom...it boots...but the screen stays black all the time....after I edit framework-res.apk, screen still remains black, can only see the half of the screen if i slideout the keypad in landscape mode...

Any ideas?
[Android Software Development] CosmicDan:
Are you using 100% original CM10 lib, lib/hw and kernel?
[Android Software Development] Megalith27:
Yep, just copied apps,media,font and framework

Sent from my A953
[Android Software Development] CosmicDan:
I assume you're on an MDPI device then..... no idea how to fix that sorry.
[Android Software Development] ak0r:
I compared and patched AudioFormat.smali. Now I get following error

Also above error is followed by weird codes looks like some memory related backtrace.

But if I don't patch AudioFormat.smali then again I get following error
[Android Software Development] v1r0x:
Copy ActivityTrigger.smali from cm base to miui one
[Android Software Development] Lens_flare:
that's what I call "C exception" ;]

it looks weird to fear potential hackers :P
[Android Software Development] CosmicDan:
Actually, it's a Dalvik process dump ;) They can be extremely useful when Dalvik gets a hard crash from something apart from JNI/Class errors.
[Android Software Development] ak0r:
So, copying ActivityTrigger.smali will help?
[Android Software Development] Lens_flare:
yea, don't worry, it's not that smali you should fear like android/widget or so.
[Android Software Development] mscreater:
i can't disassembling the framework.jar how can help me?

i can't disassembling the framework.jar how can help me? this file is in honor miui. i use apktool 1.4.9 don't konw why have provlem...

here is my framework http://www.mediafire.com/file/0xshcowk3bbq8ox/framework.jar
[Android Software Development] Lens_flare:
list a problem instead, I hope it's just something with your installtion
[Android Software Development] mscreater:
Error occured while disassembling class Lcom.android.internal.telephony.IccCard$

2; - skipping class

java.lang.NullPointerException

at org.jf.dexlib.ClassDataItem.findMethodByMethodIdInternal(ClassDataIte

m.java:534)

at org.jf.dexlib.ClassDataItem.findDirectMethodByMethodId(ClassDataItem.

java:506)

at org.jf.dexlib.Code.Analysis.SyntheticAccessorResolver.getAccessedMemb

er(SyntheticAccessorResolver.java:71)

at org.jf.baksmali.Adaptors.MethodDefinition.addInstructionMethodItems(M

ethodDefinition.java:373)

at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefini

tion.java:313)

at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.ja

va:132)

at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition

.java:325)

at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDef

inition.java:297)

at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java

:104)

at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:185)

at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:48)

at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:34)
[Android Software Development] Lens_flare:
Oo

or it's not agile recompilation, or smart anti-disassembling ;/
[Android Software Development] CosmicDan:
Copy all IccCard*.smali files, not just one file.
[Android Software Development] ak0r:
Thanks. That helped. Now I have new in plate :D

Though I am trying myself with solution your help is always welcome.
[Android Software Development] irberserk:
Dear guys finally have ported with semi-success miui to lg e400! The only problem are some artefacts in menu, the external sd not mounted, and led not works!

Wifi works, data connection works, bluetooth works, camera works!Any help is appreciated!:cowboy:.How i can fix problems?

Edit:artefacts solved!Remain led and sd.

Lens have any idea? <3
[Android Software Development] mscreater:
no i change a apktool and disassimble it, but i have another problem for bootloop

here is my logcat, i just don't know where is the bad block....http://pastebin.com/zRqRYKkg
[Android Software Development] Lens_flare:
mscreater

now your error is:

E/ ( 319): Error Loading libmpqstobinder
E/ ( 319): Error: Cannot load library: load_library[1093]: Library 'libmpqstobinder.so' not found

add that lib to build.
[Android Software Development] :
I'm in a boot loop and cannot pull a log cat, any advice?
[Android Software Development] Lens_flare:
are you using adb? What's error?
[Android Software Development] mscreater:
no, original rom or miui rom doesn't have the libmpqstobinder.so, so i don't how to fix it

here is the whole log when i use original rom , http://pastebin.com/zQ7kAhZ1

and here is the port rom's log which bootloop http://pastebin.com/xZdXQE8X
[Android Software Development] CosmicDan:
Nope :) just repack the jar and push the new jar over adb in recovery instead of reflashing.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] chiragkrishna:
thanks for your reply,,...

sorry noob here,...

can you be more precise,...

i need to push framework.jar,..

edit: got it thanks
[Android Software Development] chiragkrishna:
finally free of many errors but now stuck here,...

cant make sure where the fault is?? still not able to boot,...

F/libc ( 2088): Fatal signal 11 (SIGSEGV) at 0x0000002c (code=1)

http://dl.dropbox.com/u/17514044/lo.txt
[Android Software Development] DJBhardwaj:
@lens: I am getting a huge amount of error in android/content/res/assetmanager.smali

Is there any quick way to fix?
[Android Software Development] chiragkrishna:
even i had it,.. i replaced all the missing code and its been fixed,... but now am stuck with a fatal error,...:( you have any fatal errors??
[Android Software Development] DJBhardwaj:
Not yet. I guess, I would have to deal with them after fixing framework ;)
[Android Software Development] DJBhardwaj:
Phew! Finally I am relieved from framework errors. Fixed now! and the ROM has booted for the first time.

@lens: For smali patching and comparing for win users, add a link to

winmerge

to the first post. It would be really helpful for new comers ;) & A BIG THANKS TO YOU
[Android Software Development] CosmicDan:
Heya Lens_flare, have you ever tried porting miui with patchrom? I'm taking a shot at doing it on the ICS branch now... no idea if it will work or what version of MIUI it'll be though!
[Android Software Development] DJBhardwaj:
Good Luck :good:
[Android Software Development] DJBhardwaj:
@lens: how do I fix Usb mass storage? Black bar on status bar ? and themes not applying?
[Android Software Development] CosmicDan:
Using patchrom, at least with CM9 base, is very difficult. Possible, but not realistic. There is a lot of manual work involved for rejected patches. Regardless, I have learned something.

The only framework files that need patching are android.policy.jar, framework.jar, framework-res and services.jar. When MIUI is build from source, all the other /framework files are left untouched (or entirely new, e.g. framework-miui). Maybe there is more work involved for CM9 (because MIUI is built on AOSP), but doing a tree-diff of these four files between the MIUI ROM you are porting and the CM9 base you are using, you should find all the code that you need to port.

There are some tricky exceptions, especially in the case of android.policy.jar - CM9's version has a lot more code than AOSP/MIUI ROM's, and when decompiling many of smali filenames won't match. That can be resolved by doing a string-find-in-files of the first few methods/annotation of each though.
[Android Software Development] DJBhardwaj:
@lens: Any advises ?
[Android Software Development] CosmicDan:
Dude you didn't even wait two hours, he's probably asleep or at work or doing something more important.
[Android Software Development] DJBhardwaj:
I'm so sorry, didn't realize the time zone difference.
[Android Software Development] chiragkrishna:
@DJoptimus-One

what all did you change in framework,... mine is still stuck on miui logo,...

but the led indicator is on and the hardware buttons light go on and off like when i touch the screen,...

any idea how to get it to working,...

will upload log shortly,...
[Android Software Development] Ozadroid:
Lights geting on and off?? :o

Ur done must have got alien in it :P

Lol just joking.. bro did u read the guide since the start ?? N did u read ur logcat ??
[Android Software Development] DJBhardwaj:
What ROM do you take as base? And which device's miui from you take?
[Android Software Development] chiragkrishna:
my device sgs3

sgs3 cm9

nexus s miui

now the harware buttons lighhts get on when i touch screen,...

http://dl.dropbox.com/u/17514044/l.txt
[Android Software Development] v1r0x:
08-07 05:55:41.544: E/AndroidRuntime(4081): java.lang.NoClassDefFoundError: miui.util.UnitedWorldwide_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus

miui.us rom is your problem.

Try it with miuiandroid build.

I'm not sure, but I had the same error:

D/dalvikvm( 2050): DexOpt: couldn't find static field Landroid/os/SystemProperties;.QCOM_HARDWARE

Diff the SystemProperties.smali in framework.jar/android/os
[Android Software Development] Lens_flare:
then switch base. nothing to do there..

as I remember you have new device which isn't supported by cm, so the only way remains is a patchrom.
[Android Software Development] CosmicDan:
Or use a stock ICS ROM for your device and experiment with the various non-Nexus builds.