机器人以太网和同时无线网络 [英] Android Ethernet and Wi-Fi at the same time

查看:651
本文介绍了机器人以太网和同时无线网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有运行Android小电视盒装置。每当我打开了Wi-Fi接口,以太网接口断开。如果我再调出以太网设备的Wi-Fi接口。 我尝试了各种方法,包括使用命令行来手动调出界面并发生同样的问题。 我希望能够连接到无线网络,并把它作为我的默认网关但也可以连接到以太网端口路由某些流量通过该接口。 显然,这是可以做到在Linux中因此必须有办法......没有任何人知道它是什么,被拆除的接口时,对方开始......

I have a small TV box device running Android. Whenever I bring up the Wi-Fi interface, the Ethernet interface is disconnected. If I then bring up the Ethernet device, the Wi-Fi interface. I have tried various methods including using the command line to manually bring up the interfaces and the same issue occurs. I want to be able to connect to the Wi-Fi and have it as my default gateway but then also be connected to the Ethernet port to route certain traffic over that interface. Obviously this is possible to do in Linux so there must be a way... does anybody know what it is that is tearing down the interfaces when the other is initiated...

推荐答案

这是Android的一个限制。它故意只允许一个连接待涨的时间和有眼泪下来了非preferred'网络时,启用了一个优先级的网络ConnectivityServices.java'文件的处理程序。这也是为什么带来的WiFi建立和断开蜂窝数据连接在一个公认的热点范围时,...

This is a restriction in Android. It purposely only allows one connection to be up at a time and has a handler in the 'ConnectivityServices.java' file that tears down a 'non-preferred' network when a network with a priority is enabled. This is also what brings wifi up and tears down cellular data connections when in range of a recognised hotspot...

万一有人曾经需要这个,这里是我做的:

Just in case anybody ever needs this, here is what I did :

下载了AOSP源$ C ​​$ C为Android的设备上的版本。

Download the AOSP source code for the version of Android on the device.

相应地编辑ConnectivityServices.java文件。我基本上只是在连接改变处理故障转移命令注释掉的命令。我没有源$ C ​​$ C在我面前,让我发短信,如果你需要知道我在这里......

Edit the 'ConnectivityServices.java' file accordingly. I basically just commented out the command in the failover command in the connection change handler. I don't have the source code in front of me so message me if you need to know what I did here...

不管怎样,然后建立你的机器上的AOSP源$ C ​​$ C。

Anyway, then build the AOSP source code on your machine.

一旦完成,抢在已创建的/ dexclasses /目录下的services.jar文件。 用winrar然后复制classes.dex'文件了.jar文件到一个单独的目录解压。 使用此提取classes.dex:的https://$c$c.google.com/p/smali/ 抓住ConnectivityServices.smali文件,并保证它的安全。

Once completed, grab the 'services.jar' file in the /dexclasses/ directory that has been created. Extract it using WinRAR then copy the 'classes.dex' file out of the .jar file to a separate directory. Use this to extract the classes.dex : https://code.google.com/p/smali/ Grab the 'ConnectivityServices.smali' file and keep it safe.

从设备 去到你想启用两个网络接口和/system/framework/services.jar文件复制到PC设备。用winrar然后复制classes.dex'文件了.jar文件到一个单独的目录解压。 使用Java Smali命令提取classes.dex。

From the device Go onto the device you wish to enable both network interfaces on and copy the /system/framework/services.jar file to a PC. Extract it using WinRAR then copy the 'classes.dex' file out of the .jar file to a separate directory. Use the Java Smali command to extract the classes.dex.

取从AOSP的ConnectivityServices.smali文件,并把它放在直接你刚才提取使用设备上的classes.dex。可能是一个好主意覆盖之前使原本ConnectivityServices.smali文件的备份。

Take the ConnectivityServices.smali file from the AOSP and put it in the directly you have just extracted using the classes.dex on the device. Might be a good idea to make a backup of the original ConnectivityServices.smali file before overwriting it.

然后简单的分装使用baksmali命令classes.dex文件。 该classes.dex文件复制到用winrar原始services.jar文件。再次,把原来的备份,但随后将其覆盖在.jar文件。

Then simple repackage the classes.dex file using the baksmali command. Copy the classes.dex file into the original services.jar file using winRAR. Again, take a backup of the original but then overwrite it in the .jar file.

然后简单地把新的services.jar文件恢复设备在/系统/框架/目录中。

Then simply put the new services.jar file back on the device in the /system/framework/ directory.

然后重新启动 - 它会比正常情况更长的时间来启动的第一时间

Then reboot - it will take longer than normal to boot up on the first time.

这篇关于机器人以太网和同时无线网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