I am editing paths on some binaries short of recompiling them.
I want to replace /lib/ld-linux-armhf.so.3
, which I cannot create, by a path of same length, that I can create without rooting the phone. It should be something of the same length because I am editing binaries. I have chosen the path /data/data/com.clk/.so.3
, after the different possibilities listed below. What I'm trying to do is create /data/data/com.clk/.so.3
, which should be a symbolic link to /data/data/com.spartacusrex.spartacuside/gentoo_armv6l/lib/ld-linux-armhf.so.3
I initially used /proc/5781/cwd/rmhf.so.3
, but this is not readable by other applications (which are other linux accounts).
I then tried /data/.tmp
, but it is specific to my phone, and not documented according to @ChrisStratton. Same about /data/logcat_log
.
/sdcard
is excluded because fuse options rw,nosuid,nodev,relatime,user_id=1015,group_id=1015,default_permissions,allow_other
restrict links and exectuables and /lib/ld-linux-armhf.so.3
is to be executed.
Does anyone know how else I can accomplish this?
Ln Command to Create Symbolic Links By default, the ln command creates a hard link. Use the -s option to create a soft (symbolic) link. The -f option will force the command to overwrite a file that already exists. Source is the file or directory being linked to.
Symbolic links are automatically resolved by the file system. Any software program, upon accessing a symbolic link, will see the target instead, whether the program is aware of symbolic links or not. Shortcuts are treated like ordinary files by the file system and by software programs that are not aware of them.
Inside the inode for a symlink, there is a pointer to a data block in which we store the file name. Since each block has 8192 bytes, the limit on the file name of the symlink is 8192 bytes long.
Have you considered using PatchELF rather than rolling your own binary editing? It claims to be smart enough to insert an extra page into the ELF header as needed to make room for longer interpreter or RPATH fields. That would allow you to use the real interpreter value rather than needing a symbolic link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With