What is fsync - Asus Transformer TF700

What is fsync

crazyboyxx said:
What is fsync
Click to expand...
Click to collapse
It's a system call in Unix/Linux. "man fsync" says:
fsync() transfers ("flushes") all modified in-core data of (i.e., modified buffer cache pages for) the file referred to by the file descriptor fd to the disk device (or other permanent storage device) so that all changed information can be retrieved even after the system crashed or was rebooted. This includes writing through or flushing a disk cache if present. The call blocks until the device reports that the transfer has completed. It also flushes metadata information associated with the file (see stat(2)).
Click to expand...
Click to collapse
So it's something embedded in programs after a related set of write operations to ensure that all data has been written to the storage device. The bolded part is what makes it interesting for some to disable it - "The call blocks" means the calling program waits until it's finished, and this may create lag. The downside is that if the system crashes, the data on the storage devices may be inconsistent, and you may lose data.

_that said:
It's a system call in Unix/Linux. "man fsync" says:
So it's something embedded in programs after a related set of write operations to ensure that all data has been written to the storage device. The bolded part is what makes it interesting for some to disable it - "The call blocks" means the calling program waits until it's finished, and this may create lag. The downside is that if the system crashes, the data on the storage devices may be inconsistent, and you may lose data.
Click to expand...
Click to collapse
Thanks :good:

What kind of data may be lost when fsync is disabled? could you please give an example? may it cause a serious damage to the phone's system?

your_login said:
What kind of data may be lost when fsync is disabled? could you please give an example? may it cause a serious damage to the phone's system?
Click to expand...
Click to collapse
All data that any app thinks it has written to storage (as it explicitly instructed the OS to do so), but has not been written yet by the OS, may be lost in case of an unexpected system crash.
So as long as the system is running normally, all cached data is eventually written to the eMMC/SD, usually a few seconds after the write request, and everything works normally.
In case of a random reboot, or a "hard" system hang which requires you to power off and restart, or if you run out of battery, AND some app or background service wanted to write something to the file system just before that crash, such cached data is lost.
So what can happen? No hardware is damaged. In the absolutely worst case, the filesystem on your data partition is irrecoverably damaged and you have to do a factory reset, losing all your apps and your data, photos etc. (you do have a backup, don't you?). The chance for this worst case to happen is extremely low - in most cases the filesystem is automatically repaired at startup, and the incompletely written files are simply deleted. If this does not work for some reason, you can still manually try running fsck from the recovery.
If some system service just updated a database before the crash, it may be inconsistent after restarting. This can lead to malfunction of that service, e.g. FCs, missing info in your calendar, missing or garbled media files, etc.
So in summary - as long as the system is stable, disabling fsync only increases performance. By the way, app crashes (FC, ANR, ...) do not hurt here, only complete system crashes are bad.

_that said:
All data that any app thinks it has written to storage (as it explicitly instructed the OS to do so), but has not been written yet by the OS, may be lost in case of an unexpected system crash.
So as long as the system is running normally, all cached data is eventually written to the eMMC/SD, usually a few seconds after the write request, and everything works normally.
In case of a random reboot, or a "hard" system hang which requires you to power off and restart, or if you run out of battery, AND some app or background service wanted to write something to the file system just before that crash, such cached data is lost.
So what can happen? No hardware is damaged. In the absolutely worst case, the filesystem on your data partition is irrecoverably damaged and you have to do a factory reset, losing all your apps and your data, photos etc. (you do have a backup, don't you?). The chance for this worst case to happen is extremely low - in most cases the filesystem is automatically repaired at startup, and the incompletely written files are simply deleted. If this does not work for some reason, you can still manually try running fsck from the recovery.
If some system service just updated a database before the crash, it may be inconsistent after restarting. This can lead to malfunction of that service, e.g. FCs, missing info in your calendar, missing or garbled media files, etc.
So in summary - as long as the system is stable, disabling fsync only increases performance. By the way, app crashes (FC, ANR, ...) do not hurt here, only complete system crashes are bad.
Click to expand...
Click to collapse
What about RRs [Random Reboots] ??

alizafar said:
What about RRs [Random Reboots] ??
Click to expand...
Click to collapse
Obviously, the same considerations apply as with a "hard" system hang -- the only difference being that the system reboots itself instead of you pressing the button.
EDIT: I thought it was a strange question (due to the answer being so obvious),, but then I read _that's answer and he even explicitly stated it in his reply. Please read a reply, he didn't formulate so nicely and eloquently to have you read only 4% of what he wrote. :S

_that said:
All data that any app thinks it has written to storage (as it explicitly instructed the OS to do so), but has not been written yet by the OS, may be lost in case of an unexpected system crash.
So as long as the system is running normally, all cached data is eventually written to the eMMC/SD, usually a few seconds after the write request, and everything works normally.
In case of a random reboot, or a "hard" system hang which requires you to power off and restart, or if you run out of battery, AND some app or background service wanted to write something to the file system just before that crash, such cached data is lost.
So what can happen? No hardware is damaged. In the absolutely worst case, the filesystem on your data partition is irrecoverably damaged and you have to do a factory reset, losing all your apps and your data, photos etc. (you do have a backup, don't you?). The chance for this worst case to happen is extremely low - in most cases the filesystem is automatically repaired at startup, and the incompletely written files are simply deleted. If this does not work for some reason, you can still manually try running fsck from the recovery.
If some system service just updated a database before the crash, it may be inconsistent after restarting. This can lead to malfunction of that service, e.g. FCs, missing info in your calendar, missing or garbled media files, etc.
So in summary - as long as the system is stable, disabling fsync only increases performance. By the way, app crashes (FC, ANR, ...) do not hurt here, only complete system crashes are bad.
Click to expand...
Click to collapse
How would having fsync enabled help save data in case of a system crash? I mean, its unexpected and can interrupt the block call verification anyway, no? I'm assuming that without fsync you go for longer without "notifying" the OS about the changes in your data. So is it possible to change the fsync intervals so it doesn't happen constantly and cause lag, but happens frequently enough so that nothing extremely bad happens if the battery runs out or I get a random reboot? Or is that not how it works?

_that said:
All data that any app thinks it has written to storage (as it explicitly instructed the OS to do so), but has not been written yet by the OS, may be lost in case of an unexpected system crash.
So as long as the system is running normally, all cached data is eventually written to the eMMC/SD, usually a few seconds after the write request, and everything works normally.
In case of a random reboot, or a "hard" system hang which requires you to power off and restart, or if you run out of battery, AND some app or background service wanted to write something to the file system just before that crash, such cached data is lost.
So what can happen? No hardware is damaged. In the absolutely worst case, the filesystem on your data partition is irrecoverably damaged and you have to do a factory reset, losing all your apps and your data, photos etc. (you do have a backup, don't you?). The chance for this worst case to happen is extremely low - in most cases the filesystem is automatically repaired at startup, and the incompletely written files are simply deleted. If this does not work for some reason, you can still manually try running fsck from the recovery.
If some system service just updated a database before the crash, it may be inconsistent after restarting. This can lead to malfunction of that service, e.g. FCs, missing info in your calendar, missing or garbled media files, etc.
So in summary - as long as the system is stable, disabling fsync only increases performance. By the way, app crashes (FC, ANR, ...) do not hurt here, only complete system crashes are bad.
Click to expand...
Click to collapse
Long press back kill apps shouldn't be used if dynamic fsync is disabled?

yavu said:
Long press back kill apps shouldn't be used if dynamic fsync is disabled?
Click to expand...
Click to collapse
I don't know what you mean, but I thought I had already made it clear that the only situation where disabled fsync can cause problems is in case of unexpected whole system hangs, shutdowns and reboots.

_that said:
I don't know what you mean, but I thought I had already made it clear that the only situation where disabled fsync can cause problems is in case of unexpected whole system hangs, shutdowns and reboots.
Click to expand...
Click to collapse
I think his question is, can he corrupt an app or i's data if he kills it with either a task killer or with a shortcut setup as a task killer. Based on your response, the answer (correct me if I'm wrong) is the only thing that could possibly be affected with a disabled fsync is the app that was killed - which isn't a big deal because it does not fall into your catastrophic loss category of RR, Hard shut, etc. where your system becomes vulnerable.

sgkla said:
I think his question is, can he corrupt an app or i's data if he kills it with either a task killer or with a shortcut setup as a task killer. Based on your response, the answer (correct me if I'm wrong) is the only thing that could possibly be affected with a disabled fsync is the app that was killed - which isn't a big deal because it does not fall into your catastrophic loss category of RR, Hard shut, etc. where your system becomes vulnerable.
Click to expand...
Click to collapse
Killing an app is exactly as dangerous or safe with fsync disabled as with fsync enabled.

@_that
Can FSync be in any way related to system lag... I mean if it does, will it reduce lag with FSync enabled or disabled???
Thanks
Sent from my GT-I9500 using Tapatalk 4 - Hassan K. Malik

HassanM said:
@_that
Can FSync be in any way related to system lag... I mean if it does, will it reduce lag with FSync enabled or disabled???
Click to expand...
Click to collapse
Have you read post #2?
Sent from my ASUS Transformer Pad TF700T using Tapatalk 4

I see what you are trying to say here but unfortunatelly my experiences are different:
With Dynamic FSync Enabled - when my system crashes from any reason I always loose some data (e.g. my tapatalk app always lost all data).
So I keep Dynamic Fsync Disabled - my system can crash anytime and my data are kept intact. ...
So how this really works?

s3icc0 said:
I see what you are trying to say here but unfortunatelly my experiences are different:
With Dynamic FSync Enabled - when my system crashes from any reason I always loose some data (e.g. my tapatalk app always lost all data).
So I keep Dynamic Fsync Disabled - my system can crash anytime and my data are kept intact. ...
So how this really works?
Click to expand...
Click to collapse
If you disabled dynamic fsnc then you have fsync enabled and you are not getting any benefits.
Dynamic FSYNC = ENABLED
- Screen on = NORMAL FSYNC OFF = faster IO
- Screen off = NORMAL FSYNC ON = slower IO
Dynamic FSYNC = DISABLED
- Screen on = NORMAL FSYNC ON = slower IO
- Screen off = NORMAL FSYNC ON = slower IO

sbdags said:
If you disabled dynamic fsnc then you have fsync enabled and you are not getting any benefits.
Dynamic FSYNC = ENABLED
- Screen on = NORMAL FSYNC OFF = faster IO
- Screen off = NORMAL FSYNC ON = slower IO
Dynamic FSYNC = DISABLED
- Screen on = NORMAL FSYNC ON = slower IO
- Screen off = NORMAL FSYNC ON = slower IO
Click to expand...
Click to collapse
But with enabled I am loosing my data in case of system errors

s3icc0 said:
But with enabled I am loosing my data in case of system errors
Click to expand...
Click to collapse
Yes only if the system crashes you may lose some data.

sbdags said:
Yes only if the system crashes you may lose some data.
Click to expand...
Click to collapse
That is not a good news for someone who spend half of life on XDA trying all possible features, tweaks and roms

_that said:
All data that any app thinks it has written to storage (as it explicitly instructed the OS to do so), but has not been written yet by the OS, may be lost in case of an unexpected system crash.
So as long as the system is running normally, all cached data is eventually written to the eMMC/SD, usually a few seconds after the write request, and everything works normally.
In case of a random reboot, or a "hard" system hang which requires you to power off and restart, or if you run out of battery, AND some app or background service wanted to write something to the file system just before that crash, such cached data is lost.
So what can happen? No hardware is damaged. In the absolutely worst case, the filesystem on your data partition is irrecoverably damaged and you have to do a factory reset, losing all your apps and your data, photos etc. (you do have a backup, don't you?). The chance for this worst case to happen is extremely low - in most cases the filesystem is automatically repaired at startup, and the incompletely written files are simply deleted. If this does not work for some reason, you can still manually try running fsck from the recovery.
If some system service just updated a database before the crash, it may be inconsistent after restarting. This can lead to malfunction of that service, e.g. FCs, missing info in your calendar, missing or garbled media files, etc.
So in summary - as long as the system is stable, disabling fsync only increases performance. By the way, app crashes (FC, ANR, ...) do not hurt here, only complete system crashes are bad.
Click to expand...
Click to collapse
I got such a huge problem with the force reboot thing and now i'm really thinking it is Fsync related. I own a note 6 pro and i always keep fsync disabled because of the performance increase that people say. One day the phone had to restart the UI and for some reason UI wasn't starting again, so i forced the reboot. The phone ended up with stutters anytime it entered the system and in any rom (even stock), imei and mac got gone and the rom i was on was really buggy, like: status bar wouldn't expand, home button wasn't working and a lot of other things.
This issue happened on the moto g falcon i'm using due to my note 6 pro bug. I also kept Fsync disabled on this one, and i had to forced reboot it because an app had freezed. Again, status bar wasn't expanding, home and recents button wasn't working, notificatons wasn't showing... Thank god my imei and mac isn't gone. A clean rom reflash worked for moto g, but nothing i tried worked out for note 6 pro. It doesn't happens on the first forced reboot, but takes some of them to happen.
Do you think Fsync can have such a deep impact even to mess with some partitions on the phone if it's suddenly rebooted?

Related

ZOMBi-POP OMNI KANG RC1 - Slowness when using the tablet after sleep/some time.

Hi All,
I know Zombi-POP is still in RC1 so I'm sure there are still quite a few issues. The issue I seem to be having is the tablet is VERY slow once you use it from sleep/sitting for a while. I'm not sure what its doing once I start using it again but it takes about 3-5 minutes to get back to hauling butt. I notice when playing a game that there is performance hit every 2 seconds. I can see the animation lagging so its very noticable and constant. Does anyone know what could be going on?
TF700T:
* ROM2SD on 64GB Sandisk 10. I partitioned it 16/43/1 EXT4. I'm staying away from F2FS since data could corrupt.
* Recommended settings put in place based on install notes on forum.
Governor:Interactive (not like I can change it anyways)
IO scheduler:noop
Thanks for the help. I would post this in the correct area but I'm not allowed to post there yet due to my newbie status .
That sounds as if you have automatic updates in the Play Store active. Turn it off.
And get rid of the FB app if you use it (acess it in browser instead). Any app that feels the need to phone home as soon as the tablet wakes up will make this lag-on-wake worse: weather apps, forum apps, mail... what have you.
For your game you could try to play with the Transition animation and Animator duration scale in Developer Options. Set them to .5 and see if that helps.
You should really give f2fs on internal a whirl. As long as we have been playing with f2fs I still have to hear from a single user who had data loss issues because of it. And anyway - if you keep sensitive data on your portable device you should have a solid backup routine in place no matter what. And if you do data loss is a non-issue
mediaserver is the issue...
I was watching the system for a while during wakeups and found that the mediaserver process is causing this slowdown. I guess its scanning the driver? I'm not sure. All I know is there is a app already created out there that kills the mediaserver process for good. I tried killing it from the terminal but it starts up right afterwards. I'll stick with EXT4 for now. The performance is great for me once that process is gone and I'm more familiar with EXT4.
Thanks!
Andy
berndblb said:
That sounds as if you have automatic updates in the Play Store active. Turn it off.
And get rid of the FB app if you use it (acess it in browser instead). Any app that feels the need to phone home as soon as the tablet wakes up will make this lag-on-wake worse: weather apps, forum apps, mail... what have you.
For your game you could try to play with the Transition animation and Animator duration scale in Developer Options. Set them to .5 and see if that helps.
You should really give f2fs on internal a whirl. As long as we have been playing with f2fs I still have to hear from a single user who had data loss issues because of it. And anyway - if you keep sensitive data on your portable device you should have a solid backup routine in place no matter what. And if you do data loss is a non-issue
Click to expand...
Click to collapse
You should really switch to internal and F2FS - there is no risk of corruption. Rom2sd doesn't play well with zombi.

[TIP]Getting the best out of your phone.

HEATING:
Heating while charging isn't an issue pls. You can let your phone cool down before charging it in a cool place. You can either power it off or put it on Airplane mode while charging. (This will reduce the charging time and also some activities by apps which slow the charging) Heating is normal while charging owing to the Quick Charge x.0 capability of Qualcomm Snapdragon 617 (MSM8952). It will heat up. Heating is reduced in the latest builds, especially while recording video via the camera. This semi-budget oriented processor isn't designed for heavy gaming pls, despite 3GB of DDR3 RAM available to it. If you're a hard core gamer or someone who likes to overclock stuff, this isn't the right phone.
If you feel your phone is heating with normal usage too, consider removing apps which are useless and clear the cache followed by a reboot. See to it that the apps are updated. You can switch to WiFi instead of Mobile Data (keeps my athene cool idk why). If nothing works, consider a factory reset; else shift to a custom ROM if you can and test.
PERFORMANCE:
General phone performance of Nougat has been better than Marshmallow for sure, but for many, 7.0 has had the notification drawer stuttering issue in some cases and Bluetooth being turned on automatically after turning Airplane mode ON. Overall experience is smooth. But many people do not like stock ROM very much, because of the lack of features. AOSP and LineageOS based ROMs are much better that stock in terms of speed. For god's sake don't use the task killer apps or battery savers like CCleaner / CleanMaster/ DU Battery Saver. Apps staying in the memory (RAM) are good for your device until your phone is lagging. Clearing the things from the recents panel will force them to start again from scratch, consuming the CPU and of course the battery.
BATTERY & CHARGING:
Stock N wasn't very good in terms of battery after all in comparison to MM despite the improved doze mode introduced in Nougat. Well this is the case in almost every android OEM that the battery performance went down in transition from one Android version to another. However, the March 1 update is said to fix a bit of battery and security issues. Android has the habit of collecting garbage (but that makes it smart too) and this can be one of the reasons why battery and performance issues occur after an OTA. The best thing after a "dirty/problem causing" update is to do a factory reset. Anyways, it is advised to clear the cache before and after doing an update. For god's sake don't use the task killer apps or battery savers like CCleaner / CleanMaster/ DU Battery Saver. Apps staying in the memory (RAM) are good for your device until your phone is lagging. Clearing the things from the recents panel will force them to start again from scratch, consuming the CPU and of course the battery.
Battery Saving and charging Tips:
Please understand the difference between Screen On time of a complete cycle and the usage time. People start judging the battery from the estimated time left after the first charge itself. A tip is to fully charge the battery after a clean flash and then let it drain till 15%. Do not let the battery drain completely, Li-ion batteries lose their capacity over time and are designed to run between 20-100 percent. Battery life of your phone is completely dependant on your usage. Turning off Auto-Rotation, WiFi, Bluetooth, Sync, Mobile Data, Location Services and scanning (almost everything ) when not needed can give you the best battery life possible. You can consider using Greenify although you should avoid any such thing. Android learns how you use it, no need to comment about the 2 H SOT you're getting after a clean flash. You might also want to uninstall the useless apps and block the wakelocks (which you understand) if possible. Turn off the SIM card if it's in very low network. If nothing is helping you, you might consider doing a factory reset too.
Checkout this amazing thread by @rirozizo and the video by XDA TV.
https://www.youtube.com/watch?v=3Zt2j8lFbJQ
Ghost Touch: Your touchscreen is at fault. Visit the service center please.
Screen Retention: Your display is defective. Turning the phone off for a while and then setting blue light filter at 5% for Black colour or changing the RGB values is a temporary fix. Visit the service center please.
Random Reboots: Try factory resetting your device, see if you installed something wrong and flash latest stock firmware, just in case, you know. Else the service center only can fix the issue if still present.
For not being called a noob:
1. Read XDA and other forums and think before you do anything to your phone.
2. Ask in the community if you have doubts. (Read Rules and XDA University's New User's guide first)
3. Always make backups before flashing new things. (Use TitaniumBackup and TWRP backups)
Check the videos by XDA-TV and Rootjunky ( @Tomsgt )
https://www.youtube.com/watch?v=_rEsgCrvEqY
https://www.youtube.com/watch?v=nyr3FstDKH0&index=1&list=PLgLZvFga2ml4Atl32E4c_ZslfrTJJDUfr
https://www.youtube.com/watch?v=j-i59R51Cys
4. See this video by XDA-TV:
https://www.youtube.com/watch?v=JmvCpR45LKA
5. Stop using useless apps and be patient pls.
Valar Morghulis!
Good thread, I'll add a couple of my tips here.
- ohmergerd, there's thousands of ROMs for the G4! Which ones are the best???? Nearly every single ROM for the G4 subtracting perhaps GZR ROMs and RevivorOS/optimized stock is LineageOS based (Invicta is basically Lineage with MM kernel blobs and faux/OMS integrated). There's basically no performance differences, just feature differences based on the discretion of the dev.
- If heating is STILL an issue for you, disable the 4 big cores. There isn't a significant difference in everyday use- the LITTLE cluster handles the UI and basic apps anyway.
- Haven't noticed notification bar lag since the 7.1.2 builds. If you have lag (depending on your ROM), using blur or transparency helps trick your eyes into seeing no lag. If lag persists, force enable scrolling cache and speed up the animations.
- If you have a custom kernel and your RAM usage isn't an issue, disable KSM, Adaptive Memory Killer, and/or ZRAM and Kernel Adiutor/EXKM. While useful if you let your memory use skyrocket, if you are conservative in your memory use these memory killers just suck up CPU cycles.
- Build prop tweaks/L Speed/HEBF don't work. Completely placebo, except for governor tweaks.
- USB-OTG is great, I recommend getting a dongle if you're a flashaholic. Much easier and quicker to simply plug in your USB to flash instead of plugging in your phone, transferring the ROM, flashing, etc.
- Use a trickle charger, and save that fast charger for emergencies (camping, flights, etc.).
- Disable a bunch of Google's **** in settings- I advise going through Activity controls as Google takes snippets of keyboard input, voice, web history, video history, etc. This adversely affects battery life especially if you have a weak signal, as Google Play Services continuously attempts to push through their telemetry data. This is also why you get 2hrs of SoT after a clean flash.
- On stock-based ROMs (to eliminate lag), boot the ROM once, then reboot to recovery and flash the latest Aroma GApps package with the apps you want. Then, mount /system, and start deleting all apps in /system/app or /system/priv-app that begin with "3c". This effectively removes Motorola updates and telemetry, and also updates your GApps- the stock GApps are very old, and updating them caused Play Store errors and miscellaneous battery sucking services.
- Mr. Shield Protectors suck. Badly cut-out, misaligned, etc.
Hard reset: A term with the common misconception here in the group. Hard reset means nothing in android smartphones. It is only a term for older computers where you manually had to reset the old electrical parts from the charge they held.
Factory reset via the settings is equivalent to the Wipe Data/Factory reset available in the stock recovery.
Also, always sign out from your Google account before doing the wipe, else chances are your device may enable Factory Reset Protection and lock the device.
Normally my phone was using two BIG cores (and the four LITTLE ones). Each core was utilized around 40-60%.
Withing kernel manager I have set the minimum value for the BIG cores to 1 and I have lowered the minimum frequency value for that core. Now the utilization on that core is close to 100%.
Now the phone is cold all the time (except when charging with the Fast Charger) and I have no lag issues whatsoever.
Oh, btw, on some kernels (EX 1.07, Vegito), workqueue power saving is built in which iirc tries to schedule tasks on the fewest cores as possible, so on these kernels which tend to turn off cores and lower frequencies while asleep the wakeup action, especially while dozing, the wakeup action will be met with significant lag/delay.
If you have a delay when turning on your phone with these kernels (or even stock kernels for some ROMs), disable the setting called wq_power_saving.
I have the solution for random reboots. But only for those devices that reboots 4 or 5 times every day. Just open your device and disconnect the battery for 30 minits. Or also you can change the battery (confirmated it works)
negusp said:
Good thread, I'll add a couple of my tips here.
- ohmergerd, there's thousands of ROMs for the G4! Which ones are the best???? Nearly every single ROM for the G4 subtracting perhaps GZR ROMs and RevivorOS/optimized stock is LineageOS based (Invicta is basically Lineage with MM kernel blobs and faux/OMS integrated). There's basically no performance differences, just feature differences based on the discretion of the dev.
- If heating is STILL an issue for you, disable the 4 big cores. There isn't a significant difference in everyday use- the LITTLE cluster handles the UI and basic apps anyway.
- Haven't noticed notification bar lag since the 7.1.2 builds. If you have lag (depending on your ROM), using blur or transparency helps trick your eyes into seeing no lag. If lag persists, force enable scrolling cache and speed up the animations.
- If you have a custom kernel and your RAM usage isn't an issue, disable KSM, Adaptive Memory Killer, and/or ZRAM and Kernel Adiutor/EXKM. While useful if you let your memory use skyrocket, if you are conservative in your memory use these memory killers just suck up CPU cycles.
- Build prop tweaks/L Speed/HEBF don't work. Completely placebo, except for governor tweaks.
- USB-OTG is great, I recommend getting a dongle if you're a flashaholic. Much easier and quicker to simply plug in your USB to flash instead of plugging in your phone, transferring the ROM, flashing, etc.
- Use a trickle charger, and save that fast charger for emergencies (camping, flights, etc.).
- Disable a bunch of Google's **** in settings- I advise going through Activity controls as Google takes snippets of keyboard input, voice, web history, video history, etc. This adversely affects battery life especially if you have a weak signal, as Google Play Services continuously attempts to push through their telemetry data. This is also why you get 2hrs of SoT after a clean flash.
- On stock-based ROMs (to eliminate lag), boot the ROM once, then reboot to recovery and flash the latest Aroma GApps package with the apps you want. Then, mount /system, and start deleting all apps in /system/app or /system/priv-app that begin with "3c". This effectively removes Motorola updates and telemetry, and also updates your GApps- the stock GApps are very old, and updating them caused Play Store errors and miscellaneous battery sucking services.
- Mr. Shield Protectors suck. Badly cut-out, misaligned, etc.
Click to expand...
Click to collapse
Thanks for the tips.
Using Root explorer I deleted the 3c stuff and updated the Gapps via Aroma installer (never knew this Aroma version existed).
Where do I find the Activity controls thing?
bluegrass55 said:
Thanks for the tips.
Using Root explorer I deleted the 3c stuff and updated the Gapps via Aroma installer (never knew this Aroma version existed).
Where do I find the Activity controls thing?
Click to expand...
Click to collapse
It's in settings>Google, first 3 menus iirc.
i just had to unroot, re-lock my boot, and flash the latest firmware because someone has been hacking my phone. I purchased a Samsung phone and been switching the SIM between phones. I wish custom ROMs were more secure, flashing every ROM available, some took longer then others. After seeing that the Samsung KNOX wasnt able to be hacked, i decided to flash your stock N package. They are yet to get in my XT-1644 since earlier after the flash.
Am i stuck on the Stock ROM or is there a way to keep from getting a rooted with unlocked bootloader, hacked?

Explanation of Nougat Battery Consumption and Workarounds for Better Battery Life

Hello guys. This topic is pretty long and it is hard to read all of it but try to read all of it till end.
Well, let me begin. The main problem of the nougat update is the dramatic increase of battery consumption (for me at least) But why this is happening?
Actually this is a matter of battery managers. Huawei had created a great phone but obviously they messed things up in the software side. Google announced "Doze" feature with Marshmallow. If we could have a brief explanation of "what doze is" is it is basically a battery protection policy created by google. In Android, apps have the ability to use what’s called a “wakelock” to prevent your phone from going into a power-saving deep sleep mode. This deep sleep mode usually kicks in when your phone’s screen is off, but that can get in the way of how some apps work. For example, if you’re using a fitness tracker, you don’t want your phone turning off GPS or your accelerometer just because your phone is in your pocket with the screen turned off.
In principle, this is a good concept. Apps keep your phone awake and working when they need to, and let it sleep when they don’t. This is a problem, though, when every developer thinks their app is important enough to keep your phone on all the time. That’s why apps like Facebook kill your battery, even when you’re not using them.
Doze helps solve this problem by periodically blocking wakelocks and shutting off network access if your phone goes unused for a while. It will then periodically allow apps to check in during “maintenance windows” every so often (these windows occur less frequently the longer you don’t use your device). Here is a graphical explanation of how doze works versus time:
http://itresan.com/wp-content/uploads/2016/05/doze-header.jpg
Doze helps solve this problem by periodically blocking wakelocks and shutting off network access if your phone goes unused for a while. It will then periodically allow apps to check in during “maintenance windows” every so often (these windows occur less frequently the longer you don’t use your device)
If we turn back to the main topic, as I mentioned before, Huawei has some difficulties combining it's own features with google's. Huawei has its own battery manager. That's why you are not receiving some notifications from facebook or whatsapp. That is because that freaking battery manager shuts everything off but still, since it has a very poor approach, the system drains battery. It is basically a matter of doze does not kicking in. As you can see, the battery usage when the screen is turned on is about the same. However, the same thing cannot be seem when the screen is off.
So what to do in order to save some juice?
-There is some workarounds for doze kicking in like these ones:
https://play.google.com/store/apps/details?id=com.yirgalab.dzzz
https://play.google.com/store/apps/details?id=com.suyashsrijan.forcedoze
These two apps have different approaches. I prefer ForceDoze as it seems the google's intended way.
I want to highlight this item because this might be the most important thing in this topic. If you don’t do anything with your phone, Doze will still do its job. It runs almost invisibly in the background. Occasionally you’ll get a few messages at once, rather than spread over a few minutes, but for the most part there’s no noticeable change. In other words this is a bit different from the conventional full deep sleep and you do not have to afraid from doze as you do with the full deep sleep.
-DO NOT CLEAN YOUR RAM TOO OFTEN. This will cause closed apps re-open and hence, more cpu usage.
-No! Cleaners, Task managers and other stuff does not work! As I mention before, they even lead more battery consumptions.
-Huawei has poor google service implementations. Even one or two implementation has some bugs that causing battery drain(for example: google backup). Try to turn them off.
-Know when to reboot your phone. Too frequent reboots may do the same thing as you cleaning your ram. However, rebooting cleans app caches so the system will work smoother. Once a week or two weeks is fine I suppose.
Please hit the "Thanks" button if you like and please point out the missing things and if you see a mistake please warn me for correcting it. I hope you liked the topic.
Have a nice day!
Doze is problem for me. I don't have push notification by the night.
darrr1 said:
Doze is problem for me. I don't have push notification by the night.
Click to expand...
Click to collapse
It's probably not because of the doze but the huawei's power manager itself.
Problem starts when phone is not active longer than 2-3 hours. In root I removed phone manager and it did not help fix the push notification problem
darrr1 said:
Problem starts when phone is not active longer than 2-3 hours. In root I removed phone manager and it did not help fix the push notification problem
Click to expand...
Click to collapse
Assuming that you are on huawei release (not los releases), untick your app from close apps after screen lock. Then go to apps, settings, special access, and make the system ignore battery optimizations for the spesific app you want to get notification from.
I did everything what I can without succes.
furkey said:
Assuming that you are on huawei release (not los releases), untick your app from close apps after screen lock. Then go to apps, settings, special access, and make the system ignore battery optimizations for the spesific app you want to get notification from.
Click to expand...
Click to collapse
first thanks for this tip. i hate it that i dont receive whatsapp messenges all the time, i hope it will work now.
BTP:
I assume huawei did not remove "doze" from our firmware, but maybe they replaced it with theire own battery manager?
Is there a complete source for doze, so we can check if everything is there? If yes it should not be that hard to activate doze and deactivate the huawei one.
But i guess we need at least the kernel sources to clear things up?
xtcislove said:
first thanks for this tip. i hate it that i dont receive whatsapp messenges all the time, i hope it will work now.
BTP:
I assume huawei did not remove "doze" from our firmware, but maybe they replaced it with theire own battery manager?
Is there a complete source for doze, so we can check if everything is there? If yes it should not be that hard to activate doze and deactivate the huawei one.
But i guess we need at least the kernel sources to clear things up?
Click to expand...
Click to collapse
Doze is not on kernel level but it is on software level. Programmatically we can activate what is left from doze or at least simulate it. However, if there is a certain need for doze we should cook a whole new rom and yes, it requires open source too.
But, let's clear a thing here: Huawei did not completely removed doze. Actually, I think they can't do that if they wish to use Android. Just some settings of Huawei conflicts with doze and prevent its functioning.
I'm using the honor 9 with emui 5.1 (android 7.0) and screebl (app used to control how and when screen locks/times out) is constantly getting killed. I have added it to ignore(=allow to run) in battery optimization and it's activated as a device administrator. It is not selected to close (power intensive app prompt) or instructed to close when screen goes off. Yet it repeatedly is getting killed - is there something else I need to do? I can't seem to find anything else I can do to stop it from being killed and it's a major nuisance.
antimatter.web said:
I'm using the honor 9 with emui 5.1 (android 7.0) and screebl (app used to control how and when screen locks/times out) is constantly getting killed. I have added it to ignore(=allow to run) in battery optimization and it's activated as a device administrator. It is not selected to close (power intensive app prompt) or instructed to close when screen goes off. Yet it repeatedly is getting killed - is there something else I need to do? I can't seem to find anything else I can do to stop it from being killed and it's a major nuisance.
Click to expand...
Click to collapse
Could you finally solve this?
I also have and Honor 9, and have the same problem with aplicacition radardroid. Is getting killed, and also have all configured to prevent this...
Try by having both in the Settings
-Battery/Close apps after lock screen (uncheck in the list)
-Apps/Settings gear/Special access/Ignore battery optimization (make it allowed)
Thank szgfg,
Both are already well configured, but still closing the app.
mikicl said:
Thank szgfg,
Both are already well configured, but still closing the app.
Click to expand...
Click to collapse
Check also is not being closed by the automatic cleanup (so add it to clean whitelisted apps) and that is not being closed due to high consumption...disable that on battery settings... Let the advertisement but do not let phone administrator close that apps automatically
Enviado desde mi EVA-L09 mediante Tapatalk
Hi jcalderonv74,
Thanks for your answer. I didn't know about the clean whitelisted apps, was a surprise to find it. But unfortunetly, everything was well configured.
Option to avoid being closed due to high consumption was already OK.
So nothing to change, everything was as it has to be. Seems more a software problem in EMUI 5.0
After some days without touching anything in the phone's configuration, finally observed that everything is working fine. All aplications configured keep opened, and it's only Radardroid aplication that sometimes closes alone (only sporadically after a recent update)
Seems more an error in Radardroid aplication that in telephone's software. So I'm not worring more about that.

Fingerprint recognition with unencrypted /data partition?

I had to format my /data partition to change the file system from f2fs to ext4 to allow Magisk to persist Hide settings (and for systemless Xposed to work).
As I am trying to figure out why the screen-on time is less than on the stock ROM even with power saving CPU/GPU governing enabled in the kernel, apparently due to system processes, I thought I would see if encryption had an effect, so I avoided encrypting the /data partition after reformatting it.
However, this has the side effect of disabling the fingerprint recognition and the related settings entries (sensor still works as back/task switcher/home button). If I encrypt the phone under settings, the fingerprint settings & functionality return.
I would like the encryption, but if this is what costs a lot of extra battery use, then my jury is still out.
Meanwhile, does anybody know a way around this or perhaps less likely a "trustworthy" 3rd party app that could handle it?
(My understanding is that the "fingerprint fingerprints" or "hashes" are stored in an encrypted/inaccessible place regardless of whether the /data partition is encrypted, so it ought not to be an absolute requirement for it to work.)

Understanding what is F-Sync and the effects of it during a system crash

What is F-Sync? What are the effects when disabling it?
According to Linux Programmer's Manual on http://man7.org/linux/man-pages/man2/fsync.2.html
fsync() transfers ("flushes") all modified in-core data of (i.e.,
modified buffer cache pages for) the file referred to by the file
descriptor fd to the disk device (or other permanent storage device)
so that all changed information can be retrieved even if the system
crashes or is rebooted. This includes writing through or flushing a
disk cache if present. The call blocks until the device reports that
the transfer has completed.
Click to expand...
Click to collapse
So basically, this is the one who protecting the /data partition from corrupting during a system crash or unexpected system reboot.
I've just learned it during my lessons in my programming class and this is one of my reasons why my device:
Can't Enable Mobile Data
For some reason, my status bar can't be customized and can't pull down the other settings
Magisk keeps stopping
In some kernels, F-sync is disabled by default. Disabling it has certain effects. While disabled, it can improve memory speed but increases risk of data loss during a system crash.
I tried to Enable it for a sec and doing some benchmarks, I can say that the Disabled one has the highest score (in read/write scores) than the Enabled one, it could theoretically improve loading speed time in apps but it is barely unnoticeable. So I recommend that you should enable it in case of system crashes.
Other devs should give warning about F-Sync like in Twisted Kernel (Thanks @Twisted Prime for the heads-up).
If you want to enable it, you could enable it then set it on boot so it will always stay enabled.
Not a poco F1 thing, but nice to know

Categories

Resources