A macOS GUI application for converting APKM files (Android App Bundle split APKs) into single APK files that can be installed on Android-based TVs (like Xiaomi TVs).
- 🖱️ Drag-and-drop APKM file support
- ⚙️ Save multiple device configuration profiles
- 📱 Support for different architectures (ARM, x86)
- 🎨 Intelligent screen density selection
- 🌍 Multi-language preference support
- ✨ Clean, native macOS interface
- 🔐 Automatic APK signing
- macOS 10.14 or later
- Python 3.9 or later
- Java/JDK (for APK signing)
- Android SDK Build Tools (optional, for apksigner)
- Clone this repository:
git clone https://github.com/wadjj/APKM-Repackager.git
cd APKM-Repackager- Install dependencies:
pip3 install -r requirements.txt- Install Java (if not already installed):
brew install openjdkSimply run the main script:
python3 main.pyOr make it executable and run directly:
chmod +x main.py
./main.py- Drag and drop an APKM file into the window (or click Browse)
- Select a device configuration from the dropdown
- Click Convert to APK
- Choose where to save the output APK file
- Wait for the conversion to complete
Click File > Manage Configurations to:
- Create new device profiles
- Edit existing configurations
- Delete unwanted profiles
Each configuration includes:
- Device name
- Architecture (arm64-v8a, armeabi-v7a, x86, x86_64)
- Maximum screen density
- Preferred languages (in priority order)
To create a standalone macOS application:
python3 setup.py py2appThe app will be created in the dist/ directory.
- Architecture: arm64-v8a
- Max Density: xhdpi
- Languages: Chinese (Simplified), English
- Architecture: arm64-v8a
- Max Density: xhdpi
- Languages: English
APKM-Repackager/
├── main.py # Application entry point
├── requirements.txt # Python dependencies
├── setup.py # py2app configuration
├── ui/ # GUI components
│ ├── main_window.py
│ └── config_dialog.py
├── lib/ # Core logic
│ ├── config_manager.py
│ ├── apkm_parser.py
│ ├── apk_merger.py
│ └── signer.py
├── configs/ # Device configurations
│ ├── default.json
│ └── xiaomi-tv.json
└── resources/ # App resources
- Extract: Unzips the APKM file to access individual APK slices
- Analyze: Identifies base APK, architecture, density, and language slices
- Select: Chooses appropriate slices based on configuration
- Merge: Combines selected slices into a single APK
- Sign: Signs the merged APK for installation
- Output: Produces installable APK file
- Make sure Java/JDK is installed:
java -version - The app will create a debug keystore automatically
- The APKM may not contain slices matching your configuration
- Try a different architecture or density setting
- Make sure the file is a valid APKM file
- The file may be corrupted - try downloading again
See LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request.
Built with:
- PyQt6 for the GUI
- pyaxmlparser for APK analysis
- py2app for macOS packaging