Skip to content

Comments

feat: Add base64 export for MDM deployment (Android Managed Configurations)#193

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-base64-export-mdm
Draft

feat: Add base64 export for MDM deployment (Android Managed Configurations)#193
Copilot wants to merge 3 commits intomainfrom
copilot/add-base64-export-mdm

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

ATAK v5.0+ supports Android Managed Configurations via the enterpriseConfigurationDataPackage restriction key, which accepts base64-encoded data package ZIP files. Currently, administrators must manually download, encode (base64 -w 0), and copy the output. This adds automatic base64 encoding to the Data Package Builder workflow.

Changes

UI

  • MDM deployment section appears after package build with:
    • Read-only textarea displaying base64-encoded ZIP
    • Character count for MDM field validation
    • Copy to clipboard and collapse/expand controls
  • Section hidden on reset

Implementation

  • generateBase64ForMDM() processes ZIP blob in 32KB chunks to avoid call stack overflow
  • Uses window.btoa() for encoding
  • Auto-displays on successful package build

Documentation

  • Help section updated with MDM workflow instructions
  • References enterpriseConfigurationDataPackage field

Screenshots

After building a package:

MDM Deployment Section

Example Usage

// Triggered automatically after buildPackage() completes
const blob = await zip.generateAsync({ type: 'blob' });
await generateBase64ForMDM(blob);  // Displays base64 in UI

Eliminates manual encode step—administrators copy directly from UI into MDM console.

Original prompt

This section details on the original issue you should resolve

<issue_title>feat: Add base64 export for MDM deployment (Android Managed Configurations)</issue_title>
<issue_description>## Feature Request

Add the ability to display and copy the base64-encoded string of generated data packages for use with Mobile Device Management (MDM) systems.

Background

Since ATAK v5.0, ATAK supports Android Managed Configurations which enable administrators to push ATAK configuration from MDM systems to managed devices. This eliminates the need to manually load data package ZIP files onto every device.

How It Works

ATAK supports the enterpriseConfigurationDataPackage restriction key, which accepts a base64-encoded data package ZIP file. When pushed through an MDM:

  1. Administrator uploads ATAK to MDM's private app store
  2. Administrator sets the enterpriseConfigurationDataPackage field with base64-encoded data package
  3. End-users install ATAK from MDM
  4. MDM pushes the configuration to the device
  5. ATAK reads and processes the data package automatically on first launch
  6. ATAK connects to TAK server (or shows enrollment prompt)

Current Manual Process

Currently, administrators must:

  1. Generate data package in qrtak
  2. Download the ZIP file
  3. Base64 encode it manually: cat package.zip | base64 -w 0 > encoded.txt
  4. Copy the encoded string into MDM console

Proposed Solution

Add a "Show Base64 String" button/field to the Data Package Builder that:

  1. Generates the data package ZIP in memory
  2. Base64 encodes the entire ZIP file
  3. Displays the encoded string in a copyable text field
  4. Optionally: Show character count for MDM field validation

UI Mockup

┌─────────────────────────────────────────────────┐
│ Data Package Builder                                                                                            │
├─────────────────────────────────────────────────┤
│ [Build Package] [Download ZIP]                                                                            │
│                                                                                                                               │
│ ✓ Package built successfully!                                                                                │
│                                                                                                                               │
│ 📦 MDM Deployment (Base64)                                                                            │
│ ┌──────────────────────────────────────────────┐ │
│ │ UEsDBBQAAAAIABMAAAIAAAAAAAAAAAAAAAAAAAAA...                          │ │
│ │ ...encoded string...                                                                                          │ │
│ │                                                                                                                        │ │
│ └──────────────────────────────────────────────┘ │
│ [Copy to Clipboard] (12,345 characters)                                                               │
└─────────────────────────────────────────────────┘

Implementation Notes

  1. Use browser's btoa() or FileReader API to encode ZIP blob
  2. For large packages, may need to handle encoding in chunks
  3. Display in a <textarea readonly> or <pre> element
  4. Add "Copy to Clipboard" button using Clipboard API
  5. Consider showing both raw base64 and line-wrapped version

Benefits

  • Streamlined MDM workflow: No download/encode/upload cycle
  • Fewer errors: No manual file handling
  • Faster deployment: Copy-paste directly into MDM console
  • Better UX: All-in-one tool for package generation and MDM prep

References

  • ATAK Managed Configurations: Android enterprise management facility (ATAK v5.0+)
  • Google Documentation: https://developer.android.com/work/managed-configurations
  • Restriction Key: enterpriseConfigurationDataPackage (string type)
  • MDM Systems: Bittium SafeMove, Microsoft Intune, VMware Workspace ONE, etc.

Related

Acceptance Criteria

  • Base64 encoding implemented for generated ZIP packages
  • UI field displays encoded string after package build
  • Copy to Clipboard functionality works
  • Character count displayed for validation
  • Works offline (PWA requirement)
  • Documented in help section</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 1, 2025 20:24
- Add UI section for MDM deployment with base64 textarea
- Implement base64 encoding of data packages
- Add copy to clipboard and show/hide toggle functionality
- Update help documentation with MDM deployment instructions
- Add CSS styling for MDM section
- Add tests for MDM functionality
- All tests passing, lint clean

Co-authored-by: joshuafuller <6954640+joshuafuller@users.noreply.github.com>
…setting

Co-authored-by: joshuafuller <6954640+joshuafuller@users.noreply.github.com>
Copilot AI changed the title [WIP] Add base64 export for MDM deployment configurations feat: Add base64 export for MDM deployment (Android Managed Configurations) Nov 1, 2025
Copilot AI requested a review from joshuafuller November 1, 2025 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add base64 export for MDM deployment (Android Managed Configurations)

2 participants