{"id":13446010,"url":"https://github.com/xmikos/setools-android","last_synced_at":"2025-04-09T17:25:59.601Z","repository":{"id":24700122,"uuid":"28111527","full_name":"xmikos/setools-android","owner":"xmikos","description":"Unofficial port of setools to Android with additional sepolicy-inject utility included","archived":false,"fork":false,"pushed_at":"2017-08-22T15:06:48.000Z","size":877,"stargazers_count":257,"open_issues_count":7,"forks_count":103,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-02T15:09:14.843Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmikos.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-16T23:23:34.000Z","updated_at":"2025-03-11T07:23:49.000Z","dependencies_parsed_at":"2022-08-17T17:55:25.819Z","dependency_job_id":null,"html_url":"https://github.com/xmikos/setools-android","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmikos%2Fsetools-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmikos%2Fsetools-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmikos%2Fsetools-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmikos%2Fsetools-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmikos","download_url":"https://codeload.github.com/xmikos/setools-android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248076050,"owners_count":21043699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T05:00:43.557Z","updated_at":"2025-04-09T17:25:59.583Z","avatar_url":"https://github.com/xmikos.png","language":"C","readme":"## Description\n\nThis is unofficial port of [setools][1] to Android with additional\n[sepolicy-inject][2] utility by Joshua Brindle\n\nPorted:\n\n * seinfo\n * sesearch\n\nThese tools allow to analyze SELinux/SEAndroid policy on an Android device.\n\nIncluded:\n\n * sepolicy-inject\n \nThis tool injects allow rules into binary SELinux kernel policies.\n\n[1]: http://oss.tresys.com/projects/setools\n[2]: http://bitbucket.org/joshua_brindle/sepolicy-inject\n\n\n## Building for Android\n\nEnsure that you have installed _android-ndk_ properly. Then run:\n\n    ndk-build\n\n\n## Building for Linux\n\nsetools-android can be built for *nix platform as stand-alone binaries without\nexternal dependencies. This build simplifies analysis of Android's sepolicy\nafter dumping it from a device.\n\n    autoreconf -i\n    ./configure\n    make\n    sudo cp ./seinfo ./sesearch ./sepolicy-inject /usr/local/bin  # optional\n\n\n## Usage\n\n    sepolicy-inject -s \u003csource type\u003e -t \u003ctarget type\u003e -c \u003cclass\u003e -p \u003cperm\u003e[,\u003cperm2\u003e,\u003cperm3\u003e,...] [-P \u003cpolicy file\u003e] [-o \u003coutput file\u003e] [-l|--load]\n    sepolicy-inject -Z type_to_make_permissive [-P \u003cpolicy file\u003e] [-o \u003coutput file\u003e] [-l|--load]\n    sepolicy-inject -z type_to_make_nonpermissive [-P \u003cpolicy file\u003e] [-o \u003coutput file\u003e] [-l|--load]\n\nFor example if you want to allow _vdc_ to write to pseudo-terminal (so you can see replies from _vdc_ command):\n\n    sepolicy-inject -s vdc -t devpts -c chr_file -p read,write -l\n\n\n## Third-party code\n\nThis repository contains other opensource code:\n\n * regex (from OpenBSD)\n * bzip2\n * libsepol\n\nBased on [pasis/setools-android][3] by Dmitry Podgorny (pasis) and\n[xmikos/setools-android][4] by Michal Krenek (Mikos)\n\n[3]: https://github.com/pasis/setools-android\n[4]: https://github.com/xmikos/setools-android\n","funding_links":[],"categories":["C","Mobile"],"sub_categories":["Android"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmikos%2Fsetools-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmikos%2Fsetools-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmikos%2Fsetools-android/lists"}