yashsingh1/xdaforums huggingface dataset:
[Android Software Development] CosmicDan:
Deleting the files won't matter, its complaining about a duplicate resource ID. Check public.xml.

If its framework from SlimRoms, then try decompiling the framework-res manually. If successful, recompile it and swap for the fresh compiled one. If you can't decompile it, report the bug to iBotPeaches (you are using the latest APKTool 2 beta, I hope?) and ditch SlimROM for something that isn't broken.

Sent via Tapatalk on my Xperia Z
[Android Software Development] Slimegod:
http://pastebin.com/nELPhXhc how do i fix this. I know it's simple I understand the errors. But as far as where (add-resources) go I haven't got a clue.

Edit: pastebin pulled, errors got fixed.
[Android Software Development] ZduneX25:
Add config_overrideHasPermanentMenuKey to integers.xml of your framework-res (available values 0,1,2)
[Android Software Development] Slimegod:
http://pastebin.com/ViLihwqg I Googled this error and found nothing to fix it.
[Android Software Development] dekkyy:
Anyone had this problem with patchrom V6?

http://pastebin.com/fwFfpDLu
[Android Software Development] datagutt:
You can not replace these smali files anymore. There is no need for it anyways.
[Android Software Development] quakze:
I don't have network issues, but the phone and contact app force closes.

Please help, as it is the only bug in the rom :crying:

---------- Post added at 04:42 AM ---------- Previous post was at 04:35 AM ----------

I am also facing the same issue, will U please help :crying:
[Android Software Development] Notorious:
Could not find method android.net.wifi.WifiNative.getModeCapability, referenced from method android.net.wifi.WifiStateMachine$SupplicantStartingState.processMessage

Add the missing method and see where it goes from there
[Android Software Development] DenZxd:
Thank you! I understand, but what is the file name for code editing. I dont think it one place and one file.

1. unable to resolve static method 24276: Landroid/net/wifi/WifiNative;.killSupplicant (Z)Z

2. Could not find method android.net.wifi.WifiNative.getModeCapability, referenced from method android.net.wifi.WifiStateMachine$SupplicantStarti ngState.processMessage
[Android Software Development] Notorious:
Add the missing method from my post then do another logcat. Have to see if that missing method is causing other issues in the log also
[Android Software Development] Slimegod:
I'm getting this error building patchrom https://pastebin.com/WUtxf2we. But the line it gives for the smali file with the error doesn't even exist. That smali file ends at line 537. What is this error deriving from?

Edit: make clean cleared that up.
[Android Software Development] Slimegod:
My ROM is almost booted but my log isn't showing any errors. The back keys are on like it wants to boot and my phone gets a warm like it's processing but isn't booting It's trying to boot, like when the bottom keys come on but it's still hanging on the boot animation https://pastebin.com/kS7ps9pJ
[Android Software Development] Slimegod:
My latest patchrom, v7 5.11.19 build, the default theme force closes after I set up my device after flashing my ROM. I've never encountered this before with my pervious builds. When I go the the last step of installation and go to the home screen the screen its just black. After a while it says "theme isn't responding" with a black screen with just the notification bar. Is there a fix for this?
[Android Software Development] speed83:
Info

E 'can use this guide to create s7 Rom installed on edge? thank you so much
[Android Software Development] Eazart:
Hello am a new Bea to Porting I have "0" knowledge about porting... Í Want to learn how to port the MIUI8 TO MY DEVICE MT6592 KERNEL 3.4.67 ANDROID 4.4.2..... Í Have installed Cygwin/Kitchen to my pc ?... And
[Android Software Development] candemir2005:
What is the easiest way to port pie MIUI? Xiaomi mi 5S will not receive updates. Which files do I need to replace?
[Android Software Development] Lens_flare:
search for that smali and add it:

com/mediatek/xlog/BLogP

maybe I'm little wrong in smali file but it should look like that.

It also might be a JNI(so library) you might missed from base.

PS: for zopo finally released CM?

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

wrong or incomplete usb service, but it's not a causer.

that one possibly:

E/ViewRootImpl( 439): IllegalArgumentException locking surface
E/ViewRootImpl( 439): java.lang.IllegalArgumentException
E/ViewRootImpl( 439):	at android.view.Surface.lockCanvasNative(Native Method)

Gles20canvas*.smali to change, hope.

PS:

W/PackageManager( 569): Library not found: /system/framework/com.google.widevine.software.drm.jar
W/PackageManager( 569): Library not found: /system/framework/com.google.android.maps.jar
W/PackageManager( 569): Library not found: /system/framework/com.google.android.media.effects.jar

add them
[Android Software Development] tathanhlam66:
i think this is bugs

W/PackageManager( 226): Library not found: /system/framework/com.google.widevine.software.drm.jar

W/PackageManager( 226): Library not found: /system/framework/com.google.android.maps.jar

W/PackageManager( 226): Library not found: /system/framework/com.google.android.media.effects.jar

add permission .xml

continue to see logcat

good luck
[Android Software Development] Lens_flare:
they are only needed for gapps and gallery&camera.
[Android Software Development] Hikari:
I have another question. does anyone know if theres a way to fix the hardware button led not lighting up after waking phone, and the min brightness value of the brightness slider below the toggles?

Thanks a lot!
[Android Software Development] Lens_flare:
framework-res.apk/res/values/arrays.xml search for tag "brightness"
[Android Software Development] cowsquad:
Nice FAQ
[Android Software Development] Lens_flare:
FAQ finally updated.

Additions:

-stage 2: winmerge as diff tool(no tuto, sorry)

-stage 4: "Black bar" fix

Modifications:

-stage 4: hardware keyboard fix statements improved
[Android Software Development] Hikari:
ok i changed

<integer name="config_screenBrightnessDim">10</integer>

to

<integer name="config_screenBrightnessDim">100</integer>

in framework-res.apk\res\values/integers.xml and it solved the screen brightness fully off issue!
[Android Software Development] DJBhardwaj:
Lens, add the following too. Its a much common bug now!
[Android Software Development] Hikari:
Ive been trying to enable the "magnifier when editing text" feature. I succesfully de/re compiled framework-miui-res.apk but it wont boot.. Not even when I just de/re comt it(without touching anything in it)..

I didnt attach a log as I dont think its necessary.. It obviusly is a de/re compiling issue..

Anyone that can succesfully de/re comp this apk, can they please upload the apktool package in a zip? Thanks a lot!
[Android Software Development] bmgreatness:
Does that fix hardware buttons that don't light up.
[Android Software Development] DJBhardwaj:
Use this modified apktool: http://connortumbleson.com/apktool-v1-4-5-a-tool-for-reverse-engineering-apk-files/

Also make sure to issue the command "apktool if framework-res.apk"

Before issuing "apktool d framework-res.apk"

---------- Post added at 05:48 AM ---------- Previous post was at 05:47 AM ----------

No, but you can search the xml for similar code that handles hardware button lights.
[Android Software Development] v1r0x:
Unfortunately, miui switched the nexus from ICS to JB, so I think it's not recommended/possible to port from nexus s, right?

Any other good source to port from?
[Android Software Development] DJBhardwaj:
My question since yesterday. Also there is no other device which may be global. I tried with sgs2 but it has a lot of things to be modified, useless apps, framework files etc.

So I guess we should use crespo jb (no other option yet). And use a JB rom for our device as base.

What say?
[Android Software Development] Lens_flare:
Oh yeah, base now changed.. and unfortunately me too don't see any other option unlike beg devs to start work on JellyBean..

Other devices are LOT customized and not even deserve a try (unlike your device is VERY NEAR to those ones). For Qualcomm devices I do think Desire S would be a choice at last, maybe also a MI-ONE (not upgraded to jelly for now), for moto - RAZR, for SE and Sony(2011 and higher) - of course LT18i as frameworks are very similar, for others -dunno, nobody else based on PURE AOSP ;(
[Android Software Development] DJBhardwaj:
My device already has JB but with bugs, I will base on it now.
[Android Software Development] Lens_flare:
let's hope porting Jelly will be more easy than ICS..

share your experience, I'll try to merge it, to make guide for MIUI JB port(MIUI 5? Oo).

Then I'll myself try to port something, when unlock my device BL :P
[Android Software Development] CosmicDan:
Yeah me too, using CM10 though. I am set up to compile AOSP but I need to find out how to for JB.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Lens_flare:
FAQ updated.

Additions:

-Stage1: Update and notice about Jelly Bean and most recent market situation ;]

-Stage 4: tweak to fix minimal brightness value.
[Android Software Development] bmgreatness:
My bottom capacitive buttons don't light up for my samsung exhibit ii 4g. the work but they only light up unless you toggle the brightness from auto to user defined(but not the other way around) or move the user defined brightness slider. How would I fix this issue(or find a starting point to a fix)?
[Android Software Development] Lens_flare:
Stage 4:

I highlighted those ones you should mod. They are responsible for keys backlight "brightness". Apply something like "100" to each and see what will happen.
[Android Software Development] CosmicDan:
Yeah I have and it's already mostly working, I never had any of those issues.

Looks like sdcard isn't being mounted. Are you using the full /etc folder from CM10? Maybe a vold.fstab issue. Is /storage/sdcard0/ the correct mount? Are you using a CM10 base with CM10 kernel?
[Android Software Development] dekkyy:
Yes, I am using cm10 base, kernel and etc folder. I can even mount storage, that is why it is strange.
[Android Software Development] v1r0x:
they're working on jb but it's not very stable I think.

Time to get an One X or S3 :D
[Android Software Development] Hikari:
Ive been using that. unofrtunately it wont help.. and I was installing framework-res.apk...

nvm Ill skip that feature...
[Android Software Development] CosmicDan:
Even apktool 1.4.9 cant reencode the binary xml properly. If you need to edit values, recompile and put the resources.arsc into original APK. Thats what I did to fix wifi tether and hide navigation bar.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] dekkyy:
Ok, solved my problems with porting miui jb.:o

I just want to know is only my ststusbar so laggy or this is miui problem?
[Android Software Development] DJBhardwaj:
I will only come to know, when my own port shall boot ;)
[Android Software Development] janeindiran:
Can anyone make a porting guide for JB?? I tried the same procedure on my defy with CM10 as base but it was stuck in moto logo.
[Android Software Development] Ozadroid:
Oki fixed it myself!

in 2.8.17 frameworks are broken into 2 parts. FRAMEWORK.jar and FRAMEWORK2.jar

so for ICS ports kernel has to be modded. the BOOTPATH in init.rc of the kernel needs an extra entry of ":/system/framework/framework2.jar".

but this is not for JB coz JB also has a framework2.jar so its kernel must also have!

Lens u can update this info for ICS ports in ur tut!
[Android Software Development] CosmicDan:
If you were already using a CM10 kernel you would not have this problem, the framework2 is a jellybean thing. Are you sure ICS has it?

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] v1r0x:
Today, I wanted to port from Desire S ICS v4 and it has framework2.jar

So, it seems it's not only a JB-thing.
[Android Software Development] Ozadroid:
arrrr.. i said i am using an ICS kernel. but the latest Miui ICS build has FRAMEWORK2.jar just like JB. so u have to edit the BOOTPATH of ur ICS kernel and add the framework2.jar path to it.
[Android Software Development] CosmicDan:
Well there ya go. Guess they are getting the other devices ready for JB too then.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Lens_flare:
defy is the hardest device ever ;]

first of all don't panic and make a log.
[Android Software Development] Lens_flare:
sounds like jelly bean is a best choice guys.. seems too many things should be modded to be on pseudo-ics..

I'm giving up to try jellybean too and will rewrite guide to be a miui 5 porting representation
[Android Software Development] v1r0x:
Oh lord...porting latest releases seems to be a pain in the ar*e

Time to buy a new v4-ready device :D
[Android Software Development] CosmicDan:
It was pretty easy to get MIUI5 booting on my Xperia Play. Here is a quick summary of what I did (using Galaxy Nexus MIUI):

framework.jar:

Whole files copied from CM10:

android/os/SystemProperties.smali
android/hardware/Camera*.smali
android/content/res/PackageRedirectionMap*.smali
com/android/internal/app/ActivityTrigger.smali
com/android/internal/telephony/RIL*.smali
com/android/internal/telephony/SemcRIL*.smali

Also copy these files to allow setting RIL class via build.prop (like CM10 does):

com/android/internal/telephony/PhoneFactory.smali
com/android/internal/telephony/BaseCommands.smali

Files patched with some CM10 code (missing native methods):

android/content/res/AssetManager.smali

services.jar:

Whole files copied from CM10:

com/android/server/input/InputManagerService*.smali

Other notes: yellowpage.db is required for text/mms app to work.

If Google Play Store crashes, use init.d script (might not be needed for your device):

#!/system/bin/sh
# Misc. fixes for MIUI port

# Fix Play Store crashing on startup
if [ ! -d /data/download ];
then
mkdir /data/download
chmod 777 /data/download
fi;

