Build, align, and sign APK output
recompile_align_and_signRecompile modified APK from workspace, align, sign with apksigner, and verify signature as final packaging step.
Instructions
Build a modified decoded workspace with apktool, align the APK, sign it with apksigner, and verify the resulting signature. Use this as the final packaging step after manifest and Smali validation; it overwrites outputApkPath and creates signing artifacts, so do not call it for read-only inspection. Provide a custom keystore only for an authorized signing workflow; otherwise the result is a debug-signed test artifact, not an update-compatible release by default.
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. |