LawnchairLauncher / lawnchair

No clever tagline needed.
https://lawnchair.app
Other
9.16k stars 1.2k forks source link

[BUG] Using Lawnchair as recents provider makes Android System Intelligence freak out #3892

Closed gaussandhisgun closed 8 months ago

gaussandhisgun commented 8 months ago

Describe the bug

Android System Intelligence (com.google.android.as) is the thing that is responsible for app suggestions. My ASI is perfectly fine with me using Pixel Launcher as my recents provider, yet whenever I change it to Lawnchair, it starts crashing upon anything related to app suggestions in the dock or the app menu, be it a background suggestion update or an attempt to toggle them off. ASI version is U.14.playstore.pixel6.590192724 (10722946)

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to Lawnchair Settings → Application Menu
  2. Click on App Suggestions
  3. Try doing anything inside
  4. See ASI crashing

Expected behavior

ASI should be perfectly fine and provide app suggestions properly.

Screenshots

https://photos.app.goo.gl/9tA9acmXRe8vCdKGA

Device information

Additional context

https://paste.crdroid.net/Y4gdbr

MrSluffy commented 8 months ago

Have you tried removing one icon in dock? Suggestion may not work since there is no space Screenshot_20231220-035659

Screenshot_20231220-035555

gaussandhisgun commented 8 months ago

ofc i did, it chooses one of the recently opened apps, puts it there and keeps crashing

MrSluffy commented 8 months ago

ofc i did, it chooses one of the recently opened apps, puts it there and keeps crashing

The error logs was not in lawnchair, it's either there's a missing permission in your asi. Have you tried updating ASI?

Is your rom vanilla version? And use gapps installation like Nikgapps etc?

gaussandhisgun commented 8 months ago

my ROM comes with GApps built in, but I flashed Pixel Launcher on top of it from NikGApps 14. with Pixel Launcher, everything is fine, and ASI is being regularly updated from Playstore 🤷

gaussandhisgun commented 8 months ago

trying to force grant the permission using root drops an error saying that android.permission.READ_DEVICE_CONFIG is "not a changeable permission type".

gaussandhisgun commented 8 months ago

pushing ASI into /product/priv-app (with Magisk) seems to fix the crash and grant the permission that caused it, but it still has a bunch of unchangeable permissions revoked, notably, the one that is directly responsible for app suggestions! изображение and also the smartspace one, i'd like to have that too, but android does not let me change them :c

gaussandhisgun commented 8 months ago

... and whats even funnier, now turning on the homescreen app suggestions causes the PIXEL LAUNCHER (!!!) to crash with this: https://paste.crdroid.net/wZy2bc i've frozen Pixel Launcher after that, but whatever i do in the suggestion settings seems to not affect the Lawnchair homescreen, and now the suggestions are just stuck at the same 5 apps: Quickswitch, Lawnchair, Telegram, Magisk and a music player, so, basically, the last 5 things I've opened before Quickswitch did the funny and set Lawn as my recents provider.

duh.

MrSluffy commented 8 months ago

why flashing Pixel Launcher from nikgapps when your rom already comes with GAPPS?

Pretty sure this one something to do in permission, maybe try pushing asi permission in root/system/etc/permissions

gaussandhisgun commented 8 months ago

why flashing Pixel Launcher from nikgapps when your rom already comes with GAPPS?

i wanted a usable launcher with some kind of Smartspace, and the built in launcher did not satisfy that requirement. and now i switched to lawnchair, as it is now available, since it just works better.

Pretty sure this one something to do in permission, maybe try pushing asi permission in root/system/etc/permissions

where can i get the things to push?

gaussandhisgun commented 8 months ago

putting an xml with this inside:

<?xml version="1.0" encoding="utf-8"?>
<permissions>
    <privapp-permissions package="com.google.android.as">
        <permission name="android.permission.SYSTEM_APPLICATION_OVERLAY"/>
        <permission name="android.permission.SET_SYSTEM_AUDIO_CAPTION"/>
        <permission name="android.permission.MANAGE_APP_PREDICTIONS"/>
        <permission name="android.permission.ACCESS_SHORTCUTS"/>
        <permission name="android.permission.UNLIMITED_SHORTCUTS_API_CALLS"/>
        <permission name="android.permission.MANAGE_SEARCH_UI"/>
        <permission name="android.permission.MANAGE_SMARTSPACE"/>
        <permission name="android.permission.READ_PEOPLE_DATA"/>
        <permission name="android.permission.READ_GLOBAL_APP_SEARCH_DATA"/>
        <permission name="android.permission.OBSERVE_SENSOR_PRIVACY"/>
        <permission name="com.google.android.ambientindication.permission.AMBIENT_INDICATION"/>
    </privapp-permissions>
</permissions>

under /system/etc/permissions using Magisk did not grant the application any permissions- nevermind, found the cause,

The privapp-permissions.xml file can only grant or deny permissions for privileged apps on the same partition. For example, if an app on the /product partition requests privileged permissions, the request can only be granted or denied by a privapp-permissions.xml file on /product.

and my ASI is on /product. lets see how it goes now...

nope. the permissions file is located at /product/etc/permissions/privapp-permissions-com.google.android.as.xml (the file name seems to not affect anything, but i called it how google said just in case and it still does not work)

MrSluffy commented 8 months ago

Close this as it's rom side issue, Lawnchair doesn't control ASI permissions