23 Commits
1.0 ... v1.4

Author SHA1 Message Date
6cdd812144 version 1.4 2026-03-11 12:45:51 +05:00
cbee1786ca findos icon is now public 2026-03-11 12:45:29 +05:00
5ea665c02f feature to indicate app created folders 2026-03-11 12:44:53 +05:00
7c269d5e59 make OS icon a public fun 2026-03-11 12:44:24 +05:00
fbda9fedfb haha more unix way 2026-03-11 12:43:48 +05:00
79ccd6753e added a file manager for directory selection 2026-03-11 12:42:49 +05:00
3decb7307e update empty isodroid dir hits in home page 2026-03-11 11:35:45 +05:00
d297ab1059 new version 1.3 2026-03-11 11:13:22 +05:00
371e38dc2f show dynamic path 2026-03-11 11:10:26 +05:00
1e850a2d1a fix path typos 2026-03-11 11:08:28 +05:00
4cd9202609 fix app name, update version no, update images 2026-03-11 01:04:19 +05:00
6becf2907e fix app name, update version no, update images 2026-03-11 01:01:15 +05:00
c34900a2b1 Add SPDX license headers to source files 2026-03-10 23:46:43 +05:00
f654ba52a1 Add SPDX license headers to source files 2026-03-10 23:42:40 +05:00
e7735a0446 script to build isodrive 2026-03-10 21:15:17 +05:00
1e0d5dd640 script to pull precompiled binaries 2026-03-10 20:07:25 +05:00
2672f8dfa5 copy actual images back to where it belong 2026-03-10 18:20:17 +05:00
157f5103f1 prep for fdroid release 2026-03-10 18:15:39 +05:00
bcf0ffec4c remove deprecated 2026-03-10 17:25:31 +05:00
8a08b31f32 1.1 release: new icon 2026-03-10 17:23:30 +05:00
b974fd1b2b create and update logo 2026-03-10 17:21:14 +05:00
881bb70e99 update docs 2026-03-10 16:47:52 +05:00
a0012b4d5e credit svgrepo 2026-03-10 15:49:57 +05:00
54 changed files with 1035 additions and 267 deletions

48
CHANGELOG.md Normal file
View File

@@ -0,0 +1,48 @@
# Changelog
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/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.4] - 2026-03-11
### Added
- Directory browser for changing ISO directory in settings
- Create new directories from the directory browser
- Delete directories created by the app (long press)
- Shows ISO/IMG files with OS icons in directory browser
### Changed
- Empty state on home screen now shows current path and helpful hints
- Version number is now read dynamically from app config
- Renamed "folder" to "directory" throughout the UI
## [1.3] - 2025-03-11
### Changed
- Fix default image dir to be /sdcard/isodroid instead of /sdcard/isodrive
## [1.2] - 2025-03-10
### Changed
- Fix app name displaying as "ISO Drive" instead of "ISO Droid" in some places
## [1.1] - 2025-03-10
### Changed
- New app icon
## [1.0] - 2025-03-10
### Added
- Mount ISO/IMG files as USB mass storage or CD-ROM
- Create blank IMG files for writable USB drives
- Read-only or read-write mount options
- Persistent notification with quick unmount button
- OS-specific icons for popular distributions (Linux, BSD, etc.)
- Download links to popular operating systems (Linux, BSD, Windows, Recovery tools)
- Rename and delete files
- Material 3 dynamic theming with dark mode support
- Support for Magisk, KernelSU, and APatch root solutions
- Bundled isodrive binary for all architectures (arm64-v8a, armeabi-v7a, x86_64, x86)

View File

@@ -4,11 +4,9 @@ Android app for mounting ISO/IMG files as USB mass storage or CD-ROM devices on
## Screenshots
| OS images listing | Mounted Status | Mount Options Dialog |
|:--:|:--:|:--:|
| ![File Browser](docs/screenshots/list_images_home.jpg) | ![Mounted Status](docs/screenshots/mounted_status_home.jpg) | ![Mount Options](docs/screenshots/mount_options_dialogbox.jpg) |
| **Create IMG Dialog** | **Download OS ISOs** | |
| ![Create IMG](docs/screenshots/create_img_digalogbox.jpg) | ![Download ISOs](docs/screenshots/list_listing_download.jpg) | |
| OS images listing | Mounted Status | Mount Options Dialog | Create IMG Dialog | Download OS ISOs |
|:--:|:--:|:--:|:--:|:--:|
| ![File Browser](docs/screenshots/list_images_home.jpg) | ![Mounted Status](docs/screenshots/mounted_status_home.jpg) | ![Mount Options](docs/screenshots/mount_options_dialogbox.jpg) | ![Create IMG](docs/screenshots/create_img_digalogbox.jpg) | ![Download ISOs](docs/screenshots/list_listing_download.jpg) |
## Features
@@ -37,7 +35,7 @@ Android app for mounting ISO/IMG files as USB mass storage or CD-ROM devices on
1. Download the APK from the links above
2. Install the APK on your rooted Android device
3. Grant root access when prompted
4. Place your ISO/IMG files in `/sdcard/isodrive/` (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!
@@ -65,7 +63,7 @@ Android app for mounting ISO/IMG files as USB mass storage or CD-ROM devices on
- [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
- OS icons from [Simple Icons](https://simpleicons.org/)
- OS icons from [Simple Icons](https://simpleicons.org/) and [SVG Repo](https://www.svgrepo.com/)
## License

View File

@@ -12,8 +12,8 @@ android {
applicationId = "sh.sar.isodroid"
minSdk = 26
targetSdk = 36
versionCode = 1
versionName = "1.0"
versionCode = 4
versionName = "1.4"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid
import android.app.Application
@@ -12,7 +17,7 @@ class ISODroidApp : Application() {
Shell.enableVerboseLogging = BuildConfig.DEBUG
Shell.setDefaultBuilder(
Shell.Builder.create()
.setFlags(Shell.FLAG_MOUNT_MASTER or Shell.FLAG_REDIRECT_STDERR)
.setFlags(Shell.FLAG_MOUNT_MASTER)
.setTimeout(10)
)
}
@@ -23,7 +28,7 @@ class ISODroidApp : Application() {
Shell.enableVerboseLogging = true
Shell.setDefaultBuilder(
Shell.Builder.create()
.setFlags(Shell.FLAG_MOUNT_MASTER or Shell.FLAG_REDIRECT_STDERR)
.setFlags(Shell.FLAG_MOUNT_MASTER)
.setTimeout(10)
)
}

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid
import android.content.Context

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.data
import java.io.File

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.data
data class MountOptions(

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.data
enum class MountType {

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.isodrive
import kotlinx.coroutines.flow.MutableSharedFlow

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.isodrive
import android.content.Context

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.isodrive
import kotlinx.coroutines.flow.MutableSharedFlow

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.notification
import android.content.BroadcastReceiver

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.notification
import android.app.NotificationChannel

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.notification
import android.content.BroadcastReceiver

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.root
import com.topjohnwu.superuser.Shell

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.ui.components
import androidx.compose.foundation.layout.Column

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.ui.components
import androidx.compose.foundation.ExperimentalFoundationApi
@@ -50,7 +55,7 @@ import sh.sar.isodroid.data.IsoFile
* 1. Longest match (most specific)
* 2. Earliest position in filename (if same length)
*/
private fun findOsIcon(context: android.content.Context, filename: String): String? {
fun findOsIcon(context: android.content.Context, filename: String): String? {
return try {
// Dynamically load available icon files from assets
val availableIcons = context.assets.list("osicons")
@@ -106,10 +111,19 @@ fun FileBrowser(
style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Spacer(modifier = Modifier.height(8.dp))
Text(
text = "Place ISO or IMG files in this directory",
text = "Place ISO or IMG files in:\n$currentPath",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.7f)
color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.7f),
textAlign = androidx.compose.ui.text.style.TextAlign.Center
)
Spacer(modifier = Modifier.height(16.dp))
Text(
text = "Tap + to create an empty IMG file\nChange directory in Settings",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.5f),
textAlign = androidx.compose.ui.text.style.TextAlign.Center
)
}
} else {

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.ui.components
import androidx.compose.foundation.clickable

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.ui.components
import androidx.compose.foundation.layout.Arrangement

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.ui.components
import androidx.compose.foundation.background
@@ -42,30 +47,6 @@ import sh.sar.isodroid.ui.theme.MountedGreen
import sh.sar.isodroid.ui.theme.UnmountedGray
import java.io.File
/**
* Finds a matching OS icon filename for a given file by dynamically checking available icons.
*/
private fun findOsIcon(context: android.content.Context, filename: String): String? {
return try {
val availableIcons = context.assets.list("osicons")
?.filter { it.endsWith(".svg", ignoreCase = true) }
?.map { it.removeSuffix(".svg").lowercase() }
?: emptyList()
val lowerFilename = filename.lowercase()
availableIcons
.filter { lowerFilename.contains(it) }
.maxWithOrNull(compareBy(
{ it.length },
{ -lowerFilename.indexOf(it) }
))
?.let { "$it.svg" }
} catch (e: Exception) {
null
}
}
@Composable
fun StatusCard(
mountStatus: MountStatus,

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.ui.screens
import android.content.Context

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.ui.screens
import androidx.compose.foundation.layout.Box
@@ -84,7 +89,7 @@ fun MainScreen(
Scaffold(
topBar = {
TopAppBar(
title = { Text("ISO Drive") },
title = { Text("ISO Droid") },
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.primaryContainer,
titleContentColor = MaterialTheme.colorScheme.onPrimaryContainer

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.ui.screens
import android.Manifest
@@ -5,23 +10,38 @@ import android.content.Intent
import android.content.pm.PackageManager
import android.net.Uri
import android.os.Build
import android.os.Environment
import android.provider.Settings
import android.widget.Toast
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.automirrored.filled.InsertDriveFile
import androidx.compose.material.icons.filled.Album
import androidx.compose.material.icons.filled.CheckCircle
import androidx.compose.material.icons.filled.Code
import androidx.compose.material.icons.filled.CreateNewFolder
import androidx.compose.material.icons.filled.Error
import androidx.compose.material.icons.filled.Folder
import androidx.compose.material.icons.filled.Info
@@ -30,6 +50,7 @@ import androidx.compose.material.icons.filled.Security
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
@@ -42,20 +63,33 @@ import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.hapticfeedback.HapticFeedbackType
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalHapticFeedback
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.core.content.ContextCompat
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleEventObserver
import coil.compose.AsyncImage
import coil.decode.SvgDecoder
import coil.request.ImageRequest
import kotlinx.coroutines.launch
import sh.sar.isodroid.root.RootManager
import sh.sar.isodroid.ui.components.findOsIcon
import sh.sar.isodroid.viewmodel.MainViewModel
@OptIn(ExperimentalMaterial3Api::class)
@@ -68,7 +102,6 @@ fun SettingsScreen(
val context = LocalContext.current
val activity = context as? androidx.activity.ComponentActivity
var showPathDialog by remember { mutableStateOf(false) }
var tempPath by remember(uiState.currentPath) { mutableStateOf(uiState.isoDirectory) }
// Track notification permission with lifecycle-aware refresh
var hasNotificationPermission by remember {
@@ -226,11 +259,18 @@ fun SettingsScreen(
Spacer(modifier = Modifier.width(12.dp))
Column {
Text(
text = "ISO Drive",
text = "ISO Droid",
style = MaterialTheme.typography.titleMedium
)
val versionName = remember {
try {
context.packageManager.getPackageInfo(context.packageName, 0).versionName
} catch (e: Exception) {
"Unknown"
}
}
Text(
text = "Version 1.0",
text = "Version $versionName",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
@@ -254,13 +294,13 @@ fun SettingsScreen(
color = MaterialTheme.colorScheme.primary
)
Text(
text = "git.shihaam.dev/shihaam/ISODrive",
text = "git.shihaam.dev/shihaam/ISODroid",
style = MaterialTheme.typography.bodySmall.copy(
textDecoration = TextDecoration.Underline
),
color = MaterialTheme.colorScheme.primary,
modifier = Modifier.clickable {
openUrl("https://git.shihaam.dev/shihaam/ISODrive")
openUrl("https://git.shihaam.dev/shihaam/ISODroid")
}
)
}
@@ -301,7 +341,7 @@ fun SettingsScreen(
}
}
Text(
text = "The CLI tool that powers ISO Drive. Mounts ISO/IMG files as bootable USB devices using configfs.",
text = "The CLI tool that powers ISO Droid. Mounts ISO/IMG files as bootable USB devices using configfs.",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(top = 8.dp)
@@ -364,40 +404,378 @@ fun SettingsScreen(
}
}
// Path edit dialog
// Directory browser dialog
if (showPathDialog) {
AlertDialog(
onDismissRequest = { showPathDialog = false },
title = { Text("ISO Directory") },
text = {
Column {
Text(
text = "Enter the path to the directory containing your ISO/IMG files.",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Spacer(modifier = Modifier.height(16.dp))
OutlinedTextField(
value = tempPath,
onValueChange = { tempPath = it },
label = { Text("Path") },
singleLine = true,
modifier = Modifier.fillMaxWidth()
DirectoryBrowserDialog(
initialPath = uiState.isoDirectory,
onDismiss = { showPathDialog = false },
onSelect = { selectedPath ->
viewModel.setIsoDirectory(selectedPath)
showPathDialog = false
}
)
}
}
private data class BrowserItem(
val name: String,
val isDirectory: Boolean,
val fullPath: String,
val isDeletable: Boolean = false
)
@OptIn(ExperimentalFoundationApi::class)
@Composable
private fun DirectoryBrowserDialog(
initialPath: String,
onDismiss: () -> Unit,
onSelect: (String) -> Unit
) {
val context = LocalContext.current
val scope = rememberCoroutineScope()
val hapticFeedback = LocalHapticFeedback.current
var currentPath by remember { mutableStateOf(initialPath) }
var items by remember { mutableStateOf<List<BrowserItem>>(emptyList()) }
var isLoading by remember { mutableStateOf(true) }
var showCreateFolderDialog by remember { mutableStateOf(false) }
var showDeleteDialog by remember { mutableStateOf<String?>(null) }
var newFolderName by remember { mutableStateOf("") }
val storageRoot = Environment.getExternalStorageDirectory().absolutePath
fun loadContents(path: String) {
scope.launch {
isLoading = true
// Load directories
val dirResult = RootManager.executeCommand(
"find \"$path\" -maxdepth 1 -mindepth 1 -type d 2>/dev/null"
)
val directories = if (dirResult.success && dirResult.output.isNotBlank()) {
dirResult.output.lines()
.filter { it.isNotBlank() }
.map { it.trim() }
.filter { !it.substringAfterLast("/").startsWith(".") }
.map { dirPath ->
// Check if this directory was created by the app (has .isodroiddir marker)
val markerCheck = RootManager.executeCommand(
"test -f \"$dirPath/.isodroiddir\" && echo 'yes' || echo 'no'"
)
val isDeletable = markerCheck.output.trim() == "yes"
BrowserItem(dirPath.substringAfterLast("/"), true, dirPath, isDeletable)
}
} else {
emptyList()
}
// Load ISO/IMG files
val fileResult = RootManager.executeCommand(
"find \"$path\" -maxdepth 1 -type f \\( -iname '*.iso' -o -iname '*.img' \\) 2>/dev/null"
)
val files = if (fileResult.success && fileResult.output.isNotBlank()) {
fileResult.output.lines()
.filter { it.isNotBlank() }
.map { it.trim() }
.map { BrowserItem(it.substringAfterLast("/"), false, it) }
} else {
emptyList()
}
items = (directories.sortedBy { it.name.lowercase() } + files.sortedBy { it.name.lowercase() })
isLoading = false
}
}
fun createFolder(name: String) {
scope.launch {
val trimmedName = name.trim()
if (trimmedName.isEmpty()) return@launch
val newPath = "$currentPath/$trimmedName"
RootManager.executeCommand("mkdir -p \"$newPath\"")
// Create marker file to indicate this folder was created by the app
RootManager.executeCommand("touch \"$newPath/.isodroiddir\"")
// Auto-navigate into the new folder
currentPath = newPath
}
}
fun deleteFolder(path: String) {
scope.launch {
RootManager.executeCommand("rm -rf \"$path\"")
loadContents(currentPath)
}
}
LaunchedEffect(currentPath) {
loadContents(currentPath)
}
AlertDialog(
onDismissRequest = onDismiss,
title = {
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Text("Select Directory")
IconButton(onClick = { showCreateFolderDialog = true }) {
Icon(
imageVector = Icons.Default.CreateNewFolder,
contentDescription = "Create directory",
tint = MaterialTheme.colorScheme.primary
)
}
}
},
text = {
Column {
// Current path display
Text(
text = currentPath,
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.primary,
maxLines = 2,
overflow = TextOverflow.Ellipsis
)
Spacer(modifier = Modifier.height(8.dp))
HorizontalDivider()
// Content list
if (isLoading) {
Column(
modifier = Modifier
.fillMaxWidth()
.heightIn(min = 200.dp),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
CircularProgressIndicator(modifier = Modifier.size(32.dp))
}
} else {
LazyColumn(
modifier = Modifier
.fillMaxWidth()
.heightIn(min = 200.dp, max = 300.dp)
) {
// Parent directory (..)
if (currentPath != "/" && currentPath != storageRoot) {
item {
Row(
modifier = Modifier
.fillMaxWidth()
.clickable {
val parent = currentPath.substringBeforeLast("/")
currentPath = parent.ifEmpty { "/" }
}
.padding(vertical = 12.dp, horizontal = 4.dp),
verticalAlignment = Alignment.CenterVertically
) {
Icon(
imageVector = Icons.Default.Folder,
contentDescription = null,
tint = MaterialTheme.colorScheme.primary,
modifier = Modifier.size(24.dp)
)
Spacer(modifier = Modifier.width(12.dp))
Text(
text = "..",
style = MaterialTheme.typography.bodyLarge
)
}
}
}
// Items (directories and files)
items(items) { item ->
val isIso = item.name.lowercase().endsWith(".iso")
val isImg = item.name.lowercase().endsWith(".img")
val osIcon = if (!item.isDirectory) findOsIcon(context, item.name) else null
Row(
modifier = Modifier
.fillMaxWidth()
.combinedClickable(
onClick = {
if (item.isDirectory) {
currentPath = item.fullPath
}
},
onLongClick = {
if (item.isDirectory) {
hapticFeedback.performHapticFeedback(HapticFeedbackType.LongPress)
when {
item.fullPath == initialPath -> {
Toast.makeText(
context,
"Can't delete your current ISO directory. Change it first, then try again.",
Toast.LENGTH_SHORT
).show()
}
item.isDeletable -> {
showDeleteDialog = item.fullPath
}
else -> {
Toast.makeText(
context,
"Can't delete this directory — it wasn't created by ISO Droid",
Toast.LENGTH_SHORT
).show()
}
}
}
}
)
.padding(vertical = 8.dp, horizontal = 4.dp),
verticalAlignment = Alignment.CenterVertically
) {
// Icon with badge
Box(modifier = Modifier.size(32.dp)) {
if (item.isDirectory) {
Icon(
imageVector = Icons.Default.Folder,
contentDescription = null,
tint = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.fillMaxSize()
)
} else if (osIcon != null) {
// OS icon with file type badge
AsyncImage(
model = ImageRequest.Builder(context)
.data("file:///android_asset/osicons/$osIcon")
.decoderFactory(SvgDecoder.Factory())
.build(),
contentDescription = item.name,
modifier = Modifier.fillMaxSize(),
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.primary)
)
// File type badge
Icon(
imageVector = if (isIso) Icons.Default.Album else Icons.AutoMirrored.Filled.InsertDriveFile,
contentDescription = null,
tint = MaterialTheme.colorScheme.onPrimary,
modifier = Modifier
.size(14.dp)
.align(Alignment.BottomEnd)
.offset(x = 2.dp, y = 2.dp)
.clip(CircleShape)
.background(MaterialTheme.colorScheme.primary)
.padding(2.dp)
)
} else {
// Fallback icon
Icon(
imageVector = if (isIso) Icons.Default.Album else Icons.AutoMirrored.Filled.InsertDriveFile,
contentDescription = null,
tint = MaterialTheme.colorScheme.primary,
modifier = Modifier.fillMaxSize()
)
}
}
Spacer(modifier = Modifier.width(12.dp))
Text(
text = item.name,
style = MaterialTheme.typography.bodyMedium,
maxLines = 3,
overflow = TextOverflow.Ellipsis,
modifier = Modifier.weight(1f),
color = if (item.isDirectory)
MaterialTheme.colorScheme.onSurface
else
MaterialTheme.colorScheme.onSurfaceVariant
)
}
}
// Empty state
if (items.isEmpty()) {
item {
Text(
text = "Empty directory",
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(vertical = 16.dp, horizontal = 4.dp)
)
}
}
}
}
}
},
confirmButton = {
TextButton(onClick = { onSelect(currentPath) }) {
Text("Select")
}
},
dismissButton = {
TextButton(onClick = onDismiss) {
Text("Cancel")
}
}
)
// Create folder dialog
if (showCreateFolderDialog) {
AlertDialog(
onDismissRequest = {
showCreateFolderDialog = false
newFolderName = ""
},
title = { Text("Create Directory") },
text = {
OutlinedTextField(
value = newFolderName,
onValueChange = { newFolderName = it },
label = { Text("Directory name") },
singleLine = true,
modifier = Modifier.fillMaxWidth()
)
},
confirmButton = {
TextButton(
onClick = {
viewModel.setIsoDirectory(tempPath)
showPathDialog = false
}
if (newFolderName.isNotBlank()) {
createFolder(newFolderName)
showCreateFolderDialog = false
newFolderName = ""
}
},
enabled = newFolderName.isNotBlank()
) {
Text("Save")
Text("Create")
}
},
dismissButton = {
TextButton(onClick = { showPathDialog = false }) {
TextButton(onClick = {
showCreateFolderDialog = false
newFolderName = ""
}) {
Text("Cancel")
}
}
)
}
// Delete confirmation dialog
showDeleteDialog?.let { pathToDelete ->
AlertDialog(
onDismissRequest = { showDeleteDialog = null },
title = { Text("Delete Directory") },
text = {
Text("Are you sure you want to delete \"${pathToDelete.substringAfterLast("/")}\" and all its contents?")
},
confirmButton = {
TextButton(
onClick = {
deleteFolder(pathToDelete)
showDeleteDialog = null
}
) {
Text("Delete", color = MaterialTheme.colorScheme.error)
}
},
dismissButton = {
TextButton(onClick = { showDeleteDialog = null }) {
Text("Cancel")
}
}

View File

@@ -1,8 +1,14 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.ui.screens
import android.Manifest
import android.content.pm.PackageManager
import android.os.Build
import android.os.Environment
import androidx.core.content.ContextCompat
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
@@ -92,7 +98,7 @@ private fun WelcomeStep(
Spacer(modifier = Modifier.height(24.dp))
Text(
text = "Welcome to ISO Drive",
text = "Welcome to ISO Droid",
style = MaterialTheme.typography.headlineMedium,
fontWeight = FontWeight.Bold
)
@@ -147,7 +153,7 @@ private fun RootAccessStep(
title = "Root Access",
description = when (hasRoot) {
false -> "Root access was denied. The app requires root to mount ISO files. You can try again or skip and grant access later from your root manager."
else -> "ISO Drive needs superuser (root) access to mount ISO files as USB devices. This is required because mounting USB gadgets is a system-level operation."
else -> "ISO Droid needs superuser (root) access to mount ISO files as USB devices. This is required because mounting USB gadgets is a system-level operation."
},
granted = hasRoot
)
@@ -253,7 +259,7 @@ private fun NotificationStep(
description = when {
permanentlyDenied -> "Notification permission was denied. You can enable it later in system settings if you change your mind."
wasDenied -> "Notification permission was denied. You can try again or continue without notifications."
else -> "ISO Drive shows a notification when an ISO is mounted, with a quick unmount button. This helps you keep track of the mount status."
else -> "ISO Droid shows a notification when an ISO is mounted, with a quick unmount button. This helps you keep track of the mount status."
},
granted = if (wasDenied) false else if (hasPermission) true else null
)
@@ -318,7 +324,7 @@ private fun CompleteStep(
Spacer(modifier = Modifier.height(16.dp))
Text(
text = "ISO Drive is ready to use. Place your ISO or IMG files in the isodrive folder and start mounting.",
text = "ISO Droid is ready to use. Place your ISO or IMG files in the isodroid directory and start mounting.",
style = MaterialTheme.typography.bodyLarge,
textAlign = TextAlign.Center,
color = MaterialTheme.colorScheme.onSurfaceVariant
@@ -327,7 +333,7 @@ private fun CompleteStep(
Spacer(modifier = Modifier.height(8.dp))
Text(
text = "Default directory: /sdcard/isodrive/",
text = "Default directory: ${Environment.getExternalStorageDirectory().absolutePath}/isodroid/",
style = MaterialTheme.typography.bodySmall,
textAlign = TextAlign.Center,
color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.7f)
@@ -339,7 +345,7 @@ private fun CompleteStep(
onClick = onFinish,
modifier = Modifier.fillMaxWidth()
) {
Text("Start Using ISO Drive")
Text("Start Using ISO Droid")
}
}

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.ui.theme
import androidx.compose.ui.graphics.Color

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.ui.theme
import android.app.Activity

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.ui.theme
import androidx.compose.material3.Typography

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package sh.sar.isodroid.viewmodel
import android.app.Application
@@ -47,7 +52,7 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
companion object {
private val KEY_ISO_DIRECTORY = stringPreferencesKey("iso_directory")
private val DEFAULT_ISO_DIRECTORY = "${Environment.getExternalStorageDirectory().absolutePath}/isodrive"
private val DEFAULT_ISO_DIRECTORY = "${Environment.getExternalStorageDirectory().absolutePath}/isodroid"
}
private var initialized = false
@@ -201,6 +206,8 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
// Create directory if it doesn't exist
if (!directory.exists()) {
RootManager.executeCommand("mkdir -p \"$currentPath\"")
// Create marker file to indicate this folder was created by the app
RootManager.executeCommand("touch \"$currentPath/.isodroiddir\"")
}
// Try multiple methods to list files

View File

@@ -4,167 +4,10 @@
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<!-- ISODroid Background - Clean Android Green -->
<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 +1,99 @@
<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>
<!-- ISODroid Launcher Icon Foreground -->
<!-- Safe zone is 66dp centered (21-87 in 108dp viewport) -->
<!-- Left antenna with ball -->
<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>
android:pathData="M38,24 a3,3 0 1,1 0.01,0"/>
<path
android:fillColor="#FFFFFF"
android:strokeColor="#FFFFFF"
android:strokeWidth="3.5"
android:strokeLineCap="round"
android:pathData="M39.5,26.5 L44,33"/>
<!-- Right antenna with ball -->
<path
android:fillColor="#FFFFFF"
android:pathData="M70,24 a3,3 0 1,1 0.01,0"/>
<path
android:fillColor="#FFFFFF"
android:strokeColor="#FFFFFF"
android:strokeWidth="3.5"
android:strokeLineCap="round"
android:pathData="M68.5,26.5 L64,33"/>
<!-- Droid head -->
<path
android:fillColor="#FFFFFF"
android:pathData="M34,42 Q34,30 54,30 Q74,30 74,42 L74,56 Q74,62 68,62 L40,62 Q34,62 34,56 Z"/>
<!-- Left eye -->
<path
android:fillColor="#3DDC84"
android:pathData="M44,46 a4,4 0 1,0 0.01,0"/>
<!-- Right eye -->
<path
android:fillColor="#3DDC84"
android:pathData="M64,46 a4,4 0 1,0 0.01,0"/>
<!-- USB Trident Symbol -->
<!-- Main vertical stem -->
<path
android:fillColor="#FFFFFF"
android:strokeColor="#FFFFFF"
android:strokeWidth="5"
android:strokeLineCap="round"
android:pathData="M54,62 L54,88"/>
<!-- Horizontal bar -->
<path
android:fillColor="#FFFFFF"
android:strokeColor="#FFFFFF"
android:strokeWidth="4"
android:strokeLineCap="round"
android:pathData="M40,70 L68,70"/>
<!-- Left branch -->
<path
android:fillColor="#FFFFFF"
android:strokeColor="#FFFFFF"
android:strokeWidth="3.5"
android:strokeLineCap="round"
android:pathData="M40,70 L40,76"/>
<!-- Left terminal (rectangle) -->
<path
android:fillColor="#FFFFFF"
android:pathData="M36,76 L44,76 L44,82 L36,82 Z"/>
<!-- Right branch -->
<path
android:fillColor="#FFFFFF"
android:strokeColor="#FFFFFF"
android:strokeWidth="3.5"
android:strokeLineCap="round"
android:pathData="M68,70 L68,76"/>
<!-- Right terminal (circle) -->
<path
android:fillColor="#FFFFFF"
android:pathData="M68,80 a4,4 0 1,0 0.01,0"/>
<!-- USB bottom arrow -->
<path
android:fillColor="#FFFFFF"
android:strokeColor="#FFFFFF"
android:strokeWidth="4"
android:strokeLineCap="round"
android:strokeLineJoin="round"
android:pathData="M48,88 L54,94 L60,88"/>
</vector>

View File

@@ -0,0 +1,90 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<!-- ISODroid Monochrome Icon for Material You Theming -->
<!-- This icon uses a single color that Android will tint based on wallpaper -->
<!-- Left antenna with ball -->
<path
android:fillColor="#000000"
android:pathData="M38,24 a3,3 0 1,1 0.01,0"/>
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="3.5"
android:strokeLineCap="round"
android:pathData="M39.5,26.5 L44,33"/>
<!-- Right antenna with ball -->
<path
android:fillColor="#000000"
android:pathData="M70,24 a3,3 0 1,1 0.01,0"/>
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="3.5"
android:strokeLineCap="round"
android:pathData="M68.5,26.5 L64,33"/>
<!-- Droid head with hollow eyes -->
<path
android:fillColor="#000000"
android:fillType="evenOdd"
android:pathData="M34,42 Q34,30 54,30 Q74,30 74,42 L74,56 Q74,62 68,62 L40,62 Q34,62 34,56 Z M44,50 a4,4 0 1,0 0.01,0 M64,50 a4,4 0 1,0 0.01,0"/>
<!-- USB Trident Symbol -->
<!-- Main vertical stem -->
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="5"
android:strokeLineCap="round"
android:pathData="M54,62 L54,88"/>
<!-- Horizontal bar -->
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="4"
android:strokeLineCap="round"
android:pathData="M40,70 L68,70"/>
<!-- Left branch -->
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="3.5"
android:strokeLineCap="round"
android:pathData="M40,70 L40,76"/>
<!-- Left terminal (rectangle) -->
<path
android:fillColor="#000000"
android:pathData="M36,76 L44,76 L44,82 L36,82 Z"/>
<!-- Right branch -->
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="3.5"
android:strokeLineCap="round"
android:pathData="M68,70 L68,76"/>
<!-- Right terminal (circle) -->
<path
android:fillColor="#000000"
android:pathData="M68,80 a4,4 0 1,0 0.01,0"/>
<!-- USB bottom arrow -->
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="4"
android:strokeLineCap="round"
android:strokeLineJoin="round"
android:pathData="M48,88 L54,94 L60,88"/>
</vector>

View File

@@ -4,7 +4,67 @@
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<!-- ISODroid Notification Icon -->
<!-- Left antenna ball -->
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,16.5c-2.49,0 -4.5,-2.01 -4.5,-4.5S9.51,7.5 12,7.5s4.5,2.01 4.5,4.5 -2.01,4.5 -4.5,4.5zM12,9.5c-1.38,0 -2.5,1.12 -2.5,2.5s1.12,2.5 2.5,2.5 2.5,-1.12 2.5,-2.5 -1.12,-2.5 -2.5,-2.5z"/>
android:pathData="M7.5,2.5 m-0.9,0 a0.9,0.9 0 1,1 1.8,0 a0.9,0.9 0 1,1 -1.8,0"/>
<!-- Left antenna stem -->
<path
android:fillColor="@android:color/white"
android:pathData="M7.8,3.3 L8.8,3.8 L9.3,5.3 L8.3,5.5 Z"/>
<!-- Right antenna ball -->
<path
android:fillColor="@android:color/white"
android:pathData="M16.5,2.5 m-0.9,0 a0.9,0.9 0 1,1 1.8,0 a0.9,0.9 0 1,1 -1.8,0"/>
<!-- Right antenna stem -->
<path
android:fillColor="@android:color/white"
android:pathData="M16.2,3.3 L15.2,3.8 L14.7,5.3 L15.7,5.5 Z"/>
<!-- Droid head -->
<path
android:fillColor="@android:color/white"
android:pathData="M8,8 Q8,5.2 12,5.2 Q16,5.2 16,8 L16,11 Q16,12.5 14.5,12.5 L9.5,12.5 Q8,12.5 8,11 Z"/>
<!-- USB main stem -->
<path
android:fillColor="@android:color/white"
android:pathData="M11.2,12.5 L12.8,12.5 L12.8,20 L11.2,20 Z"/>
<!-- USB horizontal bar -->
<path
android:fillColor="@android:color/white"
android:pathData="M9,14.8 L15,14.8 L15,16 L9,16 Z"/>
<!-- USB left branch vertical -->
<path
android:fillColor="@android:color/white"
android:pathData="M8.5,16 L9.6,16 L9.6,17 L8.5,17 Z"/>
<!-- USB left terminal rectangle -->
<path
android:fillColor="@android:color/white"
android:pathData="M8,17 L10.2,17 L10.2,19.2 L8,19.2 Z"/>
<!-- USB right branch vertical -->
<path
android:fillColor="@android:color/white"
android:pathData="M14.4,16 L15.5,16 L15.5,17.5 L14.4,17.5 Z"/>
<!-- USB right terminal circle -->
<path
android:fillColor="@android:color/white"
android:pathData="M15,18.5 m-1.2,0 a1.2,1.2 0 1,1 2.4,0 a1.2,1.2 0 1,1 -2.4,0"/>
<!-- USB bottom arrow -->
<path
android:fillColor="@android:color/white"
android:pathData="M10.5,20 L12,22 L13.5,20 Z"/>
</vector>

View File

@@ -2,5 +2,5 @@
<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>
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
</adaptive-icon>

View File

@@ -2,5 +2,5 @@
<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>
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
</adaptive-icon>

77
build_isodrive.sh Executable file
View File

@@ -0,0 +1,77 @@
#!/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

View File

@@ -229,13 +229,13 @@ fun toCommandArgs(): List<String> {
**Example commands:**
```bash
# Mount as read-only mass storage
isodrive "/sdcard/isodrive/ubuntu.iso" -configfs
isodrive "/sdcard/isodroid/ubuntu.iso" -configfs
# Mount as writable drive
isodrive "/sdcard/isodrive/drive.img" -rw -configfs
isodrive "/sdcard/isodroid/drive.img" -rw -configfs
# Mount as CD-ROM
isodrive "/sdcard/isodrive/windows.iso" -cdrom -configfs
isodrive "/sdcard/isodroid/windows.iso" -cdrom -configfs
```
## Event System
@@ -338,7 +338,7 @@ private val KEY_ISO_DIRECTORY = stringPreferencesKey("iso_directory")
```
Stores:
- Custom ISO directory path (default: `/sdcard/isodrive/`)
- Custom ISO directory path (default: `/sdcard/isodroid/`)
### SharedPreferences

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -0,0 +1,9 @@
* New app icon
* Mount ISO/IMG files as USB mass storage or CD-ROM
* Create blank IMG files for writable USB drives
* Read-only or read-write mount options
* Persistent notification with quick unmount button
* OS-specific icons for popular distributions
* Download links to popular operating systems
* Rename and delete files
* Material 3 dynamic theming with dark mode support

View File

@@ -0,0 +1,24 @@
ISO Droid lets you mount ISO and IMG files as USB mass storage or CD-ROM devices on rooted Android devices. Connect your phone to any PC and it will appear as a bootable USB drive or CD-ROM.
Features:
* Mount ISO/IMG files as USB mass storage or CD-ROM
* Create blank IMG files for writable USB drives
* Read-only or read-write mount options
* Persistent notification with quick unmount button
* OS-specific icons for popular distributions (Linux, BSD, etc.)
* Download links to popular operating systems
* Rename and delete files
* Material 3 dynamic theming with dark mode support
Requirements:
* Rooted Android device (Magisk, KernelSU, APatch, etc.)
* USB gadget support (configfs or sysfs)
* Android 8.0+ (API 26)
Usage:
1. Place your ISO/IMG files in /sdcard/isodroid/
2. Select an ISO/IMG file from the list
3. Choose mount options (Mass Storage or CD-ROM)
4. Tap Mount
5. Connect your phone to a PC via USB
6. Unmount via the app or notification when done

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

View File

@@ -0,0 +1 @@
Mount ISO/IMG files as USB drives on rooted Android

View File

@@ -0,0 +1 @@
ISO Droid

18
get_isodrive.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/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

BIN
isodroid_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

44
isodroid_logo.svg Normal file
View File

@@ -0,0 +1,44 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 108 108" width="512" height="512">
<!-- Background -->
<rect width="108" height="108" rx="20" fill="#3DDC84"/>
<!-- Left antenna ball -->
<circle cx="38" cy="24" r="3" fill="#FFFFFF"/>
<!-- Left antenna stem -->
<line x1="39.5" y1="26.5" x2="44" y2="33" stroke="#FFFFFF" stroke-width="3.5" stroke-linecap="round"/>
<!-- Right antenna ball -->
<circle cx="70" cy="24" r="3" fill="#FFFFFF"/>
<!-- Right antenna stem -->
<line x1="68.5" y1="26.5" x2="64" y2="33" stroke="#FFFFFF" stroke-width="3.5" stroke-linecap="round"/>
<!-- Droid head -->
<path d="M34,42 Q34,30 54,30 Q74,30 74,42 L74,56 Q74,62 68,62 L40,62 Q34,62 34,56 Z" fill="#FFFFFF"/>
<!-- Left eye -->
<circle cx="44" cy="46" r="4" fill="#3DDC84"/>
<!-- Right eye -->
<circle cx="64" cy="46" r="4" fill="#3DDC84"/>
<!-- USB main stem -->
<line x1="54" y1="62" x2="54" y2="88" stroke="#FFFFFF" stroke-width="5" stroke-linecap="round"/>
<!-- USB horizontal bar -->
<line x1="40" y1="70" x2="68" y2="70" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round"/>
<!-- USB left branch -->
<line x1="40" y1="70" x2="40" y2="76" stroke="#FFFFFF" stroke-width="3.5" stroke-linecap="round"/>
<!-- USB left terminal rectangle -->
<rect x="36" y="76" width="8" height="6" fill="#FFFFFF"/>
<!-- USB right branch -->
<line x1="68" y1="70" x2="68" y2="76" stroke="#FFFFFF" stroke-width="3.5" stroke-linecap="round"/>
<!-- USB right terminal circle -->
<circle cx="68" cy="80" r="4" fill="#FFFFFF"/>
<!-- USB bottom arrow -->
<path d="M48,88 L54,94 L60,88" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB