yashsingh1/xdaforums huggingface dataset:
[Android Software Development] sk8erboy:
tell me MIUI version please.and remove it?everythings works ok?
[Android Software Development] Myrder:
I'm having a tad bit of trouble here.. I've followed the guide pretty much down to the T and also followed an email from a dev of the MIUI rom in the OneX(AT&T). He no longer has time to maintain the ROM and has passed it down to a budy of mine and I am helping with it. After 6 builds or so, I finally got one to boot and get to the setup wizard. However.... The keyboard, systemUI, and MIUI home fail. I've gone through my logcat and tried to patch/copy certain smali/smali trees. Still, no fix. I've attached the logcat for the lastest build. If anyone could give some assistance, that would be incredibly awesome. To de/recompile, I use smali/baksmali. The diff program I use is Meld.

Yes, I know the logcat is in .zip form. Kinda had too, pastebin didn't like the size of it(meaning it would lag my computer hard).
[Android Software Development] _polimorph_:
I tested it on one of my ports, CM10 based MIUI 2.11.23. Everything else works fine. I used eventually the patching method of boot.img, but it's much more complex job than your solution.
[Android Software Development] Megalith27:
Hi guys,

yet again i need your mighty help.

I have ported an ICS rom but I am experiencing some problems and bugs that I need help fixing. List is long but more important once are below:

1 - usb/storage/SD card access - For this one I did like Lens has describes on 4th post...the status bar does says usb is connected (although status bar notification still persyst after I unplug the usb cable) but I can't logcat or access sd card...can only access sd card from bootmenu...but I can logcat during boot if I choose to boot "2nd init + adb"

2 - Mobile data - I seem to had mobile data connection but lost it, i think, during the process of avoiding getting below error continuously.

3 - Occasional com.android.phone error - doesn't cause any damage...but a bit annoying...also getting this when trying to access Setting/Network....

Any help is very much appreciated and I am open to suggestions.

Thanks in advance.
[Android Software Development] _polimorph_:
I haven't woked with ICS, but the second and third issue seem to have a common root - a RIL problem. It must be something in the telephony folder that isn't quite right.

For the first error see if adding this lines to build.prop is helping you to get a logcat:

ro.secure=0
ro.debuggable=1
persist.service.adb.enable=1

persist.sys.usb.config=mtp,adb (for a MTP device)
or persist.sys.usb.config=mass_storage,adb (for USB device)
[Android Software Development] Megalith27:
Thanks for the response:

I already have these line in build.prop

persist.service.adb.enable=1
persist.sys.usb.config=mass_storage,adb

And workaround for that problem seems to be enabling default boot from bootmenu as [2nd init + adb] that way I can get logcat and access my sd card via usb...but usb symbol on status bar still stays there after unplugging the cable and when I plug the cable back in everything resets and PC doesn't recognize the device anymore and I have to reboot again with [2nd init + adb] to bring it back and even to charge.

as for mobile data, I did replace RIL*.smali files and added the RIL smali that was in build.prop...but while trying to fix mobile data, I tried copying gsmdataconnectiontracker*.smali files and that gave me the same error...also replacing only gsmdataconnectiontracker.smali...so I had to back to smali files of the rom that i am trying to port.
[Android Software Development] santajin:
I ran into a problem when porting MIUI patchrom 4.1, it seems that something wrong of framework.jar, the logs are:

11-30 14:33:42.975: D/dalvikvm(834): DexOpt: --- BEGIN 'framework.jar' (bootstrap=1) ---
11-30 14:33:43.065: E/dalvikvm(960): Out-of-order method_idx: 0xec91 then 0xec91
11-30 14:33:43.065: E/dalvikvm(960): Trouble with item 322 @ offset 0x5b5bd4
11-30 14:33:43.065: E/dalvikvm(960): Swap of section type 2006 failed
11-30 14:33:43.065: E/dalvikvm(960): ERROR: Byte swap + verify failed
11-30 14:33:43.515: E/dalvikvm(960): Optimization failed
11-30 14:33:43.535: W/dalvikvm(834): DexOpt: --- END 'framework.jar' --- status=0xff00, process failed
11-30 14:33:43.535: E/dalvikvm(834): Unable to extract+optimize DEX from '/system/framework/framework.jar'
11-30 14:33:43.535: D/dalvikvm(834): Unable to process classpath element '/system/framework/framework.jar'

Anyone knows what happened?

Thx!
[Android Software Development] dekkyy:
Patchrom doesn't support JB.
[Android Software Development] santajin:
Yes, it supports!

By the way, do you know what happened to my framework.jar?
[Android Software Development] LegibleEel:
Anyone help me out here? I followed the port guide, yet it still boot loop.
[Android Software Development] ak0r:
Check your assetmanager.smali patch. You missed something to add.
[Android Software Development] LegibleEel:
I still get the same error, despite adding the code...
[Android Software Development] vijendrahs:
For the following issue:

android/content/res/AssetManager;.splitThemePackage

You compare the AssetManager.smali of Base and Port using "Beyond Compare"

Find the following string "splitThemePackage" while comparing and see that method present in Base AssestManager.smali and move that method declaration from Base to Port. And also see if the implementation of the method is is no conflict with the lines move that as well from base to Port and assemble it.

Let me know if you are unable to solve it. I will make it for you.
[Android Software Development] acervenky:
Sorry For Interupting.

I had Ported MIUI to Xperia P.

Everything like WiFi,Bluetooth,Audio,GSM,etc works fine.

But Rotation Sensor Is Not Getting Calliberated and Camera and Gallery FC.

Can I get some help:D

Thanks in advance.

Regards,

acervenky,

XPT
[Android Software Development] holden56:
I got my rom ported from at&t to us cell but it doesnt activate and under status the carrier network isn't right.
[Android Software Development] ak0r:
Can anyone help me in resolving shelld issue? I can't start it at boot
[Android Software Development] sandy7:
copy these files fro source rom to port rom...

[B]/system/xbin/shelld
/system/lib/libshell.so
/system/lib/libshell_jni.so
/system/lib/libshellservice.so[/B]

and edit ur kernel ramdisk....add these lines at the end of the file init.rc ramdisk and repack the kernel....

[B]service shelld /system/xbin/shelld
class main[/B]
[Android Software Development] ak0r:
I already did. But shelld not getting started at boot. Any other way to get rid of this?
[Android Software Development] sandy7:
Make sure u copied those 4 files in ur system....and did u use proper kernel...at the last leave a space line and add those lines...
[Android Software Development] ak0r:
Here is full log https://www.dropbox.com/s/v5eo9dqigki4ude/log_miui.txt
[Android Software Development] tathanhlam66:
i think shell libs not work in 4.1.1
[Android Software Development] _polimorph_:
That SIGILL signal is sent to a process when it attempts to execute a malformed, unknown, or privileged instruction.

Besides some faulty adresses I think you might have a look at AssetManager for the red field and diff it if it exists in CM10's smali.

D/dalvikvm( 308): Note: class Landroid/opengl/GLWrapperBase; has 250 unimplemented (abstract) methods

F/libc ( 310): Fatal signal 4 ([B]SIGILL[/B]) at 0x40126bde (code=1), thread 310 (shelld)

D/dalvikvm( 308): DexOpt: couldn't find field Landroid/content/res/AssetManager;.[COLOR="Red"]mRedirections[/COLOR]

Seems to be something wrong in the webkit also. Compare again:

D/dalvikvm( 308): DexOpt: wanted static, got instance for field Landroid/webkit/HTML5VideoView;.mPlayer

I/dalvikvm( 308): DexOpt: access denied from Landroid/webkit/HTML5VideoFullScreen$3; to field Landroid/webkit/HTML5VideoView;.mProxy
[Android Software Development] saotua:
I want to port to T-mobile galaxy S3 (T999) and was wondering if I could use the miui version from galaxy S3 international (I9300) as a Miui Base or I should use the Nexus S. Thank you so much.
[Android Software Development] _polimorph_:
The Nexus S or Galaxy Nexus base can provide better solution since they're very close to the original MIUI shape.

Edit: Nexus S is for hdpi, GNex is for xhdpi devices. GS3 is xhdpi.
[Android Software Development] a_swed:
who can help me?

My port dont boot with any folders in /system/media dir with this errors: http://pastebin.com/8KbJBRhv

and when i try to boot with ported labandroid_runtime.so i have bootloop: http://pastebin.com/3pqjiuJ1

EDIT: i have icudt46l.dat file
[Android Software Development] gls9:
Anybody ?
[Android Software Development] LegibleEel:
ok i have a problem with the miui home force closing. Any help?

Log : https://www.dropbox.com/s/dws1tgtj65x5x6t/Log.txt

Better log: https://www.dropbox.com/s/6v50dh1ctqiyguf/log2.txt

Edit: just tried with trebuchet launcher, that FC as well...dont know whats wrong.
[Android Software Development] ak0r:
You patched for shelld?
[Android Software Development] LegibleEel:
No i haven't, didn't think i needed to. :/ ill give it a try.
[Android Software Development] _polimorph_:
You have to enable "shelld" script. This is a startup daemon needed for the theme engine to work and also prevents random FCs of MiuiHome.

I use this method:

1. decompile (under linux preferably) boot.img, find init.rc and add at its end the lines:

service shelld /system/xbin/shelld
class main

leave a blank space at the end of the init.rc file, recompile and replace old boot.img with the new edited boot.img;

2. copy from MIUI "/system/xbin" to Port the file "shelld";

3. copy from MIUI "/system/lib" to Port the following libs: libshell.so, libshell_jni.so, libshellservice.so.
[Android Software Development] LegibleEel:
Interesting, there are no libshell.so, libshell_jni.so, libshellservice.so libs in the base cm10 :/ Same thing with the shelld file.
[Android Software Development] _polimorph_:
Sorry, my bad. It is "from MIUI to Port". I'm correcting the post this instant.
[Android Software Development] LegibleEel:
Thanks, I've added the stuff you've mentioned but i still have a issue, Its turned from a force close to a not responding error.

Log: https://www.dropbox.com/s/7l4kuv8g8cemi1e/log3.txt
[Android Software Development] _polimorph_:
I think all the files i've mentioned are there but the "shelld" daemon has not started. Try to access it manually and execute it.
[Android Software Development] ZeRo2o9:
this may have fixed my port thanks for posting this
[Android Software Development] CosmicDan:
It's much easier to just use an init.d script

/system/xbin/shelld&
[Android Software Development] ak0r:
CosmicDan you back on thread? Thanks.

I had tried both bays but shelld doesn't start. Full log is here https://www.dropbox.com/s/v5eo9dqigki4ude/log_miui.txt.
[Android Software Development] CosmicDan:
Yeah, but I wont be able to help too much. I port MIUI based on my own AOSP build and using PatchROM, works perfectly.

Looks like you have a linker issue. Logcat won't give detail because logcat stdio output is not enabled, try going into adb shell and manually run shelld - you should get an error there.
[Android Software Development] _polimorph_:
Thanks. Unfortunately for me it gets stuck at boot if adding this to init.d folder and don't know why. Can you attach your script file please?
[Android Software Development] santajin:
I meet a problem, when install some app such as xda-developers, the phone got reboot, logs are:

W/PackageParser( 3917): No actions in intent filter at /data/data/com.android.providers.downloads/cache/downloadfile-1.apk Binary XML file line #387
W/PackageParser( 3917): No actions in intent filter at /data/data/com.android.providers.downloads/cache/downloadfile-1.apk Binary XML file line #401
I/ActivityManager( 2685): Start proc com.android.defcontainer for service com.android.defcontainer/.DefaultContainerService: pid=3933 uid=10010 gids={1015, 2001, 1028}
W/ActivityManager( 2685): No content provider found for permission revoke: file:///data/data/com.android.providers.downloads/cache/downloadfile-1.apk
D/VoldCmdListener( 103): asec list
W/ActivityManager( 2685): No content provider found for permission revoke: file:///data/data/com.android.providers.downloads/cache/downloadfile-1.apk
E/AndroidRuntime( 2685): *** FATAL EXCEPTION IN SYSTEM PROCESS: PackageManager
E/AndroidRuntime( 2685): java.lang.SecurityException: Requires android.permission.ASEC_CREATE permission
E/AndroidRuntime( 2685):	at android.os.Parcel.readException(Parcel.java:1425)
E/AndroidRuntime( 2685):	at android.os.Parcel.readException(Parcel.java:1379)
E/AndroidRuntime( 2685):	at com.android.internal.app.IMediaContainerService$Stub$Proxy.copyResourceToContainer(IMediaContainerService.java:241)
E/AndroidRuntime( 2685):	at com.android.server.pm.PackageManagerService$AsecInstallArgs.copyApk(PackageManagerService.java:6699)
E/AndroidRuntime( 2685):	at com.android.server.pm.PackageManagerService$InstallParams.handleStartCopy(PackageManagerService.java:6084)
E/AndroidRuntime( 2685):	at com.android.server.pm.PackageManagerService$HandlerParams.startCopy(PackageManagerService.java:5706)
E/AndroidRuntime( 2685):	at com.android.server.pm.PackageManagerService$PackageHandler.doHandleMessage(PackageManagerService.java:547)
E/AndroidRuntime( 2685):	at com.android.server.pm.PackageManagerService$Injector.doHandleMessage(PackageManagerService.java:186)
E/AndroidRuntime( 2685):	at com.android.server.pm.PackageManagerService$PackageHandler.handleMessage(PackageManagerService.java:493)
E/AndroidRuntime( 2685):	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2685):	at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2685):	at android.os.HandlerThread.run(HandlerThread.java:60)

can someone help me to fix it?
[Android Software Development] denseye:
hello

I'm trying to port MIUI on my acer phone with your method.

I tried with several MIUI bases, but I'm always facing the same problem : Fatal Signal 11 during boot (during miui logo).

I can't really find in the logcat any reason for that ...:( but maybe I need some help.

Thanks.
[Android Software Development] LegibleEel:
Happens to me to, I'm probably doing it wrong...
[Android Software Development] Alex93917:
No, you have to decompil boot.img, view this : http://xdaforums.com/showthread.php?t=1630130

And with boot.img decompiled, modify init.rc, then, recompil ;)
[Android Software Development] CosmicDan:
Did you remember to put the ampersand (&) at the end? That's essential for init process on many kernels.

# Start Shell Service (required since 2.11.30)
/system/xbin/shelld&
[Android Software Development] _polimorph_:
Thanks, already been there. This was all about making things simpler. Users depend on the modified kernel for MIUI and can't use other than default unless the kernel developer already includes the startup daemon in init.rc. So this method is makes things working but in the same time is preventing users to use their randomly desired kernel.

Yes, I did. What else could cause this behaviour?

Another issue I'm facing is with the new MIUI build based on android 4.2:

12-11 18:56:38.355: D/AndroidRuntime(9660): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
12-11 18:56:38.355: D/AndroidRuntime(9660): CheckJNI is OFF
12-11 18:56:38.365: D/dalvikvm(9660): Trying to load lib libjavacore.so 0x0
12-11 18:56:38.365: D/dalvikvm(9660): Added shared lib libjavacore.so 0x0
12-11 18:56:38.370: E/dalvikvm(9660): ERROR: couldn't find native method
12-11 18:56:38.370: E/dalvikvm(9660): Requested: Llibcore/icu/NativeConverter;.setCallbackDecode:(JIILjava/lang/String;)V
12-11 18:56:38.370: E/dalvikvm(9660): Candidate: Llibcore/icu/NativeConverter;.setCallbackDecode:(JIILjava/lang/String;)I
12-11 18:56:38.370: E/dalvikvm(9660): Candidate: Llibcore/icu/NativeConverter;.setCallbackDecode:(JLjava/nio/charset/CharsetDecoder;)I
12-11 18:56:38.370: E/JNIHelp(9660): RegisterNatives failed for 'libcore/icu/NativeConverter', aborting
12-11 18:56:38.370: A/libc(9660): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 9660 (zygote)
[Android Software Development] CosmicDan:
Well obviously it's an issue with CM10, works fine on AOSP and Stock firmwares (it's what MIUI Australia does).

That's all from me, I'm out.
[Android Software Development] ak0r:
Can anyone tell me about patchrom method? I tried to sync ICS repo but it seems it's downloading sources for all devices MIUI support. Download size more than 2 GB already. I don't want that. Is there any way to download only for one or two devices?
[Android Software Development] denseye:
other informations :

- I try porting ICS MIUI

- comparing the logs of a working MIUI port (not mine), all my ports come with a fatal signal just after finishing dexopt of all bootclasspath jar, and just before the event "I/Zygote(94): Preloading resources..." ; this event appears in working MIUI port, but never on my ports

Any clue ?... :confused:
[Android Software Development] _polimorph_:
I can't find the error causing the bootloop in your log. Try other AOSP base maybe?
[Android Software Development] denseye:
thank you for having a look at my problem

I have not another base ... so I think I will give up :(
[Android Software Development] santajin:
Anyone knows how to solve my problem?

Edit: When I install app to sdcard or move app to sdcard, this happens.
[Android Software Development] Alex93917:
GPS is not working on port. An idea for that ?! :)

Thank you.

Below, there is a logcat in Google Maps with GPS is turned on, but doesn't working ... Maybe HTML or Webclassic smalis ? No ?
[Android Software Development] Ozadroid:
back after many months!

Porting Miui_JB

Base : Crespo [MiuiAndroid]

Device: P500

MiHome crashing continuously!

Logcat

thnx!
[Android Software Development] ak0r:
I am also facing same issue. No solution so far yet. I think you have already applied shelld patches. shelld doesn't get started for our devices :D Try replacing MiuiHome and ThemeManager from older builds. You'll get themes working but not every part of it :P
[Android Software Development] LegibleEel:
I have a few more problems, (Seems to be a problem with the sim) the rom boots fine and works fine without the sim, but if it boot it with the simcard in then it doesn't boot.

Logcat of specific problems here

Full logcat here
[Android Software Development] Ozadroid:
did u replace RIL*.smali ??
[Android Software Development] LegibleEel:
yes i have, not sure what it could be.
[Android Software Development] Megalith27:
Hi

Trying to understand what it means when logcat keeps looping on these three lines.

I/Netd ( 2317): Netd 1.0 starting

E/Netd ( 2317): Unable to bind netlink socket: No such file or directory

E/Netd ( 2317): Unable to open quota2 logging socket

Any input? Thanks in advance
[Android Software Development] Ozadroid:
It means u hv either missed an important file or u hv put a wrong file !
[Android Software Development] denseye:
Hello

I have a general question about patching smali.

Imagine I have in file A :

.line 127
instruction 1
.line 128

and in file B

.line 149
instruction 1
instruction 2
instruction 3

where both instructions 1 are identical

If I want to add code from file B to file A, what do I have to do with line numbers ???

file A modified

.line xxx ?
instruction 1
instruction 2
instruction 3
.line xxx ?

thanks for explaining me :)
[Android Software Development] a_swed:
om my device this error on kernel level and its not a problem in port. try to use stock libandroid_runtime.so, and watch to logs.
[Android Software Development] ak0r:
Wrong libandroid_runtime.so!
[Android Software Development] ak0r:
logcat please.
[Android Software Development] dntipwn:
ya here is the one from the com.android.phone stopped and also if you could see why it would recognize the sim card? Im using a Stable cm10 as a base. Also i have the miui home force closing not sure what is going on.
[Android Software Development] _polimorph_:
Patch your init.rc to autostart shelld daemon.

http://xdaforums.com/showpost.php?p=35317178&postcount=1673

---------- Post added at 12:14 PM ---------- Previous post was at 12:13 PM ----------

Has anyone tried to port to CM10.1 yet? How is the process going, it's for sure not the same as for CM10... there are allot of framework changes.
[Android Software Development] _polimorph_:
Don't bother with the line numbers. It doesn't really matter. I even set my diffing software to ignore the "line" differences.

E/AndroidRuntime( 725): java.lang.RuntimeException: Unable to create application com.android.phone.MiuiPhoneApp: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.android.internal.telephony.[B]HTCQualcommRIL[/B]

For the Phone FC you have to copy HTCQualcommRIL.smali file (also RIL*.smali family if haven't done so) from CM to Port and diff (if it's needed) the PhoneFactory.smali like in OP #2

The MiuiHome FC and Themes can be solved by following this procedure: http://xdaforums.com/showpost.php?p=35317178&postcount=1673.

Is your NFC working? I also found this error in your logs:

W/PackageManager( 395): Library not found: /system/framework/[B]com.android.nfc_extras.jar[/B]

Copy com.android.nfc_extras.jar file from MIUI /system/framework to Port.
[Android Software Development] Ozadroid:
I already did that.. still not working . The launcher keeps on loading n loading n loading...
[Android Software Development] _polimorph_:
Use another launcher to acess and start manually the shelld script with a root browser to verify if it was already starded or not.
[Android Software Development] Ozadroid:
setCallbackDecode wants this signature (JIILjava/lang/String;)V

and u hv these signatures

[I](JIILjava/lang/String;)[B]I[/B][/I]

and

[I](JLjava/nio/charset/CharsetDecoder;)I[/I]

Solution:

Search NativeConverter.smali in cm10.1 for this whole string and in notpad tick the case sensitive option.

setCallbackDecode:(JIILjava/lang/String;)V

copy the whole method wid this string at the end of the smali n it will b good.
[Android Software Development] ak0r:
Patching kernel doesn't start shelld even it cannot start manually. DOes shelld is cpu related? Does it really works with ARMv6? I have not seen any latest MIUI (after 2.10.26) port for ARMv6 devices.
[Android Software Development] _polimorph_:
If one cannot manually start it for sure it will not work automatically.

I can't find NativeConverter.smali in framework.jar or services.jar. Do you have any ideea how can I find it without decompiling all the jars?

EDIT: I doubt it exists such a NativeConverter.smali file in the first place. It seems to me that the method missing is from a library or...?

EDIT2: It does exist: in core.jar, thanks :)