yashsingh1/xdaforums huggingface dataset:
[Sony Xperia M2] linuxct:
Regarding NFC and FM Radio...

I've deeply tried the following: NFC, several FM Radio apps, and the bottom speaker in calls.

Firstly the NFC. I've like 3 MiFare cards I use day by day, being one of those a credit card and 2 of them for the bus and metro of my city. All of them are properly recognized in stock ROM. What I tried to test them is to add them as a Trusted device in Smart Lock. The problem is in the NFC on and off toggle setting. Even if it says it's on, the NFC itself may be deactivated, don't know for sure if a service related to it crashes and that's the reason. To sort it, I turned off the NFC, then turn it back on and quickly register the credit card as a trusted device, and worked; however, whenever the device screen's locked, or you enter into Settings > More..., the NFC stops recognizing the card. None of the other cards were recognized even after doing the trick above. I can try to provide logs, if needed (at first instance, nothing related to NFC services popped up in my ksmg).

Regarding FM Radio app: I've tried compiling from source the CodeAurora FM Radio app, and it didn't work. Also tried with several other APKs I found over there, and those weren't recognized by the system (i.e. refused to install them). Then, I tried compiling FM2 and FMrecord for Qualcomm, with it's framework plugin and library, and still didn't want to work... Also tried other's approach to that, and still wasn't working (in some cases, the app refused to launch, in others didn't play any sound)... Lastly, tried with Spirit FM apps, and those just produced white noise...

And lastly, the bottom speaker on calls just refuses to play any sound however plays music and system sounds very decently.

The proximity and orientation sensor works fine for me, at first proximity one refused to unlock my screen but after some seconds away from my ear, looks like it recallibrated itself and started playing nicely once again.
[Sony Xperia M2] Konstantinosj77:
NFC: The blob is from the SXD zip,so maybe the stock will work better?

FM: Spiritfm works fine if you play with some settings...for using the CAF app you have to add some permissions in the init.rc and a stock blob

Sound issues: 99% related to mixer_paths

Sensors problems: I just follow what galaxyfreak has already developed....My kernel includes his latest changes
[Sony Xperia M2] mmiya:
With the mixer_paths provided by freack_v in http://xdaforums.com/showpost.php?p=64967339&postcount=1595

I solved the in call speaker problem. Then in that mixer_paths, I changed the values of RX1, RX2 and RX3 Digital Volume; and DEC1 and DEC2 Volume from 84 to 90 to improve speaker sound and mic sound respectively, and it worked.
[Sony Xperia M2] Konstantinosj77:
Well...we have some progress :D
[Sony Xperia M2] iFlashed:
Awesome!!!!

Enviado desde mi Xperia M2 mediante Tapatalk
[Sony Xperia M2] jobinrjohnson:
Sim card is not dectected on my D2302 after flashing the new kernel
[Sony Xperia M2] Konstantinosj77:
Ugh...ramdisk is missing some changes. I'm sorry but i wont rebuild it .
[Sony Xperia M2] linuxct:
Congratulations on the new compilation, looking forward for that July security patch ;)

Still, what has changed with camera? Wasn't it already being detected fine? Or maybe I'm just wrong lmao

Also, may I suggest creating a new thread, if [MENTION=4635923]galaxyfreak[/MENTION] is OK with that? Just so that you can have all in place in the OP, mainly.

_________________________

Also, not related, but just like pointed out, Spirit FM is working pretty fine after applying the "External Antenna" setting under the Qualcomm specific menu (Set > Tunner > Qcom antenna >> External). And thanks [MENTION=6060297]mmiya[/MENTION] for pointing out the Mixer_paths solution from freack_v :)
[Sony Xperia M2] Konstantinosj77:
It was correctly detected with kanged omni frameworks...now it works with pure cm12.1 files ;)

Actually i did 0 changes to the cm code..it just worked out of the box!

Still i got a lot of errors/not working things cause i updated the device tree and vendor files to the latest from sxd (for easier porting to cm13 ;) )

Fm radio works correctly in my tests and snap camera is 99% working with some minor bugs
[Sony Xperia M2] iFlashed:
Ok, so, the bugs now:

- NFC Works

- Radio FM Works

