yashsingh1/xdaforums huggingface dataset:
[Android Software Development] theROMinator:
After some framework-res edits I got it to boot :D

One big thing is stopping it from functioning though. The process com.android.phone is force closing repeatedly.

Here is what I caught in the logcat (i'll post the full one to gist).

[ 01-13 22:53:20.298 942:0x3ae E/AndroidRuntime ]

FATAL EXCEPTION: main

java.lang.RuntimeException: Unable to create application com.android.phone.MiuiPhoneApp: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.android.internal.telephony.SamsungQualcommD2RIL

at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3970)

at android.app.ActivityThread.access$1300(ActivityThread.java:126)

at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1188)

at android.os.Handler.dispatchMessage(Handler.java:99)

at android.os.Looper.loop(Looper.java:137)

at android.app.ActivityThread.main(ActivityThread.java:4437)

at java.lang.reflect.Method.invokeNative(Native Method)

at java.lang.reflect.Method.invoke(Method.java:511)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

at dalvik.system.NativeStart.main(Native Method)

Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.android.internal.telephony.SamsungQualcommD2RIL

at com.android.internal.telephony.PhoneFactory.makeDefaultPhone(PhoneFactory.java:153)

at com.android.internal.telephony.PhoneFactory.makeDefaultPhones(PhoneFactory.java:57)

at com.android.phone.PhoneApp.onCreate(PhoneApp.java:442)

at com.android.phone.MiuiPhoneApp.onCreate(MiuiPhoneApp.java:107)

at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)

at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3967)

... 10 more

Caused by: java.lang.ClassNotFoundException: com.android.internal.telephony.SamsungQualcommD2RIL

at java.lang.Class.classForName(Native Method)

at java.lang.Class.forName(Class.java:217)

at java.lang.Class.forName(Class.java:172)

at com.android.internal.telephony.PhoneFactory.makeDefaultPhone(PhoneFactory.java:146)

... 15 more

Caused by: java.lang.NoClassDefFoundError: com/android/internal/telephony/SamsungQualcommD2RIL

... 19 more

Caused by: java.lang.ClassNotFoundException: com.android.internal.telephony.SamsungQualcommD2RIL

at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)

at java.lang.ClassLoader.loadClass(ClassLoader.java:501)

at java.lang.ClassLoader.loadClass(ClassLoader.java:461)

... 19 more

https://gist.github.com/d4d032067e1873c5d433
[Android Software Development] v1r0x:
have a look at the quote of Lens_flare ;)
[Android Software Development] theROMinator:
There are about 12 of those samsung ril smalis. Should I put them in MIUIs classes.dex?
[Android Software Development] v1r0x:
you should decompile base framework.jar and v4 framework.jar and copy the SamsungQualcommD2RIL class/smali (in com/android/internal/telephony) from decompiled base to decompiled v4 and then recompile v4 framework.jar to get your classes.dex

Open the v4 framework.jar with winzip/7zip/... and add the new recompiled classes.dex (overwrite the old classes.dex)
[Android Software Development] theROMinator:
Did that reflashed and the fc is gone, now for more chaos. EVERYTHING force closes, settings, camera, gallery, phone, acore, you get the point lol.

Not sure if this log is significant though...

[ 08-02 18:03:23.171 2754:0xac2 E/AndroidRuntime ]

FATAL EXCEPTION: main

java.lang.NoClassDefFoundError: miui.util.UnitedWorldwide_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus_MIUIus

at android.app.Activity.attach(Activity.java:4429)

at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1916)

at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)

at android.app.ActivityThread.access$600(ActivityThread.java:126)

at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1150)

at android.os.Handler.dispatchMessage(Handler.java:99)

at android.os.Looper.loop(Looper.java:137)

at android.app.ActivityThread.main(ActivityThread.java:4437)

at java.lang.reflect.Method.invokeNative(Native Method)

at java.lang.reflect.Method.invoke(Method.java:511)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

at dalvik.system.NativeStart.main(Native Method)

Full: https://gist.github.com/0a497af4b51c3927d046
[Android Software Development] CosmicDan:
Wow, miui.us mess with the classpaths? No wonder mods for their ROMs cause issues from miuiandroid.com

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] theROMinator:
LOL exactly that's what made me go... WTF 0_o. The mods may be device specific...
[Android Software Development] Lens_flare:
Maybe you could tweak keyboard lights at framework-res.apk/res/values/arrays.xml?

The ones of huge arrays (near the backlight values).
[Android Software Development] CosmicDan:
Try starting again using an MIUI rom from miuiandroid.com. I'm not saying they are better or anything, but that's what I always used... I chose it originally because it's a UK MIUI and I'm Australian but I don't think there's any major difference.
[Android Software Development] theROMinator:
I'm working with someone from MIUI.us. He's giving me his framework.jar and corresponding apks :p
[Android Software Development] CosmicDan:
Well good luck with that... after seeing even more evidence on how deeply miui.us screw around with the framework to make it relatively non-standard, I have even more reason to boycott and badmouth them :P It's bad enough that miui.us themes never work on other MIUI's....
[Android Software Development] ThEuNdYiNg1:
okay this is what i get

https://gist.github.com/3244018

i tried modifying it like cm9 base but that caused it to not work at all so what do you think i should do.

Also when i recompile framework-res.apk my status bar lowers and so does my screen for some reason. What could it be?
[Android Software Development] CosmicDan:
Check CM9 /etc folder, files like sysctrl.conf, hw_config.sh or init.local.rc can sometimes be the place to set lighting value settings... this is particularly the case for older devices such as the X10.

Also when i recompile framework-res.apk my status bar lowers and so does my screen for some reason. What could it be?[/QUOTE]

Are you using apktool 1.4.3? Did you "if" both framework-res and framework-miui files?
[Android Software Development] ThEuNdYiNg1:
I just modified the framework-res and im getting some progress so now i know its in the framework and i checked those files that you said and they did not have any lighting values.

As for the the recompile i just found out that that was the issue
[Android Software Development] Peteragent5:
Since I know it's you, Lens_flare

I know this guide will work ;)
[Android Software Development] Alex93917:
+1 on Jelly Bean port :/ Launcher is also lagging, no lag on CM10.
[Android Software Development] Lens_flare:
What are you talking about? It is even laggy on nexus devices..
[Android Software Development] Alex93917:
My last MIUI 2.8.10 (ICS), sources from Nexus S have no lag on launcher and statusbars. But, on MIUI 2.9.21 (JB), sources from Nexus S have lag on Launcher and statusbars ..
[Android Software Development] Stickman89:
Porting from Nexus S sources for Sensation XE, no lag experienced here at all in regards to Launcher or statusbar for that matter. Perhaps it's down to the current state of CM10 for your particular device and/or it's kernel (I.e. Vsync)...

Edit: Nvm didn't see the following comment "no lag on CM10", no idea what's causing your issue (how's the available memory when long pressing home?); can't say I experience it myself.

Best Regards,

s89
[Android Software Development] chiragkrishna:
Well did everything the guide said...

Porting jb

But phone doesn't boot...

Am stuck with this tiny logcat...

Before you ppl tell me... yes I've copied the storagexml...

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

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

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

D/macloader( 1921): Deleting file /data/.cid.info

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

D/DirectVolume( 1908): DirectVolume::handlePartitionAdded -> MAJOR 179, MINOR 17, PARTN 1

(sent through internet)
[Android Software Development] Stickman89:
@chiragkrishna - vold.fstab is the file responsible for mounting sdcard however this shouldn't cause your device not to boot, and if you followed the guide your /system/etc/ folder should of remained the same as your base with the addition of the mentioned (yellowpage.db, weather_city.db, telocation.td & additional permissions).

Just to make sure... You didn't replace the /system/etc/ folder with the device your porting from did you? Your logcat should of progressed beyond this point otherwise.

Edit: Scratch that, replace vold.fstab with the one from your base, perhaps you've overwritten it at some point.

If all goes well this should be your next debug information in logcat followed by the boot process.

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

Best Regards,

s89
[Android Software Development] chiragkrishna:
the etc is from base only,... and the vold.fstab is unchanged,... that was the first thing i checked,...

but the problem is why isnt it going further,... do we need to do some additional patches for JB roms,...

porting from gnex miui to cm10 sgs3
[Android Software Development] CosmicDan:
Are you using the CM10 kernel?
[Android Software Development] chiragkrishna:
yes cm10 kernel,... didnt touch my boot.img,...
[Android Software Development] Lens_flare:
*chiragkrishna

Nothing to do with smali though. Have you tried nexus s as base? I see you are trying with gnex.

What's your android_runtime lib?
[Android Software Development] chiragkrishna:
tried with both nexus and nexus s,....

runtime lib is base, miui runtime lib wont even get to boot animationn

i have a doubt,...

i use windows 7 and when am extracting the cm10 zip,... it asks me to replace some files because of the NTFS file system, which is case insensitive,...

from this folder "etc\terminfo"

for example in the zip it contains two files with the name 386at & 386At,... so windows always asks me to replace it,... and extracted file is only 386at

can this be a problem??

if its a problem then i guess i need to quit using windows,... :(
[Android Software Development] Lens_flare:
case-insensitive fs might cause such situations.

USB flash with live ubuntu image is a cure :]
[Android Software Development] Ozadroid:
y do u extract the zips.. replace within the zips!

---------- Post added at 09:44 PM ---------- Previous post was at 09:42 PM ----------

replace AudioFormat.smali with ur jb!
[Android Software Development] a1exander:
Yep already figured it out, thanks anyways! :)

I have the ROM booted and most working! Its just that my onscreen keyboard only works after you unchecked the "hardware keyboard" option in settings.

Since I have a Galaxy SII is there any way that I can have "hardware keyboard" disabled by default?
[Android Software Development] chiragkrishna:
yup onto ubuntu on virtualbox,... will see if this changes anything

even if you replace just within the zip,... the zip stores the files in tmp directory,... so again results in the same thing or the zip program crashes,...

---------- Post added at 11:21 PM ---------- Previous post was at 11:00 PM ----------

framework-res--> Bools.xml

<bool name="config_forceDisableHardwareKeyboard">[B][COLOR="Red"]true[/COLOR][/B]</bool>
[Android Software Development] chiragkrishna:
try this!!

framework-res---> integers.xml

<integer name="config_deviceHardwareKeys">[B][COLOR="Red"]7[/COLOR][/B]</integer>

if this doesnt work i guess you need to tweak in the settings.apk

=================================================================

=================================================================

guys did it in ubuntu,... still i get only that small log,... its just not going any further,... is there something else to try???
[Android Software Development] Lens_flare:
any chance it is a base issue?
[Android Software Development] Ozadroid:
bro when u change something in a zip the utility gives a pop up that if u want to update the zip or not! if u press yes to update the zip the changes present in tmp are saved onto zip! and while doing so if ur utility crashes then something is wrong for sure with ur utility.

i am doing this without extracting zips and never had any problem.
[Android Software Development] CosmicDan:
But it takes longer and updating a zip with case-sensitive structure probably would crash. Extracting it and resolving the dulicates would fix it. Also, that requires a lot of manual work every time.

Regardless, he already solved it.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Ozadroid:
over my experience, i never ever faced any problems with zip updating. it takes lesser time than extracting and then packing again.

But then every problem has a solution and every man has his opinion :P
[Android Software Development] CosmicDan:
Ever heard of BAT files?

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Ozadroid:
yeah but i dont know how to make them :P

i tried many years ago to create a process to shutdown my PC automatically as the power goes off! but failed :P

---------- Post added at 12:24 PM ---------- Previous post was at 12:12 PM ----------

My network isnt working. porting from Mi-One+ MiuiAndroid.

This my radio log when i have changed nothing related to RIL

http://logcat.miui.us/1152001

i am getting this error.

E/RILC ( 119): RIL Response: unexpected error on write errno:9

and this is radio log of my 2.8.3 from nexus s stable built

http://logcat.miui.us/1153001

okay. dis is radio log after changing ril*.smali

http://logcat.miui.us/1138007

still the same error

E/RILC ( 109): RIL Response: unexpected error on write errno:9

After solving all the missing fiedls n methods due to ril*.smalli changes, this is the radio log. :(

http://logcat.miui.us/1143007
[Android Software Development] a1exander:
So guys whats your favourite method of updating your rom when a new MIUI version comes out?

:)
[Android Software Development] CosmicDan:
With batch files and using my existing .patch files and checking for rejects, basically the same way PatchROM does it.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] a1exander:
You mind sharing your batch and patch files? :)
[Android Software Development] Lens_flare:
http://xdaforums.com/showpost.php?p=31486725&postcount=831 ;]
[Android Software Development] Ozadroid:
Anything from my radio logs above :-?
[Android Software Development] a1exander:
Thank you! :) I dont know anything about batch and .patch files etc, could someone please create them for me and explain abit how you use them/how they work? :)

Would really appreciate it!
[Android Software Development] _polimorph_:
In my case I kept only the duplicate with upper case, i.e. 386At and found no problems, try that.
[Android Software Development] v1r0x:
oh my god...

Because of this case-sensitive files I decided to boot my ubuntu. Took me almost 3 hours to boot it. I'll never buy a new graphic card again :D
[Android Software Development] Lens_flare:
AMD? :DD
[Android Software Development] AdhvanIt:
Search is broken. I've been following for some time, but evidently missed this if it's already been asked.. Does anyone know what broke the SMS/MMS receive when porting from GSM to CDMA device in the latest build?

BearerData.smali replaced would fix broken SMS receive previously, and nothing shows up at all in the logcat. They both send fine, just can't get anything back.
[Android Software Development] Lens_flare:
see adb logcat -b radio aka radio log. if something changes in cm, you might track that with their github (commits are dated).
[Android Software Development] AdhvanIt:
So it's more than likely a CM issue vs MIUI?
[Android Software Development] Lens_flare:
cm code tracking might help to find new smalis which should be applied, whether it is a cm issue or not.
[Android Software Development] v1r0x:
nVidia 670 ;)

The solution was so f**kin simple...Had to delete nvidia drivers and reinstall them after reboot.

But the internet was full of other "solutions" :D

Hope my port will work...it's about 6am and I want to sleep^^'
[Android Software Development] v1r0x:
Ok, I hate porting :D

All the sh*t from ICS is back in JB :(

Had to replace most of PowerManagerService*.smali and whole WebSettingsClassic tree (I found a way to just diff WebSettingsClassic.smali but this didn't work today). Also I have some new errors.

Buttons have no backlight until I toggle the auto-brightness button.

And "Auto brightness" isn't real auto-brightness. It sets the slider to another value and is still changable. Or is this a new CM feature?

I want the old JB back :(
[Android Software Development] CosmicDan:
Yep, I wish I knew how to build AOSP using CM10 device tree. But the problem there is that CyanogenMod fixes a lot of bugs in porting.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Lens_flare:
FXP just assembling AOSP for xperia S, who knows, maybe 2011 devices will also get something like that ;]

Anyway, to build AOSP you need all hardware fixes from CM, that nearly automatically turns into native methods adding -> will get the same CM but less featured :D
[Android Software Development] CosmicDan:
Yep, I did do a bit of research on compiling from source and realized that lol. The main problem I have with AOSP/CM10 is that it's so slow for my device. I recently ported Arc S MIUI (which is still ICS) to a stock ICS base for my device, and it's so much faster than a CM9/10 based port ever was. But unfortunately I can't get Wifi Tether working. Regardless, off topic.
[Android Software Development] Lens_flare:
tried to change interface for it? It's in framework-res.apk/res/values/arrays.xml
[Android Software Development] CosmicDan:
Yeah, i get a random error code from WifiState or something. But SoftAP itself seems to be working. Its probably because I use the Arc S MIUI, i couldnt be bothered fixing it because it works Ok in the other CM10 version.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Lens_flare:
[CdmaDCT] Data not allowed due to - psState= 1 - needs Provisioning

provisioning.. uhm, got rid of setup wizard?
[Android Software Development] CosmicDan:
Are you using an MIUI base built for CDMA? One of the Galaxy Nexus ROM's is CDMA, the "toro" device. Use that as a base.
[Android Software Development] AdhvanIt:
No, setup wizard is in there...

---------- Post added at 05:21 AM ---------- Previous post was at 05:19 AM ----------

I'm using a GSM base, Crespo. Actually had no trouble with my first port of it either from the same device. A few things were broken, but I've now found myself spending more and more time just trying to fix things that were fine before.
[Android Software Development] CosmicDan:
Well maybe you should try with the toro device, since it's CDMA. I had no issues using the maguro (Galaxy Nexus GSM) and toro (Galaxy Nexus CDMA) bases.
[Android Software Development] AdhvanIt:
Well I did figure out that whatever it was, was somehow correlated to the CM base. I rolled back to a week ago, and that fixed it.

Weird.

I'll try porting from Toro, see if things get any easier.

Sent from another Galaxy [S2]
[Android Software Development] a1exander:
My Facebook app on my port isnt working, it just says loading forever. Anyone know how to fix this?

Thanks in advance! :)
[Android Software Development] v1r0x:
Did you have a look at logcat?

I had a similar problem because of HTML5*.smali in framework.jar

Had to replace whol HTML5 tree
[Android Software Development] sorullo_xgrx:
framework.jar

Mostly issues are produced there.

Disassemble framework.jar from MIUI port you are working so you will see framework.jar.out. Go to smali folder in it. Later all actions we will produce from there (except assembling).

First replace some files from your base framework.jar (fist disassemble base rom's framework.jar and move all files I will specify, replace if asked).

Listing all smali I had to replace in framework.jar:

Im a little confuse here... Do I replace the files mentioned from the base framework to the Miui framework... I mean move from base to Miui framework?:confused:
[Android Software Development] pratikmore:
For Rilj and rilc issue; I replaced phone.apk and modified framework.jar then i got network and no Mic issue on my phone.

sent from my smooth Mokee Os
[Android Software Development] v1r0x:
Anyone an idea how to fix key backlight?

It's even on after lock the phone oO

Also, I have to toggle auto-brightness 2 times to get backlight at all :confused:

First time I have this problem
[Android Software Development] sorullo_xgrx:
Could you tell me what is that you modified on framework.jar to get you working network ? Thanks in advance
[Android Software Development] a1exander:
It seems that I JUST CANT GET FACEBOOK TO WORK. It drives me insane haha!

Anyone know how I can fix that? Facebook app just says "loading" forever. Also all web pages is shown in desktop view, not mobile versions? :S
[Android Software Development] pratikmore:
Ril.smali are used for network so you have to replace that with your class of ril.smali and phone factory.smali also.detailed info given on first page.miui rom smalis you have to replace with cm9/cmx rom smalis.

sent from my smooth Mokee Os
[Android Software Development] CosmicDan:
For Facebook app not working, replace entire HTML5* tree in Webkit and thats it - don't replace anything else. Additionally, apply these patches:

--- smali/android/webkit/WebViewCore$EventHub$1.smali Tue Jan 20 09:26:36 1970
+++ smali/android/webkit/WebViewCore$EventHub$1.smali Tue Jan 20 09:26:36 1970
@@ -3172,14 +3172,14 @@

const/4 v2, 0x4

aget v16, v17, v2

- #calls: Landroid/webkit/WebViewCore;->nativeSelectText(IIIIII)[Ljava/lang/String;
- invoke-static/range {v10 .. v16}, Landroid/webkit/WebViewCore;->access$6400(Landroid/webkit/WebViewCore;IIIIII)[Ljava/lang/String;
+ #calls: Landroid/webkit/WebViewCore;->nativeSelectText(IIIII)V
+ invoke-static/range {v10 .. v15}, Landroid/webkit/WebViewCore;->access$6400(Landroid/webkit/WebViewCore;IIIII)V

- move-result-object v52
+ goto/16 :goto_0

.line 1760
.local v52, strArray:[Ljava/lang/String;
move-object/from16 v0, p0

--- smali/android/webkit/WebViewCore.smali Tue Jan 20 09:26:36 1970
+++ smali/android/webkit/WebViewCore.smali Tue Jan 20 09:26:36 1970
@@ -1675,27 +1675,24 @@
invoke-direct {p0, p1}, Landroid/webkit/WebViewCore;->nativeClearTextSelection(I)V

return-void
.end method

-.method static synthetic access$6400(Landroid/webkit/WebViewCore;IIIIII)[Ljava/lang/String;
- .locals 1
+.method static synthetic access$6400(Landroid/webkit/WebViewCore;IIIII)V
+ .locals 0
.parameter "x0"
.parameter "x1"
.parameter "x2"
.parameter "x3"
.parameter "x4"
.parameter "x5"
- .parameter "x6"

.prologue
.line 60
- invoke-direct/range {p0 .. p6}, Landroid/webkit/WebViewCore;->nativeSelectText(IIIIII)[Ljava/lang/String;
+ invoke-direct/range {p0 .. p5}, Landroid/webkit/WebViewCore;->nativeSelectText(IIIII)V

- move-result-object v0
-
- return-object v0
+ return-void
.end method

.method static synthetic access$6500(Landroid/webkit/WebViewCore;III)Z
.locals 1
.parameter "x0"
@@ -3348,11 +3345,11 @@
.end method

.method private native nativeSelectAll(I)V
.end method

-.method private native nativeSelectText(IIIIII)[Ljava/lang/String;
+.method private native nativeSelectText(IIIII)V
.end method

.method private native nativeSelectWordAt(III)Z
.end method