Skip to content

Commit 02933b1

Browse files
author
codefl0w
committed
V4.0.2 Release: New Wireless ADB options & File Explorer improvements
1 parent 26c9d13 commit 02933b1

7 files changed

Lines changed: 488 additions & 89 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ The changelog only includes what's new. To read feature descriptions, see [Featu
33

44
For the old changelog, see [README_OLD](https://github.com/codefl0w/QuickADB/blob/main/README_OLD.md).
55

6+
7+
8+
9+
# [4.0.2] - 14.03.2026
10+
11+
### Added
12+
- Wireless ADB: Pairing via QR or pairing code
13+
14+
### Changed
15+
- Wireless ADB: Moved function from adbfunc.py to wirelessadb.py
16+
- File Explorer: Changed header scaling method
17+
18+
### Improved
19+
- File Explorer: Added many new viewable text file extensions
20+
21+
22+
623
# [4.0.1] - 13.03.2026
724

825
### Added

main/adbfunc.py

Lines changed: 8 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -225,74 +225,7 @@ def _start_info_worker(self, platform_tools_path):
225225
self.worker.start()
226226

227227

228-
class WirelessADBDialog(QDialog):
229-
230-
def __init__(self, parent=None):
231-
super().__init__(parent)
232-
self.parent_app = parent
233-
self._setup_ui()
234-
235-
def _setup_ui(self):
236-
self.setWindowTitle("Wireless ADB Connection")
237-
self.setFixedSize(350, 120)
238-
self.setWindowFlags(self.windowFlags() | Qt.WindowType.WindowStaysOnTopHint)
239-
self.setModal(True)
240-
241-
layout = QVBoxLayout()
242-
243-
# Instructions
244-
label = QLabel("Enter Device Address (HOST:PORT):")
245-
layout.addWidget(label)
246-
247-
# Address input
248-
self.address_entry = QLineEdit()
249-
self.address_entry.setPlaceholderText("e.g., 192.168.1.100:5555")
250-
self.address_entry.returnPressed.connect(self._connect_wireless_adb)
251-
layout.addWidget(self.address_entry)
252-
253-
# Connect button
254-
connect_button = QPushButton("Connect")
255-
connect_button.clicked.connect(self._connect_wireless_adb)
256-
connect_button.setDefault(True)
257-
layout.addWidget(connect_button)
258-
259-
self.setLayout(layout)
260-
self.address_entry.setFocus()
261-
262-
def _connect_wireless_adb(self):
263-
address = self.address_entry.text().strip()
264-
265-
if not self._validate_address(address):
266-
QMessageBox.critical(self, "Error",
267-
"Please enter a valid address (HOST:PORT).\n"
268-
"Example: 192.168.1.100:5555")
269-
return
270-
271-
if hasattr(self.parent_app, 'run_command_async'):
272-
self.parent_app.run_command_async(
273-
f"adb connect {address}",
274-
f"Connecting to {address}",
275-
"ADB"
276-
)
277-
self.accept()
278-
else:
279-
QMessageBox.critical(self, "Error",
280-
"Parent application method not found.")
281-
282-
def _validate_address(self, address):
283-
if not address:
284-
return False
285-
286-
# Basic validation for HOST:PORT format
287-
if ':' not in address:
288-
return False
289-
290-
try:
291-
host, port = address.rsplit(':', 1)
292-
port_num = int(port)
293-
return len(host) > 0 and 1 <= port_num <= 65535
294-
except ValueError:
295-
return False
228+
# [Legacy WirelessADBDialog removed - now using modules.wirelessadb]
296229

297230
class InstallAPKDialog(QDialog):
298231
def __init__(self, parent=None):
@@ -585,8 +518,13 @@ def sideload_file(self):
585518

586519

587520
def show_wireless_adb_ui(self):
588-
# Show wireless ADB connection dialog
589-
dialog = WirelessADBDialog(self)
521+
import os
522+
from modules.wirelessadb import WirelessADBDialog
523+
# Show wireless ADB connection dialog (new QR pairing module)
524+
# Passed parent and platform_tools_path dynamically since parent represents quickadb.py
525+
adb_exe = "adb.exe" if os.name == 'nt' else "adb"
526+
adb_path = os.path.join(self.platform_tools_path, adb_exe)
527+
dialog = WirelessADBDialog(self, adb_path)
590528
dialog.exec()
591529

592530

main/quickadb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class QuickADBApp(QMainWindow):
5151
# Main window
5252

5353
# Constants
54-
APP_VERSION = "V4.0.1"
54+
APP_VERSION = "V4.0.2"
5555
APP_SUFFIX = "Full"
5656
BUTTON_WIDTH = 150
5757
BUTTON_HEIGHT = 40

modules/fileexplorer.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
import base64
1313
import re
1414

15-
from util.resource import get_root_dir, resource_path, resolve_platform_tool
16-
root_dir = get_root_dir()
17-
if root_dir not in sys.path:
18-
sys.path.insert(0, root_dir)
15+
from util.resource import get_root_dir, resource_path, resolve_platform_tool
16+
root_dir = get_root_dir()
17+
if root_dir not in sys.path:
18+
sys.path.insert(0, root_dir)
1919

2020
from util.thememanager import ThemeManager
2121

@@ -129,17 +129,17 @@ def run(self):
129129

130130
class ADBFileExplorer(QMainWindow):
131131
# Constants for viewable file types
132-
VIEWABLE_TEXT_EXTENSIONS = ("txt", "log", "json", "xml", "html", "csv", "md", "ini", "conf", "prop", "sh")
132+
VIEWABLE_TEXT_EXTENSIONS = ("txt", "log", "json", "xml", "html", "csv", "md", "ini", "conf", "prop", "sh", "bat", "py", "js", "css", "html", "cpp", "h", "hpp", "c", "h", "rc")
133133
VIEWABLE_IMAGE_EXTENSIONS = ("png", "jpg", "jpeg", "gif", "bmp")
134134

135135
def __init__(self):
136136
super().__init__()
137137
self.setWindowTitle("QuickADB File Explorer")
138138
self.setMinimumSize(1000, 600)
139139

140-
# paths and adb
141-
self.platform_tools_path = resource_path('platform-tools')
142-
self.adb_path = resolve_platform_tool(self.platform_tools_path, 'adb')
140+
# paths and adb
141+
self.platform_tools_path = resource_path('platform-tools')
142+
self.adb_path = resolve_platform_tool(self.platform_tools_path, 'adb')
143143

144144
# state
145145
self.current_path = "/storage/emulated/0"
@@ -343,8 +343,11 @@ def init_file_view(self):
343343
self.table = QTableWidget()
344344
self.table.setColumnCount(4)
345345
self.table.setHorizontalHeaderLabels(["Name", "Type", "Size", "Modified"])
346-
self.table.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
347-
self.table.horizontalHeader().setSectionResizeMode(0, QHeaderView.ResizeMode.Interactive)
346+
self.table.horizontalHeader().setSectionResizeMode(0, QHeaderView.ResizeMode.Stretch)
347+
self.table.horizontalHeader().setSectionResizeMode(1, QHeaderView.ResizeMode.Interactive)
348+
self.table.horizontalHeader().setSectionResizeMode(2, QHeaderView.ResizeMode.Interactive)
349+
self.table.horizontalHeader().setSectionResizeMode(3, QHeaderView.ResizeMode.Interactive)
350+
348351
self.table.setEditTriggers(QTableWidget.EditTrigger.NoEditTriggers)
349352
self.table.setSelectionBehavior(QTableWidget.SelectionBehavior.SelectRows)
350353
self.table.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu)
@@ -1466,4 +1469,4 @@ def main():
14661469

14671470

14681471
if __name__ == "__main__":
1469-
sys.exit(main())
1472+
sys.exit(main())

0 commit comments

Comments
 (0)