Ifconfig wlan0 up Failed. - OnePlus 3T Questions & Answers

Basically I'm running GNURoot, as I'm not a great fan of what kali does to my camera, and considering as GNURoot is a debian and kali is too, I thought I'd give it a wirl for some Pen-Testing on my everyday phone. But.
Code:
If config wlan0 up
SIOCSIFFLAGS: operation not permitted
I also tried it in termiux same sort of error. I currently don't have my wifi dongel attached. So I'm wondering if that's the issue. The one plus 3t's network card might essentially be telling me to go for a run?
But has anyone had this issue?
Anyone solved it?
Or is it as started. Ive googled but no real help.
Cheers
Arch.

Related

Reverse-Tethering on a Vogue with Android (Share Windows PC's Internet with phone)

I have done the NAND install method on my Vogue with Myn's Warm Donut RLS3 from 2010-02-20. Since I do not have a data plan, and have the XV6900, which comes without WiFi, I cannot just connect to a local network to get internet access, so how do I get access over the USB cable or via Bluetooth? This would basically be like "Reverse-tethering", that you can do in Windows via ActiveSync (when you are hooked up you can use the desktop PC's internet connection)
So, how do we do this now on Android?
Thanks,
-C
Short version: we don't. Do you want details?
Well, without looking very hard... I know this is possible, since you can do almost anything on Linux. Here's a brief description of how this is done, although it may need some modification for our builds:
http://www.htc-android.com/viewtopic.php?f=5&t=154
OR
http://forums.androidandme.com/topic/internet-over-usb
Search for android ifconfig usb and see what you can find.
polyrhythmic said:
Well, without looking very hard... I know this is possible, since you can do almost anything on Linux. Here's a brief description of how this is done, although it may need some modification for our builds:
http://www.htc-android.com/viewtopic.php?f=5&t=154
OR
http://forums.androidandme.com/topic/internet-over-usb
Search for android ifconfig usb and see what you can find.
Click to expand...
Click to collapse
We certainly could if it was supported in our kernel, but our only USB drivers are adb and mass storage. I believe dzo and mssmison are working on some other. cdc, ethernet, rndis, etc. aren't currently supported.
mrkite38 said:
Short version: we don't. Do you want details?
Click to expand...
Click to collapse
Hmm bummer. Most people with cell service are STILL not paying for data plans, and only about 50% of people with smartphones have data plans yet. Heck...I got a data plan and then got rid of it after 6 months...that alone was $180 worth that was totally wasted for what...the convenience of checking email on my lunch break....yeah that's worth it. At least ATT is only $10 a month now if you are on a shared plan with your family for unlimited data. To bad I an on VZW, lol...
So anyway, it seems like this would almost be a must. I would gladly pay a developer here $50 if he came up with a widget to do it. He'd make a lot more than that on the market too if he developed that.
crobs808 said:
So anyway, it seems like this would almost be a must. I would gladly pay a developer here $50 if he came up with a widget to do it. He'd make a lot more than that on the market too if he developed that.
Click to expand...
Click to collapse
'Real' android phones can do it, our kernel can't. Plus, you can't download from market or use youtube, etc, over bluetooth tethering (I've tried) or via usb from what I've read. Only the cellular data connection and wifi are considered 'valid' by Android. So the dev would have to fix that, too, to make it worthwhile.
mrkite38 said:
'Real' android phones can do it, our kernel can't. Plus, you can't download from market or use youtube, etc, over bluetooth tethering (I've tried) or via usb from what I've read. Only the cellular data connection and wifi are considered 'valid' by Android. So the dev would have to fix that, too, to make it worthwhile.
Click to expand...
Click to collapse
I would be happy just to have WiFi, but the XV6900 (Verizon Touch) doesnt even have WiFi at all. I am considering getting the Nexus when it comes to Verizon in a few months.
crobs808 said:
I would be happy just to have WiFi, but the XV6900 (Verizon Touch) doesnt even have WiFi at all. I am considering getting the Nexus when it comes to Verizon in a few months.
Click to expand...
Click to collapse
Yeah, and the mogul might be a good solve but it only has a 64 MB ROM... I know, been through it all in my head before, too.
Thanks
Thanks. It can sure take some time searching to find some of this info, but even with the NO it won't work I'll still be searching
I want the Bluetooth PAN on Android!
It does not make any sense that Google would know I'm connecting via Bluetooth PAN vs. WiFi to my PC since this occurs behind my Router??? The IP is set at the Router level, my phone should not be visible.
edit... misread post above.
I guess Android itself would know, but that seems odd. But Odd rules sometimes.
Any updates on possibilities yet ??? or there is still no way to use internet on Vogue Andriod without having data plan ?
gogodj said:
Any updates on possibilities yet ??? or there is still no way to use internet on Vogue Andriod without having data plan ?
Click to expand...
Click to collapse
Not yet... the reasons posted above are still true.
Are there any plans to add this feature to future ROMS? The only reason I haven't switched to android from windows mobile is because of this.
damaph said:
Are there any plans to add this feature to future ROMS? The only reason I haven't switched to android from windows mobile is because of this.
Click to expand...
Click to collapse
I don't think so. It's a kernel thing, not a rom thing, and it requires a lot of driver work. But even if it did work, android wouldn't recognize it as a valid connection.
rfcomm + pppd to tether both ways?
I am new to android, but I have networking experience with Linux. I am running Myn's latest Warm Donut on my Sprint Touch. And it seems that hciconfig/hcitool are working to associate the phone with another bluetooth interface. Also, rfcomm seems to be working. And lastly, pppd is installed and (indeed) necessary for the 3g/edge connection as evidenced by the ppp0 in ifconfig. Also, reviewing dmesg, I see L2CAP and BNEP are compiled into the kernel. And pand is also compiled and running. I am not familiar with these, but it seems to offer another route for maybe getting a bluetooth IP link established.
So, my question is simply this. Can we not use the hci commands to associate the phone to another bluetooth adapter on, say, a networked Linux system? Then use rfcomm to build a bluetooth serial connection between the two systems, and finally establish a ppp interface on each end of that serial link? Once that is done, the two systems will share a point-to-point IP link over BT over which they can communicate. Then it is simply a matter of establishing gateways, proxies, iptables NAT, DNS, and routes to make either forwarded or reversed tethered connections. I am reasonably confident I can do that. With a Class 1 bluetooth interface on the Linux server side, the range could be extended for reverse tethering...perhaps making it useful as a moderate range wifi replacement. Other webpages discuss similar approaches using bluetooth rfcomm/pppd. It might require experimentation to find reasonable baud rates for the serial link, etc., but nothing seems obviously impossible. And bluetooth can provide a 1 Mbps+ speeds...again, not great, but better than Edge or dodgy EVDO.
Likewise, we may be able to build a proper PAN connection. I am not familiar with pand and bnep interfaces, but I could probably figure it out.
As I said, I am new to Android, and I am just starting to test this on my phone. Is there something that I am missing with regard to existing hci/rfcomm/pand functionality? Dmesg reports all of these compiled in and hcitool scan seems to do something...it blinks the blue light and find my laptop. I guess I am just asking if someone can shoot holes in my idea before I waste too much time pursuing it.
Thanks.
mprinkey said:
I am new to android, but I have networking experience with Linux. I am running Myn's latest Warm Donut on my Sprint Touch. And it seems that hciconfig/hcitool are working to associate the phone with another bluetooth interface. Also, rfcomm seems to be working. And lastly, pppd is installed and (indeed) necessary for the 3g/edge connection as evidenced by the ppp0 in ifconfig. Also, reviewing dmesg, I see L2CAP and BNEP are compiled into the kernel. And pand is also compiled and running. I am not familiar with these, but it seems to offer another route for maybe getting a bluetooth IP link established.
So, my question is simply this. Can we not use the hci commands to associate the phone to another bluetooth adapter on, say, a networked Linux system? Then use rfcomm to build a bluetooth serial connection between the two systems, and finally establish a ppp interface on each end of that serial link? Once that is done, the two systems will share a point-to-point IP link over BT over which they can communicate. Then it is simply a matter of establishing gateways, proxies, iptables NAT, DNS, and routes to make either forwarded or reversed tethered connections. I am reasonably confident I can do that. With a Class 1 bluetooth interface on the Linux server side, the range could be extended for reverse tethering...perhaps making it useful as a moderate range wifi replacement. Other webpages discuss similar approaches using bluetooth rfcomm/pppd. It might require experimentation to find reasonable baud rates for the serial link, etc., but nothing seems obviously impossible. And bluetooth can provide a 1 Mbps+ speeds...again, not great, but better than Edge or dodgy EVDO.
Likewise, we may be able to build a proper PAN connection. I am not familiar with pand and bnep interfaces, but I could probably figure it out.
As I said, I am new to Android, and I am just starting to test this on my phone. Is there something that I am missing with regard to existing hci/rfcomm/pand functionality? Dmesg reports all of these compiled in and hcitool scan seems to do something...it blinks the blue light and find my laptop. I guess I am just asking if someone can shoot holes in my idea before I waste too much time pursuing it.
Thanks.
Click to expand...
Click to collapse
That's all correct, and I've done it before. But the issue is that Android only acknowledges TWO kinds of data connections: cellular and wifi. When I setup a pan and iptable'd my way to the internet, I was able to get google maps, but not market. I haven't tried Opera but the android browser didn't work. Etc., etc. So I think the usefulness of pan is limited. The real challenge here is for someone to dig through the source and find out how to ADD bt and USB as 'valid' data interfaces. I've never looked into that.
Cellular connection is ppp0. Have you tried running pppd over rfcomm? Or assign an identical IP address to the pan/pppd interface and set it's metric a notch lower so it is preferred over the ppp0 one? Also, will Android route over a VPN? Setup pan and VPN over it. VPN seems to "own" Internet traffic when it is configured according to this: http://code.google.com/p/android/issues/detail?id=4205
Also, I've seen posts indicating that the default browser can be configured to use a proxy.
Just ideas and I'd like to know what you've tried so I don't waste my time. Thanks for your input.
mprinkey said:
Cellular connection is ppp0. Have you tried running pppd over rfcomm? Or assign an identical IP address to the pan/pppd interface and set it's metric a notch lower so it is preferred over the ppp0 one? Also, will Android route over a VPN? Setup pan and VPN over it. Also, I've seen posts indicating that the default browser can be configured to use a proxy.
Just ideas and I'd like to know what you've tried so I don't waste my time. Thanks for your input.
Click to expand...
Click to collapse
Nope, didn't try any fancy-pants stuff. When I did all this, I was a total n00b to linux (only a partial n00b now) and it didn't take too long, so I say - give it a try! That's the spirit around here.
mrkite38 said:
Nope, didn't try any fancy-pants stuff. When I did all this, I was a total n00b to linux (only a partial n00b now) and it didn't take too long, so I say - give it a try! That's the spirit around here.
Click to expand...
Click to collapse
Great. That is encouraging. The link that I edited into my previous post seems to indicate that ALL traffic gets routed over the VPN when it is established. That would fix any security concerns I'd have about using a high-powered BT adapter. I think I will give it a spin.
USB Ethernet
In my kernel hacking trying to get Debian to run, I managed to enable USB Ethernet (the function driver; USB gadget crashes the phone) working, and I've been using it to SSH into my phone. I've used it to apt-get update without any problems. I believe it's just a kernel config option (although I might have done some code modifications), so the problem isn't the driver, it's with Android's userspace.
gTan64 said:
In my kernel hacking trying to get Debian to run, I managed to enable USB Ethernet (the function driver; USB gadget crashes the phone) working, and I've been using it to SSH into my phone. I've used it to apt-get update without any problems. I believe it's just a kernel config option (although I might have done some code modifications), so the problem isn't the driver, it's with Android's userspace.
Click to expand...
Click to collapse
So you enabled USB ether in the kernel config and it's working for you? Against a linux host or Windows? that would be nice, I haven't tried that in ages.
Edit: yes, the 'valid' connection check is definitely in Android userspace. But I either forgot or didn't know that our usb ether func driver worked when enabled.

Pptp + dd-wrt + droid 3 + vzw

Anyone else getting routing issues with android and pptp? I connect and its stable, I get an IP, but it doesnt browse. Every once in about 20 attempts it works for a minute or 2, then stops.
Sent from my DROID3 using XDA App
ive been using ipsec and havent had any routing issues. I may not be fully understanding you, but you are connected to vzw, pptp to a ddwrt, and its not assigning you a local ip?
Maybe an MTU problem. What's the name of the pptp interface?
If you're browsing through a proxy it might not work. I ended up getting an un-NATed public IP address to avoid exactly what is happening to you, for some reason I couldn't connect to anything but my home network when I would connect to my VPN setup at home through my Cisco e4200 w/ dd-wrt firmware. Since I couldnt connect to the mobile browsing proxy when connected to my PPTP VPN, I just avoided it entirely by getting the public IP address... now it works great! (Not to mention I don't have to worry about any ports being blocked by my ISP).
Not sure what VZW's stance is on handing out Public IP addresses but it was pretty easy with Bell Mobility, costs me $5 a month but totally worth it IMO.
Sent from my XT860 using xda premium
disable the encryption. Android is known to have issues with mppe encryption.
Sorry I went MIA family issues. I tried without encryption, same thing. I get an ip. 1/10 time it will route some traffic. But when it does it dies in like 3 minutes MAX. I stay connected, just no data.
Sent from my DROID3 using XDA App
As I said, it sounds like it COULD be an MTU problem. I asked you about the name of your pptp interface before. Try this (as root on command line):
iptables -t mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -o <YOUR_PPTP_DEVICE_NAME> -j TCPMSS --set-mss 1200
Unknown Arg
I tried what you said, I got unknown arg --set-mss
I have found that I can ping IPs, but not route data any other way.
What a pitty, either the stock iptables command doesn't support it or there is a module missing. That makes it much more difficult. I will try to check it out, but cannot promise you a timeline.
Thank you
Thank you for all you've done already
I fear this tcp-mss is a dead end. A module xt_TCPMSS.ko is needed. I compiled and loaded it, however still doesn't work. I think it it's related to the fact that all stock iptables options are built in the kernel, no modules.
However, I have another idea. Very simple, but could work -- tested it with my D3, looked good. On command line, as root, try this:
ifconfig <YOUR_PPTP_DEVICE_NAME> mtu 1200
That command works, but same problem. I used a different pptp server just in case, same issue, connect, get ip, no browse
Sent from my DROID3 using XDA App
OK, then it's most likely not an MTU problem.
If you want, we can do a little bit more troubleshooting. I love to track down that kind of problems.
Is your busybox installed in /system/xbin? Please type the following commands and provide me with the output:
/system/xbin/ifconfig
/system/xbin/netstat -rn
And we can go a bit farther. Please install the app "Shark for Root" from the market.
Then run your pptp, then open a terminal and type the following command:
/data/data/lv.n3o.shark/files/tcpdump -n -i <YOUR_PPTP_DEVICE_NAME> -w /sdcard/tcpdump.dmp
Try to browse until it fails. Then switch back to the terminal and stop the tcpdump with Ctrl-C.
I need the file /sdcard/tcpdump.dmp, please post it here (it's binary data) or provide it otherwise.
doesn't seem to install
I tried to get shark to install, but nothing seems to work. It appears to die when I try to browse. I can ping though. I've also tried without encryption. I can setup a vnc meeting and you can ADB and play with it if you are down.

Easy Root for Bionic Stock 4.1.2 (Jelly Bean)

4th Update 5/2/2013 - Found a bug... Nothing that would affect the overall functionality, but it could cause some users to think that their phone is successfully connected via USB debugging, when it really isn't.
Update: 5/2/2013 - Per user requests, adding link to VirtualBox download site on the original post.
3rd Update 5/1/2013 - I changed the code that 'finds' the exploit file to make sure it get executed successfully. It's now using the "PATH" environment to do this. This is more reliable than the actual Linux 'find' command I was using before. Also added some additional instructions to clarify some steps based on feedback from users. Finally, added code to detect if the network adapter is not configured correctly. It will alert the user to configure the network adapter properly in the VirtualBox application.
2nd Update 5/1/2013 - I added some lines to the script to stress the importance of pressing one of the three hardware buttons on the phone (Volume up, Volume Down, or Power) once the exploit has been executed. After discussing this with the author of the exploit, this is an important step to obtaining root.
UPDATE 5/1/2013 - New and improved .ova file. Contains improved logic in the exploit script to help with some of the problems that have been encountered by users.
If you've had trouble rooting, please download the new version and try again!
Hey folks, I'm a UNIX admin by profession, so I took the challenge over the weekend to come up with an easy root process for Bionic stock Jelly Bean, specifically for those who aren't familiar with Linux.
I decided to build a Linux VM under Oracle VirtualBox on my Windows PC. This seemed like the logical choice since VirtualBox is free, a relatively small download, is easy to install and it's easy to import VMs.
My first attempt was using CentOS Linux. It worked, but the file required for users to download was over 450MB... Back to the drawing board!
Started looking for very small Linux distros and found Tiny Core Linux. This worked well. The file required for download is 50 MB.
Everything you need to root the Bionic is here and it is automatic. The process will walk you through connecting to the Samba file share, connecting the phone in USB debugging mode, and OF COURSE, it will run the process to root the phone.
Here are the steps:
1) Install Sun VirtualBox on your Windows PC.
http://download.virtualbox.org/virtualbox/4.2.12/VirtualBox-4.2.12-84980-Win.exe
Note: We've had one report that this file also works with VMWare Workstation and VMWare Player. If you don't want to install VirtualBox feel free try the file with VMWare.
2) Download the VirtualBox .ova file containing the Linux VM from one of the following links:
http://www.knite.net/Bionic/Root_Bionic_JB_20130501-4.ova
http://www.mediafire.com/?a2i6forosp77xrd
https://dl.dropboxusercontent.com/s...fhiAIiSwc0jD1AdVFNY27QdoeKP9ot_7IdDetSvw&dl=1
3) Import the .ova file into VirtualBox. (Click "File" then "Import Appliance".)
4) Start the imported VM in VirtualBox (Click the big "Start" Button. It has a green arrow icon.)
5) Follow the instructions on the Linux console.
That should do it. If you need help I will be monitoring this thread.
Willing Tester
I am not familiar with Linux but I am familiar with root, supersuser, recovery, and fxz/rsd lite. I am up for a new phone next month so I am willing to try this on my Bionic. This doesn't sound too hard....(famous last words). Will try on my Windows 7 laptop.
Will report if this works. Won't be able to until later today.
Thank you OP!
Found a problem with the script. Should work now. Download and import again, if you've already downloaded. I also managed to get the download down to 46MB by defragging and compacting the .vmdk file.
dl.dropboxusercontent.com/s/bb53ayj5c3nd5ie/Root_Bionic_JB.ova?token_hash=AAGSOYfPuDXTur_e9qlYl2JRERovPyfMwe-2xNzHXg4Lxg&dl=1
Downloading new link now. Haven't tried to root yet. I'm at work right now.
Do you have any other suggestions before I start? I don't have to be completely stock do I...? (all stock apps, no superuser, etc.) I am on stock jelly bean 4.2.1, ver. 98.72.22.XT875.Verizon.en.US, stock recovery...but I did use OTA Rootkeeper so I have a (semi-functioning) superuser install. Do you suggest starting fresh with fxz?
I will be home in a couple hours to give it a try.
Well....my problem is that I can get my phone to connect to the share. My guess is that its due to a network thing on my laptop. Is the phone supposed to be connected via USB when I try that?
Awesome! I've got root again thanks to this. Was very easy to follow your instructions, great job!
Great, I just wanted to do something to make it easier for everyone, since so many seemed to be struggling with Linux.
lc75 said:
Awesome! I've got root again thanks to this. Was very easy to follow your instructions, great job!
Click to expand...
Click to collapse
So, in order for the phone to connect to the share, your phone needs to be connected by wi-fi to the same network as the computer that is running VirtualBox and the VM.
TechnoHippie said:
Well....my problem is that I can get my phone to connect to the share. My guess is that its due to a network thing on my laptop. Is the phone supposed to be connected via USB when I try that?
Click to expand...
Click to collapse
marty45714 said:
So, in order for the phone to connect to the share, your phone needs to be connected by wi-fi to the same network as the computer that is running VirtualBox and the VM.
Click to expand...
Click to collapse
Ok that's gonna be my problem then ...I'll give it a shot when I get home and I'm not connected to my office network.
USB 3.0?
My laptop only has USB 3.0 ports. Is that why I am having trouble connecting to the VMbox? SMB share connected over WIFI no problem. USB fails every time.
I am struggling with the directions and feeling dumb about it... Not sure what to put for the "Host IP Address"
EDIT: Restarted the virtual machine and it gave me the information I needed. The first time around the field was blank.
I appear to still lack root because the SU app wants to update the binary and fails to do so.
I'm not sure, but one thing you can check. When the Linux console is up in the VirtualBox window, there is a section in the lower, right hand corner of that window that shows a bunch of icons. Click the USB icon and very that you see your Bionic as an option for hardware that is connected to your laptop.
Also, I'm making an assumption that you have the Motorola UBS drivers already loaded on your Windows system before you even started this whole process. Maybe I shouldn't make that assumption???
cakessi said:
My laptop only has USB 3.0 ports. Is that why I am having trouble connecting to the VMbox? SMB share connected over WIFI no problem. USB fails every time.
Click to expand...
Click to collapse
First of all, thank you very much for creating a easy root tool for those of us who thought the previous methods were too daunting.
I've got a 32bit Windows PC and followed the instructions as you listed them. The problem I kept encountering was that my phone would not accept the IP address or group name suggested by the VirtualBox. When I looked up IP address of the VirtualBox my computer (cmd/ipconfig) I noticed it conflicted with the address that the box was telling me to enter into my Bionic. I wonder if this is the cause of the connectivity issue, and I have a hunch it's because my router is set to give dynamic IPs to the devices on my home network (which is larger with multiple routers and devices).
Any input would be greatly appreciated. Thanks.
You can test the connectivity to the SMB share from your Windows PC first. That's what I suggest.
In your Windows PC, go to My Computer and type in:
\\192.168.1.11\share
where 192.168.1.11 represents the IP address that the Linux server is telling you to use.
You can also go to the windows command line (cmd) and type:
telnet 192.168.1.11 445
which will show if your windows computer can connect to port 445 (SMB).
If these are successful, you probably have an issue that your phone and computer are not connected to the same network.
If you believe they are, you may want to see if your router is set up to not bridge the wireless and LAN traffic, which would mean that the computers on the LAN segment cannot communicate with the computers on the WI-FI segment.
Hopefully something here will help you out.
Please post your results.
Also, make sure when you are typing in names, passwords, groups and IP addresses, that you are not leaving trailing spaces on the ends of things.
MNEman13 said:
First of all, thank you very much for creating a easy root tool for those of us who thought the previous methods were too daunting.
I've got a 32bit Windows PC and followed the instructions as you listed them. The problem I kept encountering was that my phone would not accept the IP address or group name suggested by the VirtualBox. When I looked up IP address of the VirtualBox my computer (cmd/ipconfig) I noticed it conflicted with the address that the box was telling me to enter into my Bionic. I wonder if this is the cause of the connectivity issue, and I have a hunch it's because my router is set to give dynamic IPs to the devices on my home network (which is larger with multiple routers and devices).
Any input would be greatly appreciated. Thanks.
Click to expand...
Click to collapse
Any way we can get another link for this. I'm really wanting to try this out.
Error (509)
This account's public links are generating too much traffic and have been temporarily disabled!
New link. See original post. I have it on Mediafire now.
dcmcc99 said:
Any way we can get another link for this. I'm really wanting to try this out.
Error (509)
This account's public links are generating too much traffic and have been temporarily disabled!
Click to expand...
Click to collapse
marty45714 said:
You can test the connectivity to the SMB share from your Windows PC first. That's what I suggest.
In your Windows PC, go to My Computer and type in:
\\192.168.1.11\share
where 192.168.1.11 represents the IP address that the Linux server is telling you to use.
You can also go to the windows command line (cmd) and type:
telnet 192.168.1.11 445
which will show if your windows computer can connect to port 445 (SMB).
If these are successful, you probably have an issue that your phone and computer are not connected to the same network.
If you believe they are, you may want to see if your router is set up to not bridge the wireless and LAN traffic, which would mean that the computers on the LAN segment cannot communicate with the computers on the WI-FI segment.
Hopefully something here will help you out.
Please post your results.
Also, make sure when you are typing in names, passwords, groups and IP addresses, that you are not leaving trailing spaces on the ends of things.
Click to expand...
Click to collapse
Thanks for the help and instructions. After a few hours of fiddling around I still cannot get my phone to connect to the SMB. My computer connects successfully and after I connect via \\192.168.1.11\share the VirtualBox even progresses a bit to the point where it asks me to plug in my Bionic, but without my phone's wifi file share the process stalls. I am sure that both phone and PC are connected to the same network, sharing is all on, and firewalls are down. At this point I must assume that my router isn't bridging for some reason. Tonight I'll do some more investigation into the Airport Express settings and see if it will fix this issue.
Alright, you can also verify the network connectivity between the phone and the VM by using the 'ping' command.
Find the IP address of your phone by selecting Settings, then Wi-Fi, then click your left most menu button on the bottom and select Advanced. You will see the IP address of the phone. The first 3 octets of that address (xxx.xxx.xxx) should be the same on both the computer and the phone on MOST networks.
So from the Linux console, if you press Ctrl-c, it will drop you to a Linux prompt, from here you can try to ping the phone:
ping 192.168.1.11
Again, where 192.168.1.11 represents the IP address of your phone, that you just found from the menu.
Also, you can try to ping the Linux VM from your phone. If you've installed the Android Terminal app, you can lauch it and type:
ping 192.168.1.11
Where 192.168.1.11 represents the IP address of the Linux server. This is presented to you by the Linux console when it gives you the information to put into your phone in order to connect to the SMB share.
MNEman13 said:
Thanks for the help and instructions. After a few hours of fiddling around I still cannot get my phone to connect to the SMB. My computer connects successfully and after I connect via \\192.168.1.11\share the VirtualBox even progresses a bit to the point where it asks me to plug in my Bionic, but without my phone's wifi file share the process stalls. I am sure that both phone and PC are connected to the same network, sharing is all on, and firewalls are down. At this point I must assume that my router isn't bridging for some reason. Tonight I'll do some more investigation into the Airport Express settings and see if it will fix this issue.
Click to expand...
Click to collapse
I made it all the way through and the exploit said it was successful, but I don't have root. Any thoughts there?
marty45714 said:
Alright, you can also verify the network connectivity between the phone and the VM by using the 'ping' command.
Find the IP address of your phone by selecting Settings, then Wi-Fi, then click your left most menu button on the bottom and select Advanced. You will see the IP address of the phone. The first 3 octets of that address (xxx.xxx.xxx) should be the same on both the computer and the phone on MOST networks.
So from the Linux console, if you press Ctrl-c, it will drop you to a Linux prompt, from here you can try to ping the phone:
ping 192.168.1.11
Again, where 192.168.1.11 represents the IP address of your phone, that you just found from the menu.
Also, you can try to ping the Linux VM from your phone. If you've installed the Android Terminal app, you can lauch it and type:
ping 192.168.1.11
Where 192.168.1.11 represents the IP address of the Linux server. This is presented to you by the Linux console when it gives you the information to put into your phone in order to connect to the SMB share.
Click to expand...
Click to collapse
Here are some tips that I posted for someone over on Droid Forums. Hopefully some of this will help us figure out what is going on:
Need you to do some investigation. Run the exploit again. Once your phone is connected to the SMB share and the Linux script verifies the connectivity, press Ctrl-C to break out of the script and return to the Linux command prompt. Make sure your phone is connected to USB. From there execute the following commands and share the output with me:
sudo ash
cd /home/guest/share
./adb.linux shell
(if you execute the above command and DO NOT see this prompt: [email protected]_targa/ $
then you have USB connectivity issues and need to make sure you get your phone successfully connected
to VirtualBox and the Linux VM)
ls -l /storage/rfs0
I want to see the output of the "ls" command to verify that the SMB share is being mounted to /storage/rfs0
This can cause the exploit to fail is it's not.
If you see no output from that command, run this command:
find /storage -name pwn
If you get that far and this looks good. Can you type:
su -
and see if you get a root prompt? A root prompt means your prompt will end with '#' instead of '$' before the cursor.
If you do get this, it could be that your Superuser app is simply broken and need re-installed.
The command that the exploit runs to root the phone, once you get this far is:
/storage/rfso/pwn 1
You can try running that manually and see what happens.
caskieadam said:
I made it all the way through and the exploit said it was successful, but I don't have root. Any thoughts there?
Click to expand...
Click to collapse

Usb Tethering does now work under Linux?

Hello
Does someone succed to use usb thetering under linux (ubuntu 16.04 for exemple)?
It does not work for me.
Here is what happen:
I plug the phone ==> it's ok ubuntu see him.
If i chose file explorer ==> it works, i could access to the sd or the system without any problem so phone is well discoverd.
Then i anable usb thetering on the settings ==> phone stop charging, nothing happen, i could not chose usb thetering on the desktop.
It's ok with G5 or nexus 4 under android 7.X but there it does not work.
I see nothing on dmesg and lsusb, phone is already there, but it just doest not work.
Does anybody have succed to make it worked?
I know that wifi thetering works, but that's not the question here.
Yes it does!
Hi Burn02,
I had the same problem. In the end the solution was quite simple.
I am running Ubuntu 17.10
Use or favorite editor to edit /etc/network/interfaces
sudo editor /etc/network/interfaces
and add the following line
allow-hotplug usb0
then restart your computer or restart the network-manager.service
sudo systemctl restart network-manager.service
That did the trick for me.
Burn02 said:
Hello
Does someone succed to use usb thetering under linux (ubuntu 16.04 for exemple)?
It does not work for me.
Here is what happen:
I plug the phone ==> it's ok ubuntu see him.
If i chose file explorer ==> it works, i could access to the sd or the system without any problem so phone is well discoverd.
Then i anable usb thetering on the settings ==> phone stop charging, nothing happen, i could not chose usb thetering on the desktop.
It's ok with G5 or nexus 4 under android 7.X but there it does not work.
I see nothing on dmesg and lsusb, phone is already there, but it just doest not work.
Does anybody have succed to make it worked?
I know that wifi thetering works, but that's not the question here.
Click to expand...
Click to collapse
Robbie12345 said:
Hi Burn02,
I had the same problem. In the end the solution was quite simple.
I am running Ubuntu 17.10
Use or favorite editor to edit /etc/network/interfaces
sudo editor /etc/network/interfaces
and add the following line
allow-hotplug usb0
then restart your computer or restart the network-manager.service
sudo systemctl restart network-manager.service
That did the trick for me.
Click to expand...
Click to collapse
I will try!
THank's a lot.
Just tested my xz1c with my Ubuntu 16.04 LTS laptop, USB tethering just work without changing anything of my Ubuntu
ykkhern said:
Just tested my xz1c with my Ubuntu 16.04 LTS laptop, USB tethering just work without changing anything of my Ubuntu
Click to expand...
Click to collapse
Can you do a speed test while usb-tethering? Are you getting your full download speed? On mine I can only get < 1Mbps download, but 50Mbps upload. Downloads are full of RX errors and packet re-transmissions.
adibadi said:
Can you do a speed test while usb-tethering? Are you getting your full download speed? On mine I can only get < 1Mbps download, but 50Mbps upload. Downloads are full of RX errors and packet re-transmissions.
Click to expand...
Click to collapse
The 4G signal in my area is pretty bad, it usually fluctuates in between 1 ~ 3 bars. The speed test result for Download was around 0.7 ~ 0.8 Mbps; however, the result on the phone without enabling USB Tethering was around 6 ~ 7 Mbps.
I think you're not alone. I do understand that some telco do impose restrictions on the usage of USB Tethering, could the slow download speed be due to such restriction?
ykkhern said:
The 4G signal in my area is pretty bad, it usually fluctuates in between 1 ~ 3 bars. The speed test result for Download was around 0.7 ~ 0.8 Mbps; however, the result on the phone without enabling USB Tethering was around 6 ~ 7 Mbps.
I think you're not alone. I do understand that some telco do impose restrictions on the usage of USB Tethering, could the slow download speed be due to such restriction?
Click to expand...
Click to collapse
Thanks for testing that. In my case it's not from the telco, in Windows i get full speed. They also confirmed that they don't throttle. I am pretty sure it's the same bug that hit the OnePlus5 phone, which was fixed with a software update. They had the exact same behavior, <1mbps download, RX frame errors in the ifconfig output.
Unfortunately i can't open a support ticket with Sony because my support so just crashes. I will keep trying.
adibadi said:
Can you do a speed test while usb-tethering? Are you getting your full download speed? On mine I can only get < 1Mbps download, but 50Mbps upload. Downloads are full of RX errors and packet re-transmissions.
Click to expand...
Click to collapse
I have got exactly the same pb!Now it works without doing anything now, but in usb tethering, i have got a poor 1mbit/s max in download, and more then 16Mbit/s in upload.
It seems to be a little better in wifi, but not has it should be in 4g. From the smartphone i get more then that.
Did you have news from the support?
I tried to open a support ticket with a sony online chat agent, i don't know if i will hear anything back.
I think it could also be Linux related because it does work well in Windows. Somehow the rndis driver doesn't recognize the phone properly, but i don't know where i would be able to start the discussion for this, in which Linux component mailing list. ModemManager? Kernel? I've lost already a lot of time trying to do some debugging but now I'm kinda stuck.
It would be good to test with a more recent distribution then the 16.04 to see if it's better or other distribution.
But if the problem is the same that one Plus and has been solved by one plus, i doupt that we could do something...
In fhat, it's better then before, has at the moment that i have post the message, thetering whas no even working... So i don t know if it's sony that correct things or linux's community that add support for the XZ1c but it has evolved.
I will try to ask to sony too in order to repport that it's not "one case".
I have got nothing interesting from the support. :/
Just a link to http://android.com/tether ...
After comparing with my old Z5 compact, I can say that on the Linux side, not much is different. The logs generated by the two phones when they are plugged in and USB Tethering is enabled are identical. Also, the lsusb -v output is nearly identical.
The only difference is that the Z5 compact is fast and has no rx frame errors, the XZ1 compact is slow and has many rx frame errors.
adb logcat does show many errors on the ZX1c but I don't know if they are related.
Code:
E NetlinkSocket: Error in NetlinkSocket.sendOneShotKernelMessage, errmsg=NetlinkErrorMessage{ nlmsghdr{StructNlMsgHdr{ nlmsg_len{100}, nlmsg_type{2(NLMSG_ERROR)}, nlmsg_flags{0())}, nlmsg_seq{1}, nlmsg_pid{-307406705} }}, nlmsgerr{StructNlMsgErr{ error{-2}, msg{StructNlMsgHdr{ nlmsg_len{80}, nlmsg_type{256(unknown RTM type: 256)}, nlmsg_flags{261(NLM_F_REQUEST|NLM_F_ACK|NLM_F_ROOT))}, nlmsg_seq{1}, nlmsg_pid{0} }} }} }
E Tethering: [OffloadController] ERROR Error updating NAT conntrack entry: android.system.ErrnoException: NetlinkErrorMessage{ nlmsghdr{StructNlMsgHdr{ nlmsg_len{100}, nlmsg_type{2(NLMSG_ERROR)}, nlmsg_flags{0())}, nlmsg_seq{1}, nlmsg_pid{-307406705} }}, nlmsgerr{StructNlMsgErr{ error{-2}, msg{StructNlMsgHdr{ nlmsg_len{80}, nlmsg_type{256(unknown RTM type: 256)}, nlmsg_flags{261(NLM_F_REQUEST|NLM_F_ACK|NLM_F_ROOT))}, nlmsg_seq{1}, nlmsg_pid{0} }} }} } failed: ENOENT (No such file or directory), msg: 5000000000010501010000000000000002000000340001801400018008000100AC1CC26D080002000A2A92211C00028005000100060000000600020021E8000006000300CCA200000800070000069780
Burn02 said:
It would be good to test with a more recent distribution then the 16.04 to see if it's better or other distribution.
But if the problem is the same that one Plus and has been solved by one plus, i doupt that we could do something...
Click to expand...
Click to collapse
I just tested with the latest arch linux live usb stick, kernel version 4.14.9. It is still slow and ifconfig output is still full of rx errors. I'm afraid there is little hope of the issue resolving itself with a future OS update. The problem needs to be raised to someone who understands the issue better. I wish we could get some feedback from Sony about this. I guess their linux USB tethering users make up a very small part of their userbase, so we are not so important to them
THank's.
I have got an other answer from the support, they say that they will githe information to the correct service.
I am not sure that will be the case, but from this contact i could do nothing more...
PErhaps we should post on the sony talk forum?
Burn02 said:
THank's.
I have got an other answer from the support, they say that they will githe information to the correct service.
I am not sure that will be the case, but from this contact i could do nothing more...
PErhaps we should post on the sony talk forum?
Click to expand...
Click to collapse
I have already posted on sony talk forum, but it's not really helping. Maybe if you add your experience to it, it'll show them that more people are having this issue.
https://talk.sonymobile.com/t5/Xperia-XZ1-Compact/USB-Tethering-very-slow-on-Linux/m-p/1295537
No other news from the support about this problem. :/
I did not try again after the update of february but i doupt that something changed.
Hello.
No news about this problem?
Burn02 said:
Hello.
No news about this problem?
Click to expand...
Click to collapse
It's fixed!! I just decided to check, expecting the same old, but low and behold, the problem seems to be resolved!
build 47.1.A.12.119 fixes the issue.
$ ifconfig enp0s20f0u2
enp0s20f0u2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
RX packets 248944 bytes 339403158 (323.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 142963 bytes 65752525 (62.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
THank's for the news!
Great to read that.
I can confirm that it's fixed
My build-number is:
47.A.12.145

postmarketOS for G4 play

Has anyone setup postmarketOS on their play: https://wiki.postmarketos.org/wiki/Motorola_Moto_G4_Play_(motorola-harpia) . If so, what was your experience with it?
reubenbrown13 said:
Has anyone setup postmarketOS on their play: https://wiki.postmarketos.org/wiki/Motorola_Moto_G4_Play_(motorola-harpia) . If so, what was your experience with it?
Click to expand...
Click to collapse
Logged back in for the first time in a long time to say that it's been a miserable experience for me so far in a nutshell.
I've just today been playing with postmarketOS on harpia. It's been a frustrating experience.
The first idea was to get wifi to work. Well, I could get a connection and authentication to my router, but it wouldn't connect to the internet. I tried the usual suspects of dns server, firewall etc but nothing doing. Then I looked at the instructions to enable the modem, and they made my head ache. I should say at this point that I've run Ubuntu and related Linux for nearly 14 years on my LAN and my router is a PC Engines APU1D4 running Ubuntu server. Not to brag, but to clarify that I do have a basic understanding of Linux.
So at that point I decided to reflash LineageOS 17.1 and restore my backup. I had to reformat /data to get it to install properly (scary red messages in TWRP).
I think it's impressive what they've been able to do, but it needs a bit more work before I'd want to use it all the time.
Heeni said:
.. postmarketOS on harpia. It's been a frustrating experience.
The first idea was to get wifi to work. Well, I could get a connection and authentication to my router, but it wouldn't connect to the internet..
Click to expand...
Click to collapse
for the record, thats is/was a known shortcoming, see https://gitlab.com/postmarketOS/pmaports/-/issues/1085 - basically depends on the wifi channel. The wiki got the caveat added at some point
Update: The WCNSS firmware from motorola-osprey can be used instead of the version from harpia, and I've found it handles WiFi much better. See https://gitlab.com/postmarketOS/pmaports/-/issues/1085#note_1220953940 for details, including download.

Categories

Resources