yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Lens_flare:
E/System ( 216): java.lang.NullPointerException
E/System ( 216):	at android.provider.Settings$NameValueCache.getString(Settings.java:711)

or you don't have settingsprovider.apk, or recompiled something wrong ;/

RAZR? ;/

that's how that brightness actually works - level-by-level or like kernel said..
[Android Software Development] dekkyy:
Any idea what else should i try??
[Android Software Development] Lens_flare:
I heared some of this work on brightness has done on PowerManagerService in services.jar. I couldn't advise to replace it as system seem to me won't boot but some hacks may be.. dunno exactly..
[Android Software Development] dekkyy:
Yeah, I tough that this would be the last possible chance too.

Will try and report.

Thanks!!!!
[Android Software Development] janeindiran:
But i get Resources Not found bug. Should i change something in framework-res.apk or framework.jar to fix it. Its just a step away from completing boot but i get that bug:(
[Android Software Development] Lens_flare:
you provided a piece of log and stand you are sure trouble is here. How can we help there?
[Android Software Development] dekkyy:
Maybe your base rom is not good. Or you probably diffed smali file wrong.
[Android Software Development] janeindiran:
I will post the whole log soon.
[Android Software Development] Ozadroid:
no matter what i do gets stuck wid this. ****ing Huawei :/

E/AndroidRuntime( 204): *** FATAL EXCEPTION IN SYSTEM PROCESS: WindowManagerPolicy

E/AndroidRuntime( 204): android.database.sqlite.SQLiteException: no such table: systemex: , while compiling: SELECT value FROM systemex WHERE (name=?)

E/AndroidRuntime( 204):	at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)

E/AndroidRuntime( 204):	at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:78)

E/AndroidRuntime( 204):	at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:143)

E/AndroidRuntime( 204):	at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram.java:361)

E/AndroidRuntime( 204):	at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:127)

E/AndroidRuntime( 204):	at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:94)

E/AndroidRuntime( 204):	at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:53)

E/AndroidRuntime( 204):	at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:47)

E/AndroidRuntime( 204):	at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1564)

E/AndroidRuntime( 204):	at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:354)

E/AndroidRuntime( 204):	at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:291)

E/AndroidRuntime( 204):	at com.android.providers.settings.SettingsProvider.query(SettingsProvider.java:429)

E/AndroidRuntime( 204):	at android.content.ContentProvider$Transport.query(ContentProvider.java:178)

E/AndroidRuntime( 204):	at android.provider.Settings$NameValueCache.getString(Settings.java:729)

E/AndroidRuntime( 204):	at android.provider.Settings$Systemex.getString(Settings.java:4598)

E/AndroidRuntime( 204):	at android.provider.Settings$Systemex.getInt(Settings.java:4637)

E/AndroidRuntime( 204):	at com.android.internal.policy.impl.PhoneWindowManager.init(PhoneWindowManager.java:927)

E/AndroidRuntime( 204):	at com.android.internal.policy.impl.MiuiPhoneWindowManager.init(MiuiPhoneWindowManager.java:101)

E/AndroidRuntime( 204):	at com.android.server.wm.WindowManagerService$PolicyThread.run(WindowManagerService.java:733)

