yashsingh1/xdaforums huggingface dataset:
[Xperia Z1 Compact Original Android Development] l.ca:
BT/WiFi problems workarounds until proper fixes.

I worked around BT and WiFi problems like this:

On your phone, after installing and booting the latest nightly (I'm on 20151006 as of this writing. Hope soon this will not be needed anymore):

Launch File Manager. You will need either Prompt or Root access mode on * => General settings;

change directory to /system/etc/firmware/wlan/prima, open WCNSS_qcom_cfg.ini

scroll down to gChannelBondingMode24GHz=1 (on line 306, towards the end) and change it to gChannelBondingMode24GHz=0

save and exit the editor

Switch on Bluetooth;

Settings => About phone => Status:

write down or copy to the clipboard your Bluetooth address (better yet, write it down when still stock);

Back to File Manager (with root access enabled).

in /data/etc/ create a file named bluetooth_bdaddr , in Properties>Permissions change owner/group to bluetooth and permissions to -RW--R---R--

open the newly created bluetooth_bdaddr with Editor, type or paste the Bluetooth address you wrote down or copied before

save and exit the editor;

if your are plagued by the "identical WiFi MAC address for all Xperia Z1C" (that is, you have collisions from more than one device with the same MAC on the same network segment)

In File Manager (with root access enabled).

in /data/etc/ create a file named wlan_macaddr0 , in Properties>Permissions change owner/group to wifi and permissions to -RW--R---R--

open the newly created wlan_macaddr0 with Editor, type or paste a new MAC address (e.g. 20:54:76:BA:DA:55 - see below)

save and exit the editor;

You will want to use your original hardware MAC if you took note of it while still stock, or make some yourself using a prefix from Sony Mobile Communications (look for some on http://standards-oui.ieee.org/oui.txt) and six random {0-9, A-F} characters

Of course you can perform all this using adb shell or local terminal and su, vi, chown, chmod.

Reboot your phone (will also update your WiFi MAC if you specified one) or enter/exit airplane mode;

WiFi should work as it used to until 20150927 (that is, no drops every few seconds). Bluetooth address will not change and screw pairings up all the time

In Settings => About phone => Status you should see the WiFi MAC and Bluetooth addresses you specified. They should both survive CM updates. You will need to put gChannelBondingMode24GHz back to 0 in WCNSS_qcom_cfg.ini until either channel bonding is fixed in the driver or the change is reverted upstream.

Also keep an eye on:

https://jira.cyanogenmod.org/browse/NIGHTLIES-1877

http://review.cyanogenmod.org/#/c/111158/
[Xperia Z1 Compact Original Android Development] prinz.z:
Cool thanks a lot.. sounds promising. The ChannelBondingMode could fix the problem for Wifi here. However my bluetooth problem was something different to the MAC thing, with the latest nightlies, I was not able to turn bluetooth on at all (or recently I could but not after it crashed once, with the problem even surviving a reboot).
[Xperia Z1 Compact Original Android Development] l.ca:
Good news: fixes for WiFi/BT MAC & 2.4GHz channel bonding are coming with the next nightly. Since I will be unable to build anything myself for some time, I'll test it as soon as available.

Thank you Giulio Cervera and all the developers.

http://review.cyanogenmod.org/#/c/111158/

http://www.cmxlog.com/12.1/amami/
[Xperia Z1 Compact Original Android Development] neandertaler19:
Can anybody give me an update on WiFi EAP issues with the latest nightlies? Are they still there?
[Xperia Z1 Compact Original Android Development] l.ca:
I use EAP/PEAPv0/MSCHAPv2 at work and at home with my OpenWRT router/ap with FreeRadius. No problem at least since 20150925-NIGHTLY-amami.
[Xperia Z1 Compact Original Android Development] TECCC:
Wifi + Sony Logo

with latest nightly ( 20151008 ) Wifi dont got activated and while switching apps i see the sony logo in the background for miliseconds , anyone confirm ?
[Xperia Z1 Compact Original Android Development] fadern:
Im running the latest and I have no issues.
[Xperia Z1 Compact Original Android Development] TECCC:
hmm maybe it depends on xposed v75 sdk22 i try again.
[Xperia Z1 Compact Original Android Development] l.ca:
WiFi works fine without any workaround for me with 20151008, as it used to until 20150927, i.e. no more editing of /system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini is required anymore, as per this patchset.

Those who manually populated /data/etc to workaround the WiFi & BT MAC address bug, should delete wlan_macaddr0 and bluetooth_bdaddr. The directory will be automatically populated on next boot as needed, also thanks to the aforementioned patches. Still, it takes another reboot more to actually use the WiFi MAC...
[Xperia Z1 Compact Original Android Development] paulle:
WiFi works fine now. Thanks to cyanogenmod devs fixing it at least.
[Xperia Z1 Compact Original Android Development] korpenkraxar:
Hi guys!

I am still on munjeni's great 108 ROM but I am thinking of switching over to the CM ROM.

Is it daily driver ready at this point? With this I mean:

Is it reasonably stable? (get through most days without crashing)

Does it have ok battery life? (lasts a full day under moderate use)

Camera picture quality ok? (not gigantic step down in quality)

Any issues I should be aware of which may not have been addressed among the last 20-30 pages in this thread?
[Xperia Z1 Compact Original Android Development] TECCC:
hmm tried install again, clean install nightly from 8th October , Wifi still grey with message "Wifi gets activated" nothing happens, not able to activate, wifi before this nightly was working
[Xperia Z1 Compact Original Android Development] Heroxis:
Hello,

I have exactly the same problem with my z1c and the current nightly (20151009). In settings -> wifi it says "Turning Wi-Fi on..." but nothing is happening. I'll attach a logcat from booting up and then shutting down again. Hopefully these infos help you guys :confused:

Edit: Btw that is with clean flash.

Edit2: Pretty sure these entries in the log are the result of the problem:
[Xperia Z1 Compact Original Android Development] SpotTech:
Wifi BT

Last nightly on clean install, not set mac adresse for wifi and bluethoot
[Xperia Z1 Compact Original Android Development] lemon567:
Can confirm sigh
[Xperia Z1 Compact Original Android Development] paua__:
I'm having a GPS satellite-fix issue. It seems to determine position solely on connected towers and wifis, not gps-satellites. Anyone experiencing the same issue?
[Xperia Z1 Compact Original Android Development] paulle:
GPS is working fine here (30-60s for a fix)
[Xperia Z1 Compact Original Android Development] TheAbalone:
Any solution for the wifi problem of 20151008?
[Xperia Z1 Compact Original Android Development] C0qRouge:
I installed this on my wifes z1c. I honestly didn't checked it before in this detail but regarding the camera performance cm is totally crap (Version 150920)!

Is there any improvements on the newer builds? Camera is most important to her, so I'm really ****ed up right now :-\
[Xperia Z1 Compact Original Android Development] l.ca:
If you are not against tainting your system with closed stuff, you could try this

No recommendation, I don't use it, just saying because I actually tested the camera for the two days my device was still stock and it was good...

---------- Post added at 02:03 AM ---------- Previous post was at 01:53 AM ----------

Bluetooth and WiFi work fine for me without any workaround whatsoever since 151008, 2.4 and 5GHz, PSK and PEAP. Relevant files in /data/etc are created on first boot, but I noticed that WiFi MAC is only used starting with the next reset. What happens invoking mac-update as root in terminal or adb shell? Does the WiFi mac address get updated? What is the content of /data/etc? Is there a wlan_macaddr0 file? what is its content?
[Xperia Z1 Compact Original Android Development] SpotTech:
Nothing happened, wifi still grey.

wlan_macaddr0 get same mac adresse

I have flash 06/10 build, configure wifi and after flash 10/10 build, wifi work great
[Xperia Z1 Compact Original Android Development] :
Wifi bugs here as well.
[Xperia Z1 Compact Original Android Development] :
to all people suffering from wifi not working, please try this

Disclaimer: I don't know if this will work, so try at your own risk!

The assumption is that mac_update, the service which updates firmware with correct mac address is somehow not getting the required permissions to write the change. running it as root SHOULD then fix the problem.

Please do this in a terminal and see if it fixes the issue:

su
/system/bin/mac-update

after that check if you see a file under /data/misc/wifi/prima

and also check its modification date, should be of the time of running the above code.

EDIT: replaced _ with - in the path!

thanks [MENTION=899726]mcastagnaa[/MENTION]
[Xperia Z1 Compact Original Android Development] Rekoil:
Sound logic, fixed my MAC address! :good:

EDIT: Should note, my WiFi was actually working, just with the wrong MAC address.
[Xperia Z1 Compact Original Android Development] paulle:
wifi working with wrong MAC address but terminal gave back the following :sh: /system/bin/mac_update: not found; Unknown id: /system/bin/mac_update
[Xperia Z1 Compact Original Android Development] mcastagnaa:
It is actually /system/bin/mac-update

It's a dash, not an underscore.
[Xperia Z1 Compact Original Android Development] Rekoil:
Oh haha, I didn't even notice, I typed /system/bin/mac<TAB> hehe.
[Xperia Z1 Compact Original Android Development] TECCC:
tnx oshmoun and mcastagnaa, WLAN works now.

one issue while switching from screen to screen i see "Sony" in the Background(for miliseconds), you know how to fix this ?
[Xperia Z1 Compact Original Android Development] :
So you didn't have wlan working, but now it works with the proposed fix? or did the fix only correct your mac address?

Oh and about the sony logo:

Actually, the fix for that was removed by CM for some reason. That's why you're seeing it now.

Right now, we gotta live with it ;)
[Xperia Z1 Compact Original Android Development] TECCC:
without your fix, wlan doesnt activate(no mac address) then i used your commandline -> reboot -> wlan activated and Mac adress is set.

for the sony logo , how is the fix called ? that i can observe the changelog to know when its removed

sorry for my bad english ^^

best regards
[Xperia Z1 Compact Original Android Development] paulle:
mac-address issue fixed. /system/bin/mac-update
[Xperia Z1 Compact Original Android Development] :
here is the commit which removed the fix:

https://github.com/CyanogenMod/android_device_sony_rhine-common/commit/70e8f6ca6acd2a3067740fd080dd71b6989abbec

you could theoretically run the commands in terminal (as root), and you won't see the logo anymore
[Xperia Z1 Compact Original Android Development] TECCC:
wich command lines i´ll have to add ? then i will try ... i am not so skilled with terminal cmds ^^

for me the bootsplash is really annoying
[Xperia Z1 Compact Original Android Development] :
Wi-Fi fix is here!

http://xdaforums.com/showpost.php?p=63283042&postcount=48
[Xperia Z1 Compact Original Android Development] foresto:
Messaging app shows wrong attachment previews in restored messages

After restoring my sms/mms messages from another device (using SMS Backup and Restore), the Cyanogenmod Messaging app is showing the wrong picture in attachment previews. Instead of showing the correct one, it shows a single picture as the preview for all pictures in all messages. Tapping the (wrong) picture opens the correct one, but returing to the conversation view shows the wrong preview pictures again.

I think the picture it chooses to show in all previews might be the first one for which it generates a preview. If the first conversation I open contains a picture of a cat, then that cat picture will be used as the preview for every picture in all conversations.

This seems to happen consistently for messages that were restored from backup. Most of the new messages I've sent to myself today got the correct preview.

I discovered the problem in cm-12.1-20151006-NIGHTLY-amami.

I don't think it's a problem with SMS Backup and Restore, since Textra displays the correct previews for the same messages.
[Xperia Z1 Compact Original Android Development] foresto:
After a clean install of cm-12.1-20151014-NIGHTLY-amami, wifi was broken.

I ran /system/bin/mac-update as root, then rebooted, and wifi worked again (until the next factory data reset).

/data/misc/wifi/prima/WCNSS_qcom_wlan_nv.bin had an mtime that was about right for the time I ran mac-update.

About Phone -> Status showed the correct wifi mac addresses for my device.

However, my dhcp server shows very strange mac address values in the leases for my device. Instead of the usual six pairs of hex digits separated by dashes, it shows 32 hex digits with no dashes. The digits change each time I connect. What's this about? It is filling up my dhcp lease table and preventing dhcp reservations from working.
[Xperia Z1 Compact Original Android Development] :
Nice to know the fix worked :D

The 32 hex digits you mentioned are probably your ipv6 address, and not the mac address.
[Xperia Z1 Compact Original Android Development] foresto:
Nope. My dhcp server doesn't offer ipv6 addresses, and even if it did, CyanogenMod shouldn't be putting them in a mac address field when making requests to the dhcp server. As I sad, this is filling up the server's lease table and breaking address reservations.

This looks like the problem:

https://jira.cyanogenmod.org/browse/BACON-3269

Unfortunately, I don't see a bug report for this problem in the CYAN project.
[Xperia Z1 Compact Original Android Development] neandertaler19:
I also did a clean install of cm-12.1-20151014-NIGHTLY-amami and wifi did not work. The posted method using the terminal however fixed that problem and so far wifi seems to be working. Thanks ;)
[Xperia Z1 Compact Original Android Development] :
I find it weird that your dhcp server acccepts erroneous mac addresses like that o.O

Time to switch to a static address as a temporary solution ? [emoji14]
[Xperia Z1 Compact Original Android Development] foresto:
DHCP allows values other than MAC addresses to be used as client identifiers. It's normally done only when an administrator specifically configures the clients to do so, but it's not erroneous for the server to accept them. Your DHCP server is probably accepting them too.
[Xperia Z1 Compact Original Android Development] :
Is anybody experiencing random reboots sometimes when you open the data/wifi?
[Xperia Z1 Compact Original Android Development] :
Known issue

https://jira.cyanogenmod.org/browse/NIGHTLIES-1715

There's a solution posted in one of the comments there.it fixes the reboots by disabling strict mode
[Xperia Z1 Compact Original Android Development] TECCC:
is the bootsplash sony logo fixed now ?
[Xperia Z1 Compact Original Android Development] glehel:
5 GHz band does not work in this version ?
[Xperia Z1 Compact Original Android Development] rzlatic:
anybody else experience often gsm signal drops?
[Xperia Z1 Compact Original Android Development] neandertaler19:
No, I don't have any problems with signal.
[Xperia Z1 Compact Original Android Development] Rekoil:
Yep, and my NFC has stopped working, but I guess that's probably a separate issue. Actually I did install Sony ROM a while back and wasn't able to get NFC to work there either.
[Xperia Z1 Compact Original Android Development] prinz.z:
After waiting for a few days and switching to nightly 1026 Wifi bug seems to be fixed, I did not do any hacks from the recent discussion.

There is however a new bug: Bluetooth has its fixed MAC, but keeps "forgetting" pairing with my pebble every few hours!?
[Xperia Z1 Compact Original Android Development] testman86:
Does anyone also have huge battery drain since three latest nightlies? From now on I have huge battery drain, before battery lasts up to two days. Btw is it also possible to donate some money directly to cyanogenmod? I would pay at least 10 Euros for a working CustomROM on our nice Z1C. Till this day I had no real issues till now the last three to four months.
[Xperia Z1 Compact Original Android Development] prinz.z:
Yes, I noticed that too, device also got a little bit warm sometimes during the day.

BTW, the BT pairing problem is somehow gone with the latest nightly.
[Xperia Z1 Compact Original Android Development] NRG-R9T:
a quick Cyanogenmod 12 review

Still no WiFi

LP is a pain, but no wonder with all the changes, especially ART. Even Google struggling and fixed a lot of issues later with Marshmallow. So it's no surprise that CM12 is a pain to use. Since the 5.x nightlies I struggled to find a stable version to stay with as a daily driver. there was only one period where everything worked almost perfectly, around the 24th September, after the open source release of Sonys then latest Firmware and the commits related to that. A few days afterward, WiFi stopped working ever since until my last check (28th October). It's a pain. the suggested "mac-update" didn't work either. I'm left to use a one month old nightly version, which is not free of bugs or rare reboots, but I am quite happy about it in combo with the "xposed Framework" and M5-Kernel
[Xperia Z1 Compact Original Android Development] frauhottelmann:
You have to use the kernel that comes with the nightlies, otherwise you'll have problems with WiFi... WiFi should be fixed now.
[Xperia Z1 Compact Original Android Development] rzlatic:
wifi okay here too.

