Fdroid ::::::>Selinux mode changer
Envoyé de mon FIND7 en utilisant Tapatalk
Hello
When i type in Terminal su and setenforce 0 it shows me SELinux is disabled
In TWRP Terminal setenforce 0 returns with command unknown.
How to enable SELinux?
Device : Samsung Galaxy trend Lite GT-S 7390 with CM11 - Beta2
Kernel : 3.4.5-Phoenix
TWRP : 3.1.0-0
Yes and it returns with the same Message : SELinux is disabled
Bro how did you manage to successfully work it? I have moto z play custom rom. Care to share? Thanks
Bro how did you manage to successfully work it? I have moto z play custom rom. Care to share? Thanks
Find the app on here called ISU. It hides super user, but it also gives the option to set enforcing or non enforcing. It works with cm or lineage root. I just stumbled across it earlier tonite.
Nothing is working in OnePlus 3 open beta 25 Oreo.
Both the init.d script and placing a script inside bin folder. Anybody please tell me how make selinux permanently to permissive mode??
androidboot.selinux=permissive
As far as I know Selinux state is hard-coded in kernel. So you have to change the kernel. A lot of custom kernels make your system permissive.fortunately,I force restarted phone and everything works, I have one question, how to disable Selinux (if it do not do any damage apps/anything in phone beside security)?
As far as I know Selinux state is hard-coded in kernel. So you have to change the kernel. A lot of custom kernels make your system permissive.
Sorry I cannot fulfill your expectations, to give you a checklist or instruction set. You have to install a custom kernel for your device, maybe it's also necessary to install a custom ROM.if you can please tell me how to change or turn off/disable (best way) Selinux, or where to find full instruction of it?
I tried million things from google and youtube.
Sorry I cannot fulfill your expectations, to give you a checklist or instruction set. You have to install a custom kernel for your device, maybe it's also necessary to install a custom ROM.
Google it, there is a lot of documentation also in the XDA specific for your device.
Sent from my Galaxy S8+ using XDA Labs
Doesn't work this way. You should have read following posts.Using the commands below should get permissive even after reboot
per http://xdaforums.com/showpost.php?p=58887725&postcount=230
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "echo 0 > /sys/fs/selinux/enforce" >> /system/su.d/permissive.sh
chmod 755 > /system/su.d/permissive.sh
Works!su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
#!/sbin/sh
#
# /system/addon.d/81-Xposed.sh
# During a CM12 upgrade, this script backs up Xposed framework files.
# /system is formatted and reinstalled, then the files are restored.
# Thread: http://xdaforums.com/xposed/addon-d-script-xposed-to-survive-cm12-t3036886
# Author: Adlx.XDA
#
. /tmp/backuptool.functions
list_files() {
cat <<EOF
bin/app_process32_xposed
bin/dex2oat
bin/oatdump
bin/patchoat
framework/XposedBridge.jar
lib/libart-compiler.so
lib/libart-disassembler.so
lib/libart.so
lib/libsigchain.so
lib/libxposed_art.so
bin/app_process64_xposed
lib64/libart.so
lib64/libart-compiler.so
lib64/libart-disassembler.so
lib64/libsigchain.so
lib64/libxposed_art.so
xposed.prop
su.d/permissive.sh
EOF
}
case "$1" in
backup)
echo "STARTING TO BACKUP XPOSED"
list_files | while read FILE DUMMY; do
echo backup_file $S/"$FILE"
backup_file $S/"$FILE"
done
ls -al /tmp
echo "ENDING TO BACKUP XPOSED"
;;
restore)
echo "STARTING TO RESTORE XPOSED"
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore_file $S/"$FILE" "$R"
echo $S/$FILE $( ls -alZ $S/$FILE )
done
echo "ENDING TO RESTORE XPOSED"
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
echo "STARTING POST-RESTORE XPOSED"
# /system/bin/app_process32_xposed
chmod 0755 /system/bin/app_process32_xposed
chown root:shell /system/bin/app_process32_xposed
chcon u:object_r:zygote_exec:s0 /system/bin/app_process32_xposed
# /system/bin/app_process64_xposed
chmod 0755 /system/bin/app_process64_xposed
chown root:shell /system/bin/app_process64_xposed
chcon u:object_r:zygote_exec:s0 /system/bin/app_process64_xposed
# /system/bin/dex2oat
chmod 0755 /system/bin/dex2oat
chown root:shell /system/bin/dex2oat
chcon u:object_r:dex2oat_exec:s0 /system/bin/dex2oat
# /system/bin/oatdump
chmod 0755 /system/bin/oatdump
chown root:shell /system/bin/oatdump
chcon u:object_r:system_file:s0 /system/bin/oatdump
# /system/bin/patchoat
chmod 0755 /system/bin/patchoat
chown root:shell /system/bin/patchoat
chcon u:object_r:dex2oat_exec:s0 /system/bin/patchoat
# /system/framework/XposedBridge.jar
chmod 0644 /system/framework/XposedBridge.jar
chown root:root /system/framework/XposedBridge.jar
chcon u:object_r:system_file:s0 /system/framework/XposedBridge.jar
# /system/lib/libart-compiler.so
chmod 0644 /system/lib/libart-compiler.so
chown root:root /system/lib/libart-compiler.so
chcon u:object_r:system_file:s0 /system/lib/libart-compiler.so
# /system/lib/libart-disassembler.so
chmod 0644 /system/lib/libart-disassembler.so
chown root:root /system/lib/libart-disassembler.so
chcon u:object_r:system_file:s0 /system/lib/libart-disassembler.so
# /system/lib/libart.so
chmod 0644 /system/lib/libart.so
chown root:root /system/lib/libart.so
chcon u:object_r:system_file:s0 /system/lib/libart.so
# /system/lib/libsigchain.so
chmod 0644 /system/lib/libsigchain.so
chown root:root /system/lib/libsigchain.so
chcon u:object_r:system_file:s0 /system/lib/libsigchain.so
# /system/lib/libxposed_art.so
chmod 0644 /system/lib/libxposed_art.so
chown root:root /system/lib/libxposed_art.so
chcon u:object_r:system_file:s0 /system/lib/libxposed_art.so
# /system/xposed.prop
chmod 0644 /system/xposed.prop
chown root:root /system/xposed.prop
chcon u:object_r:system_file:s0 /system/xposed.prop
# /system/su.d/permissive.sh
chmod 0755 /system/su.d/permissive.sh
chown root:root /system/su.d/permissive.sh
chcon u:object_r:system_file:s0 /system/su.d/permissive.sh
echo "DONE POST-RESTORE XPOSED"
;;
esac
setenforce 0
On nightly roms (AOSP, CM..) you can take the boot.img directly from the zip file. If you want to change the current running kernel you would have to dump it with dd. For my device its something like this:
busybox dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/sdcard/boot.img bs=1M
androidboot.selinux=permissive