Compare commits

..

8 Commits

Author SHA1 Message Date
semantic-release-bot
7cc6b88e4e chore(release): 1.19.3-dev.1 [skip ci]
## [1.19.3-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.19.2...v1.19.3-dev.1) (2024-03-09)

### Bug Fixes

* Copy APK to working directory before trying to write to it ([5cd1cba](5cd1cba668))
2024-03-09 09:09:02 +00:00
oSumAtrIX
5cd1cba668 fix: Copy APK to working directory before trying to write to it 2024-03-09 10:01:36 +01:00
oSumAtrIX
ca365bac6e build: Bump dependencies to fix generating keystore 2024-03-09 09:58:41 +01:00
semantic-release-bot
f1fc48ce5a chore(release): 1.19.2 [skip ci]
## [1.19.2](https://github.com/ReVanced/revanced-manager/compare/v1.19.1...v1.19.2) (2024-03-09)

### Bug Fixes

* App list is empty if all apps are installed ([#1750](https://github.com/ReVanced/revanced-manager/issues/1750)) ([1f5461f](1f5461fbe5))
* Fix white-screen when trying to install conflicting apps ([4acd738](4acd738353))
2024-03-09 03:55:35 +00:00
oSumAtrIX
316e440d0d chore: Merge branch dev to main (#1739) 2024-03-09 04:48:12 +01:00
oSumAtrIX
95018814a7 ci: Bump dependencies to fix release workflow 2024-03-09 04:44:38 +01:00
oSumAtrIX
b52e49d90a build: Bump dependencies to fix signing issues 2024-03-09 04:39:58 +01:00
oSumAtrIX
4acd738353 fix: Fix white-screen when trying to install conflicting apps
When you tried to install a patched app, but it conflicted with an existing installation, the screen would go blank. This was caused by trying to use an argument on a translation with no arguments.
2024-03-09 04:39:58 +01:00
6 changed files with 33 additions and 29 deletions

View File

@@ -113,9 +113,8 @@ flutter {
} }
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.22" implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.22")
// ReVanced implementation("app.revanced:revanced-patcher:19.3.1")
implementation "app.revanced:revanced-patcher:19.3.1" implementation("app.revanced:revanced-library:2.2.1")
implementation "app.revanced:revanced-library:2.1.0"
} }

View File

@@ -9,7 +9,6 @@ import android.os.Handler
import android.os.Looper import android.os.Looper
import app.revanced.library.ApkUtils import app.revanced.library.ApkUtils
import app.revanced.library.ApkUtils.applyTo import app.revanced.library.ApkUtils.applyTo
import app.revanced.library.ApkUtils.sign
import app.revanced.manager.flutter.utils.Aapt import app.revanced.manager.flutter.utils.Aapt
import app.revanced.manager.flutter.utils.packageInstaller.InstallerReceiver import app.revanced.manager.flutter.utils.packageInstaller.InstallerReceiver
import app.revanced.manager.flutter.utils.packageInstaller.UninstallerReceiver import app.revanced.manager.flutter.utils.packageInstaller.UninstallerReceiver
@@ -339,16 +338,15 @@ class MainActivity : FlutterActivity() {
patcher.get() patcher.get()
} }
inFile.copyTo(outFile) if (cancel(patcher::close)) return@Thread
patcherResult.applyTo(inFile)
if (cancel(patcher::close)) return@Thread if (cancel(patcher::close)) return@Thread
patcherResult.applyTo(outFile) ApkUtils.sign(
inFile,
if (cancel(patcher::close)) return@Thread outFile,
updateProgress(0.8, "Signing...", "")
outFile.sign(
ApkUtils.SigningOptions( ApkUtils.SigningOptions(
keyStoreFile, keyStoreFile,
keystorePassword, keystorePassword,

View File

@@ -171,7 +171,10 @@ class PatcherAPI {
if (integrationsFile != null) { if (integrationsFile != null) {
_dataDir.createSync(); _dataDir.createSync();
_tmpDir.createSync(); _tmpDir.createSync();
final Directory workDir = _tmpDir.createTempSync('tmp-'); final Directory workDir = await _tmpDir.createTemp('tmp-');
final File inApkFile = File('${workDir.path}/in.apk');
await File(apkFilePath).copy(inApkFile.path);
outFile = File('${workDir.path}/out.apk'); outFile = File('${workDir.path}/out.apk');
@@ -182,7 +185,7 @@ class PatcherAPI {
await patcherChannel.invokeMethod( await patcherChannel.invokeMethod(
'runPatcher', 'runPatcher',
{ {
'inFilePath': apkFilePath, 'inFilePath': inApkFile.path,
'outFilePath': outFile!.path, 'outFilePath': outFile!.path,
'integrationsPath': integrationsFile.path, 'integrationsPath': integrationsFile.path,
'selectedPatches': selectedPatches.map((p) => p.name).toList(), 'selectedPatches': selectedPatches.map((p) => p.name).toList(),
@@ -297,6 +300,18 @@ class PatcherAPI {
); );
bool cleanInstall = false; bool cleanInstall = false;
final bool isFixable = statusCode == 4 || statusCode == 5; final bool isFixable = statusCode == 4 || statusCode == 5;
var description = t['installErrorDialog.${statusValue}_description'];
if (statusCode == 2) {
description = description(
packageName: statusCode == 2
? {
'packageName': status['otherPackageName'],
}
: null,
);
}
await showDialog( await showDialog(
context: _managerAPI.ctx!, context: _managerAPI.ctx!,
builder: (context) => AlertDialog( builder: (context) => AlertDialog(
@@ -306,15 +321,7 @@ class PatcherAPI {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text( Text(description),
t['installErrorDialog.${statusValue}_description'](
packageName: statusCode == 2
? {
'packageName': status['otherPackageName'],
}
: null,
),
),
], ],
), ),
actions: (status == null) actions: (status == null)

8
package-lock.json generated
View File

@@ -5,7 +5,7 @@
"packages": { "packages": {
"": { "": {
"devDependencies": { "devDependencies": {
"@droidsolutions-oss/semantic-release-update-file": "^1.3.2", "@droidsolutions-oss/semantic-release-update-file": "^1.4.0-beta.1",
"@saithodev/semantic-release-backmerge": "^4.0.1", "@saithodev/semantic-release-backmerge": "^4.0.1",
"@semantic-release/changelog": "^6.0.3", "@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3", "@semantic-release/exec": "^6.0.3",
@@ -60,9 +60,9 @@
} }
}, },
"node_modules/@droidsolutions-oss/semantic-release-update-file": { "node_modules/@droidsolutions-oss/semantic-release-update-file": {
"version": "1.3.2", "version": "1.4.0-beta.1",
"resolved": "https://registry.npmjs.org/@droidsolutions-oss/semantic-release-update-file/-/semantic-release-update-file-1.3.2.tgz", "resolved": "https://registry.npmjs.org/@droidsolutions-oss/semantic-release-update-file/-/semantic-release-update-file-1.4.0-beta.1.tgz",
"integrity": "sha512-ahV0OWiEUf20e7lLH3gnBLF1SfRNPN99MeaLVaFX6jT3DegTLzkVPeY2CZWa+K4tAXBALc29Bq/kzjv8PAXFGw==", "integrity": "sha512-CdqG3vIceWFBmwz0qcY0NdqaE+TGNuhhbgFXHIj/M1fYAD1lQ4QyGEaoD3d4F4ZHYsBqR0HrHNMTG4bycBRKNw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"aggregate-error": "^3.1.0", "aggregate-error": "^3.1.0",

View File

@@ -1,6 +1,6 @@
{ {
"devDependencies": { "devDependencies": {
"@droidsolutions-oss/semantic-release-update-file": "^1.3.2", "@droidsolutions-oss/semantic-release-update-file": "^1.4.0-beta.1",
"@saithodev/semantic-release-backmerge": "^4.0.1", "@saithodev/semantic-release-backmerge": "^4.0.1",
"@semantic-release/changelog": "^6.0.3", "@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3", "@semantic-release/exec": "^6.0.3",

View File

@@ -4,7 +4,7 @@ homepage: https://github.com/ReVanced/revanced-manager
publish_to: 'none' publish_to: 'none'
version: 1.19.2-dev.1+101800003 version: 1.19.3-dev.1+101800005
environment: environment:
sdk: '>=3.0.0 <4.0.0' sdk: '>=3.0.0 <4.0.0'