- Orientator sensor on yasalgo sensors. I will investigate and i will try to find a solution :)

- Notification LED Fixed for next build

- Speaker in calls doesn't works Fixed with the mixer paths: http://xdaforums.com/attachment.php?attachmentid=3621110&d=1453683458
[Sony Xperia M2] Konstantinosj77:
Well...you missed a line :P
[Sony Xperia M2] Umesh1041:
Please konstantinosj77..please rebuild it for D2302..I really love this ROM..only problem is sim detection..please
[Sony Xperia M2] iFlashed:
FIXED!! Orientator sensor working on yasalgo!!!
[Sony Xperia M2] Th3 Ant:
Holy ****!! Is this real????

Good work [MENTION=6487599]iFlashed[/MENTION] :D

Will this also work for OmniRom?
[Sony Xperia M2] Konstantinosj77:
Anything to do with the kernel? Or just some blob replacing?
[Sony Xperia M2] iFlashed:
I think there was something wrong with the galaxyfreak steps:

I have been trying to make a flasheable zip but something strange happends. If I use the zip the other sensor works but not the orientator sensor. But If I manually copy the files everything works fine...:confused:

I have been testing and everything appears to work in your kernel so it's not necessary to make any changes on the kernel.
[Sony Xperia M2] Facundo_Pipa:
Cyanogen spectacular works with your kernel , sensors and notification LED work . Use the guide that put iFlashed

P.D: someone can spend a newer build? :highfive:
[Sony Xperia M2] farmer92:
It's ok !!! :)

I've installed this rom with new kernel. It's very fast and everything is working ok.

I've edited file mixer_patchs witch new parameters and it's good, veeery loud speaker but I have a question.

Which option is for bluetooth headset's voice? but this is still very silent.

Please help :)
[Sony Xperia M2] iFlashed:
Finally! Here's the sensor patch fully working! Thanks to [MENTION=4787101]linuxct[/MENTION] who helped me. The sensor patch includes the last kernel by [MENTION=4550509]Konstantinosj77[/MENTION] and all sensors are working now with any problems :victory:

Link: https://mega.nz/#!LJkQ1LpA!w2v_EKNn17cA7VH0YYYCAag5zs62D_ijne3qEnZchsA

Just flash after cm12.1

Regards!
[Sony Xperia M2] galaxyfreak:
Next's kj77 build should include a script that should replace sensors automatically if needed, basically remove "original" sensors.msm8226.so, and rename "sensorsecond" lib to "sensors" instead. not 100% tested yet.

2 questions now:

1) Are you sure replacing libyasalgo, if yes, gotta add that into the script.

2) You did a derp, you've got libsensorservice and libyasago in hw/ :P
[Sony Xperia M2] Umesh1041:
D2302

Guys..please..any way we can get it to work on dual sim variant d2302
[Sony Xperia M2] Konstantinosj77:
Guys I'm sorry but the updated light driver,which was supposed to make the leds blink, is actually totally broken with the 3.4 kernel

So we got 2 options...

1) Spend some more time (i don't know how much) trying to fix it

2) Release a build with the old driver,which works correctly but without "blinking"
[Sony Xperia M2] Lojzo_11:
2 .. it isnt a big problem for me
[Sony Xperia M2] linuxct:
I'm personally fine with the second one, mostly because it's been 9 months since last beta compilation, so it's worth releasing just for the security improvements in the CM code, plus the better camera implementation.

I'd consider the led thing a minor bug, not something you really need to worry about :) (Probably not a popular opinion though...)
[Sony Xperia M2] iFlashed:
If the model detection is implemented it would be great to add the script. I will see what happend if I rename the sensorsecondo.so. I will also see what you say in the first question. The libyasalgo was in /system/lib/ not in /hw. I don't know if libsensorservice is necesary, i put it just in case :P

I think 2 it's the better one. I think that's a minor bug and lot of people (including me) are ansious for a new build. As linuxct says there is no builds since November 2015 and there are lot of new things. As that thing is a minor bug, you could release the new build and then try to fix it calmly :)
[Sony Xperia M2] galaxyfreak:
I meant that you put duplicate libsensorservice.so and libyasalgo.so in zip you uploaded

And is replacing libyasalgo.so required for making orientation sensor work?
[Sony Xperia M2] iFlashed:
That's why I spent ALL MORNING trying to make it working, hopeless I started to duplicate files and put them in other directories. I will try to simplify later

Now I'm going to see if the libyasalgo.so is required. EDIT: Nope, not necesary
[Sony Xperia M2] Th3 Ant:
Will the kernel with that fix work on OmniRom 5.1.1?
[Sony Xperia M2] linuxct:
Yes it should.
[Sony Xperia M2] Konstantinosj77:
Too late,build started with stock yasalgo blob..oh well nvm :P
[Sony Xperia M2] iFlashed:
Well no problem... that file doesn't hurts anybody xD

Also I have tried to delete the sensors.msm8226.so and rename the sensorsecond with the same name but doesn't works. Any sensor works... so secondsensor is required

PD: Good luck with the compilation

PD2: Here is a simplified sensor patch, it shouldn't be necessary on the new build. Anyway, here it's: https://mega.nz/#!mZ0TwAbb!JfUmzrRz0CqP4xmcLLHIobhcAXviWTSKVqXLBRKq9DY
[Sony Xperia M2] galaxyfreak:
What?! I was pretty sure it does. Can you recheck this [MENTION=5185525]Th3 Ant[/MENTION]?

btw, libsensorservice.so should be untouched, no replacing.
[Sony Xperia M2] iFlashed:
Let me try again...

EDIT: I have tried without the libsensorservice.so only rename the secondsensor and flash the new sensor (secondsensor) and memsicd. Result: Bootloop...
[Sony Xperia M2] jobinrjohnson:
Please fix sim card issue on d2302

Still no support for d2302 (sim card not detected issue). Please rebuild to work wit d2302.
[Sony Xperia M2] Konstantinosj77:
Support for dual sim is included in the next build...calm down,begging won't change anything
[Sony Xperia M2] galaxyfreak:
I feel you're doing something wrong. I tested this with Ant and it worked.

And code works like that. https://github.com/CyanogenMod/andr...e/blob/cm-12.1/include/hardware/sensors.h#L48

If you put "sensors" here, it looks for sensors.<something.so, if you put "sensorsecond", it looks for sensorsecond.<something>.so, and so on. I'll recheck with Th3 Ant, no worries.
[Sony Xperia M2] iFlashed:
Check for yourself: https://mega.nz/#!mNtkVQYY!ESArFAeWUen1S-bXjsxDwSlaazOl_omxh5LtOkZuXnc

The "sensor.msm8226.so" is the "secondsensor.msm8226.so" renamed. Also includes the memsicd, anything else.
[Sony Xperia M2] galaxyfreak:
Alright...can you PM me output of "adb shell strace mediaserver"?
[Sony Xperia M2] Th3 Ant:
Well... I've flashed boot.img and moved sensor files but it bootlooped... will try again with CM later :P
[Sony Xperia M2] iFlashed:
Try only copying the files without flashing the kernel. But maybe omni kernel needs some modifications
[Sony Xperia M2] Th3 Ant:
Yeah, I've already tried that and it doesn't changed anything. Anyway, Sensor Box app says my orientation sensor is Memsic made same as compass and they both are not working.

I guess without modified omni kernel they won't work [emoji14]

As I said earlier, I will try this with CM build :)
[Sony Xperia M2] Supercharlie25:
Moreover, KitKat isnt so bad. Remember when it arrived last year ( i guess...now 2 years ago). All wanted KitKat and now you have it. The mayority of users have stock rom or omnirom with kitkat :D
[Sony Xperia M2] xLobito:
'Cause of there's no more than those two. Just Stock ROM and OmniROM fully developed. CyanogenMod 12 are still in development so...
[Sony Xperia M2] erikcas:
dunno, will compile a cm-12.0 tonight and test / check

I have once tried the solution on cm-11.0 and back then, on cm camera did not work (loaded but froze)
[Sony Xperia M2] micheal10198:
battery

How is the battery life on latest update ?
[Sony Xperia M2] erikcas:
what is so lollipop about the egl blobs?

I/Adreno-EGL( 295): Remote Branch: refs/tags/AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.02.048.044

