-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_device_access.sh
More file actions
executable file
Β·53 lines (42 loc) Β· 1.41 KB
/
debug_device_access.sh
File metadata and controls
executable file
Β·53 lines (42 loc) Β· 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
echo "π Device Access Debug Script"
echo "============================="
echo "π Script context:"
echo "User: $(whoami)"
echo "Shell: $SHELL"
echo "TTY: $(tty 2>/dev/null || echo 'No TTY')"
echo "Session: ${SSH_TTY:-'Local'}"
echo "Interactive: ${PS1:+'Yes'}"
echo ""
echo "π§ Environment:"
echo "PATH: $PATH"
echo "HOME: $HOME"
echo "PWD: $PWD"
echo ""
echo "π± Device Access Test:"
echo "idevice_id location: $(which idevice_id)"
echo "idevice_id permissions: $(ls -la $(which idevice_id))"
echo ""
echo "Testing device access..."
echo "Direct idevice_id call:"
idevice_id -l 2>&1 || echo "Failed to list devices"
echo ""
echo "Testing with explicit PATH:"
/opt/homebrew/bin/idevice_id -l 2>&1 || echo "Failed with explicit path"
echo ""
echo "USB System Info:"
system_profiler SPUSBDataType | grep -A 5 -B 2 "iPhone\|iPad" || echo "No iOS devices in USB system info"
echo ""
echo "Process tree:"
ps -ef | grep -E "(Runner|actions|idevice)" | grep -v grep || echo "No relevant processes"
echo ""
echo "π Security & Permissions:"
echo "Security assessment:"
/usr/bin/security list-keychains || echo "Cannot access keychain"
echo ""
echo "π Re-pairing attempt:"
echo "Attempting to re-establish device connection..."
idevicepair pair 2>&1 || echo "Pairing failed or not needed"
echo ""
echo "Final device check:"
idevice_id -l 2>&1 && echo "β
Device access successful" || echo "β Device access failed"