FORUMS
Remove All Ads from XDA

[APP][UTILITY][15th April] Helix Engine 2.0.0.0-beta

6,181 posts
Thanks Meter: 13,385
 
Post Reply Email Thread

15th April ANNOUNCEMENT

NOTE: This app is currently in beta stage, meaning that the app is not bug-free, and stability may vary across devices. Future updates will improve on this!




Helix Engine roles:

Application Developer: ZeroInfinity, Profile Data Tuners: RogerF81, Mostafa Wael, Asiier

Quote:

History:


The idea was first thought of after Energy Aware Scheduling kernels started appearing during my time on the HTC 10 forums. The first problem was that there was no proper thermal solution could be implemented on Sense as thermal-engine relied solely on HTC's pnpmgr (Power N Performance Manager) and pnpmgr heavily depended on HMP, which was replaced by EAS. The second problem was that EAS was too demanding and during its early stages, it was too wild on the performance side. It needed to be tamed aggressively. The third problem was that we needed to find a way to improve battery life while impacting performance as little as possible. In the early iterations of Helix Engine, it consisted of the app engine, suspend engine, thermal engine, and powersaver engine.

The engine was written in C completely from scratch, compiled into an executable binary. The initial algorithm was to cap frequencies depending on certain conditions. The app engine reads from the battery, balanced, and performance lists, if a match is found comparing the package name in the list and the package name of the current top app, apply values depending on what profile that package name belonged to. The suspend engine would apply different values targeted for screen off usage (lower power consumption than battery profile from app engine). The thermal engine was a temporary solution for the lack of working thermal throttling drivers for EAS kernels, as the stock thermal throttling drivers on Sense ROMs relied heavily on pnpmgr (as mentioned in the first paragraph). It was an extremely basic thermal driver, definitely not the best solution but it was better than letting the device overheat. The power saver engine would check if the power saver toggle was checked, and if it was, it would apply battery profile settings for all apps.

If you are curious to see the development of Helix Engine in its early days, visit the link to my HTC 10 kernel thread here.

Quote:

What does it do?:
Helix Engine is now a native android application with an Accessibility Service which automates dynamic performance profile switching (battery/balanced/performance modes) to provide better efficiency, improve battery consumption and performance depending on your usage.

Quote:

System Requirements:
- Root (I think this is obvious but just in case it's not...)
- An ARM64-based (ARMv8) System-on-Chip/chipset/processor/CPU with big.LITTLE or DynamiQ (clustered CPUs)
- No other modifications which may tweak kernel tunables automatically (e.g. Advanced Kernel Tweaks)

FEATURES:
Quote:

If you are looking for absolute raw performance with an "always smooth" experience, not giving any thought to battery life, then this app is definitely not for you. This app is specifically for those who want good battery life, without compromising too much performance. No more deciding what the best "balanced" configuration is.

Quote:

App Engine:
Battery - low-performance mode to save power on apps that don't need that much power (e.g. Facebook, Messenger, Instagram, Reddit, apps that are generally for browsing)

Balanced - the default profile for apps that aren't in either Battery or Performance lists (normally newly installed apps). Apps that you think requires a decent amount of power, but not as much as the power intensive applications suitable for performance profile.

Performance - High-performance mode to enable buttery smooth gaming, as well as exceptional benchmark performance (if you are into that sort of thing). Also useful for very power intensive tasks like backup managers, file explorers (when transferring large files), media editing tools, camera apps, launchers (for fast app launches) etc.

Whitelist - Helix Engine will detect these apps and will avoid executing any scripts when they are in use. This prevents constant profile switching, very useful if you whitelist SystemUI (which becomes the top-app whenever you turn on the screen to the lockscreen, pull down the notification bar, or switching betwen recent apps. All which you will regularly use and it's just a waste of processing power to constantly switch whenever SystemUI is in the top-app group).

The engine detects which app is currently in use (in the top-app group), and will apply the profile's configuration according to the profile you've set the app to automatically.
For example, the battery profile's configuration is applied when an application that has been set to the battery profile has been detected as currently running. Apps set to balanced will apply the balanced profile's configuration. Apps set to performance will apply the performance profile's configuration. Apps set to whitelist will be ignored (i.e. no profile changes from the previous profile that was executed when the whitelisted app is in the top-app group).

Quote:

Applists Customization:
The engine allows users to set a profile for each individual app on their device. Different profiles correspond to what profile's configuration will be applied (see above in App Engine).

When customizing app lists, each selection you make is saved in real time. You may backup your app lists in Settings for easy backup and restore (Premium feature) if you move devices or wipe app data.

Quote:

Profile Data Customization:
Users can also configure each profile configuration to their personal preferences. Each configuration should be unique to its own profile.

For S835, S821, S820, Kirin 970 chipsets, the engine will load recommended pre-defined profile data for you. For every other device, you will need to configure each profile yourself as each chipset are different. There is a help card in each profile customization page to give you a general guideline of what you should be aiming for.

Quote:

Helix Engine Operation Modes:
Dynamic Powersaver: Only battery and balanced profiles are available, battery profile will apply suspend engine's configuration.
Dynamic Battery: Only battery and balanced profiles are available.
Dynamic Balanced: Battery, balanced, performance profiles are available.
Dynamic Performance: Only balanced and performance profiles are available.

OPERATION MODE DOES NOT MEAN APP ENGINE PROFILE! DO NOT GET THEM CONFUSED!

These operation modes may restrict the profiles you are allowed to choose from in the app lists. Additionally, dynamic powersaver will apply suspend engine's configuration on apps that have their profiles set to battery.

For example, certain operation modes will only allow certain profiles to be selected:
Dynamic Battery will only allow battery and balanced profiles to be set and used, but not performance.
Dynamic Balanced will allow all 3 battery, balanced, and performance profiles to be set and used.
Dynamic Performance will only allow balanced and performance profiles to be set and used, not battery.
Dynamic Powersaver is the same as dynamic battery, but battery profiles will apply suspend engine's configuration instead of standard battery profile's configuration.

If you select dynamic battery or dynamic powersaver operation modes, the performance app list is DELETED, making all previously set performance apps to be set to the balanced profile.
If you select dynamic performance, the battery app list is DELETED, making all previously set battery apps to be set to the balanced profile.

Quote:

Suspend Engine:
Puts your device in a low power state when the screen is off. This is available on every operation mode, it will apply suspend engine's configuration. You may disable this or force the engine to run strictly in ONLY this mode (for superior battery life, at the cost of performance) in Settings.

Quote:

Background Task Smart Checking:
When your screen is off, suspend engine kicks in, setting the phone in a low power state to gain superb idle drains. However, this is an issue if a performance-heavy task is running in the background as it will not get the maximum power the device can provide. To overcome this, the engine will check if a notification has changed, even when screen off. If a performance app is detected when notification has changed, it will use the performance profile while the app is running the background task. After the task has finished, usually the app will either remove the ongoing notification or change the notification to say it has finished, the engine will start the suspend engine again.

Quote:

Over-execution prevention:
The engine has a protection against constantly applying profile configurations when it is unnecessary. One example was mentioned before which is the whitelist profile you can set for applications in the App Lists page. The other way that the engine prevents this is by temporarily logging what profile was last executed. If the new application that has just been focused as top-application is set the same profile as the previous application you were on, it will not execute again since the values have already been applied from the previous one.

Take this scenario for example. You set Facebook and Messenger both to battery. You launch Facebook and it becomes the top-application, battery profile's configuration will be applied. Then you switch to messenger via recent apps and messenger becomes the top-application, battery profile's configuration will not be applied again because it was already applied in the application that was top-application before. The combination of whitelisting SystemUI with this method significantly increases the efficiency of how the engine runs.

Quote:

On-Boot Optimisation:
The app will apply some tunables on boot/when the service starts running so it can operate as intended, minimizing conflicts.

- Auto LMK (Low Memory Killer) configuration
Thanks to @ivicask for the idea and help with implementing this. The engine will apply recommended LMK values depending on the total RAM available on your device for excellent multitasking!

Quote:

Paid Features:
- Backup and Restore app lists: The engine will create a backup of the current state of your app lists and compress them into a zip. It will be created in /sdcard/Helix-Engine/applist-backups/applist_backup-[DATE-TIME] where [DATE-TIME] is replaced by the current date and time. When you restore app lists, you are given a choice of backups if you have multiple ones you want to restore specifically for an operation mode (since dynamic battery/powersaver will delete performance app list and dynamic performance will delete battery app list).

- Backup and restore profile data: The engine creates an XML file in /sdcard/Helix-Engine/engine_data.xml with the current configuration of all of your profiles. These backups can be shared and other people may restore them on their devices. Profile data can only be restored on devices with the same chipset model, kernel type, and kernel version as the device it was backed up on. So e.g., an S835 HMP config can only be restored on an S835 HMP device. An S820 EAS config can only be restored on an S820 EAS device. A device running XYZ Kernel can only be restored on a device running XYZ Kernel. HOWEVER, you change the kernel_version="XYZ-Kernel" in the engine_data.xml to kernel_version="any" in order to allow devices using any kernel to restore that profile data.

- View system apps: While the app applies pre-defined app lists at first launch, it will still apply pre-defined system apps in the app lists. This feature just allows you to display system apps in the app list UI and make it easier to change profile sets for system apps.

- Search through app lists using the search button in the action bar.

Quote:

ATTENTION: Devices that has some sort of settings option to prevent apps from launching on boot: MAKE SURE YOU ALLOW HELIX ENGINE TO RUN ON BOOT OR ELSE THE SERVICE WILL NOT RUN AUTOMATICALLY!!!

For Huawei users: Settings > Battery > App Launch > switch off Helix Engine and tick everything for Manage Manually dialog

If your device has a power manager, the app can fix the problem automatically. However, PLEASE MAKE SURE YOU BACK UP YOUR SYSTEM AND VENDOR (for treble-enabled devices) PARTITIONS BEFORE PROCEEDING WITH THE FIX!!! YOU HAVE BEEN WARNED!


DOWNLOAD HERE
Join the G+ Community here for Alpha testing channel (releases in this channel can be very unstable and buggy)

Quote:

Massive thanks to Chris@Honor_USA for supplying me with a Honor View 10 to develop on! Without this, I would not be able to provide proper support for Kirin 970 chipsets!
Massive thanks to @RogerF81 for maintaining all of the scripts for Helix Engine and alpha/beta testing! Also inspiration for ideas
Thanks to @Mostafa Wael for encouraging me to jump to Oneplus, giving some ideas on improving the engine, and beta testing!
Thanks to @Asiier for integrating AKT with Helix Engine and helping us improve our scripts!
Thanks to @geko95gek for also encouraging me to jump to Oneplus!
Thanks to my team members at Team Helix for supporting me!
Thanks to @ivicask for giving me the idea of the concept for this engine before it was created. Without him, I wouldn't even have started this project. Also massive thanks to him for helping us with LMK tweaks, giving us pointers on what to improve!
Thanks to @afafontes for helping us improve and fix bugs with the scripts.
Thanks to anjlab for in-app billing library (Source)
Thanks to @topjohnwu for libsu library (Source)

Quote:

Signature Graphics:

Donations are completely optional and are always greatly appreciated: https://www.paypal.me/ZeroInfinityXDA
The Following 133 Users Say Thank You to ZeroInfinity For This Useful Post: [ View ] Gift ZeroInfinity Ad-Free
 
 
6th February 2018, 04:22 PM |#2  
ZeroInfinity's Avatar
OP Senior Member
Flag Brighton & Hove
Thanks Meter: 13,385
 
Donate to Me
More
Post #2: Frequently Asked Questions
Information regarding issues with ARM64 chipsets that do not utilize big.LITTLE or have clustered CPUs, and ARM chipset support.

Known issues with specific ROMs/Kernels:
Quote:

Caesium kernel (Tested, OnePlus 3T) - will cause random reboots/bootloop with this engine. Flash a different kernel if you want to use this app.
Resurrection Remix ROM (Tested, OnePlus 3T) - uses Caesium kernel as default. Flash a different kernel if you want to use this app.
Jaguar ROM (Tested, Lenovo ZUK Z2) - Causes unexpected behaviour with this app. Do not use with this ROM.

Known OEMs with Power Managers:
Quote:

HTC - pnpmgr
Huawei - perfgenius
ZTE - You must disable "Smart power-save" in Settings > Power manager

FAQ:
Quote:

Q1: How do I uninstall?

A: Uninstall the app like you normally would. If you have applied the automatic fix for power manager, restore your system or vendor (if you are on a treble-enabled device) partition. If you are on a treble-enabled Huawei device, it is MANDATORY to restore your vendor image to get perfgenius to work again. The device will not perform well without perfgenius.


Q2: How do I know if this is working?
A: Use these tools: https://drive.google.com/open?id=1jT...hpSCd9kgfnVgeC to debug the app and check if CPU freqs change to your profile configurations when switching apps or turning off the screen.


Q3: How do I check if I have a power manager in my ROM?
A: If you don't know if your ROM has a power manager, try underclocking your phone or tweak the governor. Power managers usually overwrite your applied values. Refer to Q2 for debugging tools to check if your values get overwritten over time.


Q4: Does the app need to be set to "Not optimized" in Battery optimization settings? Does the app start on boot automatically?
A: No that is not necessary. Yes, the app should start on boot automatically.


Q5: I'm getting superuser toast notification spam, any way to prevent this?
A: Magisk Manager > Superuser > tap on Helix Engine > turn switch off for bell icon on the left


Q6: App Lists is not loading for me!
A: Give it time, it may take up to 30 seconds for the list to load depending on your device.


Q7: Unlocking seems to be slower than usual/has delays/lags
A: Raise suspend engine freqs in profile data customization.


Q8: Can I use a kernel manager app like EXKM?
A: You can, but you must not apply tweaks that Helix Engine already applies (e.g CPU frequencies or governors)

The Following 38 Users Say Thank You to ZeroInfinity For This Useful Post: [ View ] Gift ZeroInfinity Ad-Free
6th February 2018, 04:23 PM |#3  
Mostafa Wael's Avatar
Recognized Contributor
Gotham
Thanks Meter: 5,345
 
More
Reserved 2
The Following 10 Users Say Thank You to Mostafa Wael For This Useful Post: [ View ] Gift Mostafa Wael Ad-Free
6th February 2018, 04:25 PM |#4  
RogerF81's Avatar
Senior Member
Flag Mannheim
Thanks Meter: 1,000
 
More
Here are two examples of what is possible
Setup: OnePlus 5, Stock OOS 5.0.4, Flash Kernel 3.17 build, selected dynamic battery mode.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20180328-234851.jpg
Views:	2278
Size:	132.2 KB
ID:	4460333   Click image for larger version

Name:	Screenshot_20180328-234856.jpg
Views:	2248
Size:	137.3 KB
ID:	4460334   Click image for larger version

Name:	Screenshot_20180319-094702.jpg
Views:	2242
Size:	129.3 KB
ID:	4460335  
The Following 11 Users Say Thank You to RogerF81 For This Useful Post: [ View ] Gift RogerF81 Ad-Free
6th February 2018, 04:42 PM |#5  
shadowstep's Avatar
Senior Member
Flag Ambala, HR
Thanks Meter: 1,813
 
Donate to Me
More
Awesome! I've been waiting for this! Was following the progress closely on GitHub. Nice to see this here officially!
The Following User Says Thank You to shadowstep For This Useful Post: [ View ] Gift shadowstep Ad-Free
6th February 2018, 05:11 PM |#6  
geko95gek's Avatar
Recognized Contributor
Flag Establishing Battlefield Control... Standby!
Thanks Meter: 7,104
 
Donate to Me
More
That's one hell of a long OP. 😂

Well done tho mate, can see a lotta work went into it.
The Following 5 Users Say Thank You to geko95gek For This Useful Post: [ View ] Gift geko95gek Ad-Free
6th February 2018, 05:46 PM |#7  
Senior Member
Thanks Meter: 72
 
More
It might just be me but I am seeing a more stuttering after flashing this engine .
6th February 2018, 05:51 PM |#8  
ZeroInfinity's Avatar
OP Senior Member
Flag Brighton & Hove
Thanks Meter: 13,385
 
Donate to Me
More
Quote:
Originally Posted by prajnay

It might just be me but I am seeing a more stuttering after flashing this engine .

Depends on what app you use, for battery apps, it may feel slower than normal (to prevent these battery apps from draining unnecessary amount of power). However, games and using the launcher should have no problems as it'll execute the performance profile. If battery profile is too slow for you, I'll discuss it over in my team so we can tune it a bit more towards better performance (at cost of a bit of battery).

This is currently in BETA so there will be some hiccups here and there, we will need feedback from a lot of people so we can fine tune it some more until most people are satisfied.
The Following User Says Thank You to ZeroInfinity For This Useful Post: [ View ] Gift ZeroInfinity Ad-Free
6th February 2018, 06:31 PM |#9  
Senior Member
Thanks Meter: 589
 
More
I'm literally blown away or maybe over whelmed by that OP.
The Following User Says Thank You to SlyUK For This Useful Post: [ View ] Gift SlyUK Ad-Free
6th February 2018, 11:21 PM |#10  
Senior Member
Thanks Meter: 34
 
More
been using for a few hours........browsing.....watching video....taking picture. had it freeze on me while in the camera, after zooming, takign picture, and moving the phone it froze. had to power down because my phone went totally unresponsive. im idle drain is insane though. down to 0.36%/h from about 1.5%/h.


as im writing this i tested to camera malfunction again and it malfunctioned yet again. on OOS 5.0.2 blu_sparks kernel. and also experiencing sluggish scrolling in instagram.

edit: added some stuff
6th February 2018, 11:44 PM |#11  
Member
Thanks Meter: 14
 
More
Would like to try, only one question. How to remove after flash? Apk unninstal, magisk module delete, but what about flashable aroma zip? Thanks for you awesome work!
Post Reply Subscribe to Thread

Tags
engine, helix, profile, script, tweaks

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes