AP Infotech & Cyber Solution — 13/15A, R-Block, Street No-3, Vikas Nagar, Uttam Nagar, West Delhi - 110059 • Tel: +91 78278 47488 • GSTIN: 07HKIPK6079Q1Z3

AK DeviceLock (DPC): Multi-Tenant Android Device Owner Architecture

How AP Infotech engineered AK DeviceLock (DPC) using Kotlin Device Owner APIs, ECDSA P-256 command signing, Django 5.2, PostgreSQL, and React 19.

By AP Infotech Engineering • Guide — 2026 • 8 min read

Table of Contents

  • What an Android Device Policy Controller (DPC) Solves
  • 7-App Django 5.2 Backend, Multi-Tenancy & Entitlement Ledger
  • ECDSA P-256 Signed Commands & Android Keystore AES-256-GCM
  • Kiosk Mode, Anti-Reset Protection & Android 9–16 Provisioning
  • Real Hardware Testing & Engineering Boundaries

Complete Engineering Guide

Device financing providers, enterprise IT teams, and field fleets across India need deterministic remote policy control rather than fragile third-party lock apps. Built in-house at AP Infotech & Cyber Solution and published under github.com/Emijaan/dpc, AK DeviceLock (AKDL) is a multi-tenant Android Device Policy Controller (DPC) combining a native Kotlin agent (com.akdevicelock.dpc), a 7-app Django 5.2 backend, and a React 19 + TypeScript operator portal.

On the server side, the control plane splits cleanly into seven focused Django apps — accounts, roles, devices, commands, entitlements, audit, and notifications — backed by PostgreSQL, Celery background workers, and JWT authentication with rotating blacklisted refresh tokens. Superusers, Retailers, and Vendors operate inside strict tenant ownership boundaries, allocating 365-day enrollment entitlements through an append-only consumption ledger.

Every sensitive instruction (DEVICE_LOCK, DEVICE_UNLOCK, DEVICE_STATUS, DEVICE_SYNC, DEVICE_RELEASE) is cryptographically signed using ECDSA P-256 (SHA256withECDSA) over a canonical payload containing command_id, device_id, issued_at, expires_at, and nonce. On the phone, CommandVerifier validates both the signature against an embedded X.509 public key and server-relative expiration before touching device state. Device credentials are SHA-256 hashed at rest on the server, sealed inside non-exportable Android Keystore AES-256-GCM storage (SecureStore) in Device-Protected Storage, and rotated every 7 days.

When restricted, KioskRestrictionManager activates Android Lock Task Mode, sets a persistent LockedHomeAlias launcher surviving Direct Boot (LOCKED_BOOT_COMPLETED), disables the status bar and unauthorized ADB debugging/factory reset via EnrollmentProtection (DISALLOW_FACTORY_RESET, DISALLOW_SAFE_BOOT, DISALLOW_USB_FILE_TRANSFER), while preserving emergency 112 calling and support contact access. Firebase Cloud Messaging HTTP v1 data-only pushes wake sleeping devices so they pull signed commands reliably over TLS.

Provisioning covers Android 9–11 via 1-step Device Owner QR codes (/panel/qr/ serving signed APKs directly through Nginx), Android 12–15 via 2-step TestDPC 9.0.12 ownership transfer, and Android 16 via session-scoped USB scripts — verified across physical Vivo 1902 (Android 9) and Samsung SM-X115 (Android 16) test hardware alongside 48 passing Django multi-tenant isolation, entitlement, and crypto tests. Need a custom Android DPC, MDM, or Django + React enterprise platform? Explore our Custom Software service or review the repository directly.

Verified Hardware Catalog & Builds

Software, Database, Shopify, Cloud & CCTV Services

Technical & Hardware Buying Guides

Frequently Asked Questions

Do you supply both single laptops and bulk enterprise orders?

Yes. Individuals can order a single laptop or component directly, while businesses can request bulk pricing and GST-compliant invoices through our Business Portal.

Are refurbished and used products tested before sale?

Every pre-owned item undergoes multi-point diagnostics, thermal testing, and transparent grading (Grade A+, A, B, or C) with any known defects clearly disclosed.

Can I request a custom PC quote if I am unsure about compatibility?

Yes. Use our interactive Custom PC Builder to test compatibility and submit your configuration for an expert review and quotation.

What IT services do you provide beyond hardware?

We engineer custom Windows/Android/Web software, PostgreSQL/MySQL databases, APIs, AWS cloud infrastructure, CCTV surveillance, and cybersecurity/AMC.