yashsingh1/xdaforums huggingface dataset:
[Moto G 4G Android Development] passtim:
I have made a start at this. Firstly, your new ROM is installed and working, so thanks very much. At least I'm up to date now. I will look at building my own in a while. I suspect my main issue will be not knowing enough about what new patches to pick and what to delete, and how.

This time I tried reformatting my data and (Internal) SD Card to ext4, and I had the same problem as you mentioned from pigeon9 - I will thank him. I had to go round a loop of wiping, reformatting, resizing and then getting Android to use the SD card as Internal several times before I got Encryption to work at all. I'm not quite sure why, but I get the impression that Android kept reformatting the SD card as f2fs. I am still uncertain as to what format is now in - how do I find out when TWRP refuses to access it and show me?.

Having encrypted (not rooted yet) TWRP versions 3.1.0-0 and 3.1.1-0 behave as 3.2.3-0 - they all ask for a password but don't recognise it. 3.3.1-0 doesn't ask for a password at all. It sees the data partition is there but on opening it it cannot see the contents. Backups are therefore unavailable, and installs have to come from USB. Last time I looked there were several reports of this, but no fixes I could find. It looks as if TWRP have given up on peregrine (can't really blame them) and may give up completely on Android Q.
[Moto G 4G Android Development] sdembiske:
In TWRP issue these Commands:

adb shell

cat /proc/mounts

should yield a line similar to this somewhere in the output:

/dev/block/bootdevice/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,nodiratime,nobarrier,noauto_da_alloc,resgid=1065,data=ordered 0 0

tmpfs /sbin tmpfs rw,seclabel,relatime,size=437564k,nr_inodes=109391,mode=755 0 0

I'm working on solving the issue but not a lot of progress at this stage.
[Moto G 4G Android Development] passtim:
Thanks again. You may have gathered I'm not too good at this stuff (it took me a while to get adb shell to work.

This is what I get, but I can't make much sense of it. I think it says data on the main system is ext4, and on the SD card it's sdcardfs, whatever that is.

"rootfs / rootfs ro,seclabel,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=437564k,nr_inodes=109391,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime,gid=3009,hidepid=2 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
tmpfs /mnt tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,size=437564k,nr_inodes=109391,mode=755,gid=1000 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,discard 0 0
none /acct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
none /dev/memcg cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,seclabel,relatime 0 0
none /config configfs rw,nosuid,nodev,noexec,relatime 0 0
none /dev/cpuctl cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
none /dev/bfqio cgroup rw,relatime,bfqio 0 0
/dev/block/bootdevice/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,nodiratime,data=ordered 0 0
/dev/block/bootdevice/by-name/fsg /fsg ext4 ro,context=u:object_r:firmware_file:s0,nosuid,nodev,relatime,nobarrier 0 0
/dev/block/bootdevice/by-name/modem /firmware ext4 ro,context=u:object_r:firmware_file:s0,nosuid,nodev,relatime,nobarrier,data=ordered 0 0
/dev/block/bootdevice/by-name/persist /persist ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0
/dev/block/loop0 /pds ext3 rw,seclabel,relatime,errors=remount-ro,data=ordered 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
tmpfs /storage tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,size=437564k,nr_inodes=109391,mode=755,gid=1000 0 0
/dev/block/dm-0 /data ext4 rw,seclabel,nosuid,nodev,noatime,nodiratime,nobarrier,noauto_da_alloc,resgid=1065,data=ordered 0 0
/dev/block/dm-1 /mnt/expand/8d28e912-6d8b-4923-a664-13b3c4e5ae5c f2fs rw,seclabel,nosuid,nodev,noatime,background_gc=on,user_xattr,acl,inline_data,active_logs=6 0 0
/mnt/expand/8d28e912-6d8b-4923-a664-13b3c4e5ae5c/media /mnt/runtime/default/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal 0 0
/mnt/expand/8d28e912-6d8b-4923-a664-13b3c4e5ae5c/media /storage/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal 0 0
/mnt/expand/8d28e912-6d8b-4923-a664-13b3c4e5ae5c/media /mnt/runtime/read/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid,default_normal 0 0
/mnt/expand/8d28e912-6d8b-4923-a664-13b3c4e5ae5c/media /mnt/runtime/write/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal 0 0
[Moto G 4G Android Development] sdembiske:
I've highlighted the relevant line for you.

As far as seeing how your SD card is formatted. If you have a card reader put your card in there, slot it in to your laptop and right click on it and select properties - it will give you the format there.

Don't forget the Thanks button, please.
[Moto G 4G Android Development] passtim:
I have finally managed to reinstall all my apps and their settings (I had to do this manually, having no TWRP backup). All is well except I think I have one rather serious issue.

The microphone volume seems very low, making calls almost impossible. It worked OK with the original 16.0 build on this thread, before I installed this most recent build. Is there any chance something has been missed? I haven't found anything much on the web, except mention for one device that some settings were missing from build.prop.

Edit: Apologies, I was wrong. Making calls is fine. What is strange is that when making a recording of my voice (which I had to do for other reasons) using the Recorder app, and also on a video, my voice was almost inaudible. I assumed that this would be true on a phone call, but it was not. So there is still an issue, but a very small one.
[Moto G 4G Android Development] sdembiske:
Try the Mobizen app on Play Store & see if it makes any difference - it may be the android app itself that is the issue.
[Moto G 4G Android Development] passtim:
Thanks. However, suffice to say that I tried to use that for 10 minutes and so far I am totally baffled. Strange circles appearing to the side - very odd. I will have to find some instructions on the web (or a 10 year old, but there aren't any here). :(

Meanwhile, the apps that don't work well are the stock Recorder and Video apps, which are so easy and intuitive to use - they just do what you want with a few key presses. Mobizen seems to want to video the app pages on my mobile screen - I have no idea why - and has a very 'unusual' interface.
[Moto G 4G Android Development] passtim:
I managed to get a recording from Mobizen (a very odd app for my purposes). The sound volume is still very low. I read elsewhere (on https://xdaforums.com/galaxy-s5/general/mic-volume-gain-mod-s5-t3491483/page23) that some people have modified mixer_paths.xml . That post also modifies other volumes, which I don't really want to do. Has anyone else had a problem with the stock video or sound recorder apps volumes with this build? I'm not entirely sure whether the original build on this thread had the same problem - recording is something I rarely do.
[Moto G 4G Android Development] passtim:
I am still trying to get recordings to work from the video camera or sound recorder. In the original [MENTION=7751333]Allstargaurav[/MENTION] build the sound was good. In your latest build it's very quiet from these tools (all built-in ones, no extras), and also very quiet in Mobizen, but OK on calls.

I managed to get as far as looking at mixer_paths.xml in /vendor/etc. The version in your build is the same as the one I used to build my own rom last year using the [MENTION=4977500]sevenrock[/MENTION] build, so I don't think the problem lies there. Given that the hardware is OK (since it works on calls) and given that it worked in the [MENTION=7751333]Allstargaurav[/MENTION] build, something must have changed since then. Have you any ideas or pointers for me?

Has anyone else tested this?
[Moto G 4G Android Development] sdembiske:
Haven't had time to test it myself but ...

try adding the following line that I have emphasized in your mixer_paths.xml file(s):

<path name="audio-record">

<ctl name="AUX PCM SampleRate" value="48000" />

<ctl name="MultiMedia1 Mixer SLIM_0_TX" value="1" />

</path>

I'm working on incorporating a working TWRP compilation into the rom build now but won't be able to start even that until Saturday and will have to troubleshoot it first as a priority.

Let me know if the above addition to the mixer_paths.xml file works to solve the recording volume issue and I'll incorporate it in the builds.
[Moto G 4G Android Development] passtim:
That works. Excellent. Thanks very much indeed. Now on those rare, but sometimes important, occasions when I want to video something with sound, I can again. Things like 'my motorcycle is making a strange sound - what is it?' occasions :)

It's a bit of a strange issue. Looking again at the file I can imagine that this is a bug that's been in that file for ever but previously made no difference. Most of the other entries include a bit rate, but not this one.

Anyhow, thanks again for your time and effort.
[Moto G 4G Android Development] passtim:
I'm building this right now, following your excellent instructions (note that I did have to change directories to the one containing lineageOS_16.0 before the ". build" command). I see you have already added the extra line to mixer_paths.xml - good! I have a few queries.

1. I now realise that I called the roomservice.xml file local_manifest.xml - I assume that won't cause problems.

2. Assuming the build completes OK, do I need to wipe anything, or I can just install over the build you provided? To completely reinstall everything and redo my data takes more than a day, so I'm not going to do that too often (I can't do a nandroid backup because of the twrp encryption problem).

3. Last time I did some builds myself I got into difficulties with signing the builds. Do I need to do anything at all with this build?
[Moto G 4G Android Development] sdembiske:
1. Don't see why it would - I see sevenrock used that - I never have called it that but each to their own, eh?

2) Wipe Cache, Dalvik Cache and System ONLY to keep your data. No guarantees as I first installed clean but should work.

