Closed vanokh closed 2 years ago
seems something wrong with your
I can reproduce this issue (ethernet network in Android container). I will check this issue.
previously, I tested in kernel 5.4; and it worked.data
partition, can you mount with another folder (-v ~/data2:/data
)?
please make sure the following IPV6
features enabled:
Networking support > Networking options > The IPv6 protocol
IPv6: Router Preference (RFC 4191) support
IPv6: Route Information (RFC 4191) support
IPv6: Multiple Routing Tables
IPv6: source address based routing
I've enabled all mentioned IPV6 features, but still no success, new logcat: logcat_2112.txt
code branch: refs/tags/linux-msft-wsl-5.10.74.3
,
I change the following configs, and redroid
works.
$ diff .config Microsoft/config-wsl
11,12d10
< CONFIG_CC_CAN_LINK=y
< CONFIG_CC_CAN_LINK_STATIC=y
967,968c965
< CONFIG_IPV6_ROUTER_PREF=y
< CONFIG_IPV6_ROUTE_INFO=y
---
> # CONFIG_IPV6_ROUTER_PREF is not set
980,981c977
< CONFIG_IPV6_MULTIPLE_TABLES=y
< CONFIG_IPV6_SUBTREES=y
---
> # CONFIG_IPV6_MULTIPLE_TABLES is not set
1854d1849
< # CONFIG_NET_VRF is not set
2102c2097
< CONFIG_SPMI=m
---
> # CONFIG_SPMI is not set
2631,2656c2626
< CONFIG_STAGING=y
< # CONFIG_COMEDI is not set
< # CONFIG_RTS5208 is not set
< # CONFIG_STAGING_MEDIA is not set
<
< #
< # Android
< #
< CONFIG_ASHMEM=y
< # CONFIG_ION is not set
< # end of Android
<
< # CONFIG_LTE_GDM724X is not set
< # CONFIG_GS_FPGABOOT is not set
< # CONFIG_UNISYSSPAR is not set
<
< #
< # Gasket devices
< #
< # CONFIG_STAGING_GASKET_FRAMEWORK is not set
< # end of Gasket devices
<
< # CONFIG_FIELDBUS_DEV is not set
< # CONFIG_KPC2000 is not set
< # CONFIG_QLGE is not set
< # CONFIG_SPMI_HISI3670 is not set
---
> # CONFIG_STAGING is not set
2798,2802c2768
< CONFIG_ANDROID=y
< CONFIG_ANDROID_BINDER_IPC=y
< CONFIG_ANDROID_BINDERFS=y
< CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
< # CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set
---
> # CONFIG_ANDROID is not set
2821d2786
< # CONFIG_NVMEM_SPMI_SDAM is not set
BTW, can you double check via zcat /proc/config.gz | grep IPV6
?
and I can not found any useful information in your logcat.txt
, you may need grab at the begining (otherwise, useful information maybe lost)
Branch is the same 5.10.74.3. I've checked the config, IPV6 was there, but these were missing < CONFIG_CC_CAN_LINK=y < CONFIG_CC_CAN_LINK_STATIC=y < CONFIG_SPMI=m added them and rebuild, but again no luck...
$ zcat /proc/config.gz | grep IPV6
CONFIG_IPV6=y
CONFIG_IPV6_ROUTER_PREF=y
CONFIG_IPV6_ROUTE_INFO=y
CONFIG_IPV6_OPTIMISTIC_DAD=y
# CONFIG_IPV6_MIP6 is not set
# CONFIG_IPV6_ILA is not set
# CONFIG_IPV6_VTI is not set
CONFIG_IPV6_SIT=y
# CONFIG_IPV6_SIT_6RD is not set
CONFIG_IPV6_NDISC_NODETYPE=y
# CONFIG_IPV6_TUNNEL is not set
CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_IPV6_SUBTREES=y
# 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
# CONFIG_NF_SOCKET_IPV6 is not set
# CONFIG_NF_TPROXY_IPV6 is not set
CONFIG_NF_TABLES_IPV6=y
# CONFIG_NFT_DUP_IPV6 is not set
# CONFIG_NFT_FIB_IPV6 is not set
# CONFIG_NF_DUP_IPV6 is not set
CONFIG_NF_REJECT_IPV6=y
CONFIG_NF_LOG_IPV6=y
CONFIG_IP6_NF_MATCH_IPV6HEADER=y
CONFIG_NF_DEFRAG_IPV6=y
$diff .config Microsoft/config-wsl
5c5
< CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0"
---
> CONFIG_CC_VERSION_TEXT="x86_64-msft-linux-gcc (GCC) 9.3.0"
11,12d10
< CONFIG_CC_CAN_LINK=y
< CONFIG_CC_CAN_LINK_STATIC=y
967,968c965
< CONFIG_IPV6_ROUTER_PREF=y
< CONFIG_IPV6_ROUTE_INFO=y
---
> # CONFIG_IPV6_ROUTER_PREF is not set
980,981c977
< CONFIG_IPV6_MULTIPLE_TABLES=y
< CONFIG_IPV6_SUBTREES=y
---
> # CONFIG_IPV6_MULTIPLE_TABLES is not set
1854d1849
< # CONFIG_NET_VRF is not set
2102c2097
< CONFIG_SPMI=m
---
> # CONFIG_SPMI is not set
2631,2656c2626
< CONFIG_STAGING=y
< # CONFIG_COMEDI is not set
< # CONFIG_RTS5208 is not set
< # CONFIG_STAGING_MEDIA is not set
<
< #
< # Android
< #
< CONFIG_ASHMEM=y
< # CONFIG_ION is not set
< # end of Android
<
< # CONFIG_LTE_GDM724X is not set
< # CONFIG_GS_FPGABOOT is not set
< # CONFIG_UNISYSSPAR is not set
<
< #
< # Gasket devices
< #
< # CONFIG_STAGING_GASKET_FRAMEWORK is not set
< # end of Gasket devices
<
< # CONFIG_FIELDBUS_DEV is not set
< # CONFIG_KPC2000 is not set
< # CONFIG_QLGE is not set
< # CONFIG_SPMI_HISI3670 is not set
---
> # CONFIG_STAGING is not set
2798,2802c2768
< CONFIG_ANDROID=y
< CONFIG_ANDROID_BINDER_IPC=y
< CONFIG_ANDROID_BINDERFS=y
< CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
< # CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set
---
> # CONFIG_ANDROID is not set
2821d2786
< # CONFIG_NVMEM_SPMI_SDAM is not set
3523c3488,3494
< # CONFIG_DEBUG_INFO is not set
---
> CONFIG_DEBUG_INFO=y
> # CONFIG_DEBUG_INFO_REDUCED is not set
> # CONFIG_DEBUG_INFO_COMPRESSED is not set
> # CONFIG_DEBUG_INFO_SPLIT is not set
> # CONFIG_DEBUG_INFO_DWARF4 is not set
> CONFIG_DEBUG_INFO_BTF=y
> # CONFIG_GDB_SCRIPTS is not set
I've tried to catch logcat as early as possible - it shows even start of the Linux kernel logcat2212_1.txt a bit later it shows only the same errors with com.android.phone as first time logcat2212_2.txt
there are many migrate errors..
did you run redroid with different version, but mount the same data
partition? try mount a new folder -v ~/data2:/data
?
12-22 09:11:15.818 195 219 W PackageManager: Failed to migrate com.android.theme.icon_pack.filled.settings: android.os.ServiceSpecificException: Failed to mark default storage /data/data/com.android.theme.icon_pack.filled.settings (code 95)
12-22 09:11:15.825 195 219 W PackageManager: Failed to migrate com.android.dreams.basic: android.os.ServiceSpecificException: Failed to mark default storage /data/data/com.android.dreams.basic (code 95)
12-22 09:11:15.826 195 219 W PackageManager: Failed to migrate com.android.theme.icon_pack.kai.systemui: android.os.ServiceSpecificException: Failed to mark default storage /data/data/com.android.theme.icon_pack.kai.systemui (code 95)
12-22 09:11:15.829 195 219 W PackageManager: Failed to migrate com.android.webview: android.os.ServiceSpecificException: Failed to mark default storage /data/data/com.android.webview (code 95)
12-22 09:11:15.830 195 219 W PackageManager: Failed to migrate com.android.se: android.os.ServiceSpecificException: Failed to mark default storage /data/data/com.android.se (code 95)
12-22 09:11:15.831 195 219 W PackageManager: Failed to migrate com.android.bips: android.os.ServiceSpecificException: Failed to mark default storage /data/data/com.android.bips (code 95)
I did run first time with old kernel, but I don't mount anything manually. Can you tell me how I can clean up partition or remount a new one?
try run docker run ... -v ~/some-dir:/data ...
docker run -itd --rm --memory-swappiness=0 --privileged \
--pull always \
-v ~/some-dir:/data \
-p 5555:5555 \
redroid/redroid:11.0.0-latest
this time tried with
docker run -itd --rm --memory-swappiness=0 --privileged \
--pull always \
-v ~/data2:/data \
-p 5555:5555 \
redroid/redroid:11.0.0-latest
no migration errors, but the same error in the end logcat2212_3.txt
do I need to prepare the data dir or docker make it itself? could it be some issue with binder? there is e.g. following error in logcat:
12-22 11:07:16.353 140 140 I ServiceManager: Waiting for service 'statscompanion' on '/dev/binder'...
12-22 11:07:16.454 140 140 I ServiceManager: Waiting for service 'statscompanion' on '/dev/binder'...
12-22 11:07:16.555 140 140 W ServiceManager: Service statscompanion didn't start. Returning NULL
I did only in WSL
sudo mkdir /dev/binderfs
sudo mount -t binder binder /dev/binderfs
and checked that there are devices
$ ls /dev/binderfs
binder binder-control hwbinder vndbinder
you don't need mount binderfs
in host side (redroid
will mount by itself)
weired, com.android.phone
cannot boot; and this prevent the following network stack booting.
As a workaround, try mkdir -p /data/user_de/0/com.android.providers.telephony/databases && chmod 777 /data/user_de/0/com.android.providers.telephony/databases
12-22 11:07:36.269 3849 3849 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.android.providers.telephony.CarrierIdProvider: android.database.sqlite.SQLiteCantOpenDatabaseException: Cannot open database '/data/user_de/0/com.android.providers.telephony/databases/carrierIdentification.db': Directory /data/user_de/0/com.android.providers.telephony/databases doesn't exist
12-22 11:07:36.269 3849 3849 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:7251)
12-22 11:07:36.269 3849 3849 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:6787)
12-22 11:07:36.269 3849 3849 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6704)
12-22 11:07:36.269 3849 3849 E AndroidRuntime: at android.app.ActivityThread.access$1300(ActivityThread.java:237)
12-22 11:07:36.269 3849 3849 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
12-22 11:07:36.269 3849 3849 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
I've tried mkdir, but then /data/user_de/0
is deleted shortly after:
...
12-22 11:37:54.438 2597 2597 F zygote64: jni_internal.cc:729] JNI FatalError called: (android.ext.services) frameworks/base/core/jni/com_android_internal_os_Zygote.cpp:795: Failed to mount tmpfs to /data/data: No such file or directory
...
12-22 11:37:54.533 196 220 W PackageManager: Destroying user 0 on volume null because we failed to prepare: java.io.IOException: getxattr failed: ENOTSUP (Operation not supported on transport endpoint)
folder ~/data2
is located in nfs
?
try -v <some-folder-in-ext4-instead-of-nfs>:/data
/data
should supoort xattr
, this required by Android system.
do I need to create it in WSL? because there is no any ~/data in WSL
you don't need create folder by yourself (docker
will help to)
the root of WSL is ext4 for sure and the ~ should be as well. sorry, I don't know docker so well and how it works in WSL
I've created new volume using docker volume create my-data
and then started docker with --mount source=my-data,target=/data
. now I can connect with adb, I will test more later and let you know
yes, it works now! :) successfully connected with scrcpy I didn't understand, why docker cannot use ~/data, but creating the volume resolved the problem. thanks for the support! I guess, the configuration of newer kernels of WSL should be included in documentation
thanks for your feedback, I will update doc soon.
please make sure the following
IPV6
features enabled:Networking support > Networking options > The IPv6 protocol
IPv6: Router Preference (RFC 4191) support
IPv6: Route Information (RFC 4191) support
IPv6: Multiple Routing Tables
IPv6: source address based routing
yes, it works now! :) successfully connected with scrcpy I didn't understand, why docker cannot use ~/data, but creating the volume resolved the problem. thanks for the support! I guess, the configuration of newer kernels of WSL should be included in documentation
Dear Sir
do you have step by step docs?
i also want run redroid @WSL2
and
do you add Gapps & magisk ?
THX
@CMingTseng try the links provided by @eritpchy , need compile linux kernel.
you can add GApps
via rebuilding from source or add GApps blobs into redroid directly.
Magisk not supported (feasible, need integrate source into redroid and rebuild)
Hi, I'm running docker 20.10.11 in Windows 10 using WSL2 Ubuntu. Kernel 5.10.74.3-microsoft-standard-WSL2 rebuilt including ashmem and binder:
Docker is started using:
docker run -itd --rm --memory-swappiness=0 --privileged --pull always -v ~/data:/data -p 5555:5555 redroid/redroid:11.0.0-latest redroid.gpu.mode=guest
Adb cannot connect and shows device offline.
ps -A output:
Logcat logcat.txt