yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Lens_flare:
about my logcat issue. nobody remembered "masstorage, adb " define in build.prop.. today I realised it's just "masstorage" :D so I guess that was a reason.

So I'm starting new porting session, will compile new FAQ for jelly asap.

yap
[Android Software Development] CosmicDan:
Funny, the cm10 kernel for my device has only adb so mass storage doesnt work properly in recovery. And its still not fixed lol. It is in my own kernel default.prop though.

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

more fun: http://xdaforums.com/showpost.php?p=31551585&postcount=848

:D
[Android Software Development] CosmicDan:
Haha! I missed that. Yeah the Arc and Neo are very similar to the Play. And yes, Camera works perfectly :)

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Lens_flare:
I'm not a cdma user,that is it :P

You have to change all ril-related libraries like libril*.so at system/lib, also replace a ril class in framework.jar(which mentioned in OP).
[Android Software Development] CosmicDan:
It should be the same if you build with Cyanogenmod for your CDMA device, of course if there is a version for CDMA revision.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Ozadroid:
i told u adb is not working :|
[Android Software Development] Lens_flare:
I found that it works, just shows something like "device offline"..

anyway I've got a lesson :]]
[Android Software Development] Ozadroid:
Hey!

On the First Boot everything works fine. but after that when i reboot the device the services keeps dieing. after sometime the device atklast booted.

how is it so that it boots normally on the first time, but after that not!

attaching my logcat after reboot.
[Android Software Development] CosmicDan:
Is your data or cache partition full?

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Ozadroid:
okay how to find that?? :-s

my system partition has 12MB free space.
[Android Software Development] CosmicDan:
df -h from terminal. Thats fine for system partition.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Ozadroid:
shell@android:/ # df -h data

df -h data

Filesystem Size Used Free Blksize

-h: No such file or directory

data 199M 137M 62M 4096

1|shell@android:/ # df -h cache

df -h cache

Filesystem Size Used Free Blksize

-h: No such file or directory

cache 64M 1M 62M 4096
[Android Software Development] CosmicDan:
Ok thats fine, dunno what is causing this myself then.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] _polimorph_:
Any progress about that logcat not showing up?
[Android Software Development] Ozadroid:
hmm no problem.. it starts eventually after many FCs :-s
[Android Software Development] luisakira2301:
Thanks for this guide. Now port miui 4 :)
[Android Software Development] ChaosChris:
Awesome guide! Thanks for your work. Now we have one more great Rom for the galaxy player 4 .

Gesendet von meinem Nexus S mit Tapatalk 2
[Android Software Development] v1r0x:
Is it just me or is porting latest miui a little bit *****y?

Had to replace whole HTML5* and WebSettingsClassic* tree. And after replacing whole WebSettingsClassic I also had to diff the new WebSettingsClassic.smali with the nexus s one.

Hope now it works...

Edit: I have still one problem. There is no Google Ears Widget. So I decided to install it again.

First attempt was using Root Explorer, change dir to /system/app and re-install GoogleEars.apk but it ended up with "app not installed".

Then I tried to re-install gapps and flashed the zip in CWM. Same....

My last idea was to install it via adb (adb install GoogleEars.apk) but this doesn't work either.

In terminal I get this:

pkg: /data/local/tmp/GoogleEars.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

and in ddms I have this:

09-15 14:08:57.045: W/ActivityManager(309): No content provider found for permission revoke: file:///data/local/tmp/GoogleEars.apk
09-15 14:08:57.145: E/PackageParser(309): Package com.google.android.ears has no certificates at entry classes.dex; ignoring!

So, it has no certificates. But why? :confused:

Anyone an idea?
[Android Software Development] Lens_flare:
yes yes, me too trying to boot that from scratch and still damn native errors ;/

I always wanted as minimal invasion as possible but now it's war, miui..

what's wrong? mine issue resolved by adding a build.prop line, which refers to mass_storage,adb.

First of all, strange package name, should be earth, not ears(human part of body? :D).

Secondly, it might be something to do with a way how miuiandroid implemented gapps, it might be just not full package, so that you might have some permissions/frameworks missing.
[Android Software Development] CosmicDan:
Nah Google Ears is some new thing, dunno what exactly since I removed it.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] v1r0x:
Ok, dammit miui :(

rtfm! :P

GoogleEars is for song detection (similar to shazam)

I've installed the complete gapps-zip from goo.im, so it should work...

Sent from my awesome Desire Z with MIUI JB using the xda-developers app
[Android Software Development] pratikmore:
Problem solved,now everything works fine.
[Android Software Development] CosmicDan:
Full logcats are important.

I dont think MIUI is supposed to work with gapps.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] pratikmore:
Logcat:- http://db.tt/mskriTYi

Themes and wallpaper not working.not copied liblock and liblsec.so

sent from my Galaxy 3 MIUI JB
[Android Software Development] janeindiran:
just add these lines in update script

delete_recursive("/data/dalvik-cache");

delete_recursive("/data/tombstones");

delete_recursive("/sdcard/MIUI/.cache");

delete_recursive("/sdcard/DCIM/.thumbnails");

delete_recursive("/sdcard/DCIM/100andro");

delete_recursive("/sdcard/Android/data/com.android.providers.media");

delete_recursive("/sdcard/Android/data/com.miui.gallery");

delete("/data/system/batterystats.bin");
[Android Software Development] CosmicDan:
How is that any different to formatting data? Ive never had to erase any sdcard folders since GB MIUI.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] janeindiran:
I had the same issue. This code solved it.
[Android Software Development] santajin:
I run into a new problem with miui 2.9.14, when the screen is off, my media service will be killed in a while, anyone knows what happened? In the previous version, it worked perfectly.

ps: I based on NS 2.9.14 and Andromadus cm10

EDIT: Replaced some so related to audio from an old base rom, the problem solved.
[Android Software Development] Lens_flare:
Does anybody know how to disable setup wizard? Hell, no build.prop switch I have tried help.. deleting provision.apk leads to some unbelieveable errors..

I know each build out there is unlocked from this sh** main question - HOW? ;/

btw, my build succeed(woohoo, at least! :D ), now have to illiminate some minor quirks like that..
[Android Software Development] CosmicDan:
There is no setup wizard, what?

Dont tell me you're installing gapps?

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Lens_flare:
It's there for me :/

contains:

-Welcome

-Wifi settings

-traffic settings (if wifi not accessible)

-sim dismiss(if sim not there) - was the only way I could bypass it

-Xiaomi account [heey, I'm not chinese ;[ ]

-congrats

I really had no such thing before I booted my jb rom.. not in liquid mt ports, nor in official arc miui..

Phantom of the Opera? O_o

oh no, just smali fixes and standard additions..
[Android Software Development] Ozadroid:
I am Getting this wierd error when i try to get permission for something.. like in the below error.. when No-Frills want Permission a dialogue box appear saying Permission Manager Crashed. but if i set ALLOW ALL in root permissions this doesnt happen.

D/AllAppsList( 1247): Loaded application No-frills CPU Control at (1, 3) of screen 3 under container -100

D/Zygote ( 121): Process 1714 terminated by signal (15)

I/ActivityManager( 318): Process com.android.vending (pid 1714) has died.

W/ActivityManager( 318): Scheduling restart of crashed service com.android.vending/com.google.android.finsky.services.DailyHygiene in 5000ms

D/IconHelper( 1247): Generate customized icon for it.sineo.android.noFrillsCPU.png

D/IconHelper( 2699): Generate customized icon for it.sineo.android.noFrillsCPU.png

W/System.err( 2699): java.io.FileNotFoundException: /data/system/customized_icons/it.sineo.android.noFrillsCPU.png: open failed: EACCES (Permission denied)

W/System.err( 2699):	at libcore.io.IoBridge.open(IoBridge.java:416)

W/System.err( 2699):	at java.io.FileOutputStream.<init>(FileOutputStream.java:88)

W/System.err( 2699):	at java.io.FileOutputStream.<init>(FileOutputStream.java:73)

W/System.err( 2699):	at miui.content.res.IconCustomizer.saveCustomizedIconBitmap(IconCustomizer.java:225)

W/System.err( 2699):	at android.app.MiuiThemeHelper.getDrawable(MiuiThemeHelper.java:76)

W/System.err( 2699):	at android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:143)

