APatch icon indicating copy to clipboard operation
APatch copied to clipboard

Issues or not with .bind_mount_enable ?

Open VisionR1 opened this issue 1 year ago • 33 comments

Please check before submitting an issue/在提交 issue 前请检查

  • [X] I have searched the issues and haven't found anything relevant/我已经搜索了 issues 列表,没有发现于本问题相关内容
  • [X] If patch failed, root failed, or device unable to boot after flashing the new boot.img. Please goto KernelPatch/修复失败或刷入修补后镜像不能启动,请前往 KernelPatch 提问
  • [X] I will upload bugreport file in APatch Manager - Settings - Report log/我会上传 bureport 文件从 APatch 管理器 - 设置 - 发送日志
  • [X] I know how to reproduce the issue which may not be specific to my device/我知道如何重新复现这个问题

Version requirement/版本要求

  • [X] I am using latest CI version of APatch/我正在使用最新 CI 版本

Describe the bug/描述 bug

In case someone have the same. Latest nightly build with feature .bind_mount_enable, have some issues, the modules not update, example, the PIFork when I create the script-only-mode and install it again from APatch, instead of script-only-mode, install the full version again. And module who remove or replace system apps, when install it the integrity failed, even the basic not pass, with PIF, even with TrickyStore. If disabled my module for remove&replace files system, the integrity work again. In Kitsune Mask I don't have problems with this specific feature.

Reproduce method/复现方法

  1. Update a module. example from PIFork full mode to script-only-mode.

  2. Install a module, who remove&replace system files.

Expected behavior/预期行为

  1. Install a module actually update.

  2. Not failed the integrity, even the basic.

Actual behaviour /实际行为

All the above.

Screenshots/截图

IMG_20241103_173923 cp: '/data/adb/modules/playintegrityfix/module.prop' and '/data/adb/modules/playintegrityfix/module.prop' are the same file.

This feature, is from Kitsune Mask. IMG_20241103_170806

Logs/日志

No response

Device Name/设备名称

Xiaomi Poco X3 NFC

OS Version/系统版本

11

APatch Version/APatch 版本

APatch_10763-236-g9b935ac/10999

Kernel Version/内核版本

4.14.180-perf-gae096ac9215c

KernelPatch Version/KernelPatch 版本

0.11.1

Additional context/其他信息

Nothing more.

VisionR1 avatar Nov 03 '24 15:11 VisionR1

I found when I replace hosts in system/etc and remove apps from system/pri-apps the integrity failed, even the basic, but if I replace the bootanimation from system/media, the integrity all good.

VisionR1 avatar Nov 14 '24 21:11 VisionR1

APatch_install_APM_log_2024-11-23-16-50-10.log APatch_bugreport_2024-11-23_16_50.tar.gz I have read only Filesystem, can you check the Logs?

shedowe19 avatar Nov 23 '24 15:11 shedowe19

APatch_install_APM_log_2024-11-23-16-50-10.log Uploading APatch_bugreport_2024-11-23_16_50.tar.gz… I have read only Filesystem, can you check the Logs?

Oh, now I have again the overlayfs mode. What logs exactly?

VisionR1 avatar Nov 23 '24 15:11 VisionR1

APatch_install_APM_log_2024-11-23-16-50-10.log Uploading APatch_bugreport_2024-11-23_16_50.tar.gz… I have read only Filesystem, can you check the Logs?

Oh, now I have again the overlayfs mode. What logs exactly?

Now the Logs are there

shedowe19 avatar Nov 23 '24 16:11 shedowe19

I have only write acess after Boot 5 minutes and then are in Read Only Mode

shedowe19 avatar Nov 23 '24 16:11 shedowe19

I have only write acess after Boot 5 minutes and then are in Read Only Mode

I'm little confused, how your issue, is relative with mine? You have this issue after bind_mount_enable ?

VisionR1 avatar Nov 23 '24 16:11 VisionR1

Screenshot_20241123-171426 With the Module Magisk_overlayfs its worked, but not without

shedowe19 avatar Nov 23 '24 16:11 shedowe19

Oh, unfortunately I don't know, maybe your kernel somehow reject the internal overlayfs, and with this module can bypass. In my device the internal overlayfs work, for me not work the bind_mount_enable. like issue title. Have you write about that, in the telegram Group?

VisionR1 avatar Nov 23 '24 16:11 VisionR1

heya, sorry to hijack this thread, does APatch give unmount now on bind mount mode?

backslashxx avatar Dec 03 '24 03:12 backslashxx

heya, sorry to hijack this thread, does APatch give unmount now on bind mount mode?

I don't know exactly. I read the change there: https://github.com/bmax121/APatch/commit/f30f346a109ca52982b44cdd315b4ef9882006ba

You can ask in Telegram group about this.

VisionR1 avatar Dec 03 '24 13:12 VisionR1

so I tested this mode with someone for module devs, when customize.sh is running, remember that MODDIR == MODPATH on it it doesnt prepare a temporary folder, so if your module is named abcd it will straight up write files to /data/adb/modules/abcd instead of a /data/adb/modules_update/abcd

this will fuckup config migrations on some modules so handle it your way.

only heuristic you have is the existence of /data/adb/.bind_mount_enable

backslashxx avatar Dec 03 '24 16:12 backslashxx

so I tested this mode with someone for module devs, when customize.sh is running, remember that MODDIR == MODPATH on it it doesnt prepare a temporary folder, so if your module is named abcd it will straight up write files to /data/adb/modules/abcd instead of a /data/adb/modules_update/abcd

this will fuckup config migrations on some modules so handle it your way.

only heuristic you have is the existence of /data/adb/.bind_mount_enable

Exactly, me to, I have done test to see what happens, I hope the devs, fix this issue.

VisionR1 avatar Dec 03 '24 16:12 VisionR1

https://github.com/bmax121/APatch/tree/new test this branch , check it work or not https://github.com/bmax121/APatch/actions/runs/12157290232

Admirepowered avatar Dec 04 '24 10:12 Admirepowered

https://github.com/bmax121/APatch/tree/new test this branch , check it work or not https://github.com/bmax121/APatch/actions/runs/12157290232

I hope ksu also does the same thing. theres no way to mitigate that journaled-loop detection-point currently https://github.com/tiann/KernelSU/issues/2225#issuecomment-2498032113

@shedowe19 hah I just noticed that magical overlayfs :)

backslashxx avatar Dec 04 '24 10:12 backslashxx

https://github.com/bmax121/APatch/tree/new test this branch , check it work or not https://github.com/bmax121/APatch/actions/runs/12157290232

I hope ksu also does the same thing. theres no way to mitigate that journaled-loop detection-point currently tiann/KernelSU#2225 (comment)

sry,i'm not ksu dev

Admirepowered avatar Dec 04 '24 10:12 Admirepowered

Now the modules update works, only the integrity even basic failed, even with PIF with a FP.

VisionR1 avatar Dec 04 '24 12:12 VisionR1

@Admirepowered will this be added to the environment? say

APATCH_BIND_MOUNT=true

this way customize.sh can differentiate but yeah for now

[ -f /data/adb/.bind_mount_enable ] 

works.

backslashxx avatar Dec 04 '24 12:12 backslashxx

@backslashxx For you the integrity work? For me always failed with my above setup.

VisionR1 avatar Dec 04 '24 12:12 VisionR1

@backslashxx For you the integrity work? For me always failed with my above setup.

I dont have an apatch device :D but maybe sometime, I was just debugging other people's issue

backslashxx avatar Dec 04 '24 13:12 backslashxx

@backslashxx For you the integrity work? For me always failed with my above setup.

I dont have an apatch device :D but maybe sometime, I was just debugging other people's issue

Understand, what root method you have?

VisionR1 avatar Dec 04 '24 13:12 VisionR1

Understand, what root method you have?

KSU and Magisk on another device

backslashxx avatar Dec 04 '24 13:12 backslashxx

remove tricky store,use only pif

On Wed, 4 Dec 2024, 21:18 VisionR1, @.***> wrote:

@backslashxx https://github.com/backslashxx For you the integrity work? For me always failed with my above setup.

I dont have an apatch device :D but maybe sometime, I was just debugging other people's issue

Understand, what root method you have?

— Reply to this email directly, view it on GitHub https://github.com/bmax121/APatch/issues/763#issuecomment-2517323942, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7ZHGVSMQHSL2IBZ64N3E7D2D36KDAVCNFSM6AAAAABRC3FUPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJXGMZDGOJUGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

tuyie78 avatar Dec 04 '24 13:12 tuyie78

remove tricky store,use only pif On Wed, 4 Dec 2024, 21:18 VisionR1, @.> wrote: @backslashxx https://github.com/backslashxx For you the integrity work? For me always failed with my above setup. I dont have an apatch device :D but maybe sometime, I was just debugging other people's issue Understand, what root method you have? — Reply to this email directly, view it on GitHub <#763 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7ZHGVSMQHSL2IBZ64N3E7D2D36KDAVCNFSM6AAAAABRC3FUPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJXGMZDGOJUGI . You are receiving this because you are subscribed to this thread.Message ID: @.>

For me I have APatch, because no need to spoof a FP via PIF, only need a module to spoof sensitive props, like PIFork script-only-mode, and Tricky Store.

VisionR1 avatar Dec 04 '24 13:12 VisionR1

@Admirepowered will this be added to the environment? say

APATCH_BIND_MOUNT=true

this way customize.sh can differentiate but yeah for now

[ -f /data/adb/.bind_mount_enable ] 

works.

Will it be more convenient for module development? I don't know, just add one line to the code

Admirepowered avatar Dec 04 '24 15:12 Admirepowered

Will it be more convenient for module development? I don't know, just add one line to the code

well yup so we can differentiate if APatch is on OverlayFS mode or bind-mount mode. I guess better wait for other module devs too, keep this issue open for some time

backslashxx avatar Dec 04 '24 15:12 backslashxx

Will it be more convenient for module development? I don't know, just add one line to the code

Yes, add it please 🤗

ghost avatar Dec 04 '24 15:12 ghost

In my opinion, the first one is a better approach, as not only can better adapt in the future, in the case where APatch devs want to remove this file and turn bind mount the default, but also it looks more clean.

ThePedroo avatar Dec 05 '24 01:12 ThePedroo

Will it be more convenient for module development? I don't know, just add one line to the code

Yes it will be more convenient.

ZG089 avatar Dec 05 '24 03:12 ZG089

Will it be more convenient for module development? I don't know, just add one line to the code

yes it would be.

oct888 avatar Dec 05 '24 09:12 oct888

Anyone, for you the integrity work, with bind_mount_enable? For me always failed with my above setup.

VisionR1 avatar Dec 05 '24 11:12 VisionR1