[Optimization] List of packages, CustoMIUIzer needs edxposed to hook into #193

Closed
opened 3 years ago by Msprg · 18 comments
Msprg commented 3 years ago

I've been experiencing slowness, high system latency and instability on my Redmi Note 7. It isn't the newest phone, but I'm on Android 9 and it shouldn't be such low performing.

Initially, I thought that CustoMIUIzer mods (or maybe some specific mod) was causing this slowness and unresponsiveness, as it usually went away when disabled in edxposed.

But as edxposed recently switched to YAHFA only, the system was slow even without CustoMIUIzer, thus my suspicion has turned to edxposed as the root cause.

By default (currently), edxposed has blacklist where apps / packages can be selected, so edxposed won't hook them. Since this is a blacklist, by default, all packages are hooked by edxposed, which causes significant performance penalty, at least for me.

Now in the settings of edxposed manager, there's option to switch to whitelist mode, where edxposed won't hook any packages by default, just those that are manually selected.

Enabling this, system is (after a reboot) significantly more responsive and stable!

But CustoMIUIzer and other modules for that matter, obviously won't work, as the necessary packages aren't hooked by edxposed.

So it looks like, whitelist mode & only hooking necessary packages, is a way to go for best performance while being able to run mods!

So, now the last piece of puzzle is missing, what packages CustoMIUIzer needs edxposed to hook into?

I really need some list of the packages to whitelist in edxposed, in order for CustoMIUIzer mods to work properly, while not hooking unnecessary apps...

Would you be able to provide it to me? Also, if this approach turns out as a good strategy, I think you could add info about this into some FAQ / help / support (you know best where you'd put it)

Thanks!

I've been experiencing slowness, high system latency and instability on my Redmi Note 7. It isn't the newest phone, but I'm on Android 9 and it shouldn't be such low performing. Initially, I thought that CustoMIUIzer mods (or maybe some specific mod) was causing this slowness and unresponsiveness, as it usually went away when disabled in edxposed. But as edxposed recently switched to YAHFA only, the system was slow even without CustoMIUIzer, thus my suspicion has turned to edxposed as the root cause. By default (currently), edxposed has blacklist where apps / packages can be selected, so edxposed won't hook them. Since this is a blacklist, by default, all packages are hooked by edxposed, which causes significant performance penalty, at least for me. Now in the settings of edxposed manager, there's option to switch to whitelist mode, where edxposed won't hook any packages by default, just those that are manually selected. Enabling this, system is (after a reboot) significantly more responsive and stable! But CustoMIUIzer and other modules for that matter, obviously won't work, as the necessary packages aren't hooked by edxposed. So it looks like, whitelist mode & only hooking necessary packages, is a way to go for best performance while being able to run mods! So, now the last piece of puzzle is missing, what packages CustoMIUIzer needs edxposed to hook into? I really need some list of the packages to whitelist in edxposed, in order for CustoMIUIzer mods to work properly, while not hooking unnecessary apps... Would you be able to provide it to me? Also, if this approach turns out as a good strategy, I think you could add info about this into some FAQ / help / support (you know best where you'd put it) Thanks!
Owner

I do not recommend using these versions of Xposed framework, they are a mess. If you want stable and fast device (Android below 11) and don't really care about Google Pay/SafetyNet stuff then you should install EdXposed 0.4.6.4 and forget about 0.5.x.x and LSPosed with their permamnent app list mode and other useless gimmicks. You cannot use whitelisting there and not break at least some mods (around 30 mods to be exact that will be broken partially or completely if you don't whitelist every single app).

I do not recommend using these versions of Xposed framework, they are a mess. If you want stable and fast device (Android below 11) and don't really care about Google Pay/SafetyNet stuff then you should install EdXposed 0.4.6.4 and forget about 0.5.x.x and LSPosed with their permamnent app list mode and other useless gimmicks. You cannot use whitelisting there and not break at least some mods (around 30 mods to be exact that will be broken partially or completely if you don't whitelist **every single app**).
Msprg commented 3 years ago
Poster

Oh, wow, didn't know that was the case. So I think I will downgrade to 0.4.6.4, and see how will the performace be for me. If it'll perform good, then I'll very likely stay at this version for some time...


