[App]14.03.2011 SuperPower v0.80 Battery save:Data, Wi-Fi, BT, GPS, 2G/3G/4G, CPU mhz

Search This thread

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,856
www.chainfire.eu
THIS IS AN UNSUPPORTED EXPERIMENTAL BETA APPLICATION, BUGGY, USE AT YOUR OWN RISK. PLEASE READ THE ENTIRE POST BEFORE USING.

About

SuperPower attempts to save battery power by controlling various power hungry components and features of the device. Its features include managment of the cellular data connection, Wi-Fi, Bluetooth, CPU speed and 2G/3G band. It does all this automagically based on the options you configure.

There are more battery saver apps out there, but none that work the way I want them to. It is however meant to work relatively simply. If you want uber-fine-grained control use one or a combination of the other applications available.

SuperPower also serves as somewhat of an Android port of WMLongLife.

BETA, Development & Testing

This application is in beta stage and far from finished. There will be bugs, and the list of things that still need to added, changed, refactored, streamlineed, etc is long.

Primary testing and development is done on a Galaxy S (unbranded, EU, I9000) device, but I also run tests on a G1 and a Hero. Other users have reported it (mostly) works on the Droid, Milestone, Nexus, Desire, Pulse, EVO.

Android version

SuperPower requires Android 1.6 or newer. Some features require newer versions, and some features have a different code path on different Android versions.

For example, Bluetooth features require Android 2.0, while the download speed tracker (to not disable data while downloading) requires Android 2.2. Features are automatically disabled if they are not available for your Android version.

Main features

Control over
- Cellular data
- Wi-Fi
- WiMAX * Android 2.2+ *
- Bluetooth * Android 2.0+ *
- CPU speed * ROOT *
- Bands (2G/3G) * ROOT *
- GPS * ROOT, PATCH, Android 2.2+ *
- Auto-Sync
- Background data * ROOT, PATCH, Android 2.2+ *

Automatic management of the above based on
- Screen state
- Wi-Fi network connection state
- WiMAX network connection state
- Lock screen visibility state
- Download speed
- Foreground application
- Tethering state
- Sleep mode
- Low battery state
- Charging state

Other

- Schedule data connection to be available at certain times

- Schedule night mode

- Informative toasts in response to user actions

- Status bar notifications about the current state, which you can tap to change

- Provides handy shortcuts you can add to the home screen for easy access of a number of functions

Additional features

- Enable/disable data is non-persistent. APNs are not modified! This is no longer true on Gingerbread (2.3) and newer due to changes in Android security. Here either data is disabled entirely (Settings -> Wireless and network -> Mobile networks -> Use packet data, or APNs are modified (Access Point Names in the same menu).

- 2G/3G switching is supported in two different ways: RIL injection (highly experimental, any ROM, possible side effects) and Sidekick (AOSP ROMs signed with platform test keys, or using patching)

- Completely event based, no polling, ever.

Future features

I have a LOT of them already in my to-do list. However, if you have any ideas feel free to post them. To name a few that are already on my list: configuration wizard, widget, GPS control, mapper, signal-strength based 2G/3G. Of course improvement to current features, fixing bugs, etc are also on my (perpetual?) to-do list.

Screenshots

15
16
17


Conclusion, copyright and download

NOTICE: At this time I may not respond to each and every posts and questions. I do guarantee I will read every post and take what you write under consideration! Please report all your findings.

Copyright: This app is fully my copyright. You may not distribute it without prior explicit consent from me! So no, you're not allowed to include it in your ROMs either :)

----

Release notes: The changelog (a few posts down) contains links to version-specific release notes, if there are any.

SuperPower can be found on Market under the name "SuperPower XDA-BETA". The QR code below will take you there:

13


Direct market link: market://details?id=nl.morose.superpower
Appbrain link: http://www.appbrain.com/app/nl.morose.superpower

It is on Market instead of being for download here because Market tracks force closes. This will help me debug :)

(Original APK downloads <<< 0.60: 705)
 
Last edited by a moderator:

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,856
www.chainfire.eu
FAQ - Frequently Asked Questions

Index
- General
--- Will this prolong battery life ?
--- I want feature X, but it isn't included
--- I expected X to happen, but Y happened
--- I found a bug

- Data connections
--- The connection state changed, but didn't change back when I expected it to

- System popups
--- The PIN screen pops up sometimes
--- The locks screen pops up sometimes

- 2G/3G
--- A band switch is being performed even though I'm already in the mode it is switching to
--- What is the difference between the RIL injection and the Sidekick method ?
--- Even though I have root, the 2G/3G switching options are disabled (CDMA)
--- Band switching takes too long, is this a bug ? Can it be improved ?
--- I'm in 2G mode but my device switched back to 3G

- CPU
--- The device never wakes from sleep
--- Using tool X shows me that CPU speed is never changed


General: Will this prolong battery life ?
Quite probably, yes, significantly! BUT, there is never a guarantee. It all depends on how you use your device, the current conditions, and how you configure SuperPower. Some options in general save a lot of battery, but may be too inconvenient for you to use (specifically 2G/3G switching), and if you still want to use them, some playing with the various options may be needed to get it to work with the least amount of inconvenience to your usage pattern.

If you are a very heavy user, no amount of software is going to help you (much). You need a bigger battery (or a spare). If all you use your device for is streaming YouTube, chances are battery life improvements you will see are little to none.

CPU scaling may have less effect than expected. The amount of battery it saves has differed wildly between tests on different devices.

Using Wi-Fi may use significantly less power than using 2G/3G. Or, 2G/3G may use significantly less power than using Wi-Fi. It depends on the situation, the signal strength of both cellular and Wi-Fi, the transfer speed, etc.

Using 2G instead of 3G will generally speaking use less battery for most users, but this is not a given. It depends on the situation.

All in all however, the default SuperPower configuration will provide you with a setup that will save a lot of battery for the average user, with little to no inconvenience to the user.


General: I want feature X, but it isn't included
Feel free to request the feature in this thread, even if this feature is already listed in these posts that it will be implemented sooner or later. If feature X is posted about 10 times, and feature Y only 3 times, that may have an effect on the priority of implementation.


General: I expected X to happen, but Y happened
Please go through the entire configuration to make sure you haven't configured anything that causes this behaviour Y before posting here. Also read through this FAQ and the known issues. It is of course possible you have found an undocumented bug, if so please report it here (see "I found a bug")


General: I found a bug
If you post it here, perhaps we can do something about it. But first, please check your configuration first to make sure it is unexpected behaviour. When posting about a bug, always include the relevant SuperPower configuration options, exactly which device you are using, which ROM, etc. More information is usually better !


Data connections: The connection state changed, but didn't change back when I expected it to
In the default configuration, SuperPower will "upgrade" connection states as soon as possible, but general only "downgrade" them when you aren't looking.

For example, turning on data will be done as soon as you need it; while turning off data will generally be done only a while after the screen goes off. The same goes for for example 2G/3G. Switching to 3G will happen as soon as possible, switching to 2G will not be done immediately.

This does all depend on your SuperPower configuration, though!


System popups: The PIN screen pops up sometimes
On some devices certain actions can cause the PIN screen to popup when for example bandswitching or coming out of airplane mode.

If you enter your PIN code in the SuperPower configuration and you have such a device, SuperPower will attempt to automatically enter the PIN code for you - IF it understands it was one of SuperPower's actions that caused the PIN popup. An overlay screen will be presented to you while the PIN is entered and the SIM unlocked.

This is however an experimental feature, may not work 100% of the time, and can cause some inconvenience. If you find this highly annoying, but you do want to use the features SuperPower provides that may cause this behaviour, you can disable the PIN screen altogether in the device's settings application.


System popups: The lock screen pops up sometimes
Like the PIN screen, on some devices certain actions can cause the lock screen to popup. SuperPower actively counters this behaviour while it is performing actions. Should it still happen, please report it (and the exact situation that caused it), specific code that prevents this behaviour may need to be added to code in additional places.


2G/3G: A band switch is being performed even though I'm already in the mode it is switching to
It is not always possible to detect the current 2G/3G state. In that case, SuperPower will treat the current mode as undefined, and any trigger that will cause either 2G or 3G mode will result in a band switch being performed, regardless of what the current actual state may be. This is also a reason to not use the device's settings app (or any other app) to switch between 2G/3G when SuperPower is also using 2G/3G functionality. Always use SuperPower (and only SuperPower) to perform the band switch!


2G/3G: What is the difference between the RIL injection and the Sidekick method ?
RIL injection is as hackery as hacks come, and is currently only available for GSM devices. It completely circumvents most of Android and tries to force commands to be sent to the radio.

Sidekick on the other hand will use the same method as the device's settings screen to trigger a band switch, and is therefor both safer and faster to use. It does unfortunately require a compatible ROM. Carrier / manufaturer ROMs are usually not compatible, and not all custom ROMs are compatible either. Sidekick is available both on GSM as well as CDMA devices.

If your ROM is Sidekick compatible, Sidekick will always be used instead of RIL injection.

Both methods have not been extensively tested on a wide range of devices yet. So neither method may be compatible with your device. Please post here if neither method works on your device.


2G/3G: Even though I have root, the 2G/3G switching options are disabled (CDMA)
RIL injection is currently only supported on GSM devices. Only the Sidekick method supports CDMA at the moment.


2G/3G: Band switching takes too long, is this a bug ? Can it be improved ?
Band switching will take time, and inconvenience you. There is no way around this. The phone has to drop the network connection and completely reconnect to the tower.

However, in some cases it does take longer than in other cases. The Sidekick method provides the fastest band switching available, but is not compatible with many ROMs. If your ROM is compatible, though, Sidekick will be installed and used automatically instead of RIL injection.

When the RIL injection method is used (which will probably be for most users), band switching speed depends heavily on the device. Some devices are fairly quick with RIL injections, others are slow. If you have a device that requires your PIN code for operations such as band switching and coming out of airplane mode, band switching will also take significantly longer.

Depending on all these factors, band switching can take anywhere between 10 seconds and a minute. Band switching will usually save a lot of power, but you have to consider wether the extra battery life is worth the inconvenience.


2G/3G: I'm in 2G mode but my device switched back to 3G
Some devices are known to do this. If it happens to you, please post about it. An attempt a viable workaround is on the to-do list.


CPU: The device never wakes from sleep
Not all devices work perfectly with CPU scaling. If this happens, reboot your phone, go into SuperPower configuration, and switch the "ondemand" setting under "Root features". If that doesn't work, you'll just have to disable CPU scaling.


CPU: Using tool X shows me that CPU speed is never changed
The CPU speed cannot be easily changed on all devices. Some devices/firmwares are "perflocked". Disabling perflock is beyond the scope of SuperPower, and thus SuperPower will make no attempt to disable it. There are tools out there that can disable perflock on many devices that have it, for example, check out SetCPU.
 
Last edited:

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,856
www.chainfire.eu
Known issues

- IMPORTANT BUG - WARNING In various Android 2.1 (Eclair) builds there is a bug with push email. In case there is no data connection available, the background email service will go absolutely insane. It will use quite some CPU power constantly, and it will not let the device go to sleep - ever! I do not know if this bug existed before 2.1, and I have not seen the issue on 2.2 ROMs. If you are suffering from this, or suspect you are suffering from this, disable all the options in SuperPower to disable the cellular data connection.

- SuperUser: SuperPower does use a lot of root commands if you have root. You might want to configure SuperUser to not show toast notifications for every single request.

- State: Current state detection is not perfect yet and needs some improvements. I would advise trying to limit changing options in the application to times when Wi-Fi is off and you are in 3G mode as much as possible, just to be sure.

- Wi-Fi: Occasionally Wi-Fi and cellular data states will conflict, causing cellular data to be set to active when Wi-Fi is on. Happens sporadically.

- CPU Scaling: On the I9000 and family, you should (in my experience) enable the "ondemand" option if you are using CPU scaling. If you don't, and the device is in "suspend" mode, an incoming phonecall may crash the device.

- CPU Scaling: SuperPower makes no attempt to detect or disable perflock. If you have a perflocked device, you need to use SetCPU (or some other tool) to disable perflock on boot.

- CPU Scaling: SuperPower attempts to detect the possible CPU speed settings, and will choose the nearest value below half the maximum CPU speed as "low speed" frequency. The actual number chosen is stated in the description of the relevant option.

- CPU Scaling: I know some overclocked ROMs require the device to always be at this overclocked speed to prevent the device crashing during sleep. If you are using an overclocked ROM and encounter the "sleep of death", disable CPU Scaling.

- Roaming: SuperPower has not been tested while roaming at all. I suspect - but am by no means sure - there may be issues regarding the cellular data connection while roaming and you have set the device to disallow data entirely (while roaming). Let me know if you encounter any that seem directly related to roaming.

- Application specific: Applicatoin specific settings do not go into effect if the app is reached through the back-button, only if started through the launcher (or by some other app)

- Lock screen: Even if the "dont do ... while lockscreen visible" options are enabled, these actions may still happen if triggered by an application specific options

- 2G/3G: On some devices the device itself will automatically switch back to 3G, it will not stay in 2G for very long
 
Last edited:

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,856
www.chainfire.eu
Changelogs

14.03.2011 - v0.80 BETA - Release Notes
- Adjusted reboot code
- Adjusted preference save/load code
- Adjusted Sidekick install code (hopefully for the better)
- New version of Sidekick
- Uses ITelephony data controls on pre-Gingerbread
- Uses secure settings patch, Sidekick, or APN-based data controls on Gingerbread, depending on availability

18.11.2010 - v0.75 BETA - Release Notes
- Adjusted some description in config app
- Adjusted shortcut text for "wake up"
- Added "running" notification. This will make sure that there is always a SuperPower notification in the statusbar while SuperPower is running
- Adjusted when some notifications show or do not show based on other notification states
- Added WiMAX notification + 4G icons
- Added WiMAX shortcuts + 4G icons
- Categorized the shortcut selection screen
- Options the device is not capable of are now disabled in the shortcut selection screen
- Added low battery mode override: charging
- Added low battery mode override: screen on
- Added low battery mode override: lock screen
- Fixed option to disable cellular data when WiMAX is connected to a network
- Added "reboot" permission, may fix issue with patch on some devices
- Adjusted screen-on timeout cancel code
- Added option to delay service start at boot. May solve issues with users running a temp-root-at-boot like VISIONary (warning: not tested)
- Adjusted "application requires data when screen is off" handling
- Added option to kill app on screen off (partially working on 2.2)
- Added option to use "3G-only" mode for 3G to root features
- Fixed an issue with bandswitching (would sometimes detect "complete" before switching started)
- Fixed an issue with bandswitching (would not re-evaluate state after leaving lock state)
- Reworked state and wakelock clearing at screen on / screen off / unlock (fixes lockscreen data/wifi/etc on issue)
- Added option to not disable "other" interfaces (Wi-Fi, WiMAX, etc) while download speed is over X KB/s

- Update on MIUI issue: bug report submitted to MIUI devs. Hopefully they can devise a workaround
- Update on Wi-Fi error: still not properly reproducable. No closer to finding a solution (or the problem, even)
- Update on App Specific options: Still needs an overhaul and a lot of extra options! :)

04.11.2010 - v0.71 BETA - Release Notes
- Fixed FC on Sidekick install fail OK click
- Fixed checkmark on Sidekick install cancel remaining
- Bluetooth support changed to API level 5 and up (Android 2.0)
- WiMAX suppport changed to API level 8 and up (Android 2.2)
- Airplane bug fixed. Cause: WiMAX functions do not work on pre-2.2, SuperPower switches to airplane mode instead of turning off WiMAX
- Secure settings patch and force sidekick install limited to API level 8 and up (Android 2.2)
- Adjusted patching text for modify secure settings

03.11.2010 - v0.70 BETA - Release Notes
- AdFree workaround (may cause delay during first-time-since-reboot load)
- Updated AdMob SDK
- Fixed bug with AdMob
- Modify secure settings (Patch, ROOT), required for GPS and background data options
- Alternative method for Wi-Fi on/off
- Wi-Fi, Bluetooth, WiMAX, GPS, "turned off by screen off" states now persistent, will survive crashes
- Persistent states cleared on boot
- If service is restarted due to crash, it is now loaded correctly
- Fixed crash when entering app-specific screen
- Modified "changed settings" update in background service, should reduce lag in config app
- Renamed "sleep mode" to "night mode"
- PIN code setting now (correctly) states it requires 2.0 if older version detected
- Implement setting Auto-Sync (Android 2.0+) and Background Data (Patch, ROOT) based on network connectivity
- Added master switch to en/disable application specific options
- Nightmode bluetooth on wake is now disabled if bluetooth not supported
- Added GPS options (Patch, ROOT)
- Adjusted multiple config settings: if no root is detected but is needed, options now have the correct "root required" summary
- Added WiMAX functionality
- Scheduled data wakeup during sleep mode disabled
- Adjusted a number of default settings
- Scheduled data is now performed automatically when coming out of night mode
- Intensely modified handling of Sidekick-based switching to accomodate some devices
- Sidekick switching now disables the data connection before attempting a switch
- Added scheduled wake up time to night mode quick list
- Alternative Sidekick installation path for non-AOSP ROMs with root

28.10.2010 - v0.64 BETA (DEBUG)
- Attempted fix for WiMAX detection force close (Market reported crash)
- Additional logging in startup screen, hopefully help finds the problem for the "blank screen" issue
- Additional logging to test WiMAX features
- Possible fix for app-specific options listed apps that are no longer installed

27.10.2010 - v0.63 BETA
- Adjustment to data off during low battery, no longer turns off when battery low but charging and "do not turn off while charging" is set, when leaving airplane mode
- Adjustment to data off during lock screen, scheduled data and charging states now override this setting
- Adjustment to service keep-alive
- Refactored settings screen (50% code reduction)
- New functionality - sleep mode
- New shortcut - sleep mode
- New shortcut - wake up
- New notification - sleep mode + tap to wake up
- New sleep mode launcher + statusbar icon
- New wake up launcher icon
- Implemented set alarm detection code
- Added some code to detect set alarms. This is not available through an API so is trial-and-error. Seems to work on most devices I've tried.
- Added "Do not switch to 3G when Wi-Fi network is connected" option

24.10.2010 - v0.62 BETA
- Attempted fix for CPU functions force close on unknown model (Market reported crash)
- Attempted fix for AsyncCreate.onPostExecute force close (Market reported crash)
- Temporarily disabled AdFree detection, until a workaround can be devised

22.10.2010 - v0.61 BETA
- Left Sidekick in testing mode. Caused it to be unavailable. Fixed.

21.10.2010 - v0.60 BETA
- State detection improvements
- Changed GSM: RILD_AUTO --> RILD_GSM_WCDMA (for Nexus 1, works according to Jug6ernaut)
- Changed CDMA: RILD_AUTO --> RILD_CDMA_EVDO (for Droid, works according to Captainkrtek)
- Added download speed check option, before turning off data or switching to 2G. API Level >= 8
- Modifications to detecting application start, no longer requires root + bug fix
- Click app title opens thread on XDA-Developers
- Re-arranged user interface into sections
- Ad-supported version no longer runs when AdFree is installed
- Created APK that disables ads (for donator version)
- Removed a LOT of SU calls
- Data schedule aborts when airplane mode detected
- Bandswitch aborts when airplane mode detected
- Last wanted data-state / band-state applied when coming out of airplane mode
- Post-wakelock-release vibration now optional (debug section)
- Added per-app selection of 3G / data during sleep (new) options
- Adjusted some item titles and summaries
- Many speed and load improvements across several functions
- If PIN code is entered in configuration, SuperPower will show a screen and unlock the device during certain operations, if needed. API Level >= 5
- Added option to switch to 3G when tethering
- Bluetooth options added. API Level >= 5
- Screen off states no longer set when screen goes off due to phonecall+proximity sensor
- Added low battery mode
- New shortcut - override low battery mode
- New shortcut - cancel override low battery mode
- New notification - low battery mode + tap to override
- New notification - low battery mode overriden + tap to re-enable
- New notification - 2g mode + tap to switch to 3g
- New notification - 3g mode + tap to switch to 2g
- New notification - nag
- New generic statusbar icon
- New 2G launcher icon + statusbar icon
- New 3G launcher icon + statusbar icon
- New low battery launcher + statusbar icon
- New low battery override launcher + statusbar icon
- Application specific settings: re-arranged order, configured at top
- Added lock screen options, to specify wether or not actions may be performed during screen on or only after unlock
- Improved detection that band switch is complete

- New known issue: applicatoin specific settings do not go into effect if the app is reached through the back-button, only if started through the launcher
- New known issue: even if the "dont do ... while lockscreen visible" options are enabled, these actions may still happen if triggered by an application specific options

14.10.2010 - v0.51 BETA
- Settings activity: modified descriptions of "root features" to show why they are disabled, if they are disabled
- CreateShortcut activity: ads added
- Settings & CreateShortcut activities: automatic shutdown, prevents popping up the main screen when clicking a shortcut
- Portrait lock (prevents lengthy re-loading at rotate)
- Added screen state detection for API Level >= 5 (reflection)
- CPU scaling: detect if ondemand or conservative is available, and set it if current governor is something else. Should support more devices.
- CPU scaling: fixed a number of possible FC's by adding missing NullPointer checks
- Service load is now multithreaded (prevents ANRs)

14.10.2010 - v0.50 BETA - Initial release
 
Last edited:

Madic

Member
Jul 2, 2010
40
1
Thank you. Will also test your application.
Interesting for me is the function, turning of data connection when wifi is active because this month, I've only gprs speed.
My Galaxy S downloaded Asphalt through the Data Connection although wifi was available...and I did this 2 times -_-

One "error", maybe missconfigured: If the screen is off, and I turn it back on I've no network.
Even the network from my provider was not active. So there is no phone connection nor receiving sms possible.
When I turn the screen back on, it rapidly connects to my provider.

Maybe you can give me a hint what I missconfigured
 

mrruin

Senior Member
Aug 6, 2010
235
134
great app, it is working very well for me. Turns off data connection when screen is off and turns on every 15 minutes for 2 minutes to allow autosync. Exactly what I need for power saving since with 2g only and no active auto-sync I am saving a LOT of power.
 

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,856
www.chainfire.eu
Thank you. Will also test your application.
Interesting for me is the function, turning of data connection when wifi is active because this month, I've only gprs speed.
My Galaxy S downloaded Asphalt through the Data Connection although wifi was available...and I did this 2 times -_-

One "error", maybe missconfigured: If the screen is off, and I turn it back on I've no network.
Even the network from my provider was not active. So there is no phone connection nor receiving sms possible.
When I turn the screen back on, it rapidly connects to my provider.

Maybe you can give me a hint what I missconfigured

When you mean the network is not "active", do you have a "white circle with a line through it" icon ?

Do you have 2G/3G switching enabled ? The above is exactly what would happen if:

- You have enabled switch to 2G when screen goes off, and you turn on the device while the device is switching to 2G

- You have enabled switch to 3G when screen goes on

In both cases it is a temporary situation that takes about 10 seconds to resolve. Unfortunately switching between 2G and 3G takes time.
 

titooo7

Senior Member
Sep 29, 2010
1,687
4,468
London
Thanks Chainfire. I will try this app and I’ll let you know if I find any bug or I got any suggest.
I really like the option to disable data when the screen is turned off, it’s very good for those who sometimes forget to deactivate 3G when. The only bad pint that I can see to this particular feature is that I could stop downloads of big files unless you have the screen always turned on. By the way I still really like that feature.
 

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,856
www.chainfire.eu
Thanks Chainfire. I will try this app and I’ll let you know if I find any bug or I got any suggest.
I really like the option to disable data when the screen is turned off, it’s very good for those who sometimes forget to deactivate 3G when. The only bad pint that I can see to this particular feature is that I could stop downloads of big files unless you have the screen always turned on. By the way I still really like that feature.

Something is planned for this problem :)
 

Birba

Senior Member
Feb 27, 2006
317
30
great app, it is working very well for me. Turns off data connection when screen is off and turns on every 15 minutes for 2 minutes to allow autosync. Exactly what I need for power saving since with 2g only and no active auto-sync I am saving a LOT of power.

Where can I set that data turns on every 15minutes?

Thanks
 

titooo7

Senior Member
Sep 29, 2010
1,687
4,468
London
Something is planned for this problem :)
I guess you have something planned like a watchdog to see if there is any data transfer before stopping the connection. If thats the case I think it might be not so easy as some apps could be connected to the internet with very small data transfer. However, you are the expert on this.

I just tested in my SSGS with froyo 2.2 (JPM). I'm just using default options (disconnect data when the screen is turned off) and I have realised that when the data gets disconnected the phone makes a small vibration. It would be cool if we can avoid the vibration as it also spends some battery ;)
 

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,856
www.chainfire.eu
Where can I set that data turns on every 15minutes?

Thanks

Under "Schedule data connection" section in SuperPower

I guess you have something planned like a watchdog to see if there is any data transfer before stopping the connection. If thats the case I think it might be not so easy as some apps could be connected to the internet with very small data transfer. However, you are the expert on this.

Likely it will be related to the download speed itself, not sure yet though.

I just tested in my SSGS with froyo 2.2 (JPM). I'm just using default options (disconnect data when the screen is turned off) and I have realised that when the data gets disconnected the phone makes a small vibration. It would be cool if we can avoid the vibration as it also spends some battery ;)

As stated in the first post the vibration is a debug option. It will be removed / turned off in a later version. Remember this is beta :)
 

Madic

Member
Jul 2, 2010
40
1
When you mean the network is not "active", do you have a "white circle with a line through it" icon ?

Do you have 2G/3G switching enabled ? The above is exactly what would happen if:

- You have enabled switch to 2G when screen goes off, and you turn on the device while the device is switching to 2G

- You have enabled switch to 3G when screen goes on

In both cases it is a temporary situation that takes about 10 seconds to resolve. Unfortunately switching between 2G and 3G takes time.
I activated both options.
Ok, if this is intended behaviour and just happens if I switch the screen back on, than it's fine.
Thank you
 

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,856
www.chainfire.eu
I activated both options.
Ok, if this is intended behaviour and just happens if I switch the screen back on, than it's fine.
Thank you

Note that if you turn off the "Automatic switch to 3G" option, SuperPower will switch to 3G when you start any of the programs selected in the "Applications requiring 3G" instead of every time you turn on your screen.
 

BenF1

Senior Member
Jun 11, 2009
462
15
South Devon
Wow this is great! I'll download and try when I upgrade to JPM this weekend! Nice to see a great Dev working on the SGS!
 

MAMBO04

Retired Recognized Developer
Jan 29, 2009
1,581
888
Brighton
Nice app mate thanks, look forward to more development. And damn you have TONS of phones, mind giving us a HD2? ;) haha.
 

AllGamer

Retired Forum Moderator
May 24, 2008
11,917
1,657
SGH-T989
AT&T Samsung Galaxy Note I717
Bug Report!

Bug Report!

Force closed on I9000M on when switching back from another app back to SP

reloaded SP and it went in properly

I9000M became unresponsive after enabling 2G/3G option

Force closed again...

still hung, can't do much with SP, need to uninstall to return SGS back to normal

no option to uninstall, it does not appear on Titanium backup or any apk manager
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 46
    THIS IS AN UNSUPPORTED EXPERIMENTAL BETA APPLICATION, BUGGY, USE AT YOUR OWN RISK. PLEASE READ THE ENTIRE POST BEFORE USING.

    About

    SuperPower attempts to save battery power by controlling various power hungry components and features of the device. Its features include managment of the cellular data connection, Wi-Fi, Bluetooth, CPU speed and 2G/3G band. It does all this automagically based on the options you configure.

    There are more battery saver apps out there, but none that work the way I want them to. It is however meant to work relatively simply. If you want uber-fine-grained control use one or a combination of the other applications available.

    SuperPower also serves as somewhat of an Android port of WMLongLife.

    BETA, Development & Testing

    This application is in beta stage and far from finished. There will be bugs, and the list of things that still need to added, changed, refactored, streamlineed, etc is long.

    Primary testing and development is done on a Galaxy S (unbranded, EU, I9000) device, but I also run tests on a G1 and a Hero. Other users have reported it (mostly) works on the Droid, Milestone, Nexus, Desire, Pulse, EVO.

    Android version

    SuperPower requires Android 1.6 or newer. Some features require newer versions, and some features have a different code path on different Android versions.

    For example, Bluetooth features require Android 2.0, while the download speed tracker (to not disable data while downloading) requires Android 2.2. Features are automatically disabled if they are not available for your Android version.

    Main features

    Control over
    - Cellular data
    - Wi-Fi
    - WiMAX * Android 2.2+ *
    - Bluetooth * Android 2.0+ *
    - CPU speed * ROOT *
    - Bands (2G/3G) * ROOT *
    - GPS * ROOT, PATCH, Android 2.2+ *
    - Auto-Sync
    - Background data * ROOT, PATCH, Android 2.2+ *

    Automatic management of the above based on
    - Screen state
    - Wi-Fi network connection state
    - WiMAX network connection state
    - Lock screen visibility state
    - Download speed
    - Foreground application
    - Tethering state
    - Sleep mode
    - Low battery state
    - Charging state

    Other

    - Schedule data connection to be available at certain times

    - Schedule night mode

    - Informative toasts in response to user actions

    - Status bar notifications about the current state, which you can tap to change

    - Provides handy shortcuts you can add to the home screen for easy access of a number of functions

    Additional features

    - Enable/disable data is non-persistent. APNs are not modified! This is no longer true on Gingerbread (2.3) and newer due to changes in Android security. Here either data is disabled entirely (Settings -> Wireless and network -> Mobile networks -> Use packet data, or APNs are modified (Access Point Names in the same menu).

    - 2G/3G switching is supported in two different ways: RIL injection (highly experimental, any ROM, possible side effects) and Sidekick (AOSP ROMs signed with platform test keys, or using patching)

    - Completely event based, no polling, ever.

    Future features

    I have a LOT of them already in my to-do list. However, if you have any ideas feel free to post them. To name a few that are already on my list: configuration wizard, widget, GPS control, mapper, signal-strength based 2G/3G. Of course improvement to current features, fixing bugs, etc are also on my (perpetual?) to-do list.

    Screenshots

    15
    16
    17


    Conclusion, copyright and download

    NOTICE: At this time I may not respond to each and every posts and questions. I do guarantee I will read every post and take what you write under consideration! Please report all your findings.

    Copyright: This app is fully my copyright. You may not distribute it without prior explicit consent from me! So no, you're not allowed to include it in your ROMs either :)

    ----

    Release notes: The changelog (a few posts down) contains links to version-specific release notes, if there are any.

    SuperPower can be found on Market under the name "SuperPower XDA-BETA". The QR code below will take you there:

    13


    Direct market link: market://details?id=nl.morose.superpower
    Appbrain link: http://www.appbrain.com/app/nl.morose.superpower

    It is on Market instead of being for download here because Market tracks force closes. This will help me debug :)

    (Original APK downloads <<< 0.60: 705)
    7
    Changelogs

    14.03.2011 - v0.80 BETA - Release Notes
    - Adjusted reboot code
    - Adjusted preference save/load code
    - Adjusted Sidekick install code (hopefully for the better)
    - New version of Sidekick
    - Uses ITelephony data controls on pre-Gingerbread
    - Uses secure settings patch, Sidekick, or APN-based data controls on Gingerbread, depending on availability

    18.11.2010 - v0.75 BETA - Release Notes
    - Adjusted some description in config app
    - Adjusted shortcut text for "wake up"
    - Added "running" notification. This will make sure that there is always a SuperPower notification in the statusbar while SuperPower is running
    - Adjusted when some notifications show or do not show based on other notification states
    - Added WiMAX notification + 4G icons
    - Added WiMAX shortcuts + 4G icons
    - Categorized the shortcut selection screen
    - Options the device is not capable of are now disabled in the shortcut selection screen
    - Added low battery mode override: charging
    - Added low battery mode override: screen on
    - Added low battery mode override: lock screen
    - Fixed option to disable cellular data when WiMAX is connected to a network
    - Added "reboot" permission, may fix issue with patch on some devices
    - Adjusted screen-on timeout cancel code
    - Added option to delay service start at boot. May solve issues with users running a temp-root-at-boot like VISIONary (warning: not tested)
    - Adjusted "application requires data when screen is off" handling
    - Added option to kill app on screen off (partially working on 2.2)
    - Added option to use "3G-only" mode for 3G to root features
    - Fixed an issue with bandswitching (would sometimes detect "complete" before switching started)
    - Fixed an issue with bandswitching (would not re-evaluate state after leaving lock state)
    - Reworked state and wakelock clearing at screen on / screen off / unlock (fixes lockscreen data/wifi/etc on issue)
    - Added option to not disable "other" interfaces (Wi-Fi, WiMAX, etc) while download speed is over X KB/s

    - Update on MIUI issue: bug report submitted to MIUI devs. Hopefully they can devise a workaround
    - Update on Wi-Fi error: still not properly reproducable. No closer to finding a solution (or the problem, even)
    - Update on App Specific options: Still needs an overhaul and a lot of extra options! :)

    04.11.2010 - v0.71 BETA - Release Notes
    - Fixed FC on Sidekick install fail OK click
    - Fixed checkmark on Sidekick install cancel remaining
    - Bluetooth support changed to API level 5 and up (Android 2.0)
    - WiMAX suppport changed to API level 8 and up (Android 2.2)
    - Airplane bug fixed. Cause: WiMAX functions do not work on pre-2.2, SuperPower switches to airplane mode instead of turning off WiMAX
    - Secure settings patch and force sidekick install limited to API level 8 and up (Android 2.2)
    - Adjusted patching text for modify secure settings

    03.11.2010 - v0.70 BETA - Release Notes
    - AdFree workaround (may cause delay during first-time-since-reboot load)
    - Updated AdMob SDK
    - Fixed bug with AdMob
    - Modify secure settings (Patch, ROOT), required for GPS and background data options
    - Alternative method for Wi-Fi on/off
    - Wi-Fi, Bluetooth, WiMAX, GPS, "turned off by screen off" states now persistent, will survive crashes
    - Persistent states cleared on boot
    - If service is restarted due to crash, it is now loaded correctly
    - Fixed crash when entering app-specific screen
    - Modified "changed settings" update in background service, should reduce lag in config app
    - Renamed "sleep mode" to "night mode"
    - PIN code setting now (correctly) states it requires 2.0 if older version detected
    - Implement setting Auto-Sync (Android 2.0+) and Background Data (Patch, ROOT) based on network connectivity
    - Added master switch to en/disable application specific options
    - Nightmode bluetooth on wake is now disabled if bluetooth not supported
    - Added GPS options (Patch, ROOT)
    - Adjusted multiple config settings: if no root is detected but is needed, options now have the correct "root required" summary
    - Added WiMAX functionality
    - Scheduled data wakeup during sleep mode disabled
    - Adjusted a number of default settings
    - Scheduled data is now performed automatically when coming out of night mode
    - Intensely modified handling of Sidekick-based switching to accomodate some devices
    - Sidekick switching now disables the data connection before attempting a switch
    - Added scheduled wake up time to night mode quick list
    - Alternative Sidekick installation path for non-AOSP ROMs with root

    28.10.2010 - v0.64 BETA (DEBUG)
    - Attempted fix for WiMAX detection force close (Market reported crash)
    - Additional logging in startup screen, hopefully help finds the problem for the "blank screen" issue
    - Additional logging to test WiMAX features
    - Possible fix for app-specific options listed apps that are no longer installed

    27.10.2010 - v0.63 BETA
    - Adjustment to data off during low battery, no longer turns off when battery low but charging and "do not turn off while charging" is set, when leaving airplane mode
    - Adjustment to data off during lock screen, scheduled data and charging states now override this setting
    - Adjustment to service keep-alive
    - Refactored settings screen (50% code reduction)
    - New functionality - sleep mode
    - New shortcut - sleep mode
    - New shortcut - wake up
    - New notification - sleep mode + tap to wake up
    - New sleep mode launcher + statusbar icon
    - New wake up launcher icon
    - Implemented set alarm detection code
    - Added some code to detect set alarms. This is not available through an API so is trial-and-error. Seems to work on most devices I've tried.
    - Added "Do not switch to 3G when Wi-Fi network is connected" option

    24.10.2010 - v0.62 BETA
    - Attempted fix for CPU functions force close on unknown model (Market reported crash)
    - Attempted fix for AsyncCreate.onPostExecute force close (Market reported crash)
    - Temporarily disabled AdFree detection, until a workaround can be devised

    22.10.2010 - v0.61 BETA
    - Left Sidekick in testing mode. Caused it to be unavailable. Fixed.

    21.10.2010 - v0.60 BETA
    - State detection improvements
    - Changed GSM: RILD_AUTO --> RILD_GSM_WCDMA (for Nexus 1, works according to Jug6ernaut)
    - Changed CDMA: RILD_AUTO --> RILD_CDMA_EVDO (for Droid, works according to Captainkrtek)
    - Added download speed check option, before turning off data or switching to 2G. API Level >= 8
    - Modifications to detecting application start, no longer requires root + bug fix
    - Click app title opens thread on XDA-Developers
    - Re-arranged user interface into sections
    - Ad-supported version no longer runs when AdFree is installed
    - Created APK that disables ads (for donator version)
    - Removed a LOT of SU calls
    - Data schedule aborts when airplane mode detected
    - Bandswitch aborts when airplane mode detected
    - Last wanted data-state / band-state applied when coming out of airplane mode
    - Post-wakelock-release vibration now optional (debug section)
    - Added per-app selection of 3G / data during sleep (new) options
    - Adjusted some item titles and summaries
    - Many speed and load improvements across several functions
    - If PIN code is entered in configuration, SuperPower will show a screen and unlock the device during certain operations, if needed. API Level >= 5
    - Added option to switch to 3G when tethering
    - Bluetooth options added. API Level >= 5
    - Screen off states no longer set when screen goes off due to phonecall+proximity sensor
    - Added low battery mode
    - New shortcut - override low battery mode
    - New shortcut - cancel override low battery mode
    - New notification - low battery mode + tap to override
    - New notification - low battery mode overriden + tap to re-enable
    - New notification - 2g mode + tap to switch to 3g
    - New notification - 3g mode + tap to switch to 2g
    - New notification - nag
    - New generic statusbar icon
    - New 2G launcher icon + statusbar icon
    - New 3G launcher icon + statusbar icon
    - New low battery launcher + statusbar icon
    - New low battery override launcher + statusbar icon
    - Application specific settings: re-arranged order, configured at top
    - Added lock screen options, to specify wether or not actions may be performed during screen on or only after unlock
    - Improved detection that band switch is complete

    - New known issue: applicatoin specific settings do not go into effect if the app is reached through the back-button, only if started through the launcher
    - New known issue: even if the "dont do ... while lockscreen visible" options are enabled, these actions may still happen if triggered by an application specific options

    14.10.2010 - v0.51 BETA
    - Settings activity: modified descriptions of "root features" to show why they are disabled, if they are disabled
    - CreateShortcut activity: ads added
    - Settings & CreateShortcut activities: automatic shutdown, prevents popping up the main screen when clicking a shortcut
    - Portrait lock (prevents lengthy re-loading at rotate)
    - Added screen state detection for API Level >= 5 (reflection)
    - CPU scaling: detect if ondemand or conservative is available, and set it if current governor is something else. Should support more devices.
    - CPU scaling: fixed a number of possible FC's by adding missing NullPointer checks
    - Service load is now multithreaded (prevents ANRs)

    14.10.2010 - v0.50 BETA - Initial release
    6
    Known issues

    - IMPORTANT BUG - WARNING In various Android 2.1 (Eclair) builds there is a bug with push email. In case there is no data connection available, the background email service will go absolutely insane. It will use quite some CPU power constantly, and it will not let the device go to sleep - ever! I do not know if this bug existed before 2.1, and I have not seen the issue on 2.2 ROMs. If you are suffering from this, or suspect you are suffering from this, disable all the options in SuperPower to disable the cellular data connection.

    - SuperUser: SuperPower does use a lot of root commands if you have root. You might want to configure SuperUser to not show toast notifications for every single request.

    - State: Current state detection is not perfect yet and needs some improvements. I would advise trying to limit changing options in the application to times when Wi-Fi is off and you are in 3G mode as much as possible, just to be sure.

    - Wi-Fi: Occasionally Wi-Fi and cellular data states will conflict, causing cellular data to be set to active when Wi-Fi is on. Happens sporadically.

    - CPU Scaling: On the I9000 and family, you should (in my experience) enable the "ondemand" option if you are using CPU scaling. If you don't, and the device is in "suspend" mode, an incoming phonecall may crash the device.

    - CPU Scaling: SuperPower makes no attempt to detect or disable perflock. If you have a perflocked device, you need to use SetCPU (or some other tool) to disable perflock on boot.

    - CPU Scaling: SuperPower attempts to detect the possible CPU speed settings, and will choose the nearest value below half the maximum CPU speed as "low speed" frequency. The actual number chosen is stated in the description of the relevant option.

    - CPU Scaling: I know some overclocked ROMs require the device to always be at this overclocked speed to prevent the device crashing during sleep. If you are using an overclocked ROM and encounter the "sleep of death", disable CPU Scaling.

    - Roaming: SuperPower has not been tested while roaming at all. I suspect - but am by no means sure - there may be issues regarding the cellular data connection while roaming and you have set the device to disallow data entirely (while roaming). Let me know if you encounter any that seem directly related to roaming.

    - Application specific: Applicatoin specific settings do not go into effect if the app is reached through the back-button, only if started through the launcher (or by some other app)

    - Lock screen: Even if the "dont do ... while lockscreen visible" options are enabled, these actions may still happen if triggered by an application specific options

    - 2G/3G: On some devices the device itself will automatically switch back to 3G, it will not stay in 2G for very long
    4
    FAQ - Frequently Asked Questions

    Index
    - General
    --- Will this prolong battery life ?
    --- I want feature X, but it isn't included
    --- I expected X to happen, but Y happened
    --- I found a bug

    - Data connections
    --- The connection state changed, but didn't change back when I expected it to

    - System popups
    --- The PIN screen pops up sometimes
    --- The locks screen pops up sometimes

    - 2G/3G
    --- A band switch is being performed even though I'm already in the mode it is switching to
    --- What is the difference between the RIL injection and the Sidekick method ?
    --- Even though I have root, the 2G/3G switching options are disabled (CDMA)
    --- Band switching takes too long, is this a bug ? Can it be improved ?
    --- I'm in 2G mode but my device switched back to 3G

    - CPU
    --- The device never wakes from sleep
    --- Using tool X shows me that CPU speed is never changed


    General: Will this prolong battery life ?
    Quite probably, yes, significantly! BUT, there is never a guarantee. It all depends on how you use your device, the current conditions, and how you configure SuperPower. Some options in general save a lot of battery, but may be too inconvenient for you to use (specifically 2G/3G switching), and if you still want to use them, some playing with the various options may be needed to get it to work with the least amount of inconvenience to your usage pattern.

    If you are a very heavy user, no amount of software is going to help you (much). You need a bigger battery (or a spare). If all you use your device for is streaming YouTube, chances are battery life improvements you will see are little to none.

    CPU scaling may have less effect than expected. The amount of battery it saves has differed wildly between tests on different devices.

    Using Wi-Fi may use significantly less power than using 2G/3G. Or, 2G/3G may use significantly less power than using Wi-Fi. It depends on the situation, the signal strength of both cellular and Wi-Fi, the transfer speed, etc.

    Using 2G instead of 3G will generally speaking use less battery for most users, but this is not a given. It depends on the situation.

    All in all however, the default SuperPower configuration will provide you with a setup that will save a lot of battery for the average user, with little to no inconvenience to the user.


    General: I want feature X, but it isn't included
    Feel free to request the feature in this thread, even if this feature is already listed in these posts that it will be implemented sooner or later. If feature X is posted about 10 times, and feature Y only 3 times, that may have an effect on the priority of implementation.


    General: I expected X to happen, but Y happened
    Please go through the entire configuration to make sure you haven't configured anything that causes this behaviour Y before posting here. Also read through this FAQ and the known issues. It is of course possible you have found an undocumented bug, if so please report it here (see "I found a bug")


    General: I found a bug
    If you post it here, perhaps we can do something about it. But first, please check your configuration first to make sure it is unexpected behaviour. When posting about a bug, always include the relevant SuperPower configuration options, exactly which device you are using, which ROM, etc. More information is usually better !


    Data connections: The connection state changed, but didn't change back when I expected it to
    In the default configuration, SuperPower will "upgrade" connection states as soon as possible, but general only "downgrade" them when you aren't looking.

    For example, turning on data will be done as soon as you need it; while turning off data will generally be done only a while after the screen goes off. The same goes for for example 2G/3G. Switching to 3G will happen as soon as possible, switching to 2G will not be done immediately.

    This does all depend on your SuperPower configuration, though!


    System popups: The PIN screen pops up sometimes
    On some devices certain actions can cause the PIN screen to popup when for example bandswitching or coming out of airplane mode.

    If you enter your PIN code in the SuperPower configuration and you have such a device, SuperPower will attempt to automatically enter the PIN code for you - IF it understands it was one of SuperPower's actions that caused the PIN popup. An overlay screen will be presented to you while the PIN is entered and the SIM unlocked.

    This is however an experimental feature, may not work 100% of the time, and can cause some inconvenience. If you find this highly annoying, but you do want to use the features SuperPower provides that may cause this behaviour, you can disable the PIN screen altogether in the device's settings application.


    System popups: The lock screen pops up sometimes
    Like the PIN screen, on some devices certain actions can cause the lock screen to popup. SuperPower actively counters this behaviour while it is performing actions. Should it still happen, please report it (and the exact situation that caused it), specific code that prevents this behaviour may need to be added to code in additional places.


    2G/3G: A band switch is being performed even though I'm already in the mode it is switching to
    It is not always possible to detect the current 2G/3G state. In that case, SuperPower will treat the current mode as undefined, and any trigger that will cause either 2G or 3G mode will result in a band switch being performed, regardless of what the current actual state may be. This is also a reason to not use the device's settings app (or any other app) to switch between 2G/3G when SuperPower is also using 2G/3G functionality. Always use SuperPower (and only SuperPower) to perform the band switch!


    2G/3G: What is the difference between the RIL injection and the Sidekick method ?
    RIL injection is as hackery as hacks come, and is currently only available for GSM devices. It completely circumvents most of Android and tries to force commands to be sent to the radio.

    Sidekick on the other hand will use the same method as the device's settings screen to trigger a band switch, and is therefor both safer and faster to use. It does unfortunately require a compatible ROM. Carrier / manufaturer ROMs are usually not compatible, and not all custom ROMs are compatible either. Sidekick is available both on GSM as well as CDMA devices.

    If your ROM is Sidekick compatible, Sidekick will always be used instead of RIL injection.

    Both methods have not been extensively tested on a wide range of devices yet. So neither method may be compatible with your device. Please post here if neither method works on your device.


    2G/3G: Even though I have root, the 2G/3G switching options are disabled (CDMA)
    RIL injection is currently only supported on GSM devices. Only the Sidekick method supports CDMA at the moment.


    2G/3G: Band switching takes too long, is this a bug ? Can it be improved ?
    Band switching will take time, and inconvenience you. There is no way around this. The phone has to drop the network connection and completely reconnect to the tower.

    However, in some cases it does take longer than in other cases. The Sidekick method provides the fastest band switching available, but is not compatible with many ROMs. If your ROM is compatible, though, Sidekick will be installed and used automatically instead of RIL injection.

    When the RIL injection method is used (which will probably be for most users), band switching speed depends heavily on the device. Some devices are fairly quick with RIL injections, others are slow. If you have a device that requires your PIN code for operations such as band switching and coming out of airplane mode, band switching will also take significantly longer.

    Depending on all these factors, band switching can take anywhere between 10 seconds and a minute. Band switching will usually save a lot of power, but you have to consider wether the extra battery life is worth the inconvenience.


    2G/3G: I'm in 2G mode but my device switched back to 3G
    Some devices are known to do this. If it happens to you, please post about it. An attempt a viable workaround is on the to-do list.


    CPU: The device never wakes from sleep
    Not all devices work perfectly with CPU scaling. If this happens, reboot your phone, go into SuperPower configuration, and switch the "ondemand" setting under "Root features". If that doesn't work, you'll just have to disable CPU scaling.


    CPU: Using tool X shows me that CPU speed is never changed
    The CPU speed cannot be easily changed on all devices. Some devices/firmwares are "perflocked". Disabling perflock is beyond the scope of SuperPower, and thus SuperPower will make no attempt to disable it. There are tools out there that can disable perflock on many devices that have it, for example, check out SetCPU.
    2
    Coding on it right now, actually :)