LightBlog

samedi 30 juin 2018

How to immediately get OxygenOS updates for the OnePlus 6/5T/5/3T/3

OxygenOS Open Beta for the OnePlus 5 and OnePlus 5T

One of the most annoying parts of over-the-air (OTA) updates is waiting for the update to be delivered on your device. This varies wildly from device to device, and many factors take part while checking if you're eligible: your carrier, your OEM, your current Android version, and your actual geographical location/IP, just to name a few. It's particularly annoying when your OEM doesn't officially support your country. If you want to skip the wait and immediately get OxygenOS updates on your OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, or OnePlus 3, then you can use the free Oxygen Updater app to do so.

Skipping the line with Oxygen Updater

I live in Caracas, Venezuela, and I currently use a OnePlus 5T as my daily driver. OnePlus doesn't officially sell their phones in Venezuela—I had to import mine from the U.S. store and have it shipped to me via a third-party, so OxygenOS updates are sometimes delayed by quite a bit here. I often download update packages with my browser, either from the official OnePlus download section or XDA threads, in order to update my device and then proceed to install it with either TWRP or the Oxygen Recovery.

It's even worse for other devices made by other manufacturers. Just to cite an example, update rollouts for LG can often take months to roll out from one country to the other. This is pretty common practice in the Android ecosystem. It's pretty rare to find a phone that actually receives timely security patches, without counting the Google Pixel phones. OnePlus used to be pretty slow when keeping their phones up to date, but they have picked up the pace recently, especially when it comes to security patches. But actual OTA rollouts still take a while to reach everyone. There's a good reason for that, though, and it's to ensure that bugs are caught early before the update reaches everyone.

If you don't want to wait for an update, you can use a VPN to connect to OnePlus' usual test markets: Germany or Canada. This is exactly what the Oxygen Updater app does for you. Oxygen Updater is a pretty nifty tool that, despite what the name would tell you, is not made by OnePlus or anyone closely related to the company. It's instead an unofficial tool which focuses on OnePlus devices like the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3. The concept is pretty simple: you select your device and the app checks whether an update is available.

How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3 How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3 How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3

Oxygen Updater grabs update packages for all currently supported OnePlus devices, including the OnePlus 6, the OnePlus 5/OnePlus 5T, and the OnePlus 3/OnePlus 3T, in both OxygenOS stable and Open Beta channels. It also gives you the option to download partial OTA packages (if you're unrooted) and full firmware ZIPs, both of which you can install through your recovery of choice. Furthermore, it skips over OnePlus' OTA rollouts: if an update exists for your device, you'll be able to download said update right away, even if the Update section in your phone says your device is up to date.

How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3 How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3

How to get OxygenOS updates on the OnePlus 6/5T/5/3T/3

For all intents and purposes, it's just as feature rich as the OxygenOS update manager. Maybe even better. It's pretty simple to use, actually:

  1. Download Oxygen Updater from the Google Play Store using the button below.
  2. Start the app. It'll start on the setup screen, where the app will be configured for your device.
  3. Note that the app may check for root access and ask for root permissions. If applicable, then grant it, since it will simply default the update method to "full update" instead of partial update otherwise.
  4. Follow through the setup until you get to the main screen. If it says your device is up to date, then congrats!
  5. If it says an update is available, download it and the update will begin downloading in the background.
  6. After it's finished, just tap on the notification. The app will follow through the normal update cycle: it'll reboot, boot into recovery mode, install, then reboot again.

I found it to be a pretty reliable tool during my own testing. I bumped my OnePlus 5T from Open Beta 8 straight to Open Beta 10 in a breeze. As we said before, it's also compatible with all devices currently supported by OnePlus, so it's definitely something worth checking out if you're a OnePlus user. You can download and give Oxygen Updater a shot yourself for free from Google Play.

Oxygen Updater (Free+, Google Play) →



from xda-developers https://ift.tt/2yVR21F
via IFTTT

How to immediately get OxygenOS updates for the OnePlus 6/5T/5/3T/3

OxygenOS Open Beta for the OnePlus 5 and OnePlus 5T

One of the most annoying parts of over-the-air (OTA) updates is waiting for the update to be delivered on your device. This varies wildly from device to device, and many factors take part while checking if you’re eligible: your carrier, your OEM, your current Android version, and your actual geographical location/IP, just to name a few. It’s particularly annoying when your OEM doesn’t officially support your country. If you want to skip the wait and immediately get OxygenOS updates on your OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, or OnePlus 3, then you can use the free Oxygen Updater app to do so.

Skipping the line with Oxygen Updater

I live in Caracas, Venezuela, and I currently use a OnePlus 5T as my daily driver. OnePlus doesn’t officially sell their phones in Venezuela—I had to import mine from the U.S. store and have it shipped to me via a third-party, so OxygenOS updates are sometimes delayed by quite a bit here. I often download update packages with my browser, either from the official OnePlus download section or XDA threads, in order to update my device and then proceed to install it with either TWRP or the Oxygen Recovery.

It’s even worse for other devices made by other manufacturers. Just to cite an example, update rollouts for LG can often take months to roll out from one country to the other. This is pretty common practice in the Android ecosystem. It’s pretty rare to find a phone that actually receives timely security patches, without counting the Google Pixel phones. OnePlus used to be pretty slow when keeping their phones up to date, but they have picked up the pace recently, especially when it comes to security patches. But actual OTA rollouts still take a while to reach everyone. There’s a good reason for that, though, and it’s to ensure that bugs are caught early before the update reaches everyone.

If you don’t want to wait for an update, you can use a VPN to connect to OnePlus’ usual test markets: Germany or Canada. This is exactly what the Oxygen Updater app does for you. Oxygen Updater is a pretty nifty tool that, despite what the name would tell you, is not made by OnePlus or anyone closely related to the company. It’s instead an unofficial tool which focuses on OnePlus devices like the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3. The concept is pretty simple: you select your device and the app checks whether an update is available.

How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3 How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3 How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3

Oxygen Updater grabs update packages for all currently supported OnePlus devices, including the OnePlus 6, the OnePlus 5/OnePlus 5T, and the OnePlus 3/OnePlus 3T, in both OxygenOS stable and Open Beta channels. It also gives you the option to download partial OTA packages (if you’re unrooted) and full firmware ZIPs, both of which you can install through your recovery of choice. Furthermore, it skips over OnePlus’ OTA rollouts: if an update exists for your device, you’ll be able to download said update right away, even if the Update section in your phone says your device is up to date.

How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3 How to get OxygenOS updates on the OnePlus 6, OnePlus 5T, OnePlus 5, OnePlus 3T, and OnePlus 3

How to get OxygenOS updates on the OnePlus 6/5T/5/3T/3

For all intents and purposes, it’s just as feature rich as the OxygenOS update manager. Maybe even better. It’s pretty simple to use, actually:

  1. Download Oxygen Updater from the Google Play Store using the button below.
  2. Start the app. It’ll start on the setup screen, where the app will be configured for your device.
  3. Note that the app may check for root access and ask for root permissions. If applicable, then grant it, since it will simply default the update method to “full update” instead of partial update otherwise.
  4. Follow through the setup until you get to the main screen. If it says your device is up to date, then congrats!
  5. If it says an update is available, download it and the update will begin downloading in the background.
  6. After it’s finished, just tap on the notification. The app will follow through the normal update cycle: it’ll reboot, boot into recovery mode, install, then reboot again.

I found it to be a pretty reliable tool during my own testing. I bumped my OnePlus 5T from Open Beta 8 straight to Open Beta 10 in a breeze. As we said before, it’s also compatible with all devices currently supported by OnePlus, so it’s definitely something worth checking out if you’re a OnePlus user. You can download and give Oxygen Updater a shot yourself for free from Google Play.

Oxygen Updater (Free+, Google Play) →



from xda-developers https://ift.tt/2yVR21F
via IFTTT

Google Pay prepares integrating Google Pay Send features into the main app

Google Pay Send

In the world of mobile payment systems, Google had a bit of an identity crisis until earlier this year. Their services once included Android Pay, Google Wallet, and Pay with Google. The Android Pay app was a digital wallet that used NFC to make payments. Google Wallet was a peer-to-peer payment service for people to send and receive money. Pay with Google used the Google Payment API to allow users to make payments via Google Assistant or web browsers with any card on file with their Google account. To reduce confusion, Google introduced the “Google Pay” brand at the beginning of 2018 to unify these services. However, Google Wallet remained a separate app (though it was rebranded as “Google Pay Send”). Now, it seems that the Google Pay Send features are nearly ready to be integrated into the main app.google pay

Google Pay services. Source: Google.

We were told this integration would be happening back during the initial rollout of the Pay service. Specifically, the integration would be rolling out “within the next few months,” though we haven’t heard any further news in the four months that have passed. Regardless, it appears that the former Google Wallet features are already fully functional in the standard Pay app, and furthermore, the peer-to-peer payments even work in the United Kingdom (the Pay Send app doesn’t work in the U.K.)

The integration was discovered by XDA Recognized Developer Quinny899 (Kieron Quinn of Mighty Quinn Apps) and confirmed by us. With the Google Pay Send app uninstalled, we were able to activate the peer-to-peer payment functionality within the standard app and successfully send a payment. As you can see in the screenshots below, a new “send money” tab appears in the bottom toolbar. Tapping on this brings us to a page where we can send or request money from either an existing contact or new contact. Even a group request can be made on this page.

Google Pay Send, Android Pay, Google Wallet, Pay with Google Google Pay Send, Android Pay, Google Wallet, Pay with Google Google Pay Send, Android Pay, Google Wallet, Pay with Google Google Pay Send, Android Pay, Google Wallet, Pay with Google

Once this feature rolls out in the U.S. and U.K., you’ll no longer need to install the separate Google Pay Send app to take advantage of the peer-to-peer payment functionality. For now, you’ll have to keep both apps installed if you want to send or receive money to or from other people.

Google Pay Send (Free, Google Play) →

We’ll keep an eye out on any new Pay features that we spot. The service continues to become more useful over time with new features like support for mobile boarding passes and event tickets (…almost like a wallet, no?) and sending money via Google Assistant.



from xda-developers https://ift.tt/2KlnwYq
via IFTTT

Google Pay prepares integrating Google Pay Send features into the main app

Google Pay Send

In the world of mobile payment systems, Google had a bit of an identity crisis until earlier this year. Their services once included Android Pay, Google Wallet, and Pay with Google. The Android Pay app was a digital wallet that used NFC to make payments. Google Wallet was a peer-to-peer payment service for people to send and receive money. Pay with Google used the Google Payment API to allow users to make payments via Google Assistant or web browsers with any card on file with their Google account. To reduce confusion, Google introduced the "Google Pay" brand at the beginning of 2018 to unify these services. However, Google Wallet remained a separate app (though it was rebranded as "Google Pay Send"). Now, it seems that the Google Pay Send features are nearly ready to be integrated into the main app.google pay

Google Pay services. Source: Google.

We were told this integration would be happening back during the initial rollout of the Pay service. Specifically, the integration would be rolling out "within the next few months," though we haven't heard any further news in the four months that have passed. Regardless, it appears that the former Google Wallet features are already fully functional in the standard Pay app, and furthermore, the peer-to-peer payments even work in the United Kingdom (the Pay Send app doesn't work in the U.K.)

The integration was discovered by XDA Recognized Developer Quinny899 (Kieron Quinn of Mighty Quinn Apps) and confirmed by us. With the Google Pay Send app uninstalled, we were able to activate the peer-to-peer payment functionality within the standard app and successfully send a payment. As you can see in the screenshots below, a new "send money" tab appears in the bottom toolbar. Tapping on this brings us to a page where we can send or request money from either an existing contact or new contact. Even a group request can be made on this page.

Google Pay Send, Android Pay, Google Wallet, Pay with Google Google Pay Send, Android Pay, Google Wallet, Pay with Google Google Pay Send, Android Pay, Google Wallet, Pay with Google Google Pay Send, Android Pay, Google Wallet, Pay with Google

Once this feature rolls out in the U.S. and U.K., you'll no longer need to install the separate Google Pay Send app to take advantage of the peer-to-peer payment functionality. For now, you'll have to keep both apps installed if you want to send or receive money to or from other people.

Google Pay Send (Free, Google Play) →

We'll keep an eye out on any new Pay features that we spot. The service continues to become more useful over time with new features like support for mobile boarding passes and event tickets (…almost like a wallet, no?) and sending money via Google Assistant.



from xda-developers https://ift.tt/2KlnwYq
via IFTTT

How EAS helps make the Google Pixel the fastest Android phone

Linux Kernel Energy Aware Scheduling

Far back in the past when Linux was just an idea in the mind of Linus Torvalds, CPUs were single-core entities which required an immense amount of energy for little power. The first ever commercially available processor, the Intel 4004, ran at a clock-rate of 740kHz on a single core. Back then, there was no need for a load scheduler. Load scheduling was reserved for the dual-core "behemoths" such as the IBM Power 4. These ran at a beastly 1.1GHz to 1.9GHz and required programs and the system to utilize these cores correctly. How did we get from these machines to software algorithms that make use of multiple cores? You may have heard of Energy Aware Scheduling (EAS) on our forums before. It's part of the reason why the Google Pixel smartphones perform so well. What's so great about EAS and how did we even get to this point? Before we can explain that, we need to talk about Linux load schedulers.


The Evolution of the Linux Load Schedulers

Round-Robin Scheduling

Round Robin Processing. Source: Wikipedia

Round robin processing is a simple concept to explain and understand, and an even simpler one to grasp its disadvantages. Round-robin uses time slicing to allocate time to each process. Let's assume we have four processes running on our computer.

  • Process A
  • Process B
  • Process C
  • Process D

Now, let's do the job of the round-robin scheduler. We will allocate 100 milliseconds (time-slicing) to each process before moving on to the next. This means Process A can take 100 milliseconds to do its processing, then it moves to Process B and so on. If an application's job takes 250 milliseconds to do, it will need to go through this process 3 times just to finish its work! Now scale this across different cores, so that Process A and Process B are allocated to core 1, and Process C and Process D are allocated to core 2. This was replaced by O(n) scheduling (which was like round-robin, but using epochs and allowing dynamic allocation of time), then O(1) scheduling (minimized overhead, unlimited process support), then finally the Completely Fair Scheduler (CFS). CFS was merged into the Linux kernel version 2.6.23 in October 2007. It has been overhauled since and is still the default scheduler in Linux systems.

Completely Fair Scheduler

The Completely Fair Scheduler has existed in Android since its inception and is used on non-big.LITTLE devices. It uses an intelligent algorithm to determine processing order, time allocated etc. It is an example of a working implementation of the well-studied scheduling algorithm called "weighted fair queueing." This basically focuses on providing priority to system processes and other high priority processes running on the machine. If it were to run on a big.LITTLE device, all cores would be perceived as equal. This is bad, as low power cores may be forced to run intensive applications, or even worse, the opposite may occur. The decoding for listening to music may be done on the big core, for example, increasing power consumption needlessly. This is why we need a new scheduler for big.LITTLE, one which can actually recognise and utilise the difference in cores in a power efficient manner. That's where Heterogeneous Multi-Processing (HMP) comes in, the standard load scheduler most Android phones are running now.

Heterogeneous Multi-Processing

This is the standard load scheduler for any big.LITTLE device released in recent years, other than the Google Pixel. HMP makes use of the big.LITTLE architecture, delegating low priority, less intensive work to the little cores which consume less power. HMP is "safe" wherein it knows what should go to the big cores and what should go to the little cores, without making mistakes. It just works and requires a lot less effort to set up on the development side than something like EAS, which we'll get into in a moment. HMP is just an extension of CFS to make it power aware.

HMP doesn't take guesses, nor does it predict future processes. This is good but is why the device cannot be as fluid as those running EAS and is also why it consumes slightly more battery. This, finally, brings us to Energy Aware Scheduling (EAS), which I firmly believe is the future in ROM and kernel development as more OEMs adopt it.

Energy Aware Scheduling

Energy Aware Scheduling (EAS) is the next big thing that users on our forums are talking about. If you use a OnePlus 3 (or a Google Pixel, obviously) you've definitely heard about it in the forums. It launched into the mainstream with the Qualcomm Snapdragon 845, so if you have one of these devices you already have an EAS-enabled smartphone. EAS in the form of kernels such as RenderZenith and ROMs such as VertexOS and PureFusion were taking the OnePlus 3 forums by storm in its prime. Of course, the Google Pixel also comes with EAS. With the promises of improved battery life and better performance, what's the catch?

Energy Aware Scheduling is not as simple as it is not universal to every device like CFS or HMP. EAS requires an understanding of the processor it is running on, based off of an energy model. These energy models are made by teams of engineers constantly testing and working to give an optimal performance. As the Snapdragon 820 and 821 are basically the same, custom kernels on the OnePlus 3 uses the Google Pixel energy model. Devices with the Snapdragon 845 can utilise EAS, and the OnePlus 6 does to some degree. It's not as tuned as a Google Pixel device would be, but it gets the job done. Here's an example of how, despite the OnePlus 6 having a better processor with EAS, the Pixel 2 XL still beats it in smoothness. Both of these images were taken from our speed-oriented review of the OnePlus 6.

If you have trouble understanding the graphs, you can take a look at the image below for guidance. Anything exceeding the green line indicates dropped frames and, in the worst cases, noticeable stuttering.

The OnePlus 6 implementation of EAS is interesting, as it doesn't appear to be a fully-fledged implementation like you'd find on a Google Pixel with the same SoC. The scheduler tunables don't make much sense either, so that probably explains why it's not as performance efficient as you'd expect. It's extremely conservative in power consumption, with the system prioritising the low power cores for the majority of the work.

Tunables are simply a set of parameters that are passed to the CPU governor, which changes how the governor reacts to certain situations in terms of frequency. The scheduler then decides where it places tasks on different processors. The OnePlus 6's tunables are set to prioritise work on low-powered cores. It also doesn't help that the Google Pixel 2 has a huge amount of input boost, keeping all 8 cores online all the time. Google also uses an interrupt balancer which helps to remove frame drops and improve performance.

So how does EAS work? Why is it so efficient only in certain conditions?

Energy Aware Scheduling introduces the need to use an energy model, and as mentioned above requires a lot of testing and work to make it perfect. EAS attempts to unify three different core parts of the kernel which all act independently, and the energy model helps to unify them.

  • Linux scheduler (CFS, mentioned above)
  • Linux cpuidle
  • Linux cpufreq

Unifying all 3 parts under the scheduler and calculating them together gives a potential for energy saving, as calculating them together allows them to be as efficient as possible. CPUIdle tries to decide when the CPU should go into an idle mode, while CPUFreq tries to decide when to ramp up or down the CPU. Both of these modules have the primary goal of saving energy. Not only that, it then categorizes processes into four cgroups, being top-app, system-background, foreground, and background. Tasks due to be processed are placed into one of these categories, and then the category is given CPU power and the work is delegated over different CPU cores. top-app is the highest priority of completion, followed by foreground, background, and then system-background. Background technically has the same priority as system-background, but system-background usually also has access to more little cores. In effect, Energy Aware Scheduling is taking core parts of the Linux kernel and unifying it all into one process.

When waking the device, EAS will choose the core in the shallowest idle state, minimising the energy needed to wake the device. This helps to reduce the required power in using the device, as it will not wake up the large cluster if it doesn't need to. Load tracking is also an extremely crucial part of EAS, and there are two options. "Per-Entity Load Tracking" (PELT) is usually used for load tracking, the information is then used to decide frequencies and how to delegate tasks across the CPU. "Window-Assisted Load Tracking" (WALT) can also be used and is what's used on the Google Pixel. Many EAS ROMs on our forums, such as VertexOS, opt to use WALT. Many ROMs will release two versions of the kernel with WALT or PELT, so it's up to the user to decide. WALT is more bursty, with high peaks in CPU frequency while PELT tries to remain more consistent. The load tracker doesn't actually affect the CPU frequency, it just tells the system what the CPU usage is at. A higher CPU usage requires a higher frequency and so a consistent trait of PELT is that it causes the CPU frequency to ramp up or down slowly. PELT does tend to stray towards higher CPU load reporting, so it may provide higher performance at a higher battery cost. Nobody can really say at this point in time which load tracking system is better, however, as both load tracking methods are getting continually patched and refined.

Either way, it's obvious that, regardless of the load tracking method used, there is an increase in efficiency. Rather than just processing tasks on any processor, the task is analyzed and the amount of energy required to run it is estimated. This clever task placement means that tasks get completed in a much more efficient manner while also making the system quicker as a whole. EAS is all about getting the smoothest UI possible with minimal power usage. This is where other external components such as schedtune come into play.

Schedtune is defined in each cgroup by two tunables which ensure finer control over the tasks to be completed. It doesn't just control the spread out of tasks over multiple CPUs, but also if the perceived load should be inflated in order to ensure time-sensitive tasks are completed quicker. This way, foreground applications and services that the user is availing of won't slow down and cause unnecessary performance issues.

While Energy Aware Scheduling is the next big thing, it can also be argued it's already here and has been for a while. With more and more devices hitting the mainstream with Energy Aware Scheduling, a new age of mobile processing efficiency is here.

The Pros and Cons of Round-Robin, CFS, HMP and EAS

While my graphics skills are sub-par, I have thrown together an image which should summarize what the pros and cons of each of these schedulers are.


I would like to extend a special thank you to XDA Recognised Contributor Mostafa Wael whose explanations of various aspects of EAS greatly helped in making this article possible. I would also like to thank XDA Recognised Developer joshuous, XDA Recognised Developer RenderBroken and XDA Senior Member Freak07 for his write up on EAS. For those of you who found interest in EAS-related parts, Linaro has a lot of documentation on EAS which you can read.



from xda-developers https://ift.tt/2KAj4Bd
via IFTTT

How EAS helps make the Google Pixel the fastest Android phone

Linux Kernel Energy Aware Scheduling

Far back in the past when Linux was just an idea in the mind of Linus Torvalds, CPUs were single-core entities which required an immense amount of energy for little power. The first ever commercially available processor, the Intel 4004, ran at a clock-rate of 740kHz on a single core. Back then, there was no need for a load scheduler. Load scheduling was reserved for the dual-core “behemoths” such as the IBM Power 4. These ran at a beastly 1.1GHz to 1.9GHz and required programs and the system to utilize these cores correctly. How did we get from these machines to software algorithms that make use of multiple cores? You may have heard of Energy Aware Scheduling (EAS) on our forums before. It’s part of the reason why the Google Pixel smartphones perform so well. What’s so great about EAS and how did we even get to this point? Before we can explain that, we need to talk about Linux load schedulers.


The Evolution of the Linux Load Schedulers

Round-Robin Scheduling

Round Robin Processing. Source: Wikipedia

