-
-
Notifications
You must be signed in to change notification settings - Fork 27
fix: Execute ADB commands sequentially to fix mounting issues #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I have no idea why, but `su -h` hanged. Using `which su` should have the same effect without locking
Without waiting, all commands are executed simultaneously which, for me, resulted in the pushed apk having the contents of the script
|
Please explain the change, I do not see why these changes make a difference or how they change behaviour. |
|
As written in the issue, patching with The second commit, as I wrote in its description, solves an out-of-order problem. All the commands were run concurrently, without waiting for the previous ones to finish.
You could have runs like (as in my case):
Which is not the intended result. Also, I was imprecise. I meant that this should solve ReVanced/revanced-cli#267, and combined with ReVanced/revanced-cli#278 all problems with |
|
Thank you for contributing to ReVanced. Join us on Discord if you want to receive a contributor role. |
## [1.1.4-dev.1](v1.1.3...v1.1.4-dev.1) (2023-10-09) ### Bug Fixes * Execute ADB commands sequentially to fix mounting issues ([#12](#12)) ([fda3eca](fda3eca))
|
@ricnava00 |
|
Putting comments inside instead of a command works too: this.startCommand("su -c \"# hello world\"", false).waitFor() == 0 |
|
Yes, I can confirm this works on my device too |
# 1.0.0 (2024-12-07) ### Bug Fixes * Add missing log when calling `UserAdbManager#install` ([90b612b](90b612b)) * Ask for root permissions before trying to use them ([aea1d69](aea1d69)) * Catch exceptions when serializing invalid patch options ([cd73bd3](cd73bd3)) * Check if file exists before trying to open it ([8ddc6e9](8ddc6e9)) * Delete mount script ([4fe0fb0](4fe0fb0)) * Detect if app is installed by fixing inversion ([649f06b](649f06b)) * Differentiate no package compatibility to any version compatibility ([762b7e3](762b7e3)) * Do not specify a provider to automatically select an available one ([249372c](249372c)) * Execute ADB commands sequentially to fix mounting issues ([ReVanced#12](https://github.com/inotia00/revanced-library/issues/12)) ([fda3eca](fda3eca)) * Make functions internal which are supposed to be internal ([893d22d](893d22d)) * Make property private ([51109c4](51109c4)) * Map dependencies from `KClass` into `String` to fix serialization ([57e36ab](57e36ab)) * Only load the keystore once per instantiation ([5993f7e](5993f7e)) * Serialize compatible packages as a map instead of a set of pairs. ([737e272](737e272)) * Sign APKs using `apksig` ([f59ecbc](f59ecbc)) * Sort the version maps by the most common version ([e4be6db](e4be6db)) * Support mounting even when Magisk is not installed ([2a30845](2a30845)) * Use `BKS` instead of default signing provider to fix backwards compatibility ([41805fc](41805fc)) * Use correct function name casing ([ef38d8b](ef38d8b)) * Use the JVM name instead of the value from `KClass#toString` ([d18e436](d18e436)) ### Build System * Refactor to DSL to bump ReVanced Patcher ([7f5d6da](7f5d6da)) ### Features * Add `PatchUtils#getMostCommonCompatibleVersions` utility function ([c5f3536](c5f3536)) * add `rip-libs` ([23df153](23df153)) * add compatibility with keystores generated in CLI v3.0 ([907124a](907124a)) * Add initial project structure ([833291d](833291d)) * Add JSON de- and serialization of patches ([ecff6fe](ecff6fe)) * Add local Android installer ([ReVanced#25](https://github.com/inotia00/revanced-library/issues/25)) ([43d655a](43d655a)) * Add utility function around key certificate pairs ([2df3484](2df3484)) * Allow getting most common compatible versions for all packages ([96845ba](96845ba)) * Improve exception message ([b15efa4](b15efa4)) * Improve mount reliability by unmounting existing mounts and killing running apps ([9fda407](9fda407)) * Increase certainty of the possibility to mount ([10f8cd1](10f8cd1)) * Increase default expiration date of certificate ([f2bd3f5](f2bd3f5)) * Increase the key size to 4096 ([892e083](892e083)) * Log warnings when compiling resources ([1dc8e2e](1dc8e2e)) * Mention APK file name when logging aligning ([244ebc2](244ebc2)) * Remove deprecated functions ([b9bf3bc](b9bf3bc)) * revert Options object ([99d81d1](99d81d1)) * Select first Adb device, if none supplied automatically ([1a5f868](1a5f868)) * Simplify signing utility API ([4c6a636](4c6a636)) * Use `apkzlib` instead of own implementations and bump ReVanced Patcher ([3aa6dc2](3aa6dc2)) * Use better log messages when handling exceptions ([5896968](5896968)) * Warn when option could not be set because the option does not exist ([7ec6504](7ec6504)) ### Performance Improvements * Use maps to set options ([13823b7](13823b7)) ### BREAKING CHANGES * Some functions have been removed. * Some functions are not available anymore. * The signature of some functions has changed. * This commit removes deprecated APIs and bumps ReVanced Patcher. Because of it's changes, `apkzlib` is now used instead of own implementations of `ZipFile`
# 1.0.0-dev.1 (2025-11-28) ### Bug Fixes * Add missing log when calling `UserAdbManager#install` ([90b612b](90b612b)) * Add my repo to maven ([3c575a6](3c575a6)) * Ask for root permissions before trying to use them ([aea1d69](aea1d69)) * Catch exceptions when serializing invalid patch options ([cd73bd3](cd73bd3)) * Check if file exists before trying to open it ([8ddc6e9](8ddc6e9)) * Delete mount script ([4fe0fb0](4fe0fb0)) * Detect if app is installed by fixing inversion ([649f06b](649f06b)) * Differentiate no package compatibility to any version compatibility ([762b7e3](762b7e3)) * Do not specify a provider to automatically select an available one ([249372c](249372c)) * Execute ADB commands sequentially to fix mounting issues ([ReVanced#12](https://github.com/brosssh/revanced-library/issues/12)) ([fda3eca](fda3eca)) * Make functions internal which are supposed to be internal ([893d22d](893d22d)) * Make property private ([51109c4](51109c4)) * Map dependencies from `KClass` into `String` to fix serialization ([57e36ab](57e36ab)) * Only load the keystore once per instantiation ([5993f7e](5993f7e)) * Serialize compatible packages as a map instead of a set of pairs. ([737e272](737e272)) * Sign APKs using `apksig` ([f59ecbc](f59ecbc)) * Sort the version maps by the most common version ([e4be6db](e4be6db)) * Support mounting even when Magisk is not installed ([2a30845](2a30845)) * Use `BKS` instead of default signing provider to fix backwards compatibility ([41805fc](41805fc)) * Use correct function name casing ([ef38d8b](ef38d8b)) * Use the JVM name instead of the value from `KClass#toString` ([d18e436](d18e436)) ### Build System * Refactor to DSL to bump ReVanced Patcher ([7f5d6da](7f5d6da)) ### Features * Add `PatchUtils#getMostCommonCompatibleVersions` utility function ([c5f3536](c5f3536)) * Add initial project structure ([833291d](833291d)) * Add JSON de- and serialization of patches ([ecff6fe](ecff6fe)) * Add local Android installer ([ReVanced#25](https://github.com/brosssh/revanced-library/issues/25)) ([43d655a](43d655a)) * Add utility function around key certificate pairs ([2df3484](2df3484)) * Allow getting most common compatible versions for all packages ([96845ba](96845ba)) * Improve exception message ([b15efa4](b15efa4)) * Improve mount reliability by unmounting existing mounts and killing running apps ([9fda407](9fda407)) * Increase certainty of the possibility to mount ([10f8cd1](10f8cd1)) * Increase default expiration date of certificate ([f2bd3f5](f2bd3f5)) * Increase the key size to 4096 ([892e083](892e083)) * Installing app with ownership enforcement ([bfabb7f](bfabb7f)) * Log warnings when compiling resources ([1dc8e2e](1dc8e2e)) * Mention APK file name when logging aligning ([244ebc2](244ebc2)) * Remove deprecated functions ([b9bf3bc](b9bf3bc)) * Select first Adb device, if none supplied automatically ([1a5f868](1a5f868)) * Simplify signing utility API ([4c6a636](4c6a636)) * Use `apkzlib` instead of own implementations and bump ReVanced Patcher ([3aa6dc2](3aa6dc2)) * Use better log messages when handling exceptions ([5896968](5896968)) * Warn when option could not be set because the option does not exist ([7ec6504](7ec6504)) ### Performance Improvements * Use maps to set options ([13823b7](13823b7)) ### BREAKING CHANGES * Some functions have been removed. * Some functions are not available anymore. * The signature of some functions has changed. * This commit removes deprecated APIs and bumps ReVanced Patcher. Because of it's changes, `apkzlib` is now used instead of own implementations of `ZipFile`
# 1.0.0 (2025-11-28) ### Bug Fixes * Add missing log when calling `UserAdbManager#install` ([90b612b](90b612b)) * Add my repo to maven ([3c575a6](3c575a6)) * Ask for root permissions before trying to use them ([aea1d69](aea1d69)) * Catch exceptions when serializing invalid patch options ([cd73bd3](cd73bd3)) * Check if file exists before trying to open it ([8ddc6e9](8ddc6e9)) * Delete mount script ([4fe0fb0](4fe0fb0)) * Detect if app is installed by fixing inversion ([649f06b](649f06b)) * Differentiate no package compatibility to any version compatibility ([762b7e3](762b7e3)) * Do not specify a provider to automatically select an available one ([249372c](249372c)) * Execute ADB commands sequentially to fix mounting issues ([ReVanced#12](https://github.com/brosssh/revanced-library/issues/12)) ([fda3eca](fda3eca)) * Make functions internal which are supposed to be internal ([893d22d](893d22d)) * Make property private ([51109c4](51109c4)) * Map dependencies from `KClass` into `String` to fix serialization ([57e36ab](57e36ab)) * Only load the keystore once per instantiation ([5993f7e](5993f7e)) * Serialize compatible packages as a map instead of a set of pairs. ([737e272](737e272)) * Sign APKs using `apksig` ([f59ecbc](f59ecbc)) * Sort the version maps by the most common version ([e4be6db](e4be6db)) * Support mounting even when Magisk is not installed ([2a30845](2a30845)) * Use `BKS` instead of default signing provider to fix backwards compatibility ([41805fc](41805fc)) * Use correct function name casing ([ef38d8b](ef38d8b)) * Use the JVM name instead of the value from `KClass#toString` ([d18e436](d18e436)) ### Build System * Refactor to DSL to bump ReVanced Patcher ([7f5d6da](7f5d6da)) ### Features * Add `PatchUtils#getMostCommonCompatibleVersions` utility function ([c5f3536](c5f3536)) * Add initial project structure ([833291d](833291d)) * Add JSON de- and serialization of patches ([ecff6fe](ecff6fe)) * Add local Android installer ([ReVanced#25](https://github.com/brosssh/revanced-library/issues/25)) ([43d655a](43d655a)) * Add utility function around key certificate pairs ([2df3484](2df3484)) * Allow getting most common compatible versions for all packages ([96845ba](96845ba)) * Improve exception message ([b15efa4](b15efa4)) * Improve mount reliability by unmounting existing mounts and killing running apps ([9fda407](9fda407)) * Increase certainty of the possibility to mount ([10f8cd1](10f8cd1)) * Increase default expiration date of certificate ([f2bd3f5](f2bd3f5)) * Increase the key size to 4096 ([892e083](892e083)) * Installing app with ownership enforcement ([bfabb7f](bfabb7f)) * Log warnings when compiling resources ([1dc8e2e](1dc8e2e)) * Mention APK file name when logging aligning ([244ebc2](244ebc2)) * Remove deprecated functions ([b9bf3bc](b9bf3bc)) * Select first Adb device, if none supplied automatically ([1a5f868](1a5f868)) * Simplify signing utility API ([4c6a636](4c6a636)) * Use `apkzlib` instead of own implementations and bump ReVanced Patcher ([3aa6dc2](3aa6dc2)) * Use better log messages when handling exceptions ([5896968](5896968)) * Warn when option could not be set because the option does not exist ([7ec6504](7ec6504)) ### Performance Improvements * Use maps to set options ([13823b7](13823b7)) ### BREAKING CHANGES * Some functions have been removed. * Some functions are not available anymore. * The signature of some functions has changed. * This commit removes deprecated APIs and bumps ReVanced Patcher. Because of it's changes, `apkzlib` is now used instead of own implementations of `ZipFile`


Should solve ReVanced/revanced-cli#267, once ReVanced/revanced-cli#278 is merged