yashsingh1/xdaforums huggingface dataset:
[Android Software Development] _polimorph_:
sms signal

Here's the radio logcat for the signal dropping problem that jimbo77 adresed a few posts back.

http://pastebin.com/qtVe5sM4

Any help is greatly apreciated.

Thank you.
[Android Software Development] CosmicDan:
You did it wrong :)

Grab android.policy.jar from my ROM (turbo miui, in sig) and compare with yours. There is a caveat - when screen is off, volume up does nothing and holding any vol key only skips forward. Im not that skilled in smali and cant fix that.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] v1r0x:
I have 2 "new" questions...

I don't like the spelling correction and the vibration on pressing the on-screen keyboard keys.

So I disabled both in settings, but it didn't change anything :confused:

Any ideas?
[Android Software Development] Lens_flare:
device is sgs3 right? But.. isn't it using different rill class that sgs2 and note? I clearly see SMDK4210RIL is used, try another one, that suitable only for sgs3.

works for me..

I heared htc device trees applying some hacks to keyboard, so try to use cm10 one (which is anyway has the same features and skin).
[Android Software Development] v1r0x:
great miui :D

question: where is the keyboard?
[Android Software Development] Lens_flare:
don't forget: each rom based on stock rom of device, so nexus roms are based on AOSP, hope next statement would be too obvious to write :D

only mi-devices might have all the customisations of miui, that's marketing :p

LatinIME.apk.
[Android Software Development] _polimorph_:
Thanks. It's S3, right. I know CM10's ril used is SMDK4210RIL as is stated in build.prop. What other rils could be appropriate, maybe search them in a Sammy JB leak rom?
[Android Software Development] shubhamchamaria:
http://logcat.miui.us/1104001

My log...not booting...cant figure out the error....
[Android Software Development] v1r0x:
807:	E/dalvikvm( 1454): Class lookup Landroid/webkit/WebSettingsClassic$AutoFillProfile; attempted with exception pending

I had to replace all WebSettingsClassic*.smali files to get it working.

---------- Post added at 08:24 PM ---------- Previous post was at 07:52 PM ----------

I just hate the fact it's not that easy to port anymore ;) :D

Unfortunately that doesn't work :(

I've pushed LatinIME.apk with adb and also tried to set the settings to ON and OFF again.

Edit: but I have also another bug.

I disabled the "wake the phone with trackpad" but I can unlock the phone with the trackpad.

I think the best solution is to buy a new phone :D
[Android Software Development] ---UFO---:
I have attached the full logcat.
[Android Software Development] shubhamchamaria:
Thought so...but didn't think such an error could mess up full boot ...

Thanks a lot...

Sent from my HTC One V
[Android Software Development] shubhamchamaria:
New log...still not booting...

Tried two more things...

http://logcat.miui.us/1108002
[Android Software Development] CosmicDan:
I dunno why you guys had to replace WebSettingsClassic*, I didn't have to. My CM10 already had that stuff, maybe the CM10 for your device is out of date to latest changes (or mine is out of date).

EDIT: Rather than replacing WebSettingsClassic* tree, I think it'd be best to patch smali with missing methods.
[Android Software Development] CosmicDan:
That yellowpage error can be ignored, I get it too. But the Yellowpage tab in Browser still shows the preset links in the DB file.
[Android Software Development] _polimorph_:
You have to replace InputManagerService*.smali tree from services.jar/com/android/server/input/ from base to port.

Good luck and happy porting!
[Android Software Development] Lens_flare:
found!

The solution is bit ugly but allows to skip most part of the wizard to launcher (language picker->wifi->launcher).

My hack is based on the following idea:

wizard checks if sim is not accessible and gives you an option to skip whole process right to the end. To obtain sim, wizard does comparassion between value returned and constant value 0x5 which seems stands for "sim ready" and contains a goto to sim prompt. There is another goto point, which goes right to the launcher (at last unlocks all) so I redefined that point in switch. About constant value 0x5 - what if we change it to something that system will never reach? For example -0x2 (who the hell will assign status value to -2? :D).

All that action is going on that method of defaultactivity.smali:

.method protected onActivityResult(IILandroid/content/Intent;)V

that's what we see:

invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getSimState()I
move-result v1
const/4 v2, 0x5
if-ne v1, v2, :cond_4

cond_4 goes to some log task we are not interested in..

most interesting part is cond_5:

:cond_5
invoke-direct {p0}, Lcom/android/provision/DefaultActivity;->finishSetup()V
goto :goto_1

right to finish, yyeah :D

so mod will look like that:

invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getSimState()I
move-result v1
const/4 v2, -0x2
if-ne v1, v2, :cond_5

I will also try to leave cond_4, it will possibly shock a user with "sim not found" prompt, but they at last could get a xiaomi account right from that wizard, AND users who don't need such, just will skip that prompt, like they maybe used to with google account prompt :P
[Android Software Development] jimbo77:
If you don't use the SMDK4210RIL the phone will boot but no Signal at all and Phone apk will keep crashing!
[Android Software Development] Lens_flare:
if he change SMDK4210RIL to samsungd2qualcommril in phonefactory.smali, there will be another effect, I couldn't predict whichbone but hope it would at last not crash phone.apk ;]
[Android Software Development] AdhvanIt:
Okay, so hopefully you guys can forgive my porting noobishness here.

Once the initial port is up and running, do we have to complete these same steps every week, or is there a way to find and merge in the exact changes that were made in the current weeks MIUI build?

Sent from another Galaxy [S2]
[Android Software Development] v1r0x:
You have to make the same changes every week, but trial&error only in initial port (or if latest port doesn't boot anymore ;))
[Android Software Development] CosmicDan:
Learn to write batch (or bash) scripts and use patch files ;)

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] AdhvanIt:
I was afraid that would be the answer.

2.9.7 ported just fine with a few hours work. My only issues are wimax, USB mass storage, a2dp, MMS receive and 3mp max on camera.

I've spent the last week trying to update it to 2.9.14 and just running into more issues than I can count. When I finally do get it booted, SystemUI crashes every time I plug the device into the PC and gives me a lot of WTF errors that I can't make out, then reboots. Gets stuck in a boot loop until I unplug.

I'll start on 2.9.21 tonight and post logs if I can't figure it out...

Sent from another Galaxy [S2]

---------- Post added at 01:14 PM ---------- Previous post was at 01:09 PM ----------

See, this is what I was looking for. I found that official MIUI releases patch updates, but don't know how to go about adding them. I'm certain its not the same as patching a kernel..

Sent from another Galaxy [S2]
[Android Software Development] CosmicDan:
Well official MIUI can do that easily because they build from source.

But what i meant was writing .patch files to inject smali code. And use batch routines to handle the automation and rejects (if any).

I plan to release my kitchen soon, while its for the Xperia Play if you have above average knowledge of batch files it could be a good idea to look at.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] AdhvanIt:
Okay, guys..

Log:

W/dalvikvm( 1808): VFY: register index out of range (1 >= 1)
W/dalvikvm( 1808): VFY: rejecting opcode 0x12 at 0x0002
W/dalvikvm( 1808): VFY: rejected Landroid/os/SystemProperties;.<clinit> ()V
W/dalvikvm( 1808): Verifier rejected class Landroid/os/SystemProperties;
W/dalvikvm( 1808): Exception Ljava/lang/VerifyError; thrown while initializing Landroid/os/Build;
W/dalvikvm( 1808): Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Landroid/os/StrictMode;

What does it take to get rid of this? I've added the exact same lines that I did in the previous build.. Had no issues with that one.
[Android Software Development] CosmicDan:
Copy SystemProperties.smali from CM.
[Android Software Development] AdhvanIt:
Wow....

That easy. What would have made the difference that I was able to just diff the CM one with MIUI one for 2.9.7?

:confused:
[Android Software Development] Lens_flare:
That's because of jellybean.

Now systemproperties is not enough to just diff, you have to add method that marked as "similar but different"(red block) but with awazreness of .line fields and some else.
[Android Software Development] AdhvanIt:
I'm out of thanks.. I'll see if I can remember to get you guys tomorrow.

That got it down to just a few other smali issues, and its running great now.. You guys are awesomely helpful!
[Android Software Development] v1r0x:
They have changed a bit since 2.9.14 so you have to read logcat. But all my ICS build needed the same changes, so no big deal ;)
[Android Software Development] Lens_flare:
new smali this week:

com/android/server/Watchdog*.smali

hell.. cm complicating things more and more..

PS: released mine port :P

http://miuiandroid.com/community/threads/rom-unlocked-bl-codename-miui-5.18214/
[Android Software Development] v1r0x:
Good for me, never heard of that smali :D

But I fixed the WebServiceClassic-sh*t and now I only had to diff 1 or 2 WebServiceClassic* smalis and replace whole HTML5 tree. Thanks@meld diff viewer :D

Also I've fixed the keyboard problem. The toggles in Settings>Language & Input doesn't change anything. I have to change it in Keyboard Settings (the icon behind the keyboard [for me it is "Android Keyboard (AOSP)"]). So I got rid of this f*ckin vibration.

Also CRT off animation works as default.

Unfortunately, GoogleEars still don't work :(
[Android Software Development] Lens_flare:
what the hell is that GoogleEars?

Google search fix is in google_recognizer_jni.so.
[Android Software Development] AdhvanIt:
Actually, 2.9.21 took me a whole four hours to update to latest CM base and 2.9.21 base. There were a number of changes, but nothing like the issues I had with 2.9.14. =)
[Android Software Development] v1r0x:
It is an app similar to "shazam" to recognize songs. It's only available as widget and included in gapps (not in play store)

Sent from my awesome Desire Z with MIUI JB using the xda-developers app
[Android Software Development] AdhvanIt:
Okay, first, I'll explain my issue..

1. USB mass storage works, but only mounts external SD.

2. Media apps on device will not read edternal SD, but root explorer sees it and contents just fine.

3. Internal storage is readable through all apps.

When shutting down my device, it unmounts both. Except that the are going status "unmounted to unmounted"?

D/VoldCmdListener( 1803): storage users /storage/sdcard1
D/VoldCmdListener( 1803): storage users /storage/sdcard0
D/dalvikvm( 2063): GC_EXPLICIT freed 973K, 21% free 18854K/23800K, paused 4ms+6ms, total 97ms
I/PackageManager( 2063): Updating external media status from unmounted to unmounted
D/VoldCmdListener( 1803): volume unmount /storage/sdcard1 force
D/Vold ( 1803): Volume sdcard1 state changing 4 (Mounted) -> 5 (Unmounting)
D/MountService( 2063): sendStorageIntent Intent { act=android.intent.action.MEDIA_EJECT dat=file:///storage/sdcard1 (has extras) }

Idk. Here's a long logcat showing from boot, and mount/unmount of mass storage.

Logcat.

Any thoughts?
[Android Software Development] killjoy1179:
what up everybody? I figured I'd come here to seek out some help for this huge problem I have...

Over in the Droid razr forums, we have an "MIUI port" and to be honest...its crap. Data drops and only way to fix is with a reflash, no 3g on newer versions of it, lag in the older versions with 3g, auto brightness problems, pretty sure there's some themeing issues also...

Anyways, the dev for the rom claims he's hard at work but the last time he updated the rom was in June. So I was wondering if anyone could share with me some info on how to fix some of these problems. I wanna take this on myself since obviously nobody else is. Biggest problem is getting 3g...3g worked on the older version but you would have to go into the phone info app and toggle the radio then change network type every time u restart the phone... so I want to get atleast 3g on the smooth running version on the rom. I have no clue where to start, that's why I'm here..

So to anyone that can help, me and the Droid razr community thanks you.

Sent from my liquid smooth RAZR
[Android Software Development] shubhamchamaria:
How is that possible. ? check hacker2c miui official....it is last updated to 2.8.31 and that was released on 31st August....

Sent from my One V
[Android Software Development] killjoy1179:
U gotta link for it?...also I'm on the cdma version...GSM versions of miui are great, its the cdma versions that are suffering

---------- Post added at 12:51 AM ---------- Previous post was at 12:41 AM ----------

Just checked it and yes, that's for the GSM version.
[Android Software Development] Lens_flare:
then you should work on cm, noty on miui, as problem you described couldn't be fixed by replacing smalis,
[Android Software Development] shubhamchamaria:
GETTING MIUI TO BOOT TIPS

1.) Port rom from closest device

2.) If it doesnt boot and is stuck on boot anim do adb logcat > xyz.txt

3. go to logcat ...do ctrl+f type "jnihelp"

4.) try to see if some smali names appear...

5.)whatever comes just replace the whole tree from cm9/cm10...

This has helped me in the past.. Hope it helps you...
[Android Software Development] Lens_flare:
not true.

only nexus might provide you best result of porting

described in stage 3 :P

not true, you have to patch some smali before problem is only deepen
[Android Software Development] Rocky$1:
What should be done for the following JNIHelp error?

E/dalvikvm( 134): ERROR: couldn't find native method

E/dalvikvm( 134): Requested: Llibcore/net/RawSocket;.create:(Ljava/io/FileDescriptor;SLjava/lang/String;)V

E/dalvikvm( 134): Candidate: Llibcore/net/RawSocket;.create:(Ljava/io/FileDescriptor;Ljava/lang/String;)V

E/JNIHelp ( 134): RegisterNatives failed for 'libcore/net/RawSocket', aborting

F/libc ( 134): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 134 (zygote)

I/DEBUG ( 131): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

I/DEBUG ( 131): Build fingerprint: 'htc_wwe/htc_bravo/bravo:2.3.3/GRI40/96875.1:user/release-keys'
[Android Software Development] CosmicDan:
Remove the native method from the smali, or replace the lib that has the native method.
[Android Software Development] killjoy1179:
Work on cyanogenmod?
[Android Software Development] Lens_flare:
Nothing, error is seems not there.

yes. If in CM you have that problem, you won't fix it by porting MIUI.
[Android Software Development] Stickman89:
Figured this one out already.

Edit: Thanks v1r0x, figured this one out. Btw longpress text to initiate the magnifier and let me know if your browser quits without error. That will be where the 'WebViewCore$EventHub$1.smali' kicks in, that needs to be ammended as per CosmicDan's instructions however that 'goto/16 :goto_0' line is incorrect.
[Android Software Development] Trublood_:
Ok, thanks a lot! I ported succesfully from Galaxy Ace to Galaxy mini, only problem that I have now is that that android.com.phone keeps stopping/FCs. Should I replace it ?
[Android Software Development] v1r0x:
All I had to do was

replacing whole HTML5 tree

diff WebServiceClassic.smali
[Android Software Development] killjoy1179:
We have so many cm9 roms and none have data problems.
[Android Software Development] Stickman89:
@v1r0x - thanks, I edited my message already figured it out earlier but I'd like to know how CosmicDan solved the unexpected quit when initiating magnifier in browser as when you replace the line 'move-result-object v52' with 'goto/16 :goto_0' as instructed it fails to compile dex with error "WebViewCore$EventHub$1.smali[3180,13] Label "goto_0" is not defined."

Edit: I believe it is meant to be "goto/16 :goto_1f" but doing so gives error "mismatched input 'Igoto' expecting set null"...

Edit2: Figured it out now I believe...

(File: WebViewCore$EventHub$1.smali)

#calls: Landroid/webkit/WebViewCore;->nativeSelectText(IIIII)V
invoke-static/range {v10 .. v15}, Landroid/webkit/WebViewCore;->access$6400(Landroid/webkit/WebViewCore;IIIII)V

goto/16 :goto_1f

Then search for "Igoto" (there's only one) and remove that offending phrase to solve compile error.

(File: WebViewCore.smali):

.method static synthetic access$6400(Landroid/webkit/WebViewCore;IIIII)V
.registers 8
.parameter "x0"
.parameter "x1"
.parameter "x2"
.parameter "x3"
.parameter "x4"
.parameter "x5"

.prologue
.line 60
invoke-direct/range {p0 .. p5}, Landroid/webkit/WebViewCore;->nativeSelectText(IIIII)V

return-void
.end method

Along with diffing the missing entries from CM10 for "mMediaPreloadEnabled" and "mWebGLEnabled" within WebSettingsClassic.smali and replacing HTML5*.smali tree with CM10's.
[Android Software Development] CosmicDan:
Here is my framework.jar, diff it all to MIUI v2.9.14 for Nexus S (what it's built with) to find the changes I made.

Mainly the stuff in webkit us what you'll need, of course you know that - ignore the changes to app/Activity (that's for Xperia Play touchpad support). It might still not work on yours though, due to CM10 builds being different on different devices (my device is Xperia which uses FXP fork of CM10 until compatible with official Cyanogenmod tree)
[Android Software Development] Stickman89:
Thank's Cosmic for getting back to me, I did get there in the end as you can see from the post you quoted from hehe :P wasn't quite sure why it was all foreign to me at the time, however got there in the end just deciphering logcats after each diff with minimal replacing of CM10 smali files.

Best Regards,

s89
[Android Software Development] CosmicDan:
Sorry I just skimmed over that post lol. Yeah took me a while too, random experimentation with that synthetic access method (it was a *****).

I'm on the backburner for a while, my current ROM is based on Arc S MIUI (ICS) using a stock ICS based ROM for my device. It works 100% with zero smali changes. Wow. And much faster than CM10. Also, the ICS MIUI ROM's no longer have a framework2.jar so there is no kernel changes needed.
[Android Software Development] Stickman89:
Curious whether or not anyone got to the bottom of the Custom Ringtone mishap which we know as a MIUI bug. Seems like a permission issue but I can't quite trace the culprit, the custom ringtones download successfully to /storage/sdcard0/MIUI/ringtone/ just when you receive a phone call it defaults to a basic single tone ringtone for which I can't even find the resource of within the system.

I'm quite aware of the current temporary workarounds i.e. using MIUI Music Player to set ringtones or alternatively using a root file explorer (e.g. SolidExplorer) to copy the custom ringtones to the /system/media/audio/ringtones/ directory and applying through Settings > Sound Settings > Phone Ringtone > System Resources.

I have also tried injecting read external storage permissions into the AndroidManifest to solve this issue to no avail, has anyone got a fix regarding this issue?
[Android Software Development] CosmicDan:
Im pretty sure its an MIUI bug. Many users of officially supported devices report it too.

Download a tone with Theme Manager, then put your tones in the new folder in sdcard/miui/somewhere/

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] _polimorph_:
Have you replaced WifiNative.smali from base to port?
[Android Software Development] _polimorph_:
Can you please share the solution?
[Android Software Development] Lens_flare:
don't forget - you need a very similar device to those presented as officially supported to port latest ics version :P

performance does not worth lost nerves :P
[Android Software Development] chiragkrishna:
guide 3 way reboot for JB-MIUI's HERE
[Android Software Development] _polimorph_:
I have laggy statusbar also. Has anyone found a solution?
[Android Software Development] Lens_flare:
Even if you and MIUI don't have MTP, system have to construct MTPService as API at last.
[Android Software Development] CosmicDan:
Ok... well I never had this error myself so I'm only making an educated (yet bad) guess :silly:
[Android Software Development] theROMinator:
Possibly the longest logcat I could have gotten ;)

Btw I am using CM9s lib/hw

https://gist.github.com/2fcfccebd334411f4e69
[Android Software Development] Lens_flare:
of course, it's sp**** like hell!

The only I could see:

*** FATAL EXCEPTION IN SYSTEM PROCESS: android.server.ServerThread

java.lang.RuntimeException: Error receiving broadcast Intent { act=android.hardware.usb.action.USB_STATE flg=0x20000010 (has extras) } in com.android.server.MountService$1@41ac13b8

is mass storage ported correctly?

ah, also that one:

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

so SamsungQualcommD2RIL missing, it's custom ril class, located at framework.jar/smali/com/android/internal/telephony.
[Android Software Development] ThEuNdYiNg1:
hey do you guys know how i can fix keyboard lights, the issue is when ever i toggle the brightness control on and off the keyboard lights turn on, i know pretty weird. i just want the lights to turn on when i slide the keyboard out.

https://gist.github.com/9547d429ab0129b38185