there are more recent available...
[Sony Xperia M2] galaxyfreak:
[MENTION=985241]erikcas[/MENTION], I'm just saying that now I'm using L binaries from Sony, which previously didn't work for me (keymaster was crashing?)
[Sony Xperia M2] erikcas:
that are the same L binaries from Sony I used. I am seeing 4.4.2 egl blobs ;). While I have 4.4.4 blobs in my repo.

edit: probably keymaster was crashing because of some missing things (or too much) in init I guess. I just tested it on my "old" sources, with adjusted init scripts and it is not occuring.

Still am in a bootloop on omni. Mediaserver crashed and does not come up again. Which is probably caused by the prebuilt libcameraservice.so. Had to go out and donot have my pc with me to check logs, so blindly rebuilding without libcameraservice.so and will install that build to test
[Sony Xperia M2] galaxyfreak:
[MENTION=985241]erikcas[/MENTION], lol I reverted your import of L blobs as I was facing keymaster crash. I started using them when "official" CM tree came.

and yeah bootloop / mediaserver crash is due to prebuilt libcameraservice.so 99% sure.
[Sony Xperia M2] erikcas:
with those blobs, no more keymaster things here. It must be the initscripts

Is your recovery working properly? I guess not. Using a common bootrec-device is not helping on eagle (if you offcourse are using cm sources which I read)
[Sony Xperia M2] galaxyfreak:
I didn't test this https://github.com/CyanogenMod/andr...mmit/72ed4af209170e39fb7a6efd6e6e206d7286a411. But before that, it does.
[Sony Xperia M2] erikcas:
oh nice, would not expect that. well, according to Adam, that change it shoud be working on all devices. Anyway, the bootrec-device f****s up mounting any partition on TWRP. While using the original one from source, mounting is fine
[Sony Xperia M2] galaxyfreak:
Yeah lol. I said him on IRC that I don't remember testing that on M2 ;) He said he assumes it works. LOL. Revert time [MENTION=4193352]adfad666[/MENTION]!
[Sony Xperia M2] erikcas:
The change might work, it assumes using vol up key to enter recovery. The FOTA node is wrong.

We had problems a while ago with recovery on kk because we were using T2 Ultra bootrec-device (if I remember well)

Verstuurd vanaf mijn GT-I9505 met Tapatalk
[Sony Xperia M2] galaxyfreak:
[MENTION=985241]erikcas[/MENTION]? booted yet?
[Sony Xperia M2] erikcas:
Yup. But laggy. Got to rework some permissions I guess

Verstuurd vanaf mijn GT-I9505 met Tapatalk
[Sony Xperia M2] galaxyfreak:
Permissions for what? I don't think it's related to laginess?

However, my main concern is camera. I hit a wall there. NFC is being worked on by Sony, and FM Radio app will be rewritten by CM team later.
[Sony Xperia M2] erikcas:
Rework init scripts. Using cm's give a lot of trouble in audio, display, media etcetera.

I donot use the cm / aosp device sources as they simply refuse to boot when used for omni. Maybe sort that out later, it might be a mistake from me. I "omnified" those the quick and dirty way. For example, had to solve a lot of compile errors for use of prebuilt blobs in the "adfad" repos that are build from source using caf sources. I really prefer to use build-from-source as much as possible.

Will see if I have time tonight to rewrite / reorganize the init scripts.

Verstuurd vanaf mijn GT-I9505 met Tapatalk
[Sony Xperia M2] ^^Robi:
:good::good:keep up the good work guys :good::good:
[Sony Xperia M2] Supercharlie25:
Cheer up!
[Sony Xperia M2] micheal10198:
can u share the link for the latest build please. thanks in advance
[Sony Xperia M2] Umesh1041:
thnx man

---------- Post added at 02:57 AM ---------- Previous post was at 02:56 AM ----------

thanks bro:good:
[Sony Xperia M2] Konstantinosj77:
[MENTION=6487599]iFlashed[/MENTION] could you make a new zip but without a kernel?! New build will be up early in the morning :)
[Sony Xperia M2] iFlashed:
Yayy no problem!! I'm waiting the new buils anxiously!! I'm not at home now i'll do it later :)

Enviado desde mi Xperia M2 Aqua usando Tapatalk
[Sony Xperia M2] iFlashed:
https://mega.nz/#!nVUESJgC!FTxJ81bw7wSnFECA_yO1onDzjsg07cDUkl7Rvb6yC64 <- New sensor patch without kernel
[Sony Xperia M2] Konstantinosj77:
Uhm..what?!

But boot.img it's in there

also

package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
[Sony Xperia M2] iFlashed:
Woops! Sorry I uploaded the wrong one. Here's the good zip: https://mega.nz/#!3BFVBBCT!ATW9sg7peNOZutI5MRSx77ZFJQJqft1vPEkrGSiqrUY
[Sony Xperia M2] Konstantinosj77:
NEW BUILD IS HERE

Change log is huge but i'll point some things out:

-Latest security updates (July 1st)

-Updated camera drivers

-Include snap camera app

-Include FM radio

-Use stock mixer_paths.xml (fix some audio issues)

-Include zRAM

We moved to an updated device tree so maybe the build isn't as stable as the previous one!!!

INSTRUCTIONS

-Flash latest update for your model http://xdaforums.com/xperia-m2/general/collection-18-6-0-182-ftfs-models-t3286249

-Update your bootloader http://xdaforums.com/xperia-m2/development/ubl-xperia-m2-bootloader-update-ftfs-t3288148

-Flash TWRP recovery http://xdaforums.com/xperia-m2/development/twrp-2-8-7-0-updated-theme-t3252807

-Boot into TWRP,wipe data and dalvik cache

-Flash ROM+gapps and the sensor zip (only if your phone needs it!!!)

-Reboot into fastboot mode

-Flash this https://drive.google.com/open?id=0BxEc8D9KskxTWWIyWEcyTV96S0k

IF YOU HAVE "ALTERNATIVE" SENSORS FLASH THIS ZIP (Thanks [MENTION=6487599]iFlashed[/MENTION] !!!)

https://mega.nz/#!3BFVBBCT!ATW9sg7peNOZutI5MRSx77ZFJQJqft1vPEkrGSiqrUY

MAGNETOMETER FIX (ONLY FOR "NORMAL" SENSORS)

http://xdaforums.com/showpost.php?p=67969973&postcount=1892

Download link

https://drive.google.com/open?id=0BxEc8D9KskxTbDNfNXh0N3g0dUE

Huge thanks to

[MENTION=4635923]galaxyfreak[/MENTION]

[MENTION=985241]erikcas[/MENTION]
[Sony Xperia M2] iFlashed:
FLASHING!! Congrats for the new build!! I will tell later how is it working! Could you please [MENTION=4635923]galaxyfreak[/MENTION] add this in the OP?

EDIT: Nothing works... No SONY logo, just black screen after flashing... and then it turns off. If I connect the charger the red led appears blinking...

EDIT2: It appears to be a kernel issue. I have flashed your last kernel (this: https://drive.google.com/file/d/0BxEc8D9KskxTUUR4X283WE1Hc0k/view?pref=2&pli=1) and it booted fine
[Sony Xperia M2] Konstantinosj77:
You flashed the old kernel... that's why you have bugs..

Strange..unzip the new kernel and flash it through fastboot! It works on my phone..
[Sony Xperia M2] NieeLz:
and where galaxyfreak right now :D
[Sony Xperia M2] Konstantinosj77:
I updated the instructions including a new kernel which is on my phone right now!

Please follow them properly or you will end up with a bootloop!!!
[Sony Xperia M2] linuxct:
Things I'd like to note:

1. Works like a charm so far. No lags, no reboots, FM Radio, speaker in call... All working fine :D

2. Snap camera UI looks awful compared to the one I compiled like a month ago - Did you compile it from Cyanogen sources too? (Also noticed version codes do not match, mine is 2.0.005 while yours is 2.0.002, don't know why).

3. LED is working fine here now, blinks like it should, what kind of magic did you apply to that? :victory:

4. I noticed it vibrates way too much (regarding intensity), even more than stock ROM, I think - where can I change those values, if it's possible without recompiling something?

And also, for those who don't have a PC near (and do all the process right from their phones), there's no need to reboot into fastboot mode, just place the boot.img to your sdcard, then Hit install on TWRP right after installing the ROM+Gapps+Any fixes if needed, and in the bottom right corner choose install Image, then choose the boot.img, choose boot and hit flash. All done, no need to get into fastboot modes anymore :D
[Sony Xperia M2] Konstantinosj77:
1)Thank god!!! :P

2) Maybe you compiled it from cm-13 or caf? I used pure cm-12.1 sources,nothing changed.

3)I just fixed the new library ;)

4)I don't really know...
[Sony Xperia M2] linuxct:
Ah, true, I compiled it from Cm13 sources, then modded the APK to be installed on stock ROM. My bad lol.

Also, nice touch by adding Snap to the Camera button menu. The only place it doesn't work rn is from lockscreen, but it's understandable, this isn't stock rom, and there's no need to add it :p
[Sony Xperia M2] Lojzo_11:
Can I flash it over galaxyfreak's build or should I flash StockROM first?
[Sony Xperia M2] linuxct:
My personal suggestion is to clean everything up even if your coming from a previous build, mostly because it's an updated device tree.

There's no need to go back to stock ROM either, if you flashed a 18.6.A.0.182 FTF before.

To clean install, inside TWRP, get into Wipe, Advanced wipe, and check Dalvik/Art cache, System, Data, Cache. Then proceed with the installation steps described. That should be enough.
[Sony Xperia M2] Konstantinosj77:
Clean flash is recommended
[Sony Xperia M2] Umesh1041:
Clean flashed and followed all steps..using dual sim variant..still sim not working ..everything else works fine..and yes..I did add the build prop line
[Sony Xperia M2] Konstantinosj77:
I'm out of ideas about the DS variant...
[Sony Xperia M2] Umesh1041:
So its impossible for dual sim to get this kernel
[Sony Xperia M2] Umesh1041:
Will try..thanks man..
[Sony Xperia M2] galaxyfreak:
If that doesn't work, also add 2 more lines
[Sony Xperia M2] Umesh1041:
Sorry bro..still not working
[Sony Xperia M2] XPawlex:
Accelerometer Sensor working

Light Sensor working

Orientation Sensor working

Proximity Sensor working

Sound Sensor working

Magnetic Sensor not working properly.

Please send fix patch.
[Sony Xperia M2] iFlashed:
Here working fine with sensor patch

The ROM works really great!! Congratulations!!!

I have found another bug for now only un Pokemon Go. The game works fine but the audio its a bit laggy. I dont know if this is something related to mixer_paths por what...?

Enviado desde mi Xperia M2 mediante Tapatalk
[Sony Xperia M2] slole:
I first wiped everything except the sd and attempted to flash the first zip and it failed: Failed to sysMapFile ..... after that I tried formatting the sd and so on but nothing works I even tried with a usb drive formatted to ext4 but nothing. Did I do a mistake by wiping everything?

I am coming from Z5 STYLE 4.6 so flashing obviously worked before I have unlocked bootloader, but I am using TWRP 2.8.7.0. I am currently running ubuntu on my laptop so if I wil need to reflash a new version of TWRP is there an ubuntu flashtool or will I have to find a windows machine?

edit : rocking a d2303

also: Thanks for the new build This comunity is coming back up again nice job!
[Sony Xperia M2] Umesh1041:
d2302

Sim still not working..don't care much abt sensors..pls just get sim working for our beloved dual sim variant..thanks to all developers..also..try asking freack_v as he first brought dual sim support to cm12.1..thnx
[Sony Xperia M2] linuxct:
Read the thread carefully – [MENTION=6487599]iFlashed[/MENTION]'s patch is ONLY for those who have non-working proximity and/or light sensors. However, those who have normal sensors will have them working out of the box, except for the Magnetometer. Note that using that patch will probably break the rest of the sensors on your device, so be careful with that.

Update your bootloader, and flash TWRP 3.0.2. It's mandatory to get it to work.

So, you just need Fastboot binaries for that. You can get them from Google easily ;)

(Not sure though if you'll need drivers for it, and if so, you can still install [MENTION=2807379]Androxyde[/MENTION]'s FLASHTOOL to get it working)

We got the message, right, there's no need to say it on a daily basis.

This (recent event) is the best thing that has happened to the eagle family since Omni 5.1, I don't think anyone would abandon a certain device now. Developers are doing their best, so sit back and wait for it.