6 Commits

Author SHA1 Message Date
semantic-release-bot
e75f8da85a chore: Release v1.1.0-dev.6 [skip ci]
# [1.1.0-dev.6](https://github.com/ReVanced/revanced-manager-downloaders/compare/v1.1.0-dev.5...v1.1.0-dev.6) (2025-07-04)

### Bug Fixes

* Showing progress if downloading an APK + minor fixes ([d46f002](d46f002aa2))
2025-07-04 16:43:53 +00:00
brosssh
d46f002aa2 fix: Showing progress if downloading an APK + minor fixes 2025-07-04 18:37:26 +02:00
semantic-release-bot
dbc64e583a chore: Release v1.1.0-dev.5 [skip ci]
# [1.1.0-dev.5](https://github.com/ReVanced/revanced-manager-apkmirror-downloader/compare/v1.1.0-dev.4...v1.1.0-dev.5) (2025-07-04)

### Bug Fixes

* Correctly removing bundle attributes from manifest ([6433d98](6433d98495))
2025-07-04 13:11:32 +00:00
brosssh
6433d98495 fix: Correctly removing bundle attributes from manifest 2025-07-04 15:07:24 +02:00
semantic-release-bot
bdd3efef96 chore: Release v1.1.0-dev.4 [skip ci]
# [1.1.0-dev.4](https://github.com/ReVanced/revanced-manager-apkmirror-downloader/compare/v1.1.0-dev.3...v1.1.0-dev.4) (2025-07-03)

### Bug Fixes

* Add gradle sha256 checksum ([f259821](f259821f7c))
2025-07-03 12:48:29 +00:00
brosssh
f259821f7c fix: Add gradle sha256 checksum 2025-07-03 14:44:44 +02:00
13 changed files with 49 additions and 277 deletions

View File

@@ -1,3 +1,24 @@
# [1.1.0-dev.6](https://github.com/ReVanced/revanced-manager-downloaders/compare/v1.1.0-dev.5...v1.1.0-dev.6) (2025-07-04)
### Bug Fixes
* Showing progress if downloading an APK + minor fixes ([d46f002](https://github.com/ReVanced/revanced-manager-downloaders/commit/d46f002aa234135ad54768d0bdf15eb9d17428c0))
# [1.1.0-dev.5](https://github.com/ReVanced/revanced-manager-apkmirror-downloader/compare/v1.1.0-dev.4...v1.1.0-dev.5) (2025-07-04)
### Bug Fixes
* Correctly removing bundle attributes from manifest ([6433d98](https://github.com/ReVanced/revanced-manager-apkmirror-downloader/commit/6433d984950582d36d29ef758325d50016a62ae8))
# [1.1.0-dev.4](https://github.com/ReVanced/revanced-manager-apkmirror-downloader/compare/v1.1.0-dev.3...v1.1.0-dev.4) (2025-07-03)
### Bug Fixes
* Add gradle sha256 checksum ([f259821](https://github.com/ReVanced/revanced-manager-apkmirror-downloader/commit/f259821f7c1075aeca89759cc7d73ae93d91922a))
# [1.1.0-dev.3](https://github.com/ReVanced/revanced-manager-apkmirror-downloader/compare/v1.1.0-dev.2...v1.1.0-dev.3) (2025-07-03) # [1.1.0-dev.3](https://github.com/ReVanced/revanced-manager-apkmirror-downloader/compare/v1.1.0-dev.2...v1.1.0-dev.3) (2025-07-03)

View File

@@ -72,7 +72,7 @@ The collection of ReVanced downloaders.
- The downloader will now be usable. - The downloader will now be usable.
### APMMirror Downloader ### APKMirror Downloader
This downloader will open an [APKMirror](https://www.apkmirror.com/) page where you can download the apk as you would normally do. This downloader will open an [APKMirror](https://www.apkmirror.com/) page where you can download the apk as you would normally do.
If the chosen file is a bundle (.apkm file), the downloader will automatically merge it into a .apk file. If the chosen file is a bundle (.apkm file), the downloader will automatically merge it into a .apk file.
@@ -80,7 +80,7 @@ If the chosen file is a bundle (.apkm file), the downloader will automatically m
When you get prompted, log in to Google with your account. After that, you will be able to download apps from the Play Store. When you get prompted, log in to Google with your account. After that, you will be able to download apps from the Play Store.
> [!WARNING] > [!WARNING]
> Due to technical limitations, it is only possible to download the latest version of the app. If the ReVanced suggested version differs from the latest, the installation will fail. > Due to technical limitations, it is only possible to download the latest version of the app. If the suggested version differs from the latest, the installation will fail.
## 📚 Everything else ## 📚 Everything else

View File

@@ -15,6 +15,7 @@ import kotlinx.parcelize.Parcelize
import java.io.File import java.io.File
import java.net.URI import java.net.URI
import java.nio.file.Files import java.nio.file.Files
import java.util.UUID
import java.util.zip.ZipFile import java.util.zip.ZipFile
import kotlin.io.path.ExperimentalPathApi import kotlin.io.path.ExperimentalPathApi
import kotlin.io.path.deleteRecursively import kotlin.io.path.deleteRecursively
@@ -22,8 +23,7 @@ import kotlin.io.path.outputStream
@Parcelize @Parcelize
class ApkMirrorApp( class ApkMirrorApp(
val downloadUrl: DownloadUrl, val downloadUrl: DownloadUrl
val packageName: String
) : Parcelable ) : Parcelable
private object ArscLogger : APKLogger { private object ArscLogger : APKLogger {
@@ -56,37 +56,33 @@ val ApkMirrorDownloader = Downloader<ApkMirrorApp> {
) )
} }
with(Uri.Builder()) { Uri.Builder()
scheme("https") .scheme("https")
authority("www.apkmirror.com") .authority("www.apkmirror.com")
mapOf( .appendQueryParameter("post_type", "app_release")
"post_type" to "app_release", .appendQueryParameter("searchtype", "apk")
"searchtype" to "apk", .appendQueryParameter("s", version?.let { "$packageName $it" } ?: packageName)
"s" to (version?.let { "$packageName $it" } ?: packageName), .appendQueryParameter("bundles%5B%5D" /* bundles[] */, "apk_files")
"bundles%5B%5D" to "apk_files" // bundles[] .toString()
).forEach { (key, value) -> }
appendQueryParameter(key, value)
}
build().toString()
}
},
packageName = packageName
) to version ) to version
} }
download { app, outputStream -> download { app, outputStream ->
val workingDir = Files.createTempDirectory("apkmirror_dl") val workingDir = Files.createTempDirectory("apkmirror_dl")
val downloadedFile = workingDir.resolve("${app.packageName}.apk").also {
it.outputStream().use { output ->
app.downloadUrl.toDownloadResult().first.copyTo(output)
}
}
try { try {
if (URI(app.downloadUrl.url).path.substringAfterLast('/').endsWith(".apk")) { if (URI(app.downloadUrl.url).path.substringAfterLast('/').endsWith(".apk")) {
Files.copy(downloadedFile, outputStream) val (inputStream, size) = app.downloadUrl.toDownloadResult()
inputStream.use {
if (size != null) reportSize(size)
it.copyTo(outputStream)
}
} else { } else {
val downloadedFile = workingDir.resolve(UUID.randomUUID().toString()).also {
it.outputStream().use { output ->
app.downloadUrl.toDownloadResult().first.copyTo(output)
}
}
val xapkWorkingDir = workingDir.resolve("xapk").also { it.toFile().mkdirs() } val xapkWorkingDir = workingDir.resolve("xapk").also { it.toFile().mkdirs() }
ZipFile(downloadedFile.toString()).use { zip -> ZipFile(downloadedFile.toString()).use { zip ->

View File

@@ -21,4 +21,4 @@ kotlin.code.style = official
# resources declared in the library itself and none from the library's dependencies, # resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library # thereby reducing the size of the R class for that library
android.nonTransitiveRClass = true android.nonTransitiveRClass = true
version = 1.1.0-dev.3 version = 1.1.0-dev.6

View File

@@ -2,5 +2,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@@ -35,7 +35,9 @@ class Merger {
arrayOf( arrayOf(
AndroidManifest.NAME_requiredSplitTypes, AndroidManifest.NAME_requiredSplitTypes,
AndroidManifest.NAME_splitTypes AndroidManifest.NAME_splitTypes
).forEach(manifestElement::removeAttributesWithName) ).forEach {
manifestElement.removeAttributeIf{ attribute -> attribute.name == it }
}
val pattern = "^com\\.android\\.(stamp|vending)\\.".toRegex() val pattern = "^com\\.android\\.(stamp|vending)\\.".toRegex()
applicationElement.removeElementsIf { element -> applicationElement.removeElementsIf { element ->

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-feature android:name="app.revanced.manager.plugin.downloader" />
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
tools:targetApi="35">
<meta-data
android:name="app.revanced.manager.plugin.downloader.class"
android:value="app.revanced.manager.plugin.downloader.apkmirror.APKMirrorDownloaderKt" />
</application>
</manifest>

View File

@@ -1,17 +0,0 @@
@file:Suppress("Unused")
package app.revanced.manager.plugin.downloader.apkmirror
import android.net.Uri
import app.revanced.manager.plugin.downloader.webview.WebViewDownloader
val apkMirrorDownloader = WebViewDownloader { packageName, version ->
Uri.Builder()
.scheme("https")
.authority("www.apkmirror.com")
.appendQueryParameter("post_type", "app_release")
.appendQueryParameter("searchtype", "apk")
.appendQueryParameter("s", version?.let { "$packageName $it" } ?: packageName)
.appendQueryParameter("bundles%5B%5D" /* bundles[] */, "apk_files")
.toString()
}

View File

@@ -1,170 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

View File

@@ -1,30 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">ReVanced Manager: APKMirror downloader</string>
</resources>