[SuperSU] lioux:
SU lost after reboot on stock Galaxy Nexus yakju

Thanks for the continuous effort Chainfire.

For me, SuperSU stopped working sometime between the 1st and the 2nd (patch fix) 4.3 firmware releases to Galaxy Nexus.

The phone is stock Galaxy Nexus yakju maguro with android 4.3 build JWR66Y.

I can attest that the phone is stock because I've just reset it with a firmware stock image.

Installed TWRP recovery version 2.6.3.1 on the phone.

Tried root with "CF-Autoroot" but it didn't even install correctly.

Tried root with UPDATE-SuperSU-v1.80.zip but it didn't install correctly

From recovery, manually followed the steps on update-binary from UPDATE-SuperSU-v1.80.zip. This worked for the 1st boot. Lost on reboot.

I'm able to reproduce the problem on a friend's Galaxy Nexus yakju maguro with 4.3 build JWR66Y.

These are more or less the steps taken to manually install SuperSU from recovery. Pretty much SuperSU's install-binary script.

#!/sbin/sh

set_perm() {
chown $1.$2 $4
chown $1:$2 $4
chmod $3 $4
}

ch_con() {
/system/bin/toolbox chcon u:object_r:system_file:s0 $1
chcon u:object_r:system_file:s0 $1
}

mount /system
mount /data

ARCH=arm

# I've already manually extracted Update SuperSu 1.8 to /sdcard/supersu/

BIN=/sdcard/supersu/$ARCH
COM=/sdcard/supersu/common

cp /sdcard/supersu/$ARCH/chattr /system/xbin
chmod 0755 /system/xbin/chattr
/system/xbin/chattr -i /system/xbin/su
/system/xbin/chattr -i /system/bin/.ext/.su
/system/xbin/chattr -i /system/xbin/daemonsu
/system/xbin/chattr -i /system/etc/install-recovery.sh

rm -f /system/bin/su
rm -f /system/xbin/su
rm -f /system/xbin/daemonsu
rm -f /system/bin/.ext/.su
rm -f /system/etc/install-recovery.sh
rm -f /system/etc/init.d/99SuperSUDaemon
rm -f /system/etc/.installed_su_daemon
rm -f /system/app/Superuser.apk
rm -f /system/app/Superuser.odex
rm -f /system/app/SuperUser.apk
rm -f /system/app/SuperUser.odex
rm -f /system/app/superuser.apk
rm -f /system/app/superuser.odex
rm -f /system/app/Supersu.apk
rm -f /system/app/Supersu.odex
rm -f /system/app/SuperSU.apk
rm -f /system/app/SuperSU.odex
rm -f /system/app/supersu.apk
rm -f /system/app/supersu.odex
rm -f /data/dalvik-cache/*com.noshufou.android.su*
rm -f /data/dalvik-cache/*com.koushikdutta.superuser*
rm -f /data/dalvik-cache/*com.mgyun.shua.su*
rm -f /data/dalvik-cache/*Superuser.apk*
rm -f /data/dalvik-cache/*SuperUser.apk*
rm -f /data/dalvik-cache/*superuser.apk*
rm -f /data/dalvik-cache/*eu.chainfire.supersu*
rm -f /data/dalvik-cache/*Supersu.apk*
rm -f /data/dalvik-cache/*SuperSU.apk*
rm -f /data/dalvik-cache/*supersu.apk*
rm -f /data/dalvik-cache/*.oat
rm -f /data/app/com.noshufou.android.su-*
rm -f /data/app/com.koushikdutta.superuser-*
rm -f /data/app/com.mgyun.shua.su-*
rm -f /data/app/eu.chainfire.supersu-*

mkdir /system/bin/.ext
cp $BIN/su /system/xbin/daemonsu
cp $BIN/su /system/xbin/su
cp $BIN/su /system/bin/.ext/.su
cp $COM/Superuser.apk /system/app/Superuser.apk
cp $COM/install-recovery.sh /system/etc/install-recovery.sh
cp $COM/99SuperSUDaemon /system/etc/init.d/99SuperSUDaemon
echo 1 > /system/etc/.installed_su_daemon

set_perm 0 0 0777 /system/bin/.ext
set_perm 0 0 06755 /system/bin/.ext/.su
set_perm 0 0 06755 /system/xbin/su
set_perm 0 0 06755 /system/xbin/daemonsu
set_perm 0 0 0755 /system/etc/install-recovery.sh
set_perm 0 0 0755 /system/etc/init.d/99SuperSUDaemon
set_perm 0 0 0644 /system/etc/.installed_su_daemon

ch_con /system/bin/.ext/.su
ch_con /system/xbin/su
ch_con /system/xbin/daemonsu
ch_con /system/etc/install-recovery.sh
ch_con /system/etc/init.d/99SuperSUDaemon
ch_con /system/etc/.installed_su_daemon

umount /system
umount /data

exit 0

It works. I can install SuperSU from Play Store on the 1st boot and it reports that the phone is rooted.

However, all is lost after a reboot.

Output from 'mount' (removed entries for other apks)

rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,seclabel,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/omap/omap_hsmmc.0/by-name/system /system ext4 ro,seclabel,relatime,user_xattr,barrier=1,nodelalloc,data=journal 0 0
/dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory ext4 ro,seclabel,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.0/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,nodelalloc,nomblk_io_submit,data=journal 0 0
/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,nodelalloc,nomblk_io_submit,data=journal 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/dm-2 /mnt/asec/eu.chainfire.supersu.pro-1 ext4 ro,dirsync,seclabel,nosuid,nodev,noatime,user_xattr,barrier=1 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

Output from 'printenv'

_=/system/bin/printenv
EMULATED_STORAGE_SOURCE=/mnt/shell/emulated
LD_LIBRARY_PATH=/vendor/lib:/system/lib
BOOTCLASSPATH=/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar
PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
LOOP_MOUNTPOINT=/mnt/obb
ANDROID_DATA=/data
ANDROID_ROOT=/system
EMULATED_STORAGE_TARGET=/storage/emulated
ANDROID_STORAGE=/storage
ANDROID_SOCKET_adbd=11
EXTERNAL_STORAGE=/storage/emulated/legacy
ANDROID_ASSETS=/system/app
RANDOM=5334
ASEC_MOUNTPOINT=/mnt/asec
ANDROID_PROPERTY_WORKSPACE=9,32768
ANDROID_BOOTLOGO=1

Let me know if there's anything I can do to help.