Skip to content

Conversation

@JingMatrix
Copy link
Owner

The chattr0 method, which attempts to clear special file attributes (like 'i' for immutable) using ioctl, can fail with an ErrnoException and the error code ENOTSUP (Operation not supported) on certain filesystems or Android environments (e.g., noted on a Android 11 device).

When ioctl fails with ENOTSUP, it means the underlying filesystem does not support the operation of setting/clearing these attributes. In this case, we can safely assume the file/directory is not immutable via this mechanism and treat the operation as a successful non-action.

This commit updates chattr0 to catch ErrnoException specifically and return true if the error is OsConstants.ENOTSUP, preventing unexpected failures in config file management.

The `chattr0` method, which attempts to clear special file attributes (like 'i' for immutable) using `ioctl`, can fail with an `ErrnoException` and the error code `ENOTSUP` (Operation not supported) on certain filesystems or Android environments (e.g., noted on a Android 11 device).

When `ioctl` fails with `ENOTSUP`, it means the underlying filesystem does not support the operation of setting/clearing these attributes. In this case, we can safely assume the file/directory is not immutable via this mechanism and treat the operation as a successful non-action.

This commit updates `chattr0` to catch `ErrnoException` specifically and return `true` if the error is `OsConstants.ENOTSUP`, preventing unexpected failures in config file management.
@JingMatrix
Copy link
Owner Author

@mascherano6-oss, I observed a bug of LSPosed happening on your Android 11 device.

Please flash the CI build https://github.com/JingMatrix/LSPosed/actions/runs/21524500540 and upload your logs.

@mascherano6-oss
Copy link

mascherano6-oss commented Jan 31, 2026

I installed neozygisk, teesimulator, and lsposed on my Note 3 (Android 11). I've attached the log file.

LSPosed_2026-01-31T22_16_37.671.zip

@JingMatrix
Copy link
Owner Author

@mascherano6-oss Please reboot, and upload your logs here again. No need to upload it elsewhere.

@mascherano6-oss
Copy link

I followed the instructions above. I've attached the log file.

LSPosed_2026-01-31T23_18_51.462.zip

@JingMatrix
Copy link
Owner Author

Confirmed that this commits solved the stated problem.

@JingMatrix JingMatrix merged commit 3540f14 into master Jan 31, 2026
1 check passed
@mascherano6-oss

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants