Android Battery Saving Tips

Here my list of battery saving tips given my experience of helping many with their Android phones.

Know that the major culprits for affecting battery performance which we try to minimize the impact of are as follows:

  • system components known to use a lot of power such as the GPS, mobile data or the screen being used extensively
  • background activity that prevents the device from entering a power-saving sleep state, usually with specific applications

10 tips that work

  1. Avoid running the screen at higher brightness setting than necessary by ensuring that automatic brightness is enabled for indoors use and possibly avoiding use outdoors. The screen timeout setting should be under 2 minutes, and for most people the default factory setting should suffice.
  2. Ensure maximum cellular signal reception as much as possible. Low signal strength causes the phone to chase for one and waste battery in the process. If you are in an area without reception for an extended period of time, consider toggling on airplane mode. Leave the data speed be the default with all the modes enabled, applying to most recent phones out there.
  3. Reduce background activity
    1. Turn off all unnecessary push notifications and synchronization services from the settings portion of the application. You can tell in part when your notification bar is mostly clear of notification items as you use your phone, without having you to clear them
    2. Remove any unused widgets from the home screen
    3. Use a static wallpaper instead of a live wallpaper
    4. Disable or uninstall unneeded or misbehaving applications. OS Monitor and Greenify are good tools for finding misbehaving applications together with to the built-in Android battery settings tool. Facebook and Google Location History are several known culprits for having significant impact on battery life. It may be better to use to the mobile version of a website by visiting it from your web browser, rather than to install a native Android application in order to avoid impact to your device.
    5. Remove unused data synchronization accounts or disable data synchronization configured. Use manual synchronization whenever possible and reduce the frequency of automatic synchronization
  4. Swipe away and fully exit applications you do not need to return to, when you are done with them for good
  5. When performing battery draining activities, connect the device to power. Some applications Google Photos backup have an option to only perform photo and video backup when plugged into power
  6. Reduce GPS sensor activity by disabling use of this feature on application or system level. Alternately kill the offending applications as soon as you are done with them.
  7. Prevent built-in media scanner (Mediaserver) from doing excessive work by adding ‘.nomedia’ files to storage device where files are frequently written to, such as into the default download directory ‘Downloads’. Ensuring there are no malformed tags in your audio or video files if manually adding these to your device. See also this article
  8. Disable Google+ and its profile synchronization features if you can get by without this. Correct contacts synchronization errors when they appear by ensure that there are no malformed contacts. This can be done by running Contacts Sync Fix periodically. This only affects certain devices.
  9. Disable unnecessary accessibility features which are known to impact battery usage such as display color modes, device administrator applications, Samsung features such as smart stay
  10. Turn on WiFi and have it connected to a service with internet as much as possible if you have mobile data, so it uses WiFi as much as possible

Aggressive tweaks

  • Turn off mobile data when it is not needed together with WiFi to stop all network activity. This can be done at night, but I personally cannot recommend this for practical purpose.
  • control misbehavior applications – use Greenify in root mode
  • eliminate background activity  – use Power Nap for Xposed before Android 6 Marshmallow, or Greenify’s aggressive doze mode which does not require root after Android 6

So so advice

  • disable sound, vibration , haptic feedback – these features don’t drain that much power, and is usually just overkill
  • disable transistion and window animations from developer settings – I do this myself as a performance tweak, not for saving battery
  • reduce screen timeout – changing this from 2 minutes to 30 seconds can actually make it worse because the user may end up having to toggle the screen power more often, which actually increases system activity
  • keep your phone cool – a warmer phone actually ends up saving more power because phones are designed to throttle down in speed when they overheat, thus consuming less power, but note that this is NOT advice to warm up your phone
  • power saving mode – this is an aggressive setting that can ends up significantly reducing the functionality of the device, and it depends on the device’s implementation of this feature. Better off leaving it disabled.
  • use a black wallpaper – most devices aren’t on their home screen for very long, and you need a specific type of display to take advantage as well as clearing the home screen of any icons which are not dark enough. Practically this is pretty terrible advice unless you are changing the lockscreen wallpaper combined with the use of ambient display.
  • install custom firmware – making further customizations will not guarantee better battery life and often results in reduced device stability and functionality. I will not go into this on an in-depth basis here because I believe there are many other guides that cover this elsewhere.
CgB47mcW8AEdcFY (2)

Demoing the HTC Vive Pre

(not me pictured but this was the actual headset I tried on today)

I had the chance to demo the HTC VIVE Pre at AMD’s career fair today. The last similar demo I tried was the Oculus Rift DK2 at MaRS Discovery District for We Are Wearables Toronto late last year. This is the first time I tried on VR with room scale and motion controls.

  • Is there a screen-door effect? Yes, if you look for the lines between the pixels and focus on them you will still see them
  • Was the experience immersive? Yes, I quickly adjusted to the environment and forgot where I was physically. Having motion controllers that synchronize with your virtual space actually help a lot because it adds a sense of control even though the rest of my body was invisible
  • The most annoying part of playing with VR for me was the weight of the headset, and the fact that I wear wide glasses that didn’t fit very well inside the VIVE
  • I didn’t encounter any motion sickness
  • Even though I could move within the ‘play space’ defined, I felt the motion controls to be rather lacking without tracking the rest of my body along with the inability to move beyond the ‘place space’ boundaries

The two demos I tried were Job Simulator and Audioshield. I didn’t really enjoy Audioshield as much as I did with Job Simulator, but neither of the games felt like fully fleshed out games and had this shallow feel to them.

Job Simulator does a great job of making you feel immersed in the environment. I felt like I wanted to touch and pick up everything with my virtual hands. I tried passing a cup to myself behind my back and failed to catch it, but it did work and it was more of my lack of hand-eye coordination within the space. Another thing I tried was trying to roll around a ball on the floor between my hands, which was rather amusing. It felt weird to use my hands only to not actually feel any physical feedback for virtual objects which don’t really exist, but not so much so that it took away from the immersion.

I can definitely see myself investing in virtual reality down the road even though I’m not a gamer these days. It’s amazing that the technology is available today, but until I find more practical uses of it, but I would rather wait for the next generation where they polish up all the kinks for the masses.

Repurposing Old Consumer PCs in 2016 for Windows 10

In general, you should find that many computers newer than 2005 can reliably run Windows 10 as a desktop operating system and should be upgraded to extend its life well into 2025. Windows 7 should be supported only into 2020.

That there is a good chance that many old PCs will keep functioning past 2020. As the deadline for the Windows 10 free upgrade date of July 29 approaches, it is a good time to re-evaluate old PCs to see if they can run Windows 10. These old clunkers can still be put to good use.

Minimum Requirements

Windows 10 has these basic requirements, which isn’t much much more than Windows Vista other than RAM at a glance:

  • Processor: 1 gigahertz (GHz) or faster processor or SoC
  • RAM: 1 gigabyte (GB) for 32-bit or 2 GB for 64-bit
  • Hard disk space: 16 GB for 32-bit OS 20 GB for 64-bit OS
  • Graphics card: DirectX 9 or later with WDDM 1.0 driver
  • Display: 800×600

However there are actually more requirements on the processor than what is listed above. The processor additionally needs to support CPU extensions PAE, NX, SSE2. Some processors can run 32-bit but not 64-bit Windows 10, because 64-bit Windows requires CMPXCHG16b, PrefetchW, and LAHF/SAHF extensions. Without going into details, it means that you can’t just rely on referencing the clock speed of the processor as per the above.

 

The oldest PC processors which can run 32-bit Windows include select processors of these families, and anything earlier will not work:

As for processors that cannot support 64-bit Windows 10 even though they can run 32-bit Windows, you should find success with newer Intel Core 2/AMD Sempron 64/AMD Athlon 64 processors, but limited success with Intel Pentium 4 and Pentium D processors with 64-bit support. Here is a blurb on Wikipedia explaining this mess which I will not copy here.

Recommended Specifications

Here are my recommended minimum requirements for a decent Windows 10 experience:

  • RAM: 2 GB (32 bit) or 4 GB (64 bit)
  • Hard drive: 5400 rpm drive or faster
  • Graphics for video playback at 720p30: video chipset or dedicated card supporting accelerated H264 video decoding (see also my article here) OR processor has a Passmark CPU benchmark score of over 1400
  • Processor: Passmark CPU benchmark score of over 750

Sample Working Configurations

Good

  • Intel Core2Duo 2 physical cores @ 2.2 GHz, 4 GB RAM, Intel GMA 4500MHD

Acceptable, some lag spikes especially with multiple applications open, stumbles with higher bit-rate video but can play most videos at 720p30

  • Intel Core2Duo 2 physical cores @ 1.2 GHz, 4 GB RAM, Intel GMA x4500
  • AMD Athlon X2 3600+ 2 physical cores @ 1.9 GHz, 4 GB RAM, Geforce 9500GS

Close to unacceptable, random lag spikes even with single application open, can handle 720p30

  • Intel Pentium 4 HT 1 physical core @ 3 GHz, 2 GB RAM, Nvidia Quadro 3450 (similar to Geforce 6800 LE)

Unacceptable, cannot handle online video

  • Intel Core2Duo 2 physical cores @ 1.3 GHz, 2 GB RAM, Intel GMA x3100, 4200rpm hard drive

How to Look Up Processor Details

CPU-Z is an easy way to identify the processor: http://www.cpuid.com/softwares/cpu-z.html

From there you can find the code-name of your processor, the stepping, and the features it supports.

Further reading

Windows 10 64-bit Requirements – http://superuser.com/questions/931742/windows-10-64-bit-requirements-does-my-cpu-support-cmpxchg16b-prefetchw-and-la/941175

Windows Lifecycle – http://windows.microsoft.com/en-ca/windows/lifecycle

PCI-DSS 3 E-Commerce Learning

Disclaimer: This articles is a part of my research into PCI-DSS, and is not a definitive source of information

Payment Card Industry Data Security Standard, PCI-DSS for short, is a standard for organizations that handle cardholder data of branded credit cards from the major card schemes including Visa, MasterCard, and American Express. It is maintained by the PCI Security Secuirty Standards Council.

Non-compliance to PCI-DSS can result in a range of consequences, including range of fines and liability implications.

Cardholder Data

PCI-DSS defines cardholder data as follows:

  • Full PAN (primary account number)

When the full PAN is present, other sensitive data includes:

  • Cardholder name
  • Expiration date
  • Service code

It is allowable that a PAN’s can be masked for display by showing the first six and last four digits.

Compliance Extend beyond IT

While IT can help to make it easier to manage processes, but there is no way to replace responsibility and ownership of critical customer data.

Even if IT solution is purchased from a vendor claiming that they have attained PCI-DSS compliance before, it actually cannot encompass all of the control objectives required by PCI-DSS when an organization uses an instance of such a vendor solution. There are many controls apply to business process rather than any IT implementation.

For example, just because a website is hosted on SquareSpace, it doesn’t mean they are automatically PCI-DSS compliant. I wonder how many organizations actually do the due diligence of reading into what compliance actually requires when given the complex jargon of the documentation and numerous IT requirements to actually be compliant.

E-Commerce SAQs

Self-assessment questionnaires (SAQ) are validation tools provided by the PCI Security Standards Council intended to assist merchants and service providers in self-evaluating their compliance to PCI-DSS. The language of these SAQs would likely take an IT professional who has looked into PCI-DSS to see which one actually applies a particular e-commerce solution.

 

For e-commerce, one of SAQ A, SAQ A-EP or SAQ D would apply. Each contain a different set of validation criteria and recommendations an organization would have to meet, along with the significant cost differences to comply to each.

In general, a merchant must always be PCI-DSS compliant if they accept credit card payments, even if the card is entered on another site. Payment processors such as PayPal/Stripe/Recurly would typically recommend the merchant to completing SAQ A at minimum.

 

Just because the requirement is not a checkbox on the SAQ, it doesn’t mean that the merchant can ignore being responsible for implementing the requirements of the PCI-DSS. For example, they still need to make an effort to secure their network as well as show evidence of this. I am reading that experts who are evaluating solutions which would fall under SAQ A actually use the SAQ A-EP as much as possible to mitigate risks.

The following diagram provided by the PCI council tries to show the distinctions of which SAQ to use in various documents:

E-CommerceSAQ

From SAQ_InstrGuidelines_v3-1.pdf

VISA Europe had published an e-commerce payments guide which is more clear which SAQ to pick, as pointed out by the PCIGuru blog:

Matrix

Vulnerability scans occurring every quarter from external ASVs (approved scanning vendors) are required in SAQ A EP, SAQ D, but not under SAQ A. The list of ASVs is maintained by the PCI Security Standards Council, and adds additional cost to operating an e-commerce solution.

Under SAQ A, the merchant server serving the redirect/iFrame is not in scope for PCI-DSS compliance because no part of the merchant’s server touches CHD (card holder data).

Types of Controls

Control objectives PCI DSS requirements
Build and maintain a secure network 1. Install and maintain a firewall configuration to protect cardholder data
2. Do not use vendor-supplied defaults for system passwords and other security parameters
Protect cardholder data 3. Protect stored cardholder data
4. Encrypt transmission of cardholder data across open, public networks
Maintain a vulnerability management program 5. Use and regularly update anti-virus software on all systems commonly affected by malware
6. Develop and maintain secure systems and applications
Implement strong access control measures 7. Restrict access to cardholder data by business need-to-know
8. Assign a unique ID to each person with computer access
9. Restrict physical access to cardholder data
Regularly monitor and test networks 10. Track and monitor all access to network resources and cardholder data
11. Regularly test security systems and processes
Maintain an information security policy 12. Maintain a policy that addresses information security

From PCI-SSC quick guide, pulled from Wikipedia

Consider SaaS and Avoid Self-Hosting

Speaking from my own experience, IT professionals who know how to solve the problem of creating an e-commerce solution may not have knowledge about PCI-DSS compliance and pick the wrong solutions for your organization as a result. These organizations may have to find out the hard way via a data breach or fine to happen.

With any IT solution, ‘economy of scale’ results in products which meet more requirements at an affordable cost. Use well-known true software-as-a-service (SaaS) platforms which provide explicit documentation and support on how to operate a PCI-DSS compliant solutions.

For example, I would recommend the likes of SquareSpace and Shopify to provide a solution instead of self-hosting store-front using WordPress or Magento for organizations who cannot afford to have dedicated IT operations. Trusting off-the-shelf WordPress plugins to be part of a PCI-DSS compliant solution has the potential for pitfalls. There is a similar challenge with picking PCI-DSS compliant web hosting.

Additional Reading

  1. PCI Security Standards Understanding PCI-DSS v3
  2. PCI Security Standards PCI-DSS v3 SAQ A
  3. Recurly – PCI-DSS Compliance

Windows Activation Admin Commands

Capture

Some useful notes for administration of for use with Windows 7/8/10 activation.

Tools

Retrieve Windows 7/8/10 key:

ShowKeyPlus releases as discusssed on TenForums

Commands

Needs to be executed with administrative rights

Show current Windows version

winver

Get licensing status and activation ID:

slmgr.vbs /dlv

Activate license and product key against Microsoft server:

slmgr.vbs /ato

Install a new valid key, where Xs represent a Windows key:

slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Bring up the change product key prompt to change Windows edition or input a new key:

slui 3

Bring up the phone activation prompt:

slui 4

Additional Notes

In-Place Upgrade for Non-Activated Windows Installs

Windows 10 10586 build does not seem to allow for in-place upgrade of non-activated Windows 7 installs without forcing the user to enter another valid key, but Windows 10 10240 works.

Feature Upgrade from Windows 10 Home to Pro without Reinstalling Windows

When moving from Windows 10 Home to Pro edition, it is enough to use the product key change command ‘slui 3’, to change the product key to a Pro edition key to do an upgrade if you have a key available. It is not required to do a full reinstall, nor it is necessary to have to download any installation images of Windows 10. Once the feature upgrade to Windows 10 Pro edition has completed, use the ‘slui 3’ command again but with a genuine Windows key and proceed with normal activation. To prevent failed activation of the generic key, disconnect from the internet before a the genuine Windows key is entered.

MMMan

Promising Smartphone Trends in 2016

While 2015 would be considered a year of stagnation in the world of Android based smartphone hardware for some, largely due to disappointing high-end applications processors from Qualcomm, the year for 2016 should on track for consumers to regain confidence in the platform improvements in both power efficiency and performance.

Power Efficiency with SoC Die Shrinks

The move to 14 & 16 nm manufacturing continues to promise to reap great benefits for power efficiency in the year of 2016, with more manufacturers shipping their SoCs based on the updated processes.

On the application processor side, Snapdragon 820 promises major performance-per-watt improvements over its predecessors. Qualcomm should have their X16 modem chipset available this year to further improve efficiency.

Samsung launched the Exynos 7 Octa 7420 with a 14 nm applications processor in 2015, typically configured with the modem part at 28 nm with Samsung Shannon 333 or Qualcomm at 20 nm. The Exynos 8 Octa is expected to launch with the application processor and modem at 14 nm this year. Intel’s Atom applications processors have been on 14 nm for quite a while now, but their XMM7460 modem is supposed to be available late this year.

14 &16 nm manufacturing technology is starting to reap benefits for other chip vendors as well in HiSilicon’s Kirin 950 and Mediatek’s X30 platforms.

These change hopefully lead to significant improvements in battery life under mobile data workloads in more devices.

Performance Improvements with Sufficient Memory

Android device hardware for this year finally seems to be inline with what is needed.

There were still many devices released in 2015 which were not equipped with enough RAM, which resulted in significantly reduced system performance. For example, the Canadian LG Stylo released in 2015 had only 1 GB RAM before other allocations. However, at CES 2016, LG’s newest mid-range all seem to have sufficient memory (1.5 GB) on paper to be able perform well from a performance perspective.

Intel released a memory tuning guide in August 2015, and this finally seems to be consistent with what manufacturers are equipping their devices with today:

Density and Screen Size 32 Bit Device 64-Bit Device
Android Watches 416 MB Not applicable
hdpi or lower on small/normal screens
mdpi or lower on large screens
ldpi or lower on extra large screens
424 MB Not applicable
xhdpi or higher on small/normal screens
tvdpi or higher on large screens
mdpi or higher on extra large screens
512 MB 832 MB
400dpi or higher on small/normal screens
xhdpi or higher on large screens
tvdpi or higher on extra large screens
896 MB 1280 MB
560dpi or higher on small/normal screens
400dpi or higher on large screens
xhdpi or higher on extra large screens
1344 MB 1824 MB

– Minimum physical memory required by kernel and user-space in Android 5.1 (Intel Aug 2015)

Display Improvements

Look forward to more consumer devices adopting improvements in display technologies including IGZO and LTPS displays.

Other Trends

  • NAND storage speeds have gotten ‘good enough’ for most devices released in 2015 even on generic devices, and should no longer be of concern in newly released devices
  • Android 6 reintroduces the ability to expand internal storage using microSD expansion as well as significantly increased standby battery life, and should be considered compulsory
  • In 2015, we saw significant improvements in image quality for smartphones across all manufacturers, and this year should be a continuation of this trend. The major areas of improvement to look for are in low light performance, focus speeds, and video stabilization
  • Google will be looking to proliferate Android Pay, so look for devices equipped with fingerprint sensors and NFC to take advantage

Hardware Video Acceleration for YouTube on Chrome for PC

Capture

Google Chrome is one of my favorite browsers, but there are some tweaks particularly with YouTube video decoding which are worth looking for most users out there who are not using one of the newest Intel or Nvidia GPUs.

Revert to H264 from VP8/VP9

The easy fix is to install the open-source h264ify on the Chrome web store

Then if you check ‘Stats for nerds’ by right-click on a YouTube video, you can see that the mime type says ‘avc’ right after where it says ‘codec’. You are all done then! Watch your CPU temperatures drop!

After

The most common way for video decoding support to be broken is the fact that YouTube switched to WebM video formats VP8 and VP9 in their video browsers when using the HTML5 player. This video format is NOT supported for hardware decoding for some hardware configuration today, including all AMD graphic devices.

It’s great for Google to flout that the VP9 codec has been pushed to millions of consumers, but this comes at the cost of higher power consumption and lower performance compared to the universally hardware accelerated video format of H264 for hardware dating back 2008 (Intel GL40).

Video Card Blacklists

There’s may also be patches in Google Chrome to prevent hardware video decoding for Intel depending on the video driver installed, which blocks older Intel GPUs by default. This can be verified by going to ‘chrome://gpu/’ to see if ‘video decode’ has ‘hardware accelerated’ next to it.

This can be forced on with setting the ‘#ignore-gpu-blacklist’ in chrome://flags/, but you do run the risk of running into other rendering issues. My Lenovo Thinkpad X200 (Intel GMA4500MHD) drops video frames for all 720p 60fps YouTube videos to the point that the video becomes completely unwatchable, even with hardware acceleration turned on.

The way to check if your video-card supports VP8/VP9 video decoding is via DXVAChecker