yashsingh1/xdaforums huggingface dataset:
[Android Software Development] NeveHanter:
I'm porting MIUI 3.2.8 ( from Maguro "Galaxy Nexus" ) for Xperia X8 with MSM7227 ( ARMv6 ) SoC with MiniCM10-nightly ( CM10 Android 4.1.2 ) as a base.

Any way to have:

/system/xbin/shelld
/system/lib/libshell.so
/system/lib/libshell_jni.so
/system/lib/libshellservice.so

working on ARMv6??

Cannot find any sources of them on the web.

I get SIGILL's and interrupts, MIUIHome crashing, themes also.

shelld service added in ramdisk init.rc script, libs & shelld are on their places, but it doesn't work at all

And I have problem with boot the phone when SIM card is inserted, it get bootloop until I take out SIM card, I have copied all RILs corresponding to my base, and changed RIL to SemcRIL and it doesn't boot.

FC of nearly all the time:

android.process.acore ( this one is crashing nearly all the apps )
android.process.gapps

I attach logcat from phone boot to some usage ( without SIM card ) and radio logcat ( with SIM card ) into .tar archive because logcat was too big to post it as .txt

View attachment logs.tar
[Android Software Development] CosmicDan:
Get a new phone dude. MIUI never supported ARMv6 nor MDPI devices.
[Android Software Development] NeveHanter:
And that's all what I can do? MIUI was working on ARMv6 but only before shelld was introduced ( I think it will be every one MIUI before ICS ), so I thought that someone had access to the sources and could try to compile shelld and it's libs for ARMv6 or something.

And so where the hell are sources of shelld and it's libs?? If MIUI opened source, they should released that stuff somewhere?
[Android Software Development] CosmicDan:
MIUI is not opensource, only parts of it are.

Use an old Launcher APK and remove shelld.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] ZduneX25:
Done, problems solved.
[Android Software Development] sorullo_xgrx:
There is a line inside update-script that you need to add to your.. its something like set_perm (0, 2000, 0755, "/system/xbin/shelld");

Maybe adding that line would help.
[Android Software Development] Rempty:
Hi. i have a problem with bandwith controller like this

Plz any solution, my devices is Xperia x10 mini pro, is a armv6 device
[Android Software Development] defcomg:
Bootloop on LG P920 Stock ICS 4.0.4 used Patchrom used Phone Mms Telephony folders from Lu6200 i patched it fixed the Rejects bootlooping i have attached the Logs.

Any help would be cool

Moved Android/Widget Folder to Framework2.jar
[Android Software Development] :
So here's a short tutorial on how to fix Shelld issues with boot.img edits.

Requirements:

Android Image Kitchen

Notepad++

Implementing shelld

1) Move 'Shelld' to /Xbin

2) Move libshell.so libshell_jni.so and libshellservice.so to /lib

3) take the roms Boot.img and place it in your Image Kitchen folder

4) Drag your 'Boot.img' onto the 'Unpackimg' script to unpack the image

5) Open 'Ramdisk'

6) open init.rc in notepad++

7) add:

at the very end of the file, uniform with the other service entries.

Make sure the code looks exactly like that, 4 spaces before 'class main' and press enter right after 'main', make sure the 'new line' after class main doesn't begin 4 spaces out, if it does simply backspace 4 times.

8 ) Save the file, and then run 'Repackimg', No need to drag anything on top of it, just run it

9 ) rename the 'image-new' file created to boot.img and place it in your MIUI rom folder

10 ) Profit, Shelld will now be called and work correctly

I believe this also works on MDPI devices as long as they are compatible with a MDPI base to port from
[Android Software Development] Alex93917:
I've no GPS on MIUI JB. Here is a logcat. Someone can see it ?

Thank you :o
[Android Software Development] Rempty:
Anyone tested if shelld work on armv6 devices
[Android Software Development] stelios97:
i tested and it didn't!
[Android Software Development] Red Devil:
Meanwhile miui v5 released ! Based on jellybean 4.1.2... anyone managed a port yet ?
[Android Software Development] CosmicDan:
I've gotten boot logo, that's it so far. MI2 framework is extremely different from my pure AOSP 4.1.2 build, will take a few days for me to patch framework alone.
[Android Software Development] _polimorph_:
Actually it's 4.1.1 based...

I'm also into porting it to Samsung Galaxy SIII (i9300) and I'm sure I want you arround these days, Dan ;)

For start what have you encountered until now different from Lens's guide?
[Android Software Development] CosmicDan:
I'm not following it, I do it all from scratch examining exceptions and resolving them one by one. Tedious, especially since I'm on AOSP 4.1.2. Could take weeks at this rate, if it'll ever work... too soon to say if it will or if I'll be better off waiting for a Nexus MIUI5.
[Android Software Development] ZduneX25:
@CosmicDan is there any common sense to try to build it with miui jb patchrom using all apks and known libs from miuiv5 for me-two then follow logcat to see what are jar files missing?

my patchrom jb base is aosp 4.1.2 and miuiv5 bases on aosp as well, just curious and you have better knowledge
[Android Software Development] iBotPeaches:
I recommend only those who've worked with MIUI at the high level or are highly trained even attempt to port MIUI v5 from the M2 to other devices. You are entering a world of hell if you try.
[Android Software Development] CosmicDan:
^ What Lord iBot said :p

I recently succeeded in porting MIUI GB to a *stock* based GB ROM (not CM7), I don't know of anybody else who ever did that. It took about 2 weeks, probably 80 hours of work. This will be much more difficult.

While my rank only says I'm a Senior Member, I do have a lot of experience with Android ROM and kernel development. With that said, if I get the MIUI5 port to a decent state, depending on how complicated the process was I might open up a guide. But I still think a Guide/FAQ would be best made when the Nexus builds are out.

P.S. RAMDisk in kernel needs changes too.
[Android Software Development] ---UFO---:
Yes, just change framework2.jar to framework_ext.jar in init.rc

It has solved some errors for me.

But I'm stucked on another error:

03-01 18:32:23.835: E/JNIHelp(2216): Native registration unable to find class 'com/android/server/NetworkManagementSocketTagger', aborting
03-01 18:32:23.835: A/libc(2216): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 2216 (zygote)

But I have file NetworkManagementSocketTagger in com/android/server and it is the same as in CM10 base.
[Android Software Development] CosmicDan:
These errors are impossible to fix, it means you're doing it wrong. It could be any constant anywhere in the framework that doesn't match the native code from your base ROM. Same thing happened to me when building MIUI-GB on a stock base.

You need to take a different approach. Use all framework JAR's from your working JB-AOSP ROM but use MIUI framework-*.apk files. Then boot. You will get a bunch load of errors about wrong/missing methods, and resource ID's will be mismatched. Resolving the method errors is the easy part, one by one you need to diff the smali code and slowly merge in MIUI changes.

What follows that is whenever you see 0x1******, these are resource ID's that differ between the base and MIUI framework-res.apk. Basically, you have to compare every single smali file and update the resource values. Otherwise all sorts of bad things will happen - like random words and graphics where they shouldn't be (if it even boots).

In my envionment I usually have three folders in my work folder:

/framework_miui/: The stock MIUI framework decompiled
/framework_stock/: The base ROM for my device's framework decompile
/framework_current/: The current framework I'm using to boot/push to the device.

The framework_current folder will, at first be an exact copy of the framework_stock decompiled. Not including the APK's of course, as I said before - only the JAR's. So I diff the framework_miui with framework_current to easily merge in code changes - and I keep the framework_stock as another source to compare from in the event I made a mistake or otherwise need to revert/reimplement something that my base needs.

framework_stock is also important to keep as a reference, because sometimes you will have to create a hybrid method or "wrapper" method - at worst case even write your own smali methods from scratch (I had to write two methods for MIUI-GB on stock) - to simulate the lack of a native method that MIUI depends on. I won't cover this here since it requires a good knowledge of smali and the caveats/specifics of your own device. I for example know the Xperia 2011 SemcRIL/telephony framework like the back of my hand :p

Oh - if your device is not a Qualcomm Snapdragon, you will probably have no luck porting from Mi2. I have an Snapdragon S2 (msm-7x30) which is significantly older and inferior to the Mi-2 SoC, but I still think that I'll get somewhere within a few weeks. I noticed you run a Milestone 2 which is not Qualcomm - so I have no idea if it will ever be possible for you at this stage. As I said, this will take me weeks - and if I had your device it'd probably take me months - possibly never. Sorry.
[Android Software Development] ---UFO---:
Thanks.

I was always porting MIUI from Galaxy Nexus S, or Galaxy Nexus, which have similar CPU as mine.

I think I should wait until some of these devices get MIUIv5.

But I will try again with your approach if i have some free time.
[Android Software Development] _polimorph_:
How's going guys, anyone succeeded to boot MIUI v5? Any special techniques to use, besides Ramdisk modding?
[Android Software Development] CosmicDan:
Yes I have it working mostly, I have a qualcomm device so with some skill it is possible. Still buggy in many places and took a lot of smali coding.

Download the ROM from the thread in my sig and diff it with the MIUIAndroid.com release if you want to see the extensiveness involved. It'll be much better to wait for Nexus builds before I can recommend anyone try.
[Android Software Development] gold-concert:
Friends! I beg you to help.Ported MIUI.

There are some problems:

1. If you are in flight mode - the phone works. If you turn off airplane mode, the network appears, even data transfer works, but always restarts the phone. Every 2-3 seconds.

2. no sound

3. FC constantly Applications Home and Themes.Please help.
[Android Software Development] CosmicDan:
No idea sorry. Never had that error.

Sent from Xperia Play (R800a) running MIUI5 with Tapatalk
[Android Software Development] Jaapp:
I got MIUIv5 booting on Xperia S until the latest moment where 'starting apps' displays. Miui.shell can't be started. I started shelld through kernel and boot didn't come as far this time. Got following error:

E/ShellService( 202): failed to run for chain in `iptables -L | grep "^Chain miui_" | awk '{print $2}'`; do iptables -D OUTPUT `iptables -S OUTPUT | awk -v chain=${chain} '$6==chain {print NR-2}'`; iptables -F $chain; iptables -X $chain; done;: the command is too long
W/dalvikvm( 433): No implementation found for native Landroid/net/FeatureConfig;.isEnabled:(I)Z
F/SystemServer( 433): BOOT FAILURE starting Connectivity Service
F/SystemServer( 433): java.lang.UnsatisfiedLinkError: Native method not found: android.net.FeatureConfig.isEnabled:(I)Z
F/SystemServer( 433):	at android.net.FeatureConfig.isEnabled(Native Method)
F/SystemServer( 433):	at com.android.server.ConnectivityService.isCneAware(ConnectivityService.java:3328)
F/SystemServer( 433):	at com.android.server.ConnectivityService.<init>(ConnectivityService.java:427)
F/SystemServer( 433):	at com.android.server.ServerThread.run(SystemServer.java:437)
W/SystemServer( 433): ***********************************************

Any suggestions?
[Android Software Development] CosmicDan:
You guys are getting errors I never had. If you're using CM10 as a base, that's why. It will be much harder. I'm using my own AOSP built from source.
[Android Software Development] blackwing182:
I think people would say that this is stupid or something, but i got MIUIv5 Camera from Aries(MI2) working on my MIUIandroid 3.2.22 Port for HTC One S.

video works, panoramaworks, front facecamera works, camera filters works, cam flash works, only settings wont work, i get a force close on it.

any tip?
[Android Software Development] CosmicDan:
I can't help, Xperia 2011 devices can only use Legacy Camera on Jellybean.
[Android Software Development] _polimorph_:
Ok, I spent all day porting to AOSP and again it's so darn close to a full boot, but errors pop up. Debugging shows something pretty similar to what CM10 port used to:

http://pastebin.com/f7QczQ1c

It's so close...
[Android Software Development] CosmicDan:
at com.android.server.ConnectivityService$RadioAttributes.<init>(ConnectivityService.java:319)

Looks like you'll need to import ConnectivityService$RadioAttributes.smali from AOSP. If you did that already, the resource ID's are wrong e.g. 0x1...... need to change id to match new framework resources. Compare all 0x1...... matches to your AOSP framework-res, then find the name in miui framework-res public.xml and update id in smali.
[Android Software Development] lozohcum:
Here you have online tool which finds differences in code, it compate them and show the differences, it's great for diffing:

http://www.quickdiff.com/

I followed whole tutorial but my port doesn't boot, it stuck on MIUI logo :(

I am tired of this, no mather what I try, it doesn't work
[Android Software Development] munjeni:
Any one have workaround for this:

How MIUI AntiSpam handle ://firewall/log ...where is these firewall log stored?? Many thanks for any help!
[Android Software Development] lozohcum:
Odp: [GUIDE][ICS/JB/common] Definitive FAQ for newest miui porting

Can I port MIUI and take AOKP as base?

I want to port on JB, wich MIUI i should choose?

I have Xperia J with stock JB but there is also well working AOKPJB
[Android Software Development] spydertony:
Bootloop

I am trying to port MIUI JB to lg optimus l5 with CM10 as base. I did everything but i get bootloop. This is the logcat:
[Android Software Development] LegibleEel:
i think its has something to do with this...

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

Refer back to the OP about the PowerManagerService or 'PMS' in the Services.jar, it clearly says how to solve :)
[Android Software Development] spydertony:
powermanagerservice error

I am supposed to diff nativecpuboost to miui and i guess i'm maing a mistake in it. any suggestions or guidance would help :)
[Android Software Development] lozohcum:
Can anyone give me a link for proper version of apktool for JB MIUI?

My port Boots but I have instant "process.com.android.phone has stopped" error so I can't do nothing. Do you know how to fix it?
[Android Software Development] Rempty:
@lozohcum

Use the RIL from your base. Read the 2th post.
[Android Software Development] sorullo_xgrx:
Guys help please I have successfully port vivo miui ROM to the thunderbolt with calls and text but NO DATA, no 1x, 3g or 4G. I have replace Ril. Modify some framework smali with no luck.. Please anyone with more experience could help me. Thanks I'm advance

Look cm10.1 on my T2
[Android Software Development] LegibleEel:
Logcat please
[Android Software Development] ZduneX25:
Anyone lucky to port miui v5 with patchrom? Sources are online, but i stuck on selecting language (welcome screen) from this place the next button gives me a reboot, framework/frameowkr2 jar fault, but patching had no hunks it was clean..

logcat: http://pastebin.com/3Zd8seQw
[Android Software Development] lozohcum:
You are talking about smail. files yes?

I copied RILs from base rom and rild file from bin folder but it doesn't help.

I also edited mentioned smail.s but still same error, phone FC all the time

Here is the logat

Please help me
[Android Software Development] martirio3000:
shouldnt this disable your welcome screen if you add it to build.prop

ro.setupwizard.mode=DISABLED
[Android Software Development] Rempty:
@Lozochum

On internal/telephony/

Need copy this from base ROM SonyQualcommRIL7x27a

---------- Post added at 11:38 AM ---------- Previous post was at 11:33 AM ----------

@ZduneX25

First at all you have a problem with your ril class, cant found a class, try to fix this. You specified on build.prop your ril?
[Android Software Development] lozohcum:
Odp: [GUIDE][ICS/JB/common] Definitive FAQ for newest miui porting

I copied those files but it didn't help, I tried Also with replacing whole telephony folder but no result
[Android Software Development] ZduneX25:
@Rempty if you mean 'phone poilcy class' this is not a problem i know how to fix it i just decided to leave it until i will be able to get to homescreen, this shows when i try to go anywhere beyond welcome screen: com.miui.internal.v5.widget.ActionBarContainer.getActionBarView:()V from class com.miui.internal.v5.widget.ActionBarContainer, but it tells me nothing cause my ActionBarContainer.smali looks fine comparing to other devices miuiv5
[Android Software Development] lozohcum:
I started it again and it's working but with one problem.

After first boot GSM worked but now it says "no sim-card" and "please instert proper sim card"

any ideas?
[Android Software Development] Rempty:
Do you modified provision.apk for evade sim detection??
[Android Software Development] nicsptl:
Damn Man, I am trying to port MIUI 3.2.22 latest CM10 to HP touchpad from Nexus7 and getting same error of any one any idea or solution ??

Log :: http://pastebin.com/PgHaGcNK
[Android Software Development] LegibleEel:
Hay man, I think this is your problem...

E/dalvikvm( 159): Requested: Landroid/content/res/AssetManager;.splitThemePackage:(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I
E/JNIHelp ( 159): RegisterNatives failed for 'android/content/res/AssetManager', aborting
F/libc ( 159): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 159 (zygote)

Diff the assetmanager.smali with your cm10 accordingly. :)

Hope this helps.
[Android Software Development] ZduneX25:
I fixed: E/AndroidRuntime(684): java.lang.IllegalAccessError: tried to access method com.miui.internal.v5.widget.ActionBarContainer.getActionBarView:()V from class com.miui.internal.v5.widget.ActionBarContainer
[Android Software Development] Rempty:
@ZduneX25

Great work man. Congratulations.
[Android Software Development] defcomg:
Do you have miui folder on the root of either framework.jar or framework2.jar what i did was add it to framework2 as i got the Method Index Error think thats why you boot looping
[Android Software Development] sorullo_xgrx:
I'm having some weird issues, mobile operator name or phone number doesn't show up on phone status in settings, but it shows on the status bar. How could I get the name and number appear in settings phone status. Thanks in advance

Look cm10.1 on my T2
[Android Software Development] MezManiac:
now that there are some miui v5 builds out... nexus, s2, etc. is there a simpler process to port. I'm trying to port this to the fascinate and running into a bunch of errors. help?!

in addition to this guide, is there anything else that needs to be done to get past boot?
[Android Software Development] MezManiac:
heres the logcat of the boot loop. i think there are only a few errors
[Android Software Development] Rempty:
@MezManiac

use libandroidruntime.so from MIUI rom
[Android Software Development] _polimorph_:
There might be minor differences from one device to another. I only port from Galaxy Nexus builds. They're closer to my framework, code wise.

For instance if porting to AOSP 4.1 base for Galaxy S3 (i9300) I'm comparing every time I port these smalis. If there are differences I copy each file from AOSP base to port:

[B]framework.jar:[/B]
android/bluetooth/HeadsetBase*.smali
android/content/res/PackageRedirectionMap*.smali
(android/graphics/Paint.smali)
android/hardware/Camera*.smali
android/media/AudioFormat.smali
(android/net/wifi/WifiNative.smali)
(android/os/Environment.smali)
android/os/SystemProperties.smali
android/server/BluetoothA2dpService*.smali
android/view/Gles20*.smali (not only canvas but all with gles20 at the beginning)
android/view/HardwareCanvas.smali
android/view/HardwareRenderer*.smali
(android/webkit/HTML5*.smali) - if using libwebcore.so from CM,
(android/webkit/WebView*.smali) – if using libwebcore.so from CM,
com/android/internal/app/ActivityTrigger
com/android/internal/telephony/BaseCommands.smali
com/android/internal/telephony/PhoneFactory.smali
(org/codeaurora/Power.smali)
com/android/internal/telephony/RIL*.smali
com/android/internal/telephony/Smdk4210RIL*.smali (or proprietary RIL corespondents)

[B]services.jar:[/B]
/smali/com/android/server/InputManager*.smali

After copying the smalis I diff the rest of them as described in the guide.

EDIT: one other thing that's different in MIUIv5 is the missing invoke-as and shelld files, so you won't need to deal with the operations needed for them. Also for the themes to work you need to copy after the first boot (don't do it from the begining) from MIUI build to your port the /system/bin/installd file.

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

Did you diffed SystemProperties.smali? If not, go and compare it with the base and if there are differences just copy the whole file from CM or AOSP to your port. Recompile and back to debugging ;)

It's improbable it will boot anymore with the newer MIUI versions. That was the case with GB MIUI.

---------- Post added at 07:55 PM ---------- Previous post was at 07:34 PM ----------

Has anyone tried to port MIUI v4 or MIUI v5 to an AOSP 4.2.x base? I have failed to do so. The last time I checked I stumbled upon a "no implementation" error which (I think) could only be solved by hex editing a library. And that I don't know how to do it.

So any feedback guys, did you tried to port to 4.2.x, could it be even possible?
[Android Software Development] Rempty:
@_polimorph_

If i use a MIUI based on CM10 and port to other CM10 rom, work using the libandroidruntime.so. (tested with MIUI v5 3.3.29 beta 2 for ARC S)

I tested and work 100%.
[Android Software Development] hepi_hape:
Finally i see detailed miui porting

if i can ask, sory im first trying to port :D

My device is galaxy W and i use galaxy nexus S as source (2.8.10 update, the last ics miui) miui isn't right ?

i can't get old (2.8.10 nexus S) rom from here : weedy.ca/miuiandroid

where i can get the 2.8.10 ?

I have some friend using galaxy s2 and he used miui update 3.2.22 but it still use 4.0.4 ?? I think uper version of 2.8.10 is using JB...

Thx for the reply :)
[Android Software Development] Rempty:
Last ICS MIUI is 3.2.22
[Android Software Development] hepi_hape:
Yeah thx. I still like cm9 base. :D

are you have some reference link for download old miui rom, specialy nexus S < older porter for galaxy W always use from nexus s

Again, very well thank you :)
[Android Software Development] lozohcum:
Everytime I port any MIUI after it boot and I enter PIN code there is the second blank field and it says "Enter code for network unlock" sth like that
[Android Software Development] ZduneX25:
@lozohcum then you press 'dismiss'
[Android Software Development] _polimorph_:
You might want to check this mirror:

http://goo.im/devs/ibotpeaches/miuiandroid/releases/
[Android Software Development] hepi_hape:
Bookmarked .. :good: :good: :good:

Very well thank you sir

btw, i have downloaded 3.3.30 mulit lang, but the file just only 3 folder app, framework and media. there is no font. is there i can get from older version (3.2.22)

starting download 3.3.29 :laugh: . for reference

btw, there is update.zip on 3.3.29 folder on goo.im, what's is for ?
[Android Software Development] Rempty:
@lozohcum

Decompile Phone.apk

Go to res/values/bools.xml

Modify sim ignore network events and change false to true.
[Android Software Development] zoldyck:
Can someone give me apktool that compatible with MIUI v5?

when I recompile Phone.apk after fix Mute call I get bruuuuutt
[Android Software Development] sandy7:
Try updating the aapt of apk tool