Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: linker: app_process has text relocations. This is wasting memory and is a security risk. Please fix. Permissions denied

Tags:

android

I tried to run a command via Android terminal, but when I execute my command:

"svc data enable/disable" this error appears:

"Warning: linker: app_process has text relocations. This is wasting memory and is a security risk. Please fix. Permissions denied"

I'm under htc one(android 4.4.2 kitkat, sense 5.5) rooted , with Venom rom 5.7.0 and xposed framework installed.

How can I avoid this problem and run the command smoothly?

P.s. I have sent the command with SuperUser permissions given to the terminal.

like image 628
user3449574 Avatar asked Mar 22 '14 12:03

user3449574


1 Answers

Relocations error is caused by the fact that xposed framework replaces genuine app_process with a custom one, which is somehow unoptimized as it has been built to work on every modern (well, almost every...) android device/system.

After uninstalling/reverting to stock (thru xposed installer or by flashing uninstall zip created on sdcard during installation) you'll find out that the warning is gone (as well as all xposed related customizations).

If you are writing a script and don't want to see the warning, just forward the error output somewhere else than STDERR, i.e: svc data enable 2>/dev/null

Permission denied for svc data enable? That seems uncausal, as it shall retry in 1sec intervals even if failed (displaying appropriate output). Didn't have htc ever, so I don't know if it may be somehow protected by them... however, android terminal which is quite limited in many situations manages to print permission denied error if it did not find something at all (instead of ie. "not found"). Here however, as you have 4.4.2, it is more likely selinux context issue preventing something to be done, it happens often when modding, usually not resulting in any issues (and sometimes resulting with a bootloop). You may try:

su
mount -o rw,remount /system
restorecon -Rv /system

(-R only for non-verbose/silent mode)

It is a one time operation, persistent until messing with files again. Try the command after that (I don't know if reboot is needed).

PS: it is a risky operation, do a nand backup of /system before and restore if bootlooped (and don't blame me).

PS2: it shall NOT set su binary context as it will be busy (as you are running a root shell atm), displaying warning. That's not an issue. In fact it's perfect! Changing su context will result in losing root privileges (seems that stock config forces context PREVENTING root usability - at least samsung one). It may happen, though, that you will lost root, that is why I highly recommend to keep recent supersu flashable zip nearby, on sdcard for example, and flash it with recovery if needed. SuperSU installer sets the appropriate context for installed files with chcon and root will be back again.

PS3: do not run that within custom recovery (twrp console/aroma terminal), context config provided by its dev may be differ than the device's stock and may cause trouble. Use adb or terminal after booting with android kernel.

like image 84
user3647823 Avatar answered Oct 02 '22 18:10

user3647823