W/System.err( 2699):	at android.app.ApplicationPackageManager.getApplicationIcon(ApplicationPackageManager.java:665)

W/System.err( 2699):	at fJ.á”*(Source:894)

W/System.err( 2699):	at fJ.à¦•(Source:443)

W/System.err( 2699):	at dy.à¦•(Source:513)

W/System.err( 2699):	at dC.run(Source:375)

W/System.err( 2699):	at hD.run(Source:116)

W/System.err( 2699): Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)

W/System.err( 2699):	at libcore.io.Posix.open(Native Method)

W/System.err( 2699):	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)

W/System.err( 2699):	at libcore.io.IoBridge.open(IoBridge.java:400)

W/System.err( 2699):	... 11 more
[Android Software Development] Lens_flare:
W/System.err( 2699): java.io.FileNotFoundException: /data/system/customized_icons/it.sineo.android.noFrillsCPU.png: open failed: EACCES (Permission denied)

it is related to themes though, maybe you don't have invoke-as?
[Android Software Development] Ozadroid:
yes i have invoke-as also given perm in updater script. my themes are also working fine!

1 more thing.. hardware keys are not glowing what shud i change??

<integer-array name="config_autoBrightnessKeyboardBacklightValues">

or

<integer-array name="config_autoBrightnessButtonBacklightValues">
[Android Software Development] CosmicDan:
I'm still on 2.9.7 here, are you on last fridays release? Maybe its a new feature. If so, compare new ROM to old one maybe.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Lens_flare:
uh.. then show a result of:

ls -l data

you might do that command via adb shell or in terminal with su rights.

both though

Uhm, I should install new, official one to see..

btw, that's how it looks like:
[Android Software Development] CosmicDan:
Yeah ive never seen that before. Im on 2.9.7 so its either in the new one or i accidently disabled it somehow. Or I didnt port it so it never runs?

Are you on 2.9.7 or different?

Edit: im still bugged by the sim pin prompt on every start up, do you have that?

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] Lens_flare:
haha funny variant :p

2.9.14

yap I have that too.

It seems sim lock switch in security/passwords settings turned on, on boot. It couldn't be turned off even I typing right pin (I don't have it preinstalled)..

I guess it is somewhat a nexus feature which hardcoded on phone.apk..

I investigated radio log and it just shows "notifying network locked, reason: NETWORK", crap..
[Android Software Development] Ozadroid:
here u go..

ls -l data
drwxrwxrwx root root 2012-09-16 18:31 amit
drwxrwxr-x system system 2012-09-16 18:37 anr
drwxrwx--x system system 2012-09-16 18:31 app
drwx------ root root 2012-09-16 18:31 app-asec
drwxrwx--x system system 2012-09-16 18:31 app-private
drwxrwxrwx system system 2012-09-16 18:31 audioprop
drwx------ system system 2012-09-16 18:34 backup
drwxrwx--x system system 2012-09-16 19:36 dalvik-cache
drwxrwx--x system system 2012-09-16 18:33 data
drwxr-x--- root log 2012-09-16 18:31 dontpanic
drwxrwx--- drm drm 2012-09-16 18:35 drm
drwxr-x--x root root 2012-09-16 18:48 local
drwxrwx--- root root 2012-09-16 18:31 lost+found
drwxrwx--t system misc 2012-09-16 18:31 misc
drwx--x--x system system 2012-09-16 18:31 nv
drwx------ root root 2012-09-16 19:36 property
drwxrws--- radio radio 2012-09-16 19:33 radio
drwxrwx--x system system 2012-09-16 18:31 resource-cache
drwxrwxrwx system system 2012-09-16 18:32 sdcard
drwxr-x--- root shell 2012-09-16 18:31 ssh
drwxrwxr-x system system 2012-09-16 20:38 system
drwx------ system system 2012-09-16 19:36 tombstones
drwx--x--x system system 2012-09-16 18:31 user

Also changed the values for backlit. still hardware keys not lighting up :(

<integer-array name="config_autoBrightnessButtonBacklightValues">
<item>255</item>
<item>255</item>
<item>255</item>
<item>255</item> it was 0 previously
<item>255</item> it was 0 previously
<item>255</item> it was 0 previously
</integer-array>
<integer-array name="config_autoBrightnessKeyboardBacklightValues">
<item>255</item>
<item>255</item> all were 0 previously
<item>255</item>
<item>255</item>
<item>255</item>
<item>255</item>
[Android Software Development] AdhvanIt:
@Lens_flare, I can't thank you enough for this tutorial. I have MIUI JB booted and running decent on my Sprint SGS2 (That has no currently supported MIUI ROMs). Just a few bugs to fix before its able to be a DD. Honestly, I wouldn't even have known where to start without this thread.

Great work!

Sent from another Galaxy [S2]
[Android Software Development] _polimorph_:
Thanks and would you be kind to tell me how that line looks like? It's this one: "persist.sys.usb.config=mass_storage,adb"

? I kept searching and I didn't find any information about this, besides this awsome thread. Obtaining logcat ability would give me a good start for debbuging and porting MIUI to Sammy JB leak base.
[Android Software Development] Lens_flare:
about my welcome prompt - it seems it is a 2.9.14 feature for jelly bean. Investigating a way to get rid of it (might be a build.prop switch)

sounds interesting.. again that "access denied when actual rights exist".. can I see a full log also as I doubt reason is actually there.

maybe there should be a specific switch.. before you run to search that, apply values arrays(those and higher, those about backlight levels) from base first, maybe there is such bad combo..

yep.
[Android Software Development] Ozadroid:
Ok i'll try all this after few days. Just Unrooted my device to Stock ROM. The warranty is getting over in next month so i'll be getting it services beore that :P
[Android Software Development] Lens_flare:
again about my welcome prompt:

the obvious way to get rid of it works - you just need an older version of provision.apk(disassembled both - changes are just monstruous..).

Curious, how long it will work :P
[Android Software Development] :
Hey again! Long time :P.

Got some errors. Anybody willing to give this a shot?

http://logcat.miui.us/1081006
[Android Software Development] Lens_flare:
E/HAL ( 246): Cannot load library: link_image[1916]: 246 could not load needed library 'liboverlay.so' for 'hwcomposer.msm8960.so' (get_lib_extents[767]: 246 - liboverlay.so is not a valid ELF object)

O_o

why you using sensation/xperia s(the only devices with 8960 in miui) rom to port?
[Android Software Development] :
im not. those are libraries to fix hw flickering. i took liboverlay from the jellybean release of touchwiz for the s3
[Android Software Development] Lens_flare:
hwcomposer.msm8960 definitely won't fix your flickering problems..
[Android Software Development] :
this is a new port. i haven't added hwcomposer. it's from cm10.
[Android Software Development] CosmicDan:
Well obviously those two libraries wont work together. Do they work together on CM10?

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] :
As far as I know. They boot fine on CM10

edit. Also on my last working build on 9/9 I still had that liboverlay.so error and it booted fine. It cannot be that.

booting logcat : http://logcat.miui.us/1082006
[Android Software Development] CosmicDan:
Thanks for that info, was getting a hard crash without any useful info in the Browser with 2.9.14 and this info helped. I also had to patch WebViewCore.smali references to "nativeSelectText" including one of them synthetic access methods (or whatever they are).

But now I have a strange issue, maybe related elsewhere. Web pages don't detect Android user agent, e.g. Google shows full site. But if I change user agent string to iPhone then it shows the mobile version - just no mobile site when it's set to the default "Android". Anybody else have this?

EDIT: Huh... I changed the UA back to Android and it's OK now. Strange. Maybe an MIUI bug.

EDIT2: Another crash when selecting text in MIUI Browser, I will share full .patch files and smali-replace list when I sort it out and get it all working for me.

EDIT3: I fixed text selection by replacing the whole WebViewCore* tree, but now Facebook simply doesn't work, displays Connection Error. Nothing interesting in logcat, apart from the same HTML5Video and Readmode/Nightmode errors that display when you open Browser too.
[Android Software Development] ronak.super:
Need some help!

SYstem UI is crashing!

Logcat Attached.

Please look into it.!

https://docs.google.com/open?id=0B_dDbUNwuFRldFhNS0loS25zLW8
[Android Software Development] CosmicDan:
No idea. Framework mismatch maybe. Did you mess with framework-res.apk?

E/AndroidRuntime( 1515): FATAL EXCEPTION: main

E/AndroidRuntime( 1515): java.lang.RuntimeException: Unable to create service com.android.systemui.SystemUIService: java.lang.SecurityException: invalid status bar icon slot: bluetooth_handsfree_battery

E/AndroidRuntime( 1515):	at android.app.ActivityThread.handleCreateService(ActivityThread.java:2274)

E/AndroidRuntime( 1515):	at android.app.ActivityThread.access$1600(ActivityThread.java:126)

E/AndroidRuntime( 1515):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1204)

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

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

E/AndroidRuntime( 1515):	at android.app.ActivityThread.main(ActivityThread.java:4437)

E/AndroidRuntime( 1515):	at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 1515):	at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime( 1515):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

E/AndroidRuntime( 1515):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

E/AndroidRuntime( 1515):	at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 1515): Caused by: java.lang.SecurityException: invalid status bar icon slot: bluetooth_handsfree_battery

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

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

E/AndroidRuntime( 1515):	at com.android.internal.statusbar.IStatusBarService$Stub$Proxy.setIcon(IStatusBarService.java:327)

E/AndroidRuntime( 1515):	at android.app.StatusBarManager.setIcon(StatusBarManager.java:128)

E/AndroidRuntime( 1515):	at com.android.systemui.statusbar.phone.E.<init>(PhoneStatusBarPolicy.java:210)

E/AndroidRuntime( 1515):	at com.android.systemui.statusbar.phone.PhoneStatusBar.start(PhoneStatusBar.java:350)

E/AndroidRuntime( 1515):	at com.android.systemui.SystemUIService.onCreate(SystemUIService.java:93)

E/AndroidRuntime( 1515):	at android.app.ActivityThread.handleCreateService(ActivityThread.java:2264)

E/AndroidRuntime( 1515):	... 10 more
[Android Software Development] Lens_flare:
CosmicDan

simlock pwned! :D

disassemble Phone.apk, find values/bools.xml and change the following switch to true:

<bool name="ignore_sim_network_locked_events">false</bool>

that's it.

About welcome screen, I've invented more long-living way(coz previous version of provision.apk might cause a system fail[nullpointer maybe] one day):

function deviceIsProvisioned(DefaultActivity.smali) is our switch that determines should that dialog be showed or not.

just rip out all of its content, so you will get something like that:

.locals 3

.prologue
const/4 v1, 0x0

return v1

see that zero? change it to 0x1 and that's it.

What have we actually done is we shortened all those system calls to proprietary properties (which determines whether system should show a dialog or not) to just little return code (in c++ it would be named getter):

return 1
[Android Software Development] pratikmore:
Logcat :- http://db.tt/ECYgOV2D mic problem on 2.9.14. Any solution?
[Android Software Development] Lens_flare:
as damn chrome ripped off my post, my reply have to be much shorter ;[

nope. It happened only when I wiped that apk out.

wow, sounds like it merged dalvik caches..

there should be main method, which is a start point (I'm not excluding it might be a language picker), it should contain access queue, we should see if that queue is easy to modify.

yaaaa, that's where hacker borns :P

sounds like you haven't replaced something in telephony part like ril class or ril*.smali.

because all the necessary info is in the radio log:

logcat -b radio
[Android Software Development] Lens_flare:
): Caused by: java.lang.OutOfMemoryError

yes you reading right, unfortunately it takes huge part of ram.
[Android Software Development] ---UFO---:
So there isn't any porting issue? Only not enough RAM?
[Android Software Development] Lens_flare:
according to log we got - yes, there might be more issues in remaining part of log, may we see that one?
[Android Software Development] CosmicDan:
Maybe interesting to you Lens, not just for MIUI but for all ICS and later ROM's - http://xdaforums.com/showthread.php?p=31779793

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] _polimorph_:
Volume+

I follow this guide daily and could'n be happier that it exist, so thank you all guys!

I want to add to my SGS3 MIUI JB port the volume skip track, or volume + mod and after patching PhoneWindowManager.smali and adding two other .smalis from that tree I get bootloop with this output:

09-20 13:08:28.100: E/PhonePolicy(6545): Could not preload class for phone policy: com.android.internal.policy.impl.PhoneWindow$ContextMenuCallback
09-20 13:08:28.115: W/dalvikvm(6545): VFY: tried to get class from non-ref register v13 (type=2)
09-20 13:08:28.115: W/dalvikvm(6545): VFY: rejecting opcode 0x6e at 0x0090
09-20 13:08:28.115: W/dalvikvm(6545): VFY: rejected Lcom/android/internal/policy/impl/PhoneWindowManager;.interceptKeyBeforeQueueing (Landroid/view/KeyEvent;IZ)I
09-20 13:08:28.115: W/dalvikvm(6545): Verifier rejected class Lcom/android/internal/policy/impl/PhoneWindowManager;
09-20 13:08:28.115: W/dalvikvm(6545): threadid=24: thread exiting with uncaught exception (group=0x416f5300)
09-20 13:08:28.120: I/Process(6545): Sending signal. PID: 6545 SIG: 9
09-20 13:08:28.120: E/AndroidRuntime(6545): *** FATAL EXCEPTION IN SYSTEM PROCESS: WindowManager
09-20 13:08:28.120: E/AndroidRuntime(6545): java.lang.VerifyError: com/android/internal/policy/impl/PhoneWindowManager
09-20 13:08:28.120: E/AndroidRuntime(6545):	at com.android.internal.policy.impl.MiuiClassFactory.createPhoneWindowManager(MiuiClassFactory.java:28)
09-20 13:08:28.120: E/AndroidRuntime(6545):	at com.android.internal.policy.impl.Policy.makeNewWindowManager(Policy.java:74)
09-20 13:08:28.120: E/AndroidRuntime(6545):	at com.android.internal.policy.PolicyManager.makeNewWindowManager(PolicyManager.java:67)
09-20 13:08:28.120: E/AndroidRuntime(6545):	at com.android.server.wm.WindowManagerService.<init>(WindowManagerService.java:330)
09-20 13:08:28.120: E/AndroidRuntime(6545):	at com.android.server.wm.WindowManagerService.<init>(WindowManagerService.java:156)
09-20 13:08:28.120: E/AndroidRuntime(6545):	at com.android.server.wm.WindowManagerService$WMThread.run(WindowManagerService.java:812)

Any ideeas fellows?