OSX System Integrity Protection (SIP) remove app

640 views Asked by At

I am on OSX 10.14, XCode 10, objective-c

I am currently developing a workflow for explaining the user why he needs to accept automation for my app, explaining how to manually activate it and so on.

For testing reasons it would be great to remove my listed app in the system preferences so i can test this process multiple times.

E.g. in the picture: How can i completely remove Google Chrome for example?

enter image description here

EDIT: Im not able to open the TCC database where this information is stored:

enter image description here

2

There are 2 answers

3
Macmade On

These permissions are stored in the TCC database, for your current user:

~/Library/Application Support/com.apple.TCC/TCC.db

This is a SQLite database, so you can edit them with the editor of your choice.

The table is called access.
Applications listed in Automation will have kTCCServiceAppleEvents as service.

You can simply remove them and save the database.

EDIT

This is not the global TCC database stored in /Library, which is protected by SIP.
Note the ~, meaning it's in your user's folder: /Users/xxx/Library/...
This one is editable even with SIP enabled.

EDIT 2

So looks like the local TCC database is also protected.
Filesystem protection is only affective for apps built against the macOS 10.14 SDK - that's why I was able to edit it with some third party client.

So I guess the only solution is to disable SIP unfortunately.

0
Matthias Nott On

I can confirm that the database can be edited if SIP is removed, both with sqlite3 as well as UI tools like SQLiteManager.