[SuperSU] tosiaczus:
Hello.

I have system.img 5.0.2 for Lenovo S60. Bootloader is secured.

system.img: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files)

I'm trying to install manually su binary in mounted system image and then flash it with QPST.

SELinux is enabled. I prepared script like this:

#!/bin/sh

SYSPAT=sys

#

echo "Placing files"

#

mkdir $SYSPAT/bin/.ext

chown 0:0 $SYSPAT/bin/.ext

chmod 0777 $SYSPAT/bin/.ext

cp su $SYSPAT/bin/.ext/.su

chown 0:0 $SYSPAT/bin/.ext/.su

chmod 0755 $SYSPAT/bin/.ext/.su

cp su $SYSPAT/xbin/su

chown 0:0 $SYSPAT/xbin/su

chmod 0755 $SYSPAT/xbin/su

cp su $SYSPAT/xbin/daemonsu

chown 0:0 $SYSPAT/xbin/daemonsu

chmod 0755 $SYSPAT/xbin/daemonsu

cp su $SYSPAT/xbin/sugote

chown 0:0 $SYSPAT/xbin/sugote

chmod 0755 $SYSPAT/xbin/sugote

cp $SYSPAT/bin/sh $SYSPAT/xbin/sugote-mksh

chown 0:0 $SYSPAT/xbin/sugote-mksh

chmod 0755 $SYSPAT/xbin/sugote-mksh

cp supolicy $SYSPAT/xbin/supolicy

chown 0:0 $SYSPAT/xbin/supolicy

chmod 0755 $SYSPAT/xbin/supolicy

SYSTEMLIB=$SYSPAT/lib64

cp libsupol.so $SYSTEMLIB

chown 0:0 $SYSTEMLIB/libsupol.so

chmod 0755 $SYSTEMLIB/libsupol.so

#mkdir $SYSPAT/app/SuperSU

#chown 0:0 $SYSPAT/app/SuperSU

#chmod 0755 $SYSPAT/app/SuperSU

rm -rf $SYSPAT/app/SuperSU

#install it manually

cp -f $SYSPAT/bin/app_process64 $SYSPAT/bin/app_process64_original

cat su > $SYSPAT/bin/app_process64

cp -f $SYSPAT/bin/app_process64_original $SYSPAT/bin/app_process_init

chown 0:2000 $SYSPAT/bin/app_process_init

chmod 0755 $SYSPAT/bin/app_process_init

cat $SYSPAT/bin/app_process64_original > $SYSPAT/bin/app_process64

cp -f 99SuperSUDaemon $SYSPAT/etc/init.d/99SuperSUDaemon

chown 0:0 $SYSPAT/etc/init.d/99SuperSUDaemon

chmod 0755 $SYSPAT/etc/init.d/99SuperSUDaemon

cat init.qcom.post_boot.sh > $SYSPAT/etc/init.qcom.post_boot.sh

echo 1 > $SYSPAT/etc/.installed_su_daemon

chown 0:0 $SYSPAT/etc/.installed_su_daemon

chmod 0644 $SYSPAT/etc/.installed_su_daemon

#

echo "Done!"

#

#

#because ping has root permissions and correct sleinux context

#

cat su > $SYSPAT/bin/ping

When i'm creating new file the SeLinuxContext is ?:

-rwxr-xr-x. 1 root 2000 u:object_r:system_file:s0 9696 lip 16 11:55 antradio_app
-rwxr-xr-x. 1 root 2000 u:object_r:system_file:s0 89632 lip 16 11:55 btconfig
-rwxr-xr-x. 1 root 2000 u:object_r:system_file:s0 34352 lip 16 11:55 bttool
-rwxr-xr-x 1 root root ? 100272 wrz 2 14:38 daemonsu
-rwxr-xr-x. 1 root 2000 u:object_r:system_file:s0 59748 lip 16 11:55 dexdump
-rwxr-xr-x 1 root root ? 100272 wrz 2 14:38 su
-rwxr-xr-x 1 root root ? 100272 wrz 2 14:38 sugote
-rwxr-xr-x 1 root root ? 285016 wrz 2 14:38 sugote-mksh
-rwxr-xr-x 1 root root ? 30168 wrz 2 14:38 supolicy
-rwxr-xr-x. 1 root root u:object_r:system_file:s0 1223776 lip 16 11:55 tcpdump

But when i do like that:

cat su > $SYSPAT/bin/ping
cat init.qcom.post_boot.sh > $SYSPAT/etc/init.qcom.post_boot.sh

permissions left untouched for example:

-rwxr-xr-x. 1 root root u:object_r:system_file:s0 42824 lip 16 11:54 sys/bin/ping

But hen i try to run it:

sh ping
ping: syntax error: 'go~!

I've tried to add:

/system/xbin/daemonsu --auto-daemon

on the end of:

/etc/init.qcom.post_boot.sh

HiJacking of the bin/app_process64 cause that phone won't play bootanimation and does not start launcher but i can see internal memory MTP Device.

SuperSU apk still warn: There is no SU binary installed and SuperSu cannot install it.