people, m5 isn't built on daily basis and therefore isn't synced with every kernel/rom change that comes with the nightlies. in case of issues, try to run vanilla combo and see if the issue persists.
[Xperia Z1 Compact Original Android Development] testman86:
On 27th build battery-life seems to be ok again :) just 5% drop in the last 17 hours! Was using 2min phone call, over night on my desk, once with me leaving the house for shopping and then laying around on desk again, so mostly standby. Mobile Network was on but wifi,bluetooth etc. off. And I have no GAPPS installed.

I also suggest that maybe switching to latest firmware could help some people to get rid of some bugs. Also they will get seperate recovery partition which is really usefull in case of restores/backpus or broken builds. And I think Sonys released sources may require up-to-date firmware not really old one.

I am on latest firmware and installed TWRP (Thanks [MENTION=5456406]CoolDevelopment[/MENTION] for building it) and have no issues. I wrote a little tut http://xdaforums.com/showpost.php?p=62382513&postcount=23 how to get there step by step.
[Xperia Z1 Compact Original Android Development] :
Any fix for the over exposed CM camera?
[Xperia Z1 Compact Original Android Development] bigsmoke9250:
touchscreen isnt working... any solutions?
[Xperia Z1 Compact Original Android Development] TheAvngrZ:
is it anytime not working? tried a reboot?
[Xperia Z1 Compact Original Android Development] TheAvngrZ:
Guys, how is it here with TWRP? Do you use it and from where do you get it?

I have some knowledge from yuga (XZ) and from there I know, that a Backup function in Recovery is a great thing...

How is it here?

Greeetz
[Xperia Z1 Compact Original Android Development] paulle:
twrp here: http://xdaforums.com/sony-xperia-z1-compact/general/fota-twrp-recovery-amami-t2909719

working nice for me.
[Xperia Z1 Compact Original Android Development] rzlatic:
- or - there is new official bootloader which provide proper (separate) recovery partition, but you have to flash latest stock, update TA partition with emma, flash twrp for recovery partition and then go back to CM. its a bit hassle but this is what the partition layout should be in the first place. thread here, twrp here.
[Xperia Z1 Compact Original Android Development] TECCC:
did they fix the bug with the sony logo (sony bootsplash logo) in background while switching from app to app or from window to window ? or is it still visible ?
[Xperia Z1 Compact Original Android Development] rzlatic:
heard about that but i haven't seen it.
[Xperia Z1 Compact Original Android Development] bigsmoke9250:
tried reboot many times. didnt work

---------- Post added at 11:58 AM ---------- Previous post was at 11:32 AM ----------

touchscreen isnt working at all
[Xperia Z1 Compact Original Android Development] [GER]Roxxor:
Is your touchscreen working without issues on stock rom?

Sounds like a hardware problem, as it seems nobody else is having this bug.
[Xperia Z1 Compact Original Android Development] bigsmoke9250:
anyone???

---------- Post added at 12:04 PM ---------- Previous post was at 12:03 PM ----------

yes its working on stock

---------- Post added at 12:07 PM ---------- Previous post was at 12:04 PM ----------

its little strange that i just have this issue

---------- Post added at 12:09 PM ---------- Previous post was at 12:07 PM ----------

if i hold power button it shows power menu and it should be. but if i press one of the volume keys it will reboot
[Xperia Z1 Compact Original Android Development] [GER]Roxxor:
WHich stock rom? 5.1?
[Xperia Z1 Compact Original Android Development] bigsmoke9250:
yes

---------- Post added at 12:40 PM ---------- Previous post was at 12:21 PM ----------

i think that its better to go back to stock again...
[Xperia Z1 Compact Original Android Development] [GER]Roxxor:
I have no clue. Maybe you should get adb log and dmesg(I guess dmesg is the more important thing in your issue).

Maybe a dev will have a look. I'm not a developer, so I cant help you further. Good luck.
[Xperia Z1 Compact Original Android Development] rzlatic:
noticed that back then but waited a bit to confirm. it last for at least week or two: drain in form of drainage while screen is on. no suspicious wakelocks, drain is normal while phone is sleeping, but screen on for ten minutes browsing reddit and battery goes ~10% down. its not horrible, but phone is significantly less autonomous with nightlies of last two weeks or so.

(tried with autobrightness on or off, ran phone with brightness slider set to far left, drain is the same. the battery graph is especially funny to look at as the slope is extra steep on periods with screen on)

mentioning the battery graph: the wifi stack again seems to be always active no matter the settings.
[Xperia Z1 Compact Original Android Development] TheAvngrZ:
I also can confirm huge battery drain, if display is on. also if fligh mode is aktiv, the flighmode safes a lot with this bad wifi setting.
[Xperia Z1 Compact Original Android Development] paulle:
better camera?

Is this a chance for a better camera for the z1c?

https://www.youtube.com/watch?v=E4amrzJ_fUY
[Xperia Z1 Compact Original Android Development] rzlatic:
saw that video a few days ago. as i see there is not just camera mentioned but bt and wifi too, which are also buggy as hell.

oshmoun and few others could already know more about the state of that.
[Xperia Z1 Compact Original Android Development] :
Well, i sure would hope as much lol. Since there are now periodically updated binaries for aosp directly from Sony, there shouldn't be as many hacks required to make camera work. I think it was already stated though that camera quality will not be as good as that of locked devices (which still have drm keys).

Bt and wifi are open source for the most part afaik. Making those work reliably is a job for the community, but it sure helps that sony is pitching in :p
[Xperia Z1 Compact Original Android Development] rzlatic:
well to me it all looks like making his AOSP efforts more official, or more transparent, in terms of rewriting the codebase, kernel and drivers and making all of them as much open as possible. afaik this is what he tries to do on AOSP project for some time now; i think it's nothing especially new apart of more frequent use of the word "soon" and that's why i said some of developers here could know more in detail via other comm channels ;)

and i agree that the huge weight goes to - you mentioned - job for the community, it's not like just another rom-thread on xda.