Wifi Tethering over LTE not working - T-Mobile Samsung Galaxy Note 3

Hi folks,
I seem to be butting heads with this issue again after my partway wipe. Basically from what I understand is that something somewhere in the romantic (stock 5.0) as well as on 4.4.2 stock or custom. I have had issues with tethering only when I have an lte signal. If I force my phone on to 4G then I can tether no problem.
I found a rather interesting argument on google that some sort of internal firewall or routing table refuses to allow tethering was the culprit. I would post the link but it lookms like i need to post more and lurk less, but heres an excerpt.
=======================================================================
To enable tethering on your Nexus 4 over an LTE connection, you'll need to make a modification to the iptables firewall settings.
To do this, you'll need root access. One app that may be helpful for this is call SManager, but it's not necessary. The info here was found in the guide posted here. However, after following his instructions, I found that the fix didn't work after a reboot, so I simply run the script manually.
Open up an app capable of file management such as SManager or ES File Explorer. Navigate to /system/app. Create a new text file and enter the following into the file:
#!/system/bin/sh
iptables -A bw_FORWARD -i !lo+
iptables -A natctrl_FORWARD -j RETURN -i rmnet+ -o wlan0 -m state --state RELATED,ESTABLISHED
iptables -A natctrl_FORWARD -j DROP -i wlan0 -o rmnet+ -m state --state INVALID
iptables -A natctrl_FORWARD -j RETURN -i wlan0 -o rmnet+
iptables -A natctrl_FORWARD -j DROP
iptables -A natctrl_nat_POSTROUTING -t nat -o rmnet+ -j MASQUERADE
Save the new file (I called mine tether_lte). Next, set the execute permissions on the file for all groups (rwx rwx rwx in ES File Explorer or all boxes checked in SManager).
Run the script, and you should now be able to tether devices to your Nexus 4 over LTE.
=======================================================================
This fix worked great on 4.4.2 I should add.
I was wondering if anyone has any idea if there Is a similar fix for lolipop. I should add that I am using metropcs and have free unlimited wifi tethering and am using a tmo note 3.
Any help would be greatly appreciated.

Interesting find guys/gals. Flashed the Vision-x International rom and now tethering over LTE works great. Strange, but it seems like maybe T-mobiles hotspot bloatware or some setting tweaked by them causes issues over LTE. Without having the understanding of trying different methods to force correct the routing tables through scripting, or the desire to not have to do it every time. I think ill stick with this or possibly any other international rom. The downside is I had to sacrifice NFC (big deal breaker right?) And use a rom that is at a dead end development wise.
Sent from my SM-P607T using Tapatalk

Related

OpenVPN connects but no pages load...?

Hi,
I've been struggling with OpenVPN for quite some time now, but have finally got it connecting using DeFrost 2.0d. The joy ends there as no pages load for me. Have googled, and googled some more to figure out the issue.
I thought it could be DNS related or perhaps something mentioned in this thread with a fix in this post ?
"
wraithdu posted on 28th June 2010, 04:20 PM
I had the same problem, and it's due to the built in versions of ifconfig and route I think. I did this:
1) installed busybox 1.15.3 to /system/xbin and installed the links (busybox --install .)
2) reboot into recovery
3) mount /system and adb shell:
# cd /system/bin
mv ifconfig ifconfigoff
mv route routeoff
ln -s /system/xbin/busybox ./ifconfig
ln -s /system/xbin/busybox ./route
4) reboot
This creates the busybox ifconfig and route symlinks in /system/bin. After this, OpenVPN Settings works perfectly. Since OpenVPN uses hardcoded paths, this is the only workaround I can think of."
Related to ifconfig and route?
Anyone with any tips for me - much appreciated!
Cheers
(Sorry - can't post link to thread as new user - in Droid Incredible Android Development)
semi-fixed...
works fine over wifi...the problem above over 3G...connects fine but doesn't browse anything. very strange. could my provider be blocking vpn?
anybody on Hi/KPN in the netherlands and have this working over 3G? have seen reports of the same problem quite allot, fine over wifi but not over 3g.
In my case problem was that Desire didn't acquire IP address from DHCP. The same config file that worked on my laptop didn't work on my phone. VPN connected properly by could not open any page from my local network.
After I've added ifconfig line in ovpn config file - it started to work.
could you show me an example of your config please?

[Q] Internet was working, upon reboot stopped

Hello all,
I'd like to preface this by saying this is a Cricket phone. Even if you know nothing about Cricket you may be able to help, so please read on. Note: because it's a Cricket phone I'm using autostart and a script to connect to the internet.
So a few days ago I messed up my phone to the point where it wouldn't boot. After that I had to learn how to flash (I didn't know before) and so I'm very new to all of this.
Here's what I've done:
- I flashed to the official 2.2, EC05
- I restored my data from my old nandroid backup
- I edited my phone's PRL and then went into QPST and changed the info so it will connect to the internet
- I copied autostart.sh to /data/opt/ and made sure the /opt/ director is 777 and the autostart.sh is 755
- I copied u2nl to /system/bin/ and made sure it was 755
I don't really have any questions about any of that because after I did this and restarted the internet was working fine. It worked fine for a few hours, then I had to restart my phone and now all of the sudden it's not working.
Autostart is launching when the phone starts, and it's being given superuser permissions, but the internet is not working.
- I can see the 3g symbol at the top of my phone, and arrows move in both directions
I think it might be an app that I've got installed that's blocking connectivity, however I've been disabling them and I'm still not getting anywhere. Does anyone have any clue why this could be happening?
Just wanted to edit and also ask: if it is an app blocking my connectivity, why did it work at all? The first time I restarted after granting autostart superuser ability, the internet worked fine for hours and hours. It was only after I restarted the phone again that the internet went away.
Thanks.
Maybe its with autostart app. Maybe something got changed when your phone booted up and now its affecting your internet. Is anything working that involves a data connection?
Sent From My Evo Killer!
musclehead84 said:
Maybe its with autostart app. Maybe something got changed when your phone booted up and now its affecting your internet. Is anything working that involves a data connection?
Sent From My Evo Killer!
Click to expand...
Click to collapse
Nothing that involves data is working, but everything (internet and data) was working when I first restarted the phone.
After playing with it all day I thought the AutoKiller app might have been causing the problems, but then this evening it got even worse. Initially my AutoStart app would run on boot, but the internet wouldn't work. Now the AutoStart app isn't even running on boot, and I'm 100% sure I've got it installed. I removed all apps that had anything to do with apps that run on boot or data control, and it still won't run on boot.
I don't really understand why but this AutoStart app will not consistently AutoStart anymore, and even when it did a few hours ago the data connection would only work on the first restart, and then it would AutoStart but the connection wouldn't work.
Does anyone have any idea? It's a pain in the butt to have a smartphone that doesn't do anything except text/calls
Maybe try to Clear you Cache in CWM. I had to do that once because I lost data.
Maybe even try doing a Fix Permissions in CWM.
hopefully it is this easy. If not sorry :O
For anyone who is interested I believe I have solved the problem.
According to a few other people here on the forums the stock 2.2 does not allow Autostart to work, so it may work once or twice but will not regularly work.
I got around this by using the Locale Execute Plugin which is a plugin written for the Locale app, however it can be used independently of the Locale app (read: you do not have to buy the Locale app, you can download the Execute plugin free and use it without Locale). I used Tasker to setup an On Boot trigger, and have it running the Locale Execute Script which launches Autostart.sh and allows my internet to connect.
I noticed the internet was still acting funny and removed my Autokiller app as well as my Phone Prioritizer app (I was using this to make sure my actual phone had priority over all other apps, it was running a script every 30 minutes). The internet seems to be functioning well now.
Here is a copy of my autostart.sh file (create a file called autostart.sh and edit it with notepad, copy and paste this code then save)
Code:
#!/system/bin/sh
export PROXYHOST=wap.mycricket.com
export PROXYPORT=8080
export MMSHOST=mms.mycricket.com
export MMSPORT=80
#you shouldn't have to edit anything below this line
export PATH="$PATH:/system/bin"
until netcfg|grep -v DOWN|awk '{print $1}'|grep -v wlan|grep -v lo >/dev/null 2>&1 ; do sleep 1 ; done
export INTERFACE=`netcfg|grep -v DOWN|awk '{print $1}'|grep -v wlan|grep -v lo`
export PROXYIP=`ping -c 1 $PROXYHOST|grep PING|cut -d\) -f1|cut -d\( -f2`
export MMSIP=`ping -c 1 $MMSHOST|grep PING|cut -d\) -f1|cut -d\( -f2`
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F
iptables -t nat -F
iptables -X
iptables -t nat -A OUTPUT -o $INTERFACE -p 6 -d $MMSIP --dport $MMSPORT -j DNAT --to-destination $MMSIP:$MMSPORT
#iptables -t nat -A OUTPUT -o $INTERFACE -p 6 --dport 80 -j DNAT --to-destination $PROXYIP:$PROXYPORT
iptables -t nat -A OUTPUT -o $INTERFACE -p 6 ! -d $PROXYIP ! --dport $PROXYPORT -j REDIRECT --to-port 1025
u2nl $PROXYIP $PROXYPORT 127.0.0.1 1025 >/dev/null 2>&1 &
sh -c "sleep 5;kill `ps|grep nk.bla.android.autostart|grep -v grep|awk '{print $2}'`" >/dev/null 2>&1 &
exit 0
Here's a step-by-step breakdown of what I did:
I used:
Tasker (paid app)
Locale Execute Plugin (free app - (link)(link2))
Root Explorer (paid app)
Patience
- Created autostart.sh file and copied it to my SD card
- Copied u2nl file to the SD card (link - download the token419_cricket_data_setup_1.2.zip, it's located in system/bin/ within that zip)
- Opened the "Root Explorer" app and copied the Autostart.sh file, then browsed to /data/ and created a folder called "opt".
- Pasted autostart.sh in /data/opt/ and made sure it was 755 (long press then go to permissions and check User: read/write/execute, Group: read/execute, Others: read/execute).
- Copied u2nl from the SD card and pasted it to /system/bin/ on my phone, made sure it also had 755 permissions
- Downloaded Locale Execute Plugin (link)(link2)
(note: since your phone is not connected to the internet, connect to a wifi network to download this app from the market)
- Launched Tasker and created a new rule > event > system > device boot
- Added an action > plugin > execute
- Entered "@!/data/opt/autostart.sh" and saved (the @ tells it to not send you a popup when it runs, the ! gives it superuser permissions)
- Saved by pushing the back arrow on my phone's touchscreen
- Clicked "apply"
- Rebooted, and clicked "allow" when Locale Execute Plugin requested superuser permissions
That's it, my internet started working after this. I had to remove those other previously mentioned apps, but that was just me. If your internet isn't working after doing this, first make sure you did everything right. If it's still not working try to think of any apps you have that might be overwriting the autostart.sh file's settings. If worst comes to worst, start uninstalling apps until it works again. Reboots will be required after you uninstall an app.
Hopefully this helps someone out there.
Glad u got it man.
Sent From My Evo Killer!

[SCRIPT]Debian Image Builder (01-22-2012)

Debian Image Builder...
So basically, I've been reading several different articles, etc. on running Debian and/or Ubuntu on Android. I did this on my Eris and D1 in the past, and I figured that it would work even better on the Galaxy Nexus. Of course it does... Anyway, it can be run from a loop mounted image or a separate partition on most phones. However, for phones like this one with no sdcard slot, it makes sense to just do the image thing.
After building and rebuilding an image a few times, I decided to do what I normally do and turn those crazy linux commands into a script. It's not really all that complex or fancy, but it works and can be improved. I hope you find it helpful.
NOTE: This is really just the first step in getting Debian running on your phone. This will just create the image. You still have some work to do. There are other ways to do this, but I like having control of the initial image...
1/14/2012 - fixed some typos and added 'apt' as a default package (debootstrap did this by default, but apparently multistrap doesn't)
1/16/2012 - removed multistrap and went back to debootstrap for now
1/21/2012 - added a setup script to do the second stage and updates after booting into Debian on the phone, fixed extra package install code
1/22/2012 - updated variable code per swordrune10's suggestion
Download: https://github.com/gnarlyc/DebianImageBuilder
Currently requires Debian 6, but feel free to fix that for me.
Rock on.
Thanks. I had fun with Debian on my Eris back when that was being worked on. I am sure this will be much faster on this beast.
synesthete said:
Thanks. I had fun with Debian on my Eris back when that was being worked on. I am sure this will be much faster on this beast.
Click to expand...
Click to collapse
It does, and it's pretty sweet with a bluetooth keyboard & mouse and a monitor via a MHL video cable. I've even compiled a kernel or two on it.
Where do we put the image? Do we have to create a new partition?
Sent from my Galaxy Nexus using XDA App
ttereve said:
Where do we put the image? Do we have to create a new partition?
Sent from my Galaxy Nexus using XDA App
Click to expand...
Click to collapse
No, you don't have to create a partition. Here's what I do:
I use Connectbot for a terminal emulator, but there are others out there.
One time:
1) 'mkdir /data/local/debian' (don't type the single quotes)
2) copy the image to /sdcard/
Each time I start up (actually, I've made a script for this too):
1) 'su'
2) 'mount -o loop -t ext2 /sdcard/linux.img /data/local/debian'
3) 'chroot /data/local/debian /bin/bash'
4) ta-da!
You should be at a Debian bash prompt. Check /etc/apt/sources.list to make sure it's there and has 'deb http://ftp.us.debian.org/debian squeeze main'. You might also have to do 'dkpg --configure -a'. If it looks like that's needed each time, I'll automate it. If you install a desktop gui like xfce or whatever, you'll probably want to install tightvncserver in Debian and get an Android VNC client from the Market. I'll probably add more options to make these things a little easier in the future.
I'm still going through the entire process over and over until I get things how I want it, so the script will be updated as I get the time.
I'm guessing we can use ext3 (or even ext4) instead of ext2?
ttereve said:
I'm guessing we can use ext3 (or even ext4) instead of ext2?
Click to expand...
Click to collapse
I dunno. It won't hurt to try!
Is there any chance that this will work on GSM GN?
Sent from my Galaxy Nexus using xda premium
JTECJ said:
Is there any chance that this will work on GSM GN?
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Yes. This just builds the rootfs in an image. It should work for nearly any arm based Android device. I'm still working out some kinks with getting vnc and SSH servers working though. These worked fine when I used debootstrap to create the rootfs, but multi strap is much more flexible. So, I'm going to keep trying multi strap for a bit.
alright I can get into [email protected] bash but i can't start ssh because well, there is no ssh in/etc/init.d/ how do I get it in there? (i built my own ubuntu rootfs with rootstock)?
ttereve said:
alright I can get into [email protected] bash but i can't start ssh because well, there is no ssh in/etc/init.d/ how do I get it in there? (i built my own ubuntu rootfs with rootstock)?
Click to expand...
Click to collapse
Did you install openssh-server?
EDIT: Yeah, some things aren't working quite right with installing and updating packages. I might have to re-work it with debootstrap again... Oh well.
Ok. Give me a day or two. I've re-written the script using debootstrap instead. I'll update the repo as soon as I do my initial test, which should be later tonight.
sweet I got it all to work! I'll try and get a script up for the way I did it.
btw I used a rootstock ubuntu rootfs
now I need to figure out how to setup gnome through command line!
ttereve said:
sweet I got it all to work! I'll try and get a script up for the way I did it.
btw I used a rootstock ubuntu rootfs
now I need to figure out how to setup gnome through command line!
Click to expand...
Click to collapse
Cool! I read something about rootstock, but never really looked too deep. Yeah, post your code. That would be great. I have used debootstrap before, so I know it works. The thing that I never liked is that you have to run '/debootstrap/debootstrap --second-stage' after you boot into Debian on the phone. With multistrap, the packages are supposed to all be there and ready to go. (At least, that's how I understand it.) Anyway, I'm working out debootstrap again, and will just do a one-shot startup script or something. Or maybe, I'll switch gears and do it your way instead...
from: http://androlinux.com/android-ubuntu-development/how-to-build-chroot-arm-ubuntu-images-for-android/
build rootfs
Code:
sudo rootstock \
--fqdn ubuntu \
--login ubuntu \
--password ubuntu \
--imagesize 4G \
--seed linux-image-omap,build-essential,ssh,tightvnc
then make an image:
Code:
dd if=/dev/zero of=ubuntu.img bs=1MB count=0 seek=4096
format as ext4
Code:
mkfs.ext4 -F ubuntu.img
mount empty image
Code:
sudo mount -o loop ubuntu.img /mnt
extract rootfs inot image
Code:
sudo tar -C /mnt -zxf armel-rootfs-datetag.tgz
and unmount
Code:
sudo umount /mnt
this is my script to get chroot working (but this script fails and idk why so any help would be appreciated) (modified from the script http://burningbroccoli.se/post/949205350/chrootd-ubuntu-on-samsung-galaxy-s-android):
Code:
#!/bin/sh
echo "mount the image"
mount -o loop -t ext4 /sdcard/ubuntu.img /data/local/ubuntu
echo 'Mounting proc,sys and dev'
busybox mount -t proc proc /data/local/ubuntu/proc
busybox mount --bind /sys /data/local/ubuntu/sys
busybox mount --bind /dev /data/local/ubuntu/dev
echo 'Exporting a proper path'
export PATH=/bin:/usr/bin:/sbin:/usr/sbin:$PATH
echo 'Chrooting and starting ssh server'
chroot /data/local/ubuntu /bin/bash
echo "And your ip is:"
busybox ifconfig | busybox grep "inet addr"
I looked at rootstock. It doesn't appear to be Debian friendly, but maybe I'm just missing something. As soon as I'm happy with this on Debian, I'll look into making it work on Ubuntu also. I also realized that debootstrap has an option to install extra packages, so that's cool.
Right now, this is working well for me, but there are things that I would like to add.
ran into a problem, apparently it doesnt know let so it pretty much didnt work..
Code:
./debianImageBuilder.sh: 20: let: not found
running oneiric and the UI is gnome3
---------- Post added at 04:53 PM ---------- Previous post was at 04:37 PM ----------
nvm, i got it to work by modifying it to this.. u can do whatever to the code, im just happy to help... tho im not sure why let doesnt work for me x.x
Code:
export image_name=debian.img
export build_folder=image_folder
real_image_size=$(6442450944)
echo "******************************"
echo "Installing dependencies"
echo "******************************"
apt-get install debootstrap
echo "******************************"
echo "Gather info"
echo "******************************"
echo -n "What size image would you like to create? (in GBs): "
read image_size
real_image_size=$(((($image_size * 1024) * 1024) * 1024))
swordrune10 said:
ran into a problem, apparently it doesnt know let so it pretty much didnt work..
Code:
./debianImageBuilder.sh: 20: let: not found
running oneiric and the UI is gnome3
---------- Post added at 04:53 PM ---------- Previous post was at 04:37 PM ----------
nvm, i got it to work by modifying it to this.. u can do whatever to the code, im just happy to help... tho im not sure why let doesnt work for me x.x
Code:
export image_name=debian.img
export build_folder=image_folder
real_image_size=$(6442450944)
echo "******************************"
echo "Installing dependencies"
echo "******************************"
apt-get install debootstrap
echo "******************************"
echo "Gather info"
echo "******************************"
echo -n "What size image would you like to create? (in GBs): "
read image_size
real_image_size=$(((($image_size * 1024) * 1024) * 1024))
Click to expand...
Click to collapse
Cool. That does look a bit cleaner. The code for installing extra packages wasn't right/all there, so I'm working on that now.
Thanks for this script. It worked perfectly for me. It's great to be able to apt-get things on my phone, and it's interesting to run debian's utilities on Android. A lot of other methods are about getting some sort of Linux desktop on Android, but I really appreciate the barebones CLI that this provides. To my knowledge this is the only way to be able to run ping6 on Android.
To anyone thinking of setting this up - make sure to install busybox!
I made a couple of helper scripts to get cleanly in and out of the chroot, and to make the sdcard directory available within debian. I'm keeping this stuff stored in /sdcard/debian:
Code:
[email protected]:/sdcard/debian # ls
debian.img
debroot
start.sh
stop.sh
start.sh
Code:
mount -o loop -t ext2 debian.img debroot
busybox mount --bind /sdcard debroot/mnt
chroot debroot /bin/bash
stop.sh
Code:
umount /mnt/sdcard/debian/debroot/mnt
umount /mnt/sdcard/debian/debroot/dev/pts
umount /mnt/sdcard/debian/debroot/proc
umount /mnt/sdcard/debian/debroot/sys
umount /mnt/sdcard/debian/debroot

[modules] cifs.ko, md4.ko, nls_utf8.ko, stock [4.2 / 4.2.2] 3.4.5-g4e6298b / gaf9c307

I have managed to get CIFS working on stock Nexus 10.
It's quite a bit more problematic on the Nexus 10 than normal.
There are 2 main issues to deal with. Newer versions of the Linux kernel require a UNC variable to be passed to them and the current version of busybox doesn't do this. There is a patch out. I have extracted the patched busybox binary from craigacomez's AOSP Nexus 10 rom.
(Check it out here: http://forum.xda-developers.com/showthread.php?t=1998585 ). Otherwise it should work on the stock mount command if you specify the unc= mount option with the share.
The other issue is the multiuser stuff. If you execute the mount command from inside Terminal Emulator (or a script program) it looks like it mounts ok and you can 'ls' in the directory but it doesn't work for Android apps, they just see an empty directory but if you do it via a 'adb shell' it works fine in Android apps. My theory is ADB is outside of the multiuser stuff. adb actually ships on the device.
1) Unlock bootloader (fastboot oem unlock)
2) Flash recovery adb flash recovery whatever.img
3) Root device (flash CWM-SuperSU-0.98.zip)
4) Install BusyBox (from the market)
5) Copy md4.ko and cifs.ko to device. The files can go anywhere you like. In this example I will just use the root of the sdcard. Some people like them in /system/modules or /system/lib/modules
6) busybox mount -o rw,remount /
7) adb shell
8) Override /system/bin/busybox with the patched version (maybe move it first so it's backed up).
9) insmod /sdcard/md4.ko
10) insmod /sdcard/cifs.ko
11) busybox mount -t cifs -o username=MYUSER,password=MYPASS,unc=\\\\192.168.1.1\\storage //192.168.1.1/storage /data/media/0/cifs/Storage
You will need to manually preform the last 3 commands each time you reboot the device from a adb shell.
NOTE: You can probably get rid of the -o flags completely. In theory the patched version of busybox makes the UNC bit redundant. Possibly you can use the stock busybox with the UNC flag and avoid using the patched one totally. I have just included it to be sure.
Make sure you type 'busybox mount' not 'mount', by default they are different binaries. Otherwise you can remove the /system/bin/mount command and make a new one linking /system/bin/mount to /system/bin/busybox.
Possibly there is some way to get the mount working in the multiuser environment without requiring busybox. If you figure it out please tell ☺
Some threads on the issue:
http://forum.xda-developers.com/showthread.php?p=34397868#post34397868
http://forum.xda-developers.com/showthread.php?t=733490&page=6
http://www.mail-archive.com/[email protected]/msg17650.html
The modules are for 3.4.5-g4e6298b.
EDIT: I added nls_utf8.ko by request
EDIT2: Since adb comes on the device, it is possible to use it to connect to local host:
1) Install cifs modules to /system/lib/modules
2) Install Script Manager from the play store
3) Copy script to device
4) Start SManager
5) Find your script and open it.
6) Tick the su box
7) Hit save
8) Goto home sccreen
9) Add a 'SMShortcuts' widget to your home screen
10) "Add one script shortcut"
11) Choose your script
12) Optionally use this pretty icon ☺
13) Give it a nice name like "Mount Shares"
Here is a shell script...
Code:
#!/system/bin/sh
# Your settings here
USERNAME="USERNAME"
PASSWORD="PASSWORD"
IPADDRESS="192.168.1.1"
SHARE="storage"
MOUNT_POINT="/data/media/0/cifs/Storage"
# If you need to change the mount command edit this
MOUNT_CMD="\
mount -t cifs \
\
-o \
user=$USERNAME,\
password=$PASSWORD,\
unc=\\\\\\\\\\\\\\\\$IPADDRESS\\\\\\\\$SHARE \
\
//$IPADDRESS/$SHARE \
$MOUNT_POINT"
COMMANDS="\
insmod /system/lib/modules/md4.ko; \
insmod /system/lib/modules/nls_utf8.ko; \
insmod /system/lib/modules/cifs.ko; \
$MOUNT_CMD
"
# Starting ADB...
PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port 5555
adb kill-server
adb start-server
stop adbd
start adbd
adb connect localhost
# Make sure we only use the first device (sometimes there is more than one)
SERIAL=`adb devices | head -n2 | tail -n1 | cut -f1`
if [ "$SERIAL" = "" ] ; then
echo "ERROR: Could not find ADB device.";
fi
echo Mounting share via adb...
adb -s $SERIAL shell su root -c "$COMMANDS"
# If you started adb, then stop it here for security:
adb disconnect localhost
stop adbd
setprop service.adb.tcp.port $PORT
start adbd
RESULT=`mount | grep $MOUNT_POINT`
if [ "$RESULT" = "" ] ; then
echo "Mounting failed..."
else
echo "Mounting sucess!"
fi
echo Done... You may close this script window.
EDIT3: Added usbserial.ko, option.ko and usb_wwan.ko
EDIT4: Some users have reported that the need to modify the script to get it working with their version of SU.
EDIT5: I have uploaded modules for 4.2.2, kernel 3.4.5-gaf9c307 but I haven't actually tested them myself (still on 4.2.1). Apparently the adb loophole has also been patched but it is possible to reenable it by putting a RSA key onto the device. Check out this set of instructions here.
EDIT6: I have updated to 4.2.2 on my Nexus 10 and can confirm the new modules work.
You must setup the adbkey or you will get a "device: offline" message. By default adb when adb first runs it tries to create the keys in the $HOME dir which is /data/.android, but the data directory isn't accessible by the 'shell' user.
I got it working simply by setting the HOME variable to /sdcard and restarting the adb server in the script then Android popped up a query (I have update the script above).
IMPORTANT: The Android Media scanner recursively scans folders for media to add the the database so it shows up in programs like Google Music. On large shares this can be a long process and use heaps of battery life. To prevent this add a blank file with the name ".nomedia" to the root of your mount points (or each individual share if you aren't used 1 folder for all your mounts). This will stop music showing up in programs though.
If you find that the device stops responding (the launcher might work but apps fail to load) or you get reboots (often after the previous bug) this is probably due to a bad wifi connection.
Is it posible to make a CWM flash file?
Great
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
alias_neo said:
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
Click to expand...
Click to collapse
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
craigacgomez said:
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
Click to expand...
Click to collapse
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Although I don't have nexus 10, I am having the similar mounting issue on my nexus 7 until I saw this post.
Advise about "adb shell" really helps me resolve the multiuser issue.
Thanks for sharing.
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
H3g3m0n said:
1) Unlock bootloader (adb oem unlock)
Click to expand...
Click to collapse
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
momulah said:
Is it posible to make a CWM flash file?
Click to expand...
Click to collapse
Not a high priority right now as currently you need to do the manual adb shell stuff by hand to get things mounted, a little extra setup work isn't a huge difference.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
Are you mounting in a 'adb shell' or locally in something like terminal emulator? My OTG cable won't be here for a while so I can't really test myself.
weasal said:
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
Click to expand...
Click to collapse
Posted, haven't tested it but it seemed to insmod fine.
espionage724 said:
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
Click to expand...
Click to collapse
Yeh typoed, i'll fix that now.
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
I've been working on getting OTG support natively in my AOSP based custom ROM and I have had some success... check out my ROM for details
H3g3m0n said:
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
Click to expand...
Click to collapse
Just wanted to thank H3g3m0n as I was able to successfully mount over adb. Also came up with a workaround to bypass connecting to a PC, grabbed the arm fastboot binary from this thread and installed it on my nexus 7. Used it to connect wireless adb on the 10 and ran the mount commands on the 7.
H3g3m0n said:
Posted, haven't tested it but it seemed to insmod fine.
Click to expand...
Click to collapse
Thanks, I'll give it a try!
You might find my posts #156 and #162 at http://forum.xda-developers.com/showthread.php?t=1781411&page=17 helpful.
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
spdwiz18 said:
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
http://en.wikipedia.org/wiki/Loadable_kernel_module
craigacgomez said:
http://en.wikipedia.org/wiki/Loadable_kernel_module
Click to expand...
Click to collapse
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
These modules are needed to enable support for CIFS (Windows share) mounts...
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
Basically you can setup a shared folder from a remote computer. It allows you to have files on another system accessible as if it was part of the internal storage in the device.
Just found out that Android ships with the adb binary on the device itself (after crosscompiling it myself :/, oh well the experience was useful).
It should be possible to setup a script to start the adb server, connect to the localhost and execute the mount without too much difficulty.
Ok, added a script and instructions to the front page for simple on tablet mounting.

[req] adhoc capable wpa_supplicant 2.3.6 i9000

Hi guys, I'm sorry that I start the age long discussion again but all the threads about the matter of enabling Adhoc via replacing the "wpa_supplicant" method are ether old or a total chaos.
I tried lots of different versions of "wpa_supplicant" ( this thread and this , this , this , this and this )and nothing seems to work. Replacing the original wpa_supplicant makes the wifi unable to start or unable to see any networks at all.
I replace the wpa_supplicant by using RootExplorer with mount R/W and then setting permissions (XXX-X-XXX in the columns resp.)
or by using:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cp /sdcard/wpa_supplicant /system/bin/
chmod 755 /system/bin/wpa_supplicant
chown system.wifi /data/misc/wifi/wpa_supplicant.conf
reboot
either time no success
I'm using a CF-4.4 rooted stock i9000 SGS with GB 2.3.6
PDA i9000xxjw4
PHONE i9000xxjw4
CSC i9000xajw4
to make things clearer, I'm not asking for info about:
- whether AdHoc is or isn't needed / unsecure / old
- how to use connectify in win7 to make a virtual AP
- how to edit the "wpa_supplicant.conf" method.
I just want to have any adhoc visible in wifi connections with a suffix like I used to on 2.3.3 and be able to connect (preferably from the first time), pleas don't point me to other threads , I've read most of them.
ps. here's my original wpa_supplicant that sees only non adhoc networks, If I wasn't such a noob and if I knew a way to modify it or how to compile it using the patch from szym mentioned in the theads I would have done it myself

Categories

Resources