yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Lens_flare:
Don't work on it with root ;]

bin should be located at your home/[username]
[Android Software Development] firered365:
Ok I see it! I didn't see that!

Edit: Still get after extraction apktool.yml.
[Android Software Development] DJBhardwaj:
USB should work.

Try if it works via recovery. If it still doesn't, then I am sure that you are missing appropriate drivers.
[Android Software Development] Hikari:
its not driver issue. it does via recovery.. and also with other roms...(during boot too)
[Android Software Development] Lens_flare:
so it's something to do with usb subsystem, I'm not excluding something changed in that.
[Android Software Development] DJBhardwaj:
Believe me, I didn't touch any USB smali and USB Subsystem works for me flawlessly. And I used NEXUS S MIUI as target.
[Android Software Development] Hikari:
My case is just pure non-sense.. I tried porting first time using nexus s release.. got it booting up from first trial, everything was working(including usb subsystem) then I went and wiped data.. that was the time I got the bootloop and since then Im trying to make it boot again without any success...
[Android Software Development] Lens_flare:
remember what necessary could be in data, maybe config?
[Android Software Development] Hikari:
I really dont know, my second build MIUIv4 port has this kind of an issue too, wiped data will prevent it from booting. it needs to be installed on the first build.. for some reason...

---------- Post added at 05:53 PM ---------- Previous post was at 05:28 PM ----------

I left MIUI JB aside for some time.. Im working on MIUI gb port. but from ARMv7 so again I need to mod smalis..

Anyways, I got until here by fixing the smalis shown by logcat, but what about this one? where can I find it?

08-22 16:48:05.711: E/dalvikvm(2083): Class lookup Ljava/lang/NoSuchFieldError; attempted while exception Ljava/lang/NoSuchMethodError; pending

EDIT: I found the smali in core.jar

EDIT: Both the base and the miui one are same! :confused:
[Android Software Development] firered365:
I found the problem. When I try to extract framework.jar in apktool, all it does is I: Copying assets and libs... and nothing else.

Edit: I was able to find the reason. Here is what I got for framework.jar:

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Cannot find file or directory "C:\Users\sandra\Desktop\LOL\out\framework\smali"
at org.jf.smali.main.main(main.java:184)

Here is services.jar:

Can't find the file C:\Users\sandra\Desktop\LOL\out\services\classes.dex
The system cannot find the file specified.
Could Not Find C:\Users\sandra\Desktop\LOL\out\services\classes.dex
[Android Software Development] Hikari:
Its me again.. This is the log from my second build of miui v4(bootloop).. I think its the same issue with miui jb..

I think there is a recompilation error, but I have no idea which apk or jar.. Any help? Thanks!
[Android Software Development] jimbo77:
Thanks for the awesome Thread!

I succeded at porting MIUI v5 to my SGS3 using CM10 as base... Everything works for me EXCEPT the phone is not recognizing my External SD Card...

The phone only sees the internal storage device, Any clue about what the issue might be?

I don't know how to logcat the issue since there is no FC's or anything related...

BTW I used Galaxy Nexus as MIUI base for porting...

Any help will be greatly appreciatted! :D
[Android Software Development] v1r0x:
Ok, now I can skip songs :)

I'm not sure what works and what not, so here what's working on my phone:

If music is playing and locked normal press VolUp does nothing. VolDown works normal. Long Press VolUp/VolDown skips to next track.

You have the same functionality?

And thanks :)

I'll look into it the next days and try to fix your good work to get a full mod

This is a new jb bug. Afaik there is no solution yet.
[Android Software Development] droidhd:
Hey guys, I need a bit of your expert help too :)

Since DHD MIUI section started with porting on JB (since 2.8.17), i decided to make my own port of 2.8.17 to ICS.

My main base is LCs Ice Cold Sandwich 8.5 - AOKP

My MIUI base is Desire S from miuiandroid.

Now, with super (from miui.us), we managed to fix all assetmanager errors. The real problem started here:

in attachment there is also my logcat, if someone could help me with this... i spent all my day on fixing so many errors within boot loading, now here I am really stuck :/
[Android Software Development] DJBhardwaj:
Try replacing Sqlite*.smali tree from base to MIUI in framework.jar/ android/database/sqlite
[Android Software Development] CosmicDan:
Yes, I already said that :P Good luck! I spent an hour just making it so VolUp does nothing instead of working as VolDown. It's all messed up lol.

Looks like you are starting to learn your logcat errors, well done :D
[Android Software Development] DJBhardwaj:
All the thanks to you and lens.

Ohh Btw the mic is not working in my JB MIUI. I know the fix is stated in first post but when I decompile and open bools.xml, I don't find this line to be modified:

<bool name="send_mic_mute_to_AudioManager">false</bool>
[Android Software Development] CosmicDan:
That's a bummer.... mic already works for me :( maybe you will have to do a full "find in files" for "mic" (with Notepad++) on all xml files... that will take a long time and a lot of experimentation though :confused: maybe the variable name just changed in JB builds....
[Android Software Development] CosmicDan:
I don't need to compare, I never modified it. The mic always worked for the Xperia line on MIUI4/ICS.

LOL @ "config_annoy_dianne"... typical Google!

I really don't know man, there is no value there to suggest anything else. Best I can suggest is to make sure you are using 100% original CM10 libs/* and libs/hw/* and also 100% original CM10 /etc/* (especially audio_policy.conf).

Failing that, you'd have to examine and compare the logcats between original CM10 and your port - particularly the audio hardware logs, to see what is and isn't being connected/loaded. Maybe also compare logs when making a call.

Failing that, decompile the entire CM10 jar framework and do a search for smali files that have "audio" or "mic" in their name and start randomly copying/replacing them. That's what I'd do. And I'm damn thankful I don't have this issue because I really have no idea. Sorry!
[Android Software Development] DJBhardwaj:
Thanks. But genuinely speaking, I've got to stop this port since its and MDPI device and becomes laggy on JB. It has too many bugs. So I will wait till I get a new device to port MIUI to.
[Android Software Development] CosmicDan:
JB is laggy on mine too, in design it's supposed to be more efficient than ICS. But I think the problem is that Jellybean does GPU rendering and needs tipple buffering, so low and mid-range devices with weak GPU's seem to struggle a bit (my Xperia Play has an Adreno 205).

Or, it's just because CM10 is still very immature.

For me, the new JB MIUI is actually more stable and less buggy than my previous CM9-based ports. I had to hack the framework a lot to get text and calls working, and I could never fix GPS. With CM10, it all works already.
[Android Software Development] v1r0x:
I wasn't sure if I understood your post right. :D

I think JB works better and most time smoother than ICS. I have only sometimes short lags.

I don't know which GPU my device has, but I don't think it's good :D
[Android Software Development] Ozadroid:
try adding the line if its not dere :P
[Android Software Development] Lens_flare:
I clearly stated it is in Phone.apk :D
[Android Software Development] CosmicDan:
Lol.... whoops!

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] droidhd:
Hey DJoptimus-One, thank you for your respond. But did you mean, to replace all files from SQLiteAbortException.smali -> SqliteWrapper.smali?

Sorry for such a stupid questions, but this is my first time porting rom and I basiclly started to learn like 3 or 4 days ago... :D
[Android Software Development] DJBhardwaj:
Nims11(GA miui.us dev) also told me the same.

But guys, do you think that I should continue the port?
[Android Software Development] Lens_flare:
at last 51% of your ports users should approve that :D
[Android Software Development] Hikari:
Have been porting miui gb from ARMv7 to ARMv6. it gave errors about BluetoothA2dpService.smali.. I replaces it with the cm7 one. Then it told me that it couldnt find BluetoothHidService.smali. I copied it from base to miui.. This time it gives me this log:

--------- beginning of /dev/log/system

I/Vold ( 1872): Vold 2.1 (the revenge) firing up

D/Vold ( 1872): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)

D/Vold ( 1872): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)

D/Vold ( 1872): Volume sdcard state changing 2 (Pending) -> 1 (Idle-Unmounted)

W/Vold ( 1872): Ignoring unknown switch 'MSM72K_UDC'

W/Vold ( 1872): Ignoring unknown switch 'MSM72K_UDC'

W/Vold ( 1872): Ignoring unknown switch 'MSM72K_UDC'

W/Vold ( 1872): Ignoring unknown switch 'MSM72K_UDC'

W/Vold ( 1872): Ignoring unknown switch 'MSM72K_UDC'

--------- beginning of /dev/log/main

I/AudioFlinger( 3564): setFmVolume 100

D/AndroidRuntime( 3579):

D/AndroidRuntime( 3579): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<

I/AndroidRuntime( 3579): Heap size: -Xmx24m

D/AndroidRuntime( 3579): CheckJNI is OFF

W/dalvikvm( 3579): Unable to resolve superclass of Landroid/server/BluetoothHidService; (465)

W/dalvikvm( 3579): Link of class 'Landroid/server/BluetoothHidService;' failed

E/BluetoothHidService.cpp( 3579): Can't find android/server/BluetoothHidService

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

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

I/ServiceManager( 1871): service 'media.audio_policy' died

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

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

I/Netd ( 3581): Netd 1.0 starting

I/ ( 3580): ServiceManager: 0xad50

I/AudioHardwareMSM72XX( 3580): get_audpp_filter

I/AudioHardwareMSM72XX( 3580): open /system/etc/AudioFilter.csv success.

E/AudioHardwareMSM72XX( 3580): malformatted pcm control buffer

I/AudioHardwareMSM72XX( 3580): failed to set audpp parameters, exiting.

D/AudioHardwareInterface( 3580): setMode(NORMAL)

I/AudioHardwareMSM72XX( 3580): Set master volume to 7.

E/AudioHardwareMSM72XX( 3580): set_volume_fm error.

I/CameraService( 3580): CameraService started (pid=3580)

D/AudioFlinger( 3580): setParameters(): io 1, keyvalue routing=2, tid 3586, calling tid 3580

I/AudioFlinger( 3580): AudioFlinger's thread 0xcce8 ready to run

E/AudioHardwareMSM72XX( 3580): doRouting CALLED, outputDevices = 0x2, mFmRadioEnabled = 0

I/AudioHardwareMSM72XX( 3580): Routing audio to Speakerphone

W/AudioHardwareMSM72XX( 3580): Routing to 5 really (current: -1)

D/AudioHardwareMSM72XX( 3580): setVoiceVolume(1.000000)

I/AudioHardwareMSM72XX( 3580): Setting in-call volume to 8 (available range is 0 to 7)

I/AudioHardwareMSM72XX( 3580): For TTY device in FULL or VCO mode, the volume level is set to: 1

I/AudioFlinger( 3580): setFmVolume 100

Any idea? Thanks!
[Android Software Development] Lens_flare:
are you sure you replaced it at services.jar?

BTW: my guide mostly not applicable to 2.3 ports :(
[Android Software Development] Hikari:
Ill check that again..

I know but I cant see any other place to ask about miui porting. People here are pretty experienced.. You, Cosmic, ... helped me a lot!

EDIT: I couldnt find any bluetooth file in services.jar.. Will try something in framework.jar

EDIT: Copying BluetoothHid*.smali from base android/bluetooth to miui one in framework.jar fixed..
[Android Software Development] DJBhardwaj:
Yes, all the .smali files that start from "SQLite" and end with ".smali" [.smali is the file extension]
[Android Software Development] droidhd:
Ok, so i did replace sqlite*.smali tree but now new error regarding to duplicate class definition... :S
[Android Software Development] Lens_flare:
so that causes a verification error that means you should be more selectible on what you replace
[Android Software Development] DJBhardwaj:
So, he should keep the Base ROM's SQLiteClosable.smali?
[Android Software Development] droidhd:
First i replaced from SQLiteAbortException.smali -> SqliteWrapper.smali

After I saw that error, I tried to put back old SQLiteClosable.smali, but still same error...
[Android Software Development] DJBhardwaj:
@lens: I guess the replacing won't do. Some smali needs to be patched? Right?
[Android Software Development] Hikari:
any idea this time?

--------- beginning of /dev/log/system

E/AndroidRuntime( 2942): Error reporting crash

E/AndroidRuntime( 2942): java.lang.NullPointerException

E/AndroidRuntime( 2942):	at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)

E/AndroidRuntime( 2942):	at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:854)

E/AndroidRuntime( 2942):	at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:851)

E/AndroidRuntime( 2942):	at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 2966): *** FATAL EXCEPTION IN SYSTEM PROCESS: main

E/AndroidRuntime( 2966): java.lang.UnsatisfiedLinkError: reserveExternalMemory

E/AndroidRuntime( 2966):	at dalvik.system.VMRuntime.reserveExternalMemory(Native Method)

E/AndroidRuntime( 2966):	at com.android.server.SystemServer.main(SystemServer.java:617)

E/AndroidRuntime( 2966):	at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 2966):	at java.lang.reflect.Method.invoke(Method.java:507)

E/AndroidRuntime( 2966):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)

E/AndroidRuntime( 2966):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)

E/AndroidRuntime( 2966):	at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 2966): Error reporting crash
[Android Software Development] DJBhardwaj:
You replaced system/lib/libandroid_runtime.so?
[Android Software Development] Hikari:
nope
[Android Software Development] CosmicDan:
This is a GB issue. You need to remove all references to reserveexternalmemory from Launcher, Gallery and maybe elsewhere. Decompile the ROM fully and do a full text search.

EDIT: Porting MIUI on later CM7 versions is very difficult, many hacks needed unless you want to replace libs.

EDIT2: Check my profile for threads I started, I once had a kitchen for MIUI3 port build for xperia x10 (Cosmic UI). The batch script and smali injection notes will detail the files.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Hikari:
Wati! what do you exactly mean? from launcher? gallery? what should I exactly do? Thanks a lot!
[Android Software Development] CosmicDan:
Various smali files in various apps in MIUI3 use this method but CM7 doesnt have it. So you have to find them and remove them manually. They work fine without them. Its detailed, you need smali knowledge to dummy return value due to nulled function call. Examine my Cosmic UI kitchen for specific details.

EDIT: Link here - http://xdaforums.com/showthread.php?t=1707727

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Hikari:
wow, this is a lot more confusing than what I previously did.. But I'll manage.. Anyways how do I know the smali files I should remove?

EDIT: I found your kitchen..
[Android Software Development] CosmicDan:
Not remove smali files, remove specific lines. I dont remember what ones, you need to decompile all and find that method. Its in several packages, at least Home.apk.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Hikari:
Oh! Thanks!
[Android Software Development] DJBhardwaj:
@LENS and cosmic:

See, I get this error while I try to recompile Phone.apk

C:\Users\DJ\Desktop\APKTOOL\MIUI>apktool b Phone
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Users\DJ\Desktop\APKTOOL\
able-hugeui-hdpi
invalid resource directory name: C:\Users\DJ\Desktop\APKTOOL\
able-largeui-hdpi
invalid resource directory name: C:\Users\DJ\Desktop\APKTOOL\
es-hugeui
invalid resource directory name: C:\Users\DJ\Desktop\APKTOOL\
es-hugeui-hdpi
invalid resource directory name: C:\Users\DJ\Desktop\APKTOOL\
es-largeui-hdpi
invalid resource directory name: C:\Users\DJ\Desktop\APKTOOL\
es-zh-rCN-hugeui
Exception in thread "main" brut.androlib.AndrolibException: b
ption: could not exec command: [aapt, p, -F, C:\Users\DJ\AppD
OOL8040180394795531194.tmp, -I, C:\Users\DJ\apktool\framework
s\DJ\apktool\framework\6.apk, -S, C:\Users\DJ\Desktop\APKTOOL
, C:\Users\DJ\Desktop\APKTOOL\MIUI\Phone\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(An
a:251)
at brut.androlib.Androlib.buildResourcesFull(Androlib
at brut.androlib.Androlib.buildResources(Androlib.jav
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:185)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command:
sers\DJ\AppData\Local\Temp\APKTOOL8040180394795531194.tmp, -I
ol\framework\1.apk, -I, C:\Users\DJ\apktool\framework\6.apk,
ktop\APKTOOL\MIUI\Phone\res, -M, C:\Users\DJ\Desktop\APKTOOL\
anifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(An
a:249)
... 6 more

C:\Users\DJ\Desktop\APKTOOL\MIUI>
[Android Software Development] Hikari:
how do I know which file contains the line to remove? you know there are tons of smali files to check if I check them one by one.. and I dont even know what I am looking for... :/

EDIT: Notepad++ can search all open documents.. found the line in LauncherApplication.smali..

Thanks for all your help CosmicDan!!
[Android Software Development] firered365:
I found that it is the deodexed file that isn't letting me extract. Does anybody know how to deodex the files or can give me a program for it? I am running Ubuntu.
[Android Software Development] Hikari:
Any ideas?
[Android Software Development] DJBhardwaj:
Using any init.d? or any apps2sd preinstalled script.?
[Android Software Development] Hikari:
dunno. but possible, I think I had seen something related to app2sd in another log.. Will go check the base cm7 thread..

EDIT: It has some tweaks, app2sd, zipalign, etc... Removing and trying again..
[Android Software Development] jimbo77:
Just Wanted to reply that I was able to solve the External SD Card issue... All is working fine now...

MIUI JB feels so smooth and snappy on my phone :D :D
[Android Software Development] DJBhardwaj:
Good luck.
[Android Software Development] :
Quick question. I'm porting MIUI to the SGS3 ATT Variant. I'm having some issues getting it to boot. I've attached the necessary logcat as far as I can see and I was wondering if anybody could help with it.

I'm using CM10 as a base and Nexus S MIUI 2.8.24 as the port

http://pastebin.com/fKCiAruw - logcat.

The logcat always ends with

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

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

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

but I don't believe that's why it's dying.
[Android Software Development] CosmicDan:
You need to compare AssetManager.smali and add native methods from CM10.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Lens_flare:
whoaw, I predicted that :D

You all said I should rewirte guide, but it works as is :P
[Android Software Development] :
different error now. relatively same logcat so i won't post the whole thing

any ideas?

edit:

pastebin : http://pastebin.com/fTWfiuy5
[Android Software Development] Ozadroid:
Help help help :d

Bootloops at...

W/dalvikvm( 194): threadid=12: thread exiting with uncaught exception (group=0x40a4a1f8)

E/ActivityManager( 194): Attempt to launch receivers of broadcast intent Intent { act=miui.intent.action.RELEASE_PROXIMITY_SENSOR (has extras) } before boot completion

E/AndroidRuntime( 194): *** FATAL EXCEPTION IN SYSTEM PROCESS: android.server.ServerThread

E/AndroidRuntime( 194): java.lang.IllegalStateException: Cannot broadcast before boot completed

E/AndroidRuntime( 194):	at com.android.server.am.ActivityManagerService.verifyBroadcastLocked(ActivityManagerService.java:12654)

E/AndroidRuntime( 194):	at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:12671)

E/AndroidRuntime( 194):	at android.app.ContextImpl.sendBroadcast(ContextImpl.java:914)

E/AndroidRuntime( 194):	at com.android.internal.policy.impl.MiuiScreenOnProximityLock$1.handleMessage(MiuiScreenOnProximityLock.java:93)

E/AndroidRuntime( 194):	at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 194):	at android.os.Looper.loop(Looper.java:137)

E/AndroidRuntime( 194):	at com.android.server.ServerThread.run(SystemServer.java:775)

I/Process ( 194): Sending signal. PID: 194 SIG: 9

I/ServiceManager( 100): service 'backup' died
[Android Software Development] CosmicDan:
You did it wrong. Only merge the lines that say native method in them.

Full logcat please. Does the CM10 for your device have proxy sensor working?

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Ozadroid:
Its CM9 and proximity works fine in it! :(

and full logcat here.

http://logcat.miui.us/970012
[Android Software Development] CosmicDan:
Assuming youre using original CM9 libs and have correct permissions on invoke-as, I dunno. Probably another issue with miui.us ROM.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] DJBhardwaj:
You are using which miui as target? which device?
[Android Software Development] Ozadroid:
MI-One

---------- Post added at 12:43 PM ---------- Previous post was at 12:40 PM ----------

lol base is miuiandroid Mi-One. only logcat is on miui.us coz it is better than pastebin :P

and yes original cm9 libs n ivoke-as granted perm!!
[Android Software Development] CosmicDan:
Ummm... use a different base.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Ozadroid:
suggest one!

i hve tried SGS2 and huawei8860! both dint work.
[Android Software Development] CosmicDan:
I dont know since I only work on JB and CM10 now. As Lens asked, tell us your device.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] DJBhardwaj:
I guess, he got his device bricked :(
[Android Software Development] CosmicDan:
Who bricked? Whoops, it was optimus who asked what device you have. Use one from same brand or same/similar CPU.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] DJBhardwaj:
Lens bricked.

MI-One is the closest device to our CPU

---------- Post added at 03:53 PM ---------- Previous post was at 03:44 PM ----------

@cosmic: I get an error while flashing.

much of the error resemble this line

symlink: failed to symlink /system/xbin/zcat to busybox: No such file or directory
script aborted: symlink: some symlinks failed
E:Error in /sdcard/MIUI_2.8.24.zip
(status 7)
Installation Aborted
mtd: successfully wrote block at c4b2c00000000
I: Set boot command ""

Please help out
[Android Software Development] Ozadroid:
status7 is due to some problem in update script or updater script. put meta-inf folder from ur last working built. m going out will take a look at this after i return. till then try replacing ur meta-inf.
[Android Software Development] CosmicDan:
Use updater-script and busybox binary from CM9. Dont replace anything in bin or xbin from MIUI!

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] DJBhardwaj:
Thanks. I will take a look tomorrow. Its blog time ;)