yashsingh1/xdaforums huggingface dataset:
[Xperia Z1 Compact Android Development] ParanoiaMan:
Thanks for fast and exhaustive answer :D, my previously questions was just for curiosity. I trust your because i think that if anyone would put a backdoor or other malware they will not share code of ROM, will not do open source ROM and, most important think, will not answare and help people for fix problem or will not create two branches of this ROM and, one of this, for privacy focuses ;)

Thanks guys for your nice work, i have read what lineage would for be official, and it's better do this how hobby :laugh:

Cheers
[Xperia Z1 Compact Android Development] zoltaaaan:
Hey guys,

I fixed my old Z1C by replacing the display and installed this ROM. It looks nice and runs.

I installed the standard flavor and chose pico gapps.

I am still waiting for my new SIM card, therefor I had no SIM card in it so far.

The problem is, it won't open the play store. It just says "Data is checked" (translated from german). At this point I wonder, which data is checked, since I did not type in any data.

I figured, it might be the whole google registration issue, even though I did not receive the "device is not certified by google".

So I went ahead and try to query the gsf android ID, but it didn't work. I use ADB by opening the power shell (I am using Windows 10) in the folder where I extracted the ADB files. I have to type

./adb.exe devices

for it to work. In the end I found out, in the gservices.db database there is no row containing "android_id".

What did I miss or might have done wrong?

Edit: I also get the error messages that play store and google services apps are repeatedly cancelled. I can choose to ignore it until I reboot. I tried it multiple times today and once I was able to enter my google email adress and password, but after entering the password, it was not able to connect to the google server. (still not the uncertified-issue).

Edit 2: Okay, I might have did too little research on my own. I just found this post about the same issue. The solution might be to put a sim card in it.

But for the record: It is weird that some general problems and "problematic mechanisms" that are applicable to different devices and roms are hidden away in device subforums.
[Xperia Z1 Compact Android Development] MSe1969:
Hi, thanks for doing some research on your own. I personally don't use Gapps (I use microG, i.e. the microG build variant), so I wouldn't have had any good answer anyhow. But never heard before about that issue. My only answer would have been that it was a Gapps issue and not an issue of the ROM.

Maybe others want to add any more information?
[Xperia Z1 Compact Android Development] zoltaaaan:
I put in a SIM card now, but it makes no difference.

I am thinking about doing the whole process again. During installation, one thing went wrong. After flashing the TWRP, I accidentally booted into system and not into recovery... I do not know why, because now the buttons work for booting to recovery.

The difference was, even though I used flashtool and installed the service from there, which should have activated my recovery menu, I was not able to boot into original recovery menu. So far, TWRP is the first recovery menu, I have had on this device.

May the TWRP installation be corrupted?

But besides this "abnormality" from the installation guide, I do not see any connection betweeen this and the issues.

Edit: Alright, now it works!

I repeated the whole process, starting with flashing TWRP.

Two things went differently than before:

1) Now I was able to boot into recovery, since I already had a recovery that I was able to boot into.

2) According to Open Gapps FAQ you should wipe Dalvik and cache after flashing GApps.

After rebooting, the Setup wizard was a lot more extensive and Google login worked just fine!

Can't really say, I understood the problem, but if you have similar trouble, watch out for those two things.
[Xperia Z1 Compact Android Development] MSe1969:
If TWRP works now, all should be fine.

Maybe you could try an older Gapps ZIP?

Or: I assume you skipped the Setup in the Setup Wizard and simply launch Play store afterwards? If not, try to skip the Google setup from the Setup Wizard and simply launch Play store manually? Also try wiping all app data of Gapps (play store AND spy services) in the Settings app? Another thought: Allow all permissions only for the initial setup and only revoke them afterwards?
[Xperia Z1 Compact Android Development] MSe1969:
Okay, yes - wipe cache/dalvik sounds like the solution!
[Xperia Z1 Compact Android Development] oldspace:
First of all I would like to thank everybody for the great work you are doing.

I tried the first time to install a custom rom on my Xperia Z1 Compact. I'm currently struggling with entering the recovery mode.

Until then I followed the instructions on the first page:

- unlocking bootloader

- flashing TRWP amami version mentioned in the other thread

Entering the recovery mode fails with the hardware buttons as well as with ADB. The stock rom was the newest version supplied by Sony some time ago (14.6.A.1.236 I guess). Acc. to the first page, the newest version should have the recovery mode included, shouldn't it?

If not, how can I install it with flashtool on Linux? Or better: where can I find a suitable image file of a "correct" 14.6.A.1.236?

Thank you so much in advance!
[Xperia Z1 Compact Android Development] zoltaaaan:
Are you sure, TWRP image was actually flashed? When I had the phone in fastboot mode and checked, it was not recognised by Windows 10 anymore. So maybe, if you used the command line for flashing TWRP, it might not have worked due to driver issues.

Try

./fastboot.exe devices

or

fastboot devices

it should list your device, when it is in fastboot mode.

I had to install the additional fastboot driver . The driver was unsigned, so I had to make changes to the UEFI first.

After that, the device was recognised by flashtool and I installed one "service" that was shown. But still, I had no "original" recovery menu. I proceeded to flash TWRP by command line.

Now I was able to flash TWRP and when I recall it correctly, it directly booted into TWRP recovery.
[Xperia Z1 Compact Android Development] foresto:
I'm not sure of this, but I doubt that any over-the-air update from Sony ever included the recovery bootloader update. I think you need one of the more recent Xperia Open Devices firmware images in order to get this update.

I suggest you follow the "outdated bootloader" instructions in the first post of this thread. The only official way to get the firmware you need is by using Sony's Emma tool, linked in those instructions. This tool can be used from linux using VirtualBox, if you first add USB filters for both of the USB devices exposed by the phone (one is active with Android running; the other is active in flash mode). I cannot provide support for doing this, though.

If you decide to go the unofficial way, you'll have to decide whether you trust a firmware image that comes from some stranger on the internet.
[Xperia Z1 Compact Android Development] lm089:
Not sure where you're aiming at: first you write, you want to install some custom ROM (probably this one here?), then in the end you ask where you can find a "correct" version of the last available stock ROM.

Assuming you want to open up your phone then flash TWRP recovery and finally LineageOS 15.1 (or some other custom ROM) then you must not look for some stock ROM.

All you have to do to get there is described very well in the OP and elsewhere here on xda. If you find that too confusing maybe you want to try this instruction on the official LineageOS site; it's written for a different device and of course you only flash images built for your Z1c, but otherwise this instruction works perfectly; I've used it several times for two different Xperia devices and it never failed on me.
[Xperia Z1 Compact Android Development] zlata:
If u need openbootloader try this https://xdaforums.com/showpost.php?p=73575131&postcount=130
[Xperia Z1 Compact Android Development] foresto:
Warning: That ftf file from munjeni does not always work. It did not work for me. (I had to use the official firmware instead.) Your mileage may vary.
[Xperia Z1 Compact Android Development] oldspace:
It worked!!! Thank you all for your support!

The hint from lm089 helped. My stock rom never had a recovery mode installed. I needed to do it before continuing the installation process.

This thread guided me through the whole process: Link
[Xperia Z1 Compact Android Development] foresto:
Congrats. If you want to verify that real recovery booting truly works, try installing twrp on the recovery partition, temporarily erasing your boot partition (fastboot erase boot), shutting down, and booting into twrp using the volume-down button. A failure to start twrp that way was how some of us discovered that our open bootloader update was incomplete.
[Xperia Z1 Compact Android Development] A.CHE:
Thank you for the great ROM!

I have an issue with 5GHz WLAN: as it's been said, channels above 48 are not visible. Is there a chance it will be fixed?
[Xperia Z1 Compact Android Development] MSe1969:
To be honest, I have no idea how to fix that and where even to look. The issue is device dependent, so there are on a high level three places where the root cause could be hidden:

a. Device config (I don't think so at all! But at least to mention)

b. Vendor blobs (they're closed source, so no chance at all!)

c. Kernel

Are you aware of any other device/ROM, where that issue had been around and where a solution was provided? Then there was a chance to look, otherwise I don't know what to do about it. Maybe [MENTION=8036586]115ek[/MENTION] has some additional thoughts?
[Xperia Z1 Compact Android Development] lm089:
On my TabletZ (SGP311 / pollux_windy) running LineageOS Official 15.1 I connect to 5 GHz, while my Z1c can only connect to the 2.4 GHz range.

Only solution is to force my router to use one of the lower channels but then my 5 GHz network would have as many concurring networks as the 2.4 GHz one (I'm living in a rather crowded house).

If you're interested I check which channel my router's using at the moment then post it here. I also could try to get whatever config file you want to look at, if you need that.

With my Z1c I had this problem ever since I started using custom ROMs (first one was munjeni's LOS 14.1 version); I remember that there were some dicussions regarding this on that ROM's thread.
[Xperia Z1 Compact Android Development] A.CHE:
I don't think it's device dependent issue. Previously I was using stock ROM and it's working fine since I had selected the appropriate region.

I haven't used any different custom ROM on this device so I hadn't chance to check if there was a solution.
[Xperia Z1 Compact Android Development] MSe1969:
"Device dependent" for me did not mean that YOUR Z1c was broken or so. I meant it from development/code point of view: Kernel, Vendor blobs and device config. are specific for each device, when you build a ROM. And since other devices from different manufacturers don't have that issue when running LineageOS, the root cause must be in the device dependent parts of LineageOS.
[Xperia Z1 Compact Android Development] 115ek:
Sometimes there are problems with region codes because some bands are not legal in some countries. But I don't think it's the case for us.

Then the kernel driver could be involved. There are similar problems on Z3/Z3c devices AFAIK. Someone already put a lot of work in an opensource version of this driver https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx. We currently use Qualcomm's prima driver. It loads the firmware blob WCNSS_qcom_wlan_nv.bin into the actual HW. There's a config file in the rhine device repo rootdir/system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini. I'm not quite sure if even that could help us.

Maybe [MENTION=6425591]SpiritCroc[/MENTION] has to add/correct something. He's more and longer into the msm8974 development. Or maybe [MENTION=4120742]munjeni[/MENTION] who has a lot of experience.

EDIT: Maybe the firmware itself is the problem. There is a report that some (newer) firmware versions have problems with 5GHz here

Mako should have the same chip (?) as our amami. I'm not sure if we can switch the firmware binaries easily (device/kernelversion dependencies...)
[Xperia Z1 Compact Android Development] esemef:
According to https://en.wikipedia.org/wiki/List_of_WLAN_channels#5_GHz_(802.11a/h/j/n/ac/ax)

DFS is required above 48 in most regions, maybe it's related to that?
[Xperia Z1 Compact Android Development] 115ek:
Yes. That may be a problem.

My prime suspect is WCNSS_qcom_wlan_nv.bin now. At first I thought it's a 'real' firmware binary - but instead it's just a struct compiled into a binary.

This struct is somehow related to drivers/staging/prima/CORE/WDA/src/wlan_nv.c - if not compiled directly from it. BUT I wasn't able to reproduce the blob with our sources.

What is WCNSS_qcom_wlan_nv.bin doing? Well, it contains a lot of definitions which bands are allowed in which country and with which power.

I came across here where they say a replacement of WCNSS_qcom_wlan_nv.bin may help.

Further problem now is: The prima kernel driver who loads the config comes in different versions which expect different types/sizes of WCNSS_qcom_wlan_nv.bin So using the version from reddit post is a dead end.

I think we have two options now:

update our prima kernel driver and try using config files from other msm8974 devices / devices that are using WCN3660 chipset

hack the binary according to this commit

I tried the last option but it wasn't successful yet. I tried to do a three way merge (with binaries...) by converting binary into txt, diff and merge and then convert back --> if someone knows a good method to do something like that even faster please let me know...

Anyhow we have to find a link between WCNSS_qcom_wlan_nv.bin and wlan_nv.c to hack the binary or even see if it's misconfigured.

If someone knows what WCNSS_cfg.dat does please let me know. Other tips are really welcome, too. ;)

EDIT:

Here is a link to wlan_nv.c

If someone is interested in puzzles let me know. I made a small program to convert the structs from wlan_nv.c into binaries. That way it's possible to do changes and see how/where they affect the binary. Then xxd is very helpful to convert bin->txt to be able to use meld or whatever to see a meaningful diff.

EDIT2:

wlan_nv.c says:

\file wlan_nv.c
\brief Contains collection of table default values to use in
case a table is not found in NV

I would say NV is for non-volatile(?) memory here. Maybe deleting WCNSS_qcom_wlan_nv.bin and force the driver to load default values is also an option. I'm just brainstorming...
[Xperia Z1 Compact Android Development] 115ek:
Using old firmware blobs from bacon mentioned here did the trick for me.

Anyway I'm going to look into the difference between bacon and amami blobs - I just thought I understood how it works... :rolleyes:

I'm able to see and use upper 5GHz channels now which means wifi auto channeling now works with my router.

Going to build a clean testbuild for you now. I'll report back in a few hours :)

---------- Post added at 03:56 PM ---------- Previous post was at 02:59 PM ----------

I'll only provide a testbuild for pure lineage - microg users have to wait at least for next ASB update (early april). I'm a bit lazy :laugh:

You'll find the build here

Just wipe /system, /"cachestuff" and install new .zip.

Please report and share your experiences. I'm also interested if some other things are broken now (hotspot...).

BTW: If there's a strong demand for a fixed microg version --> let us know. It's no problem to get one built before april.

If you report the problem solved this fix will also be included in Lineage 16 and AICP 14 by [MENTION=6425591]SpiritCroc[/MENTION]
[Xperia Z1 Compact Android Development] lm089:
[MENTION=8036586]115ek[/MENTION], this is really great! Did as you recommended (delete system and "cachestuff", then flashed new zip). After first start of system found that gapps and Magisk were missing (of course...), so went back and flashed those, too.

Result: z1c connects easily to 5GHz, channel 52.

Until now don't see any bugs yet.

Thanks a ton for your efforts!
[Xperia Z1 Compact Android Development] esemef:
Is it possible to disable off line charging? I just want the phone to boot up.
[Xperia Z1 Compact Android Development] 115ek:
It should be possible - yes. But I don't know of a switch to enable/disable it in lineage AND we won't include such a modification.

Why do you need it? Normally people consider a non-working offline charging as problem.

Maybe check AICP - they provide more possibilities. Or find out how to disable it on your own ;)
[Xperia Z1 Compact Android Development] esemef:
The battery won't hold a charge & it will take several days to get a new one, all the phone will do in the mean time is come on to show that stupid animation.

Being able to get past that so the phone boots would mean I could still use it in the meantime.
[Xperia Z1 Compact Android Development] 115ek:
What about powering the device on? You can use it while it charges - where's the problem?
[Xperia Z1 Compact Android Development] esemef:
In my experience if you try to turn it on when it's plugged in then it won't go past the offline charge animation, you need to get enough charge in the battery and turn it on when it's not plugged in.

I also have a problem with the power button, it only seems to work if I pinch the phone in a certain place. I've not had the guts to take the phone apart enough to get to the buttons, pulling the back off was hard enough. I'm using the camera button to wake up and double tap on "o" to sleep at the moment.

Having the phone just boot when it was put on charge would be amazing, if it were possible.
[Xperia Z1 Compact Android Development] lm089:
Never had a situation like that, so this is just an idea: have you tried getting into Fastboot with the help of your PC (hold Vol UP then connect USB)? If that works you could try to boot into system through fastboot command... this way you wouldn't need the power button.
[Xperia Z1 Compact Android Development] esemef:
I replaced the battery and I decided to run it all the way down and then charge it back up. but offline charging seems a bit broken.

Plugged into a pc or ps3 the charging light goes on, then off then screen comes on, sony logo, charging animation and the screen turns off, a little while later the screen comes back on again and shows the logo and charging animation, over and over. I have no idea if it's charging.

Plugged into a charger or ps4 the charging light goes on, then off then the screen comes on, sony logo, charging animation and then screen turns off. I guess it's charging, but no charging light comes on.

I had already tried that, it won't go into fastboot either in that state.
[Xperia Z1 Compact Android Development] wepacad:
Hello

I have a problem. I installed the March version of the firmware. Everything works well, but when switching to a 2G network the touchscreen stops working. Only restart helps. Also sometimes the touchscreen itself is triggered.

The screen changed to Chinese. Protective film does not help.

P.S. Sorry for English. Translated through Google.
[Xperia Z1 Compact Android Development] MSe1969:
Not sure I have understood you properly or not:

You have replaced the original touch-screen of your Z1c device with a Chinese product and now the screen behaves badly, like reacting despite not being touched (also when a protective foil is on it) and you have observed the screen not working any more in case of a network switch?

In that case, I can't help, I am afraid...
[Xperia Z1 Compact Android Development] wepacad:
Yes. I have original Z1c with replaced Chinese touchscreen. In the official rom I have no problem. Maybe someone made some patch?
[Xperia Z1 Compact Android Development] MSe1969:
New builds with April 2019 ASB

Hi all,

new builds are available for download with security level 2019-04-05:

Standard flavor

https://www.androidfilehost.com/?fid=1395089523397936453

- Solved WLAN 5GHz channel issue (see thread discussion)

microG build flavor

https://www.androidfilehost.com/?fid=1395089523397936452

- Solved WLAN 5GHz channel issue (see thread discussion)

- Control switch in dev. settings for hosts file update (see explanation below)

Hosts file update (microG build flavor only)

The LineageOS default behavior is to always backup and restore the hosts file (/system/etc/hosts) during a system update. The microG build flavor of this ROM brings its own pre-populated hosts file with many ad blocking entries. However, this file is only installed during a clean flash, because otherwise, the existing hosts file would always be restored. Therefore, a new switch has been introduced in the developer settings, called Restore hosts file during update

- If it is

not checked (default)

, the current hosts file is copied to /system/etc/hosts.bak and the delivered hosts file from the ROM replaces the hosts file.

- If the setting is

checked

, the current hosts file is backed up and restored (LineageOS default behavior), and the hosts file delivered by this ROM is written to /system/etc/hosts.new

Due to the backup/restore mechanism, the default behavior will a very last time be effective when flashing the ROM update, before the new behavior is in place (i.e. the former hosts file has been restored).

Therefore:

- If you would like to use the delivered hosts file from this ROM, simply flash the ROM once again after having flashed it

- If you don't want to use the delivered hosts file, but prefer to have your existing hosts file backed up and restored (e.g. because you use an own hosts file editor app), simply activate above setting in the developer settings.

Regards, M.
[Xperia Z1 Compact Android Development] MSe1969:
I remember something from my cm-12.1- thread, maybe it is related - but not sure:

Could you please do the following? Connect your phone via 'adb' and enter a

root shell

, where you enter the following command:

cat /sys/devices/mdss_dsi_panel/panel_id

Please post the result.
[Xperia Z1 Compact Android Development] MSe1969:
New builds available with May 2019 ASB

Hi all, new builds with May 2019 ASB patches available for download:

A. Standard LineageOS 15.1

https://androidfilehost.com/?fid=1395089523397962270

- Security string 2019-05-05

- Webview updated to M74

B. Security hardened microG build

https://androidfilehost.com/?fid=1395089523397962269

- Security string 2019-05-05

- Bromite Webview updated to M74

- The "network extras" (captive portal detection and iptables block script) has been moved from 'Data usage' to the 'Network and Internet' main fragment

- Option to set an own DNS (Settings: Network and Internet) by specifying an IPv4 and IPv6 address (uses iptables netfilter)

- Option to deny new USB connections (Settings: Security and Privacy)

- Increased maximum password length to 64

- Additional options to restrict secondary users (disallow app installation and audio recording)

Happy flashing,

regards M.