yashsingh1/xdaforums huggingface dataset:
[Android Software Development] MasterZen88:
Thank you CosmicDan! I'll start looking in that area...
[Android Software Development] MasterZen88:
Thank you again CosmicDan for pointing me in the right direction. Finally fixed my issue. Now all I need to do is port from a miuiandroid base, currently using miui.us .
[Android Software Development] DJBhardwaj:
Guys, I am still not able to fix USB

Could I please upload the base and miui framework-res and services.jar? If someone could do it for me :(
[Android Software Development] Ozadroid:
give both ur current ones in optimiui and ur both bases(cm9 and miuiandroid) aswell. and name them so it is easy!
[Android Software Development] DJBhardwaj:
I will do this tomorrow and PM you the links. Thanks.
[Android Software Development] CosmicDan:
delete
[Android Software Development] Hikari:
Awesome and really helpful tutorial.. Finally ported miui4 to my device. the only issue Im facing is the keyboard not showing up.. any idea what could possibly be causing it? any way to fix??
[Android Software Development] Lens_flare:
it might be an issue with a way how vendor(or device devs) implemented a keyboard. It might be linked to hardware keyboard switch just like on keyboarded devices. try to use stage 4 0f guide to fix that (keyword: mLidOpen).

reason might be also banal: missing file from base, wrong scripts etc.
[Android Software Development] Alberto96:
Is there a method to delete black line/bar (near settings button) in status bar? I hate it and i cant find a method to delete it. That bar should contain date but isnt showed. I can only press on it to redirect to calendar app. Have anyone a solution?

Thanks in advance ;)

P.S.: Im trying some in MiuiSystemUI but i cannt recompile it. I can decompile it but (also if not touched) cant compile O_o. Anyone have a solution also for this ?
[Android Software Development] Hikari:
would love to see a solution for that!

---------- Post added at 08:45 PM ---------- Previous post was at 08:30 PM ----------

stage 4 didnt help! :(
[Android Software Development] :
Had this problem too. Asked help from galaxy ace dev.

You have to remove first line in an XML file in miuisystemui.apk. don't know which XML anymore but the string name should explain itself, something with black colour.

Sent from my WFS
[Android Software Development] Alberto96:
I cant compile miuisystemui.apk. apktool give me an error
[Android Software Development] v1r0x:
which apktool?

and paste the error here ;)
[Android Software Development] Huncriter:
can't make any call, phone.apk crashes after dial, please help me
[Android Software Development] v1r0x:
E/AndroidRuntime( 1267): FATAL EXCEPTION: main

E/AndroidRuntime( 1267): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.phone/com.android.phone.SipCallOptionHandler}: java.lang.NullPointerException

E/AndroidRuntime( 1267):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)

E/AndroidRuntime( 1267):	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)

E/AndroidRuntime( 1267):	at android.app.ActivityThread.access$600(ActivityThread.java:126)

E/AndroidRuntime( 1267):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1150)

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

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

E/AndroidRuntime( 1267):	at android.app.ActivityThread.main(ActivityThread.java:4437)

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

E/AndroidRuntime( 1267):	at java.lang.reflect.Method.invoke(Method.java:511)

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

E/AndroidRuntime( 1267):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

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

E/AndroidRuntime( 1267): Caused by: java.lang.NullPointerException

E/AndroidRuntime( 1267):	at com.android.phone.MiuiPhoneApp.b(MiuiPhoneApp.java:185)

E/AndroidRuntime( 1267):	at com.android.phone.PhoneApp.I(PhoneApp.java:1170)

E/AndroidRuntime( 1267):	at com.android.phone.fP.o(CallController.java:275)

E/AndroidRuntime( 1267):	at com.android.phone.cy.run(SipCallOptionHandler.java:410)

E/AndroidRuntime( 1267):	at android.app.Activity.runOnUiThread(Activity.java:4176)

E/AndroidRuntime( 1267):	at com.android.phone.SipCallOptionHandler.hy(SipCallOptionHandler.java:387)

E/AndroidRuntime( 1267):	at com.android.phone.SipCallOptionHandler.onCreate(SipCallOptionHandler.java:215)

E/AndroidRuntime( 1267):	at android.app.Activity.performCreate(Activity.java:4471)

E/AndroidRuntime( 1267):	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)

E/AndroidRuntime( 1267):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)

E/AndroidRuntime( 1267):	... 11 more

W/ActivityManager( 337): Force finishing activity com.android.phone/.SipCallOptionHandler
[Android Software Development] jmlugo90:
thaks for the tutorial. if i just want to change the base of the miui rom, let me explain (my english it's really bad) i have a galaxy s3 I9300, and there is a rom for my device, but that rom it's samsung based, and i don't like it. I just want the same rom but aosp base. So if i want to do that i can use as my base rom: cm10 or aokp??

Another question, the base rom and the miui rom have to be build on the same android base, 4.1.2 in the case of miui 3.4.5??

Thanks, and nice guide.
[Android Software Development] sendhiloo7:
+1 .. same for me also.. can you please us with latest MIUI v5.

HOW TO CHANGE ONLY BASE FROM STOCK MIUI TO CM OR ASOP in same device
[Android Software Development] LoveForEver:
Ok thank you and do you have any clue about ADB? Why it don't work when miui boot?

EDIT: USB DEBUGGING wasn't on --' xD
[Android Software Development] hepi_hape:
^ Haha, LOL

btw, what driver you use ? i have turn ON usb debuging but when i start ADB on command prompt it keep say 'waitting for device' ? any suggestion

-------------

little question here :

what means 2 bolded argument ? it say copy but than he decided not ?? im so confuse ?

where is WebSettingsClassic located ?

thax :)
[Android Software Development] _polimorph_:
You can't just "switch" the base. You must follow the porting principles described in this awesome guide.

There's already a miui rom with CM10 base for i9300 and you can find it in my signature.
[Android Software Development] ZduneX25:
3.4.12 brings acore fc to me:

I had no such error on 3.4.11 and there were only apks changes between 11 and 12, any ideas which apk causes it? (i guess using apk from 11 will solve this issue)
[Android Software Development] Rempty:
which APP brings fc?

i think are related to phone.apk, try to replace phone.apk, telephonyprovider.apk, contactsprovider.apk from 3.4.11
[Android Software Development] Megalith27:
has anyone managed to port miui using jb 4.2.2 as a base rom? if so, how?

EDIT: Can someone have a look at this logcat and tell me, what is it that I need to fix, plz.

Thanks in advance.
[Android Software Development] Megalith27:
I don't understand what the problem is, I have checked all the smali files mentioned above and they practically identical with my cm10 smali files. but I can not decode what the logcat is throwing at me.

Should I used libandroidruntime.so from miui rom? By the way, I my porting from Defy, the one that I got from here: http://goo.im/devs/ibotpeaches/miuiandroid/releases/3.4.12

umts_jordan one...

Any help is appreciated.
[Android Software Development] Ozadroid:
F/SystemServer( 2670): Caused by: java.lang.UnsatisfiedLinkError: Library shell_jni not found; tried [//lib/libshell_jni.so, /system/lib/libshell_jni.so]

Copy libshell_jni.so and other shell related libs and /system/xbin/shelld

Further it seems you have done something like WTF, resources IDs mismatches. And network also has some wierd problem.

Btw are you porting a 4.1.2 miui on 4.2.2 base ?
[Android Software Development] Ozadroid:
Do you hv preloaded classes in framework.jar? If not get it from any nexus built.

Moreover did you change any libs from your cm base?
[Android Software Development] hepi_hape:
Lol. You post entire logcat.

Try upload at notepad / .txt file first...
[Android Software Development] xnan:
I fixed it but I get this kind of error but I don't know what to do to get it working working... I attached my log... Please help.. And I gave +1 Thanks for your response. :good:
[Android Software Development] Ozadroid:
did you replace the app and framework folder? coz i cannot find any 'miui' string and all 'semc' and 'sonyericsson' strings.
[Android Software Development] _polimorph_:
Diff android\text\Layout.smali. If there are allot differences copy the whole Layout$* tree from your AOSP base to your port.

Also you seem to get some errors from WifiNative.smali, so do a diff on it.
[Android Software Development] Megalith27:
I am using 4.1.2 as a base, and I haven't done any decompilng and recompiling yet, only copied framework/app/fonts/media folder and done some changes on build.prop
[Android Software Development] Megalith27:
Hi can someone help me with this logcat.

I finally found a miui rom porting from which gave me more logical/familiear error...but now i've encountered these errors

My understanding for this one is

D/dalvikvm( 2191): ODEX file is stale or bad; removing and retrying (/data/dalvik-cache/system@framework@framework.jar@classes.dex)

framework.jar is compiled incorrectly.

But don't know what this one means, as I did as the 2nd post said on diffing the WebSettingsClasic smali

E/dalvikvm( 2191): Class lookup Landroid/webkit/WebSettingsClassic$AutoFillProfile; attempted with exception pending

W/dalvikvm( 2191): Pending exception is:

I/dalvikvm( 2191): java.lang.NoSuchFieldError: no field with name='mMediaPreloadEnabled' signature='Z' in class Landroid/webkit/WebSettingsClassic;

I/dalvikvm( 2191):	at java.lang.Runtime.nativeLoad(Native Method)

I/dalvikvm( 2191):	at java.lang.Runtime.loadLibrary(Runtime.java:382)

I/dalvikvm( 2191):	at java.lang.System.loadLibrary(System.java:535)

I/dalvikvm( 2191):	at android.webkit.JniUtil.<clinit>(JniUtil.java:31)

I/dalvikvm( 2191):	at java.lang.Class.classForName(Native Method)

I/dalvikvm( 2191):	at java.lang.Class.forName(Class.java:217)

I/dalvikvm( 2191):	at java.lang.Class.forName(Class.java:172)

I/dalvikvm( 2191):	at com.android.internal.os.ZygoteInit.preloadClasses(ZygoteInit.java:285)

I/dalvikvm( 2191):	at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:232)

