Debugging in android chrome as a non-root user
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
I am trying to debug a website displayed in Google Chrome on an Android device connected to my box via USB. To this end, there is the remote debugging protocol as implemented in the desktop versions of Google Chrome and Chromium. This is the context of the problem, but not the essence of my question.
The desktop chrome is able to communicate with the USB-attached android-chrome when Chrome and DevTools are run as root. I suspect that some character device in /dev
is missing read / write access for my non-super-user. Therefore, when I run Chrome as jaroslav, the list of USB devices is empty.
Device detected as root:
Device missing for regular user:
Strace to the rescue (?)
I want to determine which resources the application (desktop Chrome) is trying to access on my system, but as my knowledge of the platform is limited, I need advice on what to look for. Below is a list of unique system calls that the application uses. Do you know which of these are likely to be communication / negotiation calls to and from the USB device?
access getrandom rename
arch_prctl getresgid rt_sigaction
bind getresuid rt_sigprocmask
brk getsockname rt_sigreturn
clock_getres gettid sched_getparam
clone ioctl sched_getscheduler
close listen sendmsg
connect lseek sendto
creat lstat setpriority
dup mkdir set_robust_list
eventfd2 mmap setsockopt
execve mprotect set_tid_address
fadvise64 mremap shutdown
fallocate msync socket
fcntl munmap socketpair
fstat open stat
fstatfs pipe statfs
ftruncate poll symlink
futex prctl sysinfo
getdents prlimit64 uname
geteuid read unlink
getpeername readlink wait4
getpid recvfrom write
getpriority recvmsg writev
I think chrome could be scanning for USB devices with (about 80 calls):
open("/sys/bus/pci/devices/0000:**:**.*/
class,device,irq,resource,vendor", O_RDONLY) = 153
But they are not in /dev
, so which devices do I need to open for reading for the regular user?
Here is what I have in /dev
:
# ls -l hidraw* bus/usb/*/*
crw-rw-r-- 1 root usb 189, 0 180418 17:53 bus/usb/001/001
crw-rw-r-- 1 root usb 189, 1 180418 17:53 bus/usb/001/002
crw-rw-r-- 1 root usb 189, 128 180418 17:53 bus/usb/002/001
crw-rw-r-- 1 root usb 189, 129 180418 17:53 bus/usb/002/002
crw-rw-r-- 1 root usb 189, 256 180418 17:53 bus/usb/003/001
crw-rw-r-- 1 root usb 189, 257 180418 17:53 bus/usb/003/002
crw-rw-r-- 1 root usb 189, 258 180418 17:53 bus/usb/003/003
crw-rw-r-- 1 root usb 189, 259 180418 17:53 bus/usb/003/004
crw-rw-r-- 1 root usb 189, 260 180418 17:53 bus/usb/003/005
crw-rw---- 1 root plugdev 189, 263 180419 10:47 bus/usb/003/008
crw-rw-r-- 1 root usb 189, 384 180418 17:53 bus/usb/004/001
crw-rw-r-- 1 root usb 189, 385 180418 17:53 bus/usb/004/002
crw------- 1 root root 251, 0 180418 11:32 hidraw0
crw------- 1 root root 251, 1 180418 11:32 hidraw1
crw------- 1 root root 251, 2 180418 11:32 hidraw2
Perhaps all I need to do is to add jaroslav to the plugdev group? This is linux 4.12.12 with udev 236, by the way.
To sum up:
- Which system calls are likely to be related to USB communication?
- Which
/dev
nodes do I need to grant my user access to?
linux usb devices android
add a comment |Â
up vote
3
down vote
favorite
I am trying to debug a website displayed in Google Chrome on an Android device connected to my box via USB. To this end, there is the remote debugging protocol as implemented in the desktop versions of Google Chrome and Chromium. This is the context of the problem, but not the essence of my question.
The desktop chrome is able to communicate with the USB-attached android-chrome when Chrome and DevTools are run as root. I suspect that some character device in /dev
is missing read / write access for my non-super-user. Therefore, when I run Chrome as jaroslav, the list of USB devices is empty.
Device detected as root:
Device missing for regular user:
Strace to the rescue (?)
I want to determine which resources the application (desktop Chrome) is trying to access on my system, but as my knowledge of the platform is limited, I need advice on what to look for. Below is a list of unique system calls that the application uses. Do you know which of these are likely to be communication / negotiation calls to and from the USB device?
access getrandom rename
arch_prctl getresgid rt_sigaction
bind getresuid rt_sigprocmask
brk getsockname rt_sigreturn
clock_getres gettid sched_getparam
clone ioctl sched_getscheduler
close listen sendmsg
connect lseek sendto
creat lstat setpriority
dup mkdir set_robust_list
eventfd2 mmap setsockopt
execve mprotect set_tid_address
fadvise64 mremap shutdown
fallocate msync socket
fcntl munmap socketpair
fstat open stat
fstatfs pipe statfs
ftruncate poll symlink
futex prctl sysinfo
getdents prlimit64 uname
geteuid read unlink
getpeername readlink wait4
getpid recvfrom write
getpriority recvmsg writev
I think chrome could be scanning for USB devices with (about 80 calls):
open("/sys/bus/pci/devices/0000:**:**.*/
class,device,irq,resource,vendor", O_RDONLY) = 153
But they are not in /dev
, so which devices do I need to open for reading for the regular user?
Here is what I have in /dev
:
# ls -l hidraw* bus/usb/*/*
crw-rw-r-- 1 root usb 189, 0 180418 17:53 bus/usb/001/001
crw-rw-r-- 1 root usb 189, 1 180418 17:53 bus/usb/001/002
crw-rw-r-- 1 root usb 189, 128 180418 17:53 bus/usb/002/001
crw-rw-r-- 1 root usb 189, 129 180418 17:53 bus/usb/002/002
crw-rw-r-- 1 root usb 189, 256 180418 17:53 bus/usb/003/001
crw-rw-r-- 1 root usb 189, 257 180418 17:53 bus/usb/003/002
crw-rw-r-- 1 root usb 189, 258 180418 17:53 bus/usb/003/003
crw-rw-r-- 1 root usb 189, 259 180418 17:53 bus/usb/003/004
crw-rw-r-- 1 root usb 189, 260 180418 17:53 bus/usb/003/005
crw-rw---- 1 root plugdev 189, 263 180419 10:47 bus/usb/003/008
crw-rw-r-- 1 root usb 189, 384 180418 17:53 bus/usb/004/001
crw-rw-r-- 1 root usb 189, 385 180418 17:53 bus/usb/004/002
crw------- 1 root root 251, 0 180418 11:32 hidraw0
crw------- 1 root root 251, 1 180418 11:32 hidraw1
crw------- 1 root root 251, 2 180418 11:32 hidraw2
Perhaps all I need to do is to add jaroslav to the plugdev group? This is linux 4.12.12 with udev 236, by the way.
To sum up:
- Which system calls are likely to be related to USB communication?
- Which
/dev
nodes do I need to grant my user access to?
linux usb devices android
You are likely missing audev
rule. But I had experience with USB devices under Linux which did not work even with a perfectly craftedudev
rule in place (USBASP Atmega programmers). Try Google groups and ask what rule you need. They might know and might be willing to share.
â ajeh
Apr 19 at 15:00
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I am trying to debug a website displayed in Google Chrome on an Android device connected to my box via USB. To this end, there is the remote debugging protocol as implemented in the desktop versions of Google Chrome and Chromium. This is the context of the problem, but not the essence of my question.
The desktop chrome is able to communicate with the USB-attached android-chrome when Chrome and DevTools are run as root. I suspect that some character device in /dev
is missing read / write access for my non-super-user. Therefore, when I run Chrome as jaroslav, the list of USB devices is empty.
Device detected as root:
Device missing for regular user:
Strace to the rescue (?)
I want to determine which resources the application (desktop Chrome) is trying to access on my system, but as my knowledge of the platform is limited, I need advice on what to look for. Below is a list of unique system calls that the application uses. Do you know which of these are likely to be communication / negotiation calls to and from the USB device?
access getrandom rename
arch_prctl getresgid rt_sigaction
bind getresuid rt_sigprocmask
brk getsockname rt_sigreturn
clock_getres gettid sched_getparam
clone ioctl sched_getscheduler
close listen sendmsg
connect lseek sendto
creat lstat setpriority
dup mkdir set_robust_list
eventfd2 mmap setsockopt
execve mprotect set_tid_address
fadvise64 mremap shutdown
fallocate msync socket
fcntl munmap socketpair
fstat open stat
fstatfs pipe statfs
ftruncate poll symlink
futex prctl sysinfo
getdents prlimit64 uname
geteuid read unlink
getpeername readlink wait4
getpid recvfrom write
getpriority recvmsg writev
I think chrome could be scanning for USB devices with (about 80 calls):
open("/sys/bus/pci/devices/0000:**:**.*/
class,device,irq,resource,vendor", O_RDONLY) = 153
But they are not in /dev
, so which devices do I need to open for reading for the regular user?
Here is what I have in /dev
:
# ls -l hidraw* bus/usb/*/*
crw-rw-r-- 1 root usb 189, 0 180418 17:53 bus/usb/001/001
crw-rw-r-- 1 root usb 189, 1 180418 17:53 bus/usb/001/002
crw-rw-r-- 1 root usb 189, 128 180418 17:53 bus/usb/002/001
crw-rw-r-- 1 root usb 189, 129 180418 17:53 bus/usb/002/002
crw-rw-r-- 1 root usb 189, 256 180418 17:53 bus/usb/003/001
crw-rw-r-- 1 root usb 189, 257 180418 17:53 bus/usb/003/002
crw-rw-r-- 1 root usb 189, 258 180418 17:53 bus/usb/003/003
crw-rw-r-- 1 root usb 189, 259 180418 17:53 bus/usb/003/004
crw-rw-r-- 1 root usb 189, 260 180418 17:53 bus/usb/003/005
crw-rw---- 1 root plugdev 189, 263 180419 10:47 bus/usb/003/008
crw-rw-r-- 1 root usb 189, 384 180418 17:53 bus/usb/004/001
crw-rw-r-- 1 root usb 189, 385 180418 17:53 bus/usb/004/002
crw------- 1 root root 251, 0 180418 11:32 hidraw0
crw------- 1 root root 251, 1 180418 11:32 hidraw1
crw------- 1 root root 251, 2 180418 11:32 hidraw2
Perhaps all I need to do is to add jaroslav to the plugdev group? This is linux 4.12.12 with udev 236, by the way.
To sum up:
- Which system calls are likely to be related to USB communication?
- Which
/dev
nodes do I need to grant my user access to?
linux usb devices android
I am trying to debug a website displayed in Google Chrome on an Android device connected to my box via USB. To this end, there is the remote debugging protocol as implemented in the desktop versions of Google Chrome and Chromium. This is the context of the problem, but not the essence of my question.
The desktop chrome is able to communicate with the USB-attached android-chrome when Chrome and DevTools are run as root. I suspect that some character device in /dev
is missing read / write access for my non-super-user. Therefore, when I run Chrome as jaroslav, the list of USB devices is empty.
Device detected as root:
Device missing for regular user:
Strace to the rescue (?)
I want to determine which resources the application (desktop Chrome) is trying to access on my system, but as my knowledge of the platform is limited, I need advice on what to look for. Below is a list of unique system calls that the application uses. Do you know which of these are likely to be communication / negotiation calls to and from the USB device?
access getrandom rename
arch_prctl getresgid rt_sigaction
bind getresuid rt_sigprocmask
brk getsockname rt_sigreturn
clock_getres gettid sched_getparam
clone ioctl sched_getscheduler
close listen sendmsg
connect lseek sendto
creat lstat setpriority
dup mkdir set_robust_list
eventfd2 mmap setsockopt
execve mprotect set_tid_address
fadvise64 mremap shutdown
fallocate msync socket
fcntl munmap socketpair
fstat open stat
fstatfs pipe statfs
ftruncate poll symlink
futex prctl sysinfo
getdents prlimit64 uname
geteuid read unlink
getpeername readlink wait4
getpid recvfrom write
getpriority recvmsg writev
I think chrome could be scanning for USB devices with (about 80 calls):
open("/sys/bus/pci/devices/0000:**:**.*/
class,device,irq,resource,vendor", O_RDONLY) = 153
But they are not in /dev
, so which devices do I need to open for reading for the regular user?
Here is what I have in /dev
:
# ls -l hidraw* bus/usb/*/*
crw-rw-r-- 1 root usb 189, 0 180418 17:53 bus/usb/001/001
crw-rw-r-- 1 root usb 189, 1 180418 17:53 bus/usb/001/002
crw-rw-r-- 1 root usb 189, 128 180418 17:53 bus/usb/002/001
crw-rw-r-- 1 root usb 189, 129 180418 17:53 bus/usb/002/002
crw-rw-r-- 1 root usb 189, 256 180418 17:53 bus/usb/003/001
crw-rw-r-- 1 root usb 189, 257 180418 17:53 bus/usb/003/002
crw-rw-r-- 1 root usb 189, 258 180418 17:53 bus/usb/003/003
crw-rw-r-- 1 root usb 189, 259 180418 17:53 bus/usb/003/004
crw-rw-r-- 1 root usb 189, 260 180418 17:53 bus/usb/003/005
crw-rw---- 1 root plugdev 189, 263 180419 10:47 bus/usb/003/008
crw-rw-r-- 1 root usb 189, 384 180418 17:53 bus/usb/004/001
crw-rw-r-- 1 root usb 189, 385 180418 17:53 bus/usb/004/002
crw------- 1 root root 251, 0 180418 11:32 hidraw0
crw------- 1 root root 251, 1 180418 11:32 hidraw1
crw------- 1 root root 251, 2 180418 11:32 hidraw2
Perhaps all I need to do is to add jaroslav to the plugdev group? This is linux 4.12.12 with udev 236, by the way.
To sum up:
- Which system calls are likely to be related to USB communication?
- Which
/dev
nodes do I need to grant my user access to?
linux usb devices android
asked Apr 19 at 9:26
ïÃÂþÃÂûðò àðàüðÃÂÃÂûûøý
494311
494311
You are likely missing audev
rule. But I had experience with USB devices under Linux which did not work even with a perfectly craftedudev
rule in place (USBASP Atmega programmers). Try Google groups and ask what rule you need. They might know and might be willing to share.
â ajeh
Apr 19 at 15:00
add a comment |Â
You are likely missing audev
rule. But I had experience with USB devices under Linux which did not work even with a perfectly craftedudev
rule in place (USBASP Atmega programmers). Try Google groups and ask what rule you need. They might know and might be willing to share.
â ajeh
Apr 19 at 15:00
You are likely missing a
udev
rule. But I had experience with USB devices under Linux which did not work even with a perfectly crafted udev
rule in place (USBASP Atmega programmers). Try Google groups and ask what rule you need. They might know and might be willing to share.â ajeh
Apr 19 at 15:00
You are likely missing a
udev
rule. But I had experience with USB devices under Linux which did not work even with a perfectly crafted udev
rule in place (USBASP Atmega programmers). Try Google groups and ask what rule you need. They might know and might be willing to share.â ajeh
Apr 19 at 15:00
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f438676%2fdebugging-in-android-chrome-as-a-non-root-user%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You are likely missing a
udev
rule. But I had experience with USB devices under Linux which did not work even with a perfectly craftedudev
rule in place (USBASP Atmega programmers). Try Google groups and ask what rule you need. They might know and might be willing to share.â ajeh
Apr 19 at 15:00