0

I have the SuperSU installed (with su binary in /system/xbin), and another su binary compiled from SuperUser sources by myself.

I want to replace the existing su binary by my one via the command line.

But when I'm trying to do this, I'm getting an error:

# cp /sdcard/su /system/xbin/                                    
cp: /system/xbin/su: Text file busy

Of course, the existing one is busy because it's in use now. Is there any way to replace it with command line only? I can't do it from recovery.

6
  • Try killing the superuser daemon and the superuser app in background. See if it works. And, any reasons why you can't do it from the recovery?
    – Firelord
    Nov 25, 2015 at 21:45
  • @Firelord it's universal application that should work on any rooted device, and I can not support all of thousands of various devices with various recovery (or without custom recovery at all)
    – artem
    Nov 25, 2015 at 21:48
  • Are you developing an app?
    – Firelord
    Nov 25, 2015 at 21:49
  • 1
    mv /system/xbin/su /system/xbin/su.orig && cp /sdcard/su /system/xbin/. Then try whether apps requiring root still work (that failed in my case, so I was happy to have the original file backed up ;)
    – Izzy
    Nov 25, 2015 at 22:04
  • 1
    And make sure to give proper permissions to the su binary after moving it from /sdcard to xbin.
    – Firelord
    Nov 25, 2015 at 23:42

0

You must log in to answer this question.

Browse other questions tagged .