Build, align, and sign APK output
recompile_align_and_signRebuild a modified APK workspace into an aligned, signed APK, using either a provided keystore or an auto-generated debug key.
Instructions
Rebuild a modified decoded workspace with apktool, 4-byte align the uncompressed APK with zipalign, and cryptographically sign the binary with apksigner (v1-v4 schemes). Mutates the filesystem by overwriting outputApkPath and creating temporary alignment artifacts; requires a valid workspaceDir containing modified Smali and AndroidManifest.xml. Pass keystoreConfig with custom keystorePath, passwords, and keyAlias for authorized release signatures; if keystoreConfig is omitted, generates an auto-signed debug test artifact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceDir | Yes | Path to decompiled APK workspace root directory containing modified Smali, assets, and AndroidManifest.xml | |
| outputApkPath | Yes | Destination file path for final recompiled, 4-byte aligned, and cryptographically signed APK | |
| keystoreConfig | No | Optional signing keystore configuration. If omitted, an auto-generated debug keystore is used |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aligned | Yes | Whether zipalign completed successfully. | |
| verified | Yes | Whether apksigner verification completed successfully. | |
| sizeBytes | Yes | Final APK byte size. | |
| keystorePath | Yes | Keystore used for signing, when available. | |
| outputApkPath | Yes | Absolute path to the signed output APK. | |
| signingScheme | Yes | Detected APK signature schemes. |