yashsingh1/xdaforums huggingface dataset:
[Xperia Z1 Compact Android Development] foresto:
I tried that, but the errors persisted. I then tried running switch_microG.sh default, and then switch_microG.sh microG again, and most of the errors were gone, but the switch_zpatch part still failed. Finally, I added another git fetch before this line, and the switch_microG script now appears to work. It would have been pretty easy to miss these errors if I hadn't been reading every line of the script's output. You might want to update it to check the return status of each command it runs, or use set -e to have the shell do this automatically. (And probably update the script to fetch the missing tags, of course.)

I see you're now applying patches, and this patch in particular looks like it addresses the twrp-related build failure that I reported back in October and you could not reproduce at the time. Does that mean you finally reproduced it?

Thanks. I'm trying to make things easier on you guys by sorting out what I can on my own, but I have limited time, and this has already taken more hours than I really had to spare. My hope in reporting problems as I uncover them is that you will use the information to improve your instructions/scripts/processes, so the next person to try it won't have to spend their time chasing the same issues, and so there will be fewer bugs to navigate as more people start using your work and reporting new problems. It would be great to see the project develop into something stable; perhaps even an officially supported Lineage build.

Oh? I thought the revision= attribute in your manifest's project tags would allow you to specify a git ref of your choice. Perhaps I was mistaken? The idea would be for you to update those attributes whenever you sync your forks and do a release, perhaps when doing your monthly Android Security Bulletin builds. That way, source builds would never be more than a month behind the official repos, and people reporting problems in your project would never be working with out-of-sync subprojects (which should reduce tech support for you guys).

Thanks for the detailed branch info. I'll keep that in mind if I run in to another problem that's obviously fork-related.

I just started a lin-15.1-microG build. I'll report if it fails. :)
[Xperia Z1 Compact Android Development] MSe1969:
By the way:

As you all know, LineageOS does currently not offer Weather provider apps for LineageOS 15.1 for download (only for LineageOS 14.1)

I have built an APK for OpenWeatherMap for download from the LineageOS sources here
[Xperia Z1 Compact Android Development] MSe1969:
In fact, since I initially manually checked out both branches for all affected repositories (one-time effort), I never had the issue again :)

As this part hasn't been intended to the "broader audience", so to say (as checking out the branch in local_manifests

and doing another repo sync afterwards

does the job for those only intending to build from source as well) - Nevertheless, if you have ideas how to improve those scripts, we will be glad to receive them - if you want, simply push a pull request to the repo's and we will be glad to test and merge them :) [Same applies btw, if you think the README's deserve some tweaking]

Seems like it :) - However, I leave it to [MENTION=8036586]115ek[/MENTION] to confirm. In his original thread, he used two different manifest files and said you must force a repo sync if you exchange the manifests, and I have redone it a little to allow a parallel build. In general, we have still not advanced on that topic - as mentioned in the OP, if you encrypt using a temp. Lineage 14.1 build, you can perfectly use the TWRP from the "Lollipop" thread . . .

See also my first comment - definitely highly appreciated and acknowledged!

Regarding official LineageOS build - to make a long story short: That's not going to happen.

However, we aim at providing a stable build suitable as a daily driver and so far - with the caviats around encryption mentioned in the OP and other things (Radio mono only) here in this thread, we have achieved already a lot. . . also thanks to the feedback we receive from people like e.g. you

Well, roughly spoken, the overall build manifest (including local manifests) consists of three "buckets":

- AOSP Google tags their stuff, and the respective tag is referred in the build manifest => that part is a given

- Our stuff (lin15-microG organization and some stuff from mse1969) - yes, we could set tags, but see next item

- LineageOS, Omnirom, AICP - we don't have any control when those guys merge anything and neither of them tags their stuff on a monthly basis

And THAT, the 3rd "bucket", is your issue . . . - yes, purely technically spoken, it is possible to use the respective commit hash as a tag, but I think you will perfectly understand, that we will definitely not manually put the sha1 hashes of 1.500+ repositories every time into our own build manifest . . .

Good luck! Let us know the outcome
[Xperia Z1 Compact Android Development] Ferr1s:
hey guys,

I managed it to flash FOTAKernel twrp.img but cmd tells me "target didnt report max-download-size".

