[Root] EMUI 9 QuickStep Recents Screen mod (Lawnchair v2/OnePlus Launcher)

Search This thread

ChangeToTower

Senior Member
Sep 14, 2017
252
27
Does anyone here use hyperion beta launcher with quickstep? If yes, could you please share the modified apk? Thanks.
 
Hello.

I read the whole thread up until now and I did understand that removing the default launcher and modifying the apk of a launcher, repacking and signing requires root.
I was able to go around the pesky blue hue in task manager(and if you use a dark 3rd party theme for dark notifications->turns to full black the first time) by using adb(found the steps in another thread) and removing the default launcher altogether. Now I am stuck with the old(Emui 8) task manager.

By taking the above into consideration, would any of you reckon to be possible to perform the other necessary steps also through adb?
 

abyssq

Senior Member
Nov 19, 2014
163
22
Hello.

I read the whole thread up until now and I did understand that removing the default launcher and modifying the apk of a launcher, repacking and signing requires root.
I was able to go around the pesky blue hue in task manager(and if you use a dark 3rd party theme for dark notifications->turns to full black the first time) by using adb(found the steps in another thread) and removing the default launcher altogether. Now I am stuck with the old(Emui 8) task manager.

By taking the above into consideration, would any of you reckon to be possible to perform the other necessary steps also through adb?

No. You need to have root to have custom quickstep recents. Removing the huawei launcher with adb is not enough, you need to remove it using a root explorer.
 

Jan.Pul

Senior Member
Apr 5, 2017
254
63
There is no tool that'll do it automatically for you. I use apktool to dismantle the apk, change values & repackage it. You'll also have to sign the package using "jarsigner" which comes along with JDK.
hey aodrulez, thanks a lot for this helpfull information, i cant recompile it though, do you have advice? i used apktool b (name of folder)
but that didnt work got a way to long response. i tried to do this with the Q launcher for P but i couldnt get it to work.
 

Aodrulez

Senior Member
Jul 26, 2016
72
30
hey aodrulez, thanks a lot for this helpfull information, i cant recompile it though, do you have advice? i used apktool b (name of folder)
but that didnt work got a way to long response. i tried to do this with the Q launcher for P but i couldnt get it to work.

It's impossible to give a generic answer that applies to all similar questions in the future. To sum it up:
  • Check if the error is related to apktool itself & not related to the application/package. Fix or upgrade your apktool installation in this case.
  • If it's a compilation error, apktool will usually highlight the line-number in some file in the package where it fails. Try to fix the code/data at that location. it usually takes little tweaking before apktool is able to compile the smali files back to an APK. Should be fairly straight-forward too if you try to figure out why it fails from the error message.
 

Todesdoktor

Senior Member
Aug 21, 2018
64
6
Google Pixel 3 XL
Hi everyone,

After installing EMUI 9 (.241) on my P20 Pro & switching to Lawnchair V2, I was happy with pretty much everything except EMUI's default app switcher (Recents Screen). It's bug ridden & lags way too much for usability. That was when I decided to try QuickSwitch Magisk module from @Skittles9823 & @paphonb . Unfortunately, it didn't work for EMUI 9 & I decided to dig further into it.

Background Info:
In Android Pie, "recents screen" feature is handled by the launcher & is no more part of the OS itself. Android OS triggers recents screen by starting an intent "android.intent.action.QUICKSTEP_SERVICE" which is bound to the default launcher. What this means is that only the application specified in the intent can receive it. Now, in case of most OEM roms, this value is defined inside an XML resource in "/system/framework/framework-res.apk" (the file name can be different for different roms) file. QuickSwitch Magisk module apparently replaces this value using "Runtime Resource Overlay" technique to setup any launcher of your choice as the default handler for recents screen or QUICKSTEP as it's called.

Huawei, you bad boy
In EMUI 9, instead of defining this value inside some xml resource, Huawei decided to create a jar file instead named "hwServices.jar" & hardcoded EMUI launcher's package name in a "String" variable to be used for triggering the QUICKSTEP intent. This effectively kills the approach taken by QuickSwitch magisk module & us Huawei device owners are left with no other option but EMUI 9's bad implementation.

The way around
There are couple of options in this case:
  1. Patch "hwServices.jar" file to point so some 3rd party launcher
  2. Remove default EMUI launcher, create an application with the same package name to relay QUICKSTEP intent between system & third party launchers
  3. Remove default EMUI launcher & replace it with a third party launcher that's modified to have EMUI's default launcher's package name

After spending the entire weekend trying Option 2 with limited success, I decided to go for Option 3 as modifying "hwServices.jar" itself seemed like too much meddling with the system's functioning. And so I removed default EMUI launcher from my system, took the latest Lawnchair v2's alpha build, patched it to have EMUI's default launcher's package name & installed it instead with system permissions. This works like a charm!

Instructions
  1. You need a rooted device with Magisk installed
  2. Install (QuickSwitch Magisk module v1.1.2)
  3. Delete "/system/app/HwLauncher6" folder's contents using some file-manager like ES explorer with root permissions ( Create a backup if you want, it can be restored by copying the files back in the same folder if needed)
  4. Reboot phone
  5. Install patched Lawnchair V2's apk attached to this post on your phone.
  6. Using QuickSwitch app installed on your phone, select Lawnchair V2 as the default home app & QuickStep provider. (We are using QuickSwitch only to give our patched Lawnchair v2 app system privileges. If you have any other way of doing this, feel free to do so & you can ignore installing QuickSwitch & it's steps above entirely)
  7. Reboot & everything should be setup correctly.

Note
The patched version of Lawnchair v2 attached here is based on the latest alpha build at the time of this post& although everything seems to be working just great, there might be few bugs here & there. I'll update the attachment as & when more stable versions are released.

Credits
Special thanks to both @Skittles9823 & @paphonb for interacting with me while I was trying to find a way to get this working on EMUI. Much appreciated!


Update 1
The patched version of Lawnchair attached isn't entirely perfect, I'll wait for it's source code to be released to refactor everything properly. Until then, you can use this to replace your existing recents screen & even use a different launcher along with it, as long as attached Lawnchair V2 is a system app.

Update 2
Have also added OnePlus's Launcher ported by Paphonb with patch for EMUI 9. You can use this one instead of Lawnchair V2 too, if you like. Kindly note that these might be unstable due to my patches.

Update 3
Have updated the attached Lawnchair v2 apk with patch v1.1 (Fixes crashes)

Latest build download for Lawnchair V2
You should find fairly recent builds of Lawnchair V2 patched for EMUI here: (To be updated soon!)

Hi there. Uh, in trying this but I can't delete the contents of the HwLauncher6 folder with any file manager app with root permission. I have latest magisk manager and magisk.

I have tried with Es file manager, File commander, xfiles and root explorer and it can't be deleted, what should I do?

Thanks
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Hi everyone,

    After installing EMUI 9 (.241) on my P20 Pro & switching to Lawnchair V2, I was happy with pretty much everything except EMUI's default app switcher (Recents Screen). It's bug ridden & lags way too much for usability. That was when I decided to try QuickSwitch Magisk module from @Skittles9823 & @paphonb . Unfortunately, it didn't work for EMUI 9 & I decided to dig further into it.

    Background Info:
    In Android Pie, "recents screen" feature is handled by the launcher & is no more part of the OS itself. Android OS triggers recents screen by starting an intent "android.intent.action.QUICKSTEP_SERVICE" which is bound to the default launcher. What this means is that only the application specified in the intent can receive it. Now, in case of most OEM roms, this value is defined inside an XML resource in "/system/framework/framework-res.apk" (the file name can be different for different roms) file. QuickSwitch Magisk module apparently replaces this value using "Runtime Resource Overlay" technique to setup any launcher of your choice as the default handler for recents screen or QUICKSTEP as it's called.

    Huawei, you bad boy
    In EMUI 9, instead of defining this value inside some xml resource, Huawei decided to create a jar file instead named "hwServices.jar" & hardcoded EMUI launcher's package name in a "String" variable to be used for triggering the QUICKSTEP intent. This effectively kills the approach taken by QuickSwitch magisk module & us Huawei device owners are left with no other option but EMUI 9's bad implementation.

    The way around
    There are couple of options in this case:
    1. Patch "hwServices.jar" file to point so some 3rd party launcher
    2. Remove default EMUI launcher, create an application with the same package name to relay QUICKSTEP intent between system & third party launchers
    3. Remove default EMUI launcher & replace it with a third party launcher that's modified to have EMUI's default launcher's package name

    After spending the entire weekend trying Option 2 with limited success, I decided to go for Option 3 as modifying "hwServices.jar" itself seemed like too much meddling with the system's functioning. And so I removed default EMUI launcher from my system, took the latest Lawnchair v2's alpha build, patched it to have EMUI's default launcher's package name & installed it instead with system permissions. This works like a charm!

    Instructions
    1. You need a rooted device with Magisk installed
    2. Install (QuickSwitch Magisk module v1.1.2)
    3. Delete "/system/app/HwLauncher6" folder's contents using some file-manager like ES explorer with root permissions ( Create a backup if you want, it can be restored by copying the files back in the same folder if needed)
    4. Reboot phone
    5. Install patched Lawnchair V2's apk attached to this post on your phone.
    6. Using QuickSwitch app installed on your phone, select Lawnchair V2 as the default home app & QuickStep provider. (We are using QuickSwitch only to give our patched Lawnchair v2 app system privileges. If you have any other way of doing this, feel free to do so & you can ignore installing QuickSwitch & it's steps above entirely)
    7. Reboot & everything should be setup correctly.

    Note
    The patched version of Lawnchair v2 attached here is based on the latest alpha build at the time of this post& although everything seems to be working just great, there might be few bugs here & there. I'll update the attachment as & when more stable versions are released.

    Credits
    Special thanks to both @Skittles9823 & @paphonb for interacting with me while I was trying to find a way to get this working on EMUI. Much appreciated!


    Update 1
    The patched version of Lawnchair attached isn't entirely perfect, I'll wait for it's source code to be released to refactor everything properly. Until then, you can use this to replace your existing recents screen & even use a different launcher along with it, as long as attached Lawnchair V2 is a system app.

    Update 2
    Have also added OnePlus's Launcher ported by Paphonb with patch for EMUI 9. You can use this one instead of Lawnchair V2 too, if you like. Kindly note that these might be unstable due to my patches.

    Update 3
    Have updated the attached Lawnchair v2 apk with patch v1.1 (Fixes crashes)

    Latest build download for Lawnchair V2
    You should find fairly recent builds of Lawnchair V2 patched for EMUI here: (To be updated soon!)
    2
    good work!thx
    wonder how you modified to have EMUI's default launcher's package name,if you are okay to tell?
    just want to get more recent update and add more third party launcher to choose

    Easiest way: In Android Manifest file, replace package name to "com.huawei.android.launcher". This works so far for Lawnchair V2 & ported OP Launcher.
    Proper way: Download source, refactor code with new package name & compile. This is tedious and am not sure how reliably can be automated.
    2
    tried with latest lawnchair but it didn't work, wich tool do you use for changing package name?

    There is no tool that'll do it automatically for you. I use apktool to dismantle the apk, change values & repackage it. You'll also have to sign the package using "jarsigner" which comes along with JDK.
    2
    Hello! Are you planning to update to the latest lawn chair? I'm using your modded APK and it's so awesome!

    Have updated original post with patched apk of latest version of Lawnchair V2 currently available. :good:
    1
    With lawnchair, the apps and folders have different fonts. The folder font is my system default. Why is this?

    attachment.php

    You were the lucky one to try this on April Fool's day unfortunately where they changed font as prank. Should be back to system font by 2nd or you can go change it in the 3 dot menu in settings.