mywalkb / LSPosed_mod

My changes to LSPosed
GNU General Public License v3.0
3.65k stars 170 forks source link

Disable logs switch #76

Closed privacyguy123 closed 7 months ago

privacyguy123 commented 7 months ago

Is your feature request related to a problem?

Sort of - some apps detect the presence of Lsposed through logs.

Describe the solution you'd like

Add a switch to turn off logs completely. There is a persist prop you can set told to me by developers but I think it'd be better to just terminate logs within the Lsposed app itself.

Additional context

No response

mywalkb commented 7 months ago

Have you tried to disable the switch "Enable watchdog logs"? There was a PR in original LSPosed never accepted which I merged in my repo, but I never found an app or anyone who could confirm that it worked. However, it can be improved and should not take too long to do so.

privacyguy123 commented 7 months ago

Have you tried to disable the switch "Enable watchdog logs"? There was a PR in original LSPosed never accepted which I merged in my repo, but I never found an app or anyone who could confirm that it worked. However, it can be improved and should not take too long to do so.

Yep, unfortunately that's not enough to keep some apps happy. The logs need to be totally off if possible!

mywalkb commented 7 months ago

Could you tell me some name of apps for test?

privacyguy123 commented 7 months ago

Native Test and Native Detector test apps know when it's installed just thru logs, 0 modules enabled. Off the top of my head I tested 100s of banking apps, I cannot remember exact names right now.

Is it possible you just add a switch to kill the logs completely? Watchdog is not enough.

mywalkb commented 7 months ago

Is it possible you just add a switch to kill the logs completely?

switch is a short operation, reviewing all the code where there is a log will be a long operation. However it might be useful, so I will try to implement the request.

aviraxp commented 7 months ago

Neither Native Test nor Native Detector detects it through logs. They cannot even get the log buffer of another process with different pid. Only way to detect it through logs is the app is injected, but apps have 10000 ways to detect lsposed if it is injected anyway.

mywalkb commented 7 months ago

when I analyzed some bank apps, no one checked the logs, one threw an exception and checked the stacktrace for detect the presence of xposed. When I merged this commit from a rejected PR of original LSPosed, I was never able to understand if it was really useful, then I saw that it didn't do any damage and I left it, but according to the author some banking apps worked with this patch.

privacyguy123 commented 7 months ago

If you aren't willing to push to main branch I'd appreciate if you could show me how to implement it experimentally to test it at least.

mywalkb commented 7 months ago

It's already in the main branch. Is the code which you can enable or disable with switch "Enable watchdog logs". You can read the thread in this PR. In that PR the changes is permanent, while with the switch you can enable/disable. The default value is enabled so no changes, while when is disabled the patch is active.

privacyguy123 commented 7 months ago

I'm almost certain this toggle isn't turning off all logging

BlueCat300 commented 7 months ago

Do not turn off the logs permanently, only an optional switch please! Normal development of modules without logs is not possible.

Applications can easily find the framework through stacktrace...

privacyguy123 commented 7 months ago

Yes exactly what I am asking for - a toggle.

mywalkb commented 7 months ago

I'm almost certain this toggle isn't turning off all logging

I know but since someone wrote that they had solved it, so I thought I'd give the possibility to use this patch.

Do not turn off the logs permanently

In my mod people can choose as configure the LSPosed framework, I never removed nothing and I will never be, you can use my API or new API, you can use CLI or GUI. I don't like to impose anything, such as the ability to select all the apps or none, everyone is free to choose how best to do it on their device.

privacyguy123 commented 7 months ago

I'm almost certain this toggle isn't turning off all logging

I know but since someone wrote that they had solved it, so I thought I'd give the possibility to use this patch.

Unfortunately I'm not well versed in coding though to implement such a thing - imagine it's not too much work to add a disable all logs switch?

abdogm commented 7 months ago

Have you tried to disable the switch "Enable watchdog logs"? There was a PR in original LSPosed never accepted which I merged in my repo, but I never found an app or anyone who could confirm that it worked. However, it can be improved and should not take too long to do so.

hi i confirmed it wasn't enough apps that are injected crashed, as example - rainbow six mobile in momo app shows zygote is injected which mean the game actually detects it as a temporary fix i used a magisk module called "turnofflogd" to disable the logs completely but the draw back of this is when you want to use a log eliminator module and have LPSosed, the module can break and an excessive and infinite log failure can occur, therefore it can cause Ram to fill up for no reason cuz using the switch to disable it doesn't actually disable all the logs i know logs are needed for development of modules so here are my suggestions if you consider em

  1. a separate module with logs being completely off for the normal user and another version for developers with logs enabled
  2. a toggle that disables the logs completely instead of "Enable watchdog logs"
mywalkb commented 7 months ago

@abdogm could you test this action? Logs is removed at compilation time. Disable the magisk module turnofflogd, install this action and try. If works, we will see which of the 2 paths to take. Obviously removing logs does not solve all apps only a small percentage will be compatible and can stop working at any time because the app can change the detection method.

privacyguy123 commented 7 months ago

This new branch doesn't fool a detector app like another fork does

mywalkb commented 7 months ago

Well, I suggest you to use the other fork.

privacyguy123 commented 7 months ago

I think yours seems more stable. You just need to kill all logs, including Verbose startup logs to eliminate all detection vectors.

juvannx commented 7 months ago

a detector app

Which app do you use to detect Momo or another one? If it's another one, could you tell me which one?

mJtUyT commented 7 months ago

When it comes to removing logs, I do have a way to try, but you need a file manager that has access to the directory where the module is located, I recommend using "mt manager" here

First, flash LSPosed in full and reboot your device, using the mt manager to access/data/ADB/modules/zygisk _ lsposed/, click on the daemon. Apk, and select View,Then click on the classes. Dex and open it with Dxe Editor + +,Open the org. Lsposed. Lspd/service/LogcatServiceDelete the characters in this file: IMG_20240421_175737 Save and exit after the deletion is complete.Select "Yes" when prompted "whether to update it in the file", and automatic signature is not required. After that, the backup file of the daemon. Apk. Bak will appear in/data/ADB/modules/zygisk _ lsposed/. This backup file is an important file for restoring the log function in the future. Then restart your device and open LSPosed Manager again and there will be almost no log files, but there will be similar error messages. This will not affect your module usage, but you will no longer get logs.

If you need to restore the log function in the future, just use the mt manager to open/data/ADB/modules/zygisk _ lsposed/, click the daemon. Apk. Bak file generated by the previous modification, and the daemon. Apk and daemon. Apk. Bak will be replaced with each other. Restore before, of course, you can also re-flash into LSPosed

Finally, it is not recommended to modify any file, and there is no guarantee that there will be no problem. Please respect the results of the module author's labor. The feedback of the module needs to provide log information, and the feedback without log information will not be ignored by the developer. So, what is the effect of removing the log?

privacyguy123 commented 7 months ago

Does this method remove the "Verbose Logs" section that is populated on phone startup also?

If all it takes is removing this method then adding a toggle for it should be simple no?

mJtUyT commented 7 months ago

此方法是否也会删除手机启动时填充的“详细日志”部分?

如果只需要删除此方法,那么为它添加一个切换开关应该很简单,不是吗?

This method will delete the detailed log after startup.However, the function of deleting logs may be difficult to achieve, because developers need to use logs to eliminate errors, and if errors occur after deleting logs, there is no way to troubleshoot them.

privacyguy123 commented 7 months ago

此方法是否也会删除手机启动时填充的“详细日志”部分? 如果只需要删除此方法,那么为它添加一个切换开关应该很简单,不是吗?

This method will delete the detailed log after startup.However, the function of deleting logs may be difficult to achieve, because developers need to use logs to eliminate errors, and if errors occur after deleting logs, there is no way to troubleshoot them.

Sure, I get this - I'm not a dev and don't care for the logs, they are a detection vector I have proven this despite pushback.

juvannx commented 7 months ago

they are a detection vector I have proven this despite pushback.

@privacyguy123 you keep repeating the same sentence over and over but you haven't brought any proof about it. You don't want to say which banking apps detect the logs, you don't want to say which app you use to do the detect. I asked if it was momo or another, no reply.

privacyguy123 commented 6 months ago

they are a detection vector I have proven this despite pushback.

@privacyguy123 you keep repeating the same sentence over and over but you haven't brought any proof about it. You don't want to say which banking apps detect the logs, you don't want to say which app you use to do the detect. I asked if it was momo or another, no reply.

Indrive Native Test