# Remove Device Owner App via ADB Shell

This guide helps you remove a device owner app (like cordova-plugin-kiosk-device-owner) when standard uninstall methods fail.

## Prerequisites

- ADB installed and working
- Device connected via USB with USB debugging enabled
- Device owner app installed that you want to remove

## Step-by-Step Instructions

### 1. Connect to ADB Shell

```bash
adb devices
adb shell
```

### 2. Delete Device Policy Files

Remove the device policy and owner configuration files:

```bash
rm -f /data/system/device_policies.xml
rm -f /data/system/device_owner_2.xml
rm -f /data/system/users/0/device_policies.xml
rm -rf /data/system/device_policies/
```

### 3. Optional: Remove Package Restrictions

If the above doesn't work, also try:

```bash
rm -f /data/system/users/0/package-restrictions.xml
```

### 4. Reboot Device

```bash
reboot
```

### 5. Uninstall the App

After the device reboots, reconnect via ADB and uninstall:

```bash
adb shell
pm uninstall io.homeconsole
```