yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Alex93917:
Okay, i have a good port : http://xdaforums.com/showthread.php?t=1729578

It's working great ! But, root is absent !

I've integrate invoke-as and su, liblbeses, and i have added to updater script permissions. But no root "LBE Guard has stopped" when an app want root permissions.

Why ?

Thanks in advance ;)

Edit : It's working with fix : http://miuiandroid.com/community/threads/notice-lbe-root-permission-freeze-issue-2-6-22.17044/

http://miuiandroid.com/community/th...ission-freeze-issue-2-6-22.17044/#post-127385
[Android Software Development] resac:
What u changed that u get Native USB mounting??? Will u please tell us.. i saw u r fix but it wont work for me..

waiting for u r reply..
[Android Software Development] Lens_flare:
sorry, noninformative, re-capture it to get full one.

Nothing :p

Samsung equals samsung, so there is a native storage from birth.
[Android Software Development] patou75:
Hey Lens_flare, the best is add missing lines method when we get errors or replace smali files ? For exemple for powermanagerservice or inputmethod.

May be we will have less error after no ? Cause I'm blocked ... the error is from powermanagerservice. The best is to add missing lines ? (if there isn't a file on MIUI framework.jar but present on CM9 framework.jar for exemple powermanagerservice$15.smali, I add it to miui ?)

thanks :)
[Android Software Development] dhk.-:
The best is copy all the smalis (in the example all the powermanagerservice$******.smali) from cm9 framework to the miui one
[Android Software Development] patou75:
I know that but I've got.this problem :

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

It's from powermanagerservice so I'm wondering if I add missing lines it can.solve the problem

Envoyé depuis mon GT-I9100 avec Tapatalk
[Android Software Development] dhk.-:
try basing your rom in nexus s miui
[Android Software Development] Mr. Droid:
anyone porting for the S3?
[Android Software Development] Lens_flare:
I have already posted how to modify powermanager and input services.

In mos common cases first try to replace, if something goes wrong, only then add missing lines,.
[Android Software Development] patou75:
Ok thanks :) cause I can't solved my problem when I decompile framework-res. I don't know where I modify/delete the ID :( (and my rom is based on nexus S ;))

Envoyé depuis mon GT-I9100 avec Tapatalk
[Android Software Development] patou75:
You know you can attach your text file or go to pastebin...

Envoyé depuis mon GT-I9100 avec Tapatalk
[Android Software Development] pratikmore:
http://pastebin.com/srVsmifs
[Android Software Development] Lens_flare:
try:

disassemble phone.apk go to bools.xml at res/values and switch sendmicmute_to_audiomanager or smth like that to versa value(e.g. true to false or false to true).
[Android Software Development] pratikmore:
I am getting error while compile apk file and when used that file i got network problem.can anyone help me?
[Android Software Development] resac:
Use this APK Manager --> Apk Manager Download

and steps

1. folder:\> apktool if framework-res.apk

it will install 1.apk

2. folder:\> apktool if framework-miui-res.apk

it will install either 3 or 6.apk

after that decompile u r phone.apk

and do the changes and decompile as

3. folder:\> apktool b phone.apk.out

and it will ask for is this system apk?

just press y

and again it will ask blahhh blahhh for that

once try pressing y and delete resources.ascc in keep folder and try for that else try for no to second time and u get apk try for that...

thats all.. done..
[Android Software Development] pratikmore:
i am not getting how to use apk manager. error-

http://pastebin.com/epEM05Tx
[Android Software Development] resac:
which version u trying to port???
[Android Software Development] pratikmore:
http://pastebin.com/u8L3Eg6J

---------- Post added at 11:01 AM ---------- Previous post was at 10:59 AM ----------

gb lewa rom,joy rom have the problem of outgoing call bug.when i am calling other person cant hear my voice.
[Android Software Development] resac:
Sorry its off topic.. dont know abt LEWA!!!
[Android Software Development] Lens_flare:
Got usb mass storage to work.

As I described before, I have added:

framework-res.apk:

values

strings.xml to add

<string name="config_legacyUmsLunFile">/sys/devices/platform/usb_mass_storage/lun0/file</string>

which is supposed to support old kind usb lun file(path linked to sdcard which mounts to pc)

xml

storage_list.xml

build.prop to add

persist.sys.usb.config= mass_storage,adb

services.jar:

com/android/server/usb - replace. There starts a little trick: I got that folder from desire HD MIUI.us rom, so I doubt it belongs new sources as described.

TBH, I'm using old usb gadget, and so old kind ways to get usb subsystem function, if you do have new usb gadget(ask your cm/kernel devs) , you could proceed without modifying strings.xml and with adding folder from source.

Those one who have old usb gadget and qualcomm device, could use mine instruction. Moto devices etc could use their base which is hope presented at miui.us too.

Will investigate later what's difference between new one and miui.us.
[Android Software Development] can7:
was just going to ask the same question ?
[Android Software Development] Fraggel:
Me,

And still not boot, is stop at XIAOMI.COM Logo (based on CM9, this and nothing is the same hehehe)
[Android Software Development] Lens_flare:
New library to add on forthcoming miui ports - liblocSDK_2.2.so (search near liblbesec.so at systemlib).

Without it you will see force closes like that

NetworkLocation is stopped
force close

at start, not so crucial but fears potential user :p
[Android Software Development] sparta20:
I try to port miui on the wonder, but it stops at boot. How can I solve it?
[Android Software Development] Lens_flare:
log what happened, maybe we could help you :p
[Android Software Development] sparta20:
The problem is also it, I can't do log and I don't understand why
[Android Software Development] Lens_flare:
try on ubuntu, also reinstall your android sdk to make sure you have latest adb.
[Android Software Development] medicjunKie:
I had the same problem.

It ended up been a build.prop line that was missing.
[Android Software Development] v1r0x:
I got stuck on porting from DHD to Desire Z.

After a InputManager problem I only added missing methods to InputManager.smali.

Now I got this errors:

01-06 00:55:42.091: E/HTC Acoustic(5764): ioctl ACOUSTIC_UPDATE_ADIE failed -1
01-06 00:55:42.091: E/HTC Acoustic(5764): failed to open A2051 CSV files /system/etc/TPA2051_CFG.csv.
01-06 00:55:42.121: E/AudioHardwareMSM7X30(5764): updateDeviceInfo: E rx_device 6 and tx_device 11
01-06 00:55:42.121: E/AudioHardwareMSM7X30(5764): updateDeviceInfo: X cur_rx 6 cur_tx 11
01-06 00:55:42.121: E/AudioHardwareMSM7X30(5764): msm_set_voice_rx_vol(100) failed errno = 1
01-06 00:55:42.541: E/MediaProfilesJNI(5761): native_init
01-06 00:55:42.541: E/MediaProfilesJNI(5761): After native_init lock
01-06 00:55:42.541: E/MediaProfilesJNI(5761): Guru : native_init profiles
01-06 00:55:42.541: E/MediaProfiles(5761): getInstance
01-06 00:55:42.541: E/MediaProfiles(5761): Guru :Else 1
01-06 00:55:42.541: E/MediaProfiles(5761): Guru : quality = 0, index = -1
01-06 00:55:42.541: E/MediaProfiles(5761): Guru : quality = 1, index = -1
01-06 00:55:42.541: E/MediaProfiles(5761): Guru : quality = 0, index = -1
01-06 00:55:42.541: E/MediaProfiles(5761): Guru : quality = 1, index = -1
01-06 00:55:42.541: E/MediaProfiles(5761): getInstance eb258
01-06 00:55:42.541: E/MediaProfilesJNI(5761): retun sProfiles
01-06 00:55:42.551: E/MediaProfilesJNI(5761): native_init
01-06 00:55:42.551: E/MediaProfilesJNI(5761): After native_init lock
01-06 00:55:42.551: E/MediaProfilesJNI(5761): retun sProfiles
01-06 00:55:43.102: E/dalvikvm(5761): Could not find class 'android.webkit.WebViewCore$5', referenced from method android.webkit.WebViewCore.navigatorPermissionsShowPrompt
01-06 00:55:43.332: E/PhonePolicy(5761): Could not preload class for phone policy: com.android.internal.policy.impl.PhoneWindow$ContextMenuCallback
01-06 00:55:49.127: E/PackageManager(5789): Package com.google.android.backup has no signatures that match those in shared user android.uid.system; ignoring!
01-06 00:55:50.439: E/AndroidRuntime(5789): *** FATAL EXCEPTION IN SYSTEM PROCESS: WindowManager
01-06 00:55:50.439: E/AndroidRuntime(5789): java.lang.VerifyError: com/android/server/wm/InputManager
01-06 00:55:50.439: E/AndroidRuntime(5789):	at com.android.server.wm.WindowManagerService.<init>(WindowManagerService.java:782)
01-06 00:55:50.439: E/AndroidRuntime(5789):	at com.android.server.wm.WindowManagerService.<init>(WindowManagerService.java:145)
01-06 00:55:50.439: E/AndroidRuntime(5789):	at com.android.server.wm.WindowManagerService$WMThread.run(WindowManagerService.java:689)
01-06 00:55:50.449: E/installd(1220): eof
01-06 00:55:50.449: E/installd(1220): failed to read size
01-06 00:55:50.919: E/HTC Acoustic(5822): ioctl ACOUSTIC_UPDATE_ADIE failed -1

