bmax121/APatch

是否可以注入自定义rc服务?

Closed this issue · 0 comments

Is your feature request related to a problem?/你的请求是否与某个问题相关?

我想关掉FBE加密提高性能,需要在 on init时替换/vendor/etc/fstab.default.
on init
exec u:r:magisk:s0 0 0 -- /system/bin/sh -c "/system/bin/cat /vendor/etc/fstab.default |/system/bin/sed 's/fileencryption/fillencryption/g' > /dev/fstab && chcon u:object_r:vendor_configs_file:s0 /dev/fstab && /system/bin/chmod 0644 /dev/fstab && /system/bin/mount -o bind /dev/fstab /vendor/etc/fstab.default"

Describe the solution you'd like/描述你想要的解决方案

有没有办法注入这样一段服务给init呢?

Describe alternatives you've considered/描述您考虑过的备选方案

我想应该不能靠模块来做,因为模块需要等到/data挂载后才会读取,那时候已经挂载为加密了。

Additional context/其他信息

我修改了magisk注入以上服务证实了可以启动,但是银行app会检测到magisk。 偶然发现这个项目,试了下支持我的设备 kernel 5.4. 如果kernel版本再高点就尝试kernelsu了,我看过kernelsu里面有注入rc服务的例子。