last day (15 days later) » 

2:30 PM
0
Q: remove su binary

OMiDI have root my P8-Lite ALE-L21 with supersu.zip through twrp recovery. after that I've installed KingoRoot and KingoRoot replace my su binary with some other su that is old for my android which is Android 5.0.1 and not working, so I had modified supersu.zip and put su binary into another directo...

 
What does ./data/local/su -c rm /system/xbin/su do?
 
still rm: /system/xbin/su: Operation not permitted
 
Give us the result of mount and see Unable to delete file, even when running as root
 
this is mount result: omidgfx.com/mount.txt and i've tried the chmod but same error comes out
 
I see. Can you give the result of lsattr /system/xbin/su? I don't think Android has lsattr. You would need busybox in that case.
 
2:30 PM
for installing busybox my device needs to be rooted healthy, but my root is damaged and not working, is there anyway to install busybox with adb ?
and after that, busybox using su binary in system/xbin not the one i've installed
 
you can put the busybox or toybox binary under /data/local/tmp/ and call it this away: ./data/local/tmp/toybox lsattr /system/xbin/su
 
ow, thanks so much, i will do that right now
 
Make sure you rename the binary to toybox or busybox before pushing it. Also make sure that the binary has executable permission.
 
sorry i'm really amateur in this proccess, how do I make executable permission ?
 
Which OS are you using on PC?
 
2:36 PM
windows 8.1
 
Anyhow, after pushing the binary, do adb shell ./data/local/su -c chmod 755 PATH_TO_BINARY
 
ok
hmmm, ive a question
 
yes
 
can i make a full backup in twrp and then remove su binaries from that backup and then restore it ?
 
yes, of course.
 
2:39 PM
is that even possible
wow !!!
 
hold on
Make sure you find out how to mount twrp backup in read-write mode on PCor at least on Android
 
isn't that a zip file ? can i just remove binaries with winrar ?
 
I don't how about that. I've never tried editing TWRP backup.
 
ow, so please stay i will make that toybox and doing first idea before backup
so so sorry i'm bothering you
 
sure
it's not bothering. We don't find many users who actively engages in solving their own problem or at least cooperate nicely.
 
2:45 PM
really thank you
toybox has been installed and works fine, now what do you need ?
 
is it working?
 
yes
but lsattr is a unknown command for toybox
sorry i'm from iran and my english is so bad.
 
strange. when you run toybox, among all the entries do you not see lsattr. I see it next to ls.
 
basename bzcat cal cat catv chgrp chmod chroot chvt cksum clear cmp
count df dirname dmesg echo env false free head help id insmod kill
killall link ln login logname ls lsmod mkdir mkfifo mknod mkswap mktemp
mountpoint nc netcat nice nohup oneit patch pidof printenv pwd realpath
rmdir rmmod seq setsid sha1sum sleep sort swapoff swapon sync tac
tail tee true truncate tty uname uniq unlink unshare uptime vmstat
wc which whoami xargs yes
this all are available commands
 
And you've downloaded it from here: landley.net/toybox/bin, right?
 
2:49 PM
loock i've installed 0.3.1 version, the other versions have no armv7l
is it ok to use armv6l ?
 
Try it. It doesn't hurt. Mine is 0.6.0
 
ok just a sec
works and this is the result for /data/local/tmp/toybox lsattr /system/xbin/su /data/local/tmp/toybox lsattr /system/xbin/su :
-----a-A----- /system/xbin/su
 
hold on for a minute.
 
I think this Operation not permitted in linux, is for when we trying to access some files they belong to another users, i read it somewhere but not so sure, can it be a reason ?
ok sure.
 
what does ls -l on /system/xbin/su give?
 
2:56 PM
-rwxr-xr-x root root 315968 2015-12-30 12:26 su
 
do ./data/local/su -c chattr -a /system/xbin/su
now give me the new result of previous lsattr command again.
 
tmp-mksh: chattr: not found
 
./data/local/su -c PATH_TO_BUSY/TOYBOX chattr -a /system/xbin/su
 
nothing happened
 
Give me the new result of that lsattr command.
 
3:02 PM
/data/local/tmp/toybox chattr -a /system/xbin/su
 
no.
 
this is my command and this is my result:
/data/local/tmp/toybox chattr -a /system/xbin/su
 
Okay, follow step by step what I'm telling you now.
 
I
 
do: ./data/local/su -c /data/local/tmp/toybox chattr -a /system/xbin/su
 
3:04 PM
i did but there is no result
 
it's ok
Now do: ./data/local/su -c /data/local/tmp/toybox lsattr /system/xbin/su
 
-------A----- /system/xbin/su
 
Now do: ./data/local/su -c rm /system/xbin/su
 
wow
it works
su was removed
 
Sure, now follow that chattr command on other su file as well and try rm then.
I'll explain in my answer the problem you were having.
 
3:07 PM
I I captain
so so so so so thank you
 
sure, just make sure you remove all those su remnants and copy that new su from /data/local to /system/xbin.
When done with that, reboot and see whether apps detect your new su.
Ping me about the status
 
ok just a sec
it works fine, but for sure i flash it with not modified zip file again. still working fine
 
alright then. good for you. I'll post the answer shortly.
 
thank you so much
 
no problem.
Are you here? I need to ask something.
Which toybox worked for you?
 
3:16 PM
armv6l
 
okay.
 
v 0.6.0
it's a big help for me, may we be friends ?
 
No, please don't do that. Delete it because the chat room is public and google indexes it
Relax, you can find me on the chatroom of the site. [chat]
 
I, I, captain
are you making answer? im waiting for that, so i can accept it
 
It'll take a bit of time. You can engage in some other work of yours. Accept it later when you login or comeback. I'm just finding out the difference between -a and -i. The a means append only. It was causing rm not able to delete that file. I'm just doing some searching about that.
 
3:25 PM
ok, thank you again
 

last day (15 days later) »