I bought a second hand j7 pro.
Every time I open samsung health or check for updates.' Unauthorized software has been installed' message appears.
I checked and the phone is definitely not rooted.
It would not give that message unless it has been altered. Below is info on how to unroot a device and also a "Hard Reset" which wipes everything. If the reset will not work on its own, then you have to either unroot it first (even if you think it wasn't rooted) or take it to someone to repair.
I know of two apps that should be able to help with unrooting a device. Others may know of more or other ways, as I am really not a fan of rooting, so not my expertise. The two apps, which should be able to be found at the Google Play Store are "SuperSU" and "ES File Explorer". I think "SuperSU" is free but I don't know about "ES File Explorer".
How to unroot Android: Using SuperSU
1. Download, from the Google Play Store, and install "SuperSU".
2. Launch the app and go to “Settings”.
3. Scroll down and locate, and tap, “Full unroot”.
4. It will ask you to confirm that you really want to unroot your device. To start, tap continue.
5. When it is done, the app will automatically close and then restart your device.
6. When it is done, and the device restarts, it should be fully unrooted.
7. Uninstall "SuperSU" and you are done.
How to unroot Android: Using ES File Explorer
1. Download, from the Google Play Store, and install "ES File Explorer".
2. Launch the app and tap "Menu".
3. Scroll to locate “Tools”. Tap that and then turn on “Root Explorer”.
4. Now you will have to grant it "root privileges", if prompted.
5. Go back to your home screen and then navigate to your device’s root folder. It should found as “/” in explorer.
6. From root, navigate to “system” and then “bin”.
7. Find, and delete, the “busybox” and “su”. If you can’t find them, move on to step eight.
8. Navigate back to “/” and open the “app” folder.
9. Delete superuser.apk.
10. Restart your Android device. Your device should reboot unrooted.
NOTE: Doing this will clear 'all' the data on your phone, so it is suggested you not choose this option unless you have to, or aren't worried about losing anything on the device.
Be sure you back up any data you want to keep, to a computer or cloud account, before doing the reset.
To "Hard Reset" the phone...
1. Make sure that the phone is actually powered off.
2. Remove your SD card, if there is one in the device.
3. Press the "Power" and the "Volume Up" buttons, together, until you see the start-up logo on the screen.
4. Once you can see the logo, release the buttons and allow the device to enter the "System Recovery Mode".
5. Next use "Volume Down" button to get to the "wipe data/factory reset" option.
6. When in recovery mode the "Volume Up" and "Volume Down" buttons are how to can navigate and highlight what option you need.
7. Once you have selected the "wipe data/factory reset", press the "Power" button to select that option.
8. On the following screen, repeatedly press the "Volume Down" button until the "Yes - delete all user data" option is what is selected.
9. Then press the "Power" button to hard reset the phone.
10. If you took your SD card out in step 2, when the device is up and running again, reinsert the SD card.