Git Product home page Git Product logo

simplert's Introduction

SimpleRT

Android component: Build and release

Reverse Tethering utility for Android.

Provides a way to share a computer's internet connection with an Android device via a USB cable.

Development is still in progress, bugs and errors can occur.

FIRST RUN: check out -h option
   simple-rt -h
   usage: sudo ./simple-rt [-h] [-i interface] [-n nameserver|"local" ]
   default params: -i eth0 -n 8.8.8.8
IMPORTANT
   If you have any issues with this tool, please, provide some logs:
   - run util in debug mode (-d), connect your device
   - run "ip addr show"
   - run "ip route show"
   - store this output into issue ticket on github

No root or adb required

Full Linux and macOS support. Windows version is being researched.

Current version features:

  • Multi-tether. It is possible to connect several android devices into one virtual network
  • DNS server can be specified (custom or system one).

The SimpleRT utility consists of 2 parts:

  • Android part:

    Implemented as a standalone service, no gui, no activities

    Dependencies:

    • Android 4.0 and higher.

    Build system based on gradle + gradle experimental android plugin (supporting ndk). To build, both sdk & ndk are required. Create local.properties file in root dir, it should look like this:

    ndk.dir=/home/viper/Android/Sdk/ndk-bundle
    sdk.dir=/home/viper/Android/Sdk
    

    build:

    ./gradlew assembleDebug
    

    app/build/outputs/apk/app-debug.apk is your apk.

    Now available in f-droid

    A prebuilt apk can also be found under Downloads at the Github releases tab.

  • Desktop part:

    Dependencies:

    • libusb-1.0
    • libresolv (usually already present in both linux and macos)
    • tuntap kernel module (linux version), utun (macos version, builtin)

    before build (debian-based example):

    sudo apt install build-essential pkg-config libusb-1.0-0-dev
    

    Makefile is universal for all platforms, just type "make && make install" to install it in prefix /usr/local and check /usr/local/sbin is in your PATH-variable. If you want to change the prefix path eg. to install it in /usr instead of /usr/local you can type "make prefix=/usr && make prefix=/usr install". If you don't want to install but just run it from within build directory you can type "make iface_up_sh_path=.".

Usage:

  • run console util as root (sudo simple-rt). The iface_up.sh file needs to be present in the application folder.
  • connect your android device

First connection requires some trivial steps:

First step

Second step

Third step

Issues: Some apps do not recognize the reverse tethered internet connection due to ConnectivityManager policy. Leave the WiFi or mobile data connection active, the connection through SimpleRT will be prioritised.

Partially uses code from linux-adk, which is licensed under the GNU GPLv2 or later. This project is under the GNU GPLv3 or later.

License: GNU GPL v3
SimpleRT: Reverse tethering utility for Android
Copyright (C) 2016 Konstantin Menyaev

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

simplert's People

Contributors

bromptonista avatar cyphar avatar eugene-sevostianov-sc avatar robinpaulson avatar sur3 avatar vvviperrr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simplert's Issues

1.1 APK shows up as 1.0

The .apk attached to the 1.1 tag, if installed, shows up as version 1.0. Looking at the package itself, it seems versionCode and versionName are set incorrectly:

package: name='com.viper.simplert' versionCode='1' versionName='1.0' platformBuildVersionName='N'

As there already was a v1.0 before that, versionCode must have been increased – and versionName should reflect the real version number 😸

So may I suggest to correct that? And when attaching the fixed .apk, please leave it an .apk and do not ZIP it again. Thanks in advance!

doesn't work on unrooted kindle fire hd7

i'm only able to ping my computer 10.1.1.1. I tried pinging 8.8.8.8 and www.google.com but it didn't work.

ip addr show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ifb0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN qlen 32
    link/ether 9e:6d:36:bb:13:1e brd ff:ff:ff:ff:ff:ff
3: ifb1: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN qlen 32
    link/ether 1a:0f:61:ec:87:d1 brd ff:ff:ff:ff:ff:ff
4: tunl0: <NOARP> mtu 0 qdisc noop state DOWN 
    link/ipip 0.0.0.0 brd 0.0.0.0
5: sit0: <NOARP> mtu 1480 qdisc noop state DOWN 
    link/sit 0.0.0.0 brd 0.0.0.0
6: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN 
    link/tunnel6 :: brd ::
10: tun0: <POINTOPOINT,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
    link/none 
    inet 10.1.1.2/24 scope global tun0
       valid_lft forever preferred_lft forever

ip route show

10.1.1.0/24 dev tun0  proto kernel  scope link  src 10.1.1.2 

debug log

I am having issues compiling it under Lubuntu

I almost have it compiled, I just have the following errors left to fix:

obj/src/adk.o: In function get_accessory_endpoints': /home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:72: undefined reference to libusb_get_config_descriptor'
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:113: undefined reference to libusb_free_config_descriptor' obj/src/adk.o: In function is_accessory_present':
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:137: undefined reference to libusb_get_device_descriptor' obj/src/adk.o: In function probe_usb_device':
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:159: undefined reference to libusb_open' /home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:160: undefined reference to libusb_strerror'
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:169: undefined reference to libusb_claim_interface' /home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:171: undefined reference to libusb_strerror'
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:180: undefined reference to libusb_kernel_driver_active' /home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:182: undefined reference to libusb_detach_kernel_driver'
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:187: undefined reference to libusb_strerror' /home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:195: undefined reference to libusb_control_transfer'
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:284: undefined reference to libusb_control_transfer' /home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:301: undefined reference to libusb_strerror'
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:305: undefined reference to libusb_attach_kernel_driver' /home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:309: undefined reference to libusb_close'
obj/src/adk.o: In function read_usb_packet': /home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:323: undefined reference to libusb_bulk_transfer'
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:329: undefined reference to libusb_strerror' obj/src/adk.o: In function write_usb_packet':
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:350: undefined reference to libusb_bulk_transfer' /home/bryan/Desktop/SimpleRT/simple-rt-cli/src/adk.c:356: undefined reference to libusb_strerror'
obj/src/accessory.o: In function free_accessory': /home/bryan/Desktop/SimpleRT/simple-rt-cli/src/accessory.c:191: undefined reference to libusb_release_interface'
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/accessory.c:192: undefined reference to libusb_close' obj/src/main.o: In function main':
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/main.c:81: undefined reference to libusb_init' /home/bryan/Desktop/SimpleRT/simple-rt-cli/src/main.c:96: undefined reference to libusb_set_debug'
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/main.c:129: undefined reference to libusb_hotplug_register_callback' /home/bryan/Desktop/SimpleRT/simple-rt-cli/src/main.c:141: undefined reference to libusb_handle_events_completed'
/home/bryan/Desktop/SimpleRT/simple-rt-cli/src/main.c:146: undefined reference to libusb_hotplug_deregister_callback' /home/bryan/Desktop/SimpleRT/simple-rt-cli/src/main.c:147: undefined reference to libusb_exit'
collect2: error: ld returned 1 exit status
Makefile:59: recipe for target 'simple-rt' failed
make: *** [simple-rt] Error 1

undefined symbol: libusb_hotplug_register_callback

any idea how to fix this?

vanous@tc-vanek:/tmp/SimpleRT/simple-rt-cli$ uname -a
Linux tc-vanek 4.7.0-rc7-amd64 #1 SMP Debian 4.7rc7-1exp1 (2016-07-14) x86_64 GNU/Linux

vanous@tc-vanek:/tmp/SimpleRT/simple-rt-cli$ make
gcc -g -std=c99 -D_DEFAULT_SOURCE -Wall -Iinclude pkg-config --cflags libusb-1.0 -c src/linux-adk.c -o obj/src/linux-adk.o
gcc -g -std=c99 -D_DEFAULT_SOURCE -Wall -Iinclude pkg-config --cflags libusb-1.0 -c src/main.c -o obj/src/main.o
gcc -g -std=c99 -D_DEFAULT_SOURCE -Wall -Iinclude pkg-config --cflags libusb-1.0 -c src/linux/tun.c -o obj/src/linux/tun.o
gcc obj/src/linux-adk.o obj/src/main.o obj/src/linux/tun.o -Wall -lm -lpthread pkg-config --libs libusb-1.0 -o simple-rt

vanous@tc-vanek:/tmp/SimpleRT/simple-rt-cli$ ldd simple-rt
linux-vdso.so.1 (0x00007fff451c6000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f01058f8000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f01056db000)
libusb-1.0.so.0 => /usr/local/lib/libusb-1.0.so.0 (0x00007f01054cc000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f010512b000)
/lib64/ld-linux-x86-64.so.2 (0x000056104cba4000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0104f23000)

vanous@tc-vanek:/tmp/SimpleRT/simple-rt-cli$ sudo ./simple-rt
./simple-rt: symbol lookup error: ./simple-rt: undefined symbol: libusb_hotplug_register_callback

vanous@tc-vanek:/tmp/SimpleRT/simple-rt-cli$ aptitude show libusb-1.0-0:amd64
Package: libusb-1.0-0
Version: 2:1.0.20-1

tried rc version as below (make clean, make, but still the same error).

vanous@tc-vanek:/tmp/SimpleRT/simple-rt-cli$ aptitude show libusb-1.0-0
Package: libusb-1.0-0
Version: 2:1.0.21~rc1-1

vanous@tc-vanek:/tmp/SimpleRT/simple-rt-cli$ aptitude show libusb-1.0-0-dev
Package: libusb-1.0-0-dev
Version: 2:1.0.21~rc1-1

How to solve "bulk transfer error: Input/Output Error"?

Once I accept on the android device I get:

libusb callback registered!
Device supports AOA 2.0!
Sending identification to the device
...
...
Found accessory 18d1:2d00
accessory connected!
libusb callback deregistered!
net.ipv4.ip_forward = 1
bulk transfer error: Input/Output Error

tun returns File descriptor in bad state and that signs it's ready:

cat /dev/net/tun
cat: /dev/net/tun: File descriptor in bad state

Any ideas how to solve issue?

Cant set up Tun Interface

Hello , when i try to start the program i get this error:
[tom@tom-pc simple-rt]$ sudo ./simple-rt -i enp5s0
[sudo] Passwort für tom:
starting network
configuring:
local interface: enp5s0
virtual interface: tun0
network: 10.1.1.0
address: 10.1.1.1
netmask: 24
nameserver: 8.8.8.8
Error: either "dev" is duplicate, or "10.1.1.1/24" is a garbage.
Unable set iface tun0 up
Unable to start network!

It maybe really easy to fix, but i dont know why it isnt working.

VPN doesn't start for a long time or until I change USB from charging to Transfer Files or MTP

This might not be relevant in the latest version, I'm running version 1.0(2016/09/19) from F-Droid.
I'm running LineageOS 15.1 Android Oreo 8.1.0 Kernel 3.4.113.

If I leave the phone and wait for the VPN popups, it takes a VERY long time
I started every time with my phone connected via USB, phone screen permanently on and phone in high-performance mode.
When I start simple-rt from my Linux desktop (firewall disabled), initially nothing happens.
If I just leave the phone for few minutes eventually the popups come and I accept them as per the screenshots. Then I get the key icon at the top.

Making the VPN popup happen immediately
I can make it connect immediately by going into the USB menu of my phone in settings, then changing USB from charging only to either File transfer mode or MTP mode.

Then I have a problem that seems the same as this #49

I ran it in debug mode. I let it run for 75 seconds but it seemed to be going around in circles, so I stopped it with Ctrl-C. Here's the beginning of the log.

debug mode enabled
starting network
configuring:
local interface: eth0
virtual interface: tun0
network: 10.1.1.0
address: 10.1.1.1
netmask: 24
nameserver: 1.1.1.1
tun0 interface configured!
SimpleRT started!
[timestamp] [threadID] facility level [function call] <message>
--------------------------------------------------------------------------------
[ 0.115760] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[ 0.115793] [00000e5f] libusb: debug [handle_events] poll fds modified, reallocating
[ 0.115820] [00000e5f] libusb: debug [handle_events] poll() 2 fds with timeout in 60000ms
[26.043422] [00000e60] libusb: debug [linux_get_device_address] getting address for device: 3-4 detached: 0
[26.043430] [00000e60] libusb: debug [linux_get_device_address] scan 3-4
[26.045753] [00000e60] libusb: debug [linux_get_device_address] getting address for device: 3-4 detached: 1
[26.045763] [00000e60] libusb: debug [udev_hotplug_event] udev hotplug event. action: remove.
[26.045790] [00000e5f] libusb: debug [handle_events] poll() returned 1
[26.045797] [00000e5f] libusb: debug [handle_events] caught a fish on the event pipe
[26.045799] [00000e5f] libusb: debug [handle_events] hotplug message received
[26.045802] [00000e5f] libusb: debug [libusb_unref_device] destroy device 3.37
[26.045806] [00000e5f] libusb: debug [handle_events] poll() 2 fds with timeout in 0ms
[26.045809] [00000e5f] libusb: debug [handle_events] poll() returned 0
[26.045814] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[26.045815] [00000e5f] libusb: debug [handle_events] poll() 2 fds with timeout in 60000ms
[26.545174] [00000e60] libusb: debug [linux_get_device_address] getting address for device: 3-4 detached: 0
[26.545187] [00000e60] libusb: debug [linux_get_device_address] scan 3-4
[26.545233] [00000e60] libusb: debug [linux_get_device_address] bus=3 dev=38
[26.545236] [00000e60] libusb: debug [udev_hotplug_event] udev hotplug event. action: add.
[26.545239] [00000e60] libusb: debug [linux_enumerate_device] busnum 3 devaddr 38 session_id 806
[26.545243] [00000e60] libusb: debug [linux_enumerate_device] allocating new device for 3/38 (session 806)
[26.545266] [00000e60] libusb: debug [linux_get_parent_info] Dev 0x7f67c00036f0 (3-4) has parent 0x55c4455532e0 (usb3) port 4
[26.545285] [00000e5f] libusb: debug [handle_events] poll() returned 1
[26.545288] [00000e5f] libusb: debug [handle_events] caught a fish on the event pipe
[26.545290] [00000e5f] libusb: debug [handle_events] hotplug message received
[26.545317] [00000e5f] libusb: debug [handle_events] poll() 2 fds with timeout in 0ms
[26.545322] [00000e5f] libusb: debug [handle_events] poll() returned 0
[26.545325] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[26.545327] [00000e5f] libusb: debug [handle_events] poll() 2 fds with timeout in 60000ms
[26.545410] [00000f2b] libusb: debug [libusb_open] open 3.38
[26.545448] [00000f2b] libusb: debug [usbi_add_pollfd] add fd 11 events 4
[26.545460] [00000e5f] libusb: debug [handle_events] poll() returned 1
[26.545464] [00000e5f] libusb: debug [handle_events] caught a fish on the event pipe
[26.545473] [00000e5f] libusb: debug [handle_events] someone updated the poll fds
[26.545477] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[26.545481] [00000e5f] libusb: debug [handle_events] poll fds modified, reallocating
[26.545485] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[26.545493] [00000f2b] libusb: debug [libusb_get_device_descriptor] 
[26.545497] [00000f2b] libusb: debug [libusb_kernel_driver_active] interface 0
Kernel driver is not active!
[26.545504] [00000f2b] libusb: debug [libusb_alloc_transfer] transfer 0x7f67b8000c20
[26.545508] [00000f2b] libusb: debug [libusb_submit_transfer] transfer 0x7f67b8000c20
[26.545518] [00000f2b] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling
[26.545595] [00000e5f] libusb: debug [handle_events] poll() returned 1
[26.545607] [00000e5f] libusb: debug [reap_for_handle] urb type=2 status=0 transferred=2
[26.545610] [00000e5f] libusb: debug [handle_control_completion] handling completion status 0
[26.545613] [00000e5f] libusb: debug [usbi_handle_transfer_completion] transfer 0x7f67b8000c20 has callback 0x7f67c813cb30
[26.545616] [00000e5f] libusb: debug [sync_transfer_cb] actual_length=2
[26.545623] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[26.545627] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[26.545666] [00000f2b] libusb: debug [libusb_free_transfer] transfer 0x7f67b8000c20
Device supports AOA 2.0!
Sending identification to the device
 sending manufacturer: Konstantin Menyaev
[26.545685] [00000f2b] libusb: debug [libusb_alloc_transfer] transfer 0x7f67b8000d60
[26.545688] [00000f2b] libusb: debug [libusb_submit_transfer] transfer 0x7f67b8000d60
[26.545697] [00000f2b] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling
[26.545767] [00000e5f] libusb: debug [handle_events] poll() returned 1
[26.545778] [00000e5f] libusb: debug [reap_for_handle] urb type=2 status=0 transferred=19
[26.545781] [00000e5f] libusb: debug [handle_control_completion] handling completion status 0
[26.545785] [00000e5f] libusb: debug [usbi_handle_transfer_completion] transfer 0x7f67b8000d60 has callback 0x7f67c813cb30
[26.545787] [00000e5f] libusb: debug [sync_transfer_cb] actual_length=19
[26.545794] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[26.545796] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[26.545803] [00000f2b] libusb: debug [libusb_free_transfer] transfer 0x7f67b8000d60
 sending model: SimpleRT
[26.545809] [00000f2b] libusb: debug [libusb_alloc_transfer] transfer 0x7f67b8000e70
[26.545811] [00000f2b] libusb: debug [libusb_submit_transfer] transfer 0x7f67b8000e70
[26.545818] [00000f2b] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling
[26.545888] [00000e5f] libusb: debug [handle_events] poll() returned 1
[26.545896] [00000e5f] libusb: debug [reap_for_handle] urb type=2 status=0 transferred=9
[26.545899] [00000e5f] libusb: debug [handle_control_completion] handling completion status 0
[26.545901] [00000e5f] libusb: debug [usbi_handle_transfer_completion] transfer 0x7f67b8000e70 has callback 0x7f67c813cb30
[26.545904] [00000e5f] libusb: debug [sync_transfer_cb] actual_length=9
[26.545909] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[26.545911] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[26.545917] [00000f2b] libusb: debug [libusb_free_transfer] transfer 0x7f67b8000e70
 sending description: Simple Reverse Tethering
[26.545922] [00000f2b] libusb: debug [libusb_alloc_transfer] transfer 0x7f67b8000f50
[26.545924] [00000f2b] libusb: debug [libusb_submit_transfer] transfer 0x7f67b8000f50
[26.545929] [00000f2b] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling
[26.546109] [00000e5f] libusb: debug [handle_events] poll() returned 1
[26.546120] [00000e5f] libusb: debug [reap_for_handle] urb type=2 status=0 transferred=25
[26.546123] [00000e5f] libusb: debug [handle_control_completion] handling completion status 0
[26.546126] [00000e5f] libusb: debug [usbi_handle_transfer_completion] transfer 0x7f67b8000f50 has callback 0x7f67c813cb30
[26.546129] [00000e5f] libusb: debug [sync_transfer_cb] actual_length=25
[26.546135] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[26.546137] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[26.546262] [00000f2b] libusb: debug [libusb_free_transfer] transfer 0x7f67b8000f50
 sending version: 1.0
[26.546277] [00000f2b] libusb: debug [libusb_alloc_transfer] transfer 0x7f67b8001030
[26.546280] [00000f2b] libusb: debug [libusb_submit_transfer] transfer 0x7f67b8001030
[26.546287] [00000f2b] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling
[26.546348] [00000e5f] libusb: debug [handle_events] poll() returned 1
[26.546356] [00000e5f] libusb: debug [reap_for_handle] urb type=2 status=0 transferred=4
[26.546358] [00000e5f] libusb: debug [handle_control_completion] handling completion status 0
[26.546361] [00000e5f] libusb: debug [usbi_handle_transfer_completion] transfer 0x7f67b8001030 has callback 0x7f67c813cb30
[26.546364] [00000e5f] libusb: debug [sync_transfer_cb] actual_length=4
[26.546370] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[26.546372] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[26.546379] [00000f2b] libusb: debug [libusb_free_transfer] transfer 0x7f67b8001030
 sending url: https://github.com/vvviperrr/SimpleRT
[26.546385] [00000f2b] libusb: debug [libusb_alloc_transfer] transfer 0x7f67b8001110
[26.546387] [00000f2b] libusb: debug [libusb_submit_transfer] transfer 0x7f67b8001110
[26.546394] [00000f2b] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling
[26.546455] [00000e5f] libusb: debug [handle_events] poll() returned 1
[26.546461] [00000e5f] libusb: debug [reap_for_handle] urb type=2 status=0 transferred=38
[26.546463] [00000e5f] libusb: debug [handle_control_completion] handling completion status 0
[26.546466] [00000e5f] libusb: debug [usbi_handle_transfer_completion] transfer 0x7f67b8001110 has callback 0x7f67c813cb30
[26.546468] [00000e5f] libusb: debug [sync_transfer_cb] actual_length=38
[26.546473] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[26.546475] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[26.546480] [00000f2b] libusb: debug [libusb_free_transfer] transfer 0x7f67b8001110
 sending serial number: 10.1.1.2,1.1.1.1
[26.546485] [00000f2b] libusb: debug [libusb_alloc_transfer] transfer 0x7f67b8001230
[26.546487] [00000f2b] libusb: debug [libusb_submit_transfer] transfer 0x7f67b8001230
[26.546492] [00000f2b] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling
[26.546553] [00000e5f] libusb: debug [handle_events] poll() returned 1
[26.546559] [00000e5f] libusb: debug [reap_for_handle] urb type=2 status=0 transferred=17
[26.546561] [00000e5f] libusb: debug [handle_control_completion] handling completion status 0
[26.546564] [00000e5f] libusb: debug [usbi_handle_transfer_completion] transfer 0x7f67b8001230 has callback 0x7f67c813cb30
[26.546566] [00000e5f] libusb: debug [sync_transfer_cb] actual_length=17
[26.546571] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[26.546574] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[26.546584] [00000f2b] libusb: debug [libusb_free_transfer] transfer 0x7f67b8001230
 sending command: start accessory
[26.546597] [00000f2b] libusb: debug [libusb_alloc_transfer] transfer 0x7f67b8001310
[26.546600] [00000f2b] libusb: debug [libusb_submit_transfer] transfer 0x7f67b8001310
[26.546607] [00000f2b] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling
[26.546791] [00000e5f] libusb: debug [handle_events] poll() returned 1
[26.546799] [00000e5f] libusb: debug [reap_for_handle] urb type=2 status=0 transferred=0
[26.546801] [00000e5f] libusb: debug [handle_control_completion] handling completion status 0
[26.546804] [00000e5f] libusb: debug [usbi_handle_transfer_completion] transfer 0x7f67b8001310 has callback 0x7f67c813cb30
[26.546807] [00000e5f] libusb: debug [sync_transfer_cb] actual_length=0
[26.546812] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[26.546814] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[26.547376] [00000f2b] libusb: debug [libusb_free_transfer] transfer 0x7f67b8001310
Accessory was inited successfully!
[26.547387] [00000f2b] libusb: debug [libusb_close] 
[26.547397] [00000e5f] libusb: debug [handle_events] poll() returned 1
[26.547399] [00000e5f] libusb: debug [handle_events] caught a fish on the event pipe
[26.547406] [00000e5f] libusb: debug [handle_events] someone is closing a device
[26.547409] [00000e5f] libusb: debug [libusb_try_lock_events] someone else is closing a device
[26.547411] [00000e5f] libusb: debug [libusb_event_handler_active] someone else is closing a device
[26.547413] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling
[26.547418] [00000f2b] libusb: debug [usbi_remove_pollfd] remove fd 11
[26.547429] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[26.547432] [00000e5f] libusb: debug [handle_events] poll fds modified, reallocating
[26.547436] [00000e5f] libusb: debug [handle_events] poll() 2 fds with timeout in 60000ms
[26.557535] [00000e60] libusb: debug [linux_get_device_address] getting address for device: 3-4 detached: 0
[26.557544] [00000e60] libusb: debug [linux_get_device_address] scan 3-4
[26.557569] [00000e60] libusb: debug [linux_get_device_address] bus=3 dev=38
[26.557571] [00000e60] libusb: debug [udev_hotplug_event] udev hotplug event. action: bind.
[26.557572] [00000e60] libusb: error [udev_hotplug_event] ignoring udev action bind
[26.755359] [00000e60] libusb: debug [linux_get_device_address] getting address for device: 3-4 detached: 0
[26.755394] [00000e60] libusb: debug [linux_get_device_address] scan 3-4
[26.760327] [00000e60] libusb: debug [linux_get_device_address] getting address for device: 3-4 detached: 1
[26.760340] [00000e60] libusb: debug [udev_hotplug_event] udev hotplug event. action: remove.
[26.760364] [00000e5f] libusb: debug [handle_events] poll() returned 1
[26.760373] [00000e5f] libusb: debug [handle_events] caught a fish on the event pipe
[26.760375] [00000e5f] libusb: debug [handle_events] hotplug message received
[26.760380] [00000e5f] libusb: debug [libusb_unref_device] destroy device 3.38
[26.760382] [00000e5f] libusb: debug [handle_events] poll() 2 fds with timeout in 0ms
[26.760385] [00000e5f] libusb: debug [handle_events] poll() returned 0
[26.760388] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[26.760390] [00000e5f] libusb: debug [handle_events] poll() 2 fds with timeout in 60000ms
[27.262723] [00000e60] libusb: debug [linux_get_device_address] getting address for device: 3-4 detached: 0
[27.262734] [00000e60] libusb: debug [linux_get_device_address] scan 3-4
[27.262766] [00000e60] libusb: debug [linux_get_device_address] bus=3 dev=39
[27.262769] [00000e60] libusb: debug [udev_hotplug_event] udev hotplug event. action: add.
[27.262771] [00000e60] libusb: debug [linux_enumerate_device] busnum 3 devaddr 39 session_id 807
[27.262774] [00000e60] libusb: debug [linux_enumerate_device] allocating new device for 3/39 (session 807)
[27.262798] [00000e60] libusb: debug [linux_get_parent_info] Dev 0x7f67c0004790 (3-4) has parent 0x55c4455532e0 (usb3) port 4
[27.263140] [00000e5f] libusb: debug [handle_events] poll() returned 1
[27.263149] [00000e5f] libusb: debug [handle_events] caught a fish on the event pipe
[27.263151] [00000e5f] libusb: debug [handle_events] hotplug message received
[27.263171] [00000e5f] libusb: debug [handle_events] poll() 2 fds with timeout in 0ms
[27.263175] [00000e5f] libusb: debug [handle_events] poll() returned 0
[27.263180] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[27.263183] [00000e5f] libusb: debug [handle_events] poll() 2 fds with timeout in 60000ms
[27.266088] [00000f4b] libusb: debug [libusb_open] open 3.39
[27.266109] [00000f4b] libusb: debug [usbi_add_pollfd] add fd 11 events 4
[27.266116] [00000f4b] libusb: debug [libusb_get_device_descriptor] 
Found accessory 18d1:2d01
[27.266121] [00000f4b] libusb: debug [libusb_get_config_descriptor] index 0
[27.266126] [00000f4b] libusb: debug [libusb_claim_interface] interface 0
accessory connected!
[27.266150] [00000e5f] libusb: debug [handle_events] poll() returned 1
[27.266156] [00000e5f] libusb: debug [handle_events] caught a fish on the event pipe
[27.266153] [00000f4b] libusb: debug [libusb_alloc_transfer] transfer 0x7f67b8000de0
[27.266162] [00000f4b] libusb: debug [libusb_submit_transfer] transfer 0x7f67b8000de0
[27.266165] [00000f4b] libusb: debug [add_to_flying_list] arm timerfd for timeout in 200ms (first in line)
[27.266171] [00000f4b] libusb: debug [submit_bulk_transfer] need 1 urbs for new transfer with length 4096
[27.266158] [00000e5f] libusb: debug [handle_events] someone updated the poll fds
[27.266192] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[27.266194] [00000e5f] libusb: debug [handle_events] poll fds modified, reallocating
[27.266198] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[27.266203] [00000f4b] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling
[27.267462] [00000e60] libusb: debug [linux_get_device_address] getting address for device: 3-4 detached: 0
[27.267471] [00000e60] libusb: debug [linux_get_device_address] scan 3-4
[27.267501] [00000e60] libusb: debug [linux_get_device_address] bus=3 dev=39
[27.267503] [00000e60] libusb: debug [udev_hotplug_event] udev hotplug event. action: bind.
[27.267506] [00000e60] libusb: error [udev_hotplug_event] ignoring udev action bind
[27.466210] [00000e5f] libusb: debug [handle_events] poll() returned 1
[27.466232] [00000e5f] libusb: debug [handle_events] timerfd triggered
[27.466238] [00000e5f] libusb: debug [libusb_cancel_transfer] transfer 0x7f67b8000de0
[27.466318] [00000e5f] libusb: debug [disarm_timerfd] 
[27.466339] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 0ms
[27.466348] [00000e5f] libusb: debug [handle_events] poll() returned 1
[27.466356] [00000e5f] libusb: debug [reap_for_handle] urb type=3 status=-2 transferred=0
[27.466364] [00000e5f] libusb: debug [handle_bulk_completion] handling completion status -2 of bulk urb 1/1
[27.466370] [00000e5f] libusb: debug [handle_bulk_completion] abnormal reap: urb status -2
[27.466376] [00000e5f] libusb: debug [handle_bulk_completion] abnormal reap: last URB handled, reporting
[27.466383] [00000e5f] libusb: debug [usbi_handle_transfer_cancellation] detected timeout cancellation
[27.466390] [00000e5f] libusb: debug [disarm_timerfd] 
[27.466398] [00000e5f] libusb: debug [usbi_handle_transfer_completion] transfer 0x7f67b8000de0 has callback 0x7f67c813cb30
[27.466405] [00000e5f] libusb: debug [sync_transfer_cb] actual_length=0
[27.466420] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[27.466426] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[27.466450] [00000f4b] libusb: debug [libusb_free_transfer] transfer 0x7f67b8000de0
[27.466473] [00000f4b] libusb: debug [libusb_alloc_transfer] transfer 0x7f67b8000f00
[27.466478] [00000f4b] libusb: debug [libusb_submit_transfer] transfer 0x7f67b8000f00
[27.466486] [00000f4b] libusb: debug [add_to_flying_list] arm timerfd for timeout in 200ms (first in line)
[27.466496] [00000f4b] libusb: debug [submit_bulk_transfer] need 1 urbs for new transfer with length 4096
[27.466514] [00000f4b] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling
[27.666511] [00000e5f] libusb: debug [handle_events] poll() returned 1
[27.666583] [00000e5f] libusb: debug [handle_events] timerfd triggered
[27.666592] [00000e5f] libusb: debug [libusb_cancel_transfer] transfer 0x7f67b8000f00
[27.666651] [00000e5f] libusb: debug [disarm_timerfd] 
[27.666669] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 0ms
[27.666679] [00000e5f] libusb: debug [handle_events] poll() returned 1
[27.666687] [00000e5f] libusb: debug [reap_for_handle] urb type=3 status=-2 transferred=0
[27.666694] [00000e5f] libusb: debug [handle_bulk_completion] handling completion status -2 of bulk urb 1/1
[27.666700] [00000e5f] libusb: debug [handle_bulk_completion] abnormal reap: urb status -2
[27.666706] [00000e5f] libusb: debug [handle_bulk_completion] abnormal reap: last URB handled, reporting
[27.666712] [00000e5f] libusb: debug [usbi_handle_transfer_cancellation] detected timeout cancellation
[27.666718] [00000e5f] libusb: debug [disarm_timerfd] 
[27.666724] [00000e5f] libusb: debug [usbi_handle_transfer_completion] transfer 0x7f67b8000f00 has callback 0x7f67c813cb30
[27.666731] [00000e5f] libusb: debug [sync_transfer_cb] actual_length=0
[27.666747] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[27.666753] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[27.666779] [00000f4b] libusb: debug [libusb_free_transfer] transfer 0x7f67b8000f00
[27.666800] [00000f4b] libusb: debug [libusb_alloc_transfer] transfer 0x7f67b8000fe0
[27.666807] [00000f4b] libusb: debug [libusb_submit_transfer] transfer 0x7f67b8000fe0
[27.666814] [00000f4b] libusb: debug [add_to_flying_list] arm timerfd for timeout in 200ms (first in line)
[27.666824] [00000f4b] libusb: debug [submit_bulk_transfer] need 1 urbs for new transfer with length 4096
[27.666841] [00000f4b] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling
[27.866875] [00000e5f] libusb: debug [handle_events] poll() returned 1
[27.866909] [00000e5f] libusb: debug [handle_events] timerfd triggered
[27.866919] [00000e5f] libusb: debug [libusb_cancel_transfer] transfer 0x7f67b8000fe0
[27.867001] [00000e5f] libusb: debug [disarm_timerfd] 
[27.867022] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 0ms
[27.867034] [00000e5f] libusb: debug [handle_events] poll() returned 1
[27.867049] [00000e5f] libusb: debug [reap_for_handle] urb type=3 status=-2 transferred=0
[27.867061] [00000e5f] libusb: debug [handle_bulk_completion] handling completion status -2 of bulk urb 1/1
[27.867070] [00000e5f] libusb: debug [handle_bulk_completion] abnormal reap: urb status -2
[27.867079] [00000e5f] libusb: debug [handle_bulk_completion] abnormal reap: last URB handled, reporting
[27.867091] [00000e5f] libusb: debug [usbi_handle_transfer_cancellation] detected timeout cancellation
[27.867105] [00000e5f] libusb: debug [disarm_timerfd] 
[27.867115] [00000e5f] libusb: debug [usbi_handle_transfer_completion] transfer 0x7f67b8000fe0 has callback 0x7f67c813cb30
[27.867127] [00000e5f] libusb: debug [sync_transfer_cb] actual_length=0
[27.867149] [00000e5f] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[27.867160] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[27.867189] [00000f4b] libusb: debug [libusb_free_transfer] transfer 0x7f67b8000fe0
[27.867226] [00000f4b] libusb: debug [libusb_alloc_transfer] transfer 0x7f67b80010c0
[27.867237] [00000f4b] libusb: debug [libusb_submit_transfer] transfer 0x7f67b80010c0
[27.867249] [00000f4b] libusb: debug [add_to_flying_list] arm timerfd for timeout in 200ms (first in line)
[27.867266] [00000f4b] libusb: debug [submit_bulk_transfer] need 1 urbs for new transfer with length 4096
[27.867295] [00000f4b] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling
[28.067360] [00000e5f] libusb: debug [handle_events] poll() returned 1
[28.067385] [00000e5f] libusb: debug [handle_events] timerfd triggered
[28.067393] [00000e5f] libusb: debug [libusb_cancel_transfer] transfer 0x7f67b80010c0
[28.067454] [00000e5f] libusb: debug [disarm_timerfd] 
[28.067469] [00000e5f] libusb: debug [handle_events] poll() 3 fds with timeout in 0ms
[28.067478] [00000e5f] libusb: debug [handle_events] poll() returned 1
[28.067490] [00000e5f] libusb: debug [reap_for_handle] urb type=3 status=-2 transferred=0
[28.067498] [00000e5f] libusb: debug [handle_bulk_completion] handling completion status -2 of bulk urb 1/1
[28.067505] [00000e5f] libusb: debug [handle_bulk_completion] abnormal reap: urb status -2
[28.067510] [00000e5f] libusb: debug [handle_bulk_completion] abnormal reap: last URB handled, reporting
[28.067517] [00000e5f] libusb: debug [usbi_handle_transfer_cancellation] detected timeout cancellation
[28.067527] [00000e5f] libusb: debug [disarm_timerfd] 

Device 18d1:4ee1 is not support accessory! Reason: Resource busy

My device is the LG Nexus 5 (Hammerhead). I'm using the APK from the Readme file. Nothing happens on the phone.

This is a log of plugging the device in, and then removing it:

└─► sudo ./simple-rt -d
debug mode enabled
libusb callback registered!
[timestamp] [threadID] facility level [function call] <message>
--------------------------------------------------------------------------------
[ 0.001514] [00004cf3] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[ 0.001535] [00004cf3] libusb: debug [handle_events] poll fds modified, reallocating
[ 0.001541] [00004cf3] libusb: debug [handle_events] poll() 2 fds with timeout in 60000ms
[ 6.282009] [00004cf4] libusb: debug [linux_get_device_address] getting address for device: 2-1 detached: 0
[ 6.282023] [00004cf4] libusb: debug [linux_get_device_address] scan 2-1
[ 6.282178] [00004cf4] libusb: debug [linux_get_device_address] bus=2 dev=94
[ 6.282191] [00004cf4] libusb: debug [udev_hotplug_event] udev hotplug event. action: add.
[ 6.282199] [00004cf4] libusb: debug [linux_enumerate_device] busnum 2 devaddr 94 session_id 606
[ 6.282207] [00004cf4] libusb: debug [linux_enumerate_device] allocating new device for 2/94 (session 606)
[ 6.282242] [00004cf4] libusb: debug [linux_get_parent_info] Dev 0x7f139c0014a0 (2-1) has parent 0x559c7b91f4d0 (usb2) port 1
[ 6.282269] [00004cf3] libusb: debug [handle_events] poll() returned 1
[ 6.282278] [00004cf3] libusb: debug [handle_events] caught a fish on the event pipe
[ 6.282284] [00004cf3] libusb: debug [handle_events] hotplug message received
[ 6.282295] [00004cf3] libusb: debug [libusb_get_device_descriptor] 
[ 6.282305] [00004cf3] libusb: debug [libusb_get_device_list] 
[ 6.282318] [00004cf3] libusb: debug [libusb_get_device_descriptor] 
[ 6.282325] [00004cf3] libusb: debug [libusb_open] open 2.94
[ 6.282354] [00004cf3] libusb: debug [usbi_add_pollfd] add fd 9 events 4
[ 6.282366] [00004cf3] libusb: debug [libusb_kernel_driver_active] interface 0
Kernel driver is not active!
Device 18d1:4ee1 is not support accessory! Reason: Resource busy
[ 6.282393] [00004cf3] libusb: debug [handle_events] poll() 2 fds with timeout in 0ms
[ 6.282399] [00004cf3] libusb: debug [handle_events] poll() returned 1
[ 6.282404] [00004cf3] libusb: debug [handle_events] caught a fish on the event pipe
[ 6.282408] [00004cf3] libusb: debug [handle_events] someone updated the poll fds
[ 7.282553] [00004cf3] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[ 7.282571] [00004cf3] libusb: debug [handle_events] poll fds modified, reallocating
[ 7.282581] [00004cf3] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[15.203224] [00004cf3] libusb: debug [handle_events] poll() returned 1
[15.203325] [00004cf3] libusb: debug [usbi_remove_pollfd] remove fd 9
[15.203344] [00004cf3] libusb: debug [usbi_handle_disconnect] device 2.94
[15.207538] [00004cf4] libusb: debug [linux_get_device_address] getting address for device: 2-1 detached: 1
[15.207863] [00004cf4] libusb: debug [udev_hotplug_event] udev hotplug event. action: remove.
[15.207872] [00004cf4] libusb: debug [linux_device_disconnected] device not found for session 25e
[16.203499] [00004cf3] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[16.203518] [00004cf3] libusb: debug [handle_events] poll fds modified, reallocating
[16.203523] [00004cf3] libusb: debug [handle_events] poll() 2 fds with timeout in 60000ms
[16.203528] [00004cf3] libusb: debug [handle_events] poll() returned 1
[16.203530] [00004cf3] libusb: debug [handle_events] caught a fish on the event pipe
[16.203532] [00004cf3] libusb: debug [handle_events] hotplug message received
[16.203539] [00004cf3] libusb: debug [handle_events] poll() 2 fds with timeout in 0ms
[16.203544] [00004cf3] libusb: debug [handle_events] poll() returned 0
[17.203689] [00004cf3] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[17.203706] [00004cf3] libusb: debug [handle_events] poll() 2 fds with timeout in 60000ms

apk traces

i deleted ur apk, but every fucking time i plug in usb cable fucking dialog box of ur fucking app pops up.

Problems assigning routes; manual intervention required

Hello,

I've been using SimpleRT apps, but on my phone, a Samsung Galaxy J1 (SM-J100H) running Android 4.4.4, I have to run manually from a terminal emulator:

   $ su
   $ ip route add default via 10.1.1.1

in order to be able to connect the phone to the PC network. It seems to be a problem with Android 4.4 because in a Nexus 5 running Android 7, the same default route created by SimpleRT app works fine.

not work...

hi,
my simplert system is not worked,ubuntu17.10 and android 4.4.4,vpn can be connected,but my phone's webbrowser and other softwares cann't connec to internet...
thx!

Iptables: No chain/target/match by that name

I had the error as title "Iptables: No chain/target/match by that name"
I finally found it was iptables "comment" keyword that was not supported. I had to add it in the kernel like TUN/TAP. With gentoo I added:

  • NETFILTER_ADVANCED=y (menuconfig "Advanced netfilter configuration")
  • NETFILTER_XT_MATCH_COMMENT=y (menuconfig ""comment" match support")

I like the automated way of connecting on the Android side.

It would be nice to have a way to access internet with proxy. I don't know much about networking and android programming. Would there be a way to support it on the pc side ?

Thanks for the nice software

It does not work

I download zip file from this site, extracted it, go to directory simple-rt-cli and run "make" in terminal, then i execute "sudo ./simple-rt" in terminal on my Linux Manjaro computer. I also download apk file and installed it on android tablet. I connect via usb cable android and computer. Web pages did not opens on android.

Slow download speed

First of all, thanks for you great tool!
I've only got one issue... I only get download speeds of less than 300 KB/s on my phone when connecting it though SimpleRT, although my internet connection can handle up to 2 MB/s.
Am I doing something wrong or is this normal behavior?

I'm using Linux with 4.4.0 kernel on my computer and Android 6.0 on my phone.
I compiled the command line tool myself and used the provided apk.

Allow a way to select IP addresses/ranges

great app but more control over the ips it hands out would be a nice touch.
Would like to be able to give a phone a dedicated 10. ip instead of the kinda sequential ones you hand out now, and any other devices will get a different non dedicated ips.
I think this is better than gnirehtet because its runs on linux boxes with two network cards with no problems, gnirehtet relies on adb which doesn't like two network cards in linux at least my configuration of them.
SimpleRT just works.

Please explain how to install / use this app

Im relativly new to linux and I really need an easy explanation of how I install this program and how I use it.

I have a Huawei p8lite, of which the WiFi isnt working, so I thought, I could use my computers connection on it to install all necessary apps. Because, it isnt rooted, I only can use this one app in the playstore which doesnt work for me, or simpleRT.

How do I install it? Do I have to download it? where can I execute? I already have the apk from fdroid on my phone, but I dont know how to go on.

Hope somebody with more knowledge than me can explain me.
Thanks

strange behaviour respect to gnirehtet

I'm on a LG Nexus 5 AOSP ROM Android 7.1

I was testing methods for reverse usb tethering and found the following:
With gnirehtet, most apps (except google apps) work without having to turn data nor wifi on. For example Whatsapp and Telegram work without issues.

With SimpleRT, I get the conection, I can ping machines in my local network, but some apps work perfectly (dont need wifi nor data) and some others don't (need wifi or data). For example, Whatsapp works and Telegram doesn't.
The question is: why is that if both use VPN connections? Is it fixable?

A different minor issue with SimpleRT, sometimes after disconnecting usb the VPN service stays running, and must be closed manually.

Device is not support accessory!

sorry, new issue :)

vanous@tc-vanek:/tmp/SimpleRT/simple-rt-cli$ sudo ./simple-rt -d
debug mode enabled
libusb callback registered!

[timestamp] [threadID] facility level [function call]

[ 0.001947] [00002b19] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[ 0.001959] [00002b19] libusb: debug [handle_events] poll fds modified, reallocating
[ 0.001963] [00002b19] libusb: debug [handle_events] poll() 2 fds with timeout in 60000ms
[ 4.900710] [00002b1a] libusb: debug [linux_get_device_address] getting address for device: 2-1.2 detached: 0
[ 4.900758] [00002b1a] libusb: debug [linux_get_device_address] scan 2-1.2
[ 4.900913] [00002b1a] libusb: debug [linux_get_device_address] bus=2 dev=16
[ 4.900931] [00002b1a] libusb: debug [udev_hotplug_event] udev hotplug event. action: add.
[ 4.900941] [00002b1a] libusb: debug [linux_enumerate_device] busnum 2 devaddr 16 session_id 528
[ 4.900967] [00002b1a] libusb: debug [linux_enumerate_device] allocating new device for 2/16 (session 528)
[ 4.901085] [00002b1a] libusb: debug [linux_get_parent_info] Dev 0x7f08200015b0 (2-1.2) has parent 0x7814f0 (2-1) port 2
[ 4.902078] [00002b19] libusb: debug [handle_events] poll() returned 1
[ 4.902111] [00002b19] libusb: debug [handle_events] caught a fish on the event pipe
[ 4.902123] [00002b19] libusb: debug [handle_events] hotplug message received
[ 4.902151] [00002b19] libusb: debug [libusb_get_device_descriptor]
[ 4.902171] [00002b19] libusb: debug [libusb_get_device_list]
[ 4.902190] [00002b19] libusb: debug [discovered_devs_append] need to increase capacity
[ 4.902211] [00002b19] libusb: debug [libusb_get_device_descriptor]
[ 4.902223] [00002b19] libusb: debug [libusb_open] open 2.16
[ 4.902293] [00002b19] libusb: debug [usbi_add_pollfd] add fd 9 events 4
Device is not support accessory!
[ 4.902331] [00002b19] libusb: debug [handle_events] poll() 2 fds with timeout in 0ms
[ 4.902353] [00002b19] libusb: debug [handle_events] poll() returned 1
[ 4.902366] [00002b19] libusb: debug [handle_events] caught a fish on the event pipe
[ 4.902379] [00002b19] libusb: debug [handle_events] someone updated the poll fds
[ 5.902537] [00002b19] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[ 5.902591] [00002b19] libusb: debug [handle_events] poll fds modified, reallocating
[ 5.902622] [00002b19] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[65.905962] [00002b19] libusb: debug [handle_events] poll() returned 0
[66.906124] [00002b19] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[66.906158] [00002b19] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms

on the device:
your released provided apk is installed. it is nexus 5 , Android M: 6.0.1 , security patch level August 5th 2016.

No message on the phone at all.

thank you!

No Internet on the device

Hi.. This is what i get when i run the executable.

libusb callback registered!
Kernel driver is not active!
Device supports AOA 2.0!
Sending identification to the device
sending manufacturer: Konstantin Menyaev
sending model: SimpleRT
sending description: Simple Reverse Tethering
sending version: 1.0
sending url: https://github.com/vvviperrr/SimpleRT
sending serial number: j3qq4-h7h2v-2hch4-m3hk8-6m8vw
Turning the device in Accessory mode
Found accessory 18d1:2d00
accessory connected!
libusb callback deregistered!
configuring tun0
net.ipv4.ip_forward = 1
tun0 interface configured!

