Apps not appearing in Device Administrators I'm running Nougat 7.1 on device and I've came across a strange issue.
Newly installed applications are not listed in the device administrators page in security. The list just doesn't show newly installed apps, they used to appear on Marshmallow, but the Nougat update broke it. This means that I can't enable any newly installed apps as device administrators.
Some apps show the popup to enable them as 'device administrators', but clicking on Activate does nothing
'Greenify' should be in the second list, but it isn't:
     

Things I've attempted (That failed to fix the problem):

Clearing Dalvik cache and reinstalling apps
Booting into safe-mode
Performing a factory reset

Question:
The device administrators are stored in a list at /data/system/device_policies.xml. Is there any other configuration files relating to the entries of the Device administrators that could prevent new entries from being listed?
After thoroughly debugging this issue, I've found the cause. It seems to be a bug with how Adoptable Storage is implemented on my ROM. Any apps that are stored on external storage are not shown in the Device Administrators screen.

When using Titanium Backup, I came across the same issue as newly installed applications were not visible. 

As Android automatically manages storage, it installed all new apps on the External Storage which led to this issue. Applications marked as device administrators are forced onto the internal storage, meaning any updates they receive won't move them onto the internal storage

How to fix:


Open up Apps in Settings and navigate to the problematic application
Click on Storage and select Change
Select Internal Shared Storage and then confirm by pressing Move