Apart from some occassional graphical glitches (I think that's an issue with JB on my device), everything seems good and stable.
[Android Software Development] DJBhardwaj:
congrats :good:
[Android Software Development] Ozadroid:
Fix my errors then its something :-p
[Android Software Development] DJBhardwaj:
@Lens, Cosmic & v1r0x, please have a look at it.

Taken My device's CM10 port as base and Nexus S miuiandroid JB 2.8.17 as target.

I come across this error: http://pastebin.com/uLrGk1sX

Please help out :/
[Android Software Development] Ozadroid:
Is there /framework/core.jar ??
[Android Software Development] DJBhardwaj:
Yes.
[Android Software Development] Lens_flare:
E/System ( 4012): java.lang.RuntimeException: Unable to find android system pac 66. kage 67. E/System ( 4012): at com.android.server.am.ActivityManagerService.setSystemProcess(ActivityManagerService.java:1345)

or you deleted something, or just recompiled one of the jar in wrong way.. coz it's typical wtf exception
[Android Software Development] Hikari:
O, so Ive got JB MIUI crespo release working on my phone(gt540).. but there again is the keyboard issue... Im trying to solve it. but if there is anyone that already solved it.. can they please help me? Thanks!
[Android Software Development] v1r0x:
Ok, how to port ICS with this framework2.jar?

I've tried to diff AssetManager in framework.jar from base and miui v4 one, but this is strange.

So, what the heck is in framework2 and how to port/diff this?
[Android Software Development] Lens_flare:
Make sure you replaced whole inputmanager*.smali tree

or just remember what fixed it previously

what happened? Exception? Something else?

you don't have it on ics, so why you should even mod it?

framework2.jar is intended to be a vendor-specific framework like framework-miui.jar is. So it is a way vendor might customise build without touching core framework.
[Android Software Development] v1r0x:
No, I didn't flash it. Don't know how to explain, but it's not clear what to add to miui one. With Nexus S everything was fine and clear, but Desire S is crappy :D

I thought this is new in JB?

So, just ignore it?

I want the ICS Nexus S MIUI back :(^^
[Android Software Development] DJBhardwaj:
Me too. Nexus S ICS was just so helpful.
[Android Software Development] CosmicDan:
You still need the entire MIUI framework, this includes framework2.jar on newer versions.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] v1r0x:
yeah, sure. But I don't need to decompile and modify it, right?
[Android Software Development] CosmicDan:
No. Same as most other jar files, just copy it.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Lens_flare:
add all you see except .line :P

yeap, but miui ported its principles to ics :P

like it were on ics-gingerbread eras edge.

Let's say you getting near-jellybean experience on ics. What's more funny, you will get ics experience on jellybean :D
[Android Software Development] Ozadroid:
No u dnt hv to modify it. But u hv to modify ur kernel's init.rc so that framework2.jar is included !!
[Android Software Development] CosmicDan:
JB is more memory efficient than ICS.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Hikari:
Ok, good news about JB MIUI no more keyboard issue.. as we have a switch for harware keyboard(whether device has it or not) in input method selection dialog.. no need to mod any files anymore...
[Android Software Development] v1r0x:
You are kidding, right? :D

This is not my first port :P

But it seems notepad++ doesn't like Desire S either.

any better base than desire s?

There is so much htc stuff...

Ok, I'll have a look at this
[Android Software Development] Lens_flare:
;]

don't it have green blocks? D:

sonys also would be a crap.. same as MI-ONE and sensation.. ehhehe.. seems no way.
[Android Software Development] v1r0x:
sure, it has green, grey and red blocks.

But sometimes the name of the method is green and the method-body red. But the method doesn't exist in miui one. It's weird sh*t :(

I think I wait for JB :D
[Android Software Development] Alex93917:
Hello everybody !

I've a problem with MIUI Video Player and Google Video Player. These apps don't read avi / mp4 / flv files ... MXPlayer read it ! On my 2.7.20, these apps read these format files. Now, don't !

Why ? How to restore this functionnality ? :)

Thank you !
[Android Software Development] ZduneX25:
@CosmicDan tried your steps with xperia neov cm10 fxp134, but no luck, i stuck on boot and adb doesn't recognize phone at the moment (so cannot post logcat)
[Android Software Development] Hikari:
I tried Dans steps and booted in rom succesfully it was pretty good, etc.. then I decided to wipe data.. after the wipe I got stuck in boot.. When I connected it to my pc to see the log it didnt recognize my phone.. I tried to port everything from scratch and again no luck.. (Im definitely sure about my drivers.. they work after flashing any other rom...)
[Android Software Development] CosmicDan:
Are you using CM10 kernel? If so, dunno sorry. I use all CM10 kernel, bins and libs with MIUI5 framework and apps, and I could get logcat working to tell me framework errors - and I went from there.