So, I have written the previous paragraph about 2 hours after you posted your comment, but, ... okay, so I got edXposed YAHFA 0.4.6.4.4563 & riru - core 21.3 (as with newer riru core module, after it was renamed to just riru, edXposed YAHFA 0.4.6.4.4563 just didn't install because it couldn't find "riru - core" and as far as my research led me, the riru - core v21.3 was the last one that was compatible with it. The riru - core appears pretty fine after installation, but as soon as I reboot to system, close before end of booting up the userspace, some services appear to just keep dying, and it bacically never never finishes booting because of that...

But I'm no new to playing with android, so I have backups, and I didn't even need them, as I was able to just disable edXposed module from recovery, so... that's that...

In the meantime, I will try older version of edXposed, (YAHFA 0.4.6.2.4529) but otherwise, I'd be very happy if you'd provided me with the specific versions of modules (riru & edXposed) that you are using (or, at least I suppose you are...) or better yet, get me the install zips...? At least then I'd know if it's some ROM/device specific issue (boot stalling) or maybe I just got unlucky with the combination :/

Oh, wow, didn't know that was the case. So I think I will downgrade to 0.4.6.4, and see how will the performace be for me. If it'll perform good, then I'll very likely stay at this version for some time... ------------------------------------------------------------------------------------------ So, I have written the previous paragraph about 2 hours after you posted your comment, but, ... okay, so I got edXposed YAHFA 0.4.6.4.4563 & riru - core 21.3 (as with newer riru core module, after it was renamed to just riru, edXposed YAHFA 0.4.6.4.4563 just didn't install because it couldn't find "riru - core" and [as far as my research led me](https://forum.xda-developers.com/t/riru-core-is-not-installed.4194923/), the riru - core v21.3 was the last one that was compatible with it. The riru - core appears pretty fine after installation, but as soon as I reboot to system, close before end of booting up the userspace, some services appear to just keep dying, and it bacically never never finishes booting because of that... But I'm no new to playing with android, so I have backups, and I didn't even need them, as I was able to just disable edXposed module from recovery, so... that's that... In the meantime, I will try older version of edXposed, (YAHFA 0.4.6.2.4529) but otherwise, I'd be very happy if you'd provided me with the specific versions of modules (riru & edXposed) that you are using (or, at least I suppose you are...) or better yet, get me the install zips...? At least then I'd know if it's some ROM/device specific issue (boot stalling) or maybe I just got unlucky with the combination :/
Owner

Riru 21.3 + EdXposed 0.4.6.4 + EdXposed Manager 4.6.2 should work. I'm on 21.4 + 0.5.2.2 now just for testing.

Riru 21.3 + EdXposed 0.4.6.4 + EdXposed Manager 4.6.2 should work. I'm on 21.4 + 0.5.2.2 now just for testing.
Msprg commented 3 years ago
Poster

Update: Yeah, it's the same story with edXposed YAHFA 0.4.6.2.4529 thigs are just failing so horribly poor thing simply cannot finish booting :(

Update: Yeah, it's the same story with edXposed YAHFA 0.4.6.2.4529 thigs are just failing so horribly poor thing simply cannot finish booting :(
Owner

Read logcat during boot, find the problem and fix it :)

Read logcat during boot, find the problem and fix it :)
Msprg commented 3 years ago
Poster

Riru 21.3 + EdXposed 0.4.6.4 + EdXposed Manager 4.6.2 should work. I'm on 21.4 + 0.5.2.2 now just for testing.

Thank you, I will try this combination, and try to report back...


Read logcat during boot, find the problem and fix it :)

Yeah, like I can run adb logcat, and even though it's scrolling like crazy, I can spot wether some progress is being made (like rebuilding dalvik can take so long, someone else could assume it's stuck) or if problematic patterns emerge, kind of intuitively.

I mean, I just stare at it for a few seconds, and I'm like yup, it's stuck on one place.

But, unfortunately, I'm definitely not on such level as to just read through logcat (it'd take me ages with the amount of output generated) and deduce what is causing the trouble, and then like fix it. I admire people that can do it, and I believe that you can as well, but as I said, I'm just not on that level... yet... ;)


So, yeah, I'll try to remember to get back to you, after trying the combination suggested by you. Fortunately, it's harder to very badly brick system, with magisk nowadays, than back in the day trying flashing "random" zips, and having system, boot, and even data backup ready...

> Riru 21.3 + EdXposed 0.4.6.4 + EdXposed Manager 4.6.2 should work. > I'm on 21.4 + 0.5.2.2 now just for testing. Thank you, I will try this combination, and try to report back... ------------------------------------------------------------------------- > Read logcat during boot, find the problem and fix it :) Yeah, like I can run `adb logcat`, and even though it's scrolling like crazy, I can spot wether some progress is being made (like rebuilding dalvik can take so long, someone else could assume it's stuck) or if problematic patterns emerge, kind of intuitively. I mean, I just stare at it for a few seconds, and I'm like yup, it's stuck on one place. But, unfortunately, I'm definitely not on such level as to just read through logcat (it'd take me ages with the amount of output generated) and deduce what is causing the trouble, and then like fix it. I admire people that can do it, and I believe that you can as well, but as I said, I'm just not on that level... yet... ;) ----------------------------------------------------------------------- So, yeah, I'll try to remember to get back to you, after trying the combination suggested by you. Fortunately, it's harder to very badly brick system, with magisk nowadays, than back in the day trying flashing "random" zips, and having system, boot, and even data backup ready...
Owner

adb logcat > boot.log Then just search file for AndroidRuntime (java crashes) or fault addr (native crashes).

`adb logcat > boot.log` Then just search file for **AndroidRuntime** (java crashes) or **fault addr** (native crashes).
Msprg commented 3 years ago
Poster

Hi, so, for AndroidRuntime I got bunch of

04-01 22:13:16.409 32633 32633 D AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<
04-01 22:13:16.500 32632 32632 D AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<
04-01 22:13:21.207   794   794 D AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<
04-01 22:13:21.748   793   793 D AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<
04-01 22:13:26.232  1407  1407 D AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<

lines, I don't think they are crashes, but it looks like zygote cannot be started.

Then for fault addr I'm gettin a loot of:

04-01 22:00:09.093  6245  6245 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
04-01 22:00:13.835  6251  6251 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 6251 (main), pid 6251 (main)
04-01 22:00:13.963  6544  6544 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
04-01 22:00:18.918  6556  6556 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 6556 (main), pid 6556 (main)

Segfault seems obviously bad to me, but I have no idea what to actually do about it, nor how should I proceed with the investigation. The strange thing is, that I've likely been running this versions in the past, and they have worked but now, they simply aren't...

I didn't wanted to use you as a tech support for edXposed or riru, but here we are...

Hi, so, for `AndroidRuntime` I got bunch of ``` 04-01 22:13:16.409 32633 32633 D AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<< 04-01 22:13:16.500 32632 32632 D AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<< 04-01 22:13:21.207 794 794 D AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<< 04-01 22:13:21.748 793 793 D AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<< 04-01 22:13:26.232 1407 1407 D AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<< ``` lines, I don't think they are crashes, but it looks like zygote cannot be started. Then for `fault addr` I'm gettin a loot of: ``` 04-01 22:00:09.093 6245 6245 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 04-01 22:00:13.835 6251 6251 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 6251 (main), pid 6251 (main) 04-01 22:00:13.963 6544 6544 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 04-01 22:00:18.918 6556 6556 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 6556 (main), pid 6556 (main) ``` Segfault seems obviously bad to me, but I have no idea what to actually do about it, nor how should I proceed with the investigation. The strange thing is, that I've likely been running this versions in the past, and they have worked but now, they simply aren't... I didn't wanted to use you as a tech support for edXposed or riru, *but here we are...*
Owner

Show the whole text of those errors or just attach a log.

Show the whole text of those errors or just attach a log.
Msprg commented 3 years ago
Poster

Well you can try, but this was recorded when it was already bootlooping, if you'd like whole bootlog, just ask, I can record it... But I expect it to be quite big...

Well you can try, but this was recorded when it was already bootlooping, if you'd like whole bootlog, just ask, I can record it... But I expect it to be quite big...
3.6 MiB
Owner

Yeah, some EdXposed Framework bug, its native lib crashes, most likely fixed in 0.5.x.x, so you are out of luck with an old high performance version.

Yeah, some EdXposed Framework bug, its native lib crashes, most likely fixed in 0.5.x.x, so you are out of luck with an old high performance version.
Msprg commented 3 years ago
Poster

:/ damn...

Read logcat during boot, find the problem and fix it :)

Not so easy, now is it ;) yeah, sometimes it's just more complicated. Pretty sure it has worked some time before, might be on an older ROM tho...

Nevermind I guess I'll be on the 21.4 + 0.5.2.2 as you are for testing ;) It actually ran pretty smoothly, with that withelisting, and mods, at least the ones that I was using appeared to bo working fine... (or I'll maybe even test lsposed, never tried that...)

If there'd be some news regarding this, please ping me. ... or not, I'll likely find out eventually.

So, I'll try that, and report back regarding performance... Thank you so far! I'm glad you've helped!

:/ damn... > Read logcat during boot, find the problem and fix it :) Not so easy, now is it ;) yeah, sometimes it's just more complicated. Pretty sure it has worked some time before, might be on an older ROM tho... Nevermind I guess I'll be on the 21.4 + 0.5.2.2 as you are for testing ;) It actually ran pretty smoothly, with that withelisting, and mods, at least the ones that I was using appeared to bo working fine... (or I'll maybe even test lsposed, never tried that...) If there'd be some news regarding this, please ping me. ... or not, I'll likely find out eventually. So, I'll try that, and report back regarding performance... Thank you so far! I'm glad you've helped!
Msprg commented 3 years ago
Poster

I am unable to find riru 21.4, only 21.3 are you sure it's 21.4? If so can you attach zip for that 21.4?

I am unable to find riru 21.4, only 21.3 are you sure it's 21.4? If so can you attach zip for that 21.4?
Owner

Sorry, it's Magisk 21.4, riru is 23.4. Latest is 25.3 or whatever, but I haven't tried it yet.

Sorry, it's Magisk 21.4, riru is 23.4. Latest is 25.3 or whatever, but I haven't tried it yet.
Msprg commented 3 years ago
Poster

Okay, so I've tested it in whitelist mode for about a week, and while it is definitely holding on better, the is still significant performance drop over time. So, what are my options about the high performance solution? What can I do about those pesky libraries? As you can tell, it not like I'm gonna cook my own ROM, but is there a way to test this fast, & mainly not harming my current system (I hate setting everything up again... During one period of time, I've been using twrp, and my storage got encrypted (like the key was lost) almost every time I switched to another ROM) 6 times, until I found out there was a bug in TWRP that was causing this.

So... Can I test this somehow, or maybe change only those libs?

Okay, so I've tested it in whitelist mode for about a week, and while it is definitely holding on better, the is still significant performance drop over time. So, what are my options about the high performance solution? What can I do about those pesky libraries? As you can tell, it not like I'm gonna cook my own ROM, but is there a way to test this fast, & mainly not harming my current system (I hate setting everything up again... During one period of time, I've been using twrp, and my storage got encrypted (like the key was lost) almost every time I switched to another ROM) 6 times, until I found out there was a bug in TWRP that was causing this. So... Can I test this somehow, or maybe change only those libs?
Owner

You don't have any options, 0.4.6.4 is the only way to get best performance, but it's no longer maintained, so devs won't fix that crash. You can try LSPosed, people say it's faster than EdXposed 0.5.x.x.

You don't have any options, 0.4.6.4 is the only way to get best performance, but it's no longer maintained, so devs won't fix that crash. You can try LSPosed, people say it's faster than EdXposed 0.5.x.x.
Msprg commented 3 years ago
Poster

Okay, thanks, a bit disapointed I can't fix it myself... Like I didn't expected it to be easy or anything... I'll give LSPosed a try, and hopefully doesn't forget to reply...

Okay, thanks, a bit disapointed I can't fix it myself... Like I didn't expected it to be easy or anything... I'll give LSPosed a try, and hopefully doesn't forget to reply...
Msprg commented 3 years ago
Poster

So, anyways...

While LSPosed works only with riru 25+, I find it kind of on par with EdXposed in whitelist.

Now it seems that LSPosed seems more performantonly because it has apparently the very much same whitelist turned on at all times - but also customizable per module, so only selected modules will hook into the selected apps

I think that there are less mods that are broken, when using LSPosed as opposed to Edxposed with whitelist enabled, but in the last few days, - not sure what changed, tho, CustoMIUIzer got an update & riru as well - but I'm suddenly experiencing severe performance drops again...

So, I'd say that while performance is there, it's still not reliable...

I swear to god, I'll downgrade / switch to another (miui) ROM, just to run the damn Riru 21.3 + EdXposed 0.4.6.4

(On my former Redmi 4X, with the old-old version of xposed - not this systemless mess - it ran like a champ...)

...

So.. thanks for the help I guess. Shame it's so underperforming - for me at least, but seems I can't do a lot about it, without switching ROMs... So I don't think this issue being open here is of any relevance anymore, mainly, when it's not the issue of CustoMIUIzer...

You has been very nice to me & patient with me. Thank you for that!

Have a nice day!

So, anyways... While LSPosed works only with riru 25+, I find it kind of on par with EdXposed in whitelist. Now it seems that LSPosed seems more performantonly because it has apparently the very much same whitelist turned on at all times - but also customizable per module, so only selected modules will hook into the selected apps I think that there are less mods that are broken, when using LSPosed as opposed to Edxposed with whitelist enabled, but in the last few days, - not sure what changed, tho, CustoMIUIzer got an update & riru as well - but I'm suddenly experiencing severe performance drops again... So, I'd say that while performance is there, it's still not reliable... I swear to god, I'll downgrade / switch to another (miui) ROM, just to run the damn Riru 21.3 + EdXposed 0.4.6.4 (On my former Redmi 4X, with the old-old version of xposed - not this systemless mess - it ran like a champ...) ... So.. thanks for the help I guess. Shame it's so underperforming - for me at least, but seems I can't do a lot about it, without switching ROMs... So I don't think this issue being open here is of any relevance anymore, mainly, when it's not the issue of CustoMIUIzer... You has been very nice to me & patient with me. Thank you for that! Have a nice day!
Msprg closed this issue 3 years ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Mikanoshi/CustoMIUIzer#193
Loading…
There is no content yet.