then it says : "sending FOTAKernel"...OKAY and "wirting FOTAKERNEL..finished"

after that I didnt pay attention and the device rebooted into stock 4.4.4 again.

I tunred it off and rebooted manually into twrp as descriped in post #1.

But then the only thing happens is that the backlight of the display tuns on and thats all....

I have to switch it off with power button + volumeup

can any1 help me?

thx in advance
[Xperia Z1 Compact Android Development] foresto:
Gesture / Swype Keyboard

Has anyone managed to get gesture typing to work with this build? In MSe1969's Lollipop build, it could be enabled by installing libjni_latinimegoogle.so in the appropriate system directories. (The Open GApps installer did this automatically, but GApps itself was not necessary; the keyboard supported gesture typing even without Google Apps installed.)
[Xperia Z1 Compact Android Development] lm089:
Could it be that you accidentally wiped your boot.img? I had this once. Solution for me was to

1. extract boot.img from some ROM to some local folder on your PC

2. boot into bootloader

3. from a terminal / command prompt issue command

after that I was able to boot into recovery
[Xperia Z1 Compact Android Development] MSe1969:
In addition to the answer already given by @Im089 it may also make sense to check, whether the twrp.IMG file is okay (compare the MD5 hash shown on AFH, where you downloaded the file, with your file's real MD5 hash).

I would start with this check, because when you flash the boot.img, you can't even boot your stock ROM any longer. (Nevertheless, you would like to get rid of the stock ROM... :) )

Normally, fastboot boot twrp.IMG should simply work, the TWRP has got its own kernel.
[Xperia Z1 Compact Android Development] Ferr1s:
MD5 is the same. Thx for the hint.

But I still cant boot into twrp... only the backlight goes on but the display shows nothing...

Just to make sure: after fastboot boot twrp.img command I pull out the USB cable and peform the Hardkey input(volume down + power) on my device?or is this not necessary?
[Xperia Z1 Compact Android Development] foresto:
I've seen something like this as well, after deliberately erasing the boot partition in order to test twrp in that situation. When I tried to boot into recovery mode, the phone vibrated once and remained at a blank screen with no LED blinks. (I don't remember whether the backlight turned on.) Flashing boot.img back to the boot partition got twrp working again.

This puzzled me, because I thought the whole point of moving from Sony's old fake recovery system to a real recovery partition was supposed to be that it works even when the OS is corrupted. The failure here made me wonder if my bootloader update, which was intended to enable the real recovery, somehow went wrong. I did that update with flashtool and munjeni's openbootloader update file, since it worked on my linux workstation and didn't erase my OS or data. It occurred to me that neither of those things are supported in any way, and they might just be broken, leading to an incomplete or incorrect bootloader update. So, I fired up a Windows VM today and used the supported approach of flashing official firmware using Sony's Emma tool. It seems to have helped, because when I then re-flashed twrp and erased the boot partition for a repeat test, the black screen problem was gone.

In summary: Make sure you have updated your bootloader so that it actually supports booting a recovery image from the recovery/fotaimage partition. (Amami's original bootloader did not.) The official way is to use Emma to flash Sony's latest Lollipop ROM. If you did it some unofficial way, or never did it at all, that could explain the problem you're having.
[Xperia Z1 Compact Android Development] lm089:
yep, same here, and thanks for your suggestions. In fact I've never been able to directly boot into recovery <vol-up>+<power>, only <vol-down> on purple LED is getting me there, although I understand that this should be possible through the bootloader patch.

Then on the other hand it's not such a big deal for me; as long as I can boot into recovery (with a working boot.img) I'm fine. If the boot.img should indeed go berzerk one day then I need a Linux or windows machine anyways to solve those problems; so I simply stopped bothering.
[Xperia Z1 Compact Android Development] Ferr1s:
just to make clear. I never saw the twrp working.... It just doesnt start. flashed it via fastboot several times but i cant start it.

dont know what to do. maybe some german guy can contact me via PM and tell me in detail what to do?maybe I ll understand it in german :)

edit: OK I did all the instructions now via Flashtool and after i flashed the twrp.img i started device into system with the flashtool.

now the f...king thing starts :D
[Xperia Z1 Compact Android Development] lm089:
It's been a while that I opened my Z1c, and I made a few unnecessary mistakes back then; no use to repeat those :D

But I opened and flashed my Xperia Tablet Z over the past holidays. Luckily there is an official Lineage 15.1 version for that tablet, and with it come extremely well done and clear instructions. As both devices are from the same manufacturer and of approx. the same age I assume that those instruction could help with your Z1c as well (as your bootloader apparently is unlocked already you may want to start reading from "Installing a custom recovery using fastboot")
[Xperia Z1 Compact Android Development] Ferr1s:
after i could get into twrp i finally flashed the lineage os 15.1. all works fine. now i will try to make a partition image of the system like you do it in windows for example.
[Xperia Z1 Compact Android Development] MSe1969:
Cool, what has finally helped solving your issue? The instructions for the Xperia Tab Z or something different?
[Xperia Z1 Compact Android Development] foresto:
Gesture / Swype Keyboard

Answering my own question:

Gesture typing can be enabled by adding both libjni_latinimegoogle.so and libjni_keyboarddecoder.so to /system/lib/, and placing symlinks to those files in /system/app/LatinIME/lib/arm/. This could presumably be done by the ROM, if the maintainers wanted to do so.

If you don't have the original .so files, copies can be found in the opengapps git repo.
[Xperia Z1 Compact Android Development] foresto:
Screen wake is very slow

When I press the power button to wake the phone, it takes 1-2 seconds before the screen lights up. That is a lot slower than it was on lollipop. Does anyone else have the same problem? I can provide logcat output if it would help.
[Xperia Z1 Compact Android Development] Ferr1s:
I tried the Flashtool and via the flashmode i could reboot device into system and then TWRP starter. It was just pure luck :)
[Xperia Z1 Compact Android Development] MSe1969:
Yes, I notice the same - as however the overall reaction of the device, once it woke up, seems okay, I have simply accepted this behavior. Did you notice anything specific in the logcat?
[Xperia Z1 Compact Android Development] MSe1969:
Thanks - background of my question was whether we should update the documentation in the OP. Since we all do not seem to know exactly, what has happened here, there is currently nothing I could adapt.
[Xperia Z1 Compact Android Development] lm089:
WiFi 5GHz question

My Z1c is constantly connected to my home router (Fritz!Box) using the 2.4GHz range. Fritz! is also offering the 5GHz range, and most devices here at home are happily connecting to that range. Happily because I'm living in a rather crowded house where most of my neighbors' routers apparently are using the 2.4 range (the Fritz! WiFi App is currently counting 16 routers excluding my own, as opposed to only 4 in the 5 GHz range).

If I set my router to "autochannel" then it choses to broadcast on one of the higher channels like 60 or even one above 100. I'm aware that everything above Ch. 48 is critical but it's "allowed" here in Germany.

My 2nd LineageOS 15.1 device (Xperia TabletZ) has no problems connecting via the 5 GHz range, but my Z1c only does so if I force the router use one of the "standard" channels (36 - 48).

I'm having this "issue" since I said good-bye to Sony's Stock ROM, so probably both devices cannot really be compared here.

I know, it wouldn't be much trouble to quit using "autochannel", and even using 2.4GHz is not a big deal, really. So this is more like a "I simply would like to know" question:

Having read several times that devices can use some sort of a region setting in regards to WiFi support, then seeing the difference between my 2 devices I wonder if there is some sort of settnig or property or whatever that could be altered in order to set some kind of regional parameter. Or is this something that cann not be changed really? Of course I searched quite a bit, found numerous posts in various forums often related to LineageOS and describing more or less the same things (on many different devices). But so far found nothing that would give me hint what I could do about it.

Always being eager to learn I still hope that someone here has an idea...

Update:

after some more googleing and browsing my sytem dirs Ifound some files with interesting names below /sys/module/wlan/parameters:

one is called country_code and contains a single line of text:

(null)

I made a safe copy of that file then tried to alter its content to something like "de". But I can't:

using some root explorer I can't delete, rename or alter it

same with using adb with root access from both system and recovery: I can successfully chmod this file through adb shell but if I try to rename it I am told that there is no such file or directory.