Maybe its a JB issue for your device. Or a MIUI bug. CM10 is still alpha remember.... us on the Sony Xperia line are lucky because FXP team works on it and they are very active.
[Android Software Development] blatecktonik:
thanks for the guide!!
[Android Software Development] v1r0x:
Another Question :D

Is there any chance to keep CM-features (from base) in the port?

In my case it is "Skip tracks with Volume Buttons".

I know it's "just" a smali thing, but I don't know how to start and I have no mod-less ics rom for my device
[Android Software Development] CosmicDan:
I'm working on this right now, i did it for MIUI4 already (only for Arc S based MIUI). It takes a lot of work! I have it working right now from CM9 port, but it makes both vol buttons work as voldown (and therefore both are skip backwards). So I need to rewrite from scratch based on CM10 :(

I should get there eventually, it's my #1 priority and the one thing stopping me from using MIUI5 daily. If you are using Galaxy Nexus MIUI, it will work on that (that's what I'm making the mod for). But not for other devices.
[Android Software Development] DJBhardwaj:
@cosmic, which updater script did you use on your MIUI5 port? From base cm10 or target miui gn ?
[Android Software Development] CosmicDan:
I use CM10 script but replace the set_perm and set_perm_recursive section with MIUI ones.

EDIT: Latest CM10 requires some more smali's, same as we had to do in original guide.

call logecho xcopy /y framework\smali\android\view\Gles20*.smali "%BUILDER_PATH%\base_postmods_inject\framework\framework.jar\smali\android\view\"
call logecho xcopy /y framework\smali\android\server\BluetoothA2dpService$1.smali "%BUILDER_PATH%\base_postmods_inject\framework\framework.jar\smali\android\server\"
call logecho xcopy /y framework\smali\android\server\BluetoothA2dpService.smali "%BUILDER_PATH%\base_postmods_inject\framework\framework.jar\smali\android\server\"
[Android Software Development] v1r0x:
Thanks, I've tried this a few weeks ago, but was too lazy to fix all :D

Now I could recompile. So I flashed it and this is what I get:

08-21 05:42:07.644: E/AndroidRuntime(1906): *** FATAL EXCEPTION IN SYSTEM PROCESS: WindowManager
08-21 05:42:07.644: E/AndroidRuntime(1906): java.lang.VerifyError: com/android/internal/policy/impl/PhoneWindowManager
08-21 05:42:07.644: E/AndroidRuntime(1906):	at com.android.internal.policy.impl.MiuiClassFactory.createPhoneWindowManager(MiuiClassFactory.java:28)
08-21 05:42:07.644: E/AndroidRuntime(1906):	at com.android.internal.policy.impl.Policy.makeNewWindowManager(Policy.java:74)
08-21 05:42:07.644: E/AndroidRuntime(1906):	at com.android.internal.policy.PolicyManager.makeNewWindowManager(PolicyManager.java:67)
08-21 05:42:07.644: E/AndroidRuntime(1906):	at com.android.server.wm.WindowManagerService.<init>(WindowManagerService.java:306)
08-21 05:42:07.644: E/AndroidRuntime(1906):	at com.android.server.wm.WindowManagerService.<init>(WindowManagerService.java:145)
08-21 05:42:07.644: E/AndroidRuntime(1906):	at com.android.server.wm.WindowManagerService$WMThread.run(WindowManagerService.java:687)
[Android Software Development] CosmicDan:
Huh... dunno. If you look at my .patch file in that thread I made you can get an idea on the required mods. But the difference with new JB is that in the interceptKeyBeforeQueue method (or whatever it's called, can't remember) is that it handles both volume keys as one event with a parameter, instead of two separate events.

It's very possible, I just have to compare CM10 PhoneWindowManager with MIUI one and sort through the chaff (which there is a lot of), isolating just the MediaKey events and stripping the bool check, then adjusting the variables for target framework. Wow, I make it sound so easy :D

I'll let you know when I get it going.
[Android Software Development] v1r0x:
The problem is that I don't have much experience with smali or rather what which line does.

I think I know what the modifications do (if I look at the function names :D) but I have no idea what's going on with all those variables and sh*t.

And maybe if I'd know what's causing the error, I could fix it

Good Luck with your CM10 Mod ;)