[SM-J500FN] How to safely remove bloatware from Galaxy J5 (2015)?

J5 Guy

New member
Oct 24, 2020
1
0
0
Hello there. My device is running out of space despite all external apps have been moved to SD card.

My current configuration:

Model: SM-J500FN
Internal memory: 8 GB
System: Android 6.0.1
SELinux: enforcing
Modem: J500FNXXU1BQC1
KNOX: 0x0 (not tripped)

Mount points:
Code:
1|[email protected]:/ $ df
Filesystem                            Size     Used     Free   Blksize
/dev                                681.6M   144.0K   681.4M      4.0K
/sys/fs/cgroup                      681.6M    12.0K   681.5M      4.0K
/mnt                                681.6M     0.0K   681.6M      4.0K
/mnt/secure                         681.6M     0.0K   681.6M      4.0K
/system                               2.0G     1.9G    84.8M      4.0K
/data                                 4.7G     4.7G    29.8M      4.0K
/efs                                  9.8M   332.0K     9.4M      4.0K
/cache                              192.8M     3.2M   189.6M      4.0K
/persist                              3.9M   104.0K     3.8M      4.0K
/firmware                            64.0M    11.5M    52.5M     16.0K
/firmware-modem                      64.0M    44.6M    19.3M     16.0K
/persdata/absolute                    4.8M    96.0K     4.8M      4.0K
/storage                            681.6M     0.0K   681.6M      4.0K
/mnt/knox                             4.7G     4.7G    29.8M      4.0K
/mnt/shell/enc_media                  4.7G     4.7G     0.0K      4.0K
/storage/emulated                     4.7G     4.7G     0.0K      4.0K
/data/enc_user                        4.7G     4.7G    29.8M      4.0K
/mnt/shell/enc_emulated               4.7G     4.7G     0.0K      4.0K
/storage/0000-0001                   14.8G     2.6G    12.2G     32.0K
I cannot view content of /data directory:
Code:
ls /data
opendir failed, Permission denied
Do I need to root my phone to view and modify /data partition and to uninstall bloatware apps? What do I really need to grant access to /data from adb or any other shell? Do I need to change SELinux from enforcing to permissive? Are there any other protections except SELinux and standard Linux access control? Will rooting the device even let me view and modify /data?

Any known method without tripping KNOX?

I also tried:
Code:
pm uninstall --user 0 com.package.name
am start -a android.intent.action.DELETE -d package:com.package.name
Uninstalling preinstalled apps this way doesn't free space.

I tried to install TWRP with Odin but I was unable to enter recovery after rebooting phone (even after rebooting it manually). System boots normally and replaces TWRP with original recovery. But KNOX flag is still 0x0. What triggers tripping e-fuse? It looks like flashing something to AP does not trip KNOX. Is it related with DM verity phase at boot?

Well, if you know a way without tripping KNOX and lowering system security to access /data and uninstall bloatware completely, then it will be preferred way. If phone needs to be rooted, is TWRP + Magisk/SuperSU recommended way or flashing SuperSU by Chainfire installation script via Odin? I looked at the script (Chainfire's SuperSU) and there are 2 ways to root phone: replacing system files or patching boot image (+ changing SELinux to permissive, disabling DM verity, modifying fstab). Will all of these methods trip KNOX to 0x1?