Skip to content

Conversation

@yureitzk
Copy link

@yureitzk yureitzk commented Jan 9, 2026

This allows connecting to Firefox on Android devices without access to /proc/net/unix, bypassing automatic socket discovery.

@Rob--W
Copy link
Member

Rob--W commented Jan 15, 2026

Could you elaborate when this would be needed, and how we can test it?

The current logic matches Firefox's logic that is used at about:debugging on desktop. There, we also parse /proc/net/unix without fallback, see this Firefox source code: https://searchfox.org/firefox-main/rev/28398d11d39984cc5db08020671e7dd0d1408ec0/devtools/client/shared/remote-debugging/adb/adb-device.js#29-40

@yureitzk
Copy link
Author

Yes. The problem is that new version of Android don't have an access to /proc/net/unix on non-root devices, and the current code fails to extract Firefox's socket. This option allows user to skip the file check and manually specify the socket.

The socket usually looks like this @org.mozilla.fenix/firefox-debugger-socket . It's pretty much the same string you parse from /proc/net/unix. To test the connection in the code I make a temporary FirefoxRDPClient and make a test connection on it. Not sure if that's the best to test the connection though, but without it, the program will fail with a cryptic error for an end-user

@Rob--W
Copy link
Member

Rob--W commented Jan 19, 2026

You linked to a restriction for apps in Android 10. I have tested various Android versions on different Pixel devices without issues.

Which phone are you using?
What OS is it running?
What is the output of:
adb shell cat /proc/net/unix
adb shell ls -la /proc/net/unix

@yureitzk
Copy link
Author

I think I figured it out. Some of my phones (running Android 10+) have access to /proc/net/unix, and dome don't. The ones that can't access it are running custom ROMs that set the file's permissions to 440, so you can't really open the file via adb, you need a root shell

@Rob--W
Copy link
Member

Rob--W commented Jan 19, 2026

If you have a root shell you can fix up your permissions yourself. For example, here is a (random) other project where a similar access issue was encountered, and a user shared explicit steps to fix it up temporarily: mpotthoff/vscode-android-webview-debug#4 (comment)

@yureitzk
Copy link
Author

For sure, you can change the permissions, but doing this just to test a web extension is not really handy, especially if you rely on 440 mask and you need to change it each time you want to test a web extension on your phone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants