yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Lens_flare:
that thread is aimed on porting miui V4, all legacy miui discussion mostly forbidden.

odexed rom, deodex it first.
[Android Software Development] panhans:
I want to create a multi-language rom... but where can i find the language files in a MIUIv4 Rom? Even google couldn't help me. :( ty
[Android Software Development] v1r0x:
the language files are in the apks.

If you decompile a apk (using apktool), you'll get a "res" folder. In that folder is the "values" folder which contains the default strings. For every language there is a "values-xx" (if included). For germany it is "values-de".

For my port I'm using miuiandroids multi lang zip of my base v4 rom.

Replace all apps you want in /system/app

Decompile multi lang framework-res.apk and english/chinese v4 framework-res.apk

copy all missing folders from multi lang apk to english/chinese apk

recompile it
[Android Software Development] Lens_flare:
replacing framework-miui-res.apk would be enough ;p
[Android Software Development] v1r0x:
too easy! :D

what exactly contains the framework-miui-res?
[Android Software Development] Ozadroid:
Guys Help!!

I am porting MIUI. the ROM boots. after that the lockscreen appears. and below attachment is the log.

as i try to unlock, the lockscreen gets freezed and the log shows the following

I/AudioHardwareMSM72XX( 110): Enabling post proc features with mask 0x0000

I/NotifierManager( 192): onUnregister: miui.app.screenelement.NotifierManager$BatteryNotifier@4140a388

I/NotifierManager( 192): onUnregister: miui.app.screenelement.NotifierManager$VolumeChangedNotifier@412ceb48

I/RenderThread( 192): RenderThread stopped

I/AudioHardwareMSM72XX( 110): set device to SND_DEVICE_SPEAKER device_id=0

when the screen in freezed if i open the power menu it appears nd work well each operation is functionng in that.

and when in press the power button to turn the screen off it gets off n the normal lockscreen appears. but again wen i try to unlock it hangs.. this repeats itself.

also if i reboot the rom it wot bot again it gets stuck on the bootanimation.

any help wud b appriciated.. thx :)
[Android Software Development] Lens_flare:
of course it's not the only file to replace, all other your steps are ok. I just corrected exact one - 3rd. Now miuiandroid provides language packs, so it would be better to follow their architecture.

all language resources for miui-specific apk-s. All other resources are in framework-res.apk.

Found!

Package com.xiaomi.xmsf requires unavailable shared library miui-framework; failing!

etc/permissions/miui-framework.xml, find it.

also would be great to add /com.android.future.usb.accessory.jar
[Android Software Development] v1r0x:
yes, but if I change something in framework-res.apk and want translations for all strings in framework-res I have to add all values folders from multilang to en/chinese rom. Or not?

(or add changes to multilang framework-res ;) )

ok, thanks
[Android Software Development] Ozadroid:
thnx bro :)

i did it myself last night. its my first rom . n it boots just perfect now. m sooooooooooooooooooo happy :D
[Android Software Development] Rene_ajax:
Worst porting guide here.. No clear details about copy files from which rom.. And also not complete, u also have to add / replace serveral files from port to base. AND change updater script
[Android Software Development] shubhamchamaria:
Maybe you know better.... Try your hand and give us a better porting guide...this guide is perfect. ...just use the definitive FAQ by lens_flare to clear yourdoubts and problem ...
[Android Software Development] Ozadroid:
Dude u must b having a habbit of getting everything onto a silver platter. use ur mind.. i ported my first ever rom wid dis guide only in just 2 days wid no error !
[Android Software Development] shubhamchamaria:
Took my 20 mins to do so....

You are right ...some people just want to copy paste and want every single detail....
[Android Software Development] Lens_flare:
How great there are alternatives, right? :D

see my signature ;]
[Android Software Development] pratikmore:
08-04 12:41:29.978 E/GSM ( 2610): Wrong network type: 0