3) I wouldn't think so but if you do, you may have to update/create a new SSH key in your GitHub account.
[Moto G 4G Android Development] passtim:
Thanks. I don't have a github account, so will see what happens if I ever manage to get a build.

However it seems that I cannot get a reliable build on my system, so may have to give up. Every time I try the build fails for a different reason (eg cannot find file, syntax error, etc), but if I start the build again it often completes and says it is OK. I am not, however, sure all is OK when building it in several attempts, and want a single build to work from start to finish. I cannot understand how builds can fail for different reasons every time. A total mystery to me. Is there some unsynchronised multi-processing producing random results? How can that be?

I am building on a USB disc because my system has only fairly small SSDs and doesn't have enough free space (about 140GB seems to be needed). The system isn't that slow, and has 8GB ram and 8 cores.

I have set jack.server.max-service=1, and .bashrc contains

export USE_CCACHE=1

export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xms4G -Xmx4G"

I have 25GB .ccache on SSD.

I guess I will have to hope that people like you produce occasional new builds.
[Moto G 4G Android Development] sdembiske:
I just completed a build last night with no issues whatsoever, so not sure where your problem is arising.

May not want to hear this but my suggestion would be to delete all the files in your repo and start again, re-initializing and re-syncing everything, following my build post directions. Very possible a corruption has developed somewhere along the line in your repo.

