yashsingh1/xdaforums huggingface dataset:
[Moto G 4G Android Development] IronTechmonkey:
Thanks for the information.

In regards to memory performance, through much testing of the camera while watching memory in Peregrine and Osprey (almost identically configured) it seems to be the camera app that is at the center of perceived RAM issues (at least in my usage). On both devices there are some things running in the background (Afwall, Tasker, Nova Launcher) but otherwise the device is particularly inert with no app, data media, account synchronization or other such activity. I can run many apps at once with no problem, however; even with no other apps running just taking a regular picture with the camera on Osprey will kill multiple apps and services. On Peregrine this only occurs with Panoramic pictures. I suppose that difference could be partly explained by the fact that Osprey's camera is capable of much higher quality images which it would then have to handle with the same amount of memory, but on both devices the disruption caused by the native camera seems disproportionately severe. No other app causes this, even some that might be memory hogs. Also, Motorola Camera 5.1.13.12 causes no such issues. I'm hoping that this is not a case where the newer devices have caused a universal and significant ROM component to out-pace a large # of lower memory devices. I'd be using the Moto camera exclusively if it could save to external SD. In any event I'll test these at next build before installing apps.

[EDIT] There is a very good mathematical explanation of the camera RAM requirements, in one of Gabriele's notes in the Jira ticket https://jira.lineageos.org/browse/BUGBASH-326.
[Moto G 4G Android Development] Tenchu:
Battery and memory

Hi for all.

I would like the opinion on memory and battery. I read in some posts about not using apps like greenify and let android manage itself. I also saw some init.d scripts to optimize RAM or use L Speed. Should I use any of these? If so, in the case of init.d would it have any?

Thank you for your help.
[Moto G 4G Android Development] IronTechmonkey:
The benefits and disadvantages of Greenify is a topic large enough to be worth some research outside of a ROM development thread where there may be a bias against it but in short (and as I see it)....

Greenify may allow a device to "run" more apps at once but this comes at the expense of extra CPU cycles and read/write activity as apps are greenified/un-greenified while the device is being used. This is somewhat counter to the way that Android was intended to manage apps and memory. Whether or not Greenify is effective and whether or not it has a noticeable impact on battery may vary from case to case. That all being said, for the purpose of ROM bug testing, Greenify and other such apps should be excluded because they prevent us from seeing how the OS its self manages apps and memory.
[Moto G 4G Android Development] Tenchu:
First of all thank you IronTechmonkey. And about init.d scripts, could I use some to help in memory, similar to the above?

Thanks again.
[Moto G 4G Android Development] IronTechmonkey:
I dont play with init.d scripts, and would defer to [MENTION=6147790]Pupet_Master[/MENTION] and others about this.
[Moto G 4G Android Development] Pupet_Master:
What exactly do you need help with the memory.

Setup virtual memory or the OOM settings?

I may help you with that sure, even though those scripts i don't apply at the init.d (i setup those on boot with kernel auditor)
[Moto G 4G Android Development] Tenchu:
Okay, this is great. I cited init.d for lack of knowledge but the goal is to try to leave more responsive, either by increasing virtual memory or some other information you recommend. I believe I can start by testing the settings that you use in the kernel auditor.

Do you use the default kernel or another one?

Thank you very much for help.
[Moto G 4G Android Development] Pupet_Master:
Ok, my setting (for my use) is very smooth. How ever, i do greenify every single app i can (even some system ones). So idk if it will work for you or not.

I'm using the Valkire Kernel, how ever those settings that i'll send to you, you can use in any kernel (even stock).

-Download "Kernel Auditor" from the "Play Store" and open it

-Once inside, Swipe from left to right to show the side menu.

-Tap on "Low Memory Killer"

-Change to these custom settings:

Foreground Applications: 29mb
Visible applications: 61mb
Secondary Server: 157mb
Hidden Applications 227mb
Content Providers: 87mb
Empty Applications 191mb

-Swipe from left to right again and tap at the option "Virtual Memory"

-Change those settings from there:

dirty_ratio: 20
dirty_background_ratio: 5
dirty_expire_centisecs: 100
dirty_writeback_centisecs: 300
min_free_kbytes: 4096
oom_kill_allocating_task: 1
overcommit_ratio: 100
swappiness: 100
vsf_cache_pressure: 53
laptop_mode: 0
extra_free_kbytes: 24576
Z-RAM Disksize: 470mb

-Swipe from left to right again and tap at the "Profile" section

-Click at the "+" button and save the current settings on a new profile

-Holdon the new profile and choose the option "apply on boot"
[Moto G 4G Android Development] mrLoma:
TBH I stopped using greenify since I moved away from the stock rom, my phone is responsive enough for me.

I always have around 100MB Ram free which is more than most apps use.

I do use some management myself.

-Apps I use a lot I minimise using the circle.

This will keep the active state of the app in memory of possible and allow it to open instantly (when not pushed out of memory by something else)

-Apps that I don't want to keep running, but use from time to time I close using the triangle button.

This will shutdown the app but leave the data in memory until the memory is needed for something else. For example Gmail opens in about a second.

-Apps I don't plan on using for a while. I remove them from the recent apps. Square button and swipe the app away.

This will close the app and clear the apps' data from memory.

Gmail takes a bit less than 2 sec to start up.

What you can also do is check memory usage of apps you don't want to run in the background, that do run in the background anyhow.

Remove the background rights from permission settings.

Of course greenify can be set up to do the kill app thing automatically if you set it up correctly.
[Moto G 4G Android Development] Tenchu:
Ok guys, thanks you for help and share the information. I will apply the recommendations for testing.

Thank's again
[Moto G 4G Android Development] Pupet_Master:
I understand your point. How ever as (for me) 1GB is very low of a memory (and the phone performance get bad on my experience with less than 200mbfree) i like to use it.. As i usualy have around 400mb to 330mb free.

I too hate the idea of background services open and running (even whatsapp i want to recive my messages only when i open it).

So i think i'm an exception case :P

---------- Post added at 16:12 ---------- Previous post was at 16:11 ----------

Cool, share the results with us once you have ;)
[Moto G 4G Android Development] IronTechmonkey:
Same here although in my usage case Peregrine is doing OK (no apps being killed other than when taking pano pictures), while 1GB Osprey with same configuration has less free memory when idle, resulting in apps being killed any time a high memory app is used.

That being said,It sure does seem like RAM management could be better in general in LOS14.1 for these 1GB devices, and the default camera just does not work well on 1GB devices. In a clean flash of April 20 ROM with open gapps pico and no other apps on Osprey, just taking a regular photo caused a few dozen apps/services to be killed (logged). The lower specs of the Peregrine camera make it more resilient under those circumstances, and my Peregrine is up next for flash.

One other factor worth noting in re monitoring RAM usage: I'm finding that many popular system info apps such as System Monitor Lite and SysInfo2 seem to mis-report available memory (maybe not accounting for the memory that they themselves use which is a lot?)."System Info Lite" may report 150MB-200MB free while Simple System Monitor shows 300MB free. I'm not sure what to believe, and the 3 hour average reported by the native system is not necessarily helpful when you want to see how much free RAM there was when an issue occurred.

Of course, through all of this I am speaking to clean flash without modifications ;)
[Moto G 4G Android Development] Pupet_Master:
Yea, the truth is, 1GB is just too low now days, sadly.
[Moto G 4G Android Development] IronTechmonkey:
IMO it should not be. CM12.1 has no such problems with the same apps, configuration and usage patterns on the same devices. What I've seen while testing and logging with only ROM and Gapps (before installing any apps) indicates that it's not just the apps. I'm a bit tempted to test a build with SuperSU to see if that is a factor (although I'd prefer not to submit bug reports from that arrangement).
[Moto G 4G Android Development] Pupet_Master:
Idk, my daily driver at this device is actually CM12, as i'm waiting for xposed for N.

I face the same problems at CM12.

But Lineage doesen't have the same rythim as CM had, so i think i understand what you mean. It is taking longer to mature as what we were used to
[Moto G 4G Android Development] IronTechmonkey:
Good point. I jumped into LOS14.1 much earlier in it's arc than I did with CM12.1.
[Moto G 4G Android Development] Pupet_Master:
Yea, i don't blame you. After all if it isn't for ppl as you (and i except for a small reason) they wont get the support to keep it going ;)

The only reason i didn't jump in to LOS14.1 is Xposed, that i am VERY dependent of. Or else i would too haha
[Moto G 4G Android Development] Tenchu:
Ola Pupet_Master, I'm enjoying the result of the settings. By way of knowledge, could you indicate how to learn about these "magic numbers" from the suggested configuration. I've been looking at some articles on configuring and optimizing linux kernels ...

Thank's a lot.
[Moto G 4G Android Development] Pupet_Master:
Well, it is very hard to learn (at least for how i learned my self).

First of, you need to have a very good english (mine is OK just, that make things more dificult). The other step is to not research about kernel optmizating, but google each "command" that you would like to tweak and read what it do as well of people settings to find patterns (it will have android users settings, servers admins settings the most, desktop users, etc).

The other stepp is to find a device that run very smooth as a base. I have an LG device that is a MTK single core CPU with just 512mb or RAM and i say, that device is smooth and well optmized! In many aspects even more than the Moto G first gen that we have. So i copy or adapted much of it virtual memory setting (but not all, as the research show other interesting settings that i ended up using).

And last is to just set it and try. Feel the result and keep going. It took me close to one year to reach that result
[Moto G 4G Android Development] IronTechmonkey:
April 20 Build

LOS/CM device threads for previous versions of the ROM or devices no longer being supported would naturally turn towards optimizations and tweaks (and this thread is not overly busy), however LOS 14.1 development for Peregrine is active and getting attentive support at LOS Jira. ;)

As to LOS14.11 Peregrine April 20 build, with Open Gapps Pico Apri 20 and LOS SU on Peregrine model XT1045; This week's (well almost last week's by now) bug roundup:

com.android.phone FC when leaving voicemail sound settings.

https://jira.lineageos.org/browse/BUGBASH-315

Confirmed persists in April 20 Peregrine and Osprey builds, noted at LOS Jira.

Increasing system fonts size pushes countdown timer backspace button off screen

https://jira.lineageos.org/browse/BUGBASH-300

Confirmed persists in April 20 Peregrine and Osprey builds, noted at LOS Jira.

Camera (and more) FC when attempting to take panoramic picture.

https://jira.lineageos.org/browse/BUGBASH-326

I captured several logs of the camera taking pictures in various states of ROM (only ROM/gapps, ROM/Gapps/my apps, etc) and found only a few instances of minor app killing, none of which disrupted user apps. That being said I did see an FC while rendering a panoramic pic but that is not one of the 6 logs captured (LOL - Murphy's law of logging?). I'll try to reproduce that rendering FC while logging and add to Jira ticket.

Also, In general I see a divergence between Peregrine and Osprey in re camera, where Peregrine seems OK except for the rendering FC, while Osprey kills dozens of apps services any time the camera (or any of several other apps) are opened, which becomes clearer as a separate and more significant device specific issue (and which I'm trying to shape into a viable report for a new ticket).
[Moto G 4G Android Development] IronTechmonkey:
Live Display not invoking night mode when set to Auto

An existing bug I've been watching because I saw a precursor to it in both Osprey and Peregrine, and which finally evidenced itself in Peregrine. Stealing directly from one of my notes in this already existing Jira ticket: https://jira.lineageos.org/browse/BUGBASH-226

"Non device specific possible bug where Live Display does not automatically invoke night mode. From this ticket

Peregrine April 20 build w/Open Gapps Pico and LOS SU:

Through clean flashing latest weekly upon release for several weeks in a row I did not see this occur on Peregrine until two days ago when night mode did not invoke until Airplane mode was enabled. This happened again tonight and this time seemed to require toggling Airplane mode and WiFi to invoke night settings (without forcing night mode in Live Display settings).

Perhaps not related, but just in case...I have seen several instances when flashing LOS 14.1 on Peregrine or Osprey where night mode is invoked through first boot configuration during daytime hours until device has time to go on line and is rebooted after which the Auto setting seems to work... until the incident described above.

This is occurring in GMT-5 (EST) time zone and the fact that I dont use Google's locations services (as much as I can avoid doing so without applying hacks) has me wondering about relevance of latest GPS device only fix as a factor.

[EDIT] Counter to my hypothesis (which was that a device only GPS fix might temporarily rectify this on the device where it was failing) after getting a device only GPS fix on both Osprey and Peregrine both devices were failing to apply night mode automatically until after a reboot."
[Moto G 4G Android Development] MirmiX:
In the main guide, i think you guys have to add the lollipop fw requirement. If you start from the kitkat official firmware, you'll firstly get stuck for the bootloader version and secondly you could encounter the modem bug (sim not detected). I had to manually flash back the official kk fw, than the official lp fw and the modem zip, and finally the los nightly to have everithing working.

p.s. if you are going to factory reset your phone (data part wipe), this los nightly has a bug (encountered on 2 different device, a moto g and a zenfone 2) in the first configuration wizard that will crash and you'll get stuck there. So download a previous nightly for the first configuration, than update manually or via ota to the last nightly (if you absolutely need to have the last version).
[Moto G 4G Android Development] IronTechmonkey:
I'm not sure which main guide you are referring to. It might be a good idea to contact the source that produced it and let them know, but perhaps first provide a link to it here so we have a reference point.

As to the issues you had with the factory reset, I think that may have been situation or process specific, and or related to the jump from stock KitKat to LOS Nougat. I’ve had no problem clean flashing the April 20 build on Peregrine and Osprey several times including when the devices had been on April 13th build, and when the devices had been on April 20th build, and once just now on Peregrine in response to your post. This is my clean flash process (which has worked reliably between CM12.1, CM13, and LOS14.1 since the bootloader was updated and the device was taken off stock):

- Boot to latest TWRP recovery.

- Wipe dalvik and system caches (this step may be optional, but I always do this).

- Full wipe “Factory reset”.

- Flash ROM, Gapps, LOS SU package (if SU is used) in same TWRP session.

- Wipe dalvik and system caches.

- Reboot to system.

I would think that if this were universal a bug in the April 20 build (apart from the growing pains of the jump from Stock/KK to LOS/N) there would be reports about it here (or in the Osprey and Otus threads which I also read), or in the LineageOS Jira bug tracking system.

That all being said, your reminder about the bootloader, modem and the extra steps required when coming from stock Kit Kat is good for people in that situation to know/remember. Such things are often required when making that jump, but once you are on LOS14.1 you should not have such issues when clean flashing next build or other similar ROMs.
[Moto G 4G Android Development] Rajaasim1980:
Can you give me link of which CM 12 you are using as there are many official and non official

I am looking stable daily driver custom ROM with no bugs
[Moto G 4G Android Development] Pupet_Master:
Here it is

http://www.datafilehost.com/d/fcba1175
[Moto G 4G Android Development] MirmiX:
With main guide i meant the first post of the thread.

I think (as i've seen for other devices official los thread) thtat it's important to give that information.

That's exactly the same clean install process i use to do.

I encountered the problem only with this nigthly on 2 different devices. Even with a couple of attempt per device. Doing the same process with a previous nightly (on both devices) resolved the issue. I haven't checked official bug report channel tbh.
[Moto G 4G Android Development] lixxus:
Hi All,

Gps doesnt seem to work. I did a clean install and followed instructions as on lineage wiki .

is this a known issue ?

---------- Post added at 10:33 PM ---------- Previous post was at 10:12 PM ----------

nvm, i downloaded latest official rom and extracted non-hlos and msg and done the following.

Use the following fastboot commands:

fastboot flash modem NON-HLOS.bin

fastboot erase modemst1

fastboot erase modemst2

fastboot flash fsg fsg.mbn

its all working now, just incase someone else runs into similar problem
[Moto G 4G Android Development] 239:
Works fine for me, only the gyroscope is still inaccurate.

Which location mode (high accuracy / device only) do you use?
[Moto G 4G Android Development] mrLoma:
I think this has to do with the crazy resolution and max range values of the gyro. This isn't visible in Aida but shows up in "sensors test" or"sensors multitool".

I should make a jira ticket for it, I'll see if I can make some time for it this weekend.
[Moto G 4G Android Development] mrLoma:
Does anyone else sometimes have chrome totally flipping out like this?

It's like 1 tab that totally memory corrupted or something.

The only fix I found so far is closing that tab and making a new one. Refreshing or going back and doing the same search results in the same garble.
[Moto G 4G Android Development] mrLoma:
Ok I posted my gyro jira

https://jira.lineageos.org/browse/BUGBASH-520

Hope I filled it in correctly
[Moto G 4G Android Development] krishnamn:
encryption?

will encryption be enabled in feature builds?
[Moto G 4G Android Development] sevenrock:
Encryption already works
[Moto G 4G Android Development] krishnamn:
any peerticular gapps to be used for that?
[Moto G 4G Android Development] sevenrock:
no
[Moto G 4G Android Development] jaddle:
I finally got around to upgrading this - I was running an ancient CM before. I installed the May 4 nightly, and thought I'd share my impressions:

First of all, everything seems much snappier, which I'm very happy about. On the negative side though, I had some troubles getting root to work - I know it's not included in lineage automatically, so I flashed addonsu-arm-signed.zip, but it didn't seem to work. The options for root showed up in the developer options, and I could run su in a shell, but never actually got any root privileges. Maybe I did something wrong, or maybe things are just in transition..? In any case, I flashed the supersu zip and it worked right away, so I'm not complaining.

The other thing is that before upgrading, I'd been seeing a lot of browser crashes, and I expected this would fix it, but it still crashes a lot. I haven't seen anyone else complaining about that though, so maybe it's something specific to my phone for some reason. I've cleared the browser data, but maybe if I have time, I'll try a clean install of everything to see if it still crashes.

Overall, things seem to work as well or better than what I had before, so I'm happy!
[Moto G 4G Android Development] IronTechmonkey:
Nice report!. I grabbed a copy of that PDF. :)
[Moto G 4G Android Development] 239:
Gyroscope was fixed with 20170504 and I can confirm that it's finally working on 20170511.

Thanks to mrLoma for the report!
[Moto G 4G Android Development] mrLoma:
No problem. I was hoping it would fix the compass that keeps going to unreliable state in skymap, but that is still happening. It was a stretch, I know. Since they aren't really the same thing.

But the values in testing Apps look good now.

I thought it still had a lot of noise. But if I compare it to my tablet it's very similar. The tablet does do less than half the amount of polls ?.

Thanks to Gabrielle M for fixing it.
[Moto G 4G Android Development] IronTechmonkey:
It was still reasonable enough to associate the two things. Thanks to you and G it becomes clear that they're separate, which for me is more reassurance that the Herewego calibration routine is just broken and that the sensor is OK.

These app hardware relationships can be quirky, and a good example of this coincidentally comes from Peregrine: In Android app "IP Webcam" at 15fps the video is disproportionately dark on Peregrine but is fine at 15fps on Osprey or Otus. With fps set to 16 on Peregrine it was OK (tested in CM12.1 and LOS14.1 on all 3 devices). IMO this speaks to some direct relationship between the "IP Webcam" app and the Peregrine hardware (or less likely, a legacy in the OS).

In regards to sensors; all things considered, including your experience, I'm thinking of reporting the calibration issue to Herewego. Thanks again.
[Moto G 4G Android Development] Esseku:
Heyyy, how can i get pixel launcher to work on the latest releases? since the 7.1.2 i cant find the pixel launcher on the store.
[Moto G 4G Android Development] mrLoma:
I used gapps aroma to install pixel launcher. It also allows you to activate the Google assistent, though I haven't really used it yet.
[Moto G 4G Android Development] 239:
I did a direct comparison with the S3 (also running latest LOS) and noticed some discrepancies (see attachment, S3 on the right).

Gyroscope: It looks like the y and z ranges are too high.

Orientation: Roll swings around incorrectly multiple times.

While I think that the gyroscope values are probably close enough, the orientation quirks are clearly not.

After also comparing the Sky Map diagnostics I think that it might be the reason why the compass loses its accuracy again and again.
[Moto G 4G Android Development] Makis71:
Hi there all,

after following the thread for around a month, I clean flashed the latest build 14.1-20170511. Came from CM 12.1 lollipop.

Well, no expert with development, haven't had any crashes or fc's, runs smoother than previous ROM. Happy so far.

Some 'cosmetic' questions:

any way to avoid second alarm clock icon on notification bar everytime you set an alarm? In lollipop there was an option "show alarm" in clock and cLock settings (which I can't find anywhere in this rom).

One more thing: If you turn on the screen while charging, you have to manually turn it off. It dims but doesn't turn off. Is it some setting option or a new Lineage/Nougat function?

Keep up the good work all of you!

Thanks in advance.