Comparing material design themes (stock Android/AOSP) for TouchWiz

Latest versions of TouchWiz on Samsung Galaxy S7 doesn’t look bad. At least it’s mostly consistent. However I would prefer to have more stock Android looks and colors at least in the notification panel. I’m not a big fan of the white design of notification panel (especially since it’s on AMOLED).

In a hope to find some more stock looking color schema, I tried searching for following phrases in the Samsung Theme store: “AOSP, Marshmallow, Android, stock, material, Nexus”. I installed the majority that was promising cleaner stock like design.

Android 6.0

The notification panel of this theme looks just perfect. What ruins it is the color of the off state of switches/toggles. In AOSP the off state toggles are light grey for a reason. Here the same color makes it extremely confusing with the on state.



Android Flat Theme

The notification panel in this theme looks pretty good except for the green color of the brightness slider which brings something really distracting and out of this place.

Also the icons are themed. I have nothing against theming icons as it goes towards the stock Nexus look – which this is not.



Android N

It sticks with one color for the notification panel. It’s ok but it just doesn’t feel genuinely stock. Same with the off toggles that should be light grey instead of light green.touchwiz-theme-android-n-notification



Part TouchWiz, part iOS/MIUI with its roundish controls. I’m not a fan.





Even if you’re fan of magenta, this is just ugly.




The colors in the notification panel may be too subtle. It also brings in round buttons and other inconsistencies caused by black background.




Material Black

The notification panel looks pretty clean but the custom background in ActionBar and themed icons make it less stock like experience.



Material Design Flat Theme

Second (green) color of the brightness slider in the notification panel is just wrong. It also uses not matching color for actions in the ActionBar. It also themes icons.



Simple Black

The toggles in the notification panel are just out of this world. It also themes icons.




This pretty consistent and nice theme is again ruined by the color of the brightness slide in the notification panel.




Based on trying all these themes I understand that creating full dark theme won’t be without side effects yet it is possible to create almost Nexus like notification panel and toggles. Unfortunately these tiny little inconsistencies in the available themes bug me.

I will further investigate if I should better build my own perfect theme (can I fork some?) or create tweak for my Xposed module app that could disable some parts of themes from applying (if you’re not interested in things like custom icons etc.).

Qualys SSL Server Test: An issue which is not – “Chain issue: Contains anchor”

What if the most popular SSL Server Test (from Qualys) reports that your site has and “Chain issue: Contains anchor”?


Orange colored “Chain issues” on SSL testing site? That has to be important. Too bad there’s no information dialog… So just go and read one of many SSL/TLS RFC’s to find out that:

…the root certificate authority MAY be omitted from the chain, under the assumption that the remote end must already possess it…

Ok, how about MAY?

MAY   This word, or the adjective “OPTIONAL”, mean that an item is truly optional…

So again, the number 1 SSL testing site keeps reporting “Chain issues” that have very little to do with security and the only real life impact is an additional 1 kB of data send to clients during SSL handshake. Which is just neutral in the specifications.

How is this not false positive? Especially when sites like these are used especially by people that don’t know much about SSL and its specifications.

Re-enabling the lost touch key backlight duration option on Samsung Galaxy S7

One feature that is somehow missing from Samsung Galaxy S7 is an option to configure “Touch key light duration”. Because of how firmwares are built today, all the “code and screens” are still there, it’s just limited to AT&T (for some strange reason).

To get it back you could use Galaxy Button Lights 2 app. This however wasn’t good/elegant/clean enough for me so I added support for bringing the native configuration screen back to system Settings via my “All My… (Xposed Tweaks)” collection.


Isn’t that nicer? It’s way cleaner and more simple solution (if you’re rooted & Xposed). The actual code looks like this:

package com.smartmadsoft.xposed.aio.tweaks;

import android.os.Bundle;


public class S7TouchKeyLight {
    public static boolean spoofATT = false;
    public static void hook(final XC_LoadPackage.LoadPackageParam lpparam) {
        try {
            XposedHelpers.findAndHookMethod(XposedHelpers.findClass("", lpparam.classLoader), "onCreate", Bundle.class, new XC_MethodHook() {
                protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
                    spoofATT = true;

                protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
                    spoofATT = false;

            XposedHelpers.findAndHookMethod(XposedHelpers.findClass("", lpparam.classLoader), "readSalesCode", new XC_MethodHook() {
                protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
                    if (spoofATT)
        } catch (Throwable t) {

I’m not fully satisfied with the code but so far I can’t think of anything better (mainly because of the trouble of hooking abstract classes).

Charging Macbook 12 with Xiaomi powerbanks

The stock USB-C power adapter for Macbook 12 (2015/2016) charges 2.0A at 14.5V (29W) (while it also supports output of 2.4A at 5.2V). The Macbook battery is 41Wh (or 39Wh for the older model) so the charging time is around 2 hours.

The Xiaomi 16000mAh powerbank charges Macbook around 1.4-1.8A so the charging speed is around 1/4 of the stock power adapter. The total amount of energy in the Xiaomi 16000mAh powerbank is 57.6Wh so it should be roughly enough (because of voltage conversion, losses etc) for one full charge. It should be able to charge Macbook from 0 to 100% overnight (8 hours). (Actual test to follow later)


The same goes for the smaller 5000mAh version of Xiaomi powerbank. It just charges slower and has significantly less capacity. Roughly to fill 1/3 of total Macbook battery capacity.


Just like powerbanks, even regular AC to USB-A adapters charge Macbook 12. The adapter in the following picture is rated 5V 2.4A so the actual output likely matches the maximum while the voltage is much more stable than from powerbanks. So a good USB-A charger will charge Macbook at 1/3 speed of the original power adapter.



Windows 10: Still bad at handling multiple displays with different DPI settings

People are probably aware and used to that plenty of 3rd party software don’t handle well multi display setup with different DPI’s. The sad part is that not even the controls accessible via taskbar on Windows 10 are rendered properly.

  • The tooltip bubbles of hidden icons are in different size than the not hidden ones.
  • The volume panel and input method switcher scale up quite differently.


Anker: Extended battery that also expands

Two years ago I bought Anker extended battery for Samsung Galaxy S5. I used it during few longer trips while I kept it stored and checked it every 6 months when not used. Yet after two years the battery expanded…



I never had such issue with batteries form Mugen or original ones. I some times encounter expanded batteries like that but it’s usually either really old battery kept in a device or some ultra cheap one. Well, too bad that the warranty is “only” 18 months.

Don’t be fooled by w3schools, UTF-8 is not the default HTML5 charset writes on various of their pages that

The default character encoding in HTML5 is UTF-8.

Even if you read the full page, you will probably get the impression that when you don’t specify encoding in HTML5, it will fallback/default to UTF-8. Which is simply not true. (UTF-8 is used as default in places like form submission but not when loading and setting encoding of a web page.) Just try creating following sample page:

<!DOCTYPE html>
 Příliš žluťoučký kůň úpěl ďábelské ódy.

It is displayed in Chrome or Firefox like this:


The reason for this is quite obvious. HTML5 specification basically says that it defaults to ASCII-compatible character encoding which can any of many encodings including Windows-1252 (meaning ASCII).

Or as stated in Determining the character encoding, windows-1252 is Suggested default encoding.

So for proper UTF-8 usage there must be UTF-8 BOM at the beginning of the file or you must specify encoding in one of few ways (as w3c requires).