yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] RickyGoldsmith:
Non-fatal error on v3

So I have been seeing this on version 3 of the ROM. I haven't noticed it breaking anything so it is on the back seater. But if you have time, please have a look.

E/SensorService( 410): SensorService::threadLoop sensor(3) ver=0 idx=0
E/SensorService( 410): SensorService::threadLoop sensor(0) ver=0 idx=1
E/SensorService( 410): SensorService::threadLoop call recordLastValue() 1st
E/SensorService( 410): SensorService::threadLoop call recordLastValue() 2nd
D/SensorService( 410): SensorService::threadLoop poll count=0
E/SensorService( 410): SensorService::threadLoop sensor(3) ver=0 idx=0
E/SensorService( 410): SensorService::threadLoop sensor(1) ver=0 idx=1
E/SensorService( 410): SensorService::threadLoop call recordLastValue() 1st
D/SensorService( 410): SensorService::threadLoop poll count=0
V/Provider/Setting( 410): from settings cache , name = location_providers_allowed value = network,gps
V/Provider/Setting( 410): from settings cache , name = location_providers_allowed value = network,gps
E/SensorService( 410): SensorService::threadLoop sensor(3) ver=0 idx=0
E/SensorService( 410): SensorService::threadLoop call recordLastValue() 1st
D/SensorService( 410): SensorService::threadLoop poll count=0
E/SensorService( 410): SensorService::threadLoop sensor(3) ver=0 idx=0
E/SensorService( 410): SensorService::threadLoop sensor(1) ver=0 idx=1
E/SensorService( 410): SensorService::threadLoop call recordLastValue() 1st
D/SensorService( 410): SensorService::threadLoop poll count=0
[Miscellaneous Android Development] RickyGoldsmith:
Anyone on the stock rom, can you confirm if you see this message???? My intent is to know if this is a fatal error message.
[Miscellaneous Android Development] RickyGoldsmith:
Kernel config example

This is a proper example of a kernel configuration I was talking about. It claims to be for the MTK6589 platform. :)

I found this in the S6000 tarball that one of you mentioned.
[Miscellaneous Android Development] debasish497:
At least my search was fruitful.
[Miscellaneous Android Development] RickyGoldsmith:
*#*#3646633#*#*
[Miscellaneous Android Development] debasish497:
*#446633#*
[Miscellaneous Android Development] RickyGoldsmith:
GPS working on MIUI version 3

A picture says a thousand words....

It was a real delight for me to drive back home with assistance from Google Maps / Navigation running on top of MIUI version 3 for Dream D1.

While I drive the route daily, it still is good to see the maps working. But more than that, it working fixed a couple of my assumptions and also some unanswered questions.

1. I assumed GPS wouldn't work on cloudy and rainy days. Today it is raining here. And it worked.

2. I didn't have an answer to whether this was an error. Confirmed now that it is not an error (at least fatal).

3. After all the frustration that the GPS didn't work, I was inclining to assume that the device hw was low quality. NO. Today, after the fix (see below), I could lock to 11 satellites.

4. I assumed that there was a problem in the ROM we ported. That Location services was something we couldn't crack. NO. This was a common problem reported everywhere. Google fixed it with consolidating everything.

So what is the fix.

Simple answer, Multiple maybe.

@FB, Srini Sri made an interesting comment I wasn't aware of. The Engineering Mode. And the clean up of the dat file. I think it helped in refreshing the GPS database locally. Thank you Srini Sri.

Thanks perhaps to Google too. In the previous version of Maps, if you requested Location, it complained "Location unavailable". To me it was an impression that it was a problem with my device. But with today's update roll, it seems they were already deprecating it.

When I bought up this device, I was zero on Android. :D:D:D:D...

With some features not working, frustrated, I even went to the extent of putting it online for sale. But something stopped me.

Today, I am pretty happy with myself for what I've learnt over the months. And am delighted to see the community we've built here on XDA (and also on FB). It has helped us learn a lot. Thank You.
[Miscellaneous Android Development] droidextra:
Awesome work guys :)
[Miscellaneous Android Development] debasish497:
[MENTION=3094817]RickyGoldsmith[/MENTION] please update the first page that GPS works.

We are now left with front camera only.... otherwise the 3rd ROM is a hit.
[Miscellaneous Android Development] RickyGoldsmith:
Update roll out for 3.1

There were a bunch of stuff I fixed in the last 1 week. Most of the fixes are on my phone, i.e. the current running ROM.

