yashsingh1/xdaforums huggingface dataset:
[Sony Xperia P, U, Sola, Go] 95A31:
Daily report 2:

I do not like have missing feature so I start to search something for fix Wi-Fi direct. I found that Samsung Galaxy S2 do not have P2P_DEV support but have Wi-Fi direct working. Anyway I looked for an update version of our compact-wireless and as say here after some rename now it is called "Backport".

My future plan is:

- Use configure wireless as done by LegacyXperia for https://github.com/LegacyXperia/android_device_semc_mogami-common

- Update all Wi-Fi driver/wpa_supplicant infrastructure by Backport source code.

If someone (like [MENTION=4120742]munjeni[/MENTION], [MENTION=4913184]percy_g2[/MENTION] or [MENTION=5092285]Andrewasth[/MENTION] :p) want play with them fell free to do and report the results here for sharing and discuss about errors.
[Sony Xperia P, U, Sola, Go] Andrewasth:
Well I still can't get wifi to properly work and I don't know why the interface isn't set!

[ 11-29 05:11:10.599 2234: 2597 E/WifiMonitor ]
startMonitoring(wlan0) failed!

[ 11-29 05:11:10.599 2234: 2597 E/WifiStateMachine ]
Failed to setup control channel, restart supplicant
[Sony Xperia P, U, Sola, Go] 95A31:
adb shell -> netcfg ?

Can you append dmesg and full logcat?
[Sony Xperia P, U, Sola, Go] Andrewasth:
The iw binary wasn't compiled -.-"
[Sony Xperia P, U, Sola, Go] percy_g2:
https://github.com/Legacy-Xperia/android_device_sony_kumquat

use this tree , it will solve your issues
[Sony Xperia P, U, Sola, Go] 95A31:
Static compiled iw, just push and it is working: http://d-h.st/lCG (binary by [MENTION=4120742]munjeni[/MENTION])
[Sony Xperia P, U, Sola, Go] Diego910:
So wifi direct working?
[Sony Xperia P, U, Sola, Go] Andrewasth:
Push it to system/bin/ and chmod 644 ! It SHOULD fix WiFi on my build using latest kernel. Make a post on original cm11 thread for others to test
[Sony Xperia P, U, Sola, Go] 95A31:
No, is a work in progress
[Sony Xperia P, U, Sola, Go] 95A31:
Daily news:

CW1200 + MAC80211 + CFG80211 with P2P_DEV support sucessfully compiled for Kernel 3.0.101 :victory:.

I will test if it do not explode my Xperia U :confused:.

How to coming soon.
[Sony Xperia P, U, Sola, Go] DPInst64:
Maybe my question is stupid, or there is wrong place to ask it, but: can anyone explain what is the problem with "fm radio" or another proprietary blobs related problem, when you are not upgrading kernel to new version and uses stock? Why just not use stock kernel with newer android and have all hardware working?
[Sony Xperia P, U, Sola, Go] 95A31:
No problem for question, the hungy of knowladge is good accepted here ;) For say it in a simple way it is not so simple do like you say because:

- Some fature are missing also on stock firmware/kernel.

- Different versions of Android use different functions for communicate with Kernel/Hardware.

- Have a binary/blob and not the source code imply that you do not know how it work and you can not adapt it to the Android version that you use.

This in general, I do not know about the FM Radio, I will investigate when all the rest of the hardware will be working.
[Sony Xperia P, U, Sola, Go] DPInst64:
I know it, I ask - I have stock kernel 3.0.8 with all required blobs, I understand there is a problem to run Android 4.4 with kernel 3.4, because blobs from old kernel does not work with new kernel. But if we have already Android 4.4 running on 3.0.8 kernel - why not just use stock blobs and all should work, where is my mistake?
[Sony Xperia P, U, Sola, Go] 95A31:
Your mistake stay in not take in consideration that versions of Android use different functions for communicate with Kernel/Hardware. Take for example front camera for Jelly Bean. When [MENTION=4318865]DevSwift1[/MENTION] working on it, he has a broblem that CM requre a new feature in Ambient Sensor Light driver, this function was not present in the Kernel and this was blocking the camera.
[Sony Xperia P, U, Sola, Go] 95A31:
Daily news:

Bad news today, new modules are not working. Anyway this is the procedure that I follow:

- Download the backports sources.

- Follow the documentation for cross compiling. In detail I use this script:

set -a
CROSS_COMPILE=XXXX/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
ARCH=arm
KERNEL_DIR=XXXXX/kernel/sony/u8500
KLIB_BUILD=XXXXX/out/target/product/kumquat/obj/KERNEL_OBJ
KLIB=XXXXX/out/target/product/kumquat/obj/KERNEL_OBJ
set +a
make defconfig-cw1200;
make

- Move the modules (e.i. files with extension .ko) in the Xperia U module folder (e.i. system/lib/modules).

- Use insmod for load a module (e.g. adb shell -> insmod system/lib/modules/cfg80211.ko). The error returned is this:

<4>[ 2859.493255] cfg80211: Unknown symbol backport_destroy_workqueue (err 0)
<4>[ 2859.493438] cfg80211: Unknown symbol backport_netdev_set_default_ethtool_ops (err 0)
<4>[ 2859.493652] cfg80211: Unknown symbol backport_alloc_workqueue (err 0)
<4>[ 2859.493682] cfg80211: Unknown symbol backport_dependency_symbol (err 0)
[Sony Xperia P, U, Sola, Go] 95A31:
To all tester/user/developer:

I am optimizing the actual configuration for CM11 on Xperia U and I need your help. For make more precise the battery statistic I need the value of current consumed by each component. Please if are on 4.0.4 stok or custom ROM please report the values indicated here. This maybe can contribuite to improve battery lifetime.
[Sony Xperia P, U, Sola, Go] 95A31:
Daily news:

New Wi-Fi driver working :victory: (I am writing a detailed how to)

We have serious issue about bluetooth subsistem due bluestack adoption by Google. Bluez provide an alternative version of bluetooth stack but our bluetooth driver/kernel are not 100% compatible.

The good news are that bluetooth kernel subsystem can be backported (I already done but not tesed yet) and we can adapt swnowball bluetooth driver to our device (already done in very dirty way).

The bad new is that I am not able to compile this adapted drivers with backported bluetooth subsistem. I next days I will investigate.
[Sony Xperia P, U, Sola, Go] percy_g2:
I recommend to close the sources for Bluetooth porting and make a private repo in bitbucket.Try fixing it over there [MENTION=4120742]munjeni[/MENTION] [MENTION=5265970]95A31[/MENTION]
[Sony Xperia P, U, Sola, Go] monioo:
[MENTION=4913184]percy_g2[/MENTION],Why do you suggesting to close bt sources?
[Sony Xperia P, U, Sola, Go] 95A31:
In order to avoid to naive devs to fry their bluetooth. Anyway it is open and if some devs broke his bluetooth is not my business.

Daily news:

As [MENTION=4120742]munjeni[/MENTION] say here, currently we have a update wireless driver. It is not Wi-Fi direct compatible but there is a patch for it so we have a good probability of have also Wi-Fi direct on our mobiles. About bluetooth, for understand the current situation in necessay understand how bluetooth system work. It look like thisi:

hardware <->driver <-> bluez <-> android​

In very poor words the situation is:

Google replace Bluez with bluedroid in the recent versions of Android -> No drivers compatible with bluedroid -> Bluez team make avaibe a bluedroid alternative -> Xperia driver and bluetooth kernel subsystem are too old for this Bluez alternative -> Update bluetooth and drivers + update bluez

Currently [MENTION=4120742]munjeni[/MENTION] is focused on Bluez part (probably he already finish) while I am working on bluetooth subsystem and drivers.

Today I have successful build both bluetooth subsystem and drivers. The drivers are based from original Sony drivers and Igloo Community sources and are in very primitive state (they can fry you bluetooth chip :laugh:). In the next days I will test and fix them.

PS: The Wi-Fi update guide is coming, not very soon, but it is coming ;)
[Sony Xperia P, U, Sola, Go] CaptRodrigues:
Probably to prevent some "famous" dev around the xda to fork they work and then claim that he were the one who did it and mess up with the whole port of cm11 and bugfixes.
[Sony Xperia P, U, Sola, Go] 95A31:
Daily news:

We have working driver for bluetoot on Android > 4.2 :victory: (Proof here)
[Sony Xperia P, U, Sola, Go] Gava97:
Great work man!
[Sony Xperia P, U, Sola, Go] akkufix:
One of the best messages i heard in this year!
[Sony Xperia P, U, Sola, Go] Ultracity:
Thanks buddy,

I want to thank you because you explain us all the things you do and that is really cool.

Keep in that way, regards!
[Sony Xperia P, U, Sola, Go] 95A31:
Daily news:

Current state of bluetooth develop:

​
[Sony Xperia P, U, Sola, Go] littleg33k:
Does it mean the only thing remaining between us and Bluetooth is Android Settings? :cyclops:
[Sony Xperia P, U, Sola, Go] percy_g2:
Lol

Good luck both of munjeni and you .

Hope you guys bring bugless cm for xperia novathor :thumbup:
[Sony Xperia P, U, Sola, Go] akkufix:
Mate, whats up with you? :confused:
[Sony Xperia P, U, Sola, Go] therualex:
dont let some pointless idiots get to you bro :( we all need you back. Take all those nonsense with a grain of salt :)
[Sony Xperia P, U, Sola, Go] 95A31:
It means that we have both drivers and Bluez working but currently we do not know how make them work togheter.

What I read ?!?! Man, you have great skill and knowledge. I see that you are working on hardware decoder accelleration and actually I am wait some your good news :D And I if you need some help I am avaible :good: (but I am not expert in hardware decoder accelleration or in deep android settings/permissions etc... :p)
[Sony Xperia P, U, Sola, Go] Tobber1981:
http://xdaforums.com/showpost.php?p=48505282&postcount=1765
[Sony Xperia P, U, Sola, Go] akkufix:
I was busy, couldn't followed all threads and was surprised to have seen his thread was closed.

Well, i see you there... ;)
[Sony Xperia P, U, Sola, Go] percy_g2:
I'am working on omx ,day before yesterday builded pure aosp for tested . Ported all the things for legacy device . but omx didn't work ,now i'am search in omni rom and comparing its codes with cm .
[Sony Xperia P, U, Sola, Go] 95A31:
Great news! Can you attach a logcat ?
[Sony Xperia P, U, Sola, Go] percy_g2:
1st boot with opening video and cam coder .

Audio is not working
[Sony Xperia P, U, Sola, Go] 95A31:
:eek: Mh... Ok I back to Wi-Fi/Bluetooth :p (I am joke ;)) Maybe audio do not work because this:

E/AudioRecord( 1517): Unsupported configuration: sampleRate 48000, format 1, channelMask 0xc

The supported audio formats are setted right ? Both in configuration files and in av and/or base and/or core and/or native source code ?
[Sony Xperia P, U, Sola, Go] percy_g2:
will look into it and update the sources his with my local pc https://github.com/AndroidOpenSourceProject
[Sony Xperia P, U, Sola, Go] 95A31:
I will look too and let you know :)
[Sony Xperia P, U, Sola, Go] 95A31:
...Too many peacocks, too few ants...​
[Sony Xperia P, U, Sola, Go] dhchris:
:confused: if i can help, let me know what to do... Testing is ok, but programming or developing not so :confused:

Maybe someone can explain or translate, how to help you...

Gesendet von meinem SGP321 mit Tapatalk 4
[Sony Xperia P, U, Sola, Go] netmaniack:
Maclaw`s team help is essential.
[Sony Xperia P, U, Sola, Go] monioo:
And Maclaw's team doesn't share fixes...

I can't blame them for that, but for me it is a sort of inequity in "open source development":rolleyes:
[Sony Xperia P, U, Sola, Go] netmaniack:
Maclaw will share sources - http://xdaforums.com/showpost.php?p=48722267&postcount=200 .
[Sony Xperia P, U, Sola, Go] 95A31:
Daily news:

Today I want write down about develop of CM11 on Xperia U, from the begin to now from my point of view. There are many thing to say so do not lost time.

When Android 4.4 source code begin was released all the Xperia 2012 developers run on it in order to get a working version on own mobile.

The start was very bad because once fixed all the errors, the system did not start. The wrost thing was that logcat (1) was not working so was impossible debug (2) this issue. I could not do anything about that because I do not have the kind of knowledge for fix this kind of issues. Lucky [MENTION=4120742]munjeni[/MENTION] know very well this kind of stuff and first find a way to obtain the logcat and then fix all the issues. If I remember well he make a program in order to grab the logcat and save it on memory card. So if today you enjoy some CM11 ROM on Xperia U/Go/P/Sola you must say thank you to him.

While [MENTION=4120742]munjeni[/MENTION] did that I was looking for a fix of Wi-Fi direct (3) on CM10 by [MENTION=359497]FXP[/MENTION]. After some research I find that in order to get Wi-Fi direct is necessary have a network device called p2p0. In according with this the type of this device must be "__p2pdev" and for create it is necessary iw that was not present in the [MENTION=359497]FXP[/MENTION] release. So while I played with varius precompiled versions (without success), [MENTION=4120742]munjeni[/MENTION] managed to build it from source. So if today exists this folder now you know why. Anyway when I created the network device the system say me that this kind of interface was not supported. So both me and [MENTION=4120742]munjeni[/MENTION] (that meanwhile finished to fix the boot issues) looked for a compatible Wi-Fi driver that support this kind of interface.

To be continue...​

(1) Messages from the system about information, errors,... .

(2) Understand and fix the issue(s).

(3) Llike bluetooth bu much faster.
[Sony Xperia P, U, Sola, Go] Moriarty82:
@95A31, [MENTION=4120742]munjeni[/MENTION]

Thanks alot for your contributions and finally fixing Bluetooth for Novathor devices...!!! :victory:

Im so proud to own a Xperia P and have such a awesome dev team who work hard to bring latest stuff for our devices.

Even the latest of Xperia devices like SP,L,M dont have a proper working CM like we do. :p

Also thanks to all the other devs who are working hard on bringing nightlies to our devices.
[MENTION=4913184]percy_g2[/MENTION] [MENTION=5338729]Gava97[/MENTION] [MENTION=4318865]DevSwift1[/MENTION] [MENTION=5264432]DroidModderXtreme[/MENTION] @Andrewasth

PS: Sorry for the OT and bothering all the busy devs but you all deserve it. :good:

Cheers.
[Sony Xperia P, U, Sola, Go] 95A31:
No problem about OT, I think that dev appreciate receive compilments =P
[Sony Xperia P, U, Sola, Go] 95A31:
Ok guys I need you. I am stuck to Sony logo. I tryied to recompile from screach, wipe all, flash with PC Companion but nothing work. Can anyone help me ?
[Sony Xperia P, U, Sola, Go] percy_g2:
did u try my device tree ?

What actually is happening ?what sources are u using ?

EDIT;- i Have successfully ported bluetooth from lotus
[Sony Xperia P, U, Sola, Go] 95A31:
Yes I am on your tree device. I turn on the phone can enter in recovery but if I do not enter in the recovery I do not reach CyanogenMod logo and stay stuck on sony logo.
[Sony Xperia P, U, Sola, Go] percy_g2:
even stock is not booting ?
[Sony Xperia P, U, Sola, Go] 95A31:
Turn on the phone -> sony logo -> CianogenMod loading screen is the normal boot, i am stuck in sonly logo. It not depend on your device tree, I try other 1000 and same behaviour :S
[Sony Xperia P, U, Sola, Go] percy_g2:
something is derped in your sources . try syncing again the sources and try
[Sony Xperia P, U, Sola, Go] 95A31:
Already done tons of times, git reset --hard + repo sync. Maybe filesystem corrupped ?

EDIT: Tomorrow I try to format my VM. Thank you very much percy :)
[Sony Xperia P, U, Sola, Go] percy_g2:
i will run a build of kumquat on my server and u can try that ;)
[Sony Xperia P, U, Sola, Go] DevSwift1:
Maybe you forgot about vendor??:)
[Sony Xperia P, U, Sola, Go] 95A31:
Ok ty, I must play with some thing about Wi-Fi, please use my device tree, wpa_supplicant and kernel :)

I use XNovator vendor ;) Maybe due issue on local_manifext.xml.
[Sony Xperia P, U, Sola, Go] DevSwift1:
yep but you have missed this line in kumquat.mk

$(call inherit-product-if-exists, vendor/sony/montblanc-common/montblanc-common-vendor.mk)
[Sony Xperia P, U, Sola, Go] percy_g2:
Will PM you the build , sadly i used my tree and munjeni kernel cm-11 branch.

First let me know if your device boots properly ,then i can build with your device and kernel tree

in cm-10.2 and cm-11.0

Vendor tree for device has been merged into one and same for device tree

edit:- just saw https://github.com/95A31/android_vendor_sony
[Sony Xperia P, U, Sola, Go] DevSwift1:
this vendor is prepared by me and for sure he must add this line
[Sony Xperia P, U, Sola, Go] percy_g2:
i didn't saw that , my bad
[Sony Xperia P, U, Sola, Go] 95A31:
Daily news:

Ok so continue where I leave last time.

We was looking for some way to have support for p2pdev type. One day [MENTION=4120742]munjeni[/MENTION] find out this, a git with updated drivers for Xperia 2012 Wi-Fi chip that maybe can not support p2pdev. He tried to compile but due too much issues related to new code on old kernel he leave this way for TI WL12XX drivers. I did not leave and tried again to compile it. I found that the git was include in a project called Backports. It is supported by the Linux Kernel and consist in a set of sources that make various kernel modules. This modules allow to exploit the current kernel's Wi-Fi and Bluetooth subsystems in old kernels. How it work is simple to explain: it act as a replacement of the various kernel subparts. So for use it is enough:

Disable in the kernel configuration file what you want update by Backport.

For instance, if I want update the bluetooth subsystem and bluetooth drivers I must comment out all the relative entries like this:

# Bluetooth entries
# CONFIG_BT=y
# CONFIG_BT_RFCOMM=y
# CONFIG_BT_BNEP=y
# CONFIG_BT_HIDP=y
# CONFIG_BT_HCIUART=y

# Drivers entries
# CONFIG_CG2900=y
# CONFIG_CG2900_CHIP=y
# CONFIG_STLC2690_CHIP=y
# CONFIG_CG2900_UART=y
# CONFIG_BT_CG2900=y

As you can see in the previous example is not necessary comment out all the entries about bluetooth, this because Backports use the kernel configuration file as reference in order to make the modules as much as possible compatible with the old kernel. So for recap is enough comment out only the entries that can be modules and not theirs configuration entries.

Enable what you want update in the Backport configuration file.

Some examples are in defconfig directory in Backports release archivie.

Build the modules and load them in the kernel.

Currently I use this litte script for build:

set -a
CROSS_COMPILE=$(readlink -e XXXXXX/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin)/arm-eabi-
ARCH=arm
KERNEL_DIR=XXXXXX/kernel/sony/u8500
KLIB_BUILD=XXXXXX/CM11/out/target/product/kumquat/obj/KERNEL_OBJ
KLIB=XXXXXX/CM11/out/target/product/kumquat/obj/KERNEL_OBJ
set +a
make defconfig-cw1200
make
rm -rf bins
mkdir bins
find . -name *.ko -exec mv {} ./bins \;

The standard place where store the modules in the Android filesystem is: system/lib/modules.

To be continue...​
[Sony Xperia P, U, Sola, Go] bulanula:
Hello 95A31,

Can I follow this guide you posted above on locked bootloader devices ?

Basically I want to use latest wireless drivers on Sony stock JB kernel because my bootloader cannot be unlocked so no custom kernel possible.

Is this possible ???

Many thanks for your help and time 95A31 !!!
[Sony Xperia P, U, Sola, Go] 95A31:
Mh.. Yes theoretically yes, but your kernel must be compatible with stock rom
[Sony Xperia P, U, Sola, Go] bulanula:
I cannot use any other kernel than Sony signed kernel because I cannot unlock bootloader.

I can use any custom ROM but this custom ROM must run using the official Sony stock kernel.

Can I use compat-wireless backports with this stock kernel ? Or must the kernel configuration be modified ?

I am not sure, because I have never done this before but I think I know some of the theory but I am not sure how to do it in practice.

I need to get kernel source of 6.2.A.1.100 firmware then compile compat wireless against those kernel sources, I think ?

Then it will be compatible with stock Sony 3.0.8 kernel which works on locked bootloader just fine ?
[Sony Xperia P, U, Sola, Go] 95A31:
I do not know how work signed mechanism. These ROM's must run a signed kernel blob?
[Sony Xperia P, U, Sola, Go] bulanula:
Yes, bootloader checks boot.img checksum before booting and if checksum does not match with official Sony one then no boot allowed.
[Sony Xperia P, U, Sola, Go] 95A31:
Ok. This is a HUGE problem. In simply words you must disable/remove some feature from kernel and compile them by backport. If you remove some stuff I think that the cheksum change and bye bye boot. Anyway do not be sad about Wi-Fi drivers because they have some problems and I think that they will be never solved because are due by Android. Currently all the major developers are using [MENTION=4120742]munjeni[/MENTION] kernel that have stock Wi-Fi drivers :) (mee to)
[Sony Xperia P, U, Sola, Go] bulanula:
It is strange because, by my understanding building backports does not modify the kernel in any way.

Sony stock kernel also uses cw1200 module through backports so I don't think the kernel needs to be modified.

I just want to update the cw1200 module by compiling it for the 3.0.8 stock kernel from backports then replace the files in /system/lib/modules/3.0.8+/kernel/net/compat-wireless/drivers/staging/cw1200/ folder on my device afterwards.

There are two files there :

cw1200_wlan.ko

cw1200_core.ko

I think that is all that is needed to get latest cw1200 drivers for wireless ?
[Sony Xperia P, U, Sola, Go] 95A31:
Yes for get updated drivers you have right, but the drivers communicate with Wi-Fi kernel subsystem. AFAIK 3.12 and 3.0.8 Wi-Fi kernel subsystem are not compatible, so you need backport also Wi-Fi kernel subsystem if you want a working driver (or adapt Backports' driver for kernel 3.0.8 but in my opinion this require too much energy and time).
[Sony Xperia P, U, Sola, Go] bulanula:
What about 3.11 subsystem and 3.0.8 kernel ?

It seems CFG80211 and MAC80211 is built into the kernel so cannot easily update these ones.
[Sony Xperia P, U, Sola, Go] 95A31:
I think that also 3.11 is too much different. You can port it easly only if Sony's Wi-Fi Kernel subsystem is composed by modules too and not built in the kernel. In this case you just replace the moduels :good: The Wi-Fi Kernel subsystem modules are: compat.ko, cfg80211.ko, mac80211.ko ;)
[Sony Xperia P, U, Sola, Go] 95A31:
You simply can not update otherwise the checksum change. I can not find a simply way for solve you problem :(
[Sony Xperia P, U, Sola, Go] matood:
If is md5 only size dependant, then if you add stuff you need and remove something you dont need and add till the correct size then it shoud work. Add just useless file with rhe right size....

Just a suggestion.
[Sony Xperia P, U, Sola, Go] bulanula:
What about installing Ubuntu in chroot then compiling for Ubuntu's kernel ?
[Sony Xperia P, U, Sola, Go] 95A31:
MD5 depend on the contenent ;)

If signature is checked before boot this not work, it must be signed by Sony, so or you have some friend in Sony or ... you are loked to official kernel, no way.