Giter Site home page Giter Site logo

adb can't connect about redroid-doc HOT 7 CLOSED

remote-android avatar remote-android commented on August 31, 2024
adb can't connect

from redroid-doc.

Comments (7)

zhouziyang avatar zhouziyang commented on August 31, 2024

please try docker exec -it <container> sh, and check process list with ps -A and log (logcat)

from redroid-doc.

anktx avatar anktx commented on August 31, 2024
# ps -A
USER           PID  PPID     VSZ    RSS WCHAN            ADDR S NAME                       
root             1     0   14772   2832 0                   0 S init
root             7     1    6696   1724 0                   0 S init
root             8     1    6568   1728 0                   0 S init
root             9     1    6696   2184 0                   0 S ueventd
logd            25     1   20196   6848 0                   0 S logd
system          26     1   10928   3880 0                   0 S servicemanager
system          27     1   16520   6376 0                   0 S hwservicemanager
system          28     1   10928   3800 0                   0 S vndservicemanager
system          29     1   13972   5240 0                   0 S [email protected]
root            30     1   24316   7508 0                   0 S vold
system          45     1   11596   4300 0                   0 S [email protected]
root            46     1   11880   4576 0                   0 S healthd
audioserver     47     1   23672  11092 0                   0 S [email protected]
media           48     1   11772   5256 0                   0 S [email protected]
system          49     1   15076   4488 0                   0 S [email protected]
media           50     1   18496   6744 0                   0 S [email protected]
media           51     1   17096   6700 0                   0 S [email protected]
system          52     1   15156   5648 0                   0 S [email protected]
system          53     1   32388   9632 0                   0 S [email protected]
system          54     1   24100   7216 0                   0 S [email protected]
wifi            55     1   14668   6444 0                   0 S [email protected]
audioserver     56     1   53140  19392 0                   0 S audioserver
root            57     1    9336   2668 0                   0 S lmkd
system          58     1   63712  32512 0                   0 S surfaceflinger
system          59     1   14832   4832 0                   0 S thermalserviced
shell           60     1    9000   2440 0                   0 S sh
shell           61     1    9664    820 0                   0 S adbd
root            62     1 3435648 136016 0                   0 S zygote64
root            63     1 1319892 128852 0                   0 S zygote
cameraserver    64     1   37600  12244 0                   0 S cameraserver
drm             65     1   28788  11072 0                   0 S drmserver
incidentd       66     1   18032   5092 0                   0 S incidentd
root            67     1   22036   5376 0                   0 S installd
keystore        68     1   21496   7384 0                   0 S keystore
media           69     1   18744   6772 0                   0 S mediadrmserver
mediaex         70     1 2168908  17616 0                   0 S media.extractor
media           71     1 2137748  11592 0                   0 S media.metrics
media           72     1   68612  18144 0                   0 S mediaserver
root            73     1   32688   7216 0                   0 S netd
statsd          74     1   20400   6852 0                   0 S statsd
root            75     1   18236   6088 0                   0 S storaged
wifi            76     1   16444   6060 0                   0 S wificond
mediacodec      77     1   43196  14916 0                   0 S media.codec
radio           78     1   15612   5400 0                   0 S rild
system          79     1   17368   6724 0                   0 S gatekeeperd
root            80     1   17864   4820 0                   0 S perfprofd
tombstoned      81     1    9108   2368 0                   0 S tombstoned
root           105    73    9516   2608 0                   0 S iptables-restore
root           106    73    9532   2376 0                   0 S ip6tables-restore
system         177    62 3716320 236476 0                   0 S system_server
media_rw       306    30   15468   4220 0                   0 S sdcard
u0_a38         308    62 2903564 102448 0                   0 S com.android.inputmethod.latin
webview_zyg+   357    63 1322000  55468 0                   0 S webview_zygote
u0_a27         368    62 3028732 197244 0                   0 S com.android.systemui
radio          444    62 2920300 109604 0                   0 S com.android.phone
system         551    62 2953492 125224 0                   0 S com.android.settings
u0_a24         669    62 2889708  80864 0                   0 S android.ext.services
secure_elem+   722    62 2889884  75512 0                   0 S com.android.se
u0_a8          740    62 2898520 100056 0                   0 S android.process.media
u0_a28         760    62 2887536  73184 0                   0 S com.android.smspush
u0_a22         780    62 3003496 179936 0                   0 S com.android.launcher3
system         819    62 2888388  76892 0                   0 S com.android.keychain
u0_a9          868    62 2890616  87024 0                   0 S com.android.providers.calendar
u0_a35        1037    62 2900472  91992 0                   0 S com.android.email
u0_a56        1068    62 3516792  82964 0                   0 S com.android.gallery3d
u0_a44        1153    62 2894024  83828 0                   0 S com.android.traceur
root         20211     0    9000   3196 0                   0 S sh
root         22080 20211   11028   3060 0                   0 R ps
u0_a51       24879    62 2893268  83924 0                   0 S com.android.calendar
u0_a40       24902    62 2895840  82376 0                   0 S com.android.deskclock

logcat gives a very long repeating output:

07-13 07:29:51.571    73   124 D CommandListener: Clearing all IP addresses on eth0
07-13 07:29:51.572   177   293 D EthernetNetworkFactory: starting IpClient(eth0): mNetworkInfo=[type: Ethernet[], state: DISCONNECTED/IDLE, reason: (unspecified), extra: (none), failover: false, available: false, roaming: false]
07-13 07:29:51.574   177 29444 E IpClient.eth0: ERROR disabling IPv6 failed: java.lang.IllegalStateException: command '13642919 interface ipv6 eth0 disable' failed with '400 13642919 Failed to change IPv6 state (No such file or directory)'
07-13 07:29:51.574    73   124 D CommandListener: Clearing all IP addresses on eth0
07-13 07:29:51.576   177 29444 E IpClient.eth0: ERROR error setting IPv6 privacy extensions: java.lang.IllegalStateException: command '13642921 interface ipv6privacyextensions eth0 enable' failed with '400 13642921 Failed to set ipv6 privacy extensions (No such file or directory)'
07-13 07:29:51.576   177 29444 E IpClient.eth0: ERROR onProvisioningFailure(): 5
07-13 07:29:51.588   177 29444 E IpClient.eth0: ERROR disabling IPv6 failed: java.lang.IllegalStateException: command '13642922 interface ipv6 eth0 disable' failed with '400 13642922 Failed to change IPv6 state (No such file or directory)'
07-13 07:29:51.588    73   124 D CommandListener: Clearing all IP addresses on eth0
07-13 07:29:51.589   177   293 D EthernetNetworkFactory: starting IpClient(eth0): mNetworkInfo=[type: Ethernet[], state: DISCONNECTED/IDLE, reason: (unspecified), extra: (none), failover: false, available: false, roaming: false]
07-13 07:29:51.591   177 29445 E IpClient.eth0: ERROR disabling IPv6 failed: java.lang.IllegalStateException: command '13642924 interface ipv6 eth0 disable' failed with '400 13642924 Failed to change IPv6 state (No such file or directory)'
07-13 07:29:51.591    73   124 D CommandListener: Clearing all IP addresses on eth0

On a host system IPv6 is disabled

~> zcat /proc/config.gz | grep -i ipv6
# CONFIG_IPV6 is not set

I'll try to enable it.

from redroid-doc.

anktx avatar anktx commented on August 31, 2024
 ~> zcat /proc/config.gz | grep -i ipv6
CONFIG_IPV6=y
# CONFIG_IPV6_ROUTER_PREF is not set
# CONFIG_IPV6_OPTIMISTIC_DAD is not set
# CONFIG_IPV6_MIP6 is not set
# CONFIG_IPV6_ILA is not set
# CONFIG_IPV6_VTI is not set
# CONFIG_IPV6_SIT is not set
# CONFIG_IPV6_TUNNEL is not set
# CONFIG_IPV6_MULTIPLE_TABLES is not set
# CONFIG_IPV6_MROUTE is not set
# CONFIG_IPV6_SEG6_LWTUNNEL is not set
# CONFIG_IPV6_SEG6_HMAC is not set
# CONFIG_IPV6_RPL_LWTUNNEL is not set
# CONFIG_IP_VS_IPV6 is not set
# IPv6: Netfilter Configuration
# CONFIG_NF_SOCKET_IPV6 is not set
# CONFIG_NF_TPROXY_IPV6 is not set
# CONFIG_NF_DUP_IPV6 is not set
# CONFIG_NF_REJECT_IPV6 is not set
# CONFIG_NF_LOG_IPV6 is not set
# end of IPv6: Netfilter Configuration
CONFIG_NF_DEFRAG_IPV6=y
# ps -A 
USER           PID  PPID     VSZ    RSS WCHAN            ADDR S NAME                       
root             1     0   14772   2836 0                   0 S init
root             8     1    6696   1720 0                   0 S init
root             9     1    6568   1724 0                   0 S init
root            10     1    6696   2180 0                   0 S ueventd
logd            26     1   18148   4308 0                   0 S logd
system          27     1   10928   3820 0                   0 S servicemanager
system          28     1   16520   6248 0                   0 S hwservicemanager
system          29     1   10928   2992 0                   0 S vndservicemanager
system          30     1   13972   5340 0                   0 S [email protected]
root            31     1   25372   7296 0                   0 S vold
system          47     1   11596   4348 0                   0 S [email protected]
root            48     1   11880   4508 0                   0 S healthd
audioserver     49     1   23672  11372 0                   0 S [email protected]
media           50     1   11772   5452 0                   0 S [email protected]
system          51     1   16132   4664 0                   0 S [email protected]
media           52     1   18496   6696 0                   0 S [email protected]
media           53     1   17096   6572 0                   0 S [email protected]
system          54     1   15156   5612 0                   0 S [email protected]
system          55     1   32388   9672 0                   0 S [email protected]
system          56     1   24100   7360 0                   0 S [email protected]
wifi            57     1   14668   6736 0                   0 S [email protected]
audioserver     58     1   52628  19160 0                   0 S audioserver
root            59     1    9336   2440 0                   0 S lmkd
system          60     1   64704  32176 0                   0 S surfaceflinger
system          61     1   14832   4808 0                   0 S thermalserviced
shell           62     1    9000   2328 0                   0 S sh
shell           63     1    9280    784 0                   0 S adbd
root            64     1 3477636 136040 0                   0 S zygote64
root            65     1 1361884 128956 0                   0 S zygote
cameraserver    66     1   36544  12108 0                   0 S cameraserver
drm             67     1   28788  11200 0                   0 S drmserver
incidentd       68     1   18032   5100 0                   0 S incidentd
root            69     1   19924   5004 0                   0 S installd
keystore        70     1   21496   7452 0                   0 S keystore
media           71     1   18744   7124 0                   0 S mediadrmserver
mediaex         72     1 2168780  17164 0                   0 S media.extractor
media           73     1 2137748  11480 0                   0 S media.metrics
media           74     1   61796  16380 0                   0 S mediaserver
root            75     1   34928   7116 0                   0 S netd
statsd          76     1   20400   6672 0                   0 S statsd
root            77     1   18236   5784 0                   0 S storaged
wifi            78     1   16444   5988 0                   0 S wificond
mediacodec      79     1   41116  14552 0                   0 S media.codec
radio           80     1   15612   5516 0                   0 S rild
system          81     1   17368   6668 0                   0 S gatekeeperd
root            82     1   17864   4752 0                   0 S perfprofd
tombstoned      83     1    9108   2432 0                   0 S tombstoned
mdnsr           93     1    5724   1108 0                   0 S mdnsd
root           101    75    9516   2396 0                   0 S iptables-restore
root           102    75    9532   2428 0                   0 S ip6tables-restore
system         179    64 3730400 223548 0                   0 S system_server
media_rw       303    31   15464   4168 0                   0 S sdcard
u0_a38         391    64 2944200  99508 0                   0 S com.android.inputmethod.latin
webview_zyg+   415    65 1363992  55212 0                   0 S webview_zygote
u0_a27         424    64 3027340 181008 0                   0 S com.android.systemui
radio          476    64 2961020 104100 0                   0 S com.android.phone
system         494    64 2994416 123928 0                   0 S com.android.settings
u0_a24         514    64 2931696  80972 0                   0 S android.ext.services
u0_a40         601    64 2940024  86552 0                   0 S com.android.deskclock
secure_elem+   632    64 2931872  76452 0                   0 S com.android.se
u0_a22         647    64 3032364 169736 0                   0 S com.android.launcher3
u0_a28         671    64 2929524  74720 0                   0 S com.android.smspush
system         689    64 2931440  77064 0                   0 S com.android.keychain
u0_a8          713    64 2939520  98532 0                   0 S android.process.media
u0_a10         739    64 2935152  97480 0                   0 S android.process.acore
u0_a51         757    64 2936320  84908 0                   0 S com.android.calendar
u0_a12         784    64 2937416  80668 0                   0 S com.android.contacts
u0_a9          803    64 2931512  85976 0                   0 S com.android.providers.calendar
u0_a35         819    64 2942460  90760 0                   0 S com.android.email
u0_a25         847    64 2932748  76136 0                   0 S com.android.managedprovisioning
u0_a16         864    64 2929524  74824 0                   0 S com.android.onetimeinitializer
u0_a21         882    64 2937864  78072 0                   0 S com.android.packageinstaller
u0_a44         905    64 2937076  84152 0                   0 S com.android.traceur
u0_a33         922    64 2932880  79980 0                   0 S com.android.quicksearchbox
root           945     0    9000   3200 0                   0 S sh
root           968   945   11028   3128 0                   0 R ps

Listening ports were empty, but now

# netstat -tunelp                                                                                                         
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program Name
tcp6       0      0 :::5555                 :::*                    LISTEN      2000       14299       63/adbd
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1020       30944       93/mdnsd
udp        0      0 0.0.0.0:41785           0.0.0.0:*                           1020       30782       93/mdnsd
udp6       0      0 :::38113                :::*                                1020       30783       93/mdnsd
udp6       0      0 :::5353                 :::*                                1020       30945       93/mdnsd

logcat output is huge, attaching it as file: log.txt

Maybe some kernel options needs to be enabled on a host system?

from redroid-doc.

zhouziyang avatar zhouziyang commented on August 31, 2024

is adb working fine after enable ipv6?
netd is encountering command errors (interface ipv6privacyextensions eth0 enable), thus networking not connected. You can ignore this error in source code if you want (system/netd/server/CommandListener.cpp).

gentoo is not tested yet, but rarely see ipv6 not supported in modern OS.

redroid is a container solution (share kernel with Host OS), and there are requirements of host OS (binderfs, ashmem etc.)

from redroid-doc.

anktx avatar anktx commented on August 31, 2024

adb still show device offline:

~> adb devices
List of devices attached
emulator-5554	offline
~> adb shell
error: device offline

I have a self-build kernel in Gentoo, where ipv6 were disabled. Now I enabled ipv6.
binderfs and ashmem are also enabled:

~> zcat /proc/config.gz | grep -i binder
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=y
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
# CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set
~> zcat /proc/config.gz | grep -i ashmem
CONFIG_ASHMEM=y

Maybe, I need to compile them as modules, not builtin?

from redroid-doc.

zhouziyang avatar zhouziyang commented on August 31, 2024

build into kernel is fine. I thinks there are some ipv6 related modules missing. you may need to compare your kernel config with some known working configs (such as Ubuntu).
As a workaround, you can ignore such ipv6 errors in netd just like mentioned above.

from redroid-doc.

anktx avatar anktx commented on August 31, 2024

Ubuntu 20.04 work fine, thank you!

from redroid-doc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.