Don't know what to do :(

Any ideas?
[Android Software Development] smithchipz:
Mind sharing what the build.prop line was?
[Android Software Development] Lens_flare:
Try replace whole tree, and add only one missing method to powermanagerservice.smali ;)

BTW, don't desire HD already have those defines? Maybe start from scratch with nexus S base?
[Android Software Development] v1r0x:
with "whole tree" you mean all InputManager*.smali?

and add methods from base PowerManagerService.smali to port PowerManagerService?

and what about the other PowerManagerService$*.smali I've edited?

I don't know much about the differences between the ports.

But for my last ports I've used the DHD ;)
[Android Software Development] Lens_flare:
yes. For me worked :p

yes. Btw, just 2 methods should be added:

nativeStartSurfaceFlingerOffAnimation

nativeStartSurfaceFlingerOnAnimation

(just change nativeStartSurfaceFlingerAnimation to nativeStartSurfaceFlingerOffAnimation)

"ON"-method should be somewhere near 2nd entry (I'm sure you'll see that).

PS: I used your ports for about 2 releases :P then decided to use nexus S. Hope you see a result :]
[Android Software Development] v1r0x:
Ok, it worked...more or less :D

Now i get

01-06 03:10:30.815: E/AndroidRuntime(1981): *** FATAL EXCEPTION IN SYSTEM PROCESS: PowerManagerService.mScreenOffThread
01-06 03:10:30.815: E/AndroidRuntime(1981): java.lang.NoSuchMethodError: com.android.server.PowerManagerService.access$2002
01-06 03:10:30.815: E/AndroidRuntime(1981):	at com.android.server.PowerManagerService$1.onLooperPrepared(PowerManagerService.java:589)
01-06 03:10:30.815: E/AndroidRuntime(1981):	at android.os.HandlerThread.run(HandlerThread.java:59)

but I've added PowerManagerService$1.smali already

Any idea?

mine? I never released a version^^

OMG!! I see real miui, not only the annoying boot screen :D

Some apps FC but, I think I can fix this ;)

I love you lens :D

Thanks for your help ;)
[Android Software Development] Lens_flare:
your reason is desire HD, which I guess also requires that mod to make rom boot, and they seems just replaced a tree.

I doubt replacing could help but at last you could try.. but would be better to grab nexus S powermanagerservice and just add lines above ;]

just a minute...

ahh yes :D I mixed up :p
[Android Software Development] v1r0x:
I've replaced all copied PowerManagerService with the original DHD files and just added the "On"-line.

So I can boot, but have no adb.

Is there any flag/line which I have to add, so adb works after a complete boot?

I'm a bit confused, because adb worked well while bootloops:confused:

Edit:

maybe:

persist.sys.usb.config=mass_storage,adb

the only adb-related line I know^^
[Android Software Development] Lens_flare:
persist.sys.usb.config = masstorage,adb

at build.prop?
[Android Software Development] v1r0x:
yes, I have this line.

I lost the adb connection during booting.

After "optimising applications" on first boot adb is gone
[Android Software Development] Lens_flare:
do you have usb debugging/mass storage sign?

try also replace usb folder at services.jar
[Android Software Development] v1r0x:
I have a mass storage sign and can enable mass storage from the status bar and it works. But no adb

Edit: ok, overwrite usb folder works ;)

next problem:

07-03 05:03:37.363: E/AndroidRuntime(2074): 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

got this during baksmali, but ignored it. How can I delete it?
[Android Software Development] Lens_flare:
are you porting from miui.us build right? :D

it's their "copyright sign", that's why I also prefer miuiandroid, which is copyright-free.
[Android Software Development] v1r0x:
yeah, but this was the only dhd version I found :(

is the diff/replace/add work the same on nexus s or do I have to trial&error?
[Android Software Development] Lens_flare:
mostly you don't have to "trial&error" as I posted enough material to initially port on any device, just search ;]

Remember - nexus S is a samsung, bloody enemy of htc :d
[Android Software Development] honghk0126:
Cool!

I will try it for MIUI Catalyst.(Of course MIUI v4:p)

Will this method working on the custom MIUI?
[Android Software Development] Lens_flare:
yes should, but as you see it's not always productive :p
[Android Software Development] v1r0x:
Ok, I downloaded miuiandroids crespo/nexus s rom and after some replace/diff I have a bootable rom :)

Just need to fix the "no service".

But it's time for bed now. It's almost 7am :D

and thanks for your help lens :)
[Android Software Development] Huncriter:
i have this problem... any ideas?

E/ICU ( 1720): Couldn't open '/system/usr/icu/icudt46l.dat': No such file or directory

E/libcore ( 1720): Failed to initialize the core libraries; aborting...

F/libc ( 1720): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)

full logcat attached
[Android Software Development] Lens_flare:
have you cleaned up your framework folder after port? It's an usual causer.

If yes, no luck, choose different base rom.
[Android Software Development] v1r0x:
Ok, I "fixed" my 'no service' problem by choosing the APN manually. Not the best solution, but better than no networks ;)

The bigger problem is that I have no usb mass storage.

adb works.

Any ideas?
[Android Software Development] Huncriter:
what you mean with clean framework folder?

i've delete it from base rom and copy the miui framework folder
[Android Software Development] martijnn2:
Anyone got an idea for a good base for zopo phone or another mtk6575 device?

Greetings
[Android Software Development] Lens_flare:
full tuto here http://xdaforums.com/showpost.php?p=28059233&postcount=805 , 2 pages ago :p

I have a doubt new source are depending on resource id of line about umslunfile[that is changed],which should match exact resource, that's why we don't getting mass storage on new cm source.

to see if there are no folders in it, like framework.jar.out etc

if you have a CM/AOSP, nexus S should be enough.
[Android Software Development] Aadamgibson:
MIUI is beautiful, but not all devices have MIUI ROM available.
[Android Software Development] Lens_flare:
that's why you're there

:D
[Android Software Development] v1r0x:
This didn't worked :(

Last port I had to add a line to public.xml but now the id is already assigned, but to another entry
[Android Software Development] Lens_flare:
why not to reassign it?

For me this line generated unique ID.
[Android Software Development] v1r0x:
what exactly do you mean with "reassign"?

which one?
[Android Software Development] Lens_flare:
after addition that line

<string name="config_legacyUmsLunFile">/sys/devices/platform/usb_mass_storage/lun0/file</string>

and assembling framework-res, on next disassembling, I saw that line got its own generated ID which needs in USB legacy manager[those in services.jar/...../usb] at public.xml, if id is not the same, it causes usb manager to close connection. So try to change that id to the same as on desire HD build and change id of string that shares the same id as needed if any..
[Android Software Development] v1r0x:
Ok, after second disassembling the string got its own ID. So, I changed the ID to the one of base rom and changed the other string which has the ID to the new created.

mass storge works :)

thanks again!
[Android Software Development] Lens_flare:
Alright, report me if you could try the same with newest cm source base and it worked. I'm compiling a new guide for newest common porting model.
[Android Software Development] v1r0x:
Edit: adb and mass storage works. my bad..
[Android Software Development] ansonchan:
i have follow the guide and flashing successful,but it stuck on the boot animation,any idea?
[Android Software Development] paxChristos:
Logcat.
[Android Software Development] v1r0x:
you need to diff/merge AssetManager in framework.jar

Add missing methods from base(CM) framework to your v4 framework jar.

And only add, don't delete/replace
[Android Software Development] ronak.super:
Can you be more specific about replacing methods and asset manager ? Please!
[Android Software Development] Lens_flare:
what do you want to know?

Those lines that are not present in MIUI' AssetManager.smali and present in AssetManager.smali from CM should be added to MIUI' AssetManager.smali. That process is also known as Diff("find a difference"). Find any tool that contains such functionality (for instance, I prefer "Meld diff viewer"), load 2 files in it, and you'll see what should be added. If tool shows "difference", ignore it, add only lines which are not there.
[Android Software Development] v1r0x:
I'm using notepad++ and the plugin called "Compare".

Load the v4 rom AssetManager.smali and then the base rom/CM/AOSP AssetManager.smali

Goto Addons (next to "?" and "window")->Compare->Compare

Now u see a lot of red lines on the base rom side and grey lines on the v4 side.

Copy the red lines (only if the block begins with ".method") from base to grey lines of v4 rom.

Then recompile ;)

Here a screenshot
[Android Software Development] Huncriter:
i've been merging some smali files, i made it boot having cm9 before without do any wipe, then crash and get boot loop

logcat http://pastebin.com/GZzYfqeD
[Android Software Development] stelios97:
bootloop!

07-06 14:43:48.214: E/JNIHelp(1297): Native registration unable to find class 'android/content/res/AssetManager', aborting
07-06 14:43:48.214: A/libc(1297): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)
[Android Software Development] v1r0x:
I didn't read the whole logcat but you have to copy miui-framework.xml from

/etc/permissions

of the base (CM) to v4

have a look at my first post on this page.

Diff the AssetManager.smali in framework.jar (android/content/res) and add missing methods from base to v4
[Android Software Development] stelios97:
already did this!
[Android Software Development] ronak.super:
thanks , tried as u said

But This time after adding .method lines ,

boot logcat shows this

although i have compiled classes.dex with assetmanager ,

can you look into this ,

log also says couldnt connect to powermanagerservice
[Android Software Development] Lens_flare:
wrong addition I guess, so your smali won't be verified.

As you used notepad ++, check out your encoding(apktool may pass a wrong one).
[Android Software Development] ronak.super:
i have only added .method lines as v1 suggested,

no chance of addition of wrong line,

please be more specific

---------- Post added at 07:05 PM ---------- Previous post was at 07:01 PM ----------

couldn'tmake out what you are trying to say ??
[Android Software Development] v1r0x:
in notepad++ there is a tab "encoding". On Windows it is set to "ANSI". You have to change it to "UTF8".

additional: In options you can enable that every ansi-file is opened/saved as utf8
[Android Software Development] stelios97:
if I do this i get this error while compiling:

classout\android\content\res\AssetManager.smali[1,0] required (...)+ loop did no
t match anything at input '?'
classout\android\net\wifi\WifiNative.smali[1,0] required (...)+ loop did not mat
ch anything at input '?'
classout\android\os\Power.smali[1,0] required (...)+ loop did not match anything
at input '?'
[Android Software Development] ronak.super:
same error
[Android Software Development] v1r0x:
Try to set "open ANSI as UTF8" in options, decompile the jar files again and diff AssetManager again.
[Android Software Development] Huncriter:
thanks, it works now boot normal and everything seems to work, but when the screen turns off or when i press the end call button the phone reboot

logcat http://pastebin.com/RGEE7TGN
[Android Software Development] ronak.super:
W/dalvikvm( 323): VFY: unable to resolve instance field 8388
D/dalvikvm( 323): VFY: replacing opcode 0x54 at 0x0000
D/dalvikvm( 323): DexOpt: couldn't find field Landroid/content/res/AssetManager
;.mRedirections
W/dalvikvm( 323): VFY: unable to resolve instance field 8388
D/dalvikvm( 323): VFY: replacing opcode 0x54 at 0x0000
D/dalvikvm( 323): DexOpt: couldn't find field Landroid/content/res/AssetManager
;.mThemeCookie
W/dalvikvm( 323): VFY: unable to resolve instance field 8391
D/dalvikvm( 323): VFY: replacing opcode 0x52 at 0x0000
D/dalvikvm( 323): DexOpt: couldn't find field Landroid/content/res/AssetManager
;.mThemePackageName
W/dalvikvm( 323): VFY: unable to resolve instance field 8392
D/dalvikvm( 323): VFY: replacing opcode 0x54 at 0x0000
D/dalvikvm( 323): DexOpt: couldn't find field Landroid/content/res/AssetManager
;.mThemeSupport
W/dalvikvm( 323): VFY: unable to resolve instance field 8393
D/dalvikvm( 323): VFY: replacing opcode 0x55 at 0x0000
D/dalvikvm( 323): DexOpt: couldn't find field Landroid/content/res/AssetManager
;.mThemeCookie
W/dalvikvm( 323): VFY: unable to resolve instance field 8391
D/dalvikvm( 323): VFY: replacing opcode 0x59 at 0x0000
D/dalvikvm( 323): DexOpt: couldn't find field Landroid/content/res/AssetManager
;.mThemePackageName

still the same , couldn't find assetmanager;.mthemepackagename

donno whats wrong

can you do me a favour i have attached the assetmanager.smali from both cm9 and miui, can you diff it

i think in asset of cm9 , there are something .method themecookie etc are those related to cm9 theme stuff , i guess we shouldnt add those lines to miui ones.

please look into it.
[Android Software Development] stelios97:
Did many smali changes but now i have this error and cant't solve it!There is now file PowerManagerService on base and miui framework!

07-06 20:08:17.864: E/dalvikvm(1800): Requested: Lcom/android/server/PowerManagerService;.nativeStartSurfaceFlingerOffAnimation:(I)V
[Android Software Development] LoLaTiOn:
hello friends

I have a small problem that remains to MIUI port on i9003 source crespo

The code sim does not work.

The question is:

woh to set the simlock for recognition in framekork.jar

I've joined a logcat, thank you for time you will grant me
[Android Software Development] Huncriter:
PowerManagerService is in services.jar not in framework.jar
[Android Software Development] stelios97:
ok found it now have this error:

06-29 14:12:23.944: E/dalvikvm(1493): Class lookup Lcom/android/server/wm/InputApplicationHandle; attempted with exception pending
[Android Software Development] v1r0x:
Lens_flare told me to try this:

Don't replace PowerManagerService*.smali

Just rename startSurfaceFlingerAnimation to StartSurfaceFlingerOffAnimation and add method StartSurfaceFlingerOffAnimation from base PowerManagerService.smali to v4 PowerManagerService.

This fixed it for me ;)
[Android Software Development] ronak.super:
Someone look into the above message