yashsingh1/xdaforums huggingface dataset:
[Android Software Development] :
Thank you very much for your reply!

now i'm stuck again, cant really see the error except something with

Class not found for preloading: android.media.IRemoteControlClientDispatcher

tried replacing whole lRemoteControl.smali tree but didn't work :(

http://pastebin.com/g65dLiH8
[Android Software Development] Lens_flare:
07-15 04:40:04.706: E/PhonePolicy(1130): Could not preload class for phone policy: com.android.internal.policy.impl.PhoneWindow$ContextMenuCallback

hav eyou changed Inputmanager.smali? Change also its tree.
[Android Software Development] :
i reverted back to android.policy.jar from device im trying to port from getting exact same error... :/
[Android Software Development] Lens_flare:
Uhm, but inputManager is in services.jar.

I forgot, what's your miui base rom?
[Android Software Development] :
nexus one to x10i :)

miui rom: http://xdaforums.com/showthread.php?t=1479348

edit i havent changed anything in services.jar only android.policy and framework ill have a look now

thank you very much for your assitance :)
[Android Software Development] Lens_flare:
Try miuiandroid Nexus S to x10i (you'll get a difference later).
[Android Software Development] :
sounds like a harder port but thank you ill try :)
[Android Software Development] Lens_flare:
Is OP guide hard? It'd be sometimes hard to mod some smali-s but my guides over this thread last pages could help ;]

You may think: "Samsung, nothing similar", but think about it like AOSP rom, in which only frameworks are pure as baby.

Time to change priority - nexus one is nomore fully AOSP-compatible.
[Android Software Development] HumanXv2:
Can someone help me decipher this?
[Android Software Development] Lens_flare:
E/dalvikvm( 1444): ERROR: couldn't find native method
E/dalvikvm( 1444): Requested: Llibcore/net/RawSocket;.create:(Ljava/io/FileDescriptor;SLjava/lang/String;)V
E/dalvikvm( 1444): Candidate: Llibcore/net/RawSocket;.create:(Ljava/io/FileDescriptor;Ljava/lang/String;)V
E/JNIHelp ( 1444): RegisterNatives failed for 'libcore/net/RawSocket', aborting

sounds like you need a libjavacore,so
[Android Software Development] :
hey mate i tried nexus s port annnd im stuck again :p

was hoping you could have a look at it...

http://pastebin.com/jHFAd49n
[Android Software Development] v1r0x:
you need to copy miui-framework.xml from

/system/etc/permissions
[Android Software Development] :
thank you very much!

cleaned it up still some errors though

http://pastebin.com/XuXG8vz8 :)
[Android Software Development] Gaboros:
Hello,

First of all, thank you very much for this guide. I managed to port to my device after a lot of framework.jar file odex editing. I had to add methods for at least 8 files. :)

Now it booted up but keeps force closing the com.android.phone every time it switch from landscape to portrait mode or reversed. Here is that part of the logcat:

https://www.dropbox.com/s/tm4ic0zxcm8520v/logcat.png

Any idea?
[Android Software Development] v1r0x:
there are still some miui-framework.xml errors
[Android Software Development] :
i already pushed miui-framework.xml

how would i go about fixing it?

i thought it was a services.jar error... :)
[Android Software Development] v1r0x:
i don't know. maybe you have to set permissions if you just pushed via adb
[Android Software Development] ariadownload:
problem

i have problem please help
[Android Software Development] v1r0x:
Did you diff AssetManager.smali?
[Android Software Development] :
alright this is hard i'm stuck on another point now, no boot after 2 days of work :/

http://pastebin.com/JecGzjih
[Android Software Development] v1r0x:
Is there a MiuiResources.smali in framework.jar?

at:

android/content/res
[Android Software Development] :
yes it is very weird i double checked and it's there...

appreciate the help.. :)
[Android Software Development] v1r0x:
Thats weird...

Maybe Lens_flare or someone else has another idea.

I'm not that good in understanding logcat
[Android Software Development] Lens_flare:
sounds like you don't have miui phone.apk ;/

this is too much I think. For me it's only 3 files. Others-trees replaced.

07-16 01:49:56.896: E/dalvikvm(1386): Could not find class 'com.android.server.ProfileManagerService', referenced from method com.android.server.ServerThread.run

sounds like services,jar is SO broken.

Maybe you diffed some files wrong way?

About miuiresources, you also could affect some miui parts of AssetManager.smali.
[Android Software Development] Gaboros:
Yes I have it... tried the phone.apk from the stock rom... the FC issue is gone, but the mobile data settings from the menu as well. So this is not a good solution. Any idea? Here is the log:

https://www.dropbox.com/s/tm4ic0zxcm8520v/logcat.png

I think that's OK. My device has for example ethernet plugin which is not common on android devices so it requreid 3-4 new method and 3-4 smali file as well. I have fixed that fine, mine only problem is that FC issue and camera.apk not work as well. I will send a logcat later. :)
[Android Software Development] Lens_flare:
Ah, that's why..tablet.. I've misread before.. miui apk is intended to be a phone only apk, CM 9 one [or even AOSP? In whole, any ics for your tablet that don't have that bug] is more reliable for tablet, the same as camera though.
[Android Software Development] Gaboros:
Yeah I know it, but only these bugs exist... other things work. :)

This is because everything run in phone mode not in tablet. ;)

Is there anyway to fix the lockscreen to landscape mode? :D

Edit: this is the logcat about the camera FC:

https://www.dropbox.com/s/h2lhraizf7adpa0/logcat_phone.png
[Android Software Development] magemastrix:
Tried changing only miui-res, no success

Trying a simple test, unzip the rom, decompile framework-miui-res.apk, recompile again, zip and flash and give me that error.

Always installing framework-res and framework-miui-res before the procedure, installed too 2.apk,3.apk,4.apk,5.apk from patchrom.

using apktool 1.4.7 or 1.4.3

If I decompile(the framework-miui-res that I compiled) again, framework-miui-res/res/values/public.xml has all values changed to 0x02 range eg:

<public type="array" name="android_config_longPressVibePattern" id="0x02060008" />

EDIT2: Adding the framwork numbers to apktool.yml then when I decompile again the hex range is again 0x06, but still fails to boot.
[Android Software Development] Vency77:
Mine port is almost perfectly running , just some cosmetic and one important bug.

The important one, my phone (or the rom itself) isnt automatically connecting to my Network provider , or pop-ups with error that the chosen operator isnt found. However if i go to Network operators and search , I can clearly see all operators in my country. Then if I select Automatically/M-tel(mine provider) the phone connects to the network perfectly. I can make/receive calls , just the signal bars are always only 2/4. And if the phone reboots , i should again select network/automatically from Network operators menu so that it will run. Is there a solution for this, i read that some other had this problems , but didnt find solution that suited mine problem.I have these line in build.prop if i can do something here :

"# Default network type.

# 0 => WCDMA Preferred.

ro.telephony.default_network=0

ro.telephony.ril.v3=signalstrength"

(actually i want 2g only)

Other bug is the graphics , they are really bad/blurred(Miuiv4 ported from LDPI device to LDPI device with CM9 as base). Is there a chance for me to get the CM9 performance setting so i can experiment with the graphics settings (like 16 bit transparency/surface dithering etc...)?
[Android Software Development] v1r0x:
I have the same problem with provider and still no success :(
[Android Software Development] :
Had this problem also for lots off time. Changed and modded lots of smalis without succes. Today I found the answer.

Open values/bools.xml in framework-res.apk

<bool name="skip_restoring_network_selection">false</bool>
[Android Software Development] v1r0x:
omg -.-

never thought it could be that easy :D

thanks :)
[Android Software Development] Lens_flare:
Say, why the hell are you using patchrom? Isn't there other way to translate rom??

For me it is:

take miuiandroid multilang (for example), replace all apk and framework-miui-res.apk, maybe also themes. That is it.

If you are translating by hand, you'd like to talk with iBotPeaches@miuiandroid, he works on translations with miui team.
[Android Software Development] Lens_flare:
As I promised, I'm compiling a FAQ for newest miui portings http://xdaforums.com/showthread.php?p=28885450#post28885450

it would be interesting for those who don't want to search an answer for common question as for our thread.

2 stages remaining
[Android Software Development] v1r0x:
Here is a pic of the problem I have with miui cam.

If I reduce resolution to 3M, 1.3M or VGA the weird lines are gone.

http://minus.com/mcZRZ34Vz/

Edit: Thanks Lens_flare for your guide. Hope this will save a lot of time and questions :)
[Android Software Development] v1r0x:
you need t replace some of the webview* smalis.

for my port the following:

WebView
WebViewCore$EventHub*
WebViewCore$WebCoreThread*
WebViewCore

anyone else with login problems? can not login on pc (it log me in but redirect to login page and say I'm not logged in...)
[Android Software Development] Lens_flare:
what kind of login are you trying? I mean specific account like google, fb, xiaomi etc.

Or am I totally wrong? :D
[Android Software Development] v1r0x:
I mean here on xda. But now it seems to work again :confused:
[Android Software Development] magemastrix:
If i don't add patchrom's 2,3,4,5 frameworks, my framework-miui-res address range(0x06) is filled with the missing framework(eg 0x02 or 0x03)
[Android Software Development] Lens_flare:
I still don't get:

you are using miuiandroid build, adding translations you got, build apk, drag files you translated to initial archive.. where the hell patchrom have attached to process?
[Android Software Development] Vency77:
Anyone have a clue on these:

07-18 02:26:26.620: E/QcomCamera(187): CameraHAL_CopyBuffers_Hw: MSMFB_BLIT failed = 22 Invalid argument
07-18 02:26:26.910: W/CameraService(187): lockIfMessageWanted(16): dropped unwanted message
07-18 02:26:26.920: E/QcomCamera(187): CameraHAL_CopyBuffers_Hw: MSMFB_BLIT failed = 22 Invalid argument
07-18 02:26:27.230: W/CameraService(187): lockIfMessageWanted(16): dropped unwanted message
07-18 02:26:27.240: E/QcomCamera(187): CameraHAL_CopyBuffers_Hw: MSMFB_BLIT failed = 22 Invalid argument
07-18 02:26:27.531: W/CameraService(187): lockIfMessageWanted(16): dropped unwanted message
07-18 02:26:27.541: E/QcomCamera(187): CameraHAL_CopyBuffers_Hw: MSMFB_BLIT failed = 22 Invalid argument
07-18 02:26:27.841: W/CameraService(187): lockIfMessageWanted(16): dropped unwanted message
07-18 02:26:27.861: E/QcomCamera(187): CameraHAL_CopyBuffers_Hw: MSMFB_BLIT failed = 22 Invalid argument

It keeps coming out when I start camera application , and however it can capture photos , the app is very laggy and its hard to shot cuz of these errors non-stopping :X
[Android Software Development] Lens_flare:
Maybe you also have to replace camera.apk?
[Android Software Development] Vency77:
This log was from camera360 from the market.

The ICS camera.apk force-closes imediately , and on the logcat i can see the same log , but before this there is :

07-18 13:58:10.383: E/AndroidRuntime(1181): FATAL EXCEPTION: main
07-18 13:58:10.383: E/AndroidRuntime(1181): java.lang.NoSuchMethodError: android.os.Environment.getExternalStorageState
07-18 13:58:10.383: E/AndroidRuntime(1181):	at com.android.camera.Storage.getAvailableSpace(Storage.java:110)
07-18 13:58:10.383: E/AndroidRuntime(1181):	at com.android.camera.Camera.checkStorage(Camera.java:1480)
07-18 13:58:10.383: E/AndroidRuntime(1181):	at com.android.camera.Camera.initializeFirstTime(Camera.java:472)
07-18 13:58:10.383: E/AndroidRuntime(1181):	at com.android.camera.Camera.access$700(Camera.java:86)
07-18 13:58:10.383: E/AndroidRuntime(1181):	at com.android.camera.Camera$MainHandler.handleMessage(Camera.java:309)
07-18 13:58:10.383: E/AndroidRuntime(1181):	at android.os.Handler.dispatchMessage(Handler.java:99)
07-18 13:58:10.383: E/AndroidRuntime(1181):	at android.os.Looper.loop(Looper.java:137)
07-18 13:58:10.383: E/AndroidRuntime(1181):	at android.app.ActivityThread.main(ActivityThread.java:4429)
07-18 13:58:10.383: E/AndroidRuntime(1181):	at java.lang.reflect.Method.invokeNative(Native Method)
07-18 13:58:10.383: E/AndroidRuntime(1181):	at java.lang.reflect.Method.invoke(Method.java:511)
07-18 13:58:10.383: E/AndroidRuntime(1181):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-18 13:58:10.383: E/AndroidRuntime(1181):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-18 13:58:10.383: E/AndroidRuntime(1181):	at dalvik.system.NativeStart.main(Native Method)

But actually , there is method getExternalStorageState in the framework when i checked it ???
[Android Software Development] Lens_flare:
replace environment.smali, hope it will help
[Android Software Development] magemastrix:
To add a language I need to decompile and recompile the apk, i found in some places that I need to add dummy frameworks(from patchrom, but I think it can be from htc roms too) to build this, even iBotPeaches told me on apktool's topic
[Android Software Development] ariadownload:
problem

hi what is my problem?logcat attached

sory for bad english :D
[Android Software Development] Lens_flare:
then I'm noob and couldn't offer more help about it.

that one:

E/AndroidRuntime( 178): *** FATAL EXCEPTION IN SYSTEM PROCESS: PowerManagerService
E/AndroidRuntime( 178): android.content.res.Resources$NotFoundException: Resource ID #0x111003c
E/AndroidRuntime( 178):	at android.content.res.Resources.getValue(Resources.java:1023)
E/AndroidRuntime( 178):	at android.content.res.MiuiResources.getValue(MiuiResources.java:61)
E/AndroidRuntime( 178):	at android.content.res.Resources.getBoolean(Resources.java:805)
E/AndroidRuntime( 178):	at com.android.server.PowerManagerService$SettingsObserver.update(PowerManagerService.java:525)
E/AndroidRuntime( 178):	at java.util.Observable.notifyObservers(Observable.java:138)
E/AndroidRuntime( 178):	at java.util.Observable.notifyObservers(Observable.java:113)
E/AndroidRuntime( 178):	at android.content.ContentQueryMap.requery(ContentQueryMap.java:145)
E/AndroidRuntime( 178):	at android.content.ContentQueryMap.getValues(ContentQueryMap.java:125)
E/AndroidRuntime( 178):	at com.android.server.PowerManagerService$SettingsObserver.getInt(PowerManagerService.java:487)
E/AndroidRuntime( 178):	at com.android.server.PowerManagerService$SettingsObserver.update(PowerManagerService.java:502)
E/AndroidRuntime( 178):	at com.android.server.PowerManagerService.initInThread(PowerManagerService.java:699)

consult with guide http://xdaforums.com/showpost.php?p=28885450&postcount=2 to make sure you changed powermanagerservice in right way.

Guys, my faq is burrying more and more in eternity of subforum so nobody sees it, some advice?
[Android Software Development] ariadownload:
lens nativeStartSurfaceFlingerOffAnimation to nativeStartSurfaceFlingerAnimation or Unlike؟
[Android Software Development] v1r0x:
Thats the problem:

E/dalvikvm( 2626): ERROR: couldn't find native method
E/dalvikvm( 2626): Requested: Landroid/content/res/AssetManager;.splitThemePackage:(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I
E/JNIHelp ( 2626): RegisterNatives failed for 'android/content/res/AssetManager'

diff base and miui AssetManager.smali and add (only add, not delete or modify) missing methods into the miui AssetManager
[Android Software Development] x10forevers:
so i need to change base file of my ROM

and assetmanager.smali from framework.jar to the new ROM right ??
[Android Software Development] v1r0x:
you decompile the base framework.jar and the miui (your new rom) framework.jar

then take both AssetManager.smali (base and miui) in folder

android/conent/res

and add every method which is in the base smali and not in the miui smali to the miui one.

For more information have a look at about 10 pages ago or the FAQ of Lens_flare (link on last page I think)
[Android Software Development] x10forevers:
okay thanx mate

so i have to change base as well or i only need to change the assetmanager.smali
[Android Software Development] ariadownload:
lens nativeStartSurfaceFlingerOffAnimation to nativeStartSurfaceFlingerAnimation or Unlike?
[Android Software Development] ronak.super:
Help needed , I diffed the webview core , but still no change

Log.

http://pastebin.com/UYi8Da7k
[Android Software Development] v1r0x:
what do you mean? oO

did you try to replace WebViewCore.smali instead of diff?

I had to replace it in my port
[Android Software Development] ariadownload:
help me

please help me , new logcat attached and powermanagerservices.smali please edit file and upload for me thanks
[Android Software Development] Lens_flare:
I realised my guide is just useless.. But what if I will post it each page? :D http://xdaforums.com/showthread.php?p=28885450#post28885450

nativeStartSurfaceFlingerAnimation->nativeStartSurfaceFlingerOffAnimation

the same

D'OH

alright, then what about replacing camera.apk? ;)

if accounts doesn't FC and google services are ok, then forget about it

Even showed to me, seems like CM dialer classes are crappy enough.

red-free logcat is a myth :D

If all is working, why change something? ';]
[Android Software Development] Vency77:
Thank you again , and your guide is not useless, its great for beginning the port and booting it (actually I missed something like this guide when i started the port :D )

And i have tried with 10 cameras, from market , from MIUI, from CM9, all of them are filled with this error. Whatever dont worry fro this anymore, I will figure it out with the devs of CM9 I hope :)
[Android Software Development] v1r0x:
You could paste it in your signature and use font size 5 :D
[Android Software Development] Lens_flare:
Ah, I almost forgot about signature!

See now :D

BTW, guide is complete, but additions are always welcome.
[Android Software Development] Gerrett:
Have anyone else the problem that changing theme from mms and phone apk doesnt work?

Gesendet von meinem GT-N7000 mit Tapatalk 2
[Android Software Development] magemastrix:
Finally managed to fix my problem recompiling framework-miui-res, the cause was errors on xml file inside values folder. I had fixed until and no more errors were showing, but there a lot of xml tags need to be fixed.
[Android Software Development] ronak.super:
Replaced inputmanager and powermanagerservice then getting this log, assistence needed.

log

http://pastebin.com/Vd9RFfkH
[Android Software Development] Lens_flare:
you got it booted, why you repeating that mistake each time you porting new rom?

InputManager - replace smali tree

PowerManagerService - patch.

For more info see my signature.

PS: I'm reading forums ASAP, if I'm not responding in thread, it doesn't mean I will respond on PM with the same question.
[Android Software Development] ronak.super:
http://sebsauvage.net/paste/?73c8ed8a38f194ca#7Q8AzVI8BTDrEv5wo8QOi2Ar4bC4V2wDdYNlvMs8QKE=

Ok this is different log
[Android Software Development] Gaboros:
Hello,

Can same one help me out? My MIUI port has two mayor issue. First is sometimes my device not boot. Seems totally random for me. The logcat simple stops at a point, and it not continue the reboot process, but the boot animation just going and going. After I reboot my device it boot up without any problem... Sometimes boot up at the first time... sometimes not... Seems totally random.

Here is the log: http://pastebin.com/XVMBQS8L

As I mentioned it just stop at this and not go any further until I reset with the reset button.

My other problem with it is, after I receive an email and MIUI send a notification to the statusbar soon after it crash. And keeps crash (reboot) until I remove those notifacations. Here is the log: http://pastebin.com/Fn2zhAxL

Any idea how to fix it? Thank you very much in advance!
[Android Software Development] ariadownload:
Problem

i have a prolem,when show popups and open keyboard like this For example when resive a massege and show popup massege when click on textbox like this:crying:
[Android Software Development] ariadownload:
Lens you can't fix my problem?
[Android Software Development] bihariel:
Hi, i ported miui successfully but i have problems to get Usb strage morking.

Logcat:

Please helpme to fix this

thanks
[Android Software Development] Vency77:
For USB mounting , in my build i'm using this.Include it in the system/app and you should be ok.

For the others, dont double-triple.... post.When someone has time and knowledge of your problems, he will answer your questions :)
[Android Software Development] bihariel:
i already tried it but did not worked.
[Android Software Development] Lens_flare:
a bit different. CHECK your porting steps.
[Android Software Development] ariadownload:
i have a prolem,when show popups and open keyboard like this For example when resive a massege and show popup massege when click on textbox like this

what is my probleeeem?
[Android Software Development] Lens_flare:
sounds like a graphics driver fault.
[Android Software Development] ariadownload:
What do I need?
[Android Software Development] Lens_flare:
ask to your CM dev tree.
[Android Software Development] ariadownload:
drivers work in cm rom but not work for miui
[Android Software Development] Lens_flare:
you know, it means nothing. there were cases where some drivers worked incorrectly with current rom.
[Android Software Development] ariadownload:
so i can't fix this problem?

---------- Post added at 12:08 PM ---------- Previous post was at 11:38 AM ----------

lens you can't help me for fix this problem?
[Android Software Development] feed3:
If you not a jerk, lie and steal others work, i'm more than happy to teach you how to fix it. well..... :)
[Android Software Development] Huncriter:
i'm back, with new issues to making calls :rolleyes:, now phone.apk closes after dialing without error message, i can hear the call but can't hang up or watch the call screen
[Android Software Development] martijnn2:
Anyone knows a zp200 port?
[Android Software Development] thejaimes111:
I can't make wifi working trying to port it for u8160 basing on CM9 u8160 and MIUI u8150... i can't find wifi drivers on MIUI rom... Regards ;)

Sent with my lovely 600mHz phone, with CyanogenMod7.2, with Tapatalk 2
[Android Software Development] Lens_flare:
you should find them in base, possibly they are organised as flashable modules.
[Android Software Development] :
An auto-build script

Hi all

Some months ago I started porting for the HTC Wildfire S. I can say it's succesfull and all bugs are fixed / I know how to fix them.

But let's be honest, If you can't use patchrom, it's a pain in the ass to update your ROM to new weekly releases.

I just felt I was acting like a robot: copy, paste, edit some files, let it build in the kitchen, test ...

Well therefore I've created an add-on for dsixda kitchen. It does all the things for you:

just put your current rom and a new nexus s build in original folder and let the script work for you.

Currently this is a WIP but I wanted to let you all know you can use my work too. Of course you will need to change some parts.

I for example run the kitchen in a virtual disk named "cooking". So you have to do that too or modify the script.

Same matter for installing frameworks to let apktool work.

All the work can be found here: click!

Clone my work and start modding with it :)

Enjoy !!
[Android Software Development] Lens_flare:
great work! If it is moddable enough, you might port any miui..
[Android Software Development] rezo609:
Just stay tuned for more info :D
[Android Software Development] -BioHaZard-:
Great tutorial, I'm going to try it myself :D