For supporting that, adding non-default user id to stetho socket name, so they can be distinguished.
Currently, Stetho uses socket address in form stetho_<package>_devtools_remote.
If two instances of the same app are running (e.g. in dual app mode), one of them will open socket successfully, but the second app will fail:
$ adb logcat -s 'stetho:*'
07-11 15:04:34.942 28329 28580 I stetho : Listening on @stetho_com.myapp_devtools_remote
07-11 15:04:57.951 29513 29827 E stetho : Could not start Stetho server: main
Adding user id for non-default (non-0) user into socket address, so both sockets can be opened at the same time:
$ adb logcat -s 'stetho:*'
07-11 15:07:09.405 31796 32606 I stetho : Listening on @stetho_com.myapp_devtools_remote
07-11 15:07:14.751 31954 654 I stetho : Listening on @stetho_com.myapp_999_devtools_remote
For supporting that, adding non-default user id to stetho socket name, so they can be distinguished.
Currently, Stetho uses socket address in form
stetho_<package>_devtools_remote
. If two instances of the same app are running (e.g. in dual app mode), one of them will open socket successfully, but the second app will fail:Adding user id for non-default (non-0) user into socket address, so both sockets can be opened at the same time: