[Samsung Gear S3] adfree:
APJE LDU vs. APJF Stock Firmware...

https://xdaforums.com/showpost.php?p=75561301&postcount=454

Attempt 1 failed...

Tried only to remove files from APJF...

sdb shell rm /opt/usr/media/Others/2/etc/smack/accesses.d/com.holofactory.breakout
sdb shell rm /opt/usr/media/Others/2/etc/smack/accesses.d/com.samsung.knoxcustom-exitui
sdb shell rm /opt/usr/media/Others/2/etc/smack/accesses.d/com.samsung.mdm-syspopup
sdb shell rm /opt/usr/media/Others/2/etc/smack/accesses.d/com.samsung.mdm-syspopup.efl
sdb shell rm /opt/usr/media/Others/2/etc/smack/accesses.d/com.samsung.svoice-n66
sdb shell rm /opt/usr/media/Others/2/etc/smack/accesses.d/knoxcustom-server
sdb shell rm /opt/usr/media/Others/2/etc/smack/accesses.d/libknoxcustom
sdb shell rm /opt/usr/media/Others/2/etc/smack/accesses.d/libknoxcustom-common
sdb shell rm /opt/usr/media/Others/2/etc/smack/accesses.d/veritytool
sdb shell rm /opt/usr/media/Others/2/etc/smack/accesses2.d/com.samsung.mdm-syspopup.rule
sdb shell rm /opt/usr/media/Others/2/etc/systemd/default-extra-dependencies/ignore-units.d/knoxcustom-server.service
sdb shell rm /opt/usr/media/Others/2/usr/bin/knoxcustom-server
sdb shell rm /opt/usr/media/Others/2/usr/bin/verityctl
sdb shell rm /opt/usr/media/Others/2/usr/etc/knoxcustom/PolicyManifest.xml
sdb shell rm /opt/usr/media/Others/2/usr/lib/libknoxcustom-common.so.1
sdb shell rm /opt/usr/media/Others/2/usr/lib/libknoxcustom-common.so.1.0.0
sdb shell rm /opt/usr/media/Others/2/usr/lib/libknoxcustom.so.1
sdb shell rm /opt/usr/media/Others/2/usr/lib/libknoxcustom.so.1.0.0
sdb shell rm /opt/usr/media/Others/2/usr/lib/location/module/libwps.so
sdb shell rm /opt/usr/media/Others/2/usr/lib/location/module/libwps.so.0
sdb shell rm /opt/usr/media/Others/2/usr/lib/location/module/libwps.so.0.5.86
sdb shell rm /opt/usr/media/Others/2/usr/lib/systemd/system/knoxcustom-server-ipc.socket
sdb shell rm /opt/usr/media/Others/2/usr/lib/systemd/system/knoxcustom-server.service
sdb shell rm /opt/usr/media/Others/2/usr/lib/systemd/system/multi-user.target.wants/knoxcustom-server.service
sdb shell rm /opt/usr/media/Others/2/usr/lib/systemd/system/sockets.target.wants/knoxcustom-server-ipc.socket
sdb shell rm /opt/usr/media/Others/2/usr/share/dbus-1/system-services/com.samsung.knoxcustom.service
sdb shell rm /opt/usr/media/Others/2/usr/share/initrd-recovery/initrd.list.d/01-initrd-recovery-dm-verity.list
sdb shell rm /opt/usr/media/Others/2/usr/share/packages/com.samsung.knoxcustom-exitui.xml
sdb shell rm /opt/usr/media/Others/2/usr/share/packages/com.samsung.mdm-syspopup.xml
sdb shell rm /opt/usr/media/Others/2/usr/share/packages/com.samsung.svoice-n66.xml

Next attempt to add/replace these files...

device-sec-policy
fota-init.sh
initrd
kern_sec_info
ld.so.cache
libdali-adaptor-common.so.0.0.0
libdw-0.152.so
libebl_alpha-0.152.so
libebl_arm-0.152.so
libebl_i386-0.152.so
libebl_ia64-0.152.so
libebl_ppc-0.152.so
libebl_ppc64-0.152.so
libebl_s390-0.152.so
libebl_sh-0.152.so
libebl_sparc-0.152.so
libebl_x86_64-0.152.so
libeina.so.1.7.99
libgcrypt.so.20.0.3
libgpg-error.so.0.15.0
libise-handwrite.so.0.1.0
libMyScript2D.so
libMyScriptEngine.so
libMyScriptPrediction.so
libMyScriptText.so
libnssdbm3.chk
libpython2.7.so.1.0
libsoftokn3.chk
libssp.a
libssp_nonshared.a
libvoim.so
libwifi-mf.so.0.0
minisdbd
popup_custom.edj
predefined
removed-file.lst
restore_exception.list
rw.list
shadow
shadow-
smack-domain-list
smack_label.txt
tima_measurement_info
ttssmt-info.xml

I have reduced to 44 files... maybe I will remove few more...

Best Regards

Edit 1.

Okidoki, I am too lazy...

Reduced to 12 files...

device-sec-policy
fota-init.sh
initrd
kern_sec_info
ld.so.cache
predefined
removed-file.lst
restore_exception.list
shadow
shadow-
smack-domain-list
tima_measurement_info

Edit 2.

Added Batch... how I created rootfs.img... which fails... :rolleyes:

Still I am using my rooted SM-Z130H for rootfs.img manipulation...

Edit 3.

For next attempt I will add libraries/lib files:

libdali-adaptor-common.so.0.0.0
libdw-0.152.so
libebl_alpha-0.152.so
libebl_arm-0.152.so
libebl_i386-0.152.so
libebl_ia64-0.152.so
libebl_ppc-0.152.so
libebl_ppc64-0.152.so
libebl_s390-0.152.so
libebl_sh-0.152.so
libebl_sparc-0.152.so
libebl_x86_64-0.152.so
libeina.so.1.7.99
libgcrypt.so.20.0.3
libgpg-error.so.0.15.0
libise-handwrite.so.0.1.0
libMyScript2D.so
libMyScriptEngine.so
libMyScriptPrediction.so
libMyScriptText.so
libnssdbm3.chk
libpython2.7.so.1.0
libsoftokn3.chk
libssp.a
libssp_nonshared.a
libvoim.so
libwifi-mf.so.0.0

Edit 4.

Fail...

This time loop... instead Kernel Panic...