08-04 12:41:29.978 E/GSM ( 2610): Wrong network type: 0

08-04 12:41:30.075 E/GSM ( 2610): Exception in fetching EF_CSP data com.android.internal.telephony.IccFileNotFound

08-04 12:42:05.321 E/RILJ ( 2610): Exception processing unsol response: 11003Exception:java.lang.RuntimeException: Unrecognized unsol response: 11003

08-04 12:42:15.329 E/RILJ ( 2610): Exception processing unsol response: 11003Exception:java.lang.RuntimeException: Unrecognized unsol response: 11003

08-04 12:46:27.442 E/RILC ( 2279): invalid response length 16 expected 12

08-04 12:46:32.267 E/RILC ( 2279): RIL_onRequestComplete: invalid RIL_Token

08-04 12:46:35.532 E/RILJ ( 2610): Exception processing unsol response: 11001Exception:java.lang.RuntimeException: Unrecognized unsol response: 11001

08-04 12:46:56.895 E/RILJ ( 2610): Exception processing unsol response: 11001Exception:java.lang.RuntimeException: Unrecognized unsol response: 11001

08-04 12:48:53.713 E/RILJ ( 2610): Exception processing unsol response: 11003Exception:java.lang.RuntimeException: Unrecognized unsol response: 11003

08-04 12:49:03.407 E/RILJ ( 2610): Exception processing unsol response: 11003Exception:java.lang.RuntimeException: Unrecognized unsol response: 11003

08-04 12:49:35.420 E/RILJ ( 2610): Exception processing unsol response: 11001Exception:java.lang.RuntimeException: Unrecognized unsol response: 11001

Lens can you help me?
[Android Software Development] Lens_flare:
I already said what should you do. If you are not reading, I couldn't help much.
[Android Software Development] pratikmore:
I have changed ril.smali and after that i am getting this logcat.thats why i am asking,sorry for disturbing you everytime.
[Android Software Development] Lens_flare:
It's not enough, you should change also a PhoneFactory.smali and add ril class you use. Read carefuly.
[Android Software Development] pratikmore:
08-04 16:04:49.005 E/GSM ( 2694): Wrong network type: 0

08-04 16:04:49.005 E/GSM ( 2694): Wrong network type: 0

08-04 16:04:49.110 E/GSM ( 2694): Exception in fetching EF_CSP data com.android.internal.telephony.IccFileNotFound

08-04 16:05:53.251 E/RILJ ( 2694): Exception processing unsol response: 11003Exception:java.lang.RuntimeException: Unrecognized unsol response: 11003

08-04 16:06:09.024 E/RILJ ( 2694): Exception processing unsol response: 11003Exception:java.lang.RuntimeException: Unrecognized unsol response: 11003

08-04 16:06:34.970 E/RILJ ( 2694): Exception processing unsol response: 11003Exception:java.lang.RuntimeException: Unrecognized unsol response: 11003

I changed ril.smali and samsung ril.smali's all and phone factory.apk,after that i am getting this logcat.
[Android Software Development] Lens_flare:
add also Smdk4210RIL.smali ;[
[Android Software Development] pratikmore:
Where it is located?in same location?thanks
[Android Software Development] Lens_flare:
yeh, com/android/internal/telephony, framework.jar.
[Android Software Development] pratikmore:
There is semcRIL.smali.i have to change that smali?
[Android Software Development] Lens_flare:
oO

The only Smdk4210RIL contains a fix, so add it. And you should mod PhoneFactory.smai to use Smdk4210RIL insted of RIL. Consult with my guide(link in signature) for more details.
[Android Software Development] pratikmore:
Actually i am on cm7.2 not on cm9,so this fix will solved my problem?
[Android Software Development] chiragkrishna:
am stuck here,.. phone is not booting,... can somebody help:)

am using sgs III, base cm9 and miui android??

E/ ( 2396): fb_open: fb[0] open failed

E/ ( 2396): bool android::SecHdmi::create(int, int):Failed to open default FB

E/SecTVOutService( 2396): android::SecTVOutService::SecTVOutService()::mSecHdmi.create() fail

http://dl.dropbox.com/u/17514044/log.txt
[Android Software Development] DJBhardwaj:
H6ey g5uys!

I am trying this method to port on LG P500

I use a CM9 Base with miui rom from miui.us of device galaxy ace

now everything goes perfect until I make the first boot wh6ere i get bootloops on the miui boot animation

here is the logcat of the bootloop: http://pastebin.com/78c00sYe

could someone please look into this issue?

it would be really helpful, thanks in advance.
[Android Software Development] Lens_flare:
let's go to PM then.

it's not error you are looking for. That one:

I/dalvikvm( 3244): Could not find method miui.net.FirewallManager.checkAccessControl, referenced from method android.app.Activity.onResume

W/dalvikvm( 3244): VFY: unable to resolve static method 63832: Lmiui/net/FirewallManager;.checkAccessControl (Landroid/app/Activity;Landroid/content/ContentResolver;Ljava/lang/String;Landroid/content/pm/PackageManager;Landroid/app/IApplicationThread;Landroid/os/IBinder;Ljava/lang/String;)V

please return all apk on their places. Firewall too.

not the best choice.

error as follows

E/dalvikvm( 1877): ERROR: couldn't find native method
E/dalvikvm( 1877): Requested: Landroid/content/res/AssetManager;.splitThemePacka
ge:(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I
E/JNIHelp ( 1877): RegisterNatives failed for 'android/content/res/AssetManager'
, aborting

for fix see my signature.
[Android Software Development] DJBhardwaj:
I am just following your thread. But why isn't ace the best choice?
[Android Software Development] Lens_flare:
first of all miui.us additionally obfuscated their frameworks so that you might face a bad behaviour without any reason. Second one, device you choose might contain customisations you don't want to see in your build.

Best base - miuiandroid nexus S.
[Android Software Development] DJBhardwaj:
I was thinking of the same.

So, do I need to resize everything to MDPI?
[Android Software Development] chiragkrishna:
thanks very much for your reply,..:o

replaced all the apk,... same error is comming,...

i couldnt find firewall.apk,... :(
[Android Software Development] Lens_flare:
you should use all apk from miui, for now.

firewall.apk possibly is a monitor.apk.
[Android Software Development] chiragkrishna:
could not find monitor also,... so just used all the miui apk's

same log again,...

is there anythign else to fix this,...

edit:never mind,... fixed,...
[Android Software Development] Ozadroid:
bro that is not the only the error. u havent patched many smalis properly. first do that. flash again and repot wid the new log.
[Android Software Development] Sir Otto:
What do you mean with "patched"? I already merged those files with the base CM9 ones. And however, that error will remain, and I'm sure it's the only problem that doesn't allow the device to boot, because a lot of posts ago a person managed to make it boot despite those errors.
[Android Software Development] Ozadroid:
yes it may boot. but still if the log looks error free it looks good ;)

DexOpt: couldn't find field Landroid/content/res/AssetManager;.mThemeSupport

for errors like these.. u havent merged the 'fields' . do it!

and for this

E/JNIHelp ( 245): Native registration unable to find class 'com/android/server/NetworkManagementSocketTagger', aborting

put NetworkManagementSocketTagger*.smali from base to miui's 'framework.jar'

if it doesnt solve the problem report back.
[Android Software Development] frewys:
porting MIUI with Samsung base

I moved from my international Galaxy s2 to the at&t version of Galaxy s3 (hardly no development compared to the international *sigh*)and as the base for MIUI in both cases are Samsung and not AOSP and I wanted the framework of Samsung I wanted to know if this guide in theory could work before I started my little experiment.
[Android Software Development] Sir Otto:
The problem is that file already exist! And it's absolutely equal to base's one!

When you say to merge fields, you mean the lines that start with the writing ".field", don't you?

Tank you.
[Android Software Development] Ozadroid:
did u replace all the files wid the name 'NetworkManagementSocketTagger' ??

and yeah the .fields are missing. merge them aswell n u'll not see these errors :)
[Android Software Development] Lens_flare:
you have to deal with AssetManager.smali first.

copy all missing lines from base to miui version of this one. Diff tool[notepad++,winmerge,tcmd] will help. warning: don't del anything from miui file.

I doubt it will work..

I only know chinese are dealing with patchrom when porting their rom to other devices, so it might be a way to go for you
[Android Software Development] frewys:
Thanks! I really do not have the time but love MIUI so was thinking about doing it myself. First and last time I go off the international version.
[Android Software Development] Alex93917:
Hi guys !

I've a problem with signal strength. Signal status is only 0 or 2 bars. (No 1 No 3 No 4). I tried change RIL's* in framework.jar, but no change, and i tried change in bools.xml in framework-res.apk ...

No change.

How solve it ?!

Thanks !
[Android Software Development] Lens_flare:
replace

android/telephony/signalstrength*.smali at framework.jar
[Android Software Development] Alex93917:
No change.

And, i've an other problem :

Artefacts when i turn the screen. Absent in CM9.
[Android Software Development] Lens_flare:
play with these lines:

debug.sf.hw=1
debug.composition.type=mdp
debug.gr.numframebuffers=2
wui.render_dirty_regions=false
hwui.disable_vsync=true
hwui.print_config=choice
debug.enabletr=false
[Android Software Development] v1r0x:
I had to replace those files in framework.jar to fix this:

android.view.HardwareCanvas
android.view.HardwareRenderer$Gl20Renderer
android.view.HardwareRenderer$GlRenderer
android.view.HardwareRenderer
[Android Software Development] Alex93917:
It's fixed, thank you ! :)

Just always issue with signal strength network :'(

Edited : I've changed my base CM9, and signal strength is now Okay ! Fixed ! :) Thank you very much !
[Android Software Development] DJBhardwaj:
@Lens:

Here I try to fix this bug, known as Black Bar

https://www.dropbox.com/s/6u63tozthmj6xa9/Screenshot_2012-08-07-09-49-09.png

Now, It will be fixed by making changes in /values/res/drawables.xml

I make the changes successfully but while recompiling, I get this error

Note: I have already defined the following commands before decompiling MiuiSystemUI.apk

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\DJ>cd C:\Users\DJ\Desktop\NS Base\MIUI Jar

C:\Users\DJ\Desktop\NS Base\MIUI Jar>apktool b MiuiSystemUI MiuiSystemUI.n.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Users\DJ\Desktop\NS Base\MIUI Jar\MiuiSystem
UI\res/values-hugeui
invalid resource directory name: C:\Users\DJ\Desktop\NS Base\MIUI Jar\MiuiSystem
UI\res/values-zh-rCN-hugeui
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\DJ\AppData\Local\Temp\APKT
OOL198943147143395612.tmp, -I, C:\Users\DJ\apktool\framework\1.apk, -I, C:\Users
\DJ\apktool\framework\6.apk, -S, C:\Users\DJ\Desktop\NS Base\MIUI Jar\MiuiSystem
UI\res, -M, C:\Users\DJ\Desktop\NS Base\MIUI Jar\MiuiSystemUI\AndroidManifest.xm
l]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\DJ\AppData\Local\Temp\APKTOOL198943147143395612.tmp, -I, C:\Users\DJ\apktoo
l\framework\1.apk, -I, C:\Users\DJ\apktool\framework\6.apk, -S, C:\Users\DJ\Desk
top\NS Base\MIUI Jar\MiuiSystemUI\res, -M, C:\Users\DJ\Desktop\NS Base\MIUI Jar\
MiuiSystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more

C:\Users\DJ\Desktop\NS Base\MIUI Jar>

Could someone please help with this?
[Android Software Development] v1r0x:
maybe apktool has problems with spaces in path-names? but don't know

and which apktool you're using? 1.4.3?
[Android Software Development] DJBhardwaj:
deleted spaces, still the problem.

I remember, I downloaded modified apktool from cronna for miui.

If I am using wrong, please correct me :/
[Android Software Development] v1r0x:
I'm using a modified 1.4.2 for install framework (if) and decompile.

For recompile 1.4.3

maybe you have also wrong aapt?

Here is my apktool. Hope this one works.

apktool_1.4.2 = modified 1.4.2 (1.4.2.31)

apktool = 1.4.3
[Android Software Development] DJBhardwaj:
I use this on ICS apk's

Works flawlessly, but this can't even decompile.

Any other way to properly edit MiuiSystemUI.apk?
[Android Software Development] v1r0x:
maybe this one works?

http://xdaforums.com/showthread.php?p=28366939
[Android Software Development] Lens_flare:
I'm using Connor apktool, it worked always in following way:

-apktool if framework-res.apk

-apktool if framework-miui-res.apk

-apktool d [whatever apk you want]

-mod apk

-apktool b [ the same apk folder]

-add resources.arsc to original archive(with store compression if on windows)

I also had to use aapt from android sdk with ics update
[Android Software Development] DJBhardwaj:
I will try this tomorrow morning, late in here.

Thanks mate.
[Android Software Development] DJBhardwaj:
Gives the same error :(
[Android Software Development] cowsquad:
Do you wanna try this apktool version?

http://xdaforums.com/showthread.php?t=1755243

Let us how it goes :)
[Android Software Development] DJBhardwaj:
Solved yesterday, just had to delete some useless folders.

Used corrona's apktool for MIUI.

Thanks for lending a hand ;)
[Android Software Development] Wajk:
Hi, i have one problem with 2.8.10 MIUI port.

Everything work (MIUI apps and others) except File Explorer.

(I tried porting this app from differents device and I tried older version, but not working)

MiFile Explorer working very well.

Anybody have some idea what's wrong?

I get this FC message:

thnx!
[Android Software Development] Lens_flare:
it might mean that miuiandroid failed on that.
[Android Software Development] Wajk:
i don't think so. i think not working just for me. I tried 2.7.27 port too and still have FC. I think i forgot something. Something what don't need before.
[Android Software Development] Lens_flare:
then make a full log, we'll see
[Android Software Development] Wajk:
thnx, I had problem with framework-res. I recompiled again from source, and problem was gone.... ;)

(i wrote it, if any other user get similar bug.)
[Android Software Development] riteshbendre:
Stuck at BootScreen... please help

Ok guyz.. m trying to port

MIUI - Jelly Bean ROM from (Nexus S) to Desire HD but I am stuck at the boot screen ....

Logcat attached

