Skip to content

Clean Reinstall ​

Clean Reinstall re-establishes a trustworthy baseline for the app on the device. Jugg installs the current APK and, when needed, clears app data, resets deployment history, and resets the overlay checkpoint so that later incremental deployments do not build on mismatched state.

When reinstallation occurs ​

ScenarioCurrent supportDeployment strategy
First deployment after a Gradle buildSupportedInstalls the current APK directly and writes the deployment cache
The target app is not installed on the deviceSupportedUses install instead of incremental deployment
The Clean Reinstall option is enabledSupportedClears app data before installing the APK
Overlay or cache state does not matchSupportedReinstalls after recovery fails
The default APK installer reports a recoverable exceptionLimited retry supportedUninstalls the current applicationId and reinstalls when needed; custom scripts are not retried automatically
Multi-APK appSupportedGroups base, split, or test APKs by applicationId for installation

NOTE

Clean Reinstall resets the incremental deployment baseline. It is not a regular hot-update path, but it gives the next incremental deployment a trustworthy APK, history, and overlay state.

How it takes effect ​

text
Installation is required
  -> Stop the target app
  -> Assemble JuggDeployData for installation
  -> Install APKs grouped by applicationId
  -> Write the Android Studio deployment cache
  -> Update Jugg deployment history and overlay ID
  -> Reset staging / deployed file state

Jugg stops the app before installation so users do not see the app get stopped immediately after a successful install. When a custom APK install script is enabled, the project script performs this step for ordinary apps; Android test APKs continue to use the default installer. After installation succeeds and APK verification passes, Jugg records the current APK and overlay ID as the new deployment checkpoint. A reinstall triggered by recovery also clears old deployed data, resource APKs, and staging state.

Relationship to incremental deployment ​

Clean Reinstall commonly appears at these boundaries:

  • After a successful Gradle compilation, the complete APK must establish a new baseline.
  • A dry deploy or Direct Overlay state check fails, so device state is unsuitable for continued hot updates.
  • The app was externally installed, uninstalled, had its data cleared, or was used with another project, making the historical checkpoint untrustworthy.

After a successful reinstall, later changes still attempt incremental deployment first.