wip
This commit is contained in:
@@ -11,7 +11,7 @@ import os
|
||||
# Add the src directory to Python path for imports
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "src"))
|
||||
|
||||
from adb_manager import ADB_BINARY_PATH
|
||||
from src.adb_manager import ADB_BINARY_PATH
|
||||
|
||||
|
||||
def debug_large_transfer_output():
|
||||
@@ -117,7 +117,7 @@ def main():
|
||||
|
||||
def debug_original_adb_detection():
|
||||
"""Original ADB debugging functionality."""
|
||||
from adb_manager import ADBManager
|
||||
from src.adb_manager import ADBManager
|
||||
|
||||
print("=== ADB Device Detection Debug ===\n")
|
||||
|
||||
|
||||
@@ -4,10 +4,12 @@ Debug version of main window with console output
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.insert(0, "src")
|
||||
# Add the src directory to Python path for imports
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "src"))
|
||||
|
||||
from gui.main_window import AndroidFileHandlerGUI
|
||||
from src.main_window import AndroidFileHandlerGUI
|
||||
|
||||
|
||||
class DebugAndroidFileHandlerGUI(AndroidFileHandlerGUI):
|
||||
|
||||
@@ -5,8 +5,10 @@ Debug folder name parsing from ADB ls output
|
||||
|
||||
import sys
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
sys.path.insert(0, "src")
|
||||
# Add the src directory to Python path for imports
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "src"))
|
||||
|
||||
from adb_manager import ADB_BINARY_PATH
|
||||
|
||||
|
||||
@@ -6,8 +6,10 @@ Test improved progress calculation for large transfers
|
||||
import sys
|
||||
import time
|
||||
import threading
|
||||
import os
|
||||
|
||||
sys.path.insert(0, "src")
|
||||
# Add the src directory to Python path for imports
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "src"))
|
||||
|
||||
from gui.main_window import AndroidFileHandlerGUI
|
||||
|
||||
|
||||
@@ -6,8 +6,10 @@ Minimal test to verify progress updates work in modular GUI
|
||||
import sys
|
||||
import time
|
||||
import threading
|
||||
import os
|
||||
|
||||
sys.path.insert(0, "src")
|
||||
# Add the src directory to Python path for imports
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "src"))
|
||||
|
||||
from gui.main_window import AndroidFileHandlerGUI
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@ Debug test for progress callback in modular GUI
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.insert(0, "src")
|
||||
# Add the src directory to Python path for imports
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "src"))
|
||||
|
||||
from gui.main_window import AndroidFileHandlerGUI
|
||||
|
||||
|
||||
@@ -6,8 +6,10 @@ Test successive transfers with modular GUI
|
||||
import sys
|
||||
import time
|
||||
import threading
|
||||
import os
|
||||
|
||||
sys.path.insert(0, "src")
|
||||
# Add the src directory to Python path for imports
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "src"))
|
||||
|
||||
from gui.main_window import AndroidFileHandlerGUI
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@ import os
|
||||
import time
|
||||
import threading
|
||||
|
||||
sys.path.insert(0, "src")
|
||||
# Add the src directory to Python path for imports
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "src"))
|
||||
|
||||
from gui.main_window import AndroidFileHandlerGUI
|
||||
|
||||
|
||||
+14
-10
@@ -4,41 +4,45 @@ Test script to debug folder parsing
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(0, 'src')
|
||||
|
||||
# Add the src directory to Python path for imports
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "src"))
|
||||
|
||||
from adb_manager import ADBManager
|
||||
|
||||
|
||||
def main():
|
||||
adb = ADBManager()
|
||||
print("Testing folder parsing...")
|
||||
|
||||
result = adb.run_adb_command(['shell', 'ls', '-la', '/sdcard/'])
|
||||
|
||||
result = adb.run_adb_command(["shell", "ls", "-la", "/sdcard/"])
|
||||
print(f"Return code: {result[2]}")
|
||||
|
||||
lines = result[0].strip().split('\n')
|
||||
|
||||
lines = result[0].strip().split("\n")
|
||||
print(f"Total lines: {len(lines)}")
|
||||
print("\nFirst 10 lines:")
|
||||
for i, line in enumerate(lines[:10]):
|
||||
print(f" {i}: {repr(line)}")
|
||||
|
||||
|
||||
print("\nParsing directories:")
|
||||
folders = []
|
||||
for i, line in enumerate(lines):
|
||||
if line.startswith('d'):
|
||||
if line.startswith("d"):
|
||||
parts = line.split()
|
||||
print(f" Line {i}: {len(parts)} parts")
|
||||
if len(parts) >= 8: # Changed from 9 to 8
|
||||
folder_name = ' '.join(parts[7:]) # Changed from 8 to 7
|
||||
folder_name = " ".join(parts[7:]) # Changed from 8 to 7
|
||||
print(f" Folder name: {repr(folder_name)}")
|
||||
if folder_name not in ['.', '..']:
|
||||
if folder_name not in [".", ".."]:
|
||||
folders.append(folder_name)
|
||||
print(f" ✅ Added: {repr(folder_name)}")
|
||||
else:
|
||||
print(f" ❌ Skipped: {repr(folder_name)}")
|
||||
|
||||
|
||||
print(f"\nFinal folders list ({len(folders)} items):")
|
||||
for folder in sorted(folders):
|
||||
print(f" - {repr(folder)}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -5,7 +5,8 @@ Test script to verify progress callback is working
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.insert(0, "src")
|
||||
# Add the src directory to Python path for imports
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "src"))
|
||||
|
||||
from adb_manager import ADBManager
|
||||
import time
|
||||
|
||||
@@ -8,7 +8,8 @@ import os
|
||||
import time
|
||||
import threading
|
||||
|
||||
sys.path.insert(0, "src")
|
||||
# Add the src directory to Python path for imports
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "src"))
|
||||
|
||||
from gui.main_window import AndroidFileHandlerGUI
|
||||
|
||||
|
||||
@@ -6,7 +6,13 @@ import sys
|
||||
import os
|
||||
import time
|
||||
|
||||
sys.path.insert(0, "src")
|
||||
import sys
|
||||
import time
|
||||
import threading
|
||||
import os
|
||||
|
||||
# Add the src directory to Python path for imports
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "src"))
|
||||
|
||||
from adb_manager import ADBManager
|
||||
|
||||
|
||||
Reference in New Issue
Block a user