> For the complete documentation index, see [llms.txt](https://portal-integracao.intelbras.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://portal-integracao.intelbras.com.br/linha-android/proxyserver/lamypackagemanager.md).

# LamyPackageManager

LamyPackageManager fornece instalação do sistema, interface de inicialização, autorização obrigatória, e outras capacidades.

```java
/**
* Provides system installation
*
* @param apkPath Installation package storage path required
* @param packageName The name of the package that needs to be started after
installation is completed
* @param isSilent true Silent installation，false Standard installation
* @return refer to {@link ResultCode}
*/
public int install(String apkPath, String packageName, boolean isSilent)
/**
* Provides Application Deleting Capacities
*
The name of the installation package that needs to be removed
* @param isSilent true Silent installation，false Standard installation
* @return refer to {@link ResultCode}
*/
public int unInstall(String packageName, boolean isSilent)
/**
*Start the Launch attribute activity of the specified app
*
* @param packageName Name of the specified package
* @return refer to {@link ResultCode}
*/
public int startLaunchActivity(String packageName)
/**
*Grant the specified permission for the specified package. Permissions for
system level operation cannot be granted, and the high feature permissions of
Android 11 cannot be granted.
*
* @param packageName Name of the specified package
* @return refer to {@link ResultCode}
*/
public int grantRuntimePermission(String packageName, String permission);
/**
*Grant all permissions for the specified package. Permissions for system level
operation cannot be granted, and the high feature permissions of Android 11
cannot be granted.
*
* @param packageName Name of the specified package
* @return refer to {@link ResultCode}
*/
public int grantAllRuntimePermission(String packageName);
/**
*Start the activity of the specified app at the backend
* @param packageName Specify package name
* @param className Class name of the specified activity
*Intent. flag initiated @ param flag
* @return refer to {@link ResultCode}
*/
public int startActivity(String packageName, String className, int flag );
/**
*Set system default HomeActivity
*
* @param packageName Package name
* @return refer to {@link ResultCode}
*/
public int setHomeActivity(String packageName);
/**
*Add special permissions, persistent or system permissions, for the specified
third-party app.
*Note: After the settings are completed, the device needs to be restarted to
take effect. SharedUserId are not allowed in third-party programs. Otherwise
system permissions cannot be authorized.
*
* @param packageName Package name
* @param persistent Whether the third-party package be configured with
persistent app permissions
* @param system Whether the third-party package be configured with system
app permissions
* @return refer to {@link ResultCode}
*/
public int addPackagePrivilege(String packageName, boolean persistent, boolean
system);
/**

*Remove special permissions for the specified third-party app to run.
Note: Restart the device for the changes to take effective.
* @param packageName Package name
* @return refer to {@link ResultCode}
*/
public int removePackagePrivilege(String packageName)

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://portal-integracao.intelbras.com.br/linha-android/proxyserver/lamypackagemanager.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
