0

Gboard kept crashing when trying to open the settings, so I wanted to uninstall and reinstall it. Google Play Store kept giving me the error code 910, the advice for that was installing it with ADB.

The command

adb install -r /home/fabian/Downloads/com.google.android.inputmethod.latin_7.9.7.230658658-release-armeabi-v7a-26790713_minAPI21\(armeabi-v7a\)\(nodpi\)_apkmirror.com.apk

gives me the output

Failed to install /home/fabian/Downloads/com.google.android.inputmethod.latin_7.9.7.230658658-release-armeabi-v7a-26790713_minAPI21(armeabi-v7a)(nodpi)_apkmirror.com.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install com.google.android.inputmethod.latin without first uninstalling package running as com.android.inputmethod.latin]

This is weird, since with the -r flag it should have no problem with an app that is already installed. Apart from that, it is not installed, I checked the app list, the /system/app directory, as well as /data/data. And when I run

adb uninstall com.google.android.inputmethod.latin

, the output is:

Exception occurred while dumping:
java.lang.IllegalArgumentException: Unknown package: com.google.android.inputmethod.latin
    at com.android.server.pm.Settings.isOrphaned(Settings.java:4134)
    at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:18419)
    at com.android.server.pm.PackageManagerService.deletePackage(PackageManagerService.java:15836)
    at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:888)
    at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:792)
    at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:118)
    at android.os.ShellCommand.exec(ShellCommand.java:94)
    at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:18682)
    at android.os.Binder.shellCommand(Binder.java:468)
    at android.os.Binder.onTransact(Binder.java:367)
    at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2387)
    at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3150)
    at android.os.Binder.execTransact(Binder.java:565)

So what can I do to install GBoard again?

Fairphone 2, Android 7.1.2, "Fairphone Open", root enabled

  • 1
    Did the app come pre-installed? – esQmo_ Feb 10 at 13:40
  • @esQmo Right, important detail: I flashed openGApps, because "FairphonOpen" has no Google Apps in them. – Fabian Röling Feb 10 at 16:24
2

It seems like the package wasn't properly uninstalled : This happens usually if you delete the APK from /data/app or /system/app or /system/priv-app instead of uninstalling the app. That is why probably the adb uninstall command isn't working.

Maybe you can try reinstalling the app again after rebooting your phone?
Tip: If this is the only keyboard app on your phone, it would be better if you install another keyboard app just as a backup before rebooting (especially if you have a text lock screen password).

If it still doesn't work after rebooting, try uninstalling the app only for the current user and then reinstall it from the play store.

adb shell pm uninstall --user 0 com.google.android.inputmethod.latin

Also, if possible, please also share the output of this command

adb shell dumpsys package com.google.android.inputmethod.latin

(Sorry, I am a new member and do not have commenting permissions yet; that is why I have to mention it here.)

  • Output of the first command: Failure [not installed for 0] Output of the second command: Renamed packages: com.google.android.inputmethod.latin,com.android.inputmethod.latin Dexopt state: Unable to find package: com.google.android.inputmethod.latin Compiler stats: Unable to find package: com.google.android.inputmethod.latin And yes, I did reboot. – Fabian Röling Feb 10 at 16:34
  • Oh, I just remembered that the app that I used to uninstall GBoard had made a backup of it! I restored that backup and it actually worked. Now I'm back at the state where GBoard crashes every time I open the settings. – Fabian Röling Feb 10 at 16:40
  • Afterwards, uninstalling and reinstalling worked. This doesn't solve the question, but I don't need an answer anymore. – Fabian Röling Feb 10 at 16:47
  • I still suspect that my initial statement was right. Maybe the app that you used to uninstall GBoard didn't uninstall it properly. It probably just deleted the app APK from its system applications folder, so the GBoard app didn't get properly unregistered from the system. Then, when you restored the backup, the app probably put back the APK from where it had deleted it earlier and hence it might have started working again. – ManSamVampire Feb 10 at 16:48
  • So you mean that just putting the APK file into the right folder would have solved it as well? – Fabian Röling Feb 10 at 16:49
0

This doesn't solve the question, but I managed to work around it:

I had a backup of the app, restored that back to the system partition, then I was able to uninstall it with ADB (without google. in the package name) and install it again.

  • Ok. This is something different. com.google.android.inputmethod.latin and com.android.inputmethod.latin are 2 different apps. The one with 'google' in the package name is called GBoard/Google Keyboard whereas the latter one is called Android AOSP Keyboard. The GBoard app doesn't usually come pre-installed on open-source systems (you said that you have a Fairphone) whereas the GBoard is a part of Google Apps (you mentioned that you flashed GApps). However, it is also worth noting that it is not possible to have a phone with both these keyboards as system apps. – ManSamVampire Feb 10 at 16:58
  • Maybe I now understand why GBoard crashes for you; there are 2 libraries of the names libjni_latinimegoogle.so and libjni_keyboarddecoder.so which are required by both, the AOSP Keyboard and the GBoard. The OpenGApps installer script shows that if GBoard is to be installed into the system, then a different version of these 2 files has to be put into the system and the AOSP Keyboard has to be removed. This doesn't seem to have happened in your case, and hence the crash. However, when GBoard is installed as a user app (non-system), it doesn't seem to need these 2 files to be in the system. – ManSamVampire Feb 10 at 17:45
  • @ManasSambhus After a lot of back and forth I finally managed to install it as a user app. Still crashes in the preferences. – Fabian Röling Feb 10 at 21:54
  • As soon as the app crashes, you can check the reason for the crash in the /data/system/dropbox folder. Sort the files by newest to oldest. Look for files that are named as data_app_crash or system_app_crash. However if these files happen to have a .lost extension, then you might be out of luck. – ManSamVampire Feb 11 at 2:35
  • @Manas pastebin.com/6khqGpbw Googling that error message leads me to a two year old bug report on Github where the only advice seems to be a factory reset: github.com/opengapps/aosp_build/issues/116 But what I did was installing the OS, updating it and then installing Google apps, so I don't think another reset would help. – Fabian Röling Feb 11 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.