I/Process (

Full Log : http://logcat.miui.us/1015001
[Android Software Development] janeindiran:
Finally got the v4 to boot with different base and miui rom. Can anyone tell how to fix orientation issue?? It automatically changes orientation to landscape.
[Android Software Development] janeindiran:
I made a new version which boots(Used Atrix v4) fine but orientation stays in landscape and file manager doesn't work. Another version i made with NEXUS S v4 and i get resources not found bug. I have attached the complete logcat. Waiting for your reply
[Android Software Development] Shrewdy:
Got stuck at the First Step!!

Hi Lens,

I red your guide carefully (at least the 1st stage) and then i decided to port MIUI over Quarx's latest CM10 nightly.

But even before i could start i got stuck. Here is what i did...

1. I opened the CM10 archive file through 7-zip and then deleted the 4 folders you mentioned about (Apps, Fonts, Framework, Media).

2. I used MIUI 2.8.10 for Motorola Droid Razr and opened this archive as well (using 7-zip).

3. Now when i tried to copy the apps folder from MIUI archive to CM10 archive i got the following error. (Please see the attached image).

Then i peeped inside the CM10 archive under system\lib\modules and found that there were actually 2 files with the same name. :mad:

I though i would rename one and continue but even renaming the file gave me an error...!! :p

And that's about it...could not get any further...

I searched through your thread regarding the file and could not find anything fruitful...:confused:

Please help!!

Thanks
[Android Software Development] Lens_flare:
Try mLidOpen fixes (stage 4)

log?

CM10 = Jelly Bean, MIUI 2.8.10 ICS.. well, definitely a wrong choice.

case-insensitive file system, you have to do that on linux.
[Android Software Development] CosmicDan:
Contact your CM10 builder, the update ZIP he made is made in linux and he obviously made a mistake that breaks editing the ZIP file on Windows.

Or, just unpack the whole zip file, and ignore the duplicate file (only take one, they should be identical). If not, guess.

EDIT: You're a quick one Lens :P
[Android Software Development] Shrewdy:
Which is JB then

Hi Lens,

Thanks for the quick reply....just wanted to know if MIUI 2.8.24 is JB....and if not then is it that there is no MIUI JB version yet !!

Thanks
[Android Software Development] :
Thanks man really appreciate it I used to be a big fan of your miui ports for x10! And thank you as well lens I'll double check.. :)

---------- Post added at 07:17 AM ---------- Previous post was at 06:40 AM ----------

lens could a symlink be the problem?

if i go to my root of phone i have etc/init.d
[Android Software Development] Lens_flare:
normally etc folder is mapped to root, that's why init scripts work.
[Android Software Development] v1r0x:
I still have two problems.

1: usb debugging text in status bar is "Done - Prev" instead of "USB debugging connected - Select to disable USB debugging."

I figured out, that in base rom the 2 adb lines (adb_active_notification_title and adb_active_notification_message) are line 1096 and 1097.

But in the miui rom the lines are line 1065/1066. Done and Prev are line 1096 and 1097.

So, a solution would be to copy the adb lines to 1096/1097 but I thought android gets strings with the name? In apps you write

getString(R.id.adb_active_notification_title);

So whats the problem here?:confused:

2: I have bad/no mobile connection. Also the icon in the status bar doens't change. There are always 2 white signal bars. But ddms and my app show changing signal values.

And if I get mobile connection it's only "H" and no "G", or "3G" or "E". Any ideas?
[Android Software Development] Lens_flare:
FAQ also enlights that :p

you have to change resource constants.

replace com/android/telephony/SignalStrength*.smali

I'd spring in cheers if I got constant "H" instead of that damn "E" :D
[Android Software Development] v1r0x:
:o thought this is just a strange error in my port :D

should have read the whole faq :angel:

Ok.

Edit: think you mean android/telephony ;)

"E" is better than crappy "G" :D

and constant E is also better than "H" for about 2 seconds ;)

Thank you:)

---------- Post added at 07:15 PM ---------- Previous post was at 06:34 PM ----------

ok, I've replaced SignalStrength.smali and SignalStrength$1.smali in

framework.jar/android/telephony

but still the same problem :(
[Android Software Development] CosmicDan:
Switch from 3G-preferred to 2G-only :P
[Android Software Development] Lens_flare:
yah :p

tried also replace RIL*.smali?
[Android Software Development] v1r0x:
something strange happened...at first there were two signalstrengh bars but then it changed to three! :highfive:

I really love you, Lens :D
[Android Software Development] ThEuNdYiNg1:
i tried the keyboard fix but i could not find the comment "<------------ mLidOpen" anywhere, i did a search and it did not find anything. can anyone help?
[Android Software Development] Lens_flare:
try "mLidOpen".
[Android Software Development] ThEuNdYiNg1:
okay now i found multiple. are those constants in order or are they at different places?
[Android Software Development] Lens_flare:
they are in different places in order I specified :d
[Android Software Development] ThEuNdYiNg1:
okay i changed them, it still happens but this time it stays in landscape always even when i open the keyboard.

anything else i should change?
[Android Software Development] Lens_flare:
try different constants combo like 1 0 -1.
[Android Software Development] ThEuNdYiNg1:
i tried multiple and still nothing. how many constants are there to change, only 3 or more? and does it matter if its v1 or v0?
[Android Software Development] Lens_flare:
sorry to hear, I don't own keyboarded smartphone, so couldn't precise more than I heared.

3.

Those combos are most likely handled on each system, on keyboarded ones all 3 are here, on non-keyoarded, just "-1" used as answer so it will always activate software keyboard.
[Android Software Development] CosmicDan:
I have an Xperia Play (slide-out gamepad) and ported it from Arc S ROM (no slide) and never had orientation issues, guess they either use a different implementation of lidswitch or its already right in the Arc S framework.

Maybe try porting a different devices' MIUI.
[Android Software Development] ThEuNdYiNg1:
After multiple searches i came across this and fixed it. https://docs.google.com/document/d/18iDY_FLS4kuiy2wcU0PokUAVnNa3C2VsB-0n948r1Gk/edit?pli=1

it says "‘\smali\com\android\internal\policy\impl\PhoneWindowManager.smali’ then try reversing the variables 0x* near ‘.line 1099’ and ‘.line 1096’. Search for “1096” or “getSwitchState” For example, make 0x1 0x0 and 0x0 0x1. "

i think this will help other people too.
[Android Software Development] Lens_flare:
oO

If you find 10 differences from my FAQ I will do my best to push "thanks" 10 times to you..

really, isn't it what I wrote?
[Android Software Development] CosmicDan:
Lol, it's exactly what you wrote in the original FAQ. Odd.
[Android Software Development] Lens_flare:
2.8.24 Nexus S, Galaxy Nexus, Nexus 7 are JellyBean. All other devices are still ICS.
[Android Software Development] Shrewdy:
Thanks bro....will try something different soon...
[Android Software Development] shubhamchamaria:
..............
[Android Software Development] CosmicDan:
Why spam?

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] shubhamchamaria:
I posted a problem with logcat then realized I missed out on something....therefore I removed my post

Sent from my One V
[Android Software Development] v1r0x:
Ok, I have two problems.

1.: If I go to settings and in wifi section on "more" I get a FC.

I think the problem is the NFC toggle, but I have no idea how to fix it.

2.: this one is very annoying. Every time I open the miui music player I get the "filter information" and the settings are set to default.

any ideas?
[Android Software Development] Lens_flare:
What if you kill all nfc-related permissions in addition to nfc.apk? One of them - nxp.mifare or something like that.

sounds like it wipes database with settings like you press "clear data", it might be something to do with database(sqlite) smalisor sqlite libs.
[Android Software Development] Lens_flare:
Seem to me you replaced SystemProperties.smali, but it just don't have that field about nfc

Do you have problems with other apps? If no, at last you could create that dir manually and assign write permissions.
[Android Software Development] CosmicDan:
Has anybody else with a working JB port got a SIM PIN Code prompt on startup even though there is no PIN? Not sure how to fix that. Minor since pressing Dismiss works, but fairly annoying.
[Android Software Development] v1r0x:
Yes, I have replaced it. At first I've diffed the files, but this didn't work, so I replaced it.

I don't know. Are there any other miui apps with shared prefs?

the dir and also the file exists.
[Android Software Development] smokin901:
Porting to Sensation and HD2,rom on both the phone works great however few issues faced on both the phones.

During call cannot get mic to mute. logcat show onMuteClick():new Mutestatus =true. but person on other side can still hear me. have made sure all the audio and media and call related smalis are as close to aosp/cm10 as possible.

any idea how to fix it.
[Android Software Development] Lens_flare:
Is there a line about nfc in that smali? Try to find it and paste to actual code.

MIUI-only apps are shared though.. File might exist, but folder isn't writeable/readable so that app couldn't access it after creation.

try to apply that xml line to phone.apk/res/values/bools.xml

<bool name="send_mic_mute_to_AudioManager">true</bool>
[Android Software Development] v1r0x:
Thus I replaced it, it's the base file and there is no NFC

