Auto-fill accessibility service on Android 8.0 causes stuttering #85

Closed
opened 2025-11-07 08:25:50 -06:00 by GiteaMirror · 28 comments
Owner

Originally created by @ChrisG683 on GitHub (Sep 12, 2017).

So I've been struggling with the Pixel Launcher on Android 8.0 Oreo lately on my Pixel XL, and I've finally discovered why my launcher was so laggy/stuttery/janky, it's the auto-fill techniques used by password managers such as Lastpass and Bitwarden.

I discovered this through other people realizing it was Lastpass accessibility service causing their launcher to have so much stuttering, so I tried disabling the Bitwarden accessibility service and it immediately cleared up the jankiness I was getting.

I know 8.0 provides the new auto-fill API that should hopefully replace the accessibility service, but I thought I would go ahead and mention this here in case the bug can be hotfixed in the meantime before the auto-fill API release lands.

Originally created by @ChrisG683 on GitHub (Sep 12, 2017). So I've been struggling with the Pixel Launcher on Android 8.0 Oreo lately on my Pixel XL, and I've finally discovered why my launcher was so laggy/stuttery/janky, it's the auto-fill techniques used by password managers such as Lastpass and Bitwarden. I discovered this through other people realizing it was Lastpass accessibility service causing their launcher to have so much stuttering, so I tried disabling the Bitwarden accessibility service and it immediately cleared up the jankiness I was getting. I know 8.0 provides the new auto-fill API that should hopefully replace the accessibility service, but I thought I would go ahead and mention this here in case the bug can be hotfixed in the meantime before the auto-fill API release lands.
Author
Owner

@kspearrin commented on GitHub (Sep 12, 2017):

Seems like maybe the launcher is sending a lot of accessibility events that are slowing things down. Any idea how I can get the launcher on a Nexus 5X to test with?

@kspearrin commented on GitHub (Sep 12, 2017): Seems like maybe the launcher is sending a lot of accessibility events that are slowing things down. Any idea how I can get the launcher on a Nexus 5X to test with?
Author
Owner
@carlylemiii commented on GitHub (Sep 12, 2017): Maybe try http://www.androidpolice.com/2017/06/13/modified-pixel-launcher-apk-enables-google-now-pane-pixel-exclusive-features-work-device-no-root-mods-required/ ?
Author
Owner

@kspearrin commented on GitHub (Sep 12, 2017):

@carlylemiii I don't get any laggy stuttering with Launcher3 installed. Seems to work well.

@kspearrin commented on GitHub (Sep 12, 2017): @carlylemiii I don't get any laggy stuttering with Launcher3 installed. Seems to work well.
Author
Owner

@kspearrin commented on GitHub (Sep 12, 2017):

Trying a blind fix here. Can you try the new beta version on Google Play (v1.9.0 build 940)? I added a possible fix that will filter out any package name that contains "launcher" in it from the accessibility service processing.

ref 96588089ef

@kspearrin commented on GitHub (Sep 12, 2017): Trying a blind fix here. Can you try the new beta version on Google Play (v1.9.0 build 940)? I added a possible fix that will filter out any package name that contains "launcher" in it from the accessibility service processing. ref https://github.com/bitwarden/mobile/commit/96588089ef226c1cb719b142f7177c1fec605ea3
Author
Owner

@ChrisG683 commented on GitHub (Sep 12, 2017):

I enrolled in the beta and received 1.10.0 (941). Enabling the accessibility service still resulted in the Pixel Launcher being very janky. On a side note, this does not seem to impact Nova Launcher.

@ChrisG683 commented on GitHub (Sep 12, 2017): I enrolled in the beta and received 1.10.0 (941). Enabling the accessibility service still resulted in the Pixel Launcher being very janky. On a side note, this does not seem to impact Nova Launcher.
Author
Owner

@kspearrin commented on GitHub (Sep 12, 2017):

Any idea what the package name of the launcher on the pixel is?

@kspearrin commented on GitHub (Sep 12, 2017): Any idea what the package name of the launcher on the pixel is?
Author
Owner

@kspearrin commented on GitHub (Sep 12, 2017):

Is this it? https://play.google.com/store/apps/details?id=com.google.android.apps.nexuslauncher&hl=en

@kspearrin commented on GitHub (Sep 12, 2017): Is this it? https://play.google.com/store/apps/details?id=com.google.android.apps.nexuslauncher&hl=en
Author
Owner

@ChrisG683 commented on GitHub (Sep 12, 2017):

Yes that is the correct launcher to my understanding

@ChrisG683 commented on GitHub (Sep 12, 2017): Yes that is the correct launcher to my understanding
Author
Owner

@kspearrin commented on GitHub (Sep 12, 2017):

Seems my fix didn't work :(

@kspearrin commented on GitHub (Sep 12, 2017): Seems my fix didn't work :(
Author
Owner

@kspearrin commented on GitHub (Sep 12, 2017):

@ChrisG683 Can you try this launcher and see if there are any issues? https://github.com/amirzaidi/Launcher3/releases

@kspearrin commented on GitHub (Sep 12, 2017): @ChrisG683 Can you try this launcher and see if there are any issues? https://github.com/amirzaidi/Launcher3/releases
Author
Owner

@ChrisG683 commented on GitHub (Sep 12, 2017):

It fails to install, maybe it conflicts with the real Pixel Launcher?

@ChrisG683 commented on GitHub (Sep 12, 2017): It fails to install, maybe it conflicts with the real Pixel Launcher?
Author
Owner

@kspearrin commented on GitHub (Sep 12, 2017):

Hm, yea I think it has the same package name.

@kspearrin commented on GitHub (Sep 12, 2017): Hm, yea I think it has the same package name.
Author
Owner

@kspearrin commented on GitHub (Sep 12, 2017):

Any idea how I update my Nexus 5X to Oreo? Trying a system update shows that 7.1 is still the latest...?

@kspearrin commented on GitHub (Sep 12, 2017): Any idea how I update my Nexus 5X to Oreo? Trying a system update shows that 7.1 is still the latest...?
Author
Owner

@ChrisG683 commented on GitHub (Sep 12, 2017):

If you're familiar with flashing Factory Images or OTAs, you can find them here:

Factory Images (be sure to remove "-w" so you don't wipe your phone)
https://developers.google.com/android/images#bullhead

OTAs
https://developers.google.com/android/ota#bullhead

@ChrisG683 commented on GitHub (Sep 12, 2017): If you're familiar with flashing Factory Images or OTAs, you can find them here: **Factory Images** (be sure to remove "-w" so you don't wipe your phone) https://developers.google.com/android/images#bullhead **OTAs** https://developers.google.com/android/ota#bullhead
Author
Owner

@kspearrin commented on GitHub (Sep 12, 2017):

I'm not an Android user so unfortunately I'm not really familiar with that stuff. Any idea when it is suppose to be available to download through normal system update? I thought it was already released a couple weeks ago?

@kspearrin commented on GitHub (Sep 12, 2017): I'm not an Android user so unfortunately I'm not really familiar with that stuff. Any idea when it is suppose to be available to download through normal system update? I thought it was already released a couple weeks ago?
Author
Owner

@ChrisG683 commented on GitHub (Sep 12, 2017):

It was, but sometimes they roll it out in phases, I'm afraid I don't have an ETA for you. Also if you're rooted or have your bootloader unlocked, I believe that disables OTAs.

@ChrisG683 commented on GitHub (Sep 12, 2017): It was, but sometimes they roll it out in phases, I'm afraid I don't have an ETA for you. Also if you're rooted or have your bootloader unlocked, I believe that disables OTAs.
Author
Owner

@kspearrin commented on GitHub (Sep 15, 2017):

I flashed 8.0 on my Nexus 5X and can't reproduce it so it seems like it's just the Pixel.

@kspearrin commented on GitHub (Sep 15, 2017): I flashed 8.0 on my Nexus 5X and can't reproduce it so it seems like it's just the Pixel.
Author
Owner

@chetgurevitch commented on GitHub (Sep 21, 2017):

Xamarin support for the new Android Oreo APIs just landed and obviously the pixels are receiving android 8.0.0, so this is kinda a moot issue in the long run but I can replicate this on my nexus 6p as well.

@kspearrin As I'm sure you noticed the play store listing has a compatibility whitelist so people have been extracting it manually from the Pixel factory images. Here's the apk, a couple array values were tweaked to get circular icons working on nexus phones but it's otherwise identical. After extracting the archive you can install it with adb install NexusLauncherPrebuilt.apk or by transferring the apk to your device and opening it with a file manager. The google now page to the left of the home screen doesn't work when it's installed as a normal app but I doubt that's relevant to this issue.

@chetgurevitch commented on GitHub (Sep 21, 2017): Xamarin support for the new Android Oreo APIs just landed and obviously the pixels are receiving android 8.0.0, so this is kinda a moot issue in the long run but I can replicate this on my nexus 6p as well. @kspearrin As I'm sure you noticed the play store listing has a compatibility whitelist so people have been extracting it manually from the Pixel factory images. [Here's the apk](https://github.com/bitwarden/mobile/files/1323025/PixelLauncher.zip), a couple array values were tweaked to get circular icons working on nexus phones but it's otherwise identical. After extracting the archive you can install it with `adb install NexusLauncherPrebuilt.apk` or by transferring the apk to your device and opening it with a file manager. The google now page to the left of the home screen doesn't work when it's installed as a normal app but I doubt that's relevant to this issue.
Author
Owner

@kspearrin commented on GitHub (Sep 22, 2017):

@chetgurevitch Thanks. Is there an official source for that APK? Sorry, but I don't want to just install a random APK uploaded here to GitHub from someone I don't know.

@kspearrin commented on GitHub (Sep 22, 2017): @chetgurevitch Thanks. Is there an official source for that APK? Sorry, but I don't want to just install a random APK uploaded here to GitHub from someone I don't know.
Author
Owner

@chetgurevitch commented on GitHub (Sep 22, 2017):

@kspearrin The factory image... I could script that out in bash in an easily auditablle fashion but idk about windows

Edit: Mingw should work

@chetgurevitch commented on GitHub (Sep 22, 2017): @kspearrin The factory image... I could script that out in bash in an easily auditablle fashion ~~but idk about windows~~ Edit: Mingw should work
Author
Owner

@kspearrin commented on GitHub (Sep 22, 2017):

I have a unix environment to work with.

@kspearrin commented on GitHub (Sep 22, 2017): I have a unix environment to work with.
Author
Owner

@chetgurevitch commented on GitHub (Sep 23, 2017):

Cool, here's the script https://gist.github.com/chetgurevitch/1c61153f8d37cb8e8f31fd3730e39f6f.

Tested on arch and ubuntu. You'll need zlib1g-dev to satisfy the /usr/include/zlib.h dependency on debian based distros. Also a small tool called simg2img is neccesary (the script downloads and compiles the source from google's android repo) and sudo is unfortunately necessary to mount the images.

I get 5aed0d0bdff8d83b387881126deb31d8c8d139b8708f543ac55687c7fa342a2a as the sha256 sum for the apk, no difference between pixel/pixel xl images. Let me know if you've got any concerns.

@chetgurevitch commented on GitHub (Sep 23, 2017): Cool, here's the script https://gist.github.com/chetgurevitch/1c61153f8d37cb8e8f31fd3730e39f6f. Tested on arch and ubuntu. You'll need zlib1g-dev to satisfy the /usr/include/zlib.h dependency on debian based distros. Also a small tool called simg2img is neccesary (the script downloads and compiles the source from google's android repo) and sudo is unfortunately necessary to mount the images. I get 5aed0d0bdff8d83b387881126deb31d8c8d139b8708f543ac55687c7fa342a2a as the sha256 sum for the apk, no difference between pixel/pixel xl images. Let me know if you've got any concerns.
Author
Owner

@kspearrin commented on GitHub (Sep 26, 2017):

@chetgurevitch Ran the script, got the .apk, downloaded on my Nexus 5X w/ 8.0, and am getting "App not installed" when trying to install it.

@kspearrin commented on GitHub (Sep 26, 2017): @chetgurevitch Ran the script, got the .apk, downloaded on my Nexus 5X w/ 8.0, and am getting "App not installed" when trying to install it.
Author
Owner

@tdimarzio commented on GitHub (Oct 19, 2017):

Experiencing the same thing. See my comments at https://www.reddit.com/r/GooglePixel/comments/768qor/pixel_launcher_performance_issue_since_oreo_update/. Nova launcher is completely smooth in contrast.

@tdimarzio commented on GitHub (Oct 19, 2017): Experiencing the same thing. See my comments at https://www.reddit.com/r/GooglePixel/comments/768qor/pixel_launcher_performance_issue_since_oreo_update/. Nova launcher is completely smooth in contrast.
Author
Owner

@chetgurevitch commented on GitHub (Oct 20, 2017):

@kspearrin Sorry for taking so long to get back to you on this, apparantly the older pixel launcher won't install as a user app. Luckily the newer version shipping with the pixel 2 does, but pixel 2 factory images aren't out yet. You could download it from apkmirror and use keytool -printcert -jarfile foo.apk to verify that it's signed by google and the certificate fingerprints match those of the apk you extracted before, but if you'd rather wait I'm expecting the old script to work fine on pixel 2 factory images. Those should drop in the next couple days/weeks (10/21 last year). Also the issue is still very much reproducable on the new version.

@chetgurevitch commented on GitHub (Oct 20, 2017): @kspearrin Sorry for taking so long to get back to you on this, apparantly the older pixel launcher won't install as a user app. Luckily the newer version shipping with the pixel 2 does, but pixel 2 factory images aren't out yet. You could download it from [apkmirror](https://www.apkmirror.com/apk/google-inc/pixel-launcher/pixel-launcher-p-4275643-release/pixel-launcher-p-4275643-android-apk-download) and use `keytool -printcert -jarfile foo.apk` to verify that it's signed by google and the certificate fingerprints match those of the apk you extracted before, but if you'd rather wait I'm expecting the old script to work fine on pixel 2 factory images. Those should drop in the next couple days/weeks (10/21 last year). Also the issue is still very much reproducable on the new version.
Author
Owner

@kspearrin commented on GitHub (Oct 20, 2017):

Ok, I got the pixel launcher installed on my Nexus 5X now from api mirror. However, on this device I do not see any stuttering when the autofill service is running. Seems pretty smooth to me.

While debugging the autofill service, I do however see that this launcher is sending WindowContentChanged events every time the user interacts with it (is scrolls through apps or whatever). I am guessing that is what is causing issues for people since it's a constant stream of event spam to the service. In this case, the autofill service does no work, however, since one of the first checks is if the event is coming from a launcher, so it returns early.

I am not really sure what else can be done.

@kspearrin commented on GitHub (Oct 20, 2017): Ok, I got the pixel launcher installed on my Nexus 5X now from api mirror. However, on this device I do not see any stuttering when the autofill service is running. Seems pretty smooth to me. While debugging the autofill service, I do however see that this launcher is sending `WindowContentChanged` events every time the user interacts with it (is scrolls through apps or whatever). I am guessing that is what is causing issues for people since it's a constant stream of event spam to the service. In this case, the autofill service does no work, however, since one of the first checks is if the event is coming from a launcher, so it returns early. I am not really sure what else can be done.
Author
Owner

@kspearrin commented on GitHub (Feb 1, 2018):

Is there anyone in this thread with a pixel device that is having this issue that would be able to work with me in our live chatroom to try and debug this more? Feel free to ping me at https://gitter.im/bitwarden/Lobby

@kspearrin commented on GitHub (Feb 1, 2018): Is there anyone in this thread with a pixel device that is having this issue that would be able to work with me in our live chatroom to try and debug this more? Feel free to ping me at https://gitter.im/bitwarden/Lobby
Author
Owner

@kspearrin commented on GitHub (Feb 2, 2018):

This has now been resolved. Please try the latest beta on the Play Store for the fixes.

@kspearrin commented on GitHub (Feb 2, 2018): This has now been resolved. Please try the latest beta on the Play Store for the fixes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#85