Hi, I have xiami mi box 3 with android TV v6.0.1 (not rooted)
The default system:
if I go to settings there's only WiFi connection
if plug cable to usb-rj45 the default launcher will show connection at the bottom then if I go to WiFi I can see Ethernet is connected
My issue:
I wanted to change the default launcher without rooting the device, I was able to do that by using
HTML:
adb shell pm uninstall --user 0 com.google.android.leanbacklauncher
Now my custom made launcher is taking place of the default one. However, I cannot connect to ethernet as it is not shown in the system settings so I cannot connect manually.
I believe, after days of searching, that I need to do this in my code. One way is using commands execution; something like
HTML:
ifconfig eth0 ......
but this seems need a rooted device?
I need help by directing me to the right path to accomplish Android OTG Ethernet Pragmatically Connection.
Thanks
AB
Related
I am using Geniatech ATV Android Set Top Boxes running android 4.2.2 for a current project. I might put some of those devices in public places like shopping centers. These boxes are connected to the local network there by cable or wireless.
I have a VPN connection to ssh remotely into the boxes (using debian kit) and on the boxes USB debugging is enabled, so that i have ADB access, which I use for chrome browser observation as well as for updating or installing new applications.
The problem is that everyone on the same local network as the box can also use adb to connect to the boxes and then have full access to everything, which is a big security problem.
What I want to do is restrict the interface of adb to only work over the vpn connection.
Alternatively I need a way to stop and start the adb daemon using my ssh connection to the box. The problem here is that I only connect to a debian kit instance running on the same box, which uses the same filesystem but doesn't have access to the start or stop adb commands.
Does anyone have an idea how to achieve this? I can't find a lot of information on this special requirements.
Hi,
I have a X98 air 3g (c5j6) dual boot tablet and i bought an OTG cable with a LAN port.
When running windows the ETH port is recognized and working but on Android it is not.
I tried it on both stock rom(4.4.4) and mirek190 5.0 V7.
Connecting the OTG cable, i can see eth0 interface added as down.
After running netcfg eth0 dhcp, the interface is up and has ip address.
However, no Internet access.
I tried to configure the dns using: setprop net.eth0.dns1 8.8.8.8
That didn't work.
What else can i do?
Also how can i get this configuration to run automatically when connecting the OTG cable?
Anyone?
Good morning everyone. As per the thread title, My girlfreind has a TV box that I suspect is a clone (the update ROMs from chinagadget review wont flash from TWRP).
This device is connected to her ADSL router/modem via a LAN cable and everytime the device boots, the MAC address for the LAN interface is randomised, causing the router to issue a new IP address via DHCP. (I cannot get the device to communicate with static IP)
it's running a lollipop based ROM at the moment (LMY47V.20160505 TEST-KEYS) is reported in settings.
I haven't removed the case yet, to investigate the circuitboard/RAM manufacturer (and don;t know how to check via software, if the wifi/bt module is made by broadcom/atheros) but my gut feeling is screaming "it's a clone". (If it helps, the TWRP backup I performed has saved to a sub-folder called "k200")
She purchased the device from Amazon UK and the majority of apps on Play Store give "version isn;t compatible with this device" error. I've tried to spoof other device in build.prop and with an app called "market helper" but no joy yet.
Any help appreciated
Has anyone got any advoce for me?
CAn anyone point me to messages/threads on hoiw to spoof a MAC address on ethernet adaptor?
does anyone know how to spoof my device type so I can get Play Store to allow me to download/install apk's without needing to sicdeload
wodgey said:
Has anyone got any advoce for me?
CAn anyone point me to messages/threads on hoiw to spoof a MAC address on ethernet adaptor?
does anyone know how to spoof my device type so I can get Play Store to allow me to download/install apk's without needing to sicdeload
Click to expand...
Click to collapse
I also have this issue with my Kata Box 2 (Amlogic S905)
I was also very frustrated when I learned that the mac address was always set at random every time I reboot.
I've read that you need to use USB burning tool to hard code the mac address for your android box.
Here's what I did to solve this.
you need:
a rooted android box
busy box
Terminal emulator
1st method:
Make sure that the ethernet cable is unplugged.
Run terminal emulator.
Run these commands in lower case:
su
ip link set eth0 down
ip link set eth0 address 01:23:45:67:89:10 (change the values of your desired mac address)
ip link set eth0 up
2nd method:
su
busybox ifconfig eth0 down
busybox ifconfig eth0 hw ether 01:23:45:67:89:10 (change the values of your desired mac address)
busybox ifconfig eth0 up
You can run run these on startup using Script Manager.
I tried both method 1 and 2 and works very well.
To verify the if everything was set properly you can run these commands:
ip link show
And
busybox ifconfig
so far on my end its working great. Im now able to reserve the IP address via MAC address.
aperture;68526292Here's what I did to solve this..[/QUOTE said:
Thanks dude. I'll try this and report back.
Click to expand...
Click to collapse
aperture said:
I tried both method 1 and 2 and works very well.
Click to expand...
Click to collapse
For me, method 2 works. 1st method didn't change anything that I could see.
I have also added start/stop adbd and setprop tcp port to my script also so I can have adb over tcp upon boot, shich I was struggling to set as persistent.
Thanks again.
wodgey said:
For me, method 2 works. 1st method didn't change anything that I could see.
I have also added start/stop adbd and setprop tcp port to my script also so I can have adb over tcp upon boot, shich I was struggling to set as persistent.
Thanks again.
Click to expand...
Click to collapse
I'm glad it worked out well for you. :victory:
Hello all,
As I'm not allowed to post in development forum due to low post count, this seems to me the ideal place. I have a custom USB WiFi stick that I need to use with my Android phone. I was able to build to build the driver module in the kernel and the device drivers are detected as well. I have verified it using dmesg as well as there is a light on stick that turns green when the drivers are recognized and firmware is loaded.
However, I am unable to see the WiFi for the USB stick (which have it's own AP) in the list of available WiFis on my mobile device. I tried to Google it on the Internet, but there is limited help available. One possible solution I found is to disable wlan0 interface which I tried in adb shell using command:
ifconfig wlan0 down
However, I was unable to run this command in adb shell. Can someone tell how to disable or turn off wlan0 interface in Android using adb shell?
Also, are there any other possible solutions to the problem I stated?
Thank you.
(Many will consider this question a duplicate of similar questions but I don't think this question should be marked as duplicate because the answer requested here is different than others.)
I am searching for the solutions since many years and read a lot of pages on internet and StackOverflow but hasn't found any solution.
Once an non-rooted Android phone is authorized over USB using ADB then how to connect it over Wi-Fi every time without ever connecting the phone over USB?
I know that executing
Code:
adb start-server
then
Code:
adb tcpip 5555
and then
Code:
adb connect <IP.address.of.phone>
will connect the phone over Wi-Fi IF it is connected using USB when issuing these commands.
According to the answers/forums, there are 2 ways to connect Android phone over Wi-Fi:
The user has to first connect to USB even though the device is already authorized.
The phone needs to be rooted.
But I think, what I want to achieve, as per the question, must be possible because if ADB can connect over USB and then Wi-Fi, then there must be some way to accomplish with directly connecting over Wi-Fi if computer is already authenticated. The missing thing is to know what exactly ADB is doing when switching from USB to Wi-Fi. I think, it could be getting authorization again. But what if we store the authorization information (finger print? or encryption key?) once and use it every time to connect over Wi-Fi? (Please note that when first time authenticating the computer over USB, its finger print is showed in the Android phone, and it never asks again until the authorization is revoked/invalidated somehow. So, I think the requirement here is to revalidate the computer.)
I viewed the ADB repository and read the text files mentioning how ADB works. In one txt file I read that
Code:
adbd
(ADB Daemon) is started on port 5555 on the Android phone/emulator when
Code:
adb connect ___
command is executed. Is there anyway to manually start the daemon through a terminal app on the installed on phone? I tried 'adb', 'adbd' and 'setprop' commands in the Termux app but these commands doesn't exist. According to the txt files of the repository, the ADB on computer is sending the commands to the Android device/emulator and can start 'adbd' or set/open the port 5555 using
Code:
setprop service.adb.tcp.port 5555
command. Is there a way to do this on Android phone using a terminal app on a non-rooter phone?
Somebody who has knowledge of networking, Android and C/C++ language may be able to answer. One can look in the GitHub repo of ADB source code if they want to know what is happening during the connection process.
I'm a little late to answer your question at the time you asked it, but if it still helps the OP, non-rooted Android 10 and below allowed wireless adb connections AFTER a USB connection was first established (adb start-server && adb tcpip 5555 && adb connect [IP]:5555), but that changed (for the better) in Android 11 and above with the new new Developer options Wireless debugging random port assignments (adb connect [IP]:[PORT] or adb pair [IP]:[PORT] [PIN]) such that the adb wireless connection never needs USB cable ever again.
Given Android 11 allows Developer options Wireless debugging via a random port, and Android 12 new Developer options Wireless debugging allows that to be accessed even easier with a new Developer options Wireless debugging tile, the only thing missing is a way to get, after the fact, the random port assignment that Android uses for the adb wireless connection to your PC.
Here are some related posts about that subject which may help the OP.
[adb,scrcpy,vysor] What ports does Android 12 randomly set when Wi-Fi connecting via Wireless debugging adb "pair" or "connect" commands?
(PSA) Using the new Android 12 TILE for 'Developer options' 'Wireless debugging' to establish adb connection over Wi-Fi without USB
What's the difference between Windows/Android adb "connect" versus adb "pair" when mirroring Android 12 over Wi-Fi onto a Windows PC?
The only question that's missing an answer preventing a perfect solution is...
Does anyone know how to obtain that random Android port address from the PC?