Skip to content

chore: Merge branch dev to main#441

Merged
MarcaDian merged 104 commits into
mainfrom
dev
May 4, 2026
Merged

chore: Merge branch dev to main#441
MarcaDian merged 104 commits into
mainfrom
dev

Conversation

@github-actions

@github-actions github-actions Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

This pull request will Merge branch dev to main.

Before merging this PR

  • Pull & merge translations from Crowdin

MarcaDian and others added 10 commits April 17, 2026 09:49
# [1.16.0-dev.1](v1.15.0...v1.16.0-dev.1) (2026-04-17)

### Features

* Store merged APK from split archives as original for repatching ([#438](#438)) ([be0b868](be0b868))
* feat: Add bytecode mode setting to expert mode

* chore: Update bytecode mode strings

* fix: Fix process hang, memory monitor leak, and wakelock leak

PatcherProcess: fix process hang when session throws

events.finished(null) was placed after the try/finally block. If Session.run() threw an exception it was caught by CoroutineExceptionHandler but events.finished() was never called, leaving patching.await() in ProcessRuntime hanging indefinitely until the process was killed.

Moved events.finished(null) inside the try block on success, and added a catch block that calls events.finished(stackTrace) on failure, ensuring the main process always receives a completion signal regardless of outcome.

---

CoroutineRuntime: fix MemoryMonitor polling thread leak on early failure

startMemoryPolling() was called before the try block. Any exception thrown before SplitApkPreparer.prepareIfNeeded() — such as from bundles(), PatchBundle.Loader.patches(), or an invalid bundle ID — would skip stopMemoryPolling(), leaving the polling thread running indefinitely.

Wrapped the entire execute() body in an outer try/finally to guarantee stopMemoryPolling() is always called. The inner try/finally for preparation.cleanup() is preserved.

---

PatcherWorker: fix wakelock not released if claimInput throws

wakeLock.acquire() was called before workerRepository.claimInput(). If claimInput() threw an exception the finally block was never reached, holding a partial wakelock for up to 10 minutes.

Moved claimInput() inside the try/finally block using lateinit var args so the wakelock is always released and args remains accessible after the block for the temporary file cleanup check.

PatcherWorker: remove duplicate MemoryMonitor calls

startMemoryPolling() was called in both PatcherWorker and inside CoroutineRuntime.execute(), causing two threads writing concurrently to the same @volatile fields (memoryUsedAverage, memoryUsedMax, memoryPollSamples), producing incorrect memory statistics.

stopMemoryPolling() was also redundantly called in PatcherWorker after already being called inside CoroutineRuntime.execute() and PatcherProcess.

Removed both redundant calls along with the now-unused MemoryMonitor import and usedCoroutineFallback variable. Memory monitor lifecycle is now managed entirely within each runtime implementation.

PatcherWorker: replace restricted API usage with public equivalent

Result.Success type check required @SuppressLint("RestrictedApi") as Result.Success is an internal androidx.work class. Replaced with a patchingSucceeded boolean flag checked against the public Result.success() value, removing the suppression annotation and its import.

PatcherWorker: log warning when temp APK cleanup fails

patchedApk.delete() silently ignored failures. Now logs a warning if the temporary patched APK cannot be deleted and still exists.

---

Session: remove unused nextPatchIndex variable

* chore: Update patcher

* chore: Update dependencies

* chore: Fix `Close` button style

* Add debug build

* Remove safe option

* Add back legacy packaging

* Remove aapt2 from manager

* bump patcher

---------

Co-authored-by: Eric Ahn <w@chill.dev>
# [1.16.0-dev.2](v1.16.0-dev.1...v1.16.0-dev.2) (2026-04-18)

### Features

* Add fast bytecode mode setting to expert mode ([#403](#403)) ([e73c63c](e73c63c))
@MarcaDian MarcaDian linked an issue Apr 18, 2026 that may be closed by this pull request
3 tasks
semantic-release-bot and others added 3 commits April 18, 2026 07:03
# [1.16.0-dev.3](v1.16.0-dev.2...v1.16.0-dev.3) (2026-04-18)

### Bug Fixes

* Handle `InstallFailure` result when installing manager update ([a4d1eb8](a4d1eb8))

### Features

* Migrate to `Ackpine` for package installation/uninstallation ([#444](#444)) ([aa7207d](aa7207d))
…nto 'Optimize for device architecture' setting
@MarcaDian MarcaDian linked an issue Apr 18, 2026 that may be closed by this pull request
3 tasks
@LisoUseInAIKyrios LisoUseInAIKyrios linked an issue Apr 18, 2026 that may be closed by this pull request
4 tasks
@MarcaDian MarcaDian linked an issue Apr 19, 2026 that may be closed by this pull request
3 tasks
crowdin-bot and others added 6 commits April 19, 2026 11:36
# [1.16.0-dev.4](v1.16.0-dev.3...v1.16.0-dev.4) (2026-04-19)

### Bug Fixes

* Add logging and fix stale installer cache ([78b5aee](78b5aee))
* Merge 'Filter split APKs' and `Remove unused native libraries` into 'Optimize for device architecture' setting ([2edb15f](2edb15f))

### Features

* Add swipe gestures and multi-select to app buttons on main screen ([#446](#446)) ([0330699](0330699))
* Add toggle to disable home screen patching phrases ([#443](#443)) ([f53ad64](f53ad64))
# Conflicts:
#	app/CHANGELOG.md
#	app/app-release.json
Users who have not updated to 1.15.0 yet will be prompted to upgrade twice: once to 1.15.0 then again to whatever is the latest release.
MarcaDian and others added 16 commits May 1, 2026 00:40
# [1.16.0-dev.16](v1.16.0-dev.15...v1.16.0-dev.16) (2026-04-30)

### Bug Fixes

* "SessionBasedInstallConfirmationActivity was finished by user" install error on some devices ([3e74857](3e74857))
* Scope `InstalledAppInfoViewModel` to dialog instance via dialog token ([0cf2f6a](0cf2f6a))
# [1.16.0-dev.17](v1.16.0-dev.16...v1.16.0-dev.17) (2026-05-01)

### Bug Fixes

* Eliminate background flash on `InstalledAppInfo` → patch flow transition ([b246a4b](b246a4b))
* Prevent `InstalledAppInfoViewModel` collision on dialog reopen ([15ae79a](15ae79a))
# [1.16.0-dev.18](v1.16.0-dev.17...v1.16.0-dev.18) (2026-05-03)

### Bug Fixes

* Replace `Ackpine` with native `SessionInstaller` ([#508](#508)) ([cf0f4db](cf0f4db))

### Features

* Prompt bundle selection before APK selection in simple mode ([#511](#511)) ([8161d9b](8161d9b))
MarcaDian and others added 5 commits May 3, 2026 19:14
# [1.16.0-dev.19](v1.16.0-dev.18...v1.16.0-dev.19) (2026-05-03)

### Bug Fixes

* Apply locale via context wrap on Android < 13 ([ce193ee](ce193ee))
* Hoist install state reads to prevent recomposition on install ([9b82048](9b82048))
Creating a new `PreferencesManager` in `attachBaseContext` opened a second `DataStore` connection for the same file, causing `IllegalStateException` and falling back to system locale on every cold start.

Language is now mirrored to `SharedPreferences` (morphe_locale) on every change and synced from `DataStore` after preload(). Both `Application` and `MainActivity` read from `SharedPreferences` in `attachBaseContext`, avoiding any `DataStore` interaction before `Koin` is initialized.

Closes? #408
# [1.16.0-dev.20](v1.16.0-dev.19...v1.16.0-dev.20) (2026-05-03)

### Bug Fixes

* Use `SharedPreferences` as locale side-channel on Android < 13 ([a5f91bd](a5f91bd))
@MarcaDian MarcaDian marked this pull request as ready for review May 4, 2026 08:33
@MarcaDian MarcaDian merged commit 0279e73 into main May 4, 2026
LisoUseInAIKyrios pushed a commit that referenced this pull request May 17, 2026
SA-SUJON pushed a commit to SA-SUJON/MorpheManager that referenced this pull request May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment