Android TV: Skip Google Sign-In

A factory-reset Razer Forge TV micro gaming console requires you to sign into a Google account, but that always fails with an error message:

Couldn't sign in
Your username and password don't match. Please verify them and try again.

(I guess this is because the old Android 6-based firmware uses an API that Google shut off.)

I looked for a way to skip the login requirement and looked through the system applications in the firmware image, to find the .apk that contains the error message. Unfortunately the system applications are split into .apk and .odex files that needed to be combined before I could analyze them.

SetupWraith is the app responsible for the initial setup process, and as usual I used jadx-gui to browse its decompiled source code:

 
package com.google.android.tungsten.setupwraith.ui;
public class AccountFragment {
    [...]
    private void launchAccountSetup() {
        [...]
        Partner p = Partner.get(getActivity());
        extrasBundle.putBoolean("showSkip", p.getBoolean("show_skip_signin"));
        [...]
    }
}

So there is an option to skip setup! The "Partner" class is interesting, because it loads settings from a different app:

package com.google.android.tungsten.setupwraith.util;
public class Partner {
    [...]
    public static synchronized Partner get(Context context) {
        PackageManager pm = context.getPackageManager();
        Intent intent = new Intent("com.google.android.tvsetup.action.PARTNER_CUSTOMIZATION");
        for (ResolveInfo info : pm.queryBroadcastReceivers(intent, 0)) {
            [...]
            String packageName = info.activityInfo.packageName;
            try {
                Resources res = pm.getResourcesForApplication(packageName);
                sPartner = new Partner(packageName, res, context);
            }
            [...]
        }
    }
    [...]
 
    public boolean getBoolean(String idName) {
        int pId;
        if (this.mPackageName != null && (pId = this.mResources.getIdentifier(idName, "bool", this.mPackageName)) != 0) {
            return this.mResources.getBoolean(pId);
        }
        int pId2 = this.mDefaultResources.getIdentifier(idName, "bool", this.mDefaultPackageName);
        if (pId2 != 0) {
            return this.mDefaultResources.getBoolean(pId2);
        }
        return false;
    }
}

It loads the resources of the first application that listens for the com.google.android.tvsetup.action.PARTNER_CUSTOMIZATION intent. When asked for a setting, it tries to load it from that application's settings, and falls back to its own default in case of failure.

Knowing about that intent, I quickly found an example SetupCustomizer application that I used as base for my own forge-setup-customizer app.

I installed it on the system partition with a fastboot-enabled TWRP for the Razer Forge TV and booted the system:

Welcome savior! Sign in to Google Skip sign in Accept Google Terms of Service Let Google use your device's location Help improve Android TV Setup is complete

Written by Christian Weiske.

Comments? Please send an e-mail.