Round robin processing is a simple concept to explain and understand, and an even simpler one to grasp its disadvantages. Round-robin uses time slicing to allocate time to each process. Let’s assume we have four processes running on our computer.

  • Process A
  • Process B
  • Process C
  • Process D

Now, let’s do the job of the round-robin scheduler. We will allocate 100 milliseconds (time-slicing) to each process before moving on to the next. This means Process A can take 100 milliseconds to do its processing, then it moves to Process B and so on. If an application’s job takes 250 milliseconds to do, it will need to go through this process 3 times just to finish its work! Now scale this across different cores, so that Process A and Process B are allocated to core 1, and Process C and Process D are allocated to core 2. This was replaced by O(n) scheduling (which was like round-robin, but using epochs and allowing dynamic allocation of time), then O(1) scheduling (minimized overhead, unlimited process support), then finally the Completely Fair Scheduler (CFS). CFS was merged into the Linux kernel version 2.6.23 in October 2007. It has been overhauled since and is still the default scheduler in Linux systems.

Completely Fair Scheduler

The Completely Fair Scheduler has existed in Android since its inception and is used on non-big.LITTLE devices. It uses an intelligent algorithm to determine processing order, time allocated etc. It is an example of a working implementation of the well-studied scheduling algorithm called “weighted fair queueing.” This basically focuses on providing priority to system processes and other high priority processes running on the machine. If it were to run on a big.LITTLE device, all cores would be perceived as equal. This is bad, as low power cores may be forced to run intensive applications, or even worse, the opposite may occur. The decoding for listening to music may be done on the big core, for example, increasing power consumption needlessly. This is why we need a new scheduler for big.LITTLE, one which can actually recognise and utilise the difference in cores in a power efficient manner. That’s where Heterogeneous Multi-Processing (HMP) comes in, the standard load scheduler most Android phones are running now.

Heterogeneous Multi-Processing

This is the standard load scheduler for any big.LITTLE device released in recent years, other than the Google Pixel. HMP makes use of the big.LITTLE architecture, delegating low priority, less intensive work to the little cores which consume less power. HMP is “safe” wherein it knows what should go to the big cores and what should go to the little cores, without making mistakes. It just works and requires a lot less effort to set up on the development side than something like EAS, which we’ll get into in a moment. HMP is just an extension of CFS to make it power aware.

HMP doesn’t take guesses, nor does it predict future processes. This is good but is why the device cannot be as fluid as those running EAS and is also why it consumes slightly more battery. This, finally, brings us to Energy Aware Scheduling (EAS), which I firmly believe is the future in ROM and kernel development as more OEMs adopt it.

Energy Aware Scheduling

Energy Aware Scheduling (EAS) is the next big thing that users on our forums are talking about. If you use a OnePlus 3 (or a Google Pixel, obviously) you’ve definitely heard about it in the forums. It launched into the mainstream with the Qualcomm Snapdragon 845, so if you have one of these devices you already have an EAS-enabled smartphone. EAS in the form of kernels such as RenderZenith and ROMs such as VertexOS and PureFusion were taking the OnePlus 3 forums by storm in its prime. Of course, the Google Pixel also comes with EAS. With the promises of improved battery life and better performance, what’s the catch?

Energy Aware Scheduling is not as simple as it is not universal to every device like CFS or HMP. EAS requires an understanding of the processor it is running on, based off of an energy model. These energy models are made by teams of engineers constantly testing and working to give an optimal performance. As the Snapdragon 820 and 821 are basically the same, custom kernels on the OnePlus 3 uses the Google Pixel energy model. Devices with the Snapdragon 845 can utilise EAS, and the OnePlus 6 does to some degree. It’s not as tuned as a Google Pixel device would be, but it gets the job done. Here’s an example of how, despite the OnePlus 6 having a better processor with EAS, the Pixel 2 XL still beats it in smoothness. Both of these images were taken from our speed-oriented review of the OnePlus 6.

If you have trouble understanding the graphs, you can take a look at the image below for guidance. Anything exceeding the green line indicates dropped frames and, in the worst cases, noticeable stuttering.

The OnePlus 6 implementation of EAS is interesting, as it doesn’t appear to be a fully-fledged implementation like you’d find on a Google Pixel with the same SoC. The scheduler tunables don’t make much sense either, so that probably explains why it’s not as performance efficient as you’d expect. It’s extremely conservative in power consumption, with the system prioritising the low power cores for the majority of the work.

Tunables are simply a set of parameters that are passed to the CPU governor, which changes how the governor reacts to certain situations in terms of frequency. The scheduler then decides where it places tasks on different processors. The OnePlus 6’s tunables are set to prioritise work on low-powered cores. It also doesn’t help that the Google Pixel 2 has a huge amount of input boost, keeping all 8 cores online all the time. Google also uses an interrupt balancer which helps to remove frame drops and improve performance.

So how does EAS work? Why is it so efficient only in certain conditions?

Energy Aware Scheduling introduces the need to use an energy model, and as mentioned above requires a lot of testing and work to make it perfect. EAS attempts to unify three different core parts of the kernel which all act independently, and the energy model helps to unify them.

  • Linux scheduler (CFS, mentioned above)
  • Linux cpuidle
  • Linux cpufreq

Unifying all 3 parts under the scheduler and calculating them together gives a potential for energy saving, as calculating them together allows them to be as efficient as possible. CPUIdle tries to decide when the CPU should go into an idle mode, while CPUFreq tries to decide when to ramp up or down the CPU. Both of these modules have the primary goal of saving energy. Not only that, it then categorizes processes into four cgroups, being top-app, system-background, foreground, and background. Tasks due to be processed are placed into one of these categories, and then the category is given CPU power and the work is delegated over different CPU cores. top-app is the highest priority of completion, followed by foreground, background, and then system-background. Background technically has the same priority as system-background, but system-background usually also has access to more little cores. In effect, Energy Aware Scheduling is taking core parts of the Linux kernel and unifying it all into one process.

When waking the device, EAS will choose the core in the shallowest idle state, minimising the energy needed to wake the device. This helps to reduce the required power in using the device, as it will not wake up the large cluster if it doesn’t need to. Load tracking is also an extremely crucial part of EAS, and there are two options. “Per-Entity Load Tracking” (PELT) is usually used for load tracking, the information is then used to decide frequencies and how to delegate tasks across the CPU. “Window-Assisted Load Tracking” (WALT) can also be used and is what’s used on the Google Pixel. Many EAS ROMs on our forums, such as VertexOS, opt to use WALT. Many ROMs will release two versions of the kernel with WALT or PELT, so it’s up to the user to decide. WALT is more bursty, with high peaks in CPU frequency while PELT tries to remain more consistent. The load tracker doesn’t actually affect the CPU frequency, it just tells the system what the CPU usage is at. A higher CPU usage requires a higher frequency and so a consistent trait of PELT is that it causes the CPU frequency to ramp up or down slowly. PELT does tend to stray towards higher CPU load reporting, so it may provide higher performance at a higher battery cost. Nobody can really say at this point in time which load tracking system is better, however, as both load tracking methods are getting continually patched and refined.

Either way, it’s obvious that, regardless of the load tracking method used, there is an increase in efficiency. Rather than just processing tasks on any processor, the task is analyzed and the amount of energy required to run it is estimated. This clever task placement means that tasks get completed in a much more efficient manner while also making the system quicker as a whole. EAS is all about getting the smoothest UI possible with minimal power usage. This is where other external components such as schedtune come into play.

Schedtune is defined in each cgroup by two tunables which ensure finer control over the tasks to be completed. It doesn’t just control the spread out of tasks over multiple CPUs, but also if the perceived load should be inflated in order to ensure time-sensitive tasks are completed quicker. This way, foreground applications and services that the user is availing of won’t slow down and cause unnecessary performance issues.

While Energy Aware Scheduling is the next big thing, it can also be argued it’s already here and has been for a while. With more and more devices hitting the mainstream with Energy Aware Scheduling, a new age of mobile processing efficiency is here.

The Pros and Cons of Round-Robin, CFS, HMP and EAS

While my graphics skills are sub-par, I have thrown together an image which should summarize what the pros and cons of each of these schedulers are.


I would like to extend a special thank you to XDA Recognised Contributor Mostafa Wael whose explanations of various aspects of EAS greatly helped in making this article possible. I would also like to thank XDA Recognised Developer joshuous, XDA Recognised Developer RenderBroken and XDA Senior Member Freak07 for his write up on EAS. For those of you who found interest in EAS-related parts, Linaro has a lot of documentation on EAS which you can read.



from xda-developers https://ift.tt/2KAj4Bd
via IFTTT

vendredi 29 juin 2018

How to fix the missing OEM Unlock button on the Samsung Galaxy S9/S8/Note 8

Snapdragon Samsung Galaxy S9

On any smartphone running Android 5.0 Lollipop and higher, you may find an option called 'OEM unlocking' in developer options. By toggling this option, you'll get the ability to unlock the bootloader on your device. Unlocking the bootloader lets you install a custom recovery such as TWRP, root your device to access system files, flash custom ROMs, modify the kernel, and much more. If you own the international/Exynos version of the Samsung Galaxy S8, Samsung Galaxy Note 8, or Samsung Galaxy S9 and you're missing the OEM unlock toggle, then there's a fix available.

Samsung allows unlocking the bootloader on the international versions of their phones. But on the Samsung Galaxy S8, Samsung Galaxy S9, and Samsung Galaxy Note 8, the 'OEM unlocking' option only becomes available after 7 days of activating the device and adding a Samsung or Google account to the device. If you would rather not wait 7 days or if even after 7 days the button is still missing, XDA Senior Member altai1963 has posted instructions about how to fix the missing 'OEM unlock' button on the Samsung Galaxy S8/S8+, Samsung Galaxy S9/S9+ and the Samsung Galaxy Note 8, too. The latter is not yet tested, but we're positive it'll work on it too.

Without any further ado, let's get started:

Fix Missing OEM Unlock Toggle on Samsung Galaxy S9/S8/Note 8

  1. First of all, open the Settings app on your Galaxy device;
  2. Go to General management > Date and time;
  3. Untick 'Automatic date and time';
  4. New options should appear. Tap 'Set date' and select any date from the last month, so that we can trick the system into thinking we've had the device for more than 7 days. In this case, we're selecting May 10th;
  5. Back out. In Settings, go to About phone > Software information;
  6. Tap on Build number 7 times to activate Developer options;
  7. Back out. In Settings, go to the newly added Developer options;
  8. Untick 'Auto update system';
  9. Back out. Go to Software update;
  10. Untick 'Download updates automatically';
  11. Tap on 'Download updates manually'. It may throw an error, but don't worry, that's absolutely okay;
  12. Reboot your device;
  13. That's it! 'OEM unlock' option should be available in the Developer options now.

After following the instructions, you'll be able to unlock the bootloader on your brand new Galaxy device. As I already mentioned, this method has been tested on the Samsung Galaxy S8, Samsung Galaxy S8+, Samsung Galaxy S9, and Samsung Galaxy S9+, but the Samsung Galaxy Note 8 should theoretically work, too.



from xda-developers https://ift.tt/2lGW74a
via IFTTT

How to fix the missing OEM Unlock button on the Samsung Galaxy S9/S8/Note 8

Snapdragon Samsung Galaxy S9

On any smartphone running Android 5.0 Lollipop and higher, you may find an option called ‘OEM unlocking’ in developer options. By toggling this option, you’ll get the ability to unlock the bootloader on your device. Unlocking the bootloader lets you install a custom recovery such as TWRP, root your device to access system files, flash custom ROMs, modify the kernel, and much more. If you own the international/Exynos version of the Samsung Galaxy S8, Samsung Galaxy Note 8, or Samsung Galaxy S9 and you’re missing the OEM unlock toggle, then there’s a fix available.

Samsung allows unlocking the bootloader on the international versions of their phones. But on the Samsung Galaxy S8, Samsung Galaxy S9, and Samsung Galaxy Note 8, the ‘OEM unlocking’ option only becomes available after 7 days of activating the device and adding a Samsung or Google account to the device. If you would rather not wait 7 days or if even after 7 days the button is still missing, XDA Senior Member altai1963 has posted instructions about how to fix the missing ‘OEM unlock’ button on the Samsung Galaxy S8/S8+, Samsung Galaxy S9/S9+ and the Samsung Galaxy Note 8, too. The latter is not yet tested, but we’re positive it’ll work on it too.

Without any further ado, let’s get started:

Fix Missing OEM Unlock Toggle on Samsung Galaxy S9/S8/Note 8

  1. First of all, open the Settings app on your Galaxy device;
  2. Go to General management > Date and time;
  3. Untick ‘Automatic date and time’;
  4. New options should appear. Tap ‘Set date’ and select any date from the last month, so that we can trick the system into thinking we’ve had the device for more than 7 days. In this case, we’re selecting May 10th;
  5. Back out. In Settings, go to About phone > Software information;
  6. Tap on Build number 7 times to activate Developer options;
  7. Back out. In Settings, go to the newly added Developer options;
  8. Untick ‘Auto update system’;
  9. Back out. Go to Software update;
  10. Untick ‘Download updates automatically’;
  11. Tap on ‘Download updates manually’. It may throw an error, but don’t worry, that’s absolutely okay;
  12. Reboot your device;
  13. That’s it! ‘OEM unlock’ option should be available in the Developer options now.

After following the instructions, you’ll be able to unlock the bootloader on your brand new Galaxy device. As I already mentioned, this method has been tested on the Samsung Galaxy S8, Samsung Galaxy S8+, Samsung Galaxy S9, and Samsung Galaxy S9+, but the Samsung Galaxy Note 8 should theoretically work, too.



from xda-developers https://ift.tt/2lGW74a
via IFTTT