I/dalvikvm( 2191):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:522)

I/dalvikvm( 2191):	at dalvik.system.NativeStart.main(Native Method)

thanks in advance

EDIT: Never mind, I sorted it by coping WebSettingsClassic* smali tree and now sorting out services.jar issues but feel like it's close to booting. :fingers-crossed:
[Android Software Development] lozohcum:
I have done all part's of this guide but my port doens't boot. After long time of MIUI's bootanimation system appears for a second (google location sth ask) and the phone turn black screen. I can't take a logcat because it's disabled in miui :/

yay finally it booted but GSM and WiFi doesn't work
[Android Software Development] Megalith27:
Can anyone, plz, help with this one.
[Android Software Development] _polimorph_:
This seems to be the problem, a resource error:

android.content.res.Resources$NotFoundException: Resource ID #[B]0x1110044[/B]

I haven't done it myself, but from my knowledge this is how you solve it. Give it a try.

So what you want to do is compare the decompiled folders of framework-res.apk from your base with port's coresponding decompiled apk, search for that code an replace it in the port. Recompile and you're good to go.
[Android Software Development] xnan:
I'm having the following errors... I have attached my full log..... Somebody please help me with this :crying: :crying: :crying:

Failure starting Input Manager Service
E/SystemServer(1695): java.lang.SecurityException: invalid status bar icon slot: ime
E/SystemServer(1695): at com.android.server.StatusBarManagerService.setIconVisibility(StatusBarManagerService.java:203)
E/SystemServer(1695): at com.android.server.InputMethodManagerService.<init>(InputMethodManagerService.java:480)
E/SystemServer(1695): at com.android.server.ServerThread.run(SystemServer.java:303)

04-25 08:41:20.906: E/AndroidRuntime(1695): *** FATAL EXCEPTION IN SYSTEM PROCESS: ConnectivityThread
E/AndroidRuntime(1695): java.lang.NumberFormatException: unable to parse 'rmnet\d' as integer
E/AndroidRuntime(1695): at java.lang.Integer.parse(Integer.java:383)
E/AndroidRuntime(1695): at java.lang.Integer.parseInt(Integer.java:372)
E/AndroidRuntime(1695): at java.lang.Integer.parseInt(Integer.java:332)
E/AndroidRuntime(1695): at com.android.server.ConnectivityService$RadioAttributes.<init>(ConnectivityService.java:216)
E/AndroidRuntime(1695): at com.android.server.ConnectivityService.<init>(ConnectivityService.java:299)
E/AndroidRuntime(1695): at com.android.server.ConnectivityService.<init>(ConnectivityService.java:66)
E/AndroidRuntime(1695): at com.android.server.ConnectivityService$ConnectivityThread.run(ConnectivityService.java:234)
[Android Software Development] lozohcum:
Finally I ported MIUI4 to LG Swift!

http://xdaforums.com/showthread.php?t=2253147
[Android Software Development] twitish:
Hey guys. Not sure if this has been answered yet, but is there a working port of MIUI v5 to android 4.2.2? Also, are there any new steps to porting MIUI v5 besides what's in the guide and shelld? Thanks for your time.
[Android Software Development] lozohcum:
What about MIUI GB? I can't make my port boot :/
[Android Software Development] ubaid88:
I am trying port MIUIv4(ICS) from Gionee GN700W to Gionee GN700T. Both are same device expect Gn700W(MTK6577) is with 3g and GN700T(MTK6517) is without 3G. First I tried by replacing Modem.img, /system/etc/firmware folder and /system/lib/module folder in MIUI rom from base rom but it got stuck first boot logo.

Then I tried port by method of Lense_Flare, now I get stuck on boot animation(not first boot logo). Here is logcat of it.

