[Galaxy A3, A5, A7, A8, A9 General] Hyperio546:
The govt. in my state has been distributing free phones and tablets recently. But there is a catch, it's loaded with work policies. There is an app running 24/7 in background all the time. You cannot change the wallpaper, and they can snoop on your personal data anytime. And it's all because of KNOX!

Note that this guide requires root. It was possible without root but Android 13 has made it nearly impossible to do it to this point that it's easier to root it.

Prerequisites:

- Root access. This guide is to be followed after you reach the welcome screen. In case you didn't and you have set it up, then you'll have to flash stock firmware then flash patched boot.tar again because factory reset is disabled as part of the work policies.

- This guide assumes that you are on the latest firmware.

- Magisk APK and Termux APK already downloaded and stored in USB drive and it's connected or in SD card but not in internal storage.

Guide:​

If you are connected to the internet with mobile data (sim card) then continue. If you aren't then just go 2 steps to the wifi screen in the Android setup, put in your password and then immediately press the back button. If you wait then it will continue automatically. You only need to be connected if you didn't download the APKs before. If you did then it's not required to be connected to the internet!

1. At the welcome screen tap on "accessibility".

2. Toggle "Assistant menu".

3. Tap on the menu.

4. Swipe until you find the "menu settings" option and tap on it.

5. Keep pressing the back arrow on the top left until the main accessibility window shows up.

6. Tap on "recommended for you".

7. Tap on "go to modes and routines".

- If you downloaded the APKs as stated beforehand:

8. Create a new routine, set it to execute manually and select the files app.

9. Execute it and the files app will open, allow it to access files.

10. Tap on SD card and install Magisk APK first and then Termux APK and then open Termux when it prompts so.

- If you didn't do so:

11. Create a new routine and do the same as before but set it to open chrome.

12. Go to https://hyperio546.github.io/knox-bypass-samsung/.

13. Click on Termux and download the APK.

14. Click on Magisk and download the APK.

(If you are worried about the safety then check the markdown source, it's linked to their original GitHub repos.)

15. Install in the same order as specified in step no. 10.

16. Open Termux and type

su

17. Grant it superuser access from the popup.

18. Type this command and press enter

pm disable-user --user 0 com.sec.enterprise.knox.cloudmdm.smdms

19. Type exit, and then type exit again.

20. Keep pressing back button in the bottom left until it gets to "Welcome!" again.

21. Setup your device like normal.

22. You have *your* device back!

Optional:

If you want to remove the assistant menu then just repeat step 4 and then toggle it off.

CHANGES:-

- 17-7-23:

Its been a while! Whoo! I have updated the links for the website linked in the guide.

- 26-3-24:

Changed the command to disable com.sec.enterprise.knox.cloudmdm.smdms instead of uninstalling it because its causing some errors.