I/ServiceManager( (1458): : service 'media.audio_flinger' died
I/ServiceManager( (1458): : service 'media.player' died
I/ServiceManager( (1458): : service 'media.camera' died
[Android Software Development] DJBhardwaj:
2nd post of this thread, is your answer : http://xdaforums.com/showthread.php?t=1777999

You have to decompile framework.jar, open android/content/res/assetmanager.smali

Patch the smali with reference to the assetmanager.smali of your base JB rom
[Android Software Development] riteshbendre:
Woah.. that was a "quick reply" .. :)

But can you please elaborate how to decompile "framework.jar" ?? Use APKTOOL or some other software?? A guide or a step by step tutorial on how to do that would be great ...

and Thanks Again :D
[Android Software Development] DJBhardwaj:
Read and understand the thread I linked you to. It has every answer that you seek.

Use this modified apktool.jar : http://connortumbleson.com/apktool-v1-4-5-a-tool-for-reverse-engineering-apk-files/

and aapt.exe and apktool.bar from: http://code.google.com/p/android-apktool/
[Android Software Development] gmp009:
Every thing is just working fine for me but when i just try to on my wifi it always says to me turning wifi on but it wont on it just hang there phone is working bluetooth is also working but wifi have problem plz guys help me out MIUI 2.8.17 Sony Ericsson Live with walkman!
[Android Software Development] Lens_flare:
make sure you installed also wifi modules(should be on your base at last), as xperia devs prefer to put them separately.
[Android Software Development] blatecktonik:
I have a little problem, I hope someone can help me, turns out that once made the port does everything but the buttons tactile or physical, was for a LG Optimus Black, wifi bluethoot, ...works, but the keys anything, could someone help me? Or changing the folder keylayout and Keychars.. I hope help and thanks
[Android Software Development] gmp009:
Where can i get these modules?? I mean in base wifi works but when i convert my base into miui wifi wont

Work...
[Android Software Development] paxChristos:
Try keeping /system/lib/module from your base rom, that's where kernel modules are normally kept.

Pax
[Android Software Development] Lens_flare:
have you changed inputManager*.smali at services.jar?
[Android Software Development] gmp009:
Dude they are on their place i Havant touch them so, why they are creating problem for me.....!
[Android Software Development] Lens_flare:
dump living system folder from cm and you'll see they are not :]
[Android Software Development] rukin5197:
Hmm... with the one that out did with the logcat, try tinkering with the libandroid_runtime.so. like try putting in the original and stuff like that. In my port, if I put in the libandroid run time from the miui it wouldnt boot.
[Android Software Development] sacpe25:
cant find content-types.properties in libs.

Thanks in advance.
[Android Software Development] pricey2009:
I have already created MIUIv4 for Xperia Play :)
[Android Software Development] ZduneX25:
@gannon5197 yes it was this file libandroid_runtime.so ;)

@pricey2009 it's done :) I got support from Ray dev and it's working well :)

Screen: http://img855.imageshack.us/img855/3126/miuiv4.png
[Android Software Development] DJBhardwaj:
Guys, whats the solution for data not loading ?
[Android Software Development] savior333:
good idea.It can make my phone works.Thanks.
[Android Software Development] riteshbendre:
hey @proxyuser

i have two devices DHD and Optimus Black.. so .. is it possible to port MIUI 4 or CM9 to OB ??
[Android Software Development] bdawg31:
I think I may be of service.
[Android Software Development] oluwaponmile:
It was stated to use cm9 or AOSP, can I use AOKP as base? I am trying to use latest Lords as base but it is an AOKP and phone won't boot.

Any help will be appreciated.

Cheers
[Android Software Development] Pasquale91fg:
It can be used to bring the CM7 MIUI 2.3?

I want Miuiv3 !!!! no Miui v4 !!!!
[Android Software Development] cowsquad:
There are plenty miui.us v3 out there. What device do you have?
[Android Software Development] donjamal:
i want it too.. got lg p970
[Android Software Development] xinos:
Hey,

I tried porting youre MIUI v4 2.3.16 for desire S to my desire HD using both the icecoldsandwich of lordclockan and youre previous MIUI v4 2.2.7 for desire HD both get to the boot screen but start looping from then. Any suggestions to what i'm doeing wrong?

Thanks.
[Android Software Development] KemikalElite:
I ported MIUI to the T-Mobile Samsung Exhibit 2 and most core functions of the ROM work except there's an issue with the display messing up and turning to static and everything on the screen gets distorted with things like Transparent UI effects, video playback, and when adjusting the brightness level.

I'm guessing its some sort of graphics or hardware acceleration issue.

http://xdaforums.com/showthread.php?p=23862016

That's the ROM thread. Any ideas?
[Android Software Development] cowsquad:
Hos did you manage to port it? Do you mind sharing your steps? Pm me