java.lang.Object | |
↳ | com.samsung.android.knox.seams.SEAMSPolicy |
Deprecated in API level 30
This class provides SEAMS (SE Android Management) APIs.
API level 11 |
KNOX 2.0 |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | CLIPBOARD_DISABLE_BIDIRECTIONAL | Denotes constant value of CLIPBOARD_DISABLE_BIDIRECTIONAL | |||||||||
int | CLIPBOARD_ENABLE_BIDIRECTIONAL | Denotes constant value of CLIPBOARD_ENABLE_BIDIRECTIONAL | |||||||||
int | ERROR_ALREADY_CONTAINER_APP | Return Code denoting that the application is already in a container. | |||||||||
int | ERROR_CERTS_NOT_MATCHED | Return Code denoting that the Input certificate does not match the Signature | |||||||||
int | ERROR_CONTAINER_COUNTS_OVERFLOW | Return Code denoting that Container Count has exceeded the permitted range | |||||||||
int | ERROR_CONTAINER_ID_MISMATCH | Return Code denoting that the Container id is mismatched. | |||||||||
int | ERROR_CONTAINER_NOT_EMPTY | Return Code denoting that the Container is not empty. | |||||||||
int | ERROR_NOT_SUPPORTED | Return Code denoting the function is not support. | |||||||||
int | ERROR_NO_CERTS | Return Code denoting that the package is not installed and input certificate is null | |||||||||
int | FALSE | Return Code equivalent to boolean FALSE | |||||||||
int | GENERIC_SECURED_APPTYPE | Denotes constant value of GENERIC_SECURED_APPTYPE | |||||||||
int | GENERIC_TRUSTED_APPTYPE | Denotes constant value of GENERIC_TRUSTED_APPTYPE | |||||||||
int | GET_SERVICE_ERROR | Return Code denoting that the service has not started. | |||||||||
int | IRM_PLATFORM_APPTYPE | Deprecated in API level 27 | |||||||||
int | IRM_UNTRUST_APPTYPE | Deprecated in API level 27 | |||||||||
int | NOT_INSTALLED | Return Code denoting the package is not installed. | |||||||||
int | POLICY_FAILED | Return Code denoting that policy set has failed. | |||||||||
int | POLICY_OK | Return Code denoting that the policy was correctly set. | |||||||||
int | POLICY_REFUSED | Return Code denoting that policy set has been refused. | |||||||||
int | RUNNING | Return Code denoting that it is running application. | |||||||||
int | TRUE | Return Code equivalent to boolean TRUE. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
API to get or create an instance of SEAMS module.
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 27
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
| |||||||||||
Deprecated
in API level 30
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Denotes constant value of CLIPBOARD_DISABLE_BIDIRECTIONAL
API level 19 |
KNOX 2.6 |
Denotes constant value of CLIPBOARD_ENABLE_BIDIRECTIONAL
API level 19 |
KNOX 2.6 |
Return Code denoting that the application is already in a container.
API level 12 |
KNOX 2.1 |
Return Code denoting that the Input certificate does not match the Signature
API level 12 |
KNOX 2.1 |
Return Code denoting that Container Count has exceeded the permitted range
API level 12 |
KNOX 2.1 |
Return Code denoting that the Container id is mismatched.
API level 12 |
KNOX 2.1 |
Return Code denoting that the Container is not empty.
API level 12 |
KNOX 2.1 |
Return Code denoting the function is not support.
API level 12 |
KNOX 2.1 |
Return Code denoting that the package is not installed and input certificate is null
API level 12 |
KNOX 2.1 |
Return Code equivalent to boolean FALSE
API level 11 |
KNOX 2.0 |
Denotes constant value of GENERIC_SECURED_APPTYPE
API level 12 |
KNOX 2.1 |
Denotes constant value of GENERIC_TRUSTED_APPTYPE
API level 12 |
KNOX 2.1 |
Return Code denoting that the service has not started.
API level 11 |
KNOX 2.0 |
Deprecated in API level 27
Denotes constant value of IRM_PLATFORM_APPTYPE
API level 17 |
KNOX 2.5 |
Deprecated in API level 27
Denotes constant value of IRM_UNTRUST_APPTYPE
API level 17 |
KNOX 2.5 |
Return Code denoting the package is not installed.
API level 11 |
KNOX 2.0 |
Return Code denoting that policy set has failed.
API level 11 |
KNOX 2.0 |
Return Code denoting that the policy was correctly set.
API level 11 |
KNOX 2.0 |
Return Code denoting that policy set has been refused.
API level 11 |
KNOX 2.0 |
Return Code denoting that it is running application.
API level 11 |
KNOX 2.0 |
Return Code equivalent to boolean TRUE.
API level 11 |
KNOX 2.0 |
Deprecated in API level 30
API to add an application to a specific container domain, corresponding to the appType.
packageName | packageName of the application |
---|---|
certificate | Signature array based on the certificate array for the application see getSignatureFromPackage or getSignatureFromCertificate for creating signature array in correct format |
containerID | id for the container |
appType | describes the domain category to which the application is
being added. appType for GENERIC_SECURED_APPTYPE = 3. appType for GENERIC_TRUSTED_APPTYPE = 4. |
POLICY_OK
if successful,
POLICY_FAILED
if method error, and
POLICY_REFUSED
if authentication fails.
ERROR_NOT_SUPPORTED
if the application isn't allowed to be added to container.
ERROR_ALREADY_CONTAINER_APP
if the application is already in a container.
ERROR_CERTS_NOT_MATCHED
if the input certificate does not match.
ERROR_CONTAINER_ID_MISMATCH
if the input Container ID is not valid.
ERROR_NO_CERTS
if the package is not installed and input certificate is null.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // add app to container result = seams.addAppToContainer (packageName, certificate, containerID, appType); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to create a new SEAMS Container
ERROR_CONTAINER_COUNTS_OVERFLOW
if SEAMS Container count exceeds 300.
POLICY_FAILED
if Container Creation Fails.
POLICY_REFUSED
if license validation fails.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // Create SEContainer result = seams.createSEContainer(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 12 |
KNOX 2.1 |
Global Scope |
Deprecated in API level 30
API to get the contents of the AMS (ActivityManagerService) access control log on the device.
null
in the case of an error or license validation failure
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); String result = ""; try { // get AMS log result = seams.getAMSLog(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to return the current AMS access control log level.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // get AMS log level result = seams.getAMSLogLevel(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to return the AMS access control enforcement mode.
TRUE
if AMS access control is in enforcement mode,
FALSE
if in permissive mode,
POLICY_REFUSED
if authentication fails.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // get AMS enforcement mode result = seams.getAMSMode(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to return the contents of the SE for Android AVC log.
null
in the case of an error or license validation failure.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); String result = ""; try { // get AVC log result = seams.getAVCLog(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to return datatype name for a package name based on the current user
packageName | The package name. |
---|
null
if any error occurs or license validation failsthe package specified in the input is installed. |
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); String result = ""; try { // get selinux data type of the package result = seams.getDataType(packageName); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to return datatype name for a package name.
packageName | The package name. |
---|---|
userId | Relevant userId |
null
if any error occurs or license validation failsthe package specified in the input is installed. |
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); String result = ""; try { // get selinux data type of the package result = seams.getDataType(packageName, userId); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to return the domain name for a package name for the current user.
packageName | The package name. |
---|
null
if any error occurs or license validation failsthe package specified as input should be installed. |
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); String result = ""; try { // get selinux domain of the packagename result = seams.getDomain(packageName); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to return the domain name for a package name.
packageName | The package name. |
---|---|
userId | Relevant userId |
null
if any error occurs or license validation failsthe package specified as input should be installed. |
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); String result = ""; try { // get selinux domain of the packagename result = seams.getDomain(packageName, userId); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
API to get or create an instance of SEAMS module.
context | context |
---|
null
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); |
API level 11 |
KNOX 2.0 |
User Scope |
Deprecated in API level 30
API to get all package name array from a specific My Container ID
GENERIC_SECURED_APPTYPE
, Array of packageNames in this container, or null
otherwise.
If input appType = GENERIC_TRUSTED_APPTYPE
, Array of packageNames which are marked as Trusted for this Container, or null
otherwise.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); String[] result; try { // get package name From SEcontainer result = seams.getPackageNamesFromSEContainer(containerID, appType); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 12 |
KNOX 2.1 |
Global Scope |
Deprecated in API level 30
API to return the contents of the SE for Android SEAMS log.
null
in the case of an error or license validation failure.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); String result = ""; try { // get SEAMS log result = seams.getSEAMSLog(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 12 |
KNOX 2.1 |
Global Scope |
Deprecated in API level 30
API to provide status of clipboard isolation of a particular SEAMS container
containerID | ID of the SEAMS container |
---|
POLICY_OK
if successful,
POLICY_FAILED
if not successful, and
POLICY_REFUSED
if authentication fails.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // replace selinux policy seams.getSEContainerClipboardMode(int containerID); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 19 |
KNOX 2.6 |
Deprecated in API level 30
API to get all the SEAMS Container IDs created by the Agent
null
.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int[] result; try { // get SEContainer IDs result = seams.getSEContainerIDs(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 12 |
KNOX 2.1 |
Global Scope |
Deprecated in API level 30
API to get the unique ID of the container based on the name of the package.
packageName | name of the package. |
---|---|
appType | describes the domain category to which the application is
being added. appType for GENERIC_SECURED_APPTYPE = 3. appType for GENERIC_TRUSTED_APPTYPE = 4. |
GENERIC_SECURED_APPTYPE
ContainerIDs to which the Package Name belongs or null
otherwise.
GENERIC_TRUSTED_APPTYPE
ContainerIDs to which the package has been added as a Trusted Package or null
otherwise.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int[] result = -1; try { // get SEcontainerIDs From packageName result = seams.getSEContainerIDsFromPackageName(packageName); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 12 |
KNOX 2.1 |
Global Scope |
Deprecated in API level 30
API to return the current SELinux enforcement mode.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // get selinux enforcement mode result = seams.getSELinuxMode(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to return SELinux policy level.
null
in the case of any error.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); String result = ""; try { // get version of sepolicy result = seams.getSepolicyVersion(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to return the Signature in the format needed for argument for addAppToContainer. Extract the Signature from the certificate (pem format) at the path given as argument.
certificate | .pem format |
---|
null
in case of any
failureThe non-null output can be used as an input argument for
addAppToContainer(String, String[], int, int) /removeAppFromContainer(String, String[]) |
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); String result = ""; try { // get signature from certificate result = seams.getSignatureFromCertificate(certificate); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to return the Signature in the format needed for argument for addAppToContainer.
packageName | name of the package |
---|
null
in case of any failure.package should be installed
The non-null output can be used as an input argument for
addAppToContainer(String, String[], int, int) /removeAppFromContainer(String, String[]) |
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); String result = ""; try { // extract signature based on package result = seams.getSignatureFromMac(packageName); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 15 |
KNOX 2.4 |
Global Scope |
Deprecated in API level 30
API to return the Signature in the format needed for argument for addAppToContainer.
packageName | name of the package |
---|
null
in case of any failure.package should be installed
The non-null output can be used as an input argument for
addAppToContainer(String, String[], int, int) /removeAppFromContainer(String, String[]) |
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); String result = ""; try { // extract signature based on package result = seams.getSignatureFromPackage(packageName); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to check if KNOX Containers exist on the device
TRUE
if Knox Containers exist,
FALSE
if no Knox Containers exist
POLICY_FAILED
in case of error
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // check if caller is authorized result = seams.hasKnoxContainers(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
API level 12 |
KNOX 2.1 |
Global Scope |
Deprecated in API level 30
API to check if SE Containers exist on the device
TRUE
if SE Containers exist,
FALSE
if no SE Containers exist and
POLICY_FAILED
in case of error.SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // check if caller is authorized result = seams.hasSEContainers(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
API level 12 |
KNOX 2.1 |
Global Scope |
Deprecated in API level 30
API to return status which indicates if seandroid logs are included in dumpstate logs
TRUE
if dumpstate logs includes seandroid logs
FALSE
if dumpstate logs do not include seandroid logs
POLICY_REFUSED
otherwise
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // get selinux enforcement mode result = seams.isSEAndroidLogDumpStateInclude(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
API level 12 |
KNOX 2.1 |
Global Scope |
Deprecated in API level 27
API to get the value of the automatic sepolicy update system setting (on/off)
TRUE
, Represent policy auto-update has been enabled,
FALSE
, represent policy auto-update has been disabled,
POLICY_FAILED
in the case of an error and
POLICY_REFUSED
if license authentication fails.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // Enable automatic policy update result = seams.isSEPolicyAutoUpdateEnabled(); } catch (SecurityException e) { Log.e(TAG, "SecurityException:" + e); } |
The caller should have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of "signature" |
API level 12 |
KNOX 2.1 |
Global Scope |
Deprecated in API level 30
API to re-load mac_permissions.xml file, which is called after any policy file
change (e.g., addAppToContainer(String, String[], int, int)
and
removeAppFromContainer(String, String[])
).
packageName | The package name of the target application. |
---|
POLICY_OK
if success,
POLICY_FAILED
if method error and
POLICY_REFUSED
if authentication fails.The application will run in designated domain when re-started. This API
should be followed by relabelAppDir(String) . |
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // load application setting after reloading mac_permissions.xml result = seams.loadContainerSetting(packageName); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to perform data relabeling for a particular package.
packageName | The name of the application. |
---|
TRUE
if success,
FALSE
otherwise, and
POLICY_REFUSED
if license validation fails.The package is installed.
Usually this is called after any policy change such as
addAppToContainer(String, String[], int, int) and
removeAppFromContainer(String, String[]) .
The data directory of the application is labelled according to security
policy. |
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // relabel application data directory result = seams.relabelAppDir(packageName); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to perform data relabeling for the entire /data/data directory.
TRUE
if success,
FALSE
otherwise, and
POLICY_REFUSED
if authentication fails.The /data/data directory is labelled accroding to security policy. |
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // relabel data result = seams.relabelData(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to remove an application from an agent specific domain.
packageName | The package name of the application. |
---|---|
certificate | Certificate array for the application. |
POLICY_OK
if success,
POLICY_FAILED
if method error, and
POLICY_REFUSED
if authentication fails.
ERROR_CERTS_NOT_MATCHED
if the input certificate does not match.
ERROR_NO_CERTS
if the package is not installed and the input certificate is null
.Other options such as loadContainerSetting(String) and
relabelAppDir(String) should be followed.
The use of this API requires pre-installing the certificate of the
caller on the device. |
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // remove app from container result = seams.removeAppFromContainer(packageName, certificate); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to remove an application from an agent specific domain. [For SEAMS Container]
packageName | The package name of the application. |
---|---|
certificate | Certificate array for the application. |
containerID | The Container ID from which the package Name should be removed. |
appType | for GENERIC_SECURED_APPTYPE = 3. appType for GENERIC_TRUSTED_APPTYPE = 4. |
POLICY_OK
if success,
POLICY_FAILED
if method error, and
POLICY_REFUSED
if authentication fails.
ERROR_CERTS_NOT_MATCHED
if the input certificate does not match.
ERROR_NO_CERTS
if the package is not installed and the input certificate is null
.Other options such as loadContainerSetting(String) and
relabelAppDir(String) should be followed.
The use of this API requires pre-installing the certificate of the
caller on the device. |
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // remove app from container result = seams.removeAppFromContainer(packageName, certificate, containerID, appType); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 12 |
KNOX 2.1 |
Global Scope |
Deprecated in API level 30
API to remove a SEAMS Container. The container should be empty before it can be removed.
POLICY_OK
if successful.
ERROR_CONTAINER_NOT_EMPTY
if the container is not empty.
POLICY_FAILED
if Container Creation Fails.
POLICY_REFUSED
if license validation fails.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // Remove SEContainer result = seams.removeSEContainer(); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 12 |
KNOX 2.1 |
Global Scope |
Deprecated in API level 30
API to set AMS policy log level.
POLICY_OK
if success,
POLICY_FAILED
if method error, and
POLICY_REFUSED
if authentication fails.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // set ams log level result = seams.setAMSLogLevel(FLAG); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 11 |
KNOX 2.0 |
Global Scope |
Deprecated in API level 30
API to set parameter to add/remove seandroid logs to dumpstate logs
include | true indicates seandroid logs are included in dumpstate and false otherwise |
---|
POLICY_OK
if successful,
POLICY_FAILED
if not successful, and
POLICY_REFUSED
if authentication fails.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); try { // replace selinux policy seams.setSEAndroidLogDumpStateInclude(include); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 12 |
KNOX 2.1 |
Global Scope |
Deprecated in API level 30
API to enable/disable isolation of SEAMS container clipboard
containerID | containerID of the SEAMS container |
---|---|
mode | mode will represent if clipboard is enabled or disabled
mode = CLIPBOARD_ENABLE_BIDIRECTIONAL , separate SEContainer clipboard disabled for containerID (share user 0 clipboard)
mode = CLIPBOARD_DISABLE_BIDIRECTIONAL , separate SEContainer clipboard enabled for containerID (separate seams container clipboard) |
POLICY_OK
if successful,
POLICY_FAILED
if not successful, and
POLICY_REFUSED
if authentication fails.
SEAMSPolicy seams = SEAMSPolicy.getInstance(context); int result = -1; try { // replace selinux policy seams.setSEContainerClipboardMode(int containerID, int mode); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_SEAMS_MGMT" permission, which has a protection level of signature. |
API level 19 |
KNOX 2.6 |