Any help????
[Android Software Development] lozohcum:
patch VibratorService.smali :)
[Android Software Development] ubaid88:
How about this?
[Android Software Development] maestrobarako:
hello..

I managed to Port MIUI V4 to my MTK MT6577 device from another MT6577 device..

it boot successfuly, but an error "unfortunately MIUIhome has stopped" occurs everytime.. i can able to use camera though, wifi and bluetooth also works.. just the MIUI home FC that bugs me..

please help me with this..
[Android Software Development] sorullo_xgrx:
Did you copy shelld from miui ROM xbin folder to your base xbin. If you did good plus you need to add this line inside the kernel.

Service shelld /system/xbin/shelld

Class main

To be exact inside the init rc file.
[Android Software Development] maestrobarako:
will try it now..

where exactly is init.rc found?
[Android Software Development] sorullo_xgrx:
You need to extract the boot.img > ramdisk > init.rc

Google how to edit boot.img
[Android Software Development] maestrobarako:
i did what you told me, but when i flashed it, it says "error 7"

is it becoz im using a windows img.boot unpacker/repacker?
[Android Software Development] ZduneX25:
They told you harder way (leave kernel as it is), try to use init.d script like i did:

https://github.com/zdunex25/patchrom_mt11i/blob/ics/stockrom/system/etc/init.d/09shell
[Android Software Development] sandy7:
I got a question...can this same shell script can be used for miui5?
[Android Software Development] ZduneX25:
V5 does not need one.
[Android Software Development] sandy7:
Ya iam using that in my...I added the sheld script in init.rc

So can this can be executed from a sheld script from init.d?
[Android Software Development] ZduneX25:
Effect will be the same, but in my build of v5 (xperia neov) i do not have it anymore neither in kernel or rom. That is why I say it's no longer necessary when it comes about v5.
[Android Software Development] sandy7:
Ok thanks ill give a shot build with out those libs
[Android Software Development] maestrobarako:
succesfully added the shelld lines on the init.rc file inside kernel.. succesful boot, but the problem is still there..

"unfortunately MIUIhome has stopped"

is there another way to fix this? thank you..

Eidt:

i can i download the init.d script from the link youve given? thanks..
[Android Software Development] sandy7:
Add the 3 shell libs in system/lib and and a sheld script in system/xbin from the port Rom to base Rom.
[Android Software Development] saldymhmd:
MIUI About Phone

Hello all, can someone help out with this image, as you see the ram is 512MB but my phone has only 277MB, also the internal memory shows wrong value, don't have any idea how to fix it, where is the point? Forced on smali or where?
[Android Software Development] maestrobarako:
now mi home is all black:(

i manage to make the home go into loading..

and it is loading forever.. please help expert friends, its almost there..

Edit: now it says, MIUIHome not responding.. its almost there
[Android Software Development] sandy7:
Add the lines in kerenl also in init.rc
[Android Software Development] maestrobarako:
what lines am i going to add?

sorry, im a newbie about this..
[Android Software Development] sandy7:
Search in xda there is tool for extracting the kerenl ramdisk..after open init.rc file and this line at the end...

Service shelld /system/xbin/shelld

Class main
[Android Software Development] maestrobarako:
yes i already did that..

but im still stuck on MIUIHome loading screen.

am I missing something?
[Android Software Development] saldymhmd:
Anyone can help me? This happen when activating native wifi tether, already make changes on framework-res.apk but still not working

E/WifiStateMachine( 541): Exception in softap start java.lang.IllegalStateException: Error communicating to native daemon

E/SoftapController( 413): Softap already stopped

E/SoftapController( 413): Softap wlan0 down: -1

D/SoftapController( 413): Softap driver stop: 0

E/WifiStateMachine( 541): Exception in softap re-start java.lang.IllegalStateException: Error communicating to native daemon

D/dalvikvm( 665): GC_CONCURRENT freed 1773K, 22% free 9273K/11843K, paused 207ms+12ms

D/Tethering( 541): sendTetherStateChangedBroadcast 1, 0, 0

D/Tethering( 541): InitialState.processMessage what=4

D/Tethering( 541): sendTetherStateChangedBroadcast 0, 0, 0
[Android Software Development] ZduneX25:
Am preparing custom ota updater to reboot into recovery properly, current script reboots, but it also tries to install zip package and it fails every time, I found the code under install button (before everything happens):

.line 242
const v1, 0x7f060010

new-instance v2, Lcom/android/updater/ListFilesActivity$5$1;

iget-object v3, p0, Lcom/android/updater/ListFilesActivity$5;->val$file:Ljava/io/File;

iget-object v4, p0, Lcom/android/updater/ListFilesActivity$5;->val$selectedOpts:[Z

iget-object v5, p0, Lcom/android/updater/ListFilesActivity$5;->val$ctx:Landroid/content/Context;

invoke-direct {v2, p0, v3, v4, v5}, Lcom/android/updater/ListFilesActivity$5$1;-><init>(Lcom/android/updater/ListFilesActivity$5;Ljava/io/File;[ZLandroid/content/Context;)V

invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

const v1, 0x7f060010 - id of the button, so how should i edit these lines to just reboot into recovery (and let user install zip package manually) pressing the button

I tried to add:

.field protected mActivity:Landroid/app/Activity;

...

const v1, 0x7f060010

invoke-virtual {p0}, Lcom/android/updater/ListFilesActivity;->rebootRecovery()V

return-void
...

.method protected rebootRecovery()V
.locals 3

.prologue
.line 132
iget-object v1, p0, Lcom/android/updater/ListFilesActivity;->mActivity:Landroid/app/Activity;

const-string v2, "power"

invoke-virtual {v1, v2}, Landroid/app/Activity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

move-result-object v0

check-cast v0, Landroid/os/PowerManager;

.line 133
.local v0, pm:Landroid/os/PowerManager;
const-string v1, "recovery"

invoke-virtual {v0, v1}, Landroid/os/PowerManager;->reboot(Ljava/lang/String;)V

.line 134
return-void
.end method

from original miui updater, but then it FCs.
[Android Software Development] maestrobarako:
Please help

i was able to boot MIUI, but still the launcher is stuck on loading.. but i can use sms, camera, call (these are apps on the locksreen)

the only thing thats missing is the launcher that's stuck.. please i need advice, im a newbie..thanks
[Android Software Development] sorullo_xgrx:
I'm guessing this is exactly how you added the line inside init.rc file . plus the lib shelldservice , and shelld inside xbin
[Android Software Development] maestrobarako:
exactly.. what should be the correct form of those line?
[Android Software Development] maestrobarako:
Thanks a lot man. it really worked..

but i still have some problem. myphone is an mkt6577 device, and is a dual sim phone.. whenever i try to switch sim, which is on the settings menu, the swithcer goes FC.. do you have any idea how to fix this?

thank you again very much..
[Android Software Development] sorullo_xgrx:
Logcat would help me
[Android Software Development] lozohcum:
Any additional tips for porting MIUI 5 ??

I can't recompile Phone.apk to fix SIM lock code for Xperia

it always gives me the same error. I can recompile jar files but every apk gives me error :/
[Android Software Development] hepi_hape:
need some suggestion

Helo, im new on porting MIUI, im still porting miui 2.8.10 version for ics if this porting succesful next i will try to port V5

my device is galaxy W

and now i have fully folow instruction from this tread. but i failed it twice :(

after i flash to my device, it keep bootloop, and i dont know how to fix it because when i plug to my pc. my device doesn't detect it for logcat..

*im sure i've right driver (i tested with CM9 and logcat start perfectly)

Now, i dont even know if i want to see logcat on my device, what should i do now ?

plug it to pc when it turn off and start adb logcat on pc ?

or

get to CWM first, and plug to pc for start abd log cat ?

thx dude for help:crying:
[Android Software Development] sorullo_xgrx:
Try adding this 2 lines in your build.prop after Additional build properties

persist.service.adb.enable=1

persist.sys.usb.config=adb

Hope that helps
[Android Software Development] hepi_hape:
Mm, that line is default..

Ok, i will try
[Android Software Development] hepi_hape:
My log :

/sbin/sh: exec: line 1: logcat: not found

Whats wrong dude ? And its keep bootlop :\
[Android Software Development] sorullo_xgrx:
adb logcat >log.txt
[Android Software Development] hepi_hape:
Yeah i had type , adb logcat >log.txt

The post before is log inside log.txt

Btw, when i facing bootlop why i cant logcat, even failed to start adb. It keeps -waiting for device-
[Android Software Development] sorullo_xgrx:
Can you pm me your boot.img ..
[Android Software Development] cooler1182:
Thanks brother :D
[Android Software Development] maestrobarako:
can i port a 4.0.3 MIUI rom to a 4.0.4 base rom? if yes, then what files do i need to add to base?
[Android Software Development] sorullo_xgrx:
I was able to port to my thunderbolt with base 4.0.3 using a 4.0.4 It shouldnt be any different . Just following this guide
[Android Software Development] hepi_hape:
Sure, PM sent

sory for late reply. thx before :D
[Android Software Development] maestrobarako:
but im getting a bootloop.. i was able to port 4.0.4 to 4.0,4 successfully with your help before, but this time im stuck at bootlogo..