Skip to content

Commit

Permalink
4.3 detection fix
Browse files Browse the repository at this point in the history
Change-Id: Ib5e3df51fa7a383f3699968e899e06d579480564
  • Loading branch information
koush committed Jul 30, 2013
1 parent a2aac83 commit 04f02c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion su/install-su.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ ln -sf /system/xbin/su /system/bin/su
# let's try to install it using install-recovery.sh
BUILD_RELEASE_VERSION=$(cat /system/build.prop | grep ro\\.build\\.version\\.release)
IS_43=$(echo $BUILD_RELEASE_VERSION | grep 4\\.3)
if [ -z "$IS_43" -o "$IS_43" \> "4.3" -o "$IS_43" == "4.3" ]
if [ ! -z "$IS_43" ]
then
if [ -o "$IS_43" \> "4.3" -o "$IS_43" == "4.3" ]
then
# check for rom su daemon before clobbering install-recovery.sh
if [ ! -f "/system/etc/.has_su_daemon" ]
then
Expand All @@ -19,4 +21,5 @@ then
# the install-recovery.sh execute bit.
touch /system/etc/.installed_su_daemon
fi
fi
fi

2 comments on commit 04f02c5

@osm0sis
Copy link

@osm0sis osm0sis commented on 04f02c5 Nov 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this check be added to recovery as a whole to avoid the su permissions check before reboot? SELinux in JB4.3+ removes the S permission from su on every boot, so every reboot from recovery after a boot will trigger the "Root access possibly lost. Fix?" check when permissions don't even matter anymore with the su_daemon. Thanks! 👍

@PhilZ-cwm6
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.