And I'm not receiving any Internet on my phone. How do i proceed?

Makefile for Openwrt

Hi vvviperrr,
I read that you have your code running in OpenWRT too. Could you add a Makefile and some instructions to compile it?
I'd really like to try SimpleRT on a small device.

SimpleRT over VPN interface

I'm looking into implementing a real VPN connection to a server and tether that interface so the server can policy route packets to the Android devices and use them as exit nodes. It's a no-root-required project for me, so i can't use the iptables already on the android, but instead need to find a way to route or forward the packets that reach the VPN interface to the default gateway and pass them back.
Would you have any pointers for that?

Routing not working, unusual IP addresses

Hi, Thanks for sharing this project.

I installed SimpleRT 1.0 (2016/09/19) on the Android 4.4.4 with 3.0 Kernel, via F-Droid and compiled and ran the cli as root on the PC.
When i plug the phone in, simpleRT asks if it can start the VPN, I say yes.

Afterwards I only have one item in my routing table.
ip route show shows 10.10.10.0/30 dev tun0 src 10.10.10.2
ip addr show shows tun0 is up with ip 10.10.10.2/30

The problem with that is the cli gets IP 10.1.1.1 which is not reachable by the phone's routing table.
I tried adding a route on the phone:
ip route add 10.1.1.1 via 10.10.10.2 dev tun0
And on the PC
ip route add 10.10.10.2 via 10.1.1.1 dev tun0
But they still can't ping each other, and of course the phone doesn't have a default route, so can't connect to the internet either.

I changed iface_up.sh as follows

#TUNNEL_NET=$4
TUNNEL_NET="10.10.10.0"
#HOST_ADDR=$5
HOST_ADDR="10.10.10.1"

Now theoretically they're both on the same subnet etc, but still can't ping each other and the phone still can't connect to the internet.

I've confirmed iptables-save on the PC and on the phone both show input and output have accept as the default action and there's nothing there that would block any traffic.

Launch service over adb?

Is it possible to start the service directly without requiring physically detaching and re-attaching the USB cable?

In an automated lab environment we may be rebooting devices remotely and managing the state of the device over adb and it is pretty critical to be able to start/stop remotely. It feels like I'm pretty close but may be missing something:

$ adb shell am startservice com.viper.simplert/.TetherService
Starting service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.viper.simplert/.TetherService }
Error: Requires permission android.permission.BIND_VPN_SERVICE
$ adb shell pm grant com.viper.simplert android.permission.BIND_VPN_SERVICE
Operation not allowed: java.lang.SecurityException: Package com.viper.simplert has not requested permission android.permission.BIND_VPN_SERVICE

Stopping it remotely (and cleanly) is pretty easy:

adb shell am force-stop com.viper.simplert

Issue with DirecTV App

I disabled the Wifi since I am tethered to my PC via a VM (until Windows support is added). When I try running the DirectTV App, it complains that I don't have Internet access even though I do. Also, I cannot access my DVR via it.

libusb callback deregistered! / error open tun: Resource busy / tun_alloc failed: Resource busy

Phone is Google Pixel XL, Android 7.1.1. Connected to a MacBook Pro (Retina, 15-inch, Mid 2015), macOS Sierra, 10.12.2, with libusb 1.0.20 from the Homebrew package manager.

"SimepleRT connected!" comes up on my phone when I plug it in, but this comes up in the Terminal:

sudo ./simple-rt
libusb callback registered!
Kernel driver is not active!
Device supports AOA 2.0!
Sending identification to the device
sending manufacturer: Konstantin Menyaev
sending model: SimpleRT
sending description: Simple Reverse Tethering
sending version: 1.0
sending url: https://github.com/vvviperrr/SimpleRT
sending serial number: j3qq4-h7h2v-2hch4-m3hk8-6m8vw
Turning the device in Accessory mode
Found accessory 18d1:2d01
accessory connected!
libusb callback deregistered!
error open tun: Resource busy
tun_alloc failed: Resource busy

Not sure if USB debugging needs to be enabled, but I tried without and with.

Tunneling unsuccessful

Hi :)

There is the VPN prompt in the phone. I have mobile network enabled. curl example.org works via adb. But as soon as I accept the prompt, curl freezes, no result.

With version 1.0 from F-Droid (could #37 cause an issue? #37)
PC counterpart : 20190906_9b63526-1

cli.log.txt
ip-route.txt
ip-show.txt

name of the network interface

u think everyone got default name like eth0? may i ask why? in my case its enp0s8 so eth0: error fetching interface information happens

Issue with it and Lubuntu

When using the debug output parameter, letting the log that's display grow and pressing CTRL+C, it froze the OS on me.

SimpleRT stops working after device reboot

Hi,

I am using SimpleRT for a Samsung Galaxy S7 with Android Version 7.0 connected to a Raspberry Pi 3 with Raspbian as the Host.

I have downloaded your provided apk and installed it via adb install

Reverse tethering is working fine until I restart the android device. After the restart, SimpleRT on the Pi is telling me that reverse tethering is working again but the android device is unable to get an internet connection.

This problem is resolved after I enable wifi on the android device, let the device connect to a wifi hotspot and then disable wifi again. Afterwards, reverse tethering can be used again.

This is the complete rt debug output.

pi@raspberrypi:~/SimpleRT/simple-rt-cli $ sudo ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.188.122  netmask 255.255.255.0  broadcast 192.168.188.255
        inet6 fe80::b57:dbce:f3f2:2e64  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:c0:d0:02  txqueuelen 1000  (Ethernet)
        RX packets 218114  bytes 57411473 (54.7 MiB)
        RX errors 0  dropped 90543  overruns 0  frame 0
        TX packets 77168  bytes 24134169 (23.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
pi@raspberrypi:~/SimpleRT/simple-rt-cli $ ip route show
default via 192.168.188.1 dev eth0 src 192.168.188.122 metric 202 
192.168.188.0/24 dev eth0 proto kernel scope link src 192.168.188.122 metric 202

[NOT AN ISSUE] AUR package

Hi!

I'm tired of making systemd units for simple-rt every time, so I decided to make an AUR package for it. Any Arch Linux user now can easily install it this way:

yaourt -S simple-rt
sudo systemctl enable simple-rt
sudo systemctl start simple-rt

https://aur.archlinux.org/packages/simple-rt

I had to make dirty hack to replace eth0 interface name in iface_up script, but in my case it works fine. I can add you as co-maintainer if you want so.

Thank you for your work 👍

multiple device support

I see in iface_up.sh that the host and device addresses are "hardcoded in android part" so how do we get multiple devices working with this? Thanks!

Proxy support

Hi! It's possible add an ability to work with Orbot/I2P networks??

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.