Revancify icon indicating copy to clipboard operation
Revancify copied to clipboard

refactor: use hardlinks instead of bind mount for rooted installations

Open rmnscnce opened this issue 2 years ago • 3 comments

This prevents Revancify from polluting the mount namespace.

Hardlink copies also consume zero additional storage — as the filesystem simply assigns an additional filepath to the existing inode [0], so storage space will not be an issue compared to the existing solution.


References: [0]: https://www.redhat.com/sysadmin/linking-linux-explained (the "Hard links" part)

rmnscnce avatar Dec 06 '23 10:12 rmnscnce

Testing available at: https://github.com/rmnscnce/Revancify/blob/refactor-use-hardlinks-personal/README.md#installation


Known issues:

  • [ ] The original APK gets replaced by the patched one after a reboot

rmnscnce avatar Dec 06 '23 11:12 rmnscnce

I was looking again at this implementation. I noticed something I didn't understand.

https://github.com/rmnscnce/Revancify/blob/refactor-use-hardlinks-personal/root_util.sh#L53

Here, the stock app is being linked to the new path. What difference it makes as compared to simple cp??

decipher3114 avatar Jul 11 '24 18:07 decipher3114

This prevents Revancify from polluting the mount namespace.

Revancify doesn't. You just need to uninstall or update the app using Revancify.

https://github.com/decipher3114/Revancify/blob/main/root_util.sh#L12

This cleans up all the mounts of that particular app, be it old as well.

decipher3114 avatar Jul 11 '24 18:07 decipher3114