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.

  • 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 '15 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) – int_32 Nov 25 '15 at 21:48
  • Are you developing an app? – Firelord Nov 25 '15 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 '15 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 '15 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.