salvogiangri / KnoxPatch

LSPosed module to get Samsung apps/features working again in your rooted Galaxy device.
GNU General Public License v3.0
759 stars 31 forks source link

[REQUEST] Possible to restore work profile apps in app switcher/recents? #46

Closed Mnky313 closed 1 year ago

Mnky313 commented 1 year ago

This thread seems to mention it's related to knox/root: https://forum.xda-developers.com/t/work-profile-not-showing-in-recent-apps.3979793/

Apps from work profile/~secure folder~ don't appear in the app switcher/recent menu after knox is tripped. The only information I could find was that XDA thread and testing it for myself it seems correct.

This behaviour should happen on most if not all OneUI versions but I know it happens on OneUI 4 & 5.

Clarification: I have 2 devices both running OneUI 5 and the one without root/knox still intact displays work profile apps in app switcher while the rooted one does not.

salvogiangri commented 1 year ago

Could you share some screenshot about how the recent apps screen looks? Want to see if I can find any hint in the code

Mnky313 commented 1 year ago

Could you share some screenshot about how the recent apps screen looks? Want to see if I can find any hint in the code

Not sure exactly what you're looking for but it's hard to screenrecord what I'm talking about because it ends the recording (because the user changes when opening a work profile app) but if I open the app switcher from a work profile app it disappears instantly and only shows the open apps that aren't part of work profile.

I attached a screenshot of the app switcher on my Zfold3 as well as a video of what I'm talking about with the apps from work profile disappearing instantly. (I open the app switcher from cromite but the only app in it is calculator, cromite isn't displayed). appswitcher

https://github.com/BlackMesa123/KnoxPatch/assets/23646586/66bcdb9b-a2fd-48b5-8862-007c4a9c0924

salvogiangri commented 1 year ago

Wanted to check if a badge is shown in the app icon to see how is it activated and find the actual code that handles the work profile apps in recent apps UI. Is the icon the same with the stock recent apps UI (without GoodLock)?

Mnky313 commented 1 year ago

Wanted to check if a badge is shown in the app icon to see how is it activated and find the actual code that handles the work profile apps in recent apps UI. Is the icon the same with the stock recent apps UI (without GoodLock)?

Are you talking about the badge in the bottom right to indicate the app is running in work profile?

I attached a screenshot from cromite running in work profile (which display the badge in the corner) and the app switcher without goodlock modifying it. Screenshot_20230817_085925_One UI Home Screenshot_20230817_090011

salvogiangri commented 1 year ago

So I found some time to test this myself and I had no issues with apps in recents apps UI on One UI 6, I used Shelter to create a Work profile:

Screenshot_20230825_185416_One UI Home

Will test as well on another device with One UI 5.1 and report back.

salvogiangri commented 1 year ago

Same result on my other device running One UI 5.1:

Screenshot_20230825_192547_One UI Home

Wonder what could be causing this issue in your end...

Mnky313 commented 1 year ago

Same result on my other device running One UI 5.1:

Screenshot_20230825_192547_One UI Home

Wonder what could be causing this issue in your end...

Very interesting...

I have been making it via ADB. but I've fairly certain it happened when I created it with Island before.

I can try creating it via shelter instead and see if that makes any difference though I doubt it as I created the profile via ADB on an unrooted phone and it worked fine...

I notice the kernelSU icon, I've only ever used magisk. Is it possible that could be causing issues? KernelSU is not supported on my device nor do I have the knowledge/ability to port it. (plus I like my magisk modules xD)

Mnky313 commented 1 year ago

Same result on my other device running One UI 5.1:

Screenshot_20230825_192547_One UI Home

Wonder what could be causing this issue in your end...

Very interesting...

I have been making it via ADB. but I've fairly certain it happened when I created it with Island before.

I can try creating it via shelter instead and see if that makes any difference though I doubt it as I created the profile via ADB on an unrooted phone and it worked fine...

I notice the kernelSU icon, I've only ever used magisk. Is it possible that could be causing issues? KernelSU is not supported on my device nor do I have the knowledge/ability to port it. (plus I like my magisk modules xD)

well I'll be damned.

I cannot use Shelter, not sure why. It just errors out saying 'cant setup device, contact IT admin' however Island does work and the apps show up in the app switcher....

Thanks for your help!