Things to try:

The 8g ram you have may present some issues as LineageOS 16.0 is very ram demanding to build so try increasing to 8G -Xms and -Xmx in the export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xms4G -Xmx4G"[/I line.

If you have a swap file (you should have at least 8G), I would also consider using zswap as well with it.

Before building each time, make sure you are running 'make clobber' or 'make clean'.

You would normally not be able to build the rom at all if you didn't have enough space.
[Moto G 4G Android Development] passtim:
I can't see how corruption could cause varying results, but before I got your reply I had already cleared out and started again. I shall see how it goes. have an 8G swap, and will try both the Xms8G, Xmx8G and zswap if this fails, but I can't see how a lack of space can cause the sorts of error message I have received. I do also sometimes get overheating and what appear to be 'panic' restarts occasionally, which doesn't help.

When a build failed, restarting the build without a clobber or clean seemed to complete OK, but there's no way I'm testing the result on my mobile :)

In your previous reply you mentioned having a github account, and I responded that I didn't have one. That's not quite right, of course, in the sense of an account I can log onto and, for instance, raise issues, which I do from time to time. When doing the initial sync github also seems to recognise me. I'm not sure how that helps with the keys, but I freely admit I don't really understand quite a bit of this stuff! I shall try to investigate further.
[Moto G 4G Android Development] passtim:
Thanks. I now have a build that went through without problems. I managed to find enough space on an SSD, and increase the JACK to Xms6G and Xmx6G.

Having backup up System and Boot, I can't backup the rest easily because of the TWRP issues.

Do I need to try to sign this, or just install it as is? I do now have an SSH key with github, but I don't know what part that could play in signing the build, if that is necessary.