The folder (data/data/com.miui.player/shared_pref) has rwx------ as permission.
[Android Software Development] CosmicDan:
Try doing chmod -R 777 /data/data/*

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] v1r0x:
"Unable to chmod /data/data/com...../lib: Read-only file system"

Also I get this error, if I try to click on an app in Settings->App:

09-01 14:21:50.141: E/AndroidRuntime(14661): FATAL EXCEPTION: main
09-01 14:21:50.141: E/AndroidRuntime(14661): java.lang.RuntimeException: Unable to resume activity {com.android.settings/com.android.settings.SubSettings}: java.lang.NullPointerException
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2586)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2614)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2100)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.app.ActivityThread.access$600(ActivityThread.java:133)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1198)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.os.Handler.dispatchMessage(Handler.java:99)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.os.Looper.loop(Looper.java:137)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.app.ActivityThread.main(ActivityThread.java:4758)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at java.lang.reflect.Method.invokeNative(Native Method)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at java.lang.reflect.Method.invoke(Method.java:511)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at dalvik.system.NativeStart.main(Native Method)
09-01 14:21:50.141: E/AndroidRuntime(14661): Caused by: java.lang.NullPointerException
09-01 14:21:50.141: E/AndroidRuntime(14661):	at com.android.settings.applications.InstalledAppDetails.jQ(InstalledAppDetails.java:535)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at com.android.settings.applications.InstalledAppDetails.onResume(InstalledAppDetails.java:456)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:874)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1035)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1017)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:1812)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.app.Activity.performResume(Activity.java:5098)
09-01 14:21:50.141: E/AndroidRuntime(14661):	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2576)
09-01 14:21:50.141: E/AndroidRuntime(14661):	... 12 more
[Android Software Development] Lens_flare:
remount data as read/write.

ah ;[ what if you don't replace systemproperties.smali,just boot without replacing?
[Android Software Development] v1r0x:
dumb question: How to remount data? :o

If I use nexus s systemproperties I get this nice error:

?:??: W/?(?): /system/bin/sh: logcat: I/O error
[Android Software Development] Lens_flare:
mount -o -w data /data

maybe it works, maybe not, I'm pretty bad with all that remounts :P

oh..
[Android Software Development] v1r0x:
Ok, I'm using the base systemproperties again.

Now I've found this in the log:

09-01 14:47:55.513: W/PackageManager(291): Unknown permission android.permission.ADD_SYSTEM_SERVICE in package com.android.phone
09-01 14:47:55.523: W/PackageManager(291): Unknown permission android.permission.WRITE_INTERNAL_STORAGE in package com.miui.player
09-01 14:47:55.523: W/PackageManager(291): Unknown permission com.android.vending.billing.IBillingAccountService.BIND2 in package com.google.android.gsf.login
...

Looks like it's not a chmod problem, right?
[Android Software Development] Lens_flare:
um, your error.. no clue how could it be, maybe it's something to do with your way you recompiling framework?
[Android Software Development] v1r0x:
Do you mean framework.jar or framework-res.apk?
[Android Software Development] smokin901:
one way is to use

adb remount on command prompt

or

mount -o remount rw /data

---------- Post added at 08:41 PM ---------- Previous post was at 08:37 PM ----------

Thanks but only modifying bools.xml did not work

had to modify

smalis in media as well
[Android Software Development] shubhamchamaria:
Any idea why music and pictures don't appear in gallery and music player...read somewhere that you have to format your sdcard but hopefully there is some other solution...

Sent from my One V
[Android Software Development] mscreater:
about the two-dimension code didn't work

hi i port MIUI from Nexus s, but when i use camera or other app that relate two-dimension code it can't display right scene.

problen 2:the torch doesn't work also,

do some one have the same problem? And you have solve it?:crying:
[Android Software Development] Lens_flare:
both ;p

manifest contains permissions, some of them might be corrupted.

make logs please
[Android Software Development] v1r0x:
Ok.

For apk files I use the 1.4.9 apktool and for jar files the 1.3.2 smali/baksmali.

After recompile I replace only resources.arsc in apk and classes.dex in jar file.
[Android Software Development] mscreater:
about the two-dimension code didn't work

Here is my logcat, now it can entry system but only the two problem i can't solve it ,http://minus.com/lbuzXFKRg2Zpei
[Android Software Development] Lens_flare:
hell.. that's exactly how it should work..

but what's a causer then..

anyway, am starting a porting session in next days, if I see that issue resolved, I'll let you know.

I Don't see anything wrong except maybe wrong invoke-as binary.
[Android Software Development] mscreater:
i will try another invoke-as

I use the miui invoke-as binary, and in updater-script write:

set_perm(0, 0, 06755, "/system/xbin/invoke-as");

set_perm(0, 0, 06755, "/system/xbin/librank");

set_perm(0, 0, 06755, "/system/xbin/procmem");

set_perm(0, 0, 06755, "/system/xbin/procrank");

set_perm(0, 0, 06755, "/system/xbin/su");

Then ,i try another invoke-as binary from other mini,If it works i will tell you ,if not also replay,thank you
[Android Software Development] mscreater:
hi , i put a new logcat when i use torch,http://minus.com/lt9beeELGFo6Z
[Android Software Development] Lens_flare:
W/System.err( 449): java.io.FileNotFoundException: /sys/class/leds/flashlight/brightness: open failed: EACCES (Permission denied)

you are not so fortune though..

Alright, go to MIUIsystemUI.apk, strings.xml, it might contain something like that

<string name="flashDevice">[path there]</string>

change path to /sys/class/leds/flashlight/brightness and assemble apk again.
[Android Software Development] mscreater:
Yes, The original is that, i didn't change it
[Android Software Development] CosmicDan:
Change it to the correct path? Get it from another ROM or try to find it yourself...

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] mscreater:
Now i have two MIUI(A and B, two versions, A is 2.7.20 the two-dimension code is OK ,but torch doesn't; B is 2.8.6, Torch is ok ,but two-dimension code is not) A's torch work well, but B is not. I check the path is the same, don't know which file effect the torch.

and also two-dimension code is the same problem,
[Android Software Development] CosmicDan:
What about newest MIUI? What is "two dimension code"?

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Hikari:
It looks like Im having trouble with apktool.. Im doing nothing more than changing boolean values in bools.xml in framework-res.apk and I assemble it successfully, flash it, and get bootloop(wtf errors).. Can someone upload apktool.jar and aapt.exe.. Someone that is sure it works without errors..

btw Im using apktool 1.4.10 with the newest aapt.exe from android sdk package..

Thanks a lot!
[Android Software Development] mscreater:
two dimension code like this picture ,i don't know it's name of English,i just translate by google,sorry for my bad english.

newest MIUI support free desktop, but i doesn't port that version...:(

http://i.minus.com/ih54af7hqvQLE.png

---------- Post added at 01:56 PM ---------- Previous post was at 01:51 PM ----------

Here is my apktool and aapt.exe http://minus.com/ltdi5Rk5miKG1

http://minus.com/lbon0kzXof4AK7
[Android Software Development] v1r0x:
Ok, thanks.

Maybe it's just an error in the downloaded zip or something like that.

I'll update my port to latest miui. Hopefully I get rid of this error
[Android Software Development] janeindiran:
Is there anyway to solve this issue??? i use MIUI NEXUS S JB 2.8.31 ported on DEFY CM10.
[Android Software Development] :
That's the full log cat?
[Android Software Development] janeindiran:
No that's were it starts to loop

---------- Post added at 07:55 PM ---------- Previous post was at 07:49 PM ----------

Full log is attached. Can anyone help?
[Android Software Development] v1r0x:
I'm having a problem with the hardware keyboard and auto-rotation.

According to the FAQ there should be a method called "GetSwitchState". But it doesn't exist.

I searched for "const/4 v1" and these are the best lines I found (imo):

.line 1235
.end local v0 #rotation:I
:goto_d
const/4 v1, -0x1

:goto_e
return v1

.line 1224
.restart local v0 #rotation:I
:sswitch_f
const/4 v1, 0x0

goto :goto_e

.line 1226
:sswitch_11
const/4 v1, 0x1

But this don't work :(

Anyone an idea?

ps: miui music seems to work :)
[Android Software Development] janeindiran:
It exists on MIUI v4 for sure. I fixed the same issue you are trying to fix.
[Android Software Development] janeindiran:
Can anyone help me solve this issue?? I am porting MIUI JB NEXUS S ROM on DEFY CM10. What is wrong????