如何在OTG上对Android进行以太网工作? -- networking 领域 和 usb-connection-mode 领域 和 kernel 领域 和 usb-on-the-go 领域 和 usb-drivers 领域 android 相关 的问题

How to make Ethernet work on Android over OTG?


2
vote

问题

中文

我正在尝试在OTG电缆上使用连接到Android 7设备的LTE调制解调器。内核识别设备并使用 cdc_ether 注册它,但我无法使用设备的连接。这是因为它随后安装为USB存储?

设备在Android UI /状态栏中显示为设备。

如果我禁用MTP支持,那么设备不会寄存 cdc_ether

dmesg

  [10946.408785] usb 1-1.3: new high-speed USB device number 21 using msm_hsusb_host [10946.525287] usb 1-1.3: New USB device found, idVendor=19d2, idProduct=1225 [10946.525306] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [10946.525316] usb 1-1.3: Product: ZTE Mobile Broadband [10946.525325] usb 1-1.3: Manufacturer: ZTE,Incorporated [10946.525335] usb 1-1.3: SerialNumber: MF8610ZTED000000 [10946.529662] usb-storage 1-1.3:1.0: USB Mass Storage device detected [10946.532702] scsi host19: usb-storage 1-1.3:1.0 [10947.538579] scsi 19:0:0:0: CD-ROM            ZTE      USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2 [10952.740595] usb 1-1.3: USB disconnect, device number 21 [10953.087891] usb 1-1.3: new high-speed USB device number 22 using msm_hsusb_host [10953.232955] usb 1-1.3: New USB device found, idVendor=19d2, idProduct=1405 [10953.232969] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [10953.232977] usb 1-1.3: Product: ZTE Mobile Broadband [10953.232984] usb 1-1.3: Manufacturer: ZTE,Incorporated [10953.232991] usb 1-1.3: SerialNumber: MF8610ZTED000000 [10953.260856] cdc_ether 1-1.3:1.0 usb0: register 'cdc_ether' at usb-msm_hsusb_host-1.3, CDC Ethernet Device, 36:4b:50:b7:ef:da [10953.262322] usb-storage 1-1.3:1.2: USB Mass Storage device detected [10953.262652] scsi host20: usb-storage 1-1.3:1.2 [10954.261139] scsi 20:0:0:0: CD-ROM            ZTE      USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2   

dmesg 使用mtp禁用:

  [10664.987934] usb 1-1.3: new high-speed USB device number 19 using msm_hsusb_host [10665.105272] usb 1-1.3: New USB device found, idVendor=19d2, idProduct=1225 [10665.105291] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [10665.105301] usb 1-1.3: Product: ZTE Mobile Broadband [10665.105310] usb 1-1.3: Manufacturer: ZTE,Incorporated [10665.105320] usb 1-1.3: SerialNumber: MF8610ZTED000000 [10665.110339] usb-storage 1-1.3:1.0: USB Mass Storage device detected [10665.111320] scsi host17: usb-storage 1-1.3:1.0 [10666.110748] scsi 17:0:0:0: CD-ROM            ZTE      USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2 [10671.223090] usb 1-1.3: USB disconnect, device number 19 [10671.407859] msm_otg 78db000.usb: OTG runtime idle [10671.407887] msm_otg 78db000.usb: OTG runtime suspend   

ifconfig

  adb push0  

adb push1

  adb push2  

设备确实显示为 adb push3 ,其中mac地址在 adb push4 中列出。

英文原文

I am trying to use an LTE modem connected to an Android 7 device over an OTG cable. The kernel recognizes the device and registers it with cdc_ether, but I am unable to use the connection from the device. Is this because it is subsequently mounted as USB storage?

The device does not show up as a device in the Android UI / status bar.

If I disable MTP support, then the device wont register cdc_ether at all.

dmesg:

[10946.408785] usb 1-1.3: new high-speed USB device number 21 using msm_hsusb_host [10946.525287] usb 1-1.3: New USB device found, idVendor=19d2, idProduct=1225 [10946.525306] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [10946.525316] usb 1-1.3: Product: ZTE Mobile Broadband [10946.525325] usb 1-1.3: Manufacturer: ZTE,Incorporated [10946.525335] usb 1-1.3: SerialNumber: MF8610ZTED000000 [10946.529662] usb-storage 1-1.3:1.0: USB Mass Storage device detected [10946.532702] scsi host19: usb-storage 1-1.3:1.0 [10947.538579] scsi 19:0:0:0: CD-ROM            ZTE      USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2 [10952.740595] usb 1-1.3: USB disconnect, device number 21 [10953.087891] usb 1-1.3: new high-speed USB device number 22 using msm_hsusb_host [10953.232955] usb 1-1.3: New USB device found, idVendor=19d2, idProduct=1405 [10953.232969] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [10953.232977] usb 1-1.3: Product: ZTE Mobile Broadband [10953.232984] usb 1-1.3: Manufacturer: ZTE,Incorporated [10953.232991] usb 1-1.3: SerialNumber: MF8610ZTED000000 [10953.260856] cdc_ether 1-1.3:1.0 usb0: register 'cdc_ether' at usb-msm_hsusb_host-1.3, CDC Ethernet Device, 36:4b:50:b7:ef:da [10953.262322] usb-storage 1-1.3:1.2: USB Mass Storage device detected [10953.262652] scsi host20: usb-storage 1-1.3:1.2 [10954.261139] scsi 20:0:0:0: CD-ROM            ZTE      USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2 

dmesg with MTP disabled:

[10664.987934] usb 1-1.3: new high-speed USB device number 19 using msm_hsusb_host [10665.105272] usb 1-1.3: New USB device found, idVendor=19d2, idProduct=1225 [10665.105291] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [10665.105301] usb 1-1.3: Product: ZTE Mobile Broadband [10665.105310] usb 1-1.3: Manufacturer: ZTE,Incorporated [10665.105320] usb 1-1.3: SerialNumber: MF8610ZTED000000 [10665.110339] usb-storage 1-1.3:1.0: USB Mass Storage device detected [10665.111320] scsi host17: usb-storage 1-1.3:1.0 [10666.110748] scsi 17:0:0:0: CD-ROM            ZTE      USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2 [10671.223090] usb 1-1.3: USB disconnect, device number 19 [10671.407859] msm_otg 78db000.usb: OTG runtime idle [10671.407887] msm_otg 78db000.usb: OTG runtime suspend 

ifconfig:

TB-8504F:/ # ifconfig                                                                                                                   wlan0     Link encap:Ethernet  HWaddr 40:a1:08:36:5b:0d           inet addr:192.168.1.133  Bcast:192.168.1.255  Mask:255.255.255.0            inet6 addr: 2605:a601:ab2b:9900:b19e:4f2e:5d28:5fa9/64 Scope: Global           inet6 addr: fe80::42a1:8ff:fe36:5b0d/64 Scope: Link           inet6 addr: 2605:a601:ab2b:9900:42a1:8ff:fe36:5b0d/64 Scope: Global           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:27906 errors:0 dropped:4 overruns:0 frame:0            TX packets:17795 errors:0 dropped:0 overruns:0 carrier:0            collisions:0 txqueuelen:1000            RX bytes:14342222 TX bytes:8697917   dummy0    Link encap:Ethernet  HWaddr c6:b9:c8:82:8f:7e           inet6 addr: fe80::c4b9:c8ff:fe82:8f7e/64 Scope: Link           UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0            TX packets:3 errors:0 dropped:0 overruns:0 carrier:0            collisions:0 txqueuelen:0            RX bytes:0 TX bytes:210   p2p0      Link encap:Ethernet  HWaddr 42:a1:08:36:5b:0d           UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0            collisions:0 txqueuelen:1000            RX bytes:0 TX bytes:0   lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0            inet6 addr: ::1/128 Scope: Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0            collisions:0 txqueuelen:0            RX bytes:0 TX bytes:0  

ip l:

255|TB-8504F:/ # ip l 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: dummy0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default      link/ether c6:b9:c8:82:8f:7e brd ff:ff:ff:ff:ff:ff 3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default      link/sit 0.0.0.0 brd 0.0.0.0 20: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000     link/ether 40:a1:08:36:5b:0d brd ff:ff:ff:ff:ff:ff 21: p2p0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000     link/ether 42:a1:08:36:5b:0d brd ff:ff:ff:ff:ff:ff 31: usb0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000     link/ether 36:4b:50:b7:ef:da brd ff:ff:ff:ff:ff:ff 

The device does show up as usb0 with the MAC address that was listed in dmesg.

              
       
       

回答列表

3
 
vote
vote
最佳答案
 

有很长的以太网相关问题列表,但没有全面的答案涵盖了所有方面。我概括了你的问题,以便分享我的知识。

这是您需要做的事情,以便在Android上进行以太网:

  • 确保OTG支持可用
  • 内核必须使用以太网(和USB以太网)支持
  • 处理USB模式开关和内核模块加载(如果适用)
  • 使Android框架进行网络配置或手动进行

注意: 下面描述的所有内容都需要 rooted设备,或者至少有一个解锁引导加载程序。
您应该熟悉CommandLine界面。


OTG支持

您的设备必须能够在USB主机模式下运行。 EthernetService 是仅当设备支持usb主机( android.hardware.usb.host )或以太网( android.hardware.ethernet )。如果Android的USB电源不足以连接设备,您可能还需要使用Powered USB集线器。相关问题:

  • 有没有明确的方式知道我的手机是否支持USB-OTG?

内核配置

为了使用以太网通过USB (适配器或调制解调器类似的设备)内核必须用 CONFIG_USB_USBNET < / code> 和其他配置如 USB_NET_CDCETHER USB_NET_HUAWEI_CDC_NCM USB_NET_CDC_MBIM 等,具体取决于连接设备的类型和协议会谈。相关问题:

  • 安装了内核模块?
  • 在不闪烁的新内核
  • 的情况下为内核添加驱动程序
  • 加载一个未签名的内核模块到签名enforcing kernel

USB模式开关和加载内核模块

许多USB网络设备是多模式或触发器设备。它们显示为USB大容量存储设备(也称为 zerocd 模式)切换到以太网/ PPP模式。 usb_modeswitch 是一个常用于此目的的Linux工具。查看一些细节这里的工作。您需要为您的设备构建此工具,或者可以下载这个二进制 aarch64 < /代码>。获取这里

为了在设备连接到Android时自动切换模式,我们需要通过 hotplug helper 或用户栏守护程序(如 udev 在linux和 ueventd 上的Android)。另外,内核模块也可以自动加载/卸载。我是定义一个 android.hardware.usb.host0 service 在此实现这一点,您可以手动执行此操作也。

注意:有一个Android应用程序 ppp窗口小部件(由USB_ModesWitch的开发人员,我没有自动处理模式切换并需要"无内核驱动程序模块," 驱动程序"实现基于Android USB主机API" 。 您可能对此感兴趣。

  android.hardware.usb.host1  

*如果hotpl g您需要定义自定义selinux策略,让内核进行更改(请参阅此答案详细信息)。

  android.hardware.usb.host2  

网络配置

Android框架具有以太网接口的硬编码名称(默认是 android.hardware.usb.host3 android.hardware.usb.host4 ,......)。每当出现以太网接口时,它名称匹配具有硬编码值。之后重命名界面不起作用,因为只有内核提供接口名称是跟踪。

因此,您需要通过修改两者之一(如果需要)进行内核和AOP之间的此命名约定。可以使用 android.hardware.usb.host5 工具来查看esernel提供的名称(如在您的情况下,它是 android.hardware.usb.host6 )。使用 android.hardware.usb.host7 或de-compile android.hardware.usb.host8 使用 apktool 查看AOSP值。

  android.hardware.usb.host9  

一旦出现了以太网接口,Android会自动配置它,<代码> ABCDefghijklmnabCdefghijklmn20 验证连接和 android.hardware.ethernet1 关闭wifi和移动数据(如果它是开启的)。涉及配置的其他服务和组件包括<代码> android.hardware.ethernet2 ,<代码> android.hardware.ethernet3 ,<代码> android.hardware.ethernet4 ,<代码> android.hardware.ethernet5 ,<代码> android.hardware.ethernet6 android.hardware.ethernet7 android.hardware.ethernet8

ethernetservice 添加在Android 5中。在该AOSP被修补以进行以太网工作之前(例如,请参阅这个和这个)。仍然库存android为以太网提供GUI设置,但有些自定义ROM开发人员和OEM DO(例如,请参阅 )。 android.hardware.ethernet9 类用于设置并保存手动IP配置(到 CONFIG_USB_USBNET0 )隐藏。默认是要使用硬编码配置(请参阅" ip配置"下使用 CONFIG_USB_USBNET1 )或 DHCP提供配置< / a>。

手动配置

您可能希望执行手动网络配置。 如果:

  • Android框架不配置以太网接口(在旧设备上或由于接口名称不一致)。
  • 要设置静态IP地址或不同的DNS服务器。
  • 您希望使用以太网以及WiFi或移动数据,或者希望在其中任何一个中共享互联网。

但在这种情况下,Android的Java网络堆栈保持下降,因此某些根据Android API的应用程序可能不会正常行为。 有关相关详细信息,请参阅通过adb shell连接到wifi 。

  CONFIG_USB_USBNET2  
  CONFIG_USB_USBNET3  

不要忘记在 CONFIG_USB_USBNET4 文件和shell脚本上设置适当的权限。 一旦设置,以太网就在连接USB适配器时立即工作。

 

There is a long list of Ethernet related questions but none has a comprehensive answer covering all aspects. I'm generalizing your question in order to share my knowledge on this.

This is what you need to do in order to make Ethernet work on Android:

  • Make sure OTG support is available
  • Kernel must be built with Ethernet (and USB Ethernet) support
  • Handle USB mode switch and kernel module loading (if applicable)
  • Make Android framework do network configuration or do it manually

Note: Everything described below requires a rooted device, or at least the one with unlocked bootloader.
You should be familiar with commandline interface.


OTG SUPPORT

Your device must be able to operate in USB host mode.EthernetService is started only if device supports feature USB host (android.hardware.usb.host) or Ethernet (android.hardware.ethernet). You may also need to use a powered USB hub if Android's USB power supply is not enough for connected device. Related question:

  • Is there a definite way to know if my phone supports USB-OTG or not?

KERNEL CONFIGURATION

In order to use Ethernet over USB (adapters or modem-like devices) kernel must be built with CONFIG_USB_USBNET and other configurations like USB_NET_CDCETHER, USB_NET_HUAWEI_CDC_NCM, USB_NET_CDC_MBIM etc. depending on the type of connected device and the protocol it talks. Related questions:

  • Where kernel modules are installed?
  • Add a driver to kernel without flashing a new kernel
  • Load an unsigned Kernel Module to signature enforcing Kernel

USB MODE SWITCH AND LOADING KERNEL MODULE

Many USB network devices are multi-mode or flip flop devices. They appear as USB Mass Storage device (also called ZeroCD mode) when inserted and need to be switched to Ethernet/PPP mode. USB_ModeSwitch is a Linux tool commonly used for this purpose. See some details here how it works. You need to build this tool for your device, or may download this binary for aarch64. Get device database from here.

In order to automatically switch mode whenever the device is connected to Android, we need to listen to kernel USB uevents, either through hotplug helper or a userspace daemon (like udev on Linux and ueventd on Android). Additionally the kernel module can also be loaded/unloaded automatically. I'm defining an init service here to achieve this, you can do it manually too.

Note: There is an Android app PPP Widget (by the developer of USB_ModeSwitch, I have no affiliation) which handles mode switching automatically and needs "no kernel driver modules, the 'driver' implementation is based on the Android USB host API". You might be interested in that too.

# /system/etc/init/custom.rc  # kernel hotplug or uevent daemon service service cust.udevd /system/sbin/busybox uevent /system/sbin/udev.sh     seclabel u:r:magisk:s0     disabled     writepid /dev/cpuset/system-background/tasks  # set kernel hotplug helper or start uevent daemon on boot on property:sys.boot_completed=1     #write /proc/sys/kernel/hotplug /system/sbin/udev.sh     start cust.udevd 

* In case of hotplug you need to define custom SELinux policies to let kernel make changes (see this answer for details).

#!/system/bin/sh  # /system/sbin/udev.sh script is executed from kernel hotplug or uevent daemon  # set PATH where you placed binaries export PATH=/system/bin  # save log exec >>/dev/udev.log 2>&1  # don't execute multiple instances exec 200<>/dev/udev.lock flock 200  VID="12d1"          # USB vendor ID of a Huawei devcie PID_UMS="1f01"      # product ID in ZeroCD mode PID_ETH="14db"      # product ID in Ethernet mode MODULE="cdc_ether"  # kernel module for USB Ethernet IFACE="usb0"        # Ethernet interface name  matches() {     [ -e "/sys/$DEVPATH/$1" ] || return 1     [ "$(cat "/sys/$DEVPATH/$1")" = "$2" ] || return 1     return 0 }  # check if a new USB device is added or removed if [ "$SUBSYSTEM" = "usb" ] then     # check if a USB device is added, then match VID and PID for mode switching     # also device must belong to UMS class: https://www.usb.org/defined-class-codes#anchor_BaseClass08h     if [ "$ACTION" = "add" ] && echo "$PRODUCT" | grep -q "$VID/$PID_UMS/" &&         matches bInterfaceClass 08 && matches bInterfaceNumber 00     then         echo "Switching USB mode..."          # USB mode switching of flip flop devices (USB modems, routers etc.)         # usb_modeswitch_dispatcher needs /system/sbin/usb_modeswitch binary and configuration files in /etc         # so you need to modify the hard-coded paths in source code as per your requirement         usb_modeswitch_dispatcher --switch-mode "$(basename "$DEVPATH")"     fi      # match VID and PID for module loading     # modprobe should be built with the hard-coded path to where you place modules e.g. /system/lib     if echo "$PRODUCT" | grep -q "$VID/$PID_ETH/"     then         if [ "$ACTION" = "add" ] && ! grep -q "^$MODULE " /proc/modules         then             echo "Loading $MODULE module..."             modprobe "$MODULE"          elif [ "$ACTION" = "remove" ] && grep -q "^$MODULE " /proc/modules         then             echo "Removing $MODULE module..."             modprobe -r "$MODULE"         fi     fi fi  # on network interface event if [ "$SUBSYSTEM" = "net" ] && [ "$INTERFACE" = "$IFACE" ] then     if [ "$ACTION" = "add" ]     then         echo "Starting cust.eth_config service..."         #start cust.eth_config    # uncomment if you want to do manual network configuration     fi      if [ "$ACTION" = "remove" ]     then         echo "Stopping cust.eth_config service..."         #stop cust.eth_config    # uncomment if you want to do manual network configuration     fi fi 

NETWORK CONFIGURATION

Android framework has a hard-coded name for Ethernet interface (default is eth0, eth1, ...). Whenever an Ethernet interface appears, its name is matched with the hard-coded value. Renaming interface afterwards doesn't work because only kernel provided interface name is tracked.

So you need to make this naming convention consistent between kernel and AOSP by modifying one of the both (if needed). Kernel provided name can be seen using ip tool (as in your case it's usb0). Use dumpsys or de-compile /system/framework/framework-res.apk using apktool to see the AOSP value.

~$ dumpsys ethernet ...   Ethernet interface name filter: eth\d ... 

As soon as an Ethernet interface appears, Android configures it automatically, NetworkMonitor validates the connectivity and ConnectivityService turns off WiFi and Mobile Data (if it's ON). Other services and components involved in configuration include UsbHostManager, EthernetTracker, EthernetNetworkFactory, IpClient.eth0, DhcpClient, DnsManager and Netd.

EthernetService was added in Android 5. Before that AOSP was patched to make Ethernet work (e.g. see this and this). Still stock Android provides no GUI settings for Ethernet, but some custom ROM developers and OEMs do (e.g. see this). EthernetManager class which is used to set and save manual IP configuration (to /data/misc/ethernet/ipconfig.txt) is hidden. Default is to use a hard-coded configuration (see using dumpsys ethernet under "IP Configurations:") or DHCP provided configuration.

MANUAL CONFIGURATION

You might want to do manual network configuration e.g. if:

  • Android framework doesn't configure the Ethernet interface (on older devices or due to interface name inconsistency).
  • You want to set static IP address or different DNS server.
  • You want to use Ethernet along with WiFi or Mobile Data, or want to share internet among any of these.

But in this case Android's Java network stack remains down, so some apps depending on Android APIs may not behave normally. For related details see Connecting to WiFi via ADB Shell.

# /system/etc/init/custom.rc  # Ethernet IP configuration service service cust.eth_config /system/sbin/eth_config.sh     seclabel u:r:magisk:s0     disabled     writepid /dev/cpuset/system-background/tasks  # clear routing and DNS on property:init.svc.cust.eth_config=stopped     exec u:r:magisk:s0 -- /system/sbin/eth_config.sh stop 
#!/system/bin/sh  # /system/sbin/eth_config.sh script is executed from eth_config init service  # set PATH where you placed binaries export PATH=/system/bin  IFACE=usb0                    # Ethernet interface name DIR=/data/local/tmp/ethernet  # temporary directory mkdir -p $DIR  # save log exec >$DIR/eth_config.log 2>&1  if [ "$1" = stop ] then     echo "Clearing configuration..."     ip ru del lookup main     ip r f table main     ndc resolver setnetdns 0 '' 0.0.0.0     exit fi  # destroy set network if any ndc network default set 0  # turn WiFi and Mobile Data off svc wifi disable svc data disable  # set interfaces up ip link set dev lo up ip link set dev $IFACE up  # Android doesn't use main table by default ip rule add lookup main  # set IP, route and DNS manually here # or add any other IP/routing configuration # or run a minimal DHCP client as follows  # create 'udhcpc' script <<-'SCRIPT' cat >$DIR/udhcpc_default.script #!/system/bin/sh  case $1 in     bound|renew)         echo "Setting IP address, gateway route and DNS for $interface..."         ip address f dev $interface         ip route f table main         ip address add $ip/$mask dev $interface         ip route add default via $router dev $interface         ndc resolver setnetdns 0 '' $dns     ;;     *)         echo "Ignoring $1"     ;; esac SCRIPT  # start DHCP client to obtain IP from server chmod 0755 $DIR/udhcpc_default.script exec busybox udhcpc -v -f -i $IFACE -s $DIR/udhcpc_default.script 

Do not forget to set proper permissions on .rc file and shell scripts. Once setup, Ethernet works as soon as you connect USB adapter.

 
 
 
 

相关问题

6  如何为我的Android设备设置我的WiFi路由器?  ( How do i set up my wifi router for my android device ) 
我有一个无线网络设置使用sweex lc000070路由器,wep加密,而我的htc hero可以连接到网络,互联网似乎没有工作。 在路由器上有任何设置,我必须更改为Android设备连接? ...

7  如何更改“主机”文件以重定向URL?  ( How to change the hosts file to redirect urls ) 
对于Windows计算机,我们将主机文件编辑为将URL重定向到其他域。在Android上是否有像这样的文件? 我希望使用主机文件将一个非常长的URL重定向到较短的网址,这可能是吗?这也可用于将已知的垃圾邮件域的列表重定向到任何内容,因此删除了最糟糕的Flash / GIF添加。 我在rooted三星galaxy s ...

29  Android是否支持IPv6?  ( Does android have support for ipv6 ) 
我想知道Android是否支持IPv6?我听说我使用的手机公司有支持IPv6,如果我访问 http:// ipv6,我有一个ipv6地址.whatismyipv6.net.ipv4.sixxs.org / 。 但我不能访问only的IPv6网站,如 http://ipv6.google.com ,为什么? Andro...

2  在哪里可以在文件系统中找到IP地址(例如proc或sys)  ( Where to find ip address in file system e g proc or sys ) 
是否有一种方法可以在Android文件系统中获取接口的IP(v4)地址?我知道我可以使用ifconfig或netcfg,但我想使用一个监控工具,只能只能访问文件而不是执行命令。 ...

1  Android和Windows 7 Homegroup  ( Android and windows 7 homegroup ) 
我有一个Android平板电脑和我的PC运行Windows 7 Pro。我在android上使用es文件资源管理器查看共享文件夹。 我将一些文件夹添加到音乐/图片/视频库中,并在HomeGroup中共享它们。我试图让HomeGroup不需要密码,它会让我从平板电脑访问我的电脑并查看根文件夹,但一旦我试图访问文件夹(音...

0  从命令行设置动态IP地址  ( Setting dynamic ip address from command line ) 
我正在使用Android,我已将以太网电缆连接到硬件的以太网端口。 我没有得到任何网络。我正在使用Android o。 在Linux中,我可以使用 dhclient eth0 (动态获取IP地址) 请帮助我使用我在Android中使用的命令,因为我的设置不可用dhclient。 谢谢。 ...

1  如何使用背景中的应用程序对Android进行网络调用[已关闭]  ( How to make network calls on android with an app in the background ) 
关闭。这个问题是 off-topic 。它目前不接受答案。 想要改进这个问题?更新这个问题,所以它是关于android爱好者堆栈交换的主题。 关闭 ...

2  我扎根了我的手机,但为什么我不能telnet?  ( I have rooted my phone but why cant i telnet ) 
我有一个t-mobile g1并使用Androot扎根它。我已经确认我通过使用无线系束来root,我得到所有必需的请求超级用户权限对话。 然而,当我转到Telnet应用程序并尝试Telnet时,它拒绝让我,我得到: 连接到服务器Localhost / 127.0.0.1:23 - 连接拒绝。 我尝试了各种不同的连接...

23  听取应用程序尝试连接的URL  ( Listen which urls an app tries to connect ) 
可以倾听/监控应用程序的网络活动吗? 我有这个应用程序,我无法弄清楚它的图像。我试图谷歌一个应用程序来收听其他应用连接,但我没有找到任何。我正在寻找类似于Google Chrome的网络选项卡的类似功能。 我有4.2.2的rooted nexus 4。 ...

6  我可以覆盖HTC EVO上的默认DNS设置是否没有root访问权限?  ( Can i override the default dns settings on an htc evo without root access ) 
是有没有办法覆盖默认情况下使用的Sprint DNS服务器在HTC EVO运行Froyo的3G连接上使用没有root Access? 我想要这样做的原因是因为当我在家里的WiFi连接时,某些网站可以在使用Opendns或Google DNS时解决,但是当我在3G时,同一个网站就返回页面找到了,所以最简单的罪魁祸首是D...

0  可以在连接到现有的WiFi网络时共享移动互联网(系绳)?  ( Possible to share mobile internet tether while connected to existing wifi netw ) 
我有一个现有的WiFi网络和Google Nexus 5(无生根,股票和谐),具有3G数据连接。 我想系绳我的手机将Internet分享到具有自定义路由或代理的现有网络中的所有设备,维护所有其他设备的默认路由。该现有网络还具有另一个固定连接(默认路由)。 这意味着Android应该有效地将客户视为现有的WiFi网络,...

5  如何在命令行或adb shell上设置静态IP?  ( How to set static ip on command line or adb shell ) 
我似乎无法在nougat上使用 abcdefghijklmnnetcfg 。如果我使用 ifconfig ip 没有更新。 ...

132  如何在USB上设置反向系数?  ( How to set up reverse tethering over usb ) 
我的htc g2手机植根于植物和运行cyanogenmod 7 我没有数据计划。 有时我想在没有Wi-Fi的时候将手机连接到Internet,更新市场应用程序,将SMS消息备份到Gmail,从Gmail同步新联系人等。我不能用USB质量做的事情存储模式。 我有一个连接到互联网的Windows 7专业计算机,但我不...

2  设置Android Hotspot的静态IP  ( Setting static ip for android hotspot ) 
我正在连接到我的Android的热点。我看到IP是192.168.43.0/24,因此192.168.43.x的任何IP都将为Android的DHCP服务器保留。但我需要连接到Android的热点的机器才能拥有静态IP。我将使用不同的WiFi NIC卡片有多个Android热点连接到我的机器。如何设置静态IP,以防止...

3  如何在Android上设置VLAN?  ( How to setup vlan on android ) 
可以让我想到如何设置 vlan 在android上。我从某个设备获取VLAN 200标记的流量。那么我如何在Android中配置或设置网络内容,以允许标记的流量标记为VLAN 200。 目前,我可以在Mini USB端口上访问正常流量(没有任何VLAN)。 ...




© 2021 it.wenda123.org All Rights Reserved. 问答之家 版权所有


Licensed under cc by-sa 3.0 with attribution required.