Compare commits
10
Commits
v1.6
...
4787302f25
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4787302f25
|
||
|
|
0ec26cac29
|
||
|
|
e9dfbce049
|
||
|
|
ccb2af558b
|
||
|
|
d0817240ec
|
||
|
|
b1abee3579
|
||
|
|
148b494926
|
||
|
|
cdba2582fa
|
||
|
|
3068939d93
|
||
|
|
dc6f72bcc5
|
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "isodrive"]
|
||||||
|
path = isodrive
|
||||||
|
url = https://git.shihaam.dev/shihaam/isodrive
|
||||||
Generated
-8
@@ -4,14 +4,6 @@
|
|||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
<DropdownSelection timestamp="2026-03-12T19:54:01.237140412Z">
|
|
||||||
<Target type="DEFAULT_BOOT">
|
|
||||||
<handle>
|
|
||||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=a703e092" />
|
|
||||||
</handle>
|
|
||||||
</Target>
|
|
||||||
</DropdownSelection>
|
|
||||||
<DialogSelection />
|
|
||||||
</SelectionState>
|
</SelectionState>
|
||||||
</selectionStates>
|
</selectionStates>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
Generated
+1
@@ -2,5 +2,6 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/isodrive" vcs="Git" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.7] - 2026-03-13
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Always use app-bundled isodrive binary instead of system binary
|
||||||
|
- Prep for edge-to-edge compatibility
|
||||||
|
|
||||||
## [1.6] - 2026-03-13
|
## [1.6] - 2026-03-13
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -32,8 +32,9 @@ Android app for mounting ISO/IMG files as USB mass storage or CD-ROM devices on
|
|||||||
|
|
||||||
## Download
|
## Download
|
||||||
|
|
||||||
- **F-Droid**: *Coming soon*
|
| F-Droid | Gitea Releases |
|
||||||
- **Gitea Releases**: [Download latest APK](https://git.sargit.com/sargit/ISODroid/releases)
|
|:--:|:--:|
|
||||||
|
| [](https://f-droid.org/en/packages/sh.sar.isodroid) | [Download latest APK](https://git.shihaam.dev/shihaam/ISODroid/releases) |
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -42,8 +43,6 @@ Android app for mounting ISO/IMG files as USB mass storage or CD-ROM devices on
|
|||||||
3. Grant root access when prompted
|
3. Grant root access when prompted
|
||||||
4. Place your ISO/IMG files in `/sdcard/isodroid/` (or configure a different directory in settings)
|
4. Place your ISO/IMG files in `/sdcard/isodroid/` (or configure a different directory in settings)
|
||||||
|
|
||||||
> **Note**: The app includes a bundled `isodrive` binary. No additional setup required!
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
1. Open ISO Droid
|
1. Open ISO Droid
|
||||||
@@ -64,11 +63,19 @@ Android app for mounting ISO/IMG files as USB mass storage or CD-ROM devices on
|
|||||||
|
|
||||||
- **[Building & Technical Details](docs/BUILDING.md)** - How to build from source, architecture overview, and technical documentation
|
- **[Building & Technical Details](docs/BUILDING.md)** - How to build from source, architecture overview, and technical documentation
|
||||||
|
|
||||||
## Credits
|
## Credits & Inspiration
|
||||||
|
|
||||||
|
Around 2014/2015 I rooted my first phone and went down the rabbit hole of what you could do with a rooted Android.
|
||||||
|
That's when I found [DriveDroid](https://softwarebakery.com/projects/drivedroid) ([archive](https://web.archive.org/web/20160901000000*/https://softwarebakery.com/projects/drivedroid)) by Software Bakery. Teenage me thought it was the coolest thing ever.
|
||||||
|
fastforwrd few years: DriveDroid stopped being maintained, 404 on playstore, and even if you find apk floating around ([Kali NetHunter](https://store.nethunter.com/packages/com.softwarebakery.drivedroid/) keeps one) it does not work on modern Android. I've wanted something like it for years.
|
||||||
|
Then I found [isodrive](https://github.com/nitanmarcel/isodrive) by nitanmarcel ([mirror](https://git.shihaam.dev/shihaam/isodrive)). Tried it. It worked. So here we are. ISO Droid is basically me chasing that teenage nostalgia and trying to make something simple that just works.
|
||||||
|
The name comes from **Drive**Droid + **iso**drive = **ISO Droid**. Not very creative, but it fits.
|
||||||
|
|
||||||
|
Special thanks to:
|
||||||
- [isodrive](https://github.com/nitanmarcel/isodrive) by nitanmarcel - The CLI tool that powers ISO Droid
|
- [isodrive](https://github.com/nitanmarcel/isodrive) by nitanmarcel - The CLI tool that powers ISO Droid
|
||||||
- [ISODriveUT](https://github.com/fredldotme/ISODriveUT) by fredldotme - Original inspiration for isodrive
|
- [ISODriveUT](https://github.com/fredldotme/ISODriveUT) by fredldotme - Original inspiration for isodrive
|
||||||
- OS icons from [Simple Icons](https://simpleicons.org/) and [SVG Repo](https://www.svgrepo.com/)
|
- [DriveDroid](https://softwarebakery.com/projects/drivedroid) by Software Bakery - where it all started
|
||||||
|
- [Simple Icons](https://simpleicons.org/) and [SVG Repo](https://www.svgrepo.com/) for OS icons
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
+120
-2
@@ -1,9 +1,127 @@
|
|||||||
|
import javax.inject.Inject
|
||||||
|
import org.gradle.process.ExecOperations
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
alias(libs.plugins.kotlin.android)
|
alias(libs.plugins.kotlin.android)
|
||||||
alias(libs.plugins.kotlin.compose)
|
alias(libs.plugins.kotlin.compose)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Build isodrive native binary from submodule (only if binaries are missing)
|
||||||
|
abstract class BuildIsodriveTask @Inject constructor(
|
||||||
|
private val execOps: ExecOperations
|
||||||
|
) : DefaultTask() {
|
||||||
|
|
||||||
|
@get:InputDirectory
|
||||||
|
abstract val isodriveDir: DirectoryProperty
|
||||||
|
|
||||||
|
@get:OutputDirectory
|
||||||
|
abstract val outputDir: DirectoryProperty
|
||||||
|
|
||||||
|
@TaskAction
|
||||||
|
fun build() {
|
||||||
|
val isodrivePath = isodriveDir.get().asFile
|
||||||
|
val outputPath = outputDir.get().asFile
|
||||||
|
|
||||||
|
if (!isodrivePath.resolve("src").exists()) {
|
||||||
|
throw GradleException("isodrive submodule not initialized. Run: git submodule update --init")
|
||||||
|
}
|
||||||
|
|
||||||
|
val sourceFiles = listOf(
|
||||||
|
"src/util.cpp",
|
||||||
|
"src/configfsisomanager.cpp",
|
||||||
|
"src/androidusbisomanager.cpp",
|
||||||
|
"src/main.cpp"
|
||||||
|
)
|
||||||
|
val srcs = sourceFiles.joinToString(" ") { "$isodrivePath/$it" }
|
||||||
|
val cflags = "-I$isodrivePath/src/include -static-libstdc++ -Os -s"
|
||||||
|
|
||||||
|
val compilers = mapOf(
|
||||||
|
"arm64-v8a" to "aarch64-linux-android26-clang++",
|
||||||
|
"armeabi-v7a" to "armv7a-linux-androideabi26-clang++",
|
||||||
|
"x86_64" to "x86_64-linux-android26-clang++",
|
||||||
|
"x86" to "i686-linux-android26-clang++"
|
||||||
|
)
|
||||||
|
|
||||||
|
val useNixShell = File("/etc/NIXOS").exists() ||
|
||||||
|
Runtime.getRuntime().exec(arrayOf("which", "nix-shell")).waitFor() == 0
|
||||||
|
|
||||||
|
if (useNixShell) {
|
||||||
|
println("NixOS detected, using nix-shell for NDK...")
|
||||||
|
|
||||||
|
val buildScript = compilers.entries.joinToString("\n") { (arch, compiler) ->
|
||||||
|
val archDir = outputPath.resolve(arch)
|
||||||
|
val output = archDir.resolve("isodrive")
|
||||||
|
if (output.exists()) {
|
||||||
|
"echo 'isodrive for $arch already exists, skipping'"
|
||||||
|
} else {
|
||||||
|
"""
|
||||||
|
mkdir -p "$archDir"
|
||||||
|
echo "Building isodrive for $arch..."
|
||||||
|
"${'$'}TOOLCHAIN/$compiler" $cflags $srcs -o "$output"
|
||||||
|
""".trimIndent()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
execOps.exec {
|
||||||
|
environment("NIXPKGS_ALLOW_UNFREE", "1")
|
||||||
|
commandLine("nix-shell", "-p", "androidenv.androidPkgs.ndk-bundle", "--run", """
|
||||||
|
SDK_ROOT=${'$'}(find /nix/store -maxdepth 1 -name "*android-sdk-ndk*" -type d 2>/dev/null | head -1)
|
||||||
|
NDK=${'$'}(ls -d "${'$'}SDK_ROOT/libexec/android-sdk/ndk/"* | head -1)
|
||||||
|
TOOLCHAIN="${'$'}NDK/toolchains/llvm/prebuilt/linux-x86_64/bin"
|
||||||
|
echo "Using NDK: ${'$'}NDK"
|
||||||
|
$buildScript
|
||||||
|
echo "Done building isodrive"
|
||||||
|
""".trimIndent())
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
val ndkDir = listOfNotNull(
|
||||||
|
System.getenv("ANDROID_NDK_HOME"),
|
||||||
|
System.getenv("ANDROID_NDK")
|
||||||
|
).firstOrNull { File(it).exists() }
|
||||||
|
?: throw GradleException("Android NDK not found. Set ANDROID_NDK_HOME or install NDK via SDK Manager.")
|
||||||
|
|
||||||
|
val toolchain = "$ndkDir/toolchains/llvm/prebuilt/linux-x86_64/bin"
|
||||||
|
if (!File(toolchain).exists()) {
|
||||||
|
throw GradleException("NDK toolchain not found at: $toolchain")
|
||||||
|
}
|
||||||
|
|
||||||
|
compilers.forEach { (arch, compiler) ->
|
||||||
|
val archDir = outputPath.resolve(arch)
|
||||||
|
val output = archDir.resolve("isodrive")
|
||||||
|
|
||||||
|
if (output.exists()) {
|
||||||
|
println("isodrive for $arch already exists, skipping")
|
||||||
|
return@forEach
|
||||||
|
}
|
||||||
|
|
||||||
|
archDir.mkdirs()
|
||||||
|
println("Building isodrive for $arch...")
|
||||||
|
execOps.exec {
|
||||||
|
commandLine("sh", "-c", "$toolchain/$compiler $cflags $srcs -o $output")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
println("Done building isodrive")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val buildIsodrive by tasks.registering(BuildIsodriveTask::class) {
|
||||||
|
group = "native"
|
||||||
|
description = "Build isodrive binary for all Android architectures"
|
||||||
|
|
||||||
|
isodriveDir.set(rootProject.file("isodrive"))
|
||||||
|
outputDir.set(file("src/main/assets/bin"))
|
||||||
|
|
||||||
|
val architectures = listOf("arm64-v8a", "armeabi-v7a", "x86_64", "x86")
|
||||||
|
val outDir = file("src/main/assets/bin")
|
||||||
|
onlyIf { !architectures.all { arch -> outDir.resolve("$arch/isodrive").exists() } }
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.matching { it.name.startsWith("merge") && it.name.endsWith("Assets") }.configureEach {
|
||||||
|
dependsOn(buildIsodrive)
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "sh.sar.isodroid"
|
namespace = "sh.sar.isodroid"
|
||||||
compileSdk = 36
|
compileSdk = 36
|
||||||
@@ -12,8 +130,8 @@ android {
|
|||||||
applicationId = "sh.sar.isodroid"
|
applicationId = "sh.sar.isodroid"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 6
|
versionCode = 7
|
||||||
versionName = "1.6"
|
versionName = "1.7"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,42 +58,14 @@ class IsoDriveManager(private val context: Context) {
|
|||||||
binaryPath = targetFile.absolutePath
|
binaryPath = targetFile.absolutePath
|
||||||
true
|
true
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
// Binary not bundled yet, will use system isodrive if available
|
// Binary extraction failed
|
||||||
checkSystemBinary()
|
false
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun checkSystemBinary(): Boolean = withContext(Dispatchers.IO) {
|
|
||||||
// Check common locations first (more reliable than 'which')
|
|
||||||
val commonPaths = listOf(
|
|
||||||
"/data/adb/modules/isodrive-magisk/system/bin/isodrive",
|
|
||||||
"/data/adb/modules/isodrive/system/bin/isodrive",
|
|
||||||
"/system/bin/isodrive",
|
|
||||||
"/system/xbin/isodrive",
|
|
||||||
"/data/local/tmp/isodrive",
|
|
||||||
"/vendor/bin/isodrive"
|
|
||||||
)
|
|
||||||
for (path in commonPaths) {
|
|
||||||
val checkResult = RootManager.executeCommand("test -f $path && echo exists")
|
|
||||||
if (checkResult.success && checkResult.output.contains("exists")) {
|
|
||||||
binaryPath = path
|
|
||||||
return@withContext true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Try 'which' as fallback
|
|
||||||
val result = RootManager.executeCommand("which isodrive 2>/dev/null")
|
|
||||||
if (result.success && result.output.isNotBlank()) {
|
|
||||||
binaryPath = result.output.trim()
|
|
||||||
return@withContext true
|
|
||||||
}
|
|
||||||
|
|
||||||
false
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun isSupported(): SupportStatus = withContext(Dispatchers.IO) {
|
suspend fun isSupported(): SupportStatus = withContext(Dispatchers.IO) {
|
||||||
// First check if binary is available
|
// First check if binary is available
|
||||||
if (binaryPath == null && !extractBinary()) {
|
if (binaryPath == null && !extractBinary()) {
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import androidx.compose.foundation.clickable
|
|||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
|
import androidx.compose.foundation.layout.WindowInsets
|
||||||
|
import androidx.compose.foundation.layout.navigationBarsPadding
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
@@ -22,8 +24,8 @@ import androidx.compose.foundation.rememberScrollState
|
|||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||||
|
import androidx.compose.material.icons.automirrored.filled.OpenInNew
|
||||||
import androidx.compose.material.icons.filled.Download
|
import androidx.compose.material.icons.filled.Download
|
||||||
import androidx.compose.material.icons.filled.OpenInNew
|
|
||||||
import androidx.compose.material3.Card
|
import androidx.compose.material3.Card
|
||||||
import androidx.compose.material3.CardDefaults
|
import androidx.compose.material3.CardDefaults
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
@@ -68,9 +70,9 @@ private fun loadOsDownloads(context: Context): List<OsDownload> {
|
|||||||
OsDownload(
|
OsDownload(
|
||||||
name = obj.getString("name"),
|
name = obj.getString("name"),
|
||||||
category = obj.getString("category"),
|
category = obj.getString("category"),
|
||||||
subcategory = if (obj.isNull("subcategory")) null else obj.optString("subcategory", null),
|
subcategory = if (obj.isNull("subcategory")) null else obj.optString("subcategory"),
|
||||||
description = obj.optString("description", ""),
|
description = obj.optString("description", ""),
|
||||||
icon = if (obj.isNull("icon")) null else obj.optString("icon", null),
|
icon = if (obj.isNull("icon")) null else obj.optString("icon"),
|
||||||
url = obj.getString("url")
|
url = obj.getString("url")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -101,6 +103,7 @@ fun DownloadsScreen(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Scaffold(
|
Scaffold(
|
||||||
|
contentWindowInsets = WindowInsets(0),
|
||||||
topBar = {
|
topBar = {
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = { Text("Download ISOs") },
|
title = { Text("Download ISOs") },
|
||||||
@@ -124,6 +127,7 @@ fun DownloadsScreen(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(paddingValues)
|
.padding(paddingValues)
|
||||||
|
.navigationBarsPadding()
|
||||||
.verticalScroll(rememberScrollState())
|
.verticalScroll(rememberScrollState())
|
||||||
) {
|
) {
|
||||||
groupedDownloads.forEach { (category, osList) ->
|
groupedDownloads.forEach { (category, osList) ->
|
||||||
@@ -280,7 +284,7 @@ private fun DownloadItem(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.OpenInNew,
|
imageVector = Icons.AutoMirrored.Filled.OpenInNew,
|
||||||
contentDescription = "Open in browser",
|
contentDescription = "Open in browser",
|
||||||
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
modifier = Modifier.size(20.dp)
|
modifier = Modifier.size(20.dp)
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import androidx.compose.foundation.layout.Box
|
|||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.PaddingValues
|
import androidx.compose.foundation.layout.PaddingValues
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
|
import androidx.compose.foundation.layout.WindowInsets
|
||||||
|
import androidx.compose.foundation.layout.navigationBarsPadding
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
@@ -141,6 +143,7 @@ fun MainScreen(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Scaffold(
|
Scaffold(
|
||||||
|
contentWindowInsets = WindowInsets(0),
|
||||||
topBar = {
|
topBar = {
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = { Text("ISO Droid") },
|
title = { Text("ISO Droid") },
|
||||||
@@ -204,6 +207,7 @@ fun MainScreen(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(paddingValues)
|
.padding(paddingValues)
|
||||||
|
.navigationBarsPadding()
|
||||||
.nestedScroll(pullToRefreshState.nestedScrollConnection)
|
.nestedScroll(pullToRefreshState.nestedScrollConnection)
|
||||||
) {
|
) {
|
||||||
if (uiState.isLoading && !pullToRefreshState.isRefreshing) {
|
if (uiState.isLoading && !pullToRefreshState.isRefreshing) {
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import androidx.compose.foundation.layout.Box
|
|||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
|
import androidx.compose.foundation.layout.WindowInsets
|
||||||
|
import androidx.compose.foundation.layout.navigationBarsPadding
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
@@ -151,6 +153,7 @@ fun SettingsScreen(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Scaffold(
|
Scaffold(
|
||||||
|
contentWindowInsets = WindowInsets(0),
|
||||||
topBar = {
|
topBar = {
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = { Text("Settings") },
|
title = { Text("Settings") },
|
||||||
@@ -174,6 +177,7 @@ fun SettingsScreen(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(paddingValues)
|
.padding(paddingValues)
|
||||||
|
.navigationBarsPadding()
|
||||||
.verticalScroll(rememberScrollState())
|
.verticalScroll(rememberScrollState())
|
||||||
) {
|
) {
|
||||||
// Storage section
|
// Storage section
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
package sh.sar.isodroid.ui.theme
|
package sh.sar.isodroid.ui.theme
|
||||||
|
|
||||||
import android.app.Activity
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import androidx.compose.foundation.isSystemInDarkTheme
|
import androidx.compose.foundation.isSystemInDarkTheme
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
@@ -14,11 +13,7 @@ import androidx.compose.material3.dynamicDarkColorScheme
|
|||||||
import androidx.compose.material3.dynamicLightColorScheme
|
import androidx.compose.material3.dynamicLightColorScheme
|
||||||
import androidx.compose.material3.lightColorScheme
|
import androidx.compose.material3.lightColorScheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.SideEffect
|
|
||||||
import androidx.compose.ui.graphics.toArgb
|
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.platform.LocalView
|
|
||||||
import androidx.core.view.WindowCompat
|
|
||||||
|
|
||||||
private val DarkColorScheme = darkColorScheme(
|
private val DarkColorScheme = darkColorScheme(
|
||||||
primary = Purple80,
|
primary = Purple80,
|
||||||
@@ -47,15 +42,6 @@ fun ISODroidTheme(
|
|||||||
else -> LightColorScheme
|
else -> LightColorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
val view = LocalView.current
|
|
||||||
if (!view.isInEditMode) {
|
|
||||||
SideEffect {
|
|
||||||
val window = (view.context as Activity).window
|
|
||||||
window.statusBarColor = android.graphics.Color.TRANSPARENT
|
|
||||||
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MaterialTheme(
|
MaterialTheme(
|
||||||
colorScheme = colorScheme,
|
colorScheme = colorScheme,
|
||||||
typography = Typography,
|
typography = Typography,
|
||||||
|
|||||||
@@ -1,77 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# Build isodrive from source for all Android architectures
|
|
||||||
# Requires: Android NDK (or runs via nix-shell on NixOS)
|
|
||||||
|
|
||||||
SCRIPT_DIR=$(dirname "$(realpath "$0")")
|
|
||||||
ISODRIVE_DIR="/tmp/isodrive"
|
|
||||||
OUTPUT_DIR="$SCRIPT_DIR/app/src/main/assets/bin"
|
|
||||||
|
|
||||||
# Clone isodrive source
|
|
||||||
if [[ -d "$ISODRIVE_DIR" ]]; then
|
|
||||||
echo "Updating isodrive source..."
|
|
||||||
git -C "$ISODRIVE_DIR" pull
|
|
||||||
else
|
|
||||||
echo "Cloning isodrive..."
|
|
||||||
git clone --depth 1 https://github.com/nitanmarcel/isodrive "$ISODRIVE_DIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCS="$ISODRIVE_DIR/src/util.cpp $ISODRIVE_DIR/src/configfsisomanager.cpp $ISODRIVE_DIR/src/androidusbisomanager.cpp $ISODRIVE_DIR/src/main.cpp"
|
|
||||||
CFLAGS="-I$ISODRIVE_DIR/src/include -static-libstdc++ -Os -s"
|
|
||||||
|
|
||||||
build_all() {
|
|
||||||
local NDK="$1"
|
|
||||||
local TOOLCHAIN="$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin"
|
|
||||||
|
|
||||||
echo "Building arm64-v8a..."
|
|
||||||
"$TOOLCHAIN/aarch64-linux-android26-clang++" $CFLAGS $SRCS -o "$OUTPUT_DIR/arm64-v8a/isodrive"
|
|
||||||
|
|
||||||
echo "Building armeabi-v7a..."
|
|
||||||
"$TOOLCHAIN/armv7a-linux-androideabi26-clang++" $CFLAGS $SRCS -o "$OUTPUT_DIR/armeabi-v7a/isodrive"
|
|
||||||
|
|
||||||
echo "Building x86_64..."
|
|
||||||
"$TOOLCHAIN/x86_64-linux-android26-clang++" $CFLAGS $SRCS -o "$OUTPUT_DIR/x86_64/isodrive"
|
|
||||||
|
|
||||||
echo "Building x86..."
|
|
||||||
"$TOOLCHAIN/i686-linux-android26-clang++" $CFLAGS $SRCS -o "$OUTPUT_DIR/x86/isodrive"
|
|
||||||
|
|
||||||
echo "Done! Built isodrive for all architectures."
|
|
||||||
ls -la "$OUTPUT_DIR"/*/isodrive
|
|
||||||
}
|
|
||||||
|
|
||||||
# On NixOS, prefer nix-shell (local Android SDK has /bin/bash issues)
|
|
||||||
if command -v nix-shell &>/dev/null; then
|
|
||||||
echo "Using nix-shell to get Android NDK..."
|
|
||||||
export SRCS CFLAGS OUTPUT_DIR
|
|
||||||
NIXPKGS_ALLOW_UNFREE=1 nix-shell -p androidenv.androidPkgs.ndk-bundle --run '
|
|
||||||
SDK_ROOT=$(find /nix/store -maxdepth 1 -name "*android-sdk-ndk*" -type d 2>/dev/null | head -1)
|
|
||||||
NDK=$(ls -d "$SDK_ROOT/libexec/android-sdk/ndk/"* | head -1)
|
|
||||||
TOOLCHAIN="$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin"
|
|
||||||
|
|
||||||
echo "Using NDK: $NDK"
|
|
||||||
|
|
||||||
echo "Building arm64-v8a..."
|
|
||||||
"$TOOLCHAIN/aarch64-linux-android26-clang++" $CFLAGS $SRCS -o "$OUTPUT_DIR/arm64-v8a/isodrive"
|
|
||||||
|
|
||||||
echo "Building armeabi-v7a..."
|
|
||||||
"$TOOLCHAIN/armv7a-linux-androideabi26-clang++" $CFLAGS $SRCS -o "$OUTPUT_DIR/armeabi-v7a/isodrive"
|
|
||||||
|
|
||||||
echo "Building x86_64..."
|
|
||||||
"$TOOLCHAIN/x86_64-linux-android26-clang++" $CFLAGS $SRCS -o "$OUTPUT_DIR/x86_64/isodrive"
|
|
||||||
|
|
||||||
echo "Building x86..."
|
|
||||||
"$TOOLCHAIN/i686-linux-android26-clang++" $CFLAGS $SRCS -o "$OUTPUT_DIR/x86/isodrive"
|
|
||||||
|
|
||||||
echo "Done!"
|
|
||||||
ls -la "$OUTPUT_DIR"/*/isodrive
|
|
||||||
'
|
|
||||||
elif [[ -n "${ANDROID_NDK_HOME:-}" ]]; then
|
|
||||||
build_all "$ANDROID_NDK_HOME"
|
|
||||||
elif [[ -n "${ANDROID_NDK:-}" ]]; then
|
|
||||||
build_all "$ANDROID_NDK"
|
|
||||||
else
|
|
||||||
echo "Error: Android NDK not found."
|
|
||||||
echo "Set ANDROID_NDK_HOME or ANDROID_NDK, or install nix-shell."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
+58
-128
@@ -1,53 +1,50 @@
|
|||||||
# Building ISO Droid
|
# Building ISO Droid
|
||||||
|
|
||||||
This document explains how to build ISO Droid from source and contribute to the project.
|
This document explains how to build ISO Droid from source.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- **Android Studio** (or command-line Gradle)
|
||||||
|
- **Android SDK** (API 26+)
|
||||||
|
- **Android NDK** (for compiling isodrive binary)
|
||||||
|
- **Git** (with submodule support)
|
||||||
|
|
||||||
## Building from Source
|
## Building from Source
|
||||||
|
|
||||||
### Prerequisites
|
### 1. Clone with Submodules
|
||||||
|
|
||||||
**1. isodrive Binary (Required)**
|
ISO Droid uses [isodrive](https://git.shihaam.dev/shihaam/isodrive) as a git submodule. Clone with submodules:
|
||||||
|
|
||||||
ISO Droid requires the `isodrive` binary to function. This binary is the actual tool that communicates with the Linux kernel's USB gadget subsystem to mount ISO/IMG files.
|
|
||||||
|
|
||||||
- **Source**: The binary is compiled from [nitanmarcel/isodrive](https://github.com/nitanmarcel/isodrive)
|
|
||||||
- **Why required**: Android apps cannot directly access USB gadget interfaces - they need a native binary with root privileges
|
|
||||||
- **Location**: Place the binary at `app/src/main/assets/bin/isodrive`
|
|
||||||
- **Supported architectures**: ARM64 (arm64-v8a), ARM32 (armeabi-v7a), x86, x86_64
|
|
||||||
|
|
||||||
**How to obtain the binary:**
|
|
||||||
|
|
||||||
1. Download the latest release from [isodrive-magisk releases](https://github.com/nitanmarcel/isodrive-magisk/releases/latest)
|
|
||||||
|
|
||||||
2. Extract the `isodrive-magisk-v<version>.zip` file
|
|
||||||
|
|
||||||
3. The binaries for each architecture are in the `libs/` directory:
|
|
||||||
```
|
|
||||||
libs/
|
|
||||||
├── arm64-v8a/
|
|
||||||
│ └── isodrive
|
|
||||||
├── armeabi-v7a/
|
|
||||||
│ └── isodrive
|
|
||||||
├── x86/
|
|
||||||
│ └── isodrive
|
|
||||||
└── x86_64/
|
|
||||||
└── isodrive
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Copy the binary for your target architecture to `app/src/main/assets/bin/isodrive`
|
|
||||||
- For most modern devices: use `arm64-v8a/isodrive`
|
|
||||||
- The app can bundle multiple architectures if needed
|
|
||||||
|
|
||||||
### Build Steps
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clone the repository
|
git clone --recurse-submodules https://git.shihaam.dev/shihaam/ISODroid.git
|
||||||
git clone https://github.com/sargit/ISODroid.git
|
|
||||||
cd ISODroid
|
cd ISODroid
|
||||||
|
```
|
||||||
|
|
||||||
# Ensure isodrive binary is present
|
Or if already cloned, initialize submodules:
|
||||||
ls -la app/src/main/assets/bin/isodrive
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git submodule update --init
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Install Android NDK
|
||||||
|
|
||||||
|
The isodrive binary is compiled from source during the build. This requires the Android NDK.
|
||||||
|
|
||||||
|
**Android Studio:**
|
||||||
|
1. Go to **Tools → SDK Manager**
|
||||||
|
2. Click **SDK Tools** tab
|
||||||
|
3. Check **NDK (Side by side)**
|
||||||
|
4. Click **Apply**
|
||||||
|
|
||||||
|
**NixOS:**
|
||||||
|
The build automatically uses `nix-shell` to get the NDK if available.
|
||||||
|
|
||||||
|
**Manual:**
|
||||||
|
Set `ANDROID_NDK_HOME` environment variable to your NDK path.
|
||||||
|
|
||||||
|
### 3. Build
|
||||||
|
|
||||||
|
```bash
|
||||||
# Build debug APK
|
# Build debug APK
|
||||||
./gradlew assembleDebug
|
./gradlew assembleDebug
|
||||||
|
|
||||||
@@ -55,105 +52,38 @@ ls -la app/src/main/assets/bin/isodrive
|
|||||||
./gradlew assembleRelease
|
./gradlew assembleRelease
|
||||||
```
|
```
|
||||||
|
|
||||||
The compiled APK will be in:
|
The Gradle build will automatically:
|
||||||
- Debug: `app/debug/app-debug.apk`
|
- Compile isodrive for all architectures (arm64-v8a, armeabi-v7a, x86_64, x86)
|
||||||
- Release: `app/release/app-release.apk`
|
- Bundle the binaries into the APK assets
|
||||||
|
- Skip compilation if binaries already exist
|
||||||
|
|
||||||
## Contributing
|
**Output locations:**
|
||||||
|
- Debug: `app/build/outputs/apk/debug/app-debug.apk`
|
||||||
|
- Release: `app/build/outputs/apk/release/app-release.apk`
|
||||||
|
|
||||||
### Adding OS Icons
|
### Build from Android Studio
|
||||||
|
|
||||||
OS icons are displayed in the file browser when ISO/IMG filenames match the icon name.
|
1. Open the project in Android Studio
|
||||||
|
2. Ensure NDK is installed (see above)
|
||||||
|
3. Click **Build → Build Bundle(s) / APK(s) → Build APK(s)**
|
||||||
|
|
||||||
**Steps:**
|
The isodrive binary will be compiled automatically before the APK is built.
|
||||||
|
|
||||||
1. Add your SVG file to `app/src/main/assets/osicons/`
|
### Manual isodrive Build (Optional)
|
||||||
- Filename should be lowercase (e.g., `ubuntu.svg`, `archlinux.svg`)
|
|
||||||
- SVG should be simple and recognizable
|
|
||||||
- Recommended: Get icons from [Simple Icons](https://simpleicons.org/)
|
|
||||||
|
|
||||||
2. The app automatically detects and matches icons:
|
To manually trigger isodrive compilation:
|
||||||
- Filename `ubuntu-22.04-desktop-amd64.iso` → matches `ubuntu.svg`
|
|
||||||
- Filename `archlinux-2024.12.01-x86_64.iso` → matches `archlinux.svg`
|
|
||||||
- Matching is case-insensitive and searches for icon name within filename
|
|
||||||
|
|
||||||
3. **Symlinks for filename variations:**
|
```bash
|
||||||
|
./gradlew buildIsodrive
|
||||||
Sometimes ISO files use shortened or alternate names. Create symlinks to match these variations:
|
|
||||||
```bash
|
|
||||||
cd app/src/main/assets/osicons/
|
|
||||||
|
|
||||||
# Linux Mint ISOs often named "mint-*.iso"
|
|
||||||
ln -s linuxmint.svg mint.svg
|
|
||||||
|
|
||||||
# Windows ISOs might be "Win11.iso" or "Win.iso"
|
|
||||||
ln -s windows.svg win.svg
|
|
||||||
ln -s windows.svg win11.svg
|
|
||||||
|
|
||||||
# FreeBSD might be shortened
|
|
||||||
ln -s freebsd.svg bsd.svg
|
|
||||||
```
|
|
||||||
|
|
||||||
This ensures `mint-21.3-cinnamon.iso` matches even though the icon is `linuxmint.svg`
|
|
||||||
|
|
||||||
4. Submit a pull request with your new icon(s) and any necessary symlinks
|
|
||||||
|
|
||||||
### Adding OS Download Links
|
|
||||||
|
|
||||||
The Downloads screen shows curated links to operating system ISOs.
|
|
||||||
|
|
||||||
**Steps:**
|
|
||||||
|
|
||||||
1. Edit `app/src/main/assets/os.json`
|
|
||||||
|
|
||||||
2. Add a new entry with all required fields:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"name": "Ubuntu Desktop",
|
|
||||||
"category": "Linux",
|
|
||||||
"description": "Popular Linux distribution with GNOME desktop",
|
|
||||||
"icon": "ubuntu.svg",
|
|
||||||
"url": "https://ubuntu.com/download/desktop"
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Field descriptions:**
|
To force rebuild, delete existing binaries first:
|
||||||
|
|
||||||
- `name` (required): Display name for the OS
|
```bash
|
||||||
- `category` (required): One of: `Linux`, `BSD`, `Windows`, or `Recovery`
|
rm -rf app/src/main/assets/bin/*/isodrive
|
||||||
- `description` (required): Brief description (one sentence)
|
./gradlew buildIsodrive
|
||||||
- `icon` (required): Filename of SVG in `osicons/` directory, or `null` if no icon
|
|
||||||
- `url` (required): Direct link to download page or ISO file
|
|
||||||
|
|
||||||
**Example with no icon:**
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"name": "Custom Linux",
|
|
||||||
"category": "Linux",
|
|
||||||
"description": "A custom Linux distribution",
|
|
||||||
"icon": null,
|
|
||||||
"url": "https://example.com/download"
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Test your changes:
|
## F-Droid Build
|
||||||
- Build the app
|
|
||||||
- Navigate to Downloads screen
|
|
||||||
- Verify your entry appears in the correct category
|
|
||||||
- Verify the icon displays (if provided)
|
|
||||||
- Verify the link opens correctly
|
|
||||||
|
|
||||||
4. Submit a pull request with:
|
F-Droid uses `srclibs` instead of git submodules. The F-Droid metadata pre-builds isodrive before running Gradle, so the Gradle task skips compilation (binaries already exist).
|
||||||
- Updated `os.json`
|
|
||||||
- New SVG icon in `osicons/` (if applicable)
|
|
||||||
- Brief description of what you added
|
|
||||||
|
|
||||||
## Testing
|
|
||||||
|
|
||||||
Before submitting a PR, test on a real rooted Android device:
|
|
||||||
|
|
||||||
- [ ] App builds successfully
|
|
||||||
- [ ] New OS icon displays correctly
|
|
||||||
- [ ] New download link opens properly
|
|
||||||
- [ ] No crashes or errors in logcat
|
|
||||||
|
|||||||
@@ -0,0 +1,99 @@
|
|||||||
|
# Contributing to ISO Droid
|
||||||
|
|
||||||
|
This document explains how to contribute OS icons and download links to ISO Droid.
|
||||||
|
|
||||||
|
For building the app, see [BUILDING.md](BUILDING.md).
|
||||||
|
|
||||||
|
## Adding OS Icons
|
||||||
|
|
||||||
|
OS icons are displayed in the file browser when ISO/IMG filenames match the icon name.
|
||||||
|
|
||||||
|
**Steps:**
|
||||||
|
|
||||||
|
1. Add your SVG file to `app/src/main/assets/osicons/`
|
||||||
|
- Filename should be lowercase (e.g., `ubuntu.svg`, `archlinux.svg`)
|
||||||
|
- SVG should be simple and recognizable
|
||||||
|
- Recommended: Get icons from [Simple Icons](https://simpleicons.org/)
|
||||||
|
|
||||||
|
2. The app automatically detects and matches icons:
|
||||||
|
- Filename `ubuntu-22.04-desktop-amd64.iso` → matches `ubuntu.svg`
|
||||||
|
- Filename `archlinux-2024.12.01-x86_64.iso` → matches `archlinux.svg`
|
||||||
|
- Matching is case-insensitive and searches for icon name within filename
|
||||||
|
|
||||||
|
3. **Symlinks for filename variations:**
|
||||||
|
|
||||||
|
Sometimes ISO files use shortened or alternate names. Create symlinks to match these variations:
|
||||||
|
```bash
|
||||||
|
cd app/src/main/assets/osicons/
|
||||||
|
|
||||||
|
# Linux Mint ISOs often named "mint-*.iso"
|
||||||
|
ln -s linuxmint.svg mint.svg
|
||||||
|
|
||||||
|
# Windows ISOs might be "Win11.iso" or "Win.iso"
|
||||||
|
ln -s windows.svg win.svg
|
||||||
|
ln -s windows.svg win11.svg
|
||||||
|
```
|
||||||
|
|
||||||
|
This ensures `mint-21.3-cinnamon.iso` matches even though the icon is `linuxmint.svg`
|
||||||
|
|
||||||
|
4. Submit a pull request with your new icon(s) and any necessary symlinks
|
||||||
|
|
||||||
|
## Adding OS Download Links
|
||||||
|
|
||||||
|
The Downloads screen shows curated links to operating system ISOs.
|
||||||
|
|
||||||
|
**Steps:**
|
||||||
|
|
||||||
|
1. Edit `app/src/main/assets/os.json`
|
||||||
|
|
||||||
|
2. Add a new entry with all required fields:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "Ubuntu Desktop",
|
||||||
|
"category": "Linux",
|
||||||
|
"description": "Popular Linux distribution with GNOME desktop",
|
||||||
|
"icon": "ubuntu.svg",
|
||||||
|
"url": "https://ubuntu.com/download/desktop"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Field descriptions:**
|
||||||
|
|
||||||
|
- `name` (required): Display name for the OS
|
||||||
|
- `category` (required): One of: `Linux`, `BSD`, `Windows`, or `Recovery`
|
||||||
|
- `description` (required): Brief description (one sentence)
|
||||||
|
- `icon` (required): Filename of SVG in `osicons/` directory, or `null` if no icon
|
||||||
|
- `url` (required): Direct link to download page or ISO file
|
||||||
|
|
||||||
|
**Example with no icon:**
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "Custom Linux",
|
||||||
|
"category": "Linux",
|
||||||
|
"description": "A custom Linux distribution",
|
||||||
|
"icon": null,
|
||||||
|
"url": "https://example.com/download"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Test your changes:
|
||||||
|
- Build the app (see [BUILDING.md](BUILDING.md))
|
||||||
|
- Navigate to Downloads screen
|
||||||
|
- Verify your entry appears in the correct category
|
||||||
|
- Verify the icon displays (if provided)
|
||||||
|
- Verify the link opens correctly
|
||||||
|
|
||||||
|
4. Submit a pull request with:
|
||||||
|
- Updated `os.json`
|
||||||
|
- New SVG icon in `osicons/` (if applicable)
|
||||||
|
- Brief description of what you added
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
Before submitting a PR, test on a real rooted Android device:
|
||||||
|
|
||||||
|
- [ ] App builds successfully
|
||||||
|
- [ ] New OS icon displays correctly
|
||||||
|
- [ ] New download link opens properly
|
||||||
|
- [ ] No crashes or errors in logcat
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
- Always use app-bundled isodrive binary instead of system binary
|
||||||
|
- Prep for edge-to-edge compatibility
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Get the directory where this script lives
|
|
||||||
SCRIPT_DIR=$(dirname "$(realpath "$0")")
|
|
||||||
|
|
||||||
ISODRIVE_VERSION=$(curl -sI https://github.com/nitanmarcel/isodrive-magisk/releases/latest | grep -i ^location | grep -oP 'v\K[\d.]+')
|
|
||||||
curl -sL https://github.com/nitanmarcel/isodrive-magisk/releases/download/v$ISODRIVE_VERSION/isodrive-magisk-v$ISODRIVE_VERSION.zip -o /tmp/isodrive-magisk.zip
|
|
||||||
|
|
||||||
unzip -q /tmp/isodrive-magisk.zip -d /tmp/isodrive-magisk
|
|
||||||
|
|
||||||
# Move the isodrive binary for each architecture
|
|
||||||
mv /tmp/isodrive-magisk/libs/arm64-v8a/isodrive $SCRIPT_DIR/app/src/main/assets/bin/arm64-v8a/
|
|
||||||
mv /tmp/isodrive-magisk/libs/armeabi-v7a/isodrive $SCRIPT_DIR/app/src/main/assets/bin/armeabi-v7a/
|
|
||||||
mv /tmp/isodrive-magisk/libs/x86/isodrive $SCRIPT_DIR/app/src/main/assets/bin/x86/
|
|
||||||
mv /tmp/isodrive-magisk/libs/x86_64/isodrive $SCRIPT_DIR/app/src/main/assets/bin/x86_64/
|
|
||||||
|
|
||||||
# Clean up temp files
|
|
||||||
rm -rf /tmp/isodrive-magisk /tmp/isodrive-magisk.zip
|
|
||||||
Submodule
+1
Submodule isodrive added at 2e9f28bd90
Reference in New Issue
Block a user