Phone: Samsung Galaxy S7 Sprint - Eng boot image flashed - Bootloader v4
I have a script that I can hijack at boot, using the eng boot image allows me to have a root adb shell. I can place all necessary files needed for root and have done so. I can chcon the root files to match what they need to be.
I add the following to the boot script that the kernel runs:
./system/xbin/supolicy --live --sdk=26 > /dev/kmsg 2>&1 <---- This is where the errors happen. ./system/xbin/daemonsu --auto-daemon&
Everything runs but supolicy cannot open the target file. I know it exists because of the output from ls -l
I also know I am a root user in the script due to whoami returning root.
[ 82.936270] WHOAMI [ 83.009546] ss_platform_log: [email protected]: Data SVC is acquired [ 83.215499] root [ 83.860941] -r--r--r-- 1 0 0 0 Jan 1 1970 /sys/fs/selinux/policy [ 83.947108] supolicy v2.82 (ndk:arm64-v8a) - Copyright (C) 2014-2017 - Chainfire & CCMT\x0a [ 83.947856] File [/sys/fs/selinux/policy] does not exist!
If anyone can give me pointers, I sure would love that.
PS: I know I can root with the eng boot, but my attempt is to have supolicy working so I can flash the original boot img back due to eng boot consuming abhorrent amounts of ram. I also want stock kernel with supolicy working to allow viper4android to run.