Obviously I'm at a dead end here. Any ideas (anything from "try this" down to "better leave it alone" is welcome)?
[Xperia Z1 Compact Android Development] Alexandr.Noskov:
Will this build work if you lock the bootloader with Flashtool and recover the TA partition?
[Xperia Z1 Compact Android Development] MSe1969:
I don't think so! (Haven't tried such things myself and won't attempt to)

Normally, the whole concept of a locked BL is to only allow and boot the official stock vendor OS.
[Xperia Z1 Compact Android Development] Alexandr.Noskov:
The trouble is that otherwise DRM keys cannot be recovered. And without these DRM keys, the camera doesn't work well.
[Xperia Z1 Compact Android Development] 115ek:
As [MENTION=7929484]MSe1969[/MENTION] already said: I also wouldn't recommmend it even if it's technically possible. What benefits do you think accrue?

In terms of camera quality: This won't change - it's already stock quality (although on stock there's another picture processing we can't use because it's anchored in Sony's modified framework).

Locking the bootloader makes your device unaccessable via fastboot - so if something goes really wrong and you even can't enter recovery you'll have a problem.

If you're intention is better security (-> no access for thiefs or third persons) then encryption with a strong password is the way to go. If you've got problems with intelligence service you've got a problem anyway: with or without locked bootloader ;)
[Xperia Z1 Compact Android Development] Alexandr.Noskov:
Thank You for the clarification! Come to us in St. Petersburg in the summer (it will be warm), we will drink beer and look at the beautiful views of the Neva river.
[Xperia Z1 Compact Android Development] 115ek:
There isn't a dependence between camera quality and DRM keys anymore. Some guys already handled that.

In basic words: Earlier the kernel checked your DRM keys and if they were present you were able to use the stock camera functions (noise reduction, ...).

By modifying the kernel this check could be tricked, so you'll get noise reduction and all that stuff even without DRM keys.

Pictures may look different/worse anyway. That's because all smartphone vendors use their own picture improvement algorithms and they don't want to share them. Good picture quality is a big seller.

So if you want better pictures you have to use stock or a dedicated camera. Maybe you can also try third party camera apps or something like that: https://xdaforums.com/crossdevice-dev/sony-themes-apps/port-stock-camera-nougat-roms-t3628791

We didn't tested it and won't support resulting problems. But you can share your experiences with it.
[Xperia Z1 Compact Android Development] _Pano_:
can I flash xposed?
[Xperia Z1 Compact Android Development] MSe1969:
Yes, you can - as far as I know, there is a version available for 8.1 Oreo (beta). However, we can't and won't support any issues you may have with it...
[Xperia Z1 Compact Android Development] ULT][MO:
I flashed xposed for oreo some days ago, now seems working fine. If i should notice bugs or problems I'll report here
[Xperia Z1 Compact Android Development] ULT][MO:
Hi guys, using Es file manager to modify files .txt it says "a problem has occurred" and can't edit the files, so I supposed was a root access bug and I reinstalled app. After that I retried but nothing changed.

I downloaded a txt editor, gaved superuser access rights and tried to edit file.

The phone rebooted two times and The file has not been modifyed.

I think its a magisk or superuser bug. ?
[Xperia Z1 Compact Android Development] lm089:
Where is this file located?

Had a similar problem recently I coudn't solve. My idea back then was that probably that file was somehow blocked due to exclusive access by the system like you often have it with windows. But I don't know if these things are happening in Linux systems...
[Xperia Z1 Compact Android Development] ULT][MO:
The file is in a folder, in external sd
[Xperia Z1 Compact Android Development] 115ek:
There shouldn't be any problem accessing files on external sd. Furthermore there is no root access needed for such an operation.

It more sounds like a permission problem. Are your apps allowed to access the storage?

It also can be an SE related problem. Anyhow: without logs we can't really help you (apart from that you are using exposed and magisk which we clearly DON'T support).

Another thing you can test: format your sd card, copy files back and try again. Provide logcat and (actually more important if it's SE) dmesg. We can look into it. Ideally use a fresh system without magisk and exposed to reproduce the issue to ensure the problem isn't caused by them.
[Xperia Z1 Compact Android Development] MSe1969:
Don't know, whether it is related, but more than a year ago had the following issue on a different device:

Had recovery running and copied within TWRP's command shell a file from somewhere in /data to /sdcard - after booting LineageOS, had difficulties accessing the file, permission issues even as root - had to reboot to recovery and manually delete the file again in command shell. Maybe similar in your case?

Since your issue is the external SD, I believe backing up the data and formatting the SD should solve. If the external SD behaves weird, that is often the only help.
[Xperia Z1 Compact Android Development] TheNextuk`:
Hi, does this ROM support MHL? Or I need smth special to install and then MHL stream start?
[Xperia Z1 Compact Android Development] 115ek:
I remember these commits by [MENTION=5688409]koron393[/MENTION]: https://gerrit.aicp-rom.com/q/topic:%22fix-mhl%22

But I think they're addressing shinano platform.

I don't really know MHL and I haven't got any hardware to test - else I would have done that already.

The only thing you can do is test it yourself - we are happy if you share your experiences and logs. :)
[Xperia Z1 Compact Android Development] TheNextuk`:
So, I tried to connect my phone to Tv and mhl doesn't work. But I also have Sony Xperia ZR with official 5.1.1 and when I connected zr mhl start to work. You are right, these drivers is for shinano (as I understand z3 compact for example). But they are for 8.1 too. How can I install these drivers? You see I'm noob and don't know how to do it and also how to do logs)) I make a backup and try to fix mhl by these drivers. Tell me how) Later I share the results
[Xperia Z1 Compact Android Development] 115ek:
You'll find the link concerning logs in the first post. Just read carefully: https://xdaforums.com/showthread.php?t=1520508

And you can't install these drivers. At least not easy.

Just attach your MHL hardware and get logs afterwards. Then we can have a look.
[Xperia Z1 Compact Android Development] ULT][MO:
Temporarely I've solved moving the folder in internal sd. Here it makes me edit the .txt files.

I think you're right, its a sd bug. Soon as possible I'll format sd and retry ;)
[Xperia Z1 Compact Android Development] TheNextuk`:
Now I wanted to remove logs, but faced a problem. MHL is a micro USB and I can't connect the phone to the computer. Can I make logs in the catlog application? Also I can`t post links.
[Xperia Z1 Compact Android Development] 115ek:
Do the things consecutively. The logbuffer is big enough to remember things. So first reproduce the error/problem, then get the logs. Please use adb therefor, it's better than logapps without root.

Please get logs as follows:

1. Enable USB debugging, enable root for ADB (you need to enable developer options for that) and install adb on your PC

2. connect device to MHL device - wait for maybe 1 minute or so

3. connect device to PC

4. On PC: type in

adb root

5. On PC: type in

adb shell dmesg > /sdcard/dmesg.txt

6. On PC: type in

exit

7. On PC: type in

adb pull /sdcard/dmesg.txt

8. On PC: type in

adb logcat -b all > logcat.txt

break that command with ctrl-c after some seconds

Post dmesg.txt and logcat.txt here (you can attach it to your post. If it's to big compress it (e.g. .zip)).

Good luck :)
[Xperia Z1 Compact Android Development] esemef:
auto rotate has stopped working a couple of times and requires a reboot to make it work again. Has anyone else noticed this?
[Xperia Z1 Compact Android Development] MSe1969:
New build with February '19 ASB

Hi all,

new builds are available for the February ASB patches:

A. Standard build flavor

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

ASB Security string 2019-02-05

Kernel: Various Security Patches and some additional 'spectre' mitigations

Fix of Eleven and LockClock app taken over from microG flavor

B. microG build flavor

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

ASB Security string 2019-02-05

Kernel: Various Security Patches and some additional 'spectre' mitigations

Bromite SystemWebView updated to M72

Happy flashing!

Regards, M.
[Xperia Z1 Compact Android Development] foresto:
Looks to me like PLATFORM_SECURITY_PATCH is still 2019-01-05 in build/core/version_defaults.mk. Have you not updated the repos yet?
[Xperia Z1 Compact Android Development] MSe1969:
In short: Correct, repo not updated, yet.

The topic 'O_asb_2019-02' in LineageOS' Gerrit is not yet merged. So you either need to pick that topic using the repopick command and cherry-pick the commits, where we use forks; or you have to wait until the LineageOS team merges the topic, so we can then update our repo, too.
[Xperia Z1 Compact Android Development] foresto:
Gotcha. I hope you'll post here when it is updated. I'm waiting until then to do a bit more testing of the slow screen wake.