Add Android forensics, IOC threat-intel DB, Compose companion; scrub secrets from configs
This commit is contained in:
@@ -30,7 +30,7 @@ android {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(24)
|
||||
jvmToolchain(21)
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
|
||||
BIN
autarch_companion/app/src/main/assets/bin/busybox
Normal file
BIN
autarch_companion/app/src/main/assets/bin/busybox
Normal file
Binary file not shown.
@@ -1,14 +1,26 @@
|
||||
// Copyright 2026 DarkHal
|
||||
package com.darkhal.archon
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.MenuItem
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.GravityCompat
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
import androidx.navigation.NavController
|
||||
import androidx.navigation.fragment.NavHostFragment
|
||||
import androidx.navigation.ui.setupWithNavController
|
||||
import com.darkhal.archon.messaging.MessagingModule
|
||||
import com.darkhal.archon.module.ModuleManager
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
import com.google.android.material.appbar.MaterialToolbar
|
||||
import com.google.android.material.navigation.NavigationView
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListener {
|
||||
|
||||
private lateinit var drawerLayout: DrawerLayout
|
||||
private lateinit var navView: NavigationView
|
||||
private lateinit var toolbar: MaterialToolbar
|
||||
private lateinit var navController: NavController
|
||||
private lateinit var toggle: ActionBarDrawerToggle
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
@@ -20,11 +32,62 @@ class MainActivity : AppCompatActivity() {
|
||||
// Register SMS/RCS messaging module
|
||||
ModuleManager.register(MessagingModule())
|
||||
|
||||
// Setup toolbar
|
||||
toolbar = findViewById(R.id.toolbar)
|
||||
setSupportActionBar(toolbar)
|
||||
|
||||
// Setup drawer
|
||||
drawerLayout = findViewById(R.id.drawer_layout)
|
||||
navView = findViewById(R.id.nav_view)
|
||||
|
||||
toggle = ActionBarDrawerToggle(
|
||||
this,
|
||||
drawerLayout,
|
||||
toolbar,
|
||||
R.string.drawer_open,
|
||||
R.string.drawer_close
|
||||
)
|
||||
drawerLayout.addDrawerListener(toggle)
|
||||
toggle.syncState()
|
||||
|
||||
// Setup navigation controller
|
||||
val navHostFragment = supportFragmentManager
|
||||
.findFragmentById(R.id.nav_host_fragment) as NavHostFragment
|
||||
val navController = navHostFragment.navController
|
||||
navController = navHostFragment.navController
|
||||
|
||||
val bottomNav = findViewById<BottomNavigationView>(R.id.bottom_nav)
|
||||
bottomNav.setupWithNavController(navController)
|
||||
// Listen for drawer item clicks
|
||||
navView.setNavigationItemSelectedListener(this)
|
||||
|
||||
// Highlight current destination in drawer
|
||||
navController.addOnDestinationChangedListener { _, destination, _ ->
|
||||
val menuItem = navView.menu.findItem(destination.id)
|
||||
if (menuItem != null) {
|
||||
navView.setCheckedItem(menuItem)
|
||||
}
|
||||
// Update toolbar title from destination label
|
||||
supportActionBar?.title = destination.label ?: getString(R.string.drawer_app_name)
|
||||
}
|
||||
|
||||
// Select Dashboard by default
|
||||
navView.setCheckedItem(R.id.nav_dashboard)
|
||||
}
|
||||
|
||||
override fun onNavigationItemSelected(item: MenuItem): Boolean {
|
||||
// Navigate to the selected destination
|
||||
val currentDest = navController.currentDestination?.id
|
||||
if (item.itemId != currentDest) {
|
||||
navController.navigate(item.itemId)
|
||||
}
|
||||
drawerLayout.closeDrawer(GravityCompat.START)
|
||||
return true
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun onBackPressed() {
|
||||
if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
|
||||
drawerLayout.closeDrawer(GravityCompat.START)
|
||||
} else {
|
||||
super.onBackPressed()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.darkhal.archon.ui
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.darkhal.archon.LoginActivity
|
||||
import com.darkhal.archon.R
|
||||
import com.darkhal.archon.util.AuthManager
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
|
||||
class AboutFragment : Fragment() {
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View =
|
||||
inflater.inflate(R.layout.fragment_about, container, false)
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
try {
|
||||
val info = requireContext().packageManager.getPackageInfo(requireContext().packageName, 0)
|
||||
view.findViewById<TextView>(R.id.about_version)?.text = "v${info.versionName}"
|
||||
} catch (_: Exception) {}
|
||||
|
||||
view.findViewById<MaterialButton>(R.id.btn_logout)?.setOnClickListener {
|
||||
AuthManager.logout(requireContext())
|
||||
val intent = Intent(requireContext(), LoginActivity::class.java)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
view.findViewById<MaterialButton>(R.id.btn_clear_data)?.setOnClickListener {
|
||||
MaterialAlertDialogBuilder(requireContext())
|
||||
.setTitle("Clear App Data")
|
||||
.setMessage("This will erase all settings, saved keys, and cached data. Are you sure?")
|
||||
.setNegativeButton("Cancel", null)
|
||||
.setPositiveButton("Clear") { _, _ ->
|
||||
requireContext().getSharedPreferences("archon_prefs", 0).edit().clear().apply()
|
||||
requireContext().getSharedPreferences("archon_adb_keys", 0).edit().clear().apply()
|
||||
AuthManager.logout(requireContext())
|
||||
val intent = Intent(requireContext(), LoginActivity::class.java)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
startActivity(intent)
|
||||
}
|
||||
.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
// Copyright 2026 DarkHal
|
||||
package com.darkhal.archon.ui
|
||||
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.EditText
|
||||
import android.widget.ImageButton
|
||||
import android.widget.TextView
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.darkhal.archon.R
|
||||
import com.darkhal.archon.messaging.ShizukuManager
|
||||
import com.darkhal.archon.util.BusyboxInstaller
|
||||
import com.darkhal.archon.service.LocalAdbClient
|
||||
import com.darkhal.archon.util.PrivilegeManager
|
||||
import com.darkhal.archon.util.ShellExecutor
|
||||
import com.darkhal.archon.util.ShellResult
|
||||
import com.google.android.material.button.MaterialButton
|
||||
|
||||
/**
|
||||
* Interactive ADB shell terminal using RecyclerView for scrollable output.
|
||||
* Connects through the privilege chain: Root > Shizuku > Local ADB > Archon Server
|
||||
* Compatible with Shizuku AND our own privilege system simultaneously.
|
||||
*/
|
||||
class AdbShellFragment : Fragment() {
|
||||
|
||||
private lateinit var outputRecycler: RecyclerView
|
||||
private lateinit var inputField: EditText
|
||||
private lateinit var sendBtn: ImageButton
|
||||
private lateinit var connectBtn: MaterialButton
|
||||
private lateinit var clearBtn: MaterialButton
|
||||
private lateinit var statusDot: View
|
||||
private lateinit var statusText: TextView
|
||||
|
||||
private val adapter = ShellOutputAdapter()
|
||||
private val handler = Handler(Looper.getMainLooper())
|
||||
private val commandHistory = mutableListOf<String>()
|
||||
private var historyIndex = -1
|
||||
|
||||
private enum class ShellMethod { ROOT, SHIZUKU, LOCAL_ADB, SERVER_ADB, NONE }
|
||||
private var activeMethod = ShellMethod.NONE
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
|
||||
): View = inflater.inflate(R.layout.fragment_adb_shell, container, false)
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
outputRecycler = view.findViewById(R.id.shell_output)
|
||||
inputField = view.findViewById(R.id.shell_input)
|
||||
sendBtn = view.findViewById(R.id.btn_shell_send)
|
||||
connectBtn = view.findViewById(R.id.btn_shell_connect)
|
||||
clearBtn = view.findViewById(R.id.btn_shell_clear)
|
||||
statusDot = view.findViewById(R.id.shell_status_dot)
|
||||
statusText = view.findViewById(R.id.shell_status_text)
|
||||
|
||||
outputRecycler.layoutManager = LinearLayoutManager(requireContext())
|
||||
outputRecycler.adapter = adapter
|
||||
|
||||
// Install busybox on first launch
|
||||
Thread {
|
||||
val installed = BusyboxInstaller.install(requireContext())
|
||||
val version = if (installed) BusyboxInstaller.getVersion(requireContext()) else null
|
||||
handler.post {
|
||||
adapter.addSystem("AUTARCH ADB Shell v1.0")
|
||||
if (version != null) {
|
||||
adapter.addSystem("Busybox: $version")
|
||||
}
|
||||
adapter.addSystem("Type 'help' for available commands")
|
||||
scrollToBottom()
|
||||
}
|
||||
}.start()
|
||||
|
||||
sendBtn.setOnClickListener { executeCurrentInput() }
|
||||
connectBtn.setOnClickListener { autoConnect() }
|
||||
clearBtn.setOnClickListener {
|
||||
adapter.clear()
|
||||
adapter.addSystem("Terminal cleared")
|
||||
}
|
||||
|
||||
inputField.setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEND || actionId == EditorInfo.IME_ACTION_DONE) {
|
||||
executeCurrentInput()
|
||||
true
|
||||
} else false
|
||||
}
|
||||
|
||||
autoConnect()
|
||||
}
|
||||
|
||||
private fun executeCurrentInput() {
|
||||
val cmd = inputField.text.toString().trim()
|
||||
if (cmd.isEmpty()) return
|
||||
|
||||
inputField.setText("")
|
||||
commandHistory.add(0, cmd)
|
||||
historyIndex = -1
|
||||
|
||||
when (cmd.lowercase()) {
|
||||
"clear" -> { adapter.clear(); return }
|
||||
"help" -> {
|
||||
adapter.addSystem("Built-in: clear, status, reconnect, history, exit")
|
||||
adapter.addSystem("All other commands sent to device shell")
|
||||
scrollToBottom()
|
||||
return
|
||||
}
|
||||
"status" -> {
|
||||
adapter.addSystem("Method: ${activeMethod.name}")
|
||||
adapter.addSystem("Privilege: ${PrivilegeManager.getAvailableMethod().label}")
|
||||
scrollToBottom()
|
||||
return
|
||||
}
|
||||
"reconnect" -> { autoConnect(); return }
|
||||
"history" -> {
|
||||
if (commandHistory.isEmpty()) {
|
||||
adapter.addSystem("No command history")
|
||||
} else {
|
||||
commandHistory.forEachIndexed { i, c -> adapter.addSystem(" ${i + 1}: $c") }
|
||||
}
|
||||
scrollToBottom()
|
||||
return
|
||||
}
|
||||
"exit" -> {
|
||||
activeMethod = ShellMethod.NONE
|
||||
updateStatus()
|
||||
adapter.addSystem("Disconnected")
|
||||
scrollToBottom()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
adapter.addCommand(cmd)
|
||||
scrollToBottom()
|
||||
|
||||
Thread {
|
||||
val result = executeShellCommand(cmd)
|
||||
handler.post {
|
||||
if (result.stdout.isNotEmpty()) adapter.addStdout(result.stdout)
|
||||
if (result.stderr.isNotEmpty()) adapter.addStderr(result.stderr)
|
||||
if (result.exitCode != 0 && result.stdout.isEmpty() && result.stderr.isEmpty()) {
|
||||
adapter.addStderr("Exit code: ${result.exitCode}")
|
||||
}
|
||||
scrollToBottom()
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
private fun executeShellCommand(command: String): ShellResult {
|
||||
return when (activeMethod) {
|
||||
ShellMethod.ROOT -> ShellExecutor.execute("su -c '$command'")
|
||||
ShellMethod.SHIZUKU -> {
|
||||
try {
|
||||
val output = ShizukuManager(requireContext()).executeCommand(command)
|
||||
ShellResult(output, "", 0)
|
||||
} catch (e: Exception) {
|
||||
ShellResult("", "Shizuku error: ${e.message}", -1)
|
||||
}
|
||||
}
|
||||
ShellMethod.LOCAL_ADB -> LocalAdbClient.execute(command)
|
||||
ShellMethod.SERVER_ADB -> PrivilegeManager.execute(command)
|
||||
ShellMethod.NONE -> ShellResult("", "No shell access. Tap CONNECT.", -1)
|
||||
}
|
||||
}
|
||||
|
||||
private fun autoConnect() {
|
||||
adapter.addSystem("Connecting...")
|
||||
updateStatus("Connecting...", false)
|
||||
|
||||
Thread {
|
||||
val method = detectBestMethod()
|
||||
handler.post {
|
||||
activeMethod = method
|
||||
updateStatus()
|
||||
when (method) {
|
||||
ShellMethod.ROOT -> adapter.addSystem("Connected via root (su)")
|
||||
ShellMethod.SHIZUKU -> adapter.addSystem("Connected via Shizuku")
|
||||
ShellMethod.LOCAL_ADB -> adapter.addSystem("Connected via wireless ADB")
|
||||
ShellMethod.SERVER_ADB -> adapter.addSystem("Connected via Archon Server")
|
||||
ShellMethod.NONE -> {
|
||||
adapter.addSystem("No shell access available")
|
||||
adapter.addSystem("Enable root, Shizuku, or Wireless Debugging")
|
||||
}
|
||||
}
|
||||
scrollToBottom()
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
private fun detectBestMethod(): ShellMethod {
|
||||
val rootCheck = ShellExecutor.execute("su -c 'id'")
|
||||
if (rootCheck.exitCode == 0 && rootCheck.stdout.contains("uid=0")) return ShellMethod.ROOT
|
||||
|
||||
try {
|
||||
if (ShizukuManager(requireContext()).getStatus() == ShizukuManager.ShizukuStatus.READY)
|
||||
return ShellMethod.SHIZUKU
|
||||
} catch (_: Exception) {}
|
||||
|
||||
if (LocalAdbClient.isConnected()) return ShellMethod.LOCAL_ADB
|
||||
try {
|
||||
if (LocalAdbClient.autoConnect(requireContext())) return ShellMethod.LOCAL_ADB
|
||||
} catch (_: Exception) {}
|
||||
|
||||
if (PrivilegeManager.getAvailableMethod() != PrivilegeManager.Method.NONE) return ShellMethod.SERVER_ADB
|
||||
|
||||
return ShellMethod.NONE
|
||||
}
|
||||
|
||||
private fun updateStatus(text: String? = null, connected: Boolean? = null) {
|
||||
val isConnected = connected ?: (activeMethod != ShellMethod.NONE)
|
||||
statusDot.setBackgroundColor(
|
||||
if (isConnected) 0xFF98C379.toInt() else 0xFFE06C75.toInt()
|
||||
)
|
||||
statusText.text = text ?: when (activeMethod) {
|
||||
ShellMethod.ROOT -> "Connected (root)"
|
||||
ShellMethod.SHIZUKU -> "Connected (Shizuku)"
|
||||
ShellMethod.LOCAL_ADB -> "Connected (wireless ADB)"
|
||||
ShellMethod.SERVER_ADB -> "Connected (Archon Server)"
|
||||
ShellMethod.NONE -> "Disconnected"
|
||||
}
|
||||
}
|
||||
|
||||
private fun scrollToBottom() {
|
||||
if (adapter.itemCount > 0) {
|
||||
outputRecycler.smoothScrollToPosition(adapter.itemCount - 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
// Copyright 2026 DarkHal
|
||||
package com.darkhal.archon.ui
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.TypedValue
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.darkhal.archon.R
|
||||
import com.darkhal.archon.util.PrefsManager
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import com.google.android.material.slider.Slider
|
||||
|
||||
class AppearanceSettingsFragment : Fragment() {
|
||||
|
||||
private lateinit var fontSizeSlider: Slider
|
||||
private lateinit var previewText: TextView
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
|
||||
): View = inflater.inflate(R.layout.fragment_appearance_settings, container, false)
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
fontSizeSlider = view.findViewById(R.id.slider_font_size)
|
||||
previewText = view.findViewById(R.id.font_size_preview)
|
||||
|
||||
// Load saved font size
|
||||
val savedSize = PrefsManager.getFontSize(requireContext())
|
||||
fontSizeSlider.value = savedSize.toFloat()
|
||||
updatePreview(savedSize)
|
||||
|
||||
fontSizeSlider.addOnChangeListener { _, value, _ ->
|
||||
updatePreview(value.toInt())
|
||||
}
|
||||
|
||||
view.findViewById<MaterialButton>(R.id.btn_save_appearance).setOnClickListener {
|
||||
val size = fontSizeSlider.value.toInt()
|
||||
PrefsManager.setFontSize(requireContext(), size)
|
||||
Toast.makeText(requireContext(), "Appearance saved", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
|
||||
private fun updatePreview(sizeSp: Int) {
|
||||
previewText.setTextSize(TypedValue.COMPLEX_UNIT_SP, sizeSp.toFloat())
|
||||
previewText.text = "Preview text (${sizeSp}sp)"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
package com.darkhal.archon.ui
|
||||
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.darkhal.archon.R
|
||||
import com.darkhal.archon.service.DiscoveryManager
|
||||
import com.darkhal.archon.util.PrefsManager
|
||||
import com.darkhal.archon.util.ShellExecutor
|
||||
import com.darkhal.archon.util.SslHelper
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import com.google.android.material.textfield.TextInputEditText
|
||||
|
||||
class ConnectionSettingsFragment : Fragment() {
|
||||
|
||||
private lateinit var inputServerIp: TextInputEditText
|
||||
private lateinit var inputWebPort: TextInputEditText
|
||||
private lateinit var inputAdbPort: TextInputEditText
|
||||
private lateinit var inputUsbipPort: TextInputEditText
|
||||
private lateinit var statusText: TextView
|
||||
private val handler = Handler(Looper.getMainLooper())
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View =
|
||||
inflater.inflate(R.layout.fragment_settings_connection, container, false)
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
inputServerIp = view.findViewById(R.id.input_server_ip)
|
||||
inputWebPort = view.findViewById(R.id.input_web_port)
|
||||
inputAdbPort = view.findViewById(R.id.input_adb_port)
|
||||
inputUsbipPort = view.findViewById(R.id.input_usbip_port)
|
||||
statusText = view.findViewById(R.id.connection_status)
|
||||
|
||||
loadSettings()
|
||||
|
||||
view.findViewById<MaterialButton>(R.id.btn_save_connection).setOnClickListener { saveSettings() }
|
||||
view.findViewById<MaterialButton>(R.id.btn_auto_detect).setOnClickListener { autoDetect(it as MaterialButton) }
|
||||
view.findViewById<MaterialButton>(R.id.btn_test_connection).setOnClickListener { testConnection() }
|
||||
}
|
||||
|
||||
private fun loadSettings() {
|
||||
val ctx = requireContext()
|
||||
inputServerIp.setText(PrefsManager.getServerIp(ctx))
|
||||
inputWebPort.setText(PrefsManager.getWebPort(ctx).toString())
|
||||
inputAdbPort.setText(PrefsManager.getAdbPort(ctx).toString())
|
||||
inputUsbipPort.setText(PrefsManager.getUsbIpPort(ctx).toString())
|
||||
}
|
||||
|
||||
private fun saveSettings() {
|
||||
val ctx = requireContext()
|
||||
val ip = inputServerIp.text.toString().trim()
|
||||
val webPort = inputWebPort.text.toString().trim().toIntOrNull() ?: 8181
|
||||
val adbPort = inputAdbPort.text.toString().trim().toIntOrNull() ?: 5555
|
||||
val usbipPort = inputUsbipPort.text.toString().trim().toIntOrNull() ?: 3240
|
||||
|
||||
if (ip.isEmpty()) {
|
||||
statusText.text = "Error: Server IP cannot be empty"
|
||||
return
|
||||
}
|
||||
|
||||
PrefsManager.setServerIp(ctx, ip)
|
||||
PrefsManager.setWebPort(ctx, webPort)
|
||||
PrefsManager.setAdbPort(ctx, adbPort)
|
||||
PrefsManager.setUsbIpPort(ctx, usbipPort)
|
||||
|
||||
statusText.text = "Settings saved"
|
||||
Toast.makeText(ctx, "Settings saved", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
private fun autoDetect(btn: MaterialButton) {
|
||||
statusText.text = "Scanning for AUTARCH server..."
|
||||
btn.isEnabled = false
|
||||
|
||||
val discovery = DiscoveryManager(requireContext())
|
||||
discovery.listener = object : DiscoveryManager.Listener {
|
||||
override fun onServerFound(server: DiscoveryManager.DiscoveredServer) {
|
||||
discovery.stopDiscovery()
|
||||
handler.post {
|
||||
if (server.ip.isNotEmpty()) inputServerIp.setText(server.ip)
|
||||
if (server.port > 0) inputWebPort.setText(server.port.toString())
|
||||
statusText.text = "Found ${server.hostname} at ${server.ip}:${server.port}"
|
||||
btn.isEnabled = true
|
||||
}
|
||||
}
|
||||
override fun onDiscoveryStarted(method: DiscoveryManager.ConnectionMethod) {}
|
||||
override fun onDiscoveryStopped(method: DiscoveryManager.ConnectionMethod) {
|
||||
handler.post {
|
||||
if (discovery.getDiscoveredServers().isEmpty()) {
|
||||
statusText.text = "No server found on network"
|
||||
}
|
||||
btn.isEnabled = true
|
||||
}
|
||||
}
|
||||
override fun onDiscoveryError(method: DiscoveryManager.ConnectionMethod, error: String) {}
|
||||
}
|
||||
discovery.startDiscovery()
|
||||
}
|
||||
|
||||
private fun testConnection() {
|
||||
val ip = inputServerIp.text.toString().trim()
|
||||
val port = inputWebPort.text.toString().trim().toIntOrNull() ?: 8181
|
||||
if (ip.isEmpty()) { statusText.text = "Enter server IP first"; return }
|
||||
|
||||
statusText.text = "Testing $ip:$port..."
|
||||
Thread {
|
||||
val pingOk = ShellExecutor.execute("ping -c 1 -W 3 $ip").exitCode == 0
|
||||
val httpOk = try {
|
||||
val url = java.net.URL("https://$ip:$port/")
|
||||
val conn = url.openConnection() as java.net.HttpURLConnection
|
||||
SslHelper.trustSelfSigned(conn)
|
||||
conn.connectTimeout = 5000
|
||||
conn.readTimeout = 5000
|
||||
val code = conn.responseCode
|
||||
conn.disconnect()
|
||||
code in 200..399
|
||||
} catch (_: Exception) { false }
|
||||
|
||||
handler.post {
|
||||
statusText.text = "Ping: ${if (pingOk) "OK" else "FAIL"}\nHTTPS: ${if (httpOk) "OK" else "FAIL"}"
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
package com.darkhal.archon.ui
|
||||
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.darkhal.archon.R
|
||||
import com.darkhal.archon.messaging.ShizukuManager
|
||||
import com.darkhal.archon.service.LocalAdbClient
|
||||
import com.darkhal.archon.util.PrefsManager
|
||||
import com.darkhal.archon.util.PrivilegeManager
|
||||
import com.darkhal.archon.util.ShellExecutor
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import com.google.android.material.materialswitch.MaterialSwitch
|
||||
import com.google.android.material.textfield.TextInputEditText
|
||||
|
||||
class PrivilegeSettingsFragment : Fragment() {
|
||||
|
||||
private lateinit var currentMethodText: TextView
|
||||
private lateinit var statusRoot: TextView
|
||||
private lateinit var statusShizuku: TextView
|
||||
private lateinit var statusAdb: TextView
|
||||
private lateinit var statusServer: TextView
|
||||
private lateinit var dotRoot: View
|
||||
private lateinit var dotShizuku: View
|
||||
private lateinit var dotAdb: View
|
||||
private lateinit var dotServer: View
|
||||
private lateinit var pairingCodeInput: TextInputEditText
|
||||
private lateinit var switchAutoRestart: MaterialSwitch
|
||||
private val handler = Handler(Looper.getMainLooper())
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View =
|
||||
inflater.inflate(R.layout.fragment_settings_privileges, container, false)
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
currentMethodText = view.findViewById(R.id.priv_current_method)
|
||||
statusRoot = view.findViewById(R.id.status_root)
|
||||
statusShizuku = view.findViewById(R.id.status_shizuku)
|
||||
statusAdb = view.findViewById(R.id.status_adb)
|
||||
statusServer = view.findViewById(R.id.status_server)
|
||||
dotRoot = view.findViewById(R.id.dot_root)
|
||||
dotShizuku = view.findViewById(R.id.dot_shizuku)
|
||||
dotAdb = view.findViewById(R.id.dot_adb)
|
||||
dotServer = view.findViewById(R.id.dot_server)
|
||||
pairingCodeInput = view.findViewById(R.id.input_pairing_code)
|
||||
switchAutoRestart = view.findViewById(R.id.switch_auto_restart_adb)
|
||||
|
||||
switchAutoRestart.isChecked = PrefsManager.isAutoRestartAdb(requireContext())
|
||||
switchAutoRestart.setOnCheckedChangeListener { _, checked ->
|
||||
PrefsManager.setAutoRestartAdb(requireContext(), checked)
|
||||
}
|
||||
|
||||
view.findViewById<MaterialButton>(R.id.btn_shizuku_request).setOnClickListener {
|
||||
requestShizukuPermission()
|
||||
}
|
||||
|
||||
view.findViewById<MaterialButton>(R.id.btn_adb_pair).setOnClickListener {
|
||||
pairAdb()
|
||||
}
|
||||
|
||||
view.findViewById<MaterialButton>(R.id.btn_refresh_status).setOnClickListener {
|
||||
refreshStatus()
|
||||
}
|
||||
|
||||
refreshStatus()
|
||||
}
|
||||
|
||||
private fun refreshStatus() {
|
||||
currentMethodText.text = "Detecting..."
|
||||
|
||||
Thread {
|
||||
val bestMethod = PrivilegeManager.getAvailableMethod()
|
||||
|
||||
// Root check
|
||||
val rootResult = ShellExecutor.execute("su -c 'id'")
|
||||
val hasRoot = rootResult.exitCode == 0 && rootResult.stdout.contains("uid=0")
|
||||
|
||||
// Shizuku check
|
||||
val shizukuStatus = try {
|
||||
ShizukuManager(requireContext()).getStatus()
|
||||
} catch (_: Exception) {
|
||||
ShizukuManager.ShizukuStatus.NOT_INSTALLED
|
||||
}
|
||||
|
||||
// ADB check
|
||||
val adbConnected = LocalAdbClient.isConnected()
|
||||
val adbPaired = LocalAdbClient.isPaired(requireContext())
|
||||
|
||||
// Server check
|
||||
val serverOk = bestMethod == PrivilegeManager.Method.ARCHON_SERVER ||
|
||||
bestMethod == PrivilegeManager.Method.SERVER_ADB
|
||||
|
||||
handler.post {
|
||||
currentMethodText.text = bestMethod.label
|
||||
|
||||
setDot(dotRoot, hasRoot)
|
||||
statusRoot.text = if (hasRoot) "Root available (su)" else "No root access"
|
||||
|
||||
setDot(dotShizuku, shizukuStatus == ShizukuManager.ShizukuStatus.READY)
|
||||
statusShizuku.text = shizukuStatus.label
|
||||
|
||||
setDot(dotAdb, adbConnected)
|
||||
statusAdb.text = when {
|
||||
adbConnected -> "Connected"
|
||||
adbPaired -> "Paired, not connected"
|
||||
else -> "Not paired"
|
||||
}
|
||||
|
||||
setDot(dotServer, serverOk)
|
||||
statusServer.text = if (serverOk) "Connected" else "Not connected"
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
private fun setDot(dot: View, active: Boolean) {
|
||||
dot.setBackgroundColor(if (active) 0xFF98C379.toInt() else 0xFFE06C75.toInt())
|
||||
}
|
||||
|
||||
private fun requestShizukuPermission() {
|
||||
try {
|
||||
val mgr = ShizukuManager(requireContext())
|
||||
val status = mgr.getStatus()
|
||||
when (status) {
|
||||
ShizukuManager.ShizukuStatus.NOT_INSTALLED ->
|
||||
Toast.makeText(requireContext(), "Install Shizuku from Play Store first", Toast.LENGTH_LONG).show()
|
||||
ShizukuManager.ShizukuStatus.INSTALLED_NOT_RUNNING ->
|
||||
Toast.makeText(requireContext(), "Start Shizuku app first", Toast.LENGTH_LONG).show()
|
||||
ShizukuManager.ShizukuStatus.RUNNING_NO_PERMISSION ->
|
||||
Toast.makeText(requireContext(), "Requesting permission...", Toast.LENGTH_SHORT).show()
|
||||
ShizukuManager.ShizukuStatus.READY ->
|
||||
Toast.makeText(requireContext(), "Shizuku already ready", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Toast.makeText(requireContext(), "Shizuku error: ${e.message}", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
refreshStatus()
|
||||
}
|
||||
|
||||
private fun pairAdb() {
|
||||
val code = pairingCodeInput.text.toString().trim()
|
||||
if (code.isEmpty()) {
|
||||
Toast.makeText(requireContext(), "Enter the pairing code from Developer Options", Toast.LENGTH_LONG).show()
|
||||
return
|
||||
}
|
||||
|
||||
Toast.makeText(requireContext(), "Discovering pairing service...", Toast.LENGTH_SHORT).show()
|
||||
Thread {
|
||||
val port = LocalAdbClient.discoverPairingPort(requireContext(), 15)
|
||||
if (port == null) {
|
||||
handler.post {
|
||||
Toast.makeText(requireContext(), "Could not find pairing service. Is Wireless Debugging enabled?", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
return@Thread
|
||||
}
|
||||
|
||||
val success = LocalAdbClient.pair(requireContext(), "127.0.0.1", port, code)
|
||||
handler.post {
|
||||
if (success) {
|
||||
Toast.makeText(requireContext(), "Paired successfully!", Toast.LENGTH_SHORT).show()
|
||||
pairingCodeInput.setText("")
|
||||
} else {
|
||||
Toast.makeText(requireContext(), "Pairing failed. Check the code and try again.", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
refreshStatus()
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
// Copyright 2026 DarkHal
|
||||
package com.darkhal.archon.ui
|
||||
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.RadioButton
|
||||
import android.widget.RadioGroup
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.darkhal.archon.R
|
||||
import com.darkhal.archon.util.PrefsManager
|
||||
import com.darkhal.archon.util.PrivilegeManager
|
||||
import com.darkhal.archon.util.ShellExecutor
|
||||
import com.google.android.material.button.MaterialButton
|
||||
|
||||
class PrivilegesSettingsFragment : Fragment() {
|
||||
|
||||
private lateinit var radioGroup: RadioGroup
|
||||
private lateinit var statusText: TextView
|
||||
private val handler = Handler(Looper.getMainLooper())
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
|
||||
): View = inflater.inflate(R.layout.fragment_privileges_settings, container, false)
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
radioGroup = view.findViewById(R.id.radio_privilege_mode)
|
||||
statusText = view.findViewById(R.id.privilege_status)
|
||||
|
||||
// Set current mode based on detected best method
|
||||
view.findViewById<MaterialButton>(R.id.btn_save_privileges).setOnClickListener {
|
||||
savePrivilegeMode()
|
||||
}
|
||||
|
||||
checkPrivilegeStatus()
|
||||
}
|
||||
|
||||
private fun checkPrivilegeStatus() {
|
||||
statusText.text = getString(R.string.privilege_status_checking)
|
||||
|
||||
Thread {
|
||||
val method = PrivilegeManager.getAvailableMethod()
|
||||
|
||||
// Check root
|
||||
val rootAvailable = ShellExecutor.execute("su -c 'id'").exitCode == 0
|
||||
|
||||
// Check Shizuku (via our Archon Server)
|
||||
val archonAvailable = method == PrivilegeManager.Method.ARCHON_SERVER
|
||||
|
||||
// Check local ADB
|
||||
val adbAvailable = method == PrivilegeManager.Method.LOCAL_ADB ||
|
||||
method == PrivilegeManager.Method.SERVER_ADB
|
||||
|
||||
handler.post {
|
||||
val status = StringBuilder()
|
||||
status.appendLine("Detected: ${method.label}")
|
||||
status.appendLine()
|
||||
status.appendLine("Root: ${if (rootAvailable) "Available" else "Not available"}")
|
||||
status.appendLine("Archon Server: ${if (archonAvailable) "Running" else "Not running"}")
|
||||
status.appendLine("ADB: ${if (adbAvailable) "Connected" else "Not connected"}")
|
||||
statusText.text = status.toString()
|
||||
|
||||
// Select the radio matching current mode
|
||||
when (method) {
|
||||
PrivilegeManager.Method.ROOT ->
|
||||
radioGroup.check(R.id.radio_root)
|
||||
PrivilegeManager.Method.ARCHON_SERVER ->
|
||||
radioGroup.check(R.id.radio_shizuku)
|
||||
PrivilegeManager.Method.LOCAL_ADB, PrivilegeManager.Method.SERVER_ADB ->
|
||||
radioGroup.check(R.id.radio_adb)
|
||||
PrivilegeManager.Method.NONE ->
|
||||
radioGroup.check(R.id.radio_none)
|
||||
}
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
private fun savePrivilegeMode() {
|
||||
val selected = when (radioGroup.checkedRadioButtonId) {
|
||||
R.id.radio_root -> "root"
|
||||
R.id.radio_shizuku -> "shizuku"
|
||||
R.id.radio_adb -> "adb"
|
||||
R.id.radio_none -> "none"
|
||||
else -> "none"
|
||||
}
|
||||
|
||||
PrefsManager.setPreferredPrivilegeMode(requireContext(), selected)
|
||||
Toast.makeText(requireContext(), "Privilege mode saved: $selected", Toast.LENGTH_SHORT).show()
|
||||
|
||||
// Re-check to show actual status
|
||||
checkPrivilegeStatus()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.darkhal.archon.ui
|
||||
|
||||
import android.graphics.Typeface
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.darkhal.archon.R
|
||||
|
||||
/**
|
||||
* RecyclerView adapter for the ADB shell terminal output.
|
||||
* Supports 4 line types with different colors:
|
||||
* COMMAND - green, prefixed with >
|
||||
* STDOUT - white/light gray
|
||||
* STDERR - red
|
||||
* SYSTEM - yellow italic (connection messages, errors, etc.)
|
||||
*/
|
||||
class ShellOutputAdapter : RecyclerView.Adapter<ShellOutputAdapter.LineViewHolder>() {
|
||||
|
||||
enum class LineType { COMMAND, STDOUT, STDERR, SYSTEM }
|
||||
|
||||
data class ShellLine(val text: String, val type: LineType)
|
||||
|
||||
private val lines = mutableListOf<ShellLine>()
|
||||
|
||||
fun addCommand(cmd: String) {
|
||||
lines.add(ShellLine("> $cmd", LineType.COMMAND))
|
||||
notifyItemInserted(lines.size - 1)
|
||||
}
|
||||
|
||||
fun addStdout(text: String) {
|
||||
if (text.isBlank()) return
|
||||
for (line in text.lines()) {
|
||||
lines.add(ShellLine(line, LineType.STDOUT))
|
||||
}
|
||||
notifyItemRangeInserted(lines.size - text.lines().size, text.lines().size)
|
||||
}
|
||||
|
||||
fun addStderr(text: String) {
|
||||
if (text.isBlank()) return
|
||||
for (line in text.lines()) {
|
||||
lines.add(ShellLine(line, LineType.STDERR))
|
||||
}
|
||||
notifyItemRangeInserted(lines.size - text.lines().size, text.lines().size)
|
||||
}
|
||||
|
||||
fun addSystem(text: String) {
|
||||
lines.add(ShellLine(text, LineType.SYSTEM))
|
||||
notifyItemInserted(lines.size - 1)
|
||||
}
|
||||
|
||||
fun clear() {
|
||||
val count = lines.size
|
||||
lines.clear()
|
||||
notifyItemRangeRemoved(0, count)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = lines.size
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): LineViewHolder {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_shell_output, parent, false)
|
||||
return LineViewHolder(view)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: LineViewHolder, position: Int) {
|
||||
val line = lines[position]
|
||||
holder.textView.text = line.text
|
||||
|
||||
when (line.type) {
|
||||
LineType.COMMAND -> {
|
||||
holder.textView.setTextColor(0xFF98C379.toInt()) // green
|
||||
holder.textView.setTypeface(Typeface.MONOSPACE, Typeface.BOLD)
|
||||
}
|
||||
LineType.STDOUT -> {
|
||||
holder.textView.setTextColor(0xFFD4D4D4.toInt()) // light gray
|
||||
holder.textView.setTypeface(Typeface.MONOSPACE, Typeface.NORMAL)
|
||||
}
|
||||
LineType.STDERR -> {
|
||||
holder.textView.setTextColor(0xFFE06C75.toInt()) // red
|
||||
holder.textView.setTypeface(Typeface.MONOSPACE, Typeface.NORMAL)
|
||||
}
|
||||
LineType.SYSTEM -> {
|
||||
holder.textView.setTextColor(0xFFE5C07B.toInt()) // yellow
|
||||
holder.textView.setTypeface(Typeface.MONOSPACE, Typeface.ITALIC)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class LineViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val textView: TextView = view.findViewById(R.id.shell_line_text)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.darkhal.archon.ui
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.fragment.app.Fragment
|
||||
|
||||
/**
|
||||
* Placeholder fragment for pentesting tools that aren't implemented yet.
|
||||
* Shows the tool name and a "coming soon" message.
|
||||
* Pass the tool name via arguments bundle with key "tool_name".
|
||||
*/
|
||||
class ToolPlaceholderFragment : Fragment() {
|
||||
|
||||
companion object {
|
||||
fun newInstance(toolName: String): ToolPlaceholderFragment {
|
||||
return ToolPlaceholderFragment().apply {
|
||||
arguments = Bundle().apply {
|
||||
putString("tool_name", toolName)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||
val toolName = arguments?.getString("tool_name") ?: "Tool"
|
||||
|
||||
val layout = LinearLayout(requireContext()).apply {
|
||||
orientation = LinearLayout.VERTICAL
|
||||
setPadding(48, 48, 48, 48)
|
||||
}
|
||||
|
||||
val title = TextView(requireContext()).apply {
|
||||
text = toolName
|
||||
textSize = 24f
|
||||
setTextColor(0xFFD4D4D4.toInt())
|
||||
}
|
||||
|
||||
val subtitle = TextView(requireContext()).apply {
|
||||
text = "Implementation in progress"
|
||||
textSize = 14f
|
||||
setTextColor(0xFF858585.toInt())
|
||||
}
|
||||
|
||||
layout.addView(title)
|
||||
layout.addView(subtitle)
|
||||
|
||||
return layout
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
// Copyright 2026 DarkHal
|
||||
package com.darkhal.archon.util
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import java.io.File
|
||||
import java.io.FileOutputStream
|
||||
|
||||
/**
|
||||
* Extracts the bundled busybox binary from APK assets to the app's
|
||||
* private directory on first launch. Creates symlinks for all applets
|
||||
* so they can be called by name (ls, grep, find, etc.).
|
||||
*
|
||||
* The binary is a static ARM64 build that works without root on any
|
||||
* Android device. It provides 300+ Unix utilities in a single 2.7MB file.
|
||||
*/
|
||||
object BusyboxInstaller {
|
||||
|
||||
private const val TAG = "BusyboxInstaller"
|
||||
private const val ASSET_PATH = "bin/busybox"
|
||||
private const val BIN_DIR = "busybox"
|
||||
private const val BUSYBOX_NAME = "busybox"
|
||||
|
||||
/**
|
||||
* Get the path to the busybox binary. Extracts from assets if needed.
|
||||
* Returns null if extraction fails.
|
||||
*/
|
||||
fun getBusyboxPath(context: Context): String? {
|
||||
val binDir = File(context.filesDir, BIN_DIR)
|
||||
val busybox = File(binDir, BUSYBOX_NAME)
|
||||
|
||||
if (busybox.exists() && busybox.canExecute()) {
|
||||
return busybox.absolutePath
|
||||
}
|
||||
|
||||
return if (install(context)) busybox.absolutePath else null
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the bin directory containing busybox and its symlinks.
|
||||
* Use this as a PATH prefix for shell sessions.
|
||||
*/
|
||||
fun getBinDir(context: Context): String {
|
||||
val binDir = File(context.filesDir, BIN_DIR)
|
||||
binDir.mkdirs()
|
||||
return binDir.absolutePath
|
||||
}
|
||||
|
||||
/**
|
||||
* Install busybox from APK assets. Returns true on success.
|
||||
*/
|
||||
fun install(context: Context): Boolean {
|
||||
val binDir = File(context.filesDir, BIN_DIR)
|
||||
val busybox = File(binDir, BUSYBOX_NAME)
|
||||
|
||||
try {
|
||||
binDir.mkdirs()
|
||||
|
||||
// Extract binary from assets
|
||||
context.assets.open(ASSET_PATH).use { input ->
|
||||
FileOutputStream(busybox).use { output ->
|
||||
input.copyTo(output)
|
||||
}
|
||||
}
|
||||
|
||||
// Make executable
|
||||
busybox.setExecutable(true, false)
|
||||
|
||||
if (!busybox.canExecute()) {
|
||||
Log.e(TAG, "Failed to set execute permission on busybox")
|
||||
return false
|
||||
}
|
||||
|
||||
Log.i(TAG, "Extracted busybox to ${busybox.absolutePath} (${busybox.length()} bytes)")
|
||||
|
||||
// Create symlinks for all applets
|
||||
createAppletSymlinks(busybox, binDir)
|
||||
|
||||
return true
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to install busybox", e)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create symlinks for all busybox applets.
|
||||
* Runs "busybox --list" to get the applet names, then creates
|
||||
* a symlink for each one pointing back to busybox.
|
||||
*/
|
||||
private fun createAppletSymlinks(busybox: File, binDir: File) {
|
||||
try {
|
||||
val process = ProcessBuilder(busybox.absolutePath, "--list")
|
||||
.directory(binDir)
|
||||
.redirectErrorStream(true)
|
||||
.start()
|
||||
|
||||
val applets = process.inputStream.bufferedReader().readLines()
|
||||
process.waitFor()
|
||||
|
||||
var created = 0
|
||||
for (applet in applets) {
|
||||
val name = applet.trim()
|
||||
if (name.isEmpty() || name == BUSYBOX_NAME) continue
|
||||
|
||||
val link = File(binDir, name)
|
||||
if (!link.exists()) {
|
||||
try {
|
||||
// Create symlink: applet -> busybox
|
||||
Runtime.getRuntime().exec(arrayOf(
|
||||
"ln", "-sf", busybox.absolutePath, link.absolutePath
|
||||
)).waitFor()
|
||||
created++
|
||||
} catch (_: Exception) {
|
||||
// Symlinks may not work on all filesystems.
|
||||
// Fall back to a small shell wrapper script.
|
||||
link.writeText("#!/system/bin/sh\nexec ${busybox.absolutePath} $name \"\$@\"\n")
|
||||
link.setExecutable(true, false)
|
||||
created++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Log.i(TAG, "Created $created applet symlinks in ${binDir.absolutePath}")
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Failed to create applet symlinks", e)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if busybox is installed and working.
|
||||
*/
|
||||
fun isInstalled(context: Context): Boolean {
|
||||
val busybox = File(context.filesDir, "$BIN_DIR/$BUSYBOX_NAME")
|
||||
return busybox.exists() && busybox.canExecute()
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the version string of the installed busybox.
|
||||
*/
|
||||
fun getVersion(context: Context): String? {
|
||||
val path = getBusyboxPath(context) ?: return null
|
||||
return try {
|
||||
val process = ProcessBuilder(path, "--help")
|
||||
.redirectErrorStream(true)
|
||||
.start()
|
||||
val firstLine = process.inputStream.bufferedReader().readLine()
|
||||
process.destroy()
|
||||
firstLine
|
||||
} catch (_: Exception) {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List all available applets.
|
||||
*/
|
||||
fun listApplets(context: Context): List<String> {
|
||||
val path = getBusyboxPath(context) ?: return emptyList()
|
||||
return try {
|
||||
val process = ProcessBuilder(path, "--list")
|
||||
.redirectErrorStream(true)
|
||||
.start()
|
||||
val applets = process.inputStream.bufferedReader().readLines()
|
||||
.map { it.trim() }
|
||||
.filter { it.isNotEmpty() }
|
||||
process.waitFor()
|
||||
applets
|
||||
} catch (_: Exception) {
|
||||
emptyList()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,12 +13,16 @@ object PrefsManager {
|
||||
private const val KEY_USBIP_PORT = "usbip_port"
|
||||
private const val KEY_AUTO_RESTART_ADB = "auto_restart_adb"
|
||||
private const val KEY_BBS_ADDRESS = "bbs_address"
|
||||
private const val KEY_PRIVILEGE_MODE = "privilege_mode"
|
||||
private const val KEY_FONT_SIZE = "font_size"
|
||||
|
||||
private const val DEFAULT_SERVER_IP = ""
|
||||
private const val DEFAULT_WEB_PORT = 8181
|
||||
private const val DEFAULT_ADB_PORT = 5555
|
||||
private const val DEFAULT_USBIP_PORT = 3240
|
||||
private const val DEFAULT_BBS_ADDRESS = ""
|
||||
private const val DEFAULT_PRIVILEGE_MODE = "none"
|
||||
private const val DEFAULT_FONT_SIZE = 14
|
||||
|
||||
private fun prefs(context: Context): SharedPreferences {
|
||||
return context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
||||
@@ -77,4 +81,20 @@ object PrefsManager {
|
||||
val port = getWebPort(context)
|
||||
return "https://$ip:$port"
|
||||
}
|
||||
|
||||
fun getPreferredPrivilegeMode(context: Context): String {
|
||||
return prefs(context).getString(KEY_PRIVILEGE_MODE, DEFAULT_PRIVILEGE_MODE) ?: DEFAULT_PRIVILEGE_MODE
|
||||
}
|
||||
|
||||
fun setPreferredPrivilegeMode(context: Context, mode: String) {
|
||||
prefs(context).edit().putString(KEY_PRIVILEGE_MODE, mode).apply()
|
||||
}
|
||||
|
||||
fun getFontSize(context: Context): Int {
|
||||
return prefs(context).getInt(KEY_FONT_SIZE, DEFAULT_FONT_SIZE)
|
||||
}
|
||||
|
||||
fun setFontSize(context: Context, size: Int) {
|
||||
prefs(context).edit().putInt(KEY_FONT_SIZE, size).apply()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background">
|
||||
android:fitsSystemWindows="true"
|
||||
tools:openDrawer="start">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/nav_host_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:defaultNavHost="true"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_nav"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navGraph="@navigation/nav_graph" />
|
||||
<!-- Main content area -->
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background">
|
||||
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/bottom_nav"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/surface"
|
||||
app:itemIconTint="@color/nav_item_color"
|
||||
app:itemTextColor="@color/nav_item_color"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:menu="@menu/bottom_nav" />
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/app_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/surface"
|
||||
app:elevation="0dp">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/surface"
|
||||
app:titleTextColor="@color/terminal_green"
|
||||
app:navigationIconTint="@color/terminal_green"
|
||||
app:title="@string/drawer_app_name"
|
||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/nav_host_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:defaultNavHost="true"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
app:navGraph="@navigation/nav_graph" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<!-- Navigation drawer -->
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:background="@color/surface_dark"
|
||||
android:fitsSystemWindows="true"
|
||||
app:headerLayout="@layout/drawer_header"
|
||||
app:menu="@menu/drawer_menu"
|
||||
app:itemIconTint="@color/terminal_green"
|
||||
app:itemTextColor="@color/text_primary"
|
||||
app:subheaderColor="@color/terminal_green_dim"
|
||||
app:subheaderTextAppearance="@style/DrawerSubheader" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
||||
48
autarch_companion/app/src/main/res/layout/drawer_header.xml
Normal file
48
autarch_companion/app/src/main/res/layout/drawer_header.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background"
|
||||
android:padding="16dp"
|
||||
android:paddingTop="32dp"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:src="@drawable/ic_archon"
|
||||
android:contentDescription="@string/app_name"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/drawer_app_name"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:letterSpacing="0.15"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/drawer_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="v2.0.0"
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<!-- Separator line -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim"
|
||||
android:layout_marginTop="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
93
autarch_companion/app/src/main/res/layout/fragment_about.xml
Normal file
93
autarch_companion/app/src/main/res/layout/fragment_about.xml
Normal file
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background"
|
||||
android:gravity="center"
|
||||
android:padding="32dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
android:src="@drawable/ic_archon"
|
||||
android:contentDescription="@string/app_name"
|
||||
android:layout_marginBottom="24dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/drawer_app_name"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:letterSpacing="0.2"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Companion"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="16sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="24dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="v2.0.0"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="14sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/about_copyright"
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="32dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/about_description"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="13sp"
|
||||
android:fontFamily="monospace"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:layout_marginBottom="48dp" />
|
||||
|
||||
<!-- Logout -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_logout"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="LOGOUT"
|
||||
android:textColor="@color/danger"
|
||||
android:fontFamily="monospace"
|
||||
app:strokeColor="@color/danger"
|
||||
app:cornerRadius="4dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto" />
|
||||
|
||||
<!-- Clear Data -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_clear_data"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CLEAR APP DATA"
|
||||
android:textColor="@color/text_muted"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
</LinearLayout>
|
||||
129
autarch_companion/app/src/main/res/layout/fragment_adb_shell.xml
Normal file
129
autarch_companion/app/src/main/res/layout/fragment_adb_shell.xml
Normal file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background">
|
||||
|
||||
<!-- Connection status bar -->
|
||||
<LinearLayout
|
||||
android:id="@+id/shell_status_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@color/surface">
|
||||
|
||||
<View
|
||||
android:id="@+id/shell_status_dot"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:background="@color/danger" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/shell_status_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="Disconnected"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_shell_connect"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="CONNECT"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_shell_clear"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="CLEAR"
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
app:cornerRadius="4dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Separator -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim" />
|
||||
|
||||
<!-- Terminal output area -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/shell_output"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:padding="4dp"
|
||||
android:scrollbars="vertical"
|
||||
android:clipToPadding="false"
|
||||
android:background="@color/background" />
|
||||
|
||||
<!-- Separator -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim" />
|
||||
|
||||
<!-- Command input bar -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="4dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@color/surface">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="$"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:fontFamily="monospace"
|
||||
android:textStyle="bold"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="4dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/shell_input"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_muted"
|
||||
android:hint="@string/adb_shell_hint"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="14sp"
|
||||
android:inputType="text"
|
||||
android:imeOptions="actionSend"
|
||||
android:singleLine="true"
|
||||
android:importantForAutofill="no" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_shell_send"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@android:drawable/ic_media_play"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Send"
|
||||
app:tint="@color/terminal_green" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Theme -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/appearance_theme_label"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/radio_theme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radio_theme_dark"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/appearance_theme_dark"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:buttonTint="@color/terminal_green"
|
||||
android:padding="8dp"
|
||||
android:checked="true" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Font Size -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/appearance_font_size"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<com.google.android.material.slider.Slider
|
||||
android:id="@+id/slider_font_size"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:valueFrom="10"
|
||||
android:valueTo="22"
|
||||
android:value="14"
|
||||
android:stepSize="1"
|
||||
app:thumbColor="@color/terminal_green"
|
||||
app:trackColorActive="@color/terminal_green"
|
||||
app:trackColorInactive="@color/terminal_green_dim"
|
||||
app:labelBehavior="floating" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/font_size_preview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Preview text (14sp)"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="14sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginTop="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Save -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_save_appearance"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/save_settings"
|
||||
android:textColor="@color/background"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Privilege Mode Selection -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/privilege_mode_label"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/radio_privilege_mode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radio_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/privilege_root"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:buttonTint="@color/terminal_green"
|
||||
android:padding="8dp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radio_shizuku"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/privilege_shizuku"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:buttonTint="@color/terminal_green"
|
||||
android:padding="8dp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radio_adb"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/privilege_adb"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:buttonTint="@color/terminal_green"
|
||||
android:padding="8dp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radio_none"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/privilege_none"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:buttonTint="@color/terminal_green"
|
||||
android:padding="8dp" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Privilege Status -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Status"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/privilege_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/privilege_status_checking"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="13sp"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Save -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_save_privileges"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/save_settings"
|
||||
android:textColor="@color/background"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,202 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Server Connection -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/server_connection"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:hint="@string/hint_server_ip"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_server_ip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:hint="@string/hint_web_port"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_web_port"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Port Configuration -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/adb_configuration"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:hint="@string/hint_adb_port"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_adb_port"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:hint="@string/hint_usbip_port"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_usbip_port"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Auto-Detect -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_auto_detect"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/auto_detect"
|
||||
android:textColor="@color/background"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:icon="@android:drawable/ic_menu_search"
|
||||
app:iconTint="@color/background"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<!-- Actions -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_test_connection"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/test_connection"
|
||||
android:textColor="@color/background"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_save_connection"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/save_settings"
|
||||
android:textColor="@color/background"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Status -->
|
||||
<TextView
|
||||
android:id="@+id/connection_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Privilege Settings"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Current method display -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Active Privilege Method"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp" />
|
||||
<TextView
|
||||
android:id="@+id/priv_current_method"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Detecting..."
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Root status -->
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:text="ROOT" android:textColor="@color/accent" android:textSize="14sp"
|
||||
android:textStyle="bold" android:layout_marginBottom="8dp" />
|
||||
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" android:gravity="center_vertical"
|
||||
android:layout_marginBottom="16dp">
|
||||
<View android:id="@+id/dot_root" android:layout_width="10dp" android:layout_height="10dp" />
|
||||
<TextView android:id="@+id/status_root" android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" android:layout_marginStart="8dp"
|
||||
android:textColor="@color/text_secondary" android:text="Checking..." />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Shizuku status -->
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:text="SHIZUKU" android:textColor="@color/accent" android:textSize="14sp"
|
||||
android:textStyle="bold" android:layout_marginBottom="8dp" />
|
||||
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" android:gravity="center_vertical"
|
||||
android:layout_marginBottom="8dp">
|
||||
<View android:id="@+id/dot_shizuku" android:layout_width="10dp" android:layout_height="10dp" />
|
||||
<TextView android:id="@+id/status_shizuku" android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" android:layout_marginStart="8dp"
|
||||
android:textColor="@color/text_secondary" android:text="Checking..." />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_shizuku_request"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="REQUEST SHIZUKU PERMISSION"
|
||||
android:layout_marginBottom="16dp"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton" />
|
||||
|
||||
<!-- Local ADB status -->
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:text="WIRELESS ADB" android:textColor="@color/accent" android:textSize="14sp"
|
||||
android:textStyle="bold" android:layout_marginBottom="8dp" />
|
||||
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" android:gravity="center_vertical"
|
||||
android:layout_marginBottom="8dp">
|
||||
<View android:id="@+id/dot_adb" android:layout_width="10dp" android:layout_height="10dp" />
|
||||
<TextView android:id="@+id/status_adb" android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" android:layout_marginStart="8dp"
|
||||
android:textColor="@color/text_secondary" android:text="Checking..." />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Pairing Code"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
|
||||
android:layout_marginBottom="8dp">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_pairing_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_adb_pair"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="PAIR DEVICE"
|
||||
android:layout_marginBottom="16dp"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton" />
|
||||
|
||||
<!-- Archon Server status -->
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:text="ARCHON SERVER" android:textColor="@color/accent" android:textSize="14sp"
|
||||
android:textStyle="bold" android:layout_marginBottom="8dp" />
|
||||
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" android:gravity="center_vertical"
|
||||
android:layout_marginBottom="8dp">
|
||||
<View android:id="@+id/dot_server" android:layout_width="10dp" android:layout_height="10dp" />
|
||||
<TextView android:id="@+id/status_server" android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" android:layout_marginStart="8dp"
|
||||
android:textColor="@color/text_secondary" android:text="Checking..." />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/switch_auto_restart_adb"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Auto-restart ADB on boot"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginTop="16dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_refresh_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="REFRESH STATUS"
|
||||
android:layout_marginTop="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background">
|
||||
|
||||
<!-- Header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_arp_scan"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="SCAN ARP TABLE"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
android:textColor="@color/background"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/arp_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="13sp"
|
||||
android:fontFamily="monospace" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Warning banner for duplicate MACs -->
|
||||
<TextView
|
||||
android:id="@+id/arp_warning"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#33E06C75"
|
||||
android:padding="8dp"
|
||||
android:textColor="#E06C75"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- Results -->
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/arp_results"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:textIsSelectable="true" />
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,270 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Header with copy button -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="DEVICE INFO"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_copy_all"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="COPY"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Device Section -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Device"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/section_device"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- System Section -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="System"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/section_system"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Hardware Section -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hardware"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/section_hardware"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Network Section -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Network"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/section_network"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Security Section -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Security"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/section_security"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Storage Section -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Storage"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/section_storage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Refresh Button -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="REFRESH"
|
||||
android:textColor="@color/background"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
306
autarch_companion/app/src/main/res/layout/fragment_tool_dns.xml
Normal file
306
autarch_companion/app/src/main/res/layout/fragment_tool_dns.xml
Normal file
@@ -0,0 +1,306 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Header -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="DNS LOOKUP"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Query Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Query"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:hint="Domain name or IP address"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_domain"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textUri"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Record Type Selector -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Record Type"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/chip_group_record_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:singleSelection="true"
|
||||
app:selectionRequired="true">
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_a"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="A"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
android:checked="true"
|
||||
app:chipBackgroundColor="@color/surface_dark"
|
||||
app:chipStrokeColor="@color/terminal_green_dim"
|
||||
app:chipStrokeWidth="1dp"
|
||||
app:checkedIconVisible="false"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_aaaa"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="AAAA"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
app:chipBackgroundColor="@color/surface_dark"
|
||||
app:chipStrokeColor="@color/terminal_green_dim"
|
||||
app:chipStrokeWidth="1dp"
|
||||
app:checkedIconVisible="false"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_mx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="MX"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
app:chipBackgroundColor="@color/surface_dark"
|
||||
app:chipStrokeColor="@color/terminal_green_dim"
|
||||
app:chipStrokeWidth="1dp"
|
||||
app:checkedIconVisible="false"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_ns"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="NS"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
app:chipBackgroundColor="@color/surface_dark"
|
||||
app:chipStrokeColor="@color/terminal_green_dim"
|
||||
app:chipStrokeWidth="1dp"
|
||||
app:checkedIconVisible="false"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TXT"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
app:chipBackgroundColor="@color/surface_dark"
|
||||
app:chipStrokeColor="@color/terminal_green_dim"
|
||||
app:chipStrokeWidth="1dp"
|
||||
app:checkedIconVisible="false"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_cname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CNAME"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
app:chipBackgroundColor="@color/surface_dark"
|
||||
app:chipStrokeColor="@color/terminal_green_dim"
|
||||
app:chipStrokeWidth="1dp"
|
||||
app:checkedIconVisible="false"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_soa"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SOA"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
app:chipBackgroundColor="@color/surface_dark"
|
||||
app:chipStrokeColor="@color/terminal_green_dim"
|
||||
app:chipStrokeWidth="1dp"
|
||||
app:checkedIconVisible="false"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_ptr"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="PTR"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
app:chipBackgroundColor="@color/surface_dark"
|
||||
app:chipStrokeColor="@color/terminal_green_dim"
|
||||
app:chipStrokeWidth="1dp"
|
||||
app:checkedIconVisible="false"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
|
||||
<!-- Custom DNS Server (optional) -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:hint="DNS Server (optional, e.g. 8.8.8.8)"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_dns_server"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textUri"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Lookup Button -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_lookup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="LOOKUP"
|
||||
android:textColor="@color/background"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Results Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/surface_dark"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Results"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_copy_results"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:text="COPY"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_dns"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="4dp"
|
||||
android:indeterminate="true"
|
||||
android:indeterminateTint="@color/terminal_green"
|
||||
android:visibility="gone"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_results"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="120dp"
|
||||
android:text="> ready_"
|
||||
android:textColor="@color/terminal_green_dim"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
android:textIsSelectable="true"
|
||||
android:lineSpacingMultiplier="1.3" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,304 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background">
|
||||
|
||||
<!-- Header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="FILE BROWSER"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_privilege_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Privilege: checking..."
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Breadcrumb path bar -->
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/breadcrumb_scroll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none"
|
||||
android:background="@color/surface"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/breadcrumb_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp" />
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
<!-- Separator -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim" />
|
||||
|
||||
<!-- Action bar -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:background="@color/surface_dark">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_file_up"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="UP"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_file_root"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="/"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_file_data"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="/data"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_file_system"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="/system"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_file_sdcard"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="/sdcard"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_file_refresh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="REFRESH"
|
||||
android:textColor="@color/background"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Separator -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim" />
|
||||
|
||||
<!-- Column header -->
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none"
|
||||
android:background="@color/surface">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="PERMISSIONS"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="OWNER"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="GROUP"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SIZE"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="DATE"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="NAME"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
|
||||
<!-- Separator -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim" />
|
||||
|
||||
<!-- File list -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/file_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/background"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="8dp" />
|
||||
|
||||
<!-- Status bar -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:background="@color/surface_dark">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_status"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="> /"
|
||||
android:textColor="@color/terminal_green_dim"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="start" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_count_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0 items"
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background">
|
||||
|
||||
<!-- Tab selector for chains -->
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/firewall_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/surface"
|
||||
app:tabTextColor="@color/text_muted"
|
||||
app:tabSelectedTextColor="@color/terminal_green"
|
||||
app:tabIndicatorColor="@color/terminal_green"
|
||||
app:tabMode="scrollable" />
|
||||
|
||||
<!-- Action buttons -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_fw_refresh"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="REFRESH"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_fw_add"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ADD RULE"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:fontFamily="monospace" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Rules display -->
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/firewall_output"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:textIsSelectable="true" />
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,374 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- Title -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="HTTP HEADERS"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Input Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Request"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green"
|
||||
app:boxBackgroundColor="@color/surface_dark"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_url"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="https://example.com"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_muted"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="14sp"
|
||||
android:inputType="textUri"
|
||||
android:imeOptions="actionDone" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Method Selector -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Method: "
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/chip_group_method"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:singleSelection="true"
|
||||
app:selectionRequired="true">
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_get"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="GET"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp"
|
||||
android:checked="true"
|
||||
app:chipBackgroundColor="@color/surface_dark"
|
||||
app:chipStrokeColor="@color/terminal_green_dim"
|
||||
app:chipStrokeWidth="1dp"
|
||||
android:textColor="@color/terminal_green"
|
||||
style="@style/Widget.Material3.Chip.Filter" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_head"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="HEAD"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp"
|
||||
app:chipBackgroundColor="@color/surface_dark"
|
||||
app:chipStrokeColor="@color/terminal_green_dim"
|
||||
app:chipStrokeWidth="1dp"
|
||||
android:textColor="@color/terminal_green"
|
||||
style="@style/Widget.Material3.Chip.Filter" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_post"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="POST"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp"
|
||||
app:chipBackgroundColor="@color/surface_dark"
|
||||
app:chipStrokeColor="@color/terminal_green_dim"
|
||||
app:chipStrokeWidth="1dp"
|
||||
android:textColor="@color/terminal_green"
|
||||
style="@style/Widget.Material3.Chip.Filter" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_options"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="OPTIONS"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp"
|
||||
app:chipBackgroundColor="@color/surface_dark"
|
||||
app:chipStrokeColor="@color/terminal_green_dim"
|
||||
app:chipStrokeWidth="1dp"
|
||||
android:textColor="@color/terminal_green"
|
||||
style="@style/Widget.Material3.Chip.Filter" />
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Custom Headers -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green"
|
||||
app:boxBackgroundColor="@color/surface_dark"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_custom_headers"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Custom headers (Key: Value, one per line)"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_muted"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
android:inputType="textMultiLine"
|
||||
android:minLines="2"
|
||||
android:maxLines="4"
|
||||
android:gravity="top" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Follow redirects toggle + send -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/switch_follow_redirects"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Follow redirects"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp"
|
||||
android:checked="false"
|
||||
app:thumbTint="@color/terminal_green"
|
||||
app:trackTint="@color/surface_dark"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_send"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SEND"
|
||||
android:textColor="@color/background"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Progress -->
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:indeterminate="true"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:indicatorColor="@color/terminal_green"
|
||||
app:trackColor="@color/surface_dark"
|
||||
app:trackThickness="3dp" />
|
||||
|
||||
<!-- Response Info Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_response"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/response_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/response_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/response_url"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_muted"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp"
|
||||
android:textIsSelectable="true" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Redirect Chain Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_redirects"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/warning"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="REDIRECT CHAIN"
|
||||
android:textColor="@color/warning"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/redirect_chain_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp"
|
||||
android:textIsSelectable="true" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Security Headers Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_security"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SECURITY HEADERS"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/security_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- All Headers -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_headers"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="@color/surface_dark"
|
||||
app:cardCornerRadius="8dp">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/headers_output"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:textColor="@color/terminal_green_dim"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp"
|
||||
android:textIsSelectable="true" />
|
||||
</ScrollView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background">
|
||||
|
||||
<!-- Header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="KEYSTORE DUMP"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ks_privilege_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Privilege: checking..."
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Recon tool — enumerates key material, does not extract secrets"
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<!-- Action buttons -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="4dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_ks_scan_all"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="SCAN ALL"
|
||||
android:textColor="@color/background"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
style="@style/Widget.Material3.Button"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_ks_keystore"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="KEYSTORE"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginStart="8dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_ks_keymaster"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="KEYMASTER"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginStart="8dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_ks_samsung"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="SAMSUNG EFS"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_ks_certs"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="CERTIFICATES"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginStart="8dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_ks_clear"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="CLEAR"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginStart="8dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Status line -->
|
||||
<TextView
|
||||
android:id="@+id/ks_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="> idle"
|
||||
android:textColor="@color/terminal_green_dim"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:background="@color/surface_dark" />
|
||||
|
||||
<!-- Separator -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim" />
|
||||
|
||||
<!-- Results output -->
|
||||
<ScrollView
|
||||
android:id="@+id/ks_scroll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/background">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ks_output"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="> Tap SCAN ALL to enumerate key material\n> Requires root or Archon Server privileges"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:lineSpacingExtra="2dp" />
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<!-- Bottom info bar -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:background="@color/surface_dark">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ks_entry_count"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="0 entries found"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ks_scan_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,343 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background">
|
||||
|
||||
<!-- Header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="LOGCAT VIEWER"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/logcat_privilege_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Privilege: checking..."
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<!-- Control buttons row -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_logcat_start"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="START"
|
||||
android:textColor="@color/background"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
style="@style/Widget.Material3.Button"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_logcat_stop"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="STOP"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginStart="8dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_logcat_clear"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="CLEAR"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginStart="8dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_logcat_save"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="SAVE"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginStart="8dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Filter row -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TAG:"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginEnd="6dp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_logcat_tag"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_weight="1"
|
||||
android:hint="filter tag..."
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_muted"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:inputType="text"
|
||||
android:background="@color/surface_dark"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:singleLine="true" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="MSG:"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="6dp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_logcat_msg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_weight="1"
|
||||
android:hint="filter text..."
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_muted"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:inputType="text"
|
||||
android:background="@color/surface_dark"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:singleLine="true" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Log level filter buttons -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="LVL:"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginEnd="6dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_level_v"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_weight="1"
|
||||
android:text="V"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/logcat_verbose"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_level_d"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_weight="1"
|
||||
android:text="D"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/logcat_debug"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_level_i"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_weight="1"
|
||||
android:text="I"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button"
|
||||
app:backgroundTint="@color/logcat_info"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_level_w"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_weight="1"
|
||||
android:text="W"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button"
|
||||
app:backgroundTint="@color/logcat_warn"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_level_e"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_weight="1"
|
||||
android:text="E"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button"
|
||||
app:backgroundTint="@color/logcat_error"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_level_f"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_weight="1"
|
||||
android:text="F"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button"
|
||||
app:backgroundTint="@color/logcat_fatal"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_logcat_autoscroll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="AUTO"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:layout_marginStart="8dp"
|
||||
style="@style/Widget.Material3.Button"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Status line -->
|
||||
<TextView
|
||||
android:id="@+id/logcat_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="> stopped"
|
||||
android:textColor="@color/terminal_green_dim"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:background="@color/surface_dark" />
|
||||
|
||||
<!-- Separator -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim" />
|
||||
|
||||
<!-- Log output -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/logcat_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/background"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="8dp" />
|
||||
|
||||
<!-- Bottom info bar -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:background="@color/surface_dark">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/logcat_line_count"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="0 lines"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/logcat_filter_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="min: V"
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="WiFi Monitor Mode"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Status card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/monitor_chip_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="13sp"
|
||||
android:fontFamily="monospace"
|
||||
android:text="Detecting WiFi chip..." />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/monitor_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="13sp"
|
||||
android:fontFamily="monospace"
|
||||
android:text="Status: Unknown" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/monitor_firmware"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="13sp"
|
||||
android:fontFamily="monospace" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Controls -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_monitor_enable"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ENABLE MONITOR MODE"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
android:textColor="@color/background"
|
||||
app:cornerRadius="4dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_monitor_disable"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="DISABLE MONITOR MODE"
|
||||
android:fontFamily="monospace"
|
||||
app:cornerRadius="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:enabled="false" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_monitor_check"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CHECK STATUS"
|
||||
android:fontFamily="monospace"
|
||||
app:cornerRadius="4dp"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Log output -->
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/monitor_log"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:textIsSelectable="true" />
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,241 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background">
|
||||
|
||||
<!-- Header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="NETWORK SCANNER"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/netscan_subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Local network device discovery"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<!-- Subnet input row -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SUBNET:"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="13sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_subnet"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1"
|
||||
android:hint="192.168.1"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_muted"
|
||||
android:textSize="14sp"
|
||||
android:fontFamily="monospace"
|
||||
android:inputType="text"
|
||||
android:background="@color/surface_dark"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:singleLine="true" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=".0/24"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="13sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginStart="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Action buttons row -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="4dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_scan"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="SCAN"
|
||||
android:textColor="@color/background"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
style="@style/Widget.Material3.Button"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_arp_only"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="ARP CACHE"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginStart="8dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_clear"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="CLEAR"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginStart="8dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Progress bar -->
|
||||
<ProgressBar
|
||||
android:id="@+id/scan_progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="4dp"
|
||||
android:max="254"
|
||||
android:progress="0"
|
||||
android:progressTint="@color/terminal_green"
|
||||
android:progressBackgroundTint="@color/surface"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- Status line -->
|
||||
<TextView
|
||||
android:id="@+id/scan_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="> idle"
|
||||
android:textColor="@color/terminal_green_dim"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:background="@color/surface_dark" />
|
||||
|
||||
<!-- Separator -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim" />
|
||||
|
||||
<!-- Results count header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="@color/surface">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/results_count"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="0 devices found"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/scan_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Separator -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim" />
|
||||
|
||||
<!-- Device list -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/device_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/background"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="16dp" />
|
||||
|
||||
<!-- Bottom log area -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardBackgroundColor="@color/surface_dark"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/scan_log"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="48dp"
|
||||
android:maxHeight="96dp"
|
||||
android:padding="8dp"
|
||||
android:text="> ready"
|
||||
android:textColor="@color/terminal_green_dim"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:scrollbars="vertical"
|
||||
android:lineSpacingExtra="1dp" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
106
autarch_companion/app/src/main/res/layout/fragment_tool_pcap.xml
Normal file
106
autarch_companion/app/src/main/res/layout/fragment_tool_pcap.xml
Normal file
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background">
|
||||
|
||||
<!-- Interface and filter -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/pcap_interface"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/pcap_filter"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:hint="Filter (e.g. port 80, host 10.0.0.1)"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_muted"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:background="@android:color/transparent"
|
||||
android:singleLine="true"
|
||||
android:layout_marginStart="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Controls -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_pcap_start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:text="START"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
android:textColor="@color/background"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_pcap_stop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:text="STOP"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginStart="8dp"
|
||||
app:cornerRadius="4dp"
|
||||
android:enabled="false" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pcap_count"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end"
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:text="0 packets" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim"
|
||||
android:layout_marginTop="4dp" />
|
||||
|
||||
<!-- Packet output -->
|
||||
<ScrollView
|
||||
android:id="@+id/pcap_scroll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pcap_output"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:textIsSelectable="true" />
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,258 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background">
|
||||
|
||||
<!-- Header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:paddingBottom="0dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="PORT SCANNER"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Target Host Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Target"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:hint="Host / IP address"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_target_host"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textUri"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Port Range Row -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:hint="Start port"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_port_start"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:text="1"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:hint="End port"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_port_end"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:text="1024"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_common_ports"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="COMMON"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp"
|
||||
app:strokeColor="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Scan / Stop Buttons -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_scan"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="SCAN"
|
||||
android:textColor="@color/background"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_stop"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="STOP"
|
||||
android:textColor="@color/danger"
|
||||
android:fontFamily="monospace"
|
||||
android:enabled="false"
|
||||
app:strokeColor="@color/danger"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Progress Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_progress_label"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Scanning..."
|
||||
android:textColor="@color/terminal_green"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_progress_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0 / 0"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressTint="@color/terminal_green"
|
||||
android:progressBackgroundTint="@color/surface_dark" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_open_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="Open: 0"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Results List -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_results"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:clipToPadding="false"
|
||||
android:background="@color/background" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,359 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background">
|
||||
|
||||
<!-- Header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="PROCESS INSPECTOR"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/proc_privilege_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Privilege: checking..."
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<!-- Search bar -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_proc_search"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1"
|
||||
android:hint="Filter processes..."
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_muted"
|
||||
android:textSize="13sp"
|
||||
android:fontFamily="monospace"
|
||||
android:inputType="text"
|
||||
android:background="@color/surface_dark"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:singleLine="true" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_proc_refresh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:text="REFRESH"
|
||||
android:textColor="@color/background"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginStart="8dp"
|
||||
style="@style/Widget.Material3.Button"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Sort buttons row -->
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_sort_pid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="PID"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_sort_user"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="USER"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_sort_cpu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="CPU%"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_sort_mem"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="MEM%"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_sort_vsz"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="VSZ"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_sort_rss"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="RSS"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_sort_cmd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:text="CMD"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:layout_marginStart="4dp"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
app:backgroundTint="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Status line -->
|
||||
<TextView
|
||||
android:id="@+id/proc_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="> idle"
|
||||
android:textColor="@color/terminal_green_dim"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:background="@color/surface_dark" />
|
||||
|
||||
<!-- Separator -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim" />
|
||||
|
||||
<!-- Column header row -->
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none"
|
||||
android:background="@color/surface">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="PID"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="USER"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CPU%"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="MEM%"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="VSZ"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="RSS"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="STAT"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="COMMAND"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
|
||||
<!-- Separator -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/terminal_green_dim" />
|
||||
|
||||
<!-- Process list -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/proc_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/background"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="8dp" />
|
||||
|
||||
<!-- Bottom status bar -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:background="@color/surface_dark">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/proc_count_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="0 processes"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/proc_sort_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="sort: PID"
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
273
autarch_companion/app/src/main/res/layout/fragment_tool_ssl.xml
Normal file
273
autarch_companion/app/src/main/res/layout/fragment_tool_ssl.xml
Normal file
@@ -0,0 +1,273 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Title -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SSL/TLS CHECK"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Input Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Target"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green"
|
||||
app:boxBackgroundColor="@color/surface_dark"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_hostname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="hostname (e.g. example.com)"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_muted"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="14sp"
|
||||
android:inputType="textUri"
|
||||
android:imeOptions="actionDone" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green"
|
||||
app:boxBackgroundColor="@color/surface_dark"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_port"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="port (443)"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_muted"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="14sp"
|
||||
android:inputType="number" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_check"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="CHECK"
|
||||
android:textColor="@color/background"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Status Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/status_dot"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:background="@color/status_offline"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Checking..."
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_protocol"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_cipher"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Issues Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_issues"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/danger"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ISSUES"
|
||||
android:textColor="@color/danger"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/issues_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/danger"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Certificate Chain -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_chain"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CERTIFICATE CHAIN"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/chain_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Progress -->
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:indeterminate="true"
|
||||
app:indicatorColor="@color/terminal_green"
|
||||
app:trackColor="@color/surface_dark"
|
||||
app:trackThickness="3dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- Title -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="WHOIS LOOKUP"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Input Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Domain / IP"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:boxStrokeColor="@color/terminal_green"
|
||||
app:hintTextColor="@color/terminal_green"
|
||||
app:boxBackgroundColor="@color/surface_dark"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_domain"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="example.com or 93.184.216.34"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_muted"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="14sp"
|
||||
android:inputType="textUri"
|
||||
android:imeOptions="actionDone" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_lookup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="LOOKUP"
|
||||
android:textColor="@color/background"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/switch_raw"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="RAW"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
app:thumbTint="@color/terminal_green"
|
||||
app:trackTint="@color/surface_dark" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Progress -->
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:indeterminate="true"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:indicatorColor="@color/terminal_green"
|
||||
app:trackColor="@color/surface_dark"
|
||||
app:trackThickness="3dp" />
|
||||
|
||||
<!-- Parsed Results Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_parsed"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="PARSED"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/parsed_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Raw Output -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_raw"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="@color/surface_dark"
|
||||
app:cardCornerRadius="8dp">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/raw_output"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:textColor="@color/terminal_green_dim"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp"
|
||||
android:textIsSelectable="true" />
|
||||
</ScrollView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
326
autarch_companion/app/src/main/res/layout/fragment_tool_wifi.xml
Normal file
326
autarch_companion/app/src/main/res/layout/fragment_tool_wifi.xml
Normal file
@@ -0,0 +1,326 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Header -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="WIFI ANALYZER"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Current Connection Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_current_connection"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:strokeColor="@color/terminal_green"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Current Connection"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<!-- SSID -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="4dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SSID"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_conn_ssid"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="--"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- BSSID -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="4dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="BSSID"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_conn_bssid"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="--"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Frequency -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="4dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Frequency"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_conn_freq"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="--"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Channel -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="4dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Channel"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_conn_channel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="--"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Signal Strength -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="4dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Signal"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_conn_signal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="--"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Signal Bar -->
|
||||
<ProgressBar
|
||||
android:id="@+id/pb_conn_signal"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressTint="@color/terminal_green"
|
||||
android:progressBackgroundTint="@color/surface_dark"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<!-- Link Speed -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="4dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Link Speed"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_conn_speed"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="--"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- IP Address -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="IP Address"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_conn_ip"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="--"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Scan Controls -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_scan"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="SCAN"
|
||||
android:textColor="@color/background"
|
||||
android:fontFamily="monospace"
|
||||
app:backgroundTint="@color/terminal_green"
|
||||
app:cornerRadius="4dp"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_sort_signal"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="dBm"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp"
|
||||
android:layout_marginEnd="4dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_sort_channel"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CH"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:cornerRadius="4dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Network Count -->
|
||||
<TextView
|
||||
android:id="@+id/tv_network_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Nearby Networks (0)"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<!-- Scan Results List -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_networks"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false" />
|
||||
|
||||
<!-- Status Text -->
|
||||
<TextView
|
||||
android:id="@+id/tv_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="> WiFi analyzer ready_"
|
||||
android:textColor="@color/terminal_green_dim"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginTop="12dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="12dp"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
|
||||
<!-- Status dot -->
|
||||
<View
|
||||
android:id="@+id/device_status_dot"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginEnd="12dp" />
|
||||
|
||||
<!-- Device info -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- IP address -->
|
||||
<TextView
|
||||
android:id="@+id/device_ip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="monospace"
|
||||
android:singleLine="true" />
|
||||
|
||||
<!-- Hostname -->
|
||||
<TextView
|
||||
android:id="@+id/device_hostname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginTop="2dp" />
|
||||
|
||||
<!-- MAC + Vendor -->
|
||||
<TextView
|
||||
android:id="@+id/device_mac"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="monospace"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginTop="1dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Vendor badge -->
|
||||
<TextView
|
||||
android:id="@+id/device_vendor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_muted"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="monospace"
|
||||
android:gravity="end"
|
||||
android:maxWidth="100dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/shell_line_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="13sp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingBottom="1dp"
|
||||
android:textColor="#D4D4D4"
|
||||
android:background="@android:color/transparent"
|
||||
android:textIsSelectable="true" />
|
||||
126
autarch_companion/app/src/main/res/layout/item_wifi_network.xml
Normal file
126
autarch_companion/app/src/main/res/layout/item_wifi_network.xml
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="6dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:strokeColor="@color/terminal_green_dim"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- Signal bar column -->
|
||||
<LinearLayout
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_marginEnd="12dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_signal_dbm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="-50"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb_signal"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="4dp"
|
||||
android:max="100"
|
||||
android:progress="50"
|
||||
android:progressTint="@color/terminal_green"
|
||||
android:progressBackgroundTint="@color/surface_dark"
|
||||
android:layout_marginTop="2dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Network info column -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_ssid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="NetworkName"
|
||||
android:textColor="@color/text_primary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bssid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="00:00:00:00:00:00"
|
||||
android:textColor="@color/text_muted"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="4dp">
|
||||
|
||||
<!-- Security badge -->
|
||||
<TextView
|
||||
android:id="@+id/tv_security"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="WPA2"
|
||||
android:textColor="@color/terminal_green"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold"
|
||||
android:background="@color/surface_dark"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingBottom="1dp"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<!-- Channel -->
|
||||
<TextView
|
||||
android:id="@+id/tv_channel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CH 6"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<!-- Frequency band -->
|
||||
<TextView
|
||||
android:id="@+id/tv_band"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2.4 GHz"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="monospace"
|
||||
android:textSize="11sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
153
autarch_companion/app/src/main/res/menu/drawer_menu.xml
Normal file
153
autarch_companion/app/src/main/res/menu/drawer_menu.xml
Normal file
@@ -0,0 +1,153 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<group android:id="@+id/group_main"
|
||||
android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/nav_dashboard"
|
||||
android:icon="@android:drawable/ic_menu_compass"
|
||||
android:title="@string/nav_dashboard" />
|
||||
<item
|
||||
android:id="@+id/nav_adb_shell"
|
||||
android:icon="@android:drawable/ic_menu_sort_by_size"
|
||||
android:title="@string/nav_adb_shell" />
|
||||
</group>
|
||||
|
||||
<item android:title="@string/drawer_header_tools">
|
||||
<menu>
|
||||
<group android:id="@+id/group_tools"
|
||||
android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/nav_modules"
|
||||
android:icon="@android:drawable/ic_menu_manage"
|
||||
android:title="@string/nav_modules" />
|
||||
<item
|
||||
android:id="@+id/nav_messaging"
|
||||
android:icon="@android:drawable/ic_dialog_email"
|
||||
android:title="@string/nav_messaging" />
|
||||
</group>
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
<item android:title="NON-ROOTED TOOLS">
|
||||
<menu>
|
||||
<group android:id="@+id/group_noroot_tools"
|
||||
android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/nav_tool_netscan"
|
||||
android:icon="@android:drawable/ic_menu_mapmode"
|
||||
android:title="Network Scanner" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_portscan"
|
||||
android:icon="@android:drawable/ic_menu_sort_by_size"
|
||||
android:title="Port Scanner" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_wifi"
|
||||
android:icon="@android:drawable/ic_menu_compass"
|
||||
android:title="WiFi Analyzer" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_dns"
|
||||
android:icon="@android:drawable/ic_menu_search"
|
||||
android:title="DNS Lookup" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_whois"
|
||||
android:icon="@android:drawable/ic_menu_info_details"
|
||||
android:title="Whois" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_ssl"
|
||||
android:icon="@android:drawable/ic_secure"
|
||||
android:title="SSL/TLS Check" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_headers"
|
||||
android:icon="@android:drawable/ic_menu_recent_history"
|
||||
android:title="HTTP Headers" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_devinfo"
|
||||
android:icon="@android:drawable/ic_menu_myplaces"
|
||||
android:title="Device Info" />
|
||||
</group>
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
<item android:title="ROOTED TOOLS">
|
||||
<menu>
|
||||
<group android:id="@+id/group_root_tools"
|
||||
android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/nav_tool_pcap"
|
||||
android:icon="@android:drawable/ic_menu_upload"
|
||||
android:title="Packet Capture" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_monitor"
|
||||
android:icon="@android:drawable/ic_menu_view"
|
||||
android:title="WiFi Monitor" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_arp"
|
||||
android:icon="@android:drawable/ic_menu_mapmode"
|
||||
android:title="ARP Scanner" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_firewall"
|
||||
android:icon="@android:drawable/ic_lock_lock"
|
||||
android:title="Firewall Rules" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_processes"
|
||||
android:icon="@android:drawable/ic_menu_manage"
|
||||
android:title="Process Inspector" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_files"
|
||||
android:icon="@android:drawable/ic_menu_agenda"
|
||||
android:title="File Browser" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_logcat"
|
||||
android:icon="@android:drawable/ic_menu_sort_alphabetically"
|
||||
android:title="Logcat Viewer" />
|
||||
<item
|
||||
android:id="@+id/nav_tool_keystore"
|
||||
android:icon="@android:drawable/ic_menu_close_clear_cancel"
|
||||
android:title="Keystore Dump" />
|
||||
</group>
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
<item android:title="@string/drawer_header_setup">
|
||||
<menu>
|
||||
<group android:id="@+id/group_setup"
|
||||
android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/nav_setup"
|
||||
android:icon="@drawable/ic_setup"
|
||||
android:title="@string/nav_device_setup" />
|
||||
<item
|
||||
android:id="@+id/nav_links"
|
||||
android:icon="@android:drawable/ic_menu_share"
|
||||
android:title="@string/nav_links" />
|
||||
</group>
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
<item android:title="@string/drawer_header_settings">
|
||||
<menu>
|
||||
<group android:id="@+id/group_settings"
|
||||
android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/nav_settings_connection"
|
||||
android:icon="@android:drawable/ic_menu_preferences"
|
||||
android:title="@string/nav_settings_connection" />
|
||||
<item
|
||||
android:id="@+id/nav_settings_privileges"
|
||||
android:icon="@android:drawable/ic_lock_lock"
|
||||
android:title="@string/nav_settings_privileges" />
|
||||
<item
|
||||
android:id="@+id/nav_settings_appearance"
|
||||
android:icon="@android:drawable/ic_menu_view"
|
||||
android:title="@string/nav_settings_appearance" />
|
||||
<item
|
||||
android:id="@+id/nav_about"
|
||||
android:icon="@android:drawable/ic_menu_info_details"
|
||||
android:title="@string/nav_about" />
|
||||
</group>
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
</menu>
|
||||
@@ -1,38 +1,131 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<navigation
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/nav_graph"
|
||||
app:startDestination="@id/nav_dashboard">
|
||||
|
||||
<!-- MAIN -->
|
||||
<fragment
|
||||
android:id="@+id/nav_dashboard"
|
||||
android:name="com.darkhal.archon.ui.DashboardFragment"
|
||||
android:label="@string/nav_dashboard" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_messaging"
|
||||
android:name="com.darkhal.archon.ui.MessagingFragment"
|
||||
android:label="@string/nav_messaging" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_links"
|
||||
android:name="com.darkhal.archon.ui.LinksFragment"
|
||||
android:label="@string/nav_links" />
|
||||
android:id="@+id/nav_adb_shell"
|
||||
android:name="com.darkhal.archon.ui.AdbShellFragment"
|
||||
android:label="@string/nav_adb_shell" />
|
||||
|
||||
<!-- TOOLS -->
|
||||
<fragment
|
||||
android:id="@+id/nav_modules"
|
||||
android:name="com.darkhal.archon.ui.ModulesFragment"
|
||||
android:label="@string/nav_modules" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_messaging"
|
||||
android:name="com.darkhal.archon.ui.MessagingFragment"
|
||||
android:label="@string/nav_messaging" />
|
||||
|
||||
<!-- NON-ROOTED TOOLS -->
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_netscan"
|
||||
android:name="com.darkhal.archon.ui.tools.NetworkScannerFragment"
|
||||
android:label="Network Scanner" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_portscan"
|
||||
android:name="com.darkhal.archon.ui.tools.PortScannerFragment"
|
||||
android:label="Port Scanner" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_wifi"
|
||||
android:name="com.darkhal.archon.ui.tools.WifiAnalyzerFragment"
|
||||
android:label="WiFi Analyzer" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_dns"
|
||||
android:name="com.darkhal.archon.ui.tools.DnsLookupFragment"
|
||||
android:label="DNS Lookup" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_whois"
|
||||
android:name="com.darkhal.archon.ui.tools.WhoisFragment"
|
||||
android:label="Whois" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_ssl"
|
||||
android:name="com.darkhal.archon.ui.tools.SslCheckFragment"
|
||||
android:label="SSL/TLS Check" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_headers"
|
||||
android:name="com.darkhal.archon.ui.tools.HttpHeadersFragment"
|
||||
android:label="HTTP Headers" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_devinfo"
|
||||
android:name="com.darkhal.archon.ui.tools.DeviceInfoFragment"
|
||||
android:label="Device Info" />
|
||||
|
||||
<!-- ROOTED TOOLS -->
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_pcap"
|
||||
android:name="com.darkhal.archon.ui.ToolPlaceholderFragment"
|
||||
android:label="Packet Capture" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_monitor"
|
||||
android:name="com.darkhal.archon.ui.ToolPlaceholderFragment"
|
||||
android:label="WiFi Monitor" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_arp"
|
||||
android:name="com.darkhal.archon.ui.ToolPlaceholderFragment"
|
||||
android:label="ARP Scanner" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_firewall"
|
||||
android:name="com.darkhal.archon.ui.ToolPlaceholderFragment"
|
||||
android:label="Firewall Rules" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_processes"
|
||||
android:name="com.darkhal.archon.ui.tools.ProcessInspectorFragment"
|
||||
android:label="Process Inspector" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_files"
|
||||
android:name="com.darkhal.archon.ui.tools.FileBrowserFragment"
|
||||
android:label="File Browser" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_logcat"
|
||||
android:name="com.darkhal.archon.ui.tools.LogcatViewerFragment"
|
||||
android:label="Logcat Viewer" />
|
||||
<fragment
|
||||
android:id="@+id/nav_tool_keystore"
|
||||
android:name="com.darkhal.archon.ui.tools.KeystoreDumpFragment"
|
||||
android:label="Keystore Dump" />
|
||||
|
||||
<!-- SETUP -->
|
||||
<fragment
|
||||
android:id="@+id/nav_setup"
|
||||
android:name="com.darkhal.archon.ui.SetupFragment"
|
||||
android:label="@string/nav_setup" />
|
||||
android:label="@string/nav_device_setup" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_settings"
|
||||
android:name="com.darkhal.archon.ui.SettingsFragment"
|
||||
android:label="@string/nav_settings" />
|
||||
android:id="@+id/nav_links"
|
||||
android:name="com.darkhal.archon.ui.LinksFragment"
|
||||
android:label="@string/nav_links" />
|
||||
|
||||
<!-- SETTINGS -->
|
||||
<fragment
|
||||
android:id="@+id/nav_settings_connection"
|
||||
android:name="com.darkhal.archon.ui.ConnectionSettingsFragment"
|
||||
android:label="@string/nav_settings_connection" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_settings_privileges"
|
||||
android:name="com.darkhal.archon.ui.PrivilegesSettingsFragment"
|
||||
android:label="@string/nav_settings_privileges" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_settings_appearance"
|
||||
android:name="com.darkhal.archon.ui.AppearanceSettingsFragment"
|
||||
android:label="@string/nav_settings_appearance" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_about"
|
||||
android:name="com.darkhal.archon.ui.AboutFragment"
|
||||
android:label="@string/nav_about" />
|
||||
|
||||
</navigation>
|
||||
|
||||
@@ -15,4 +15,17 @@
|
||||
<color name="warning">#FFFFAA00</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="nav_item_color">#FF00FF41</color>
|
||||
|
||||
<!-- Logcat level colors -->
|
||||
<color name="logcat_verbose">#FF888888</color>
|
||||
<color name="logcat_debug">#FF5599FF</color>
|
||||
<color name="logcat_info">#FF00CC44</color>
|
||||
<color name="logcat_warn">#FFFFAA00</color>
|
||||
<color name="logcat_error">#FFFF4444</color>
|
||||
<color name="logcat_fatal">#FFFF2222</color>
|
||||
|
||||
<!-- File browser -->
|
||||
<color name="file_directory">#FF00CCFF</color>
|
||||
<color name="file_symlink">#FFCC66FF</color>
|
||||
<color name="file_executable">#FF00FF41</color>
|
||||
</resources>
|
||||
|
||||
@@ -2,13 +2,31 @@
|
||||
<resources>
|
||||
<string name="app_name">Archon</string>
|
||||
|
||||
<!-- Navigation -->
|
||||
<!-- Navigation - Drawer -->
|
||||
<string name="nav_dashboard">Dashboard</string>
|
||||
<string name="nav_links">Links</string>
|
||||
<string name="nav_adb_shell">ADB Shell</string>
|
||||
<string name="nav_modules">Modules</string>
|
||||
<string name="nav_device_setup">Device Setup</string>
|
||||
<string name="nav_links">Links</string>
|
||||
<string name="nav_settings_connection">Connection</string>
|
||||
<string name="nav_settings_privileges">Privileges</string>
|
||||
<string name="nav_settings_appearance">Appearance</string>
|
||||
<string name="nav_about">About</string>
|
||||
|
||||
<!-- Legacy (kept for bottom_nav.xml compatibility) -->
|
||||
<string name="nav_setup">Setup</string>
|
||||
<string name="nav_settings">Settings</string>
|
||||
|
||||
<!-- Drawer section headers -->
|
||||
<string name="drawer_header_tools">TOOLS</string>
|
||||
<string name="drawer_header_setup">SETUP</string>
|
||||
<string name="drawer_header_settings">SETTINGS</string>
|
||||
|
||||
<!-- Drawer header -->
|
||||
<string name="drawer_app_name">AUTARCH</string>
|
||||
<string name="drawer_open">Open navigation</string>
|
||||
<string name="drawer_close">Close navigation</string>
|
||||
|
||||
<!-- Discovery -->
|
||||
<string name="server_discovery">Server Discovery</string>
|
||||
<string name="discovery_idle">Tap SCAN to find AUTARCH</string>
|
||||
@@ -87,4 +105,32 @@
|
||||
<string name="auto_detect">AUTO-DETECT SERVER</string>
|
||||
<string name="test_connection">TEST</string>
|
||||
<string name="save_settings">SAVE</string>
|
||||
|
||||
<!-- ADB Shell -->
|
||||
<string name="adb_shell_title">ADB SHELL</string>
|
||||
<string name="adb_shell_hint">Enter command...</string>
|
||||
<string name="adb_shell_run">RUN</string>
|
||||
<string name="adb_shell_clear">CLEAR</string>
|
||||
<string name="adb_shell_welcome">> ADB shell ready. Type a command.\n</string>
|
||||
|
||||
<!-- Privileges -->
|
||||
<string name="privileges_title">PRIVILEGES</string>
|
||||
<string name="privilege_mode_label">Privilege Mode</string>
|
||||
<string name="privilege_root">Root</string>
|
||||
<string name="privilege_shizuku">Shizuku</string>
|
||||
<string name="privilege_adb">ADB</string>
|
||||
<string name="privilege_none">None (standard)</string>
|
||||
<string name="privilege_status_checking">Checking privilege status...</string>
|
||||
|
||||
<!-- Appearance -->
|
||||
<string name="appearance_title">APPEARANCE</string>
|
||||
<string name="appearance_theme_label">Theme</string>
|
||||
<string name="appearance_theme_dark">Terminal Dark</string>
|
||||
<string name="appearance_font_size">Font Size</string>
|
||||
|
||||
<!-- About -->
|
||||
<string name="about_title">ABOUT</string>
|
||||
<string name="about_version_label">Version</string>
|
||||
<string name="about_copyright">Copyright 2026 DarkHal</string>
|
||||
<string name="about_description">AUTARCH Companion\nRemote device management and security toolkit.</string>
|
||||
</resources>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2026 DarkHal -->
|
||||
<resources>
|
||||
<style name="Theme.Archon" parent="Theme.Material3.Dark.NoActionBar">
|
||||
<item name="colorPrimary">@color/terminal_green</item>
|
||||
@@ -12,5 +13,27 @@
|
||||
<item name="android:statusBarColor">@color/background</item>
|
||||
<item name="android:navigationBarColor">@color/surface</item>
|
||||
<item name="android:windowBackground">@color/background</item>
|
||||
<item name="drawerLayoutStyle">@style/Widget.Archon.DrawerLayout</item>
|
||||
</style>
|
||||
|
||||
<!-- Toolbar title style -->
|
||||
<style name="ToolbarTitle" parent="TextAppearance.Material3.TitleLarge">
|
||||
<item name="android:fontFamily">monospace</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:letterSpacing">0.1</item>
|
||||
</style>
|
||||
|
||||
<!-- Drawer subheader text style -->
|
||||
<style name="DrawerSubheader" parent="TextAppearance.Material3.LabelSmall">
|
||||
<item name="android:fontFamily">monospace</item>
|
||||
<item name="android:textSize">11sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:letterSpacing">0.15</item>
|
||||
</style>
|
||||
|
||||
<!-- DrawerLayout scrim -->
|
||||
<style name="Widget.Archon.DrawerLayout" parent="Widget.Material3.DrawerLayout">
|
||||
<item name="scrimColor">#CC000000</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user