yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Ozadroid:
put the below missing smalis, if not found in CM10 leave it move to next.

W/Zygote ( 2868): Class not found for preloading: android.animation.ValueAnimator$2
W/Zygote ( 2868): Class not found for preloading: android.animation.ValueAnimator$3
W/Zygote ( 2868): Class not found for preloading: android.animation.ValueAnimator$4
W/Zygote ( 2868): Class not found for preloading: android.animation.ValueAnimator$5

W/Zygote ( 2868): Class not found for preloading: android.content.res.Resources$1
W/Zygote ( 2868): Class not found for preloading: android.database.sqlite.SQLiteCompiledSql
W/Zygote ( 2868): Class not found for preloading: android.database.sqlite.SQLiteDatabase$DatabaseReentrantLock

W/Zygote ( 2868): Class not found for preloading: android.media.AudioManager$2

W/Zygote ( 2868): Class not found for preloading: android.view.InputHandler
W/Zygote ( 2868): Class not found for preloading: android.view.InputQueue$FinishedCallback

replace framework.jar/android/webkit/WebView*.smali for below error.

I/dalvikvm( 2868): threadid=1: recursive native library load attempt (/system/lib/libwebcore.so)
D/dalvikvm( 2868): No JNI_OnLoad found in /system/lib/libchromium_net.so 0x0, skipping init
I/dalvikvm( 2868): Could not find method android.webkit.WebViewCore.getReadModeString, referenced from method android.webkit.WebViewClassic.enterReadMode
W/dalvikvm( 2868): VFY: unable to resolve virtual method 41142: Landroid/webkit/WebViewCore;.getReadModeString ()[Ljava/lang/String;
D/dalvikvm( 2868): VFY: replacing opcode 0x6e at 0x0002

try may u get a different log :D
[Android Software Development] janeindiran:
Gonna try. If i still have issues, i will post.
[Android Software Development] janeindiran:
still the same issue. Logcat attached below
[Android Software Development] v1r0x:
I'm porting from v4.1/5 (aka JB).

Do you have Power.smali in framework.jar/android/os ?
[Android Software Development] janeindiran:
No we don't have man. I ported the first JB release without any issue. But the latest builds throw a lot of bugs

---------- Post added at 10:18 PM ---------- Previous post was at 10:17 PM ----------

I replaced the webview smali. I just gave this command adb logcat -d > logcat.txt. Is this command right??
[Android Software Development] Ozadroid:
I told u to replace WEBVIEW*.smali

The * means u hav 2 replace all the smali starting wid WEBVIEW

I use dis cmd n it wotks fine.. i dunno what the attribute -d does.

adb logcat > logcat.txt
[Android Software Development] janeindiran:
I replaced dude. here is the new log. whats happening?
[Android Software Development] v1r0x:
E/AndroidRuntime( 2537): *** FATAL EXCEPTION IN SYSTEM PROCESS: WindowManagerPolicy

E/AndroidRuntime( 2537): android.content.res.Resources$NotFoundException: Resource ID #0x6060008

Maybe this is your problem.

I had a similar error with an ID for usb.
[Android Software Development] :
E/dalvikvm( 3448): Requested: Lcom/android/nfc/nxp/NativeNfcManager;.disableCE_A:()V

E/JNIHelp ( 3448): RegisterNatives failed for 'com/android/nfc/nxp/NativeNfcManager', aborting

F/libc ( 3448): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 3448 (com.android.nfc)

where is this.
[Android Software Development] Ozadroid:
most probably in services.jar
[Android Software Development] :
already checked.
[Android Software Development] :
No implementation found for native Lcom/android/internal/app/ActivityTrigger;.native_at_startActivity (Ljava/lang/String;)V
[Android Software Development] junixquiaoit:
how about headset fix? help pls?
[Android Software Development] Lens_flare:
in nfc.apk ;)
[Android Software Development] Ozadroid:
okay! that i saw. but how to implement it? :-/
[Android Software Development] dekkyy:
Anyone know why headset is not recognized? If i use headset fix from market, than it is working ok.
[Android Software Development] Lens_flare:
there is a smali like WiredObserver or something like that in services.jar.

It should contain 4 lines about headset driver path ending with "h2w"(sys/class/switch/h2w or something like that), see if your base have different ones and replace.
[Android Software Development] Ozadroid:
Lens any clue on this?? :(
[Android Software Development] Lens_flare:
contact database broken, no clue else.
[Android Software Development] Ozadroid:
Hmm yes.. i replaced contacts.apk and contactsprovider.apk from cm9 n this error is gone!! But the other following error regarding activitystart isnt.. will try to remove that method n try as i get to my pc.
[Android Software Development] shubhamchamaria:
My cm10 has framework2.jar defined...any idea what to do...just transfer from base or remove from init.rc

Sent from my One V
[Android Software Development] CosmicDan:
Err.... Replace it with framework2.jar from MIUI.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] v1r0x:
Did you try to diff/replace the file with the one from cm/base?
[Android Software Development] CosmicDan:
Obviously you cant just remove the native method because other functions call it. You can either find the library in MIUI ROM that uses it and replace it, or if not possible then you need to remove all references to the native method that you removed.

EDIT: Search for .line 56 in ActivityTrigger.smali (wherever that is) and remove the method call. You might need to dummy some variables if it depends on it returning something.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] janeindiran:
I replaced those files too. It didn't help.

---------- Post added at 06:15 PM ---------- Previous post was at 06:04 PM ----------

Can anyone help me solve this issue. I am stuck here
[Android Software Development] Ozadroid:
there is no smali by that name in cm9.

trying wid copying missing libs from miui. meanwhile, here is the method that calls activityStartTrigger.

.method public activityStartTrigger(Landroid/content/Intent;)V
.registers 4
.parameter "intent"

.prologue
.line 51
invoke-virtual {p1}, Landroid/content/Intent;->getComponent()Landroid/content/ComponentName;

move-result-object v1

.line 52
.local v1, cn:Landroid/content/ComponentName;
const/4 v0, 0x0

.line 54
.local v0, activity:Ljava/lang/String;
if-eqz v1, :cond_b

.line 55
invoke-virtual {v1}, Landroid/content/ComponentName;->flattenToString()Ljava/lang/String;

move-result-object v0

[B] .line 56
:cond_b
invoke-direct {p0, v0}, Lcom/android/internal/app/ActivityTrigger;->native_at_startActivity(Ljava/lang/String;)V[/B]

.line 57
return-void
.end method

can u help me removing that line. i tried removing this.. but it gave me some error while smaling. i can read code somewhat but very poor at writing them :(
[Android Software Development] CosmicDan:
Just remove that invoke-direct line after cond_b. It seems to be custom code for miui with jb framework running on ics, so it might not work (could be critical needed method).

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] janeindiran:
I found a working way. I shouldn't port using this method, its a bit more complicated.
[Android Software Development] Hikari:
I booted up jb miui, but theres another thing now. After unlocking the phone(sliding down the circle in ls) I get the screen frozen.. I lock and wake the device again, unlock it and again the same problem.. I think some smalis should be added. but I dont know which ones.. Any help? Thanks!

Im sorry I cant provide a logcat as pc doesnt recognize my phone...
[Android Software Development] Hikari:
Anyways, can someone check this log? its from miui gb. CosmicDan? Thanks!
[Android Software Development] janeindiran:
I successfully ported for my device. Its a really complicated, but works fine. Thanks for helping me guys.
[Android Software Development] CosmicDan:
No idea.
[Android Software Development] Lens_flare:
W/PackageManager(2346): Running ENG build: no pre-dexopt!
09-03 16:22:31.473: W/PackageParser(2346): /system/framework/framework-res.apk
09-03 16:22:31.473: W/PackageParser(2346): java.lang.NullPointerException

framework-res.apk or its odex is missing.
[Android Software Development] CosmicDan:
My turn to ask for help :P

When I end a call, the speaker device does not switch back to loudspeaker. I.e. all the sounds come out of the earpiece instead. I have to replug a headset/headphones for it to switch back to loudspeaker for sound. Any idea which smali I should look at for that?

EDIT: When the call disconnects, I see this:

E/CallCard( 595): MIONE:call.state: DISCONNECTED
D/PhoneStatusBar( 539): disable: < EXPAND icons alerts* ticker system_info back home recent clock >
E/CallCard( 595): MIONE:call.state: DISCONNECTED
I/AudioHardwareMSM7X30( 154): Routing audio to Handset
D/AudioHardwareInterface( 154): setMode(NORMAL)
I/AudioHardwareMSM7X30( 154): Routing audio to Handset
D/AudioHardwareMSM7X30( 154): new_rx = 0
D/AudioHardwareMSM7X30( 154): new_tx = 1
D/AudioHardwareMSM7X30( 154): Ending Voice call
E/AudioHardwareMSM7X30( 154): updateDeviceInfo: E rx_device 0 and tx_device 1
D/AudioHardwareMSM7X30( 154): No active voicecall/recording, disabling cur_tx 1
D/AudioHardwareMSM7X30( 154): value of device and enable is 1 0 ALSA dev id:1
D/AudioHardwareMSM7X30( 154): The node type is 1 and cur device 0 new device 0
E/AudioHardwareMSM7X30( 154): updateDeviceInfo: X cur_rx 0 cur_tx 1

But I should be seeing this:

I/AudioHardwareMSM7X30( 154): Routing audio to Speakerphone
[Android Software Development] Lens_flare:
sounds like you have wrong audiolib/audio config/build.prop line
[Android Software Development] CosmicDan:
Thanks, but sorry for the false alarm - it's a bug in CM10 for my device - not related to MIUI.
[Android Software Development] CosmicDan:
Dictionary missing does not cause boot to break, I have that error but it boots fine.

CM10/JB doesn't have that native_has_ulp_capability, so it's another MIUI4.1-on-ICS custom method. Remove the method from the location code (GpsLocationProvider.smali) or find the MIUI lib that has it and use it.
[Android Software Development] Ozadroid:
its CM9 based!

if i remove that native it asks for it. n if i put it this error occurs.

i hv dese gps related libs in base miui. will try putting these n see.

libgps.so

libgps.utils.so

libgpsone_bit_api.so
[Android Software Development] CosmicDan:
I know its CM9 based, what im saying is that the native isnt even on CM10.

Remove the code from other smalis that also call that native method, like the logcat says (trace back thru line numbers)

Search for the native name *inside* libs instead of just randomly copying.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Ozadroid:
ok! but howto break .so ?? :-s
[Android Software Development] CosmicDan:
Notepad ++ "Find in files", search lib\*.so for the missing method. Then you have the lib you need. If its critical lib like libandroid_runtime (commonly is) then you will have to patch smali instead.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Ozadroid:
thnx bro that is something very usefull. i searched the whole internet to break .so n cant find. now it will help me more.

also i searched the libs. and the match was libandroid_servers.so that is main lib i suppose.

but also i just saw the lockscreen on my phone :D :D :D :D :D after removing the hybridprovider.smali and lines regarding hybridprovider and has_ulp_capability from diff smalis. but after 2-3 se the phoneui crashed n the rebooted the phone.

now m taking some rest as i m not feeling well. will look at the error n what works n what is broken due to this editing in GPS smalis. but atleast i saw the lockscreen after 3 weeks .. yaaaaaaaaaaaaaaaaaaaay :victory::victory::victory::victory::D
[Android Software Development] CosmicDan:
Yep thats a main lib file. So GPS may be broken, you will have to implement Cm9 smali files somehow.

Glad to hear it. That crash is probably something new though. Bugs from here on can be harder, for example I have PIN prompt on startup with no idea how to fix lol.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] v1r0x:
Anyone an idea for my auto-rotation/keyboard-problem?
[Android Software Development] Ozadroid:
saw this field in IccCardStatus.smali

.field private mUniversalPinState:Lcom/android/internal/telephony/IccCardStatus$PinState;

see if u can get help from dere!
[Android Software Development] Lens_flare:
You anyway have WIndowManagerPolicy.smali and it anyway have 0,1 and -1, exchange them all and let's see ;]
[Android Software Development] v1r0x:
a few pages ago I've posted what I did, but I still get an status bar notification to choose input method (if I choose "on" I have no on-screen keyboard and if I choose "off" I have always the on-screen kb). And there are many appearances of those 3 values ;)
[Android Software Development] Lens_flare:
Ozadroid

files to investigate: invoke-as, busybox,toolbox,su.
[Android Software Development] Ozadroid:
i have put invoke-as and gave perm also. replaced su also from miui.

busybox n toolbox are same as of cm9!

did i miss something ?? :(
[Android Software Development] Lens_flare:
you know that you shouldn't even touch them without an eccesive need?
[Android Software Development] mscreater:
about the rotation

please carefully read the guide part 4, at last then you will find the solution
[Android Software Development] v1r0x:
yeah, I read it, but there is no method called "getSwitchState" in JB. Also there are many appearances of 0x0, 0x1 and -0x1. So I don't know which of them I should modify.
[Android Software Development] Ozadroid:
but u said in first post to replace su from miui :-s

also 1 confusion.

/system/xbin/su", "/system/bin/su",

here in 2nd argument is this BIN correct or shud it be XBIN?? coz dere is no /system/bin/su neither in cm9 nor in miui.
[Android Software Development] v1r0x:
It should be in xbin. But sometimes you need su in both (bin AND xbin). In my older ports on ICS I had su in bin and xbin.
[Android Software Development] Lens_flare:
the only things he doing are reading my guide and trying to apply it to jellybean :D

About problem, will look into source about keyboard ASAP..

SU, not busybox and toolbox.
[Android Software Development] Ozadroid:
i didnt say i replaced toolbox or busybox! i jus replaced su and copied invoke-as! :D

---------- Post added at 07:42 PM ---------- Previous post was at 07:39 PM ----------

so if i dont hv su in bin folder i shud put it dere?? or just use "/system/xbin/su", ??
[Android Software Development] Lens_flare:
symlink (one in first post) would be better.
[Android Software Development] Ozadroid:
Guys help me. i can see the lockscreen. it stays dere for 3-4 secs n then reboots.

may b some problem wid location manager. n idk what to do here! i just patched the GpsLocationProvider.smali with the fields n methods it was asking for!

replacing it gives more errors!

W/dalvikvm( 203): VFY: storing type 'Lcom/android/server/LocationManagerService$2;' into field type 'Lcom/android/internal/content/PackageMonitor;' (Lcom/android/server/LocationManagerService;.mPackageMonitor)

W/dalvikvm( 203): VFY: rejecting opcode 0x5b at 0x0074

W/dalvikvm( 203): VFY: rejected Lcom/android/server/LocationManagerService;.<init> (Landroid/content/Context;)V

W/dalvikvm( 203): Verifier rejected class Lcom/android/server/LocationManagerService;

F/SystemServer( 203): BOOT FAILURE starting Location Manager

F/SystemServer( 203): java.lang.VerifyError: com/android/server/LocationManagerService

F/SystemServer( 203):	at com.android.server.ServerThread.run(SystemServer.java:460)

I/SystemServer( 203): Location Manager

W/SystemServer( 203): ***********************************************

D/VoldConnector( 203): SND -> {volume list} {null}

and idk what is wrong with libc.so

F/libc ( 360): Fatal signal 4 (SIGILL) at 0x000086b0 (code=1)

then

F/libc ( 110): Fatal signal 8 (SIGFPE) at 0x0000006e (code=0)

and then

F/libc ( 106): Fatal signal 13 (SIGPIPE) at 0x0000006a (code=0)

then again!

F/libc ( 847): Fatal signal 4 (SIGILL) at 0x000086b0 (code=1)

and den follows big blocks of FATAL EXCEPTIONs and then everything die!

full log: http://logcat.miui.us/1042003

attached my updater-script pls check if invoke-as n su r ok in it!
[Android Software Development] janeindiran:
Guys i have two issues with my JB port on DEFY.

1. Themes doesn't apply.

2. When i use usb.apk from CM10, it simply says you can't use usb mass storage mode but i didn't have this issue in v4. I didn't change anything in framework-res.apk.

Can anyone help????
[Android Software Development] vijendrahs:
Any help on this? Just followed basic steps and not mods.. with MIUI 2.8.17 it was all good, but with 2.8.24 I am stuck on boot loop..

I/ActivityManager( 318): Launching preboot mode app: ProcessRecord{423eae88 541:com.google.process.gapps/u0a26}

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

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

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

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

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

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

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

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

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

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

E/AndroidRuntime( 318):	at com.android.server.ServerThread.run(SystemServer.java)
[Android Software Development] Lens_flare:
W/dalvikvm( 203): Verifier rejected class Lcom/android/server/LocationManagerService;

you should modify it too. Replace first, then let's see if it throws more errors or not.

stage 3 - common errors.

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

uhm, sounds like proximity sensor has extra implementation on framework which couldn't accessible,unfortunately you should find it by yourself.
[Android Software Development] pratikmore:
I want to port miui JB for galaxy 3,which rom is suitable for base miui jb rom for me?its 3.2inch 240*400.thanks in advance.
[Android Software Development] Lens_flare:
nexus S :P
[Android Software Development] pratikmore:
I cant see thread for it in forum list.it is samsung nexus?
[Android Software Development] Lens_flare:
Samsung Nexus S, Google Nexus S, Samsung Crespo, Samsung GT-I9020, GT-I9020T, GT-I9020A, GT-I9023.
[Android Software Development] CosmicDan:
The first problem is much before that, here:

I/dalvikvm( 134): Could not find method android.webkit.WebViewCore.nativeSelectText, referenced from method android.webkit.WebViewCore.access$6400 W/dalvikvm( 134): VFY: unable to resolve direct method 41187: Landroid/webkit/WebViewCore;.nativeSelectText (IIIIII)[Ljava/lang/String;

This is tricky. What I did was replace all the WebKit smali from CM10 but then the MIUI browser broke, I had to use MIUI browser APK from an older version. You could also try using libwebcore.so from MIUI.

Seems error with LocationManagerService, try replacing that.

I had that "failed to get device id" error once before on old MIUI, I can't remember how I fixed it. I think I just started again from scratch. But it might be related to LocationManagerService.

Also, remember to format data and cache when trying new files. In my experience it can fix errors after changing smali code.
[Android Software Development] Ozadroid:
the FATAL SIG errors are ok as i got those in my last working build alos. it doesnt do anything. so i think the GPS smali problem is the cause!

the above error is when i replaced LocationManagerService.smali from CM9. before replacing it was giving native_HAS_ULP_CAPABILITY errors.

i searched in libs wid notepad n found libulp.so so i'll b putting that n try.

also is the gps.default.so device specific? coz ulp also hit that lib!
[Android Software Development] Lens_flare:
It shouldn't.. gps.[platform].so is device specific.
[Android Software Development] Ozadroid:
oki so i'll try replacing that aswell as it has many dependencied on ulp

---------- Post added at 12:26 PM ---------- Previous post was at 11:45 AM ----------

oh yeaaaaaaaaA!! it worked! :D :D :D :D

now the device perfectly boots. now getting services to work! starting wid RIL! :silly:

_________________________________________________________________________________

RIL not getting fixed! :(

replaced RIL*.smali and also /system/bin/rild

what to do :(
[Android Software Development] dekkyy:
OK. I have fully working port now. The only thing that bothers me is laggy statusbar.

It is not laggy in my aosp base, does anyone know if this can be fixed by editing a .smali file or anything else that is related to statusbar??
[Android Software Development] Ozadroid:
Where is everybody?? :eek: :(
[Android Software Development] CosmicDan:
I copied these files from CM10:

framework\smali\com\android\internal\telephony\RIL.smali
framework\smali\com\android\internal\telephony\RIL*.smali
framework\smali\com\android\internal\telephony\SemcRIL.smali
framework\smali\com\android\internal\telephony\SemcRIL*.smali
framework\smali\com\android\internal\telephony\PhoneFactory.smali
framework\smali\com\android\internal\telephony\BaseCommands.smali

...my RIL class is SemcRIL here. I then had to set RIL class in build.prop like what CM does:

ro.telephony.ril_class=SemcRIL

I also have some other RIL-related properties in build.prop, judging by the filename this is probably for any Qualcomm based device:

rild.libpath=/system/lib/libril-qc-1.so
rild.libargs=-d/dev/smd0

...search your CM build.prop for "ril".
[Android Software Development] Ozadroid:
I dnt hv ril_class in build.prop

so i copied all RIL*.smali including HuaweiRIL, QualcommRIL,SemcRIL,etc.

also build.prop locates to correct lib.
[Android Software Development] Lens_flare:
E/AndroidRuntime( 1527): FATAL EXCEPTION: main

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

E/AndroidRuntime( 1527): at android.os.Parcel.readException(Parcel.java)

E/AndroidRuntime( 1527): at android.os.Parcel.readException(Parcel.java)
[color="orange"]
E/AndroidRuntime( 1527): at android.hardware.usb.IUsbManager$Stub$Proxy.setCur rentFunction(IUsbManager.java)

E/AndroidRuntime( 1527): at android.hardware.usb.UsbManager.setCurrentFunction (UsbManager.java)[/color]

sounds like you don't have some methods in UsbManager.smali, check out log stands I highlighted.

show us radiolog(logcat -b radio) and logcat please.
[Android Software Development] SlyFoX88:
I'm currently porting V4 ICS 4.0.4 to the HTC Thunderbolt. I have it booted and sms/calls work. But I have a list of a few bugs and a logcat below with all the errors I found in it. I'm using a CM9 base and Incredible 2 port which both match.

Bugs

--------

Data doesn't work at all (I copied over all RIL and am using the same RIL as the base)

Built-in browser FC

Some gapps and especially the market are buggy (drm? market gives 491 error when downloading apps)

Data cap bug?? (When turning data toggle on/off a message pops up claiming data cap has been reached and System FC)

APN stuff also seems broken

Logcat

----------

View attachment log1.txt
[Android Software Development] CosmicDan:
I see lots of "class not found" errors, you must have replaced some bad files in a jar or the jar didnt compile properly.
[Android Software Development] vijendrahs:
I tried this but I got compilation errors and left this.

Thanks for the help.

Can you help me on the USB problem that I posted in my previous post.
[Android Software Development] CosmicDan:
Nope, no idea.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Ozadroid:
restarted the port. will getback soon!
[Android Software Development] Hikari:
Again me with miui gb... Thanks!