To install this build over yours, including the same gapps and magisk, do I really need to wipe system or not? I guess that if I do I will lose several settings, although I don't know for sure. If I used the ota version of the build would that help?
[Moto G 4G Android Development] sdembiske:
For those of you wishing to update to the FEBRUARY '20 Security Patches, I've uploaded one of my unofficial builds that is based off the latest build files available with the most recent security patches added (I know there are a number of members who for one reason or another are unable to or unwilling to build it themselves). I have been reviewing and testing these patches in LineageOS Gerrit for LineageOS 14.1 (Moto G LTE Peregrine) and LineageOS 15.1 (LG G4) when they're posted before they are merged and will be doing the same from this point on for LineageOS 16.0, before uploading for your personal use.

Note

: Requires

Full Clean Flash

when installing rom for 1st time - in TWRP wipe Cache, Dalvik cache, System and importantly

format

Data > Yes before flashing the appropriate Open Gapps (pico Jan. 17th '20, for now - the latest uploads have been presenting problems with Pie) - reboot, then in TWRP install preferred root (latest Magisk version recommended). I do not recommend the Xposed framework that's available for pie as it is closed-source).

Note

: Encryption is not working fully - If you need it check out the 14.1 rom - it is fully up to date in my latest uploads there.

Very Important

: Do a nandroid backup first, including your data - copy any data/media files (e.g., photos, videos etc.), on your SD card over to your PC.

If you're coming from one of the unofficial updates I uploaded previously, I recommend you do a regular clean flash (wipe Cache, Dalvik cache & System), re-install Open Gapps & preferred root (latest Magisk recommended). I do not recommend the Xposed framework that's available for pie as it is closed-source, i.e., you really don't know what you're installing).

Download Link for lineage-16.0-20200131-UNOFFICIAL-peregrine.zip

Link

: https://mega.nz/#!sShxET4T!YB76SGZRDTMQJM1E6i6TPB5NtTUGdXnNJIuDdO9diMg

I give full credit to the author of this thread [MENTION=7751333]Allstargaurav[/MENTION] and in particular to [MENTION=4977500]sevenrock[/MENTION] and [MENTION=7344859]RenanQueiroz[/MENTION] for their excellent work in getting this rom to this point. Those of you who have not been building this rom for themselves but using the last posted upload by the author of this thread will notice some substantial improvements and should be very pleased with how it performs now. After flashing let the rom settle in for a number of hours to start to see the improvements and reap the full benefit.

I do, however, recommend you learn to build it yourselves: refer to post # 230 for the full build instructions.

---------- Post added at 04:47 PM ---------- Previous post was at 04:31 PM ----------

Shouldn't need to sign anything if you created your SSH key before building it. If you didn't you would have had the signing issue come up when building it.

Yes, you should wipe 'system', to clean out the last install. It is the recommended course of action for problem free installation to and operation of the phone. I wouldn't have suggested it if I didn't think it wasn't necessary. You shouldn't lose any settings - at least I never have.
[Moto G 4G Android Development] passtim:
Sorry for asking you a second time - I should have known it would be OK. The build I did went through OK. I wiped both caches and system, installed my new build, magisk and gapps (all in one go) and all is well. No settings were lost, including magisk settings, even though when reinstalling the system magisk complained quite a lot.
[Moto G 4G Android Development] key-ancel:
With the February and January compilation, the Netflix application does not open, he says, This app is not compatible with your device. (No root user)
[Moto G 4G Android Development] shokmah:
flashed it x opengapps pico x latest magisk...unfortunately got random reboot every few hours maybe...however my screen is broken so I do everything from adb and scrcpy dunno if this play a part in that.

as I want to repurpose it as a home hosted web server I would need more stability.
[Moto G 4G Android Development] sdembiske:
Not had the problem myself, nor has it been reported by other members.

Did you do a full clean flash if you installed for first time? If not, do it - it is recommended in the post that has the rom upload link. You should also ...

Note

: appropriate Open Gapps (pico Jan. 17th '20, for now - the

latest uploads have been presenting problems with Pie
[Moto G 4G Android Development] shokmah:
did so, as coming from identity crisis but I'll try again

I tried first to install nano package but got error in TWRP. as I only have enough working screen/digitizer to see/touch the adb sideload button I don't really see the verbose output.

at the end I'll run it eventually without gapps so I'll keep you updated about the outcome
[Moto G 4G Android Development] Libor1:
I've noticed some random reboots too on my Peregrine, clean flash with format memory:yes, pico gapps as recommended from 17.1. + Magisk.
[Moto G 4G Android Development] Lighto97:
i tried this last version but was not aware of this latest gapps issue, my phone was suddenly rebooting sometimes and because of that i went back to lineage 14.1, still the higher battery consumption bothers me. So, to fix this random rebooting i have to use the right version of gapps then?
[Moto G 4G Android Development] sdembiske:
For those of you wishing to update to the MARCH '20 Security Patches, I've uploaded one of my unofficial builds that is based off the latest build files available with the most recent security patches added (I know there are a number of members who for one reason or another are unable to or unwilling to build it themselves). I have been reviewing and testing these patches in LineageOS Gerrit for LineageOS 14.1 (Moto G LTE Peregrine) and LineageOS 15.1 (LG G4) when they're posted before they are merged and will be doing the same from this point on for LineageOS 16.0, before uploading for your personal use.

Note

: Requires

Full Clean Flash

when installing rom for 1st time - in TWRP wipe Cache, Dalvik cache, System and importantly

format

Data > Yes before flashing the appropriate Open Gapps (pico Jan. 17th '20, for now - the latest uploads have been presenting problems with Pie) - reboot, then in TWRP install preferred root (latest Magisk version recommended). I do not recommend the Xposed framework that's available for pie as it is closed-source).

Very Important

: Do a nandroid backup first, including your data - copy any data/media files (e.g., photos, videos etc.), on your SD card over to your PC.

Note

: Encryption is not working fully - If you need it, check out the 14.1 rom - it is fully up to date in my latest uploads there.

If you're coming from one of the unofficial updates I uploaded previously, I recommend you do a regular clean flash (wipe Cache, Dalvik cache & System), re-install Open Gapps & preferred root (latest Magisk recommended). I do not recommend the Xposed framework that's available for pie as it is closed-source, i.e., you really don't know what you're installing).

Download Link for lineage-16.0-20200306-UNOFFICIAL-peregrine.zip

Link

: ] https://mega.nz/#!MSIFyAYL!Ebjp5EyEoeoDQL0c6tsxcrKmJhK2-0uxQ7ob_jOLk-E

I give full credit to the author of this thread [MENTION=7751333]Allstargaurav[/MENTION] and in particular to [MENTION=4977500]sevenrock[/MENTION] and [MENTION=7344859]RenanQueiroz[/MENTION] for their excellent work in getting this rom to this point. Those of you who have not been building this rom for themselves but using the last posted upload by the author of this thread will notice some substantial improvements and should be very pleased with how it performs now. After flashing let the rom settle in for a number of hours to start to see the improvements and reap the full benefit.

I do, however, recommend you learn to build it yourselves: refer to post # 230 for the full build instructions.
[Moto G 4G Android Development] passtim:
In February I built this myself, following your instructions, including your version of the manifest (the motorola repos). I was surprised (and pleased) that by doing this I got the February updates. With apologies for being a bit dim, but am I correct in thinking that I don't need to try to pick and choose updates myself when using your instructions?
[Moto G 4G Android Development] sdembiske:
Yes, as a rule, but, if you were to repo sync now for example, you would most likely find that you do not have the March security patches yet. The reason for this is they haven't been merged in yet from LineageOS gerrit where the coding is reviewed and verified. As a very general rule, you should be OK to repo sync and get the patches around the 15th of the month, but, it can be earlier or later. As I indicated, I test and review these patches in Gerrit before uploading the rom. Other updates could be pushed through (i.e., merged in) by the LineageOS maintainers at any point after they are reviewed and verified.

So, the short answer is no, you do not have to try and pick and choose updates yourself at this point. However, if there are bugs to overcome as the rom is still being developed and worked on, then yes, sometimes it is necessary. The problem is in finding the right patches to cherry pick and adapt.
[Moto G 4G Android Development] passtim:
Thanks. I did look at the patch date in build/core/version_defaults.mk , and it states "PLATFORM_SECURITY_PATCH := 2020-03-05". Does this not necessarily imply that the patches have been applied?