I hope to get an update (version 3.1) rolled out on Friday. It will not be a patch update, sorry. The way I develop the rom doesn't allow me to accommodate that. It will be the regular 200+ MiB download. It won't be a new MIUI build. Just some of the fixes that got accumulated in the past week.
[Miscellaneous Android Development] RickyGoldsmith:
Incompatible applications

On version 3 of the ROM, I get an incompatilibility problem with some of the apps. Are you guys able to install Google Plus on this version of the ROM?

Another interesting observation is this screenshot. The Android version is reported as 4.1.2 Unknown...
[Miscellaneous Android Development] debasish497:
I have seen this issue, g+ never gets installed.

---------- Post added at 11:54 PM ---------- Previous post was at 11:30 PM ----------

Few more things I want to point out...

The dialer app is not themeable unlike the true miui ROM. The reason is the dual sim management thing has something to do with this. While the dual sim management works the dialer is severely under pixeled. Its qHD resolutioned. Remember the port ROM A820 on which this miui ROM is based has qHD resolution.

The camera app is lenovo camera app, not the miui one. The autofocus works but not the way the stock camera works. The screen while taking pictures is not dark because the

night camera mode is always active. Try to change it to night mode, you'll see no change. However this trick is there in the stock camera app too.

The miui dialer app from miui V1 is OK, and themeable, but if somehow we can trick out the sim management from the settings menu by editing the settings app from it. One more finding, the dialer app for original vanilla miui has got video calling functionality which our ROM doesn't.
[Miscellaneous Android Development] RickyGoldsmith:
Can you provide the apks for the same?
[Miscellaneous Android Development] debasish497:
For stock camera You can check the miui v1
[Miscellaneous Android Development] RickyGoldsmith:
Just right now, I got G+ and Goggles installed on my device. Whatever be the cause, it is good to see it back. :good::good::good:
[Miscellaneous Android Development] debasish497:
Thats Great,. did you fix anything in the meantime?..

Regarding the camera,..I am downloading the latest MIUI (Stock) thereafter I will share you the camera App and Dialer.
[Miscellaneous Android Development] debasish497:
Lucky to use Canvas 4 for the whole day, as a testing device from a friend who writes in blog. Compared with dream d1, canvas is a bit bigger, feels a bit premium and has updated software. But its no match when it comes to screen and sound. My sennheiser headphones sounds simply awesome with dream d1, sorry mmx . Also the amoled in d1 is leaps and bounds better than the screen of canvas 4. I saw few lags while playing full HD in canvas which of course not an issue with my D1.

With help from [MENTION=3094817]RickyGoldsmith[/MENTION] and having a tremendous community help from FB and XDA I think I didn't make a bad decision.
[Miscellaneous Android Development] RickyGoldsmith:
Something or the other, I keep fiddling. I can't recollect what it was. But it is on my device. So when I roll out an update, everyone will get it.

I planned for Friday, but couldn't. Let's see when the next update gets pushed.
[Miscellaneous Android Development] RickyGoldsmith:
I too got sold when I saw the Dream D1 on display. Its screen quality is just awesome. :laugh::laugh:
[Miscellaneous Android Development] debasish497:
Are you updating MIUI?

MIUI Latest as Per Today

by the way suddenly I have started to get this message:

When I'm trying a logcat

Unable to open log device '/dev/log/main': No such file or directory

This is while I'm in the stock ROM.

I have few more observation in the MIUI.

LBE permission menu in miui is having greyed out buttons for root permission. Can you check? I rooted the ROM and the root works fine though, but not through the permission settings.

removed the attached apps, they cannot be installed in the MIUI rom. Sorry.:D
[Miscellaneous Android Development] RickyGoldsmith:
That's weird. Stock rom didn't have any such problems. What this problem means is that either the log subsystem isn't initialized. It could also mean that you do not have permission to /dev/log/

Do you have shell access to the rom? Check the permissions.

Yup!! I just verified the same. Not sure of the cause because there were to backtraces. Will see when time permits. Good part is that it is not hindering anything.

Are you sure camera is packaged with the Gallery apk? Last I checked from the Patchrom repo, that wasn't the case. And my last check was 2 days ago. For the phone / dialer, I immediately ran into the telephony system crashing, so I dropped the plan for it. I guess we can live with it for now.
[Miscellaneous Android Development] debasish497:
When are you sharing the miui ROM? Eager for that:confused:
[Miscellaneous Android Development] RickyGoldsmith:
Camera

[MENTION=5277821]debasish497[/MENTION] Regarding the camera app, you mentioned that it was from Lenovo. I might be wrong, but my feel is that it is a generic camera app from Mtk. All Mtk camera devicrs use the same camera app. The one gionee shipped was also the same. Just slightly modified to depend on the GN framework.

Harsha Vardhan @FB tried using it. And simply ran into a crash because of the missing GN framework libraries.
[Miscellaneous Android Development] RickyGoldsmith:
How to port MIUIv5 ???

It is hard to define a set of steps.. Still I'll try to put what I do..

1) Get the kernel to boot. This is the most important step. Even before you dive into fiddling with the libraries and framework files, you need to ensure that your kernel is up and running. From what I've understood so far, on Android, the kernel is also tied to the ROM. It is not like our general Linux distributions. I guess it has to do with some of the components like pvr etc.

Bottom line, get the kernel to boot first.

2) Your init has to complete. If you look at your ROM's init file, there are a bunch of core services that it runs. Those are all important before the framework can proceed. The init ensures to bring your bare minimum environment up. While porting, many a times, this is the stage where things fail (or get stuck into a loop). I believe this is the stage where services like zygote and others initialize. But I may be wrong.

If you get the init to complete, you can be in a better position to debug. The adb service can also be started in here. So assume your ROM's system framework crashes immediately on load, in such scenarios you can trick your init to start adbd early so that you can catch the state of the OS.

3) If you get init complete, next is the actual ROM. Here, you could run into a variety of problems. It is hard to define what all problems. That is why you need step 2 to work. You need your adbd to tell you what all are crashing. Mostly, it is the system libraries and the framework files. Based on what the error is, you'll have to fix them one-by-one.

That is the best I can say. I wish there was a simpler method. But for a ROM with no code, no documentation and no updates, this is the best I can think of.
[Miscellaneous Android Development] RickyGoldsmith:
Let's see. I planned on Friday, but the schedule didn't permit.
[Miscellaneous Android Development] lontu:
lontu aka Sudip Kumar Datta ....Eagerly waiting for the MIUI update..
[Miscellaneous Android Development] debasish497:
The camera was from the stock miui for nexus 4. Yes there might be something missing. Anyways we can stay without the themes for the dialer.
[Miscellaneous Android Development] superbar:
Thanks ricky, if i tried to port your rom to my device would it work? My problem is that my android rom is 4.2.1 and yours is 4.1.2? Is it possible?
[Miscellaneous Android Development] RickyGoldsmith:
I doubt that it would. But if it does, please let us know.
[Miscellaneous Android Development] RickyGoldsmith:
Okay!! I'll give it a shot. Did you try this camera app? Did it work for you?
[Miscellaneous Android Development] debasish497:
Nope, it turned out to be the nexus camera.
[Miscellaneous Android Development] RickyGoldsmith:
3.1 is out

3.1 is uploaded. No major changes. Just a bunch of fixes that I lost count on..

which should be.....

* Some permission fixes. Should fix USB OTG

* Proximity / Light Sensor fix

* Software Incompatibilities Fix

* Sync Adapters added.

[MENTION=5277821]debasish497[/MENTION] Buddy!!! Were you able to install the apps with the new version????
[Miscellaneous Android Development] debasish497:
Fixed this problem. Commented the line in /etc/init.d/* files which contained 'rm /dev/log/main'
[Miscellaneous Android Development] lontu:
No Gapps in v3.1...where from to download ? Please provide the link...
[Miscellaneous Android Development] RickyGoldsmith:
http://en.miui.com/thread-2840-1-1.html
[Miscellaneous Android Development] debasish497:
no files in the link, perhaps old link.
[Miscellaneous Android Development] lontu:
Do I need to root it with motochopper? the lbe guard seems not working...
[Miscellaneous Android Development] RickyGoldsmith:
Well. it wouldn't be hard, at least for you, to determine how to get the market back. :)

I will wait for you to provide the market patch zip.
[Miscellaneous Android Development] deepak2111:
Download from

http://goo.im/gapps

http://goo.im/devs/blackwing182/MIUI_Gapps/MIUI_gapps-jb-4.1.2_signed.zip
[Miscellaneous Android Development] lontu:
Sorry to asking the question again...with MIUI 3.1 not able to get root permission...Can you please tell how to get it?
[Miscellaneous Android Development] deepak2111:
try motochopper.. as your one of option. I have done earlier.
[Miscellaneous Android Development] RickyGoldsmith:
It keeps happening again. I keep missing some of the items. The ROM has the su binary shipped. Just install the Chainfire SuperUser.apk and it should work. I keep missing it because I don't ship my /data with the ROM. :D:D:D:D:D:D:D
[Miscellaneous Android Development] RickyGoldsmith:
That's the lousiest thing to do. Shows off GiONEE's SW Engg qualities.
[Miscellaneous Android Development] RickyGoldsmith:
Permission Manager APK

[MENTION=5287167]DEEPAK211[/MENTION] [MENTION=5277821]debasish497[/MENTION]

Please find linked the LBESEC apk. Should work.
[Miscellaneous Android Development] RickyGoldsmith:
Actually... I've been thinking about this whole root thing on MIUI.

Isn't MIUI a pre-rooted ROM????

I mean, you shell into it and are able to su. That is root. No?

And that's why MIUI ships the Permission Manager (which I just pushed the update) if you (or your apps) need root privileges. I don't see a need to install additional Super* packages.

What do you guys think?
[Miscellaneous Android Development] deepak2111:
It works..but again I have stuck at 2G network..i'll check when at home.
[Miscellaneous Android Development] debasish497:
Did you pushed this LBESEC apk to system/app ? Its not working in my case.

Update: working fine now.
[Miscellaneous Android Development] deepak2111:
Exactly if permission manager do handle all process regarding root access than no need to have any other apps.
[Miscellaneous Android Development] lontu:
It's not working for me...No application is getting root permission and showing not rooted...what trick to do for working ?
[Miscellaneous Android Development] debasish497:
I rooted the device again. The kernel is not rooted in this case so LBE will not work like normal stock miui. We need to have the su related files for LBE to work.

However one observation: I am unable to put any file in system/app with es file explorer as I normally do in the stock ROM. Even if the file explorer has root access granted. But I can do so with root explorer.

Try and see.
[Miscellaneous Android Development] deepak2111:
flash supersu zip file through recovery from first page second post

http://xdaforums.com/showpost.php?p=41966875&postcount=2

or from here

http://xdaforums.com/showthread.php?t=1538053

uploading soon TWRP_2.5.0.0 after testing.

EDIT: Uploaded.
[Miscellaneous Android Development] debasish497:
Strange: its still downloading JB from Google. Does 'repo sync' takes more than 3hrs? I was downloading the JB tree 4.2.2. :(

Anyway [MENTION=3094817]RickyGoldsmith[/MENTION] can you give a peek whether IQ444Q has full sources if time permits?

---------- Post added at 09:31 AM ---------- Previous post was at 09:09 AM ----------

Ricky says that its working for him. Let's wait for him, we might be missing something.
[Miscellaneous Android Development] RickyGoldsmith:
On my device, I have the apps asking permission to access certain resources. So I take it as working. As of now, I do not have any app installed which seeks root permission. Hence the Permission Manager is reporting as "0 root permissions".

Do you want me to verify using any particular step?

That's awesome [MENTION=2078222]deepak2111[/MENTION]. You rock!!

New features in TWRP 2.5.x are:

What's new in 2.5.0.0:

Special Note: If you are running a custom theme, the changes in 2.5.0.0 will likely not be compatible with your theme.

Added scrollable partition lists for mount, backup, restore, wipe, and storage selection

Add new SliderValue GUI element for selecting brightness and screen timeout (thanks to Tassadar)

Re-work AOSP and TWRP code to improve license compatibility between GPL and Apache

Added official theme for 1080x1920 portrait devices (HTC DNA, HTC Butterfly, Oppo Find 5, Sony Xperia Z, etc)

Fixed a problem with directory permissions on split archive backups

Fixed a problem with md5 verification of backups

Added a search function to libtar (thanks to kokotas)

Improve handling of XML errors (fix permissions)

Fixed handling of subpartitions

Improvements to recovery.fstab flags

Fixed a problem with decryption not being able to locate the decryption key in some situations

What does it mean when you say kernel root? How do I verify that? And what is the difference in between system root and kernel root?

FYI: /system is mounted 'ro'. That'd mean, irrespective of whether you have root or not, you can't write to it. Apps need to add functionality to remount the device to 'rw' before they write to it, which in turn requires the root privilege.
[Miscellaneous Android Development] lontu:
Which MIUI ROM has been used for the port to Dream D1?
[Miscellaneous Android Development] debasish497:
The lenovo A820 from needrom
[Miscellaneous Android Development] debasish497:
Kernel Root: you don't need a separate superuser apk to access/change files which needs root access. Aka MIUI.

System root: you root the ROM, then add a superuser apk which takes care of things when access required.

sh-4.2$ id

uid=10109(u0_a109) gid=10109(u0_a109) groups=1015(sdcard_rw),1028(sdcard_r),3003(inet)

The above is your normal user. Which don't belong to the 'root' group. In a custom rooted kernel the normal user belongs to root group, so no superuser needed.

sh-4.2$ su

sh-4.2# id

uid=0(root) gid=0(root)

This is after you root and add superuser apk

View attachment 2134425
[Miscellaneous Android Development] debasish497:
For all who are new to the android development: understanding the services start up after boot. To see what happens just get a logcat after boot till the launcher comes up.

adb logcat>logcat.txt

Quit this after the launcher comes up.

Then view this logcat.txt using editor.

Just after boot, the init process starts. It has a PID=1, and it is the ab-initio process.

Until the home screen/launcher comes up the following things happen.

1. Native services like vold, netd, installd, debuggerd are started. These process have root permission. These are written in c/c++.

2. Then the service manager and media server are started. These processes have system permission.

3. Init then start the app_process, this again start the zygote process in a dalvik VM via zygoteinit. This zygote process becomes the parent of every application.

`ps | grep zygote ' and ' ps | grep com.android`

The above command will reveal the relationship.

4. The zygote starts the system_server process, which starts all system services. The sevices run as threads to the system_server process.

5. One of the services is the activity manager service, which is the final step of booting. It starts the launcher application and sends the BOOT_COMPLETE intent.

This is more or less the process flow I learned while learning the booting from logcat and internet. [MENTION=3094817]RickyGoldsmith[/MENTION] you can add if I am wrong somewhere
[Miscellaneous Android Development] RickyGoldsmith:
OKay!! I guess then LBESEC is not working for the root part. :( I would have preferred to have only one guy dealing with the root privileges part. Now we have two. LBESEC (not working) and SuperSu.
[Miscellaneous Android Development] lontu:
I found the problem behind the root permission issue. I am able to rectify that and it's working fine. Changes are required to make with the su file, update-script file and LBESEC file. Will upload a fix file whenever possible.
[Miscellaneous Android Development] debasish497:
What was the issue? Sharing the issue will help us understand the problem.
[Miscellaneous Android Development] DreamD1:
According to MIUI developers in China, a new MIUI V5 will launch next week especially developed to support dual SIM Mediatek phones.

This new version of MIUI is based on Android 4.2, the official version of MIUI is based on 4.1 Jelly Bean, and has been specially developed for use with Mediatek powered phones with dual SIM support.

Most phones running a quad-core MT6589 SoC could eventually get the MIUI V5 but for now only the following models will be supported ZTE V987, N986, V967S, and Lenovo A820, A820T, S920.

Source:

http://www.gizchina.com/2013/07/22/miui-v5-with-dual-sim-support-coming-soon/
[Miscellaneous Android Development] RickyGoldsmith:
Thank you. It is nice to see others chiming in. :cowboy::cowboy::cowboy::cowboy:
[Miscellaneous Android Development] RickyGoldsmith:
Yup!! I already see the branches being pushed. We need the kernel ready soon. [MENTION=5277821]debasish497[/MENTION] :good::good::good:
[Miscellaneous Android Development] lontu:
MIUI Root fix

PFA the MIUI root fix....Please install through TWRP or CWM...
[Miscellaneous Android Development] RickyGoldsmith:
[MENTION=4131319]lontu[/MENTION] Good job man.. Perfect.

[MENTION=5277821]debasish497[/MENTION] Check it out. It works. And this confirms our discussion about MIUI pre-root and not needing another SuperUser.

From what I see in [MENTION=4131319]lontu[/MENTION]'s patch, looks like we missed (or phucked up) the symlinks/permissions. [MENTION=4131319]lontu[/MENTION] can confirm. :good::good::good:
[Miscellaneous Android Development] debasish497:
Feels good that we have brought in so many people around us,.. at least a chinese phone bonded us voluntarily... :angel:

About the kernel,... I think it will be ready by tomorrow,.. I phucked up the Zimage while creating the boot.img,.. :laugh:

I was not able to devote full time to this today,... and no FB/XDA access from my working place :(

---------- Post added at 09:46 PM ---------- Previous post was at 09:42 PM ----------

May be we can start with the A820 one,..most of the MIUI we have are created on its ROM right [MENTION=3094817]RickyGoldsmith[/MENTION]
[Miscellaneous Android Development] RickyGoldsmith:
The problem seems to be with the autofocus feature. Most camera apps have the autofocus enabled, thus leading the app to stall right on the first autofocus initialization. Otherwise, you will still get the failure when you hit click, as that triggers the autofocus.

With video recording, the issue is not seen.