Xiaomi Mi A1 Home Key Problem
The Home Key was not longer working, Recent/Back Key was not working too, the Notification Bar could not be swiped down. I experienced this problem on my Xiaomi Mi A1 phone after I messed-up something. The origin of the problem may have been an update with the switching from A to B boot partition. The Google Play Store did not worked properly, preventing from installing new applications, even the Developer options (from Settings ⇒ System) were not longer working due the error Developer options are not available for this user.
Clearly some settings were messed-up, but it was not clear how to solve the problem. Fortunately I found a procedure that fixed the problem, without a factory reset.
The trick is to run the SetupWizardUpgradeActivity from the com.google.android.setupwizard app. The app may have different names upon localization, e.g. Setup Wizard for English or Configurazione Android for an Italian version.
A common recipe is to install the Nova Launcher app, which has a widget capable of starting an app activity, directly (see below for an alternative). Unfortunately the Google Play Store was not working too, so I had to relay on some other method to download the apk file. Actually I tried the apkleecher.com and apps.evozi.com services, which turned out to provide the very same contents into the apk archives, despite the archives itself had different checksums.
So I downloaded the Nova Launcher apk on the PC and transferred it to the phone via the adb push command. Then I had to allow unknown sources permission to the file manager app.
A preferable alternative to installing Nova Launcher, is to install Activity Launcher (available from F-Droid). This application does just what is required: add a widget to launch an app activity.
- From the phone file manager, clik the apk archive to install the Nova Launcher.
- Long tap over a free dekstop space, to add a new widget.
- Search the Nova Launcher Activity Widget, and place it on the desktop.
- Search the Setup Wizard (or whatever is your localized name) in the proposed list, from the sublist choose the SetupWizardUpgradeActivity. This app/activity is found in Android 8.1 Oreo, other versions may have different ones.
- Now start the activity tapping the widget icon and complete the wizard procedure. Beware that the setup procedure may change some settings you had previously, e.g. the auto-update feature.
- Now you can uninstall the Nova Launcher app.