[Q] tun.ko and vpn for Dell Streak - Streak 5 Q&A, Help & Troubleshooting

I am trying to connect to my company's vpn server (Cisco) with an application named vpnc.
but it needs a tun.ko module which I can't find on the Dell Streak.
I find tun.ko for other devices but I can't use them as a module on the Dell Streak. It does not accept the exec format.
Can anyone compile a tun.ko for Dell Streak ? Or is there any compiled tun.ko for it ?
Thanks.

I'd appreciate any help...

I misunderstood the OP query

As the OP said, tun.ko needs to be specific to the device.
The one you found says:
"tun for Android 2.2 (Froyo) Nexus One devices"
We are both looking for one for the Streak - in my case at 2.1 level.
Thanks for looking.
Post #12 Here http://forum.xda-developers.com/showthread.php?t=630703&page=2 appears to have all the instructions, but I don't have the skills.

mardibloke said:
As the OP said, tun.ko needs to be specific to the device.
The one you found says:
"tun for Android 2.2 (Froyo) Nexus One devices"
We are both looking for one for the Streak - in my case at 2.1 level.
Thanks for looking.
Post #12 Here http://forum.xda-developers.com/showthread.php?t=630703&page=2 appears to have all the instructions, but I don't have the skills.
Click to expand...
Click to collapse
is there really that much difference between the streak and the nexus?
I misunderstood what the OP meant by "other devices" I Presumed he meant linux not android,
have you thought about asking on that google code page for them to compile it for you?
-----edit scratch that..
having read that thread..
I think you need the streak source code..
Best get involved in the attempts to get Dell to release it to comply with the GPL.

actually, we don't need the source code of Streak.
we just need to compile tun.ko for Streak.
I don't know how to do that.
I asked in the project site but nobody answered.

mrmrmrmr said:
actually, we don't need the source code of Streak.
we just need to compile tun.ko for Streak.
I don't know how to do that.
I asked in the project site but nobody answered.
Click to expand...
Click to collapse
according to the thread mardibloke posted you need the source as he checks out the nexus-one specific head..
Finaly! I figured out how to build tun.ko module for the stock kernel.
If anybody wants to repeat that:
* I have Android OpenSource installed in /opt/android
* In /opt/android I did: git clone git://android.git.kernel.org/kernel/msm.git kernel-nexus
* In kernel-nexus I did:
- git checkout -b origin/android-msm-2.6.29-nexusone
- git checkout HEAD^
(The last operation reverses one revision, I needed a previous revision from the tree. Different revisions generate modules with different vermagic values)
(Actually, instead of previous two this should work as well - it should checkout the correct revision: git checkout 4bc62c230b2942bea72c3b5258e3e4f1d6cb534b )
- make ARCH=arm CROSS_COMPILE=/opt/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- distclean
- adb pull /proc/config.gz
- gunzip config.gz
- mv config .config
- Edited .config: changed "# CONFIG_TUN is not set" to: "CONFIG_TUN=m"
- make ARCH=arm CROSS_COMPILE=/opt/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- modules
- The driver ends up in: drivers/net/tun.ko
- You can verify if it is going to match the kernel by running:
+ strings drivers/net/tun.ko | grep 2.6.29
+ It should produce "vermagic=2.6.29-01117-g4bc62c2 preempt mod_unload ARMv7"
+ The "2.6.29-01117-g4bc62c2" should be the same as the "Kernel version" in "Settings->About phone" on your phone.
* Now you can upload the module to your phone. I did:
- adb shell mount -o remount,rw /dev/block/mtdblock3 /system
- adb push drivers/net/tun.ko /system/lib/modules/
- adb shell mount -o remount,ro /dev/block/mtdblock3 /system
- And you can use adb shell, enter /system/lib/modules and run: insmod tun.ko
- It should work
Click to expand...
Click to collapse

Made some progress, but now stuck getting the tun.ko file copied onto my streak.
Streak 2.1 does not appear to have cp or pull commands.
Cannot push the file over via adb, to where I need it
Cannot move the file
Any help really appreciated.
>adb push tun.ko /system/lib/modules/tun.ko
failed to copy 'tun.ko' to '/system/lib/modules/tun.ko': Permission denied
>adb push tun.ko /sdcard/tun.ko
877408 KB/s (158130 bytes in 0.000s)
>adb shell
$ su
su
# mount -o remount,rw /dev/block/mtdblock3 /system
mount -o remount,rw /dev/block/mtdblock3 /system
#
# mv /sdcard/tun.ko /system/lib/modules/tun.ko
mv /sdcard/tun.ko /system/lib/modules/tun.ko
failed on '/sdcard/tun.ko' - Cross-device link

how did you get it compiled for the streak without the kernel source?

Can we see if I get it working before I comment on that

couldn't you just put in on your sd card and copy over to system/lib/modules once you mount it r/w with root explorer?

I don't appear to have the cp command available
You see I tired to move it (as mv command was available), and that failed.
I'm new to Linux, so maybe I missed something obvious?
>adb shell
$ su
su
# mount -o remount,rw /dev/block/mtdblock3 /system
mount -o remount,rw /dev/block/mtdblock3 /system
#
# mv /sdcard/tun.ko /system/lib/modules/tun.ko
mv /sdcard/tun.ko /system/lib/modules/tun.ko
failed on '/sdcard/tun.ko' - Cross-device link

more coffee, and found CAT is available..
cat /sdcard/tun.ko > /system/lib/modules/tun.ko
appears to have worked, off for some more testing.

can you share that ?

Attached is tun.ko that as you will see below appears to run on my 2.1 Streak
VPNC not currently connecting for me though :/
Code:
[email protected]:~/mydroid/kernel-streak$ adb push drivers/net/tun.ko /sdcard/tun.ko
1572 KB/s (161314 bytes in 0.100s)
[email protected]:~/mydroid/kernel-streak$ adb shell
$ su
# mount -o remount,rw /dev/block/mtdblock3 /system
# cat /sdcard/tun.ko > /system/lib/modules/tun.ko
# mount -o remount,ro /dev/block/mtdblock3 /system
# cd /system/lib/modules
# insmod tun.ko
# exit
$ exit
[email protected]:~/mydroid/kernel-streak$

thank you for sharing. but why doesn't vpnc connect ?

Sorry don't know why vpnc does not connect.
To be honest, I don't know how to tell tun is running properly.
Any advice, places to check logs etc appreciated.

Was interested if it worked for you, as I may just have my vpnc config wrong for our work connection.
Nothing bad has happened since I installed, and ran the tun.ko that I attached, but clearly I should say using it is at your own risk.
For example i see:
Known issues¶
Usernames can not contain the @ symbol
and my usernames do have the @ symobol for my work credentials

w00t! or whatever you say after spending 3 evenings trying to get this working.
Am connected fine, using the tun.ko file I already attached.
Final issue for me was solved by some debug with using a shell on my Streak and command:
Code:
/data/data/org.codeandroid.vpnc_frontend/files/vpnc --script /data/data/org.codeandroid.vpnc_frontend/files/vpnc-script --no-detach --debug 1
To see what was going on, turns out I *just* needed to install Busybox.
So I think what you need to be the same as me is:
2.1 UK Build 6941
Rooted
Busybox install - on marketplace
Then the tun.ko file I posted, and use the commands shown in the same post.
Any problems, just ask.
Did I mention, pretty pleased

it's obvious that you are pleased
let's see:
I have only Android 1.6 on my Dell Streak.
Would that work ?
it's rooted already.
installing BusyBox right now. (why is that needed btw ?)
done !
copied tun.ko to /system/lib/modules
insmod is fine. I can see the module loaded by "lsmod"
configured my company vpn.
btw, my user also has @ sign , is that a problem ?
leave password empty. it asks for password. fine....
"failed to connect"
what do I have to check ?

Related

busybox and custom roms

Hi,
since a few days I have my first andriod mobile the HTC Hero. I have rooted it and everything works fine.
However, I found several interesting images for the G1 (JesusFreke or CyanogenMOD and so on). I suppose that they will not run on the HTC Hero :-( (yet). Sombody know if there is someone working on it? A google search is not that easy because the most roms are based on the HTC Hero sence and so you can easy find 100 hits with hero but all roms are not for the hero itself.
Does somebody have busybox running on the hero? I searched for a while but found nothing Hero specific. My first try to use a exiting manual for G1 did not work without problems. The most manuals are old and suggest to use a custom rom which include busybox.
Maybe someone has a hint for me
I want to test debian but the istaller use cp and so on. So busybox is a good starting point.
Cheers
Visios
download the attachment (busybox taken from cyanogen's rom), extract busybox and copy it to sdcard, then (if you have root):
Code:
adb shell
su
mount -o remount,rw /dev/block/mtdblock3 /system
dd if=/sdcard/busybox of=/system/bin/busybox
chmod 4755 /system/bin/busybox
mount -o remount,ro /dev/block/mtdblock3 /system
enlightener said:
download the attachment (busybox taken from cyanogen's rom), extract busybox and copy it to sdcard, then (if you have root):
Code:
adb shell
su
mount -o remount,rw /dev/block/mtdblock3 /system
dd if=/sdcard/busybox of=/system/bin/busybox
chmod 4755 /system/bin/busybox
mount -o remount,ro /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
tx for your info and the extracted busybox bin. It worked without any problem.
Do you have tried to use busybox install and export the path ?
enlightener said:
download the attachment (busybox taken from cyanogen's rom), extract busybox and copy it to sdcard, then (if you have root):
Code:
adb shell
su
mount -o remount,rw /dev/block/mtdblock3 /system
dd if=/sdcard/busybox of=/system/bin/busybox
chmod 4755 /system/bin/busybox
mount -o remount,ro /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
when i type adb shell it says
adb permission denied..
Help please
Yeah, I could google it but I'll just ask here instead, busybox - what's it good for?
It provides a lot of the standard Linux/Unix utilities - such as cp, rm, df, ls, ps, grep, etc. The toolbox program provided in the HTC ROM is a "crippled" replacement for busybox and doesn't have some of the functionality. For example, Market Enabler doesn't work with the stock ROM because toolbox doesn't provide the grep utility.
BlueHawk said:
It provides a lot of the standard Linux/Unix utilities - such as cp, rm, df, ls, ps, grep, etc. The toolbox program provided in the HTC ROM is a "crippled" replacement for busybox and doesn't have some of the functionality. For example, Market Enabler doesn't work with the stock ROM because toolbox doesn't provide the grep utility.
Click to expand...
Click to collapse
Oh, I see. Well explained, sir!
Busybox 1.15.3 for android for anyone interrested:
Code:
[URL="http://www.mediafire.com/?wcknmnhtin0"]http://www.mediafire.com/?wcknmnhtin0[/URL]
Does anybody know what version of Busybox is in the original post?
And if I want to upgrade, should I just follow the instructions over again with the newer version?
enlightener said:
download the attachment (busybox taken from cyanogen's rom), extract busybox and copy it to sdcard, then (if you have root):
Code:
adb shell
su
mount -o remount,rw /dev/block/mtdblock3 /system
dd if=/sdcard/busybox of=/system/bin/busybox
chmod 4755 /system/bin/busybox
mount -o remount,ro /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
Sorry for the newb question but... where do I type this stuff?
jpmi23 said:
Sorry for the newb question but... where do I type this stuff?
Click to expand...
Click to collapse
on a command line on your pc. this is not the right place to start for you, get a guide on how to setup adb on your pc first.
Wow. "abd". That's a new term now isn't it.
Ok. I'll skip it. Just looking to control my Samsung Moment on my PC like I was able to with my WM phones.
I'll keep looking around. Thanks for the help.

[Q] OPENVPN Wolfbreak CM 6.1.3 V5 problem

ok..so ive recently flash my X10i stock 2.1 eclair to Wolfbreak CM 6.1.3 v5
and im having problems regarding my Openvpn settings.
**cant check my config files
so what i did is to follow the old thread regarding the old openvpn settings for eclair and issue this following command on terminal emulator
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
busybox insmod /sdcard/openvpn/tun.ko
busybox cp /sdcard/openvpn/openvpn /system/xbin/openvpn
busybox cp /sdcard/openvpn/openvpn /system/xbin/tun.ko
chmod 700 /system/xbin/openvpn
mkdir /system/xbin/bb
busybox ln -s /system/bin/busybox /system/xbin/bb/ifconfig
busybox ln -s /system/bin/busybox /system/xbin/bb/route
busybox mount -o remount,rw /dev/block/mtdblock2 /system
busybox cp /sdcard/openvpn/chargemon /system/bin/chargemon
busybox cp /sdcard/openvpn/busybox /system/bin/busybox
reboot
Click to expand...
Click to collapse
then my X10i will reboot and will start acting up. Force close keeps on popping and the device will automatically restart.
ive used those command when i used 2.1 eclair before and everything is working fine.
if anyone could enlighten me about this will be a great help.
also if you need other info, you can pm me or reply to my post.
this is my old working settings when i used eclair.
1.rooting my phone
2.install busy box
3.install terminal emulator
4.install openvpn application
5.install openvpn settings
6. issue this command in terminal
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
busybox insmod /sdcard/openvpn/tun.ko
busybox cp /sdcard/openvpn/openvpn /system/xbin/openvpn
busybox cp /sdcard/openvpn/openvpn /system/xbin/tun.ko
chmod 700 /system/xbin/openvpn
mkdir /system/xbin/bb
busybox ln -s /system/bin/busybox /system/xbin/bb/ifconfig
busybox ln -s /system/bin/busybox /system/xbin/bb/route
busybox mount -o remount,rw /dev/block/mtdblock2 /system
busybox cp /sdcard/openvpn/chargemon /system/bin/chargemon
busybox cp /sdcard/openvpn/busybox /system/bin/busybox
reboot
Click to expand...
Click to collapse
7.open the config file and wait for it to connect.
but those above mention steps doesnt work anymore in 2.2 froyo cm 6.1.3 of wolfbreak
tried it and my phone starts acting up.
reflash again, this time openvpn settings is the only application i installed because as far as i know, wolfbreak custom rom is already been rooted and includes busy box and openvpn application but no luck..
help please.
Hi There!
I think you've followed my old thread so i've made this very same codes work on every Froyo Modded ROM... Wolfbreak already have the openvpn binary installed in /system/xbin so you'll have to do 1 extra step.
1.- Open Terminal Emulator and issue this comand
Code:
rm -r /system/xbin/openvpn
mkdir /system/xbin/bb
ln -s /system/bin/busybox /system/xbin/bb/ifconfig
ln -s /system/bin/busybox /system/xbin/bb/route
cp /sdcard/openvpn/tun.ko /system/lib/modules/tun.ko
chmod 644 /system/lib/modules/tun.ko
2.- Download OpenVPN installer from Market (Free)
3.- Click on Install and choose the following options and you'll see two screens:
3.1 - In the first one choose "/system/xbin"
3.2 - In the Second one choose "System/xbin/bb"
4.- Go to OpenVPN settings and go to Advanced>TUN module Settings>Path to tun module> This should be /system/lib/modules/tun.ko
5.- Choose your OpenVPN configuration and you'll be done.
Report back if this helps... At least i've test it in the following ROMS:
* Trip's MIUI Roms
* Wolf's CM Roms (all Variants)
* Zdizihu's Free X10
* Jerpelea's CM 7 GB Roms
thanks mate for the reply,
anyway, i somehow manage to fix the above mention problem and somehow got my config file to get connected using the above post.
but everytime it get connected, a lot of errors occur.
1.force closed.... .....
2.linux....error....... .....fork error...
i cant remember the whole error message because it only pops up for a bit.
tried to reflash twice but to no avail, same results hapen.
so i gave up and flash back to 2.1 kx10 aosp and everything is working again..

[SOLVED] OpenVPN on SGSII?

Hi,
I was wondering if OpenVPN is supported out of the box and if not, is there a possibility to make it work?
Searched the forum but couldn't find any specific info..
thanks in advance!
EDIT:
I created an update.zip which is posted in this thread
Not supported out of the box... it's baked into CM7 but obviously that's a custom rom! There's OpenVPN apps on the market but they require a rooted device. The one I've found to work the best was OpenVPN Settings (not the SGS2) but it requires the openvpn binary to be installed somehow first...
I'm using OpenVPN Settings on a CM based rom now (HTC Hero) From what I remember it needs tun.ko support in the kernel
Don't know if the default kernel has this..
Sent from my HTC Hero using Tapatalk
I had rooted my gs2 and installed openvpn binary, openvpn settings works.
but always see "FATAL: Linux ifconfig failed: could not execute external program".
Who can tell me why?
I remember I had the same issue a long time back before I was using CM based roms
Can't remember what but will try to look it up this weekend as I'm curious about the result
really need OpenVPN wheb I get my SGSII
Sent from my HTC Hero using Tapatalk
tux
Sent from my Nexus One
diesiren said:
ifconfig failed: could not execute external program
Click to expand...
Click to collapse
this seems to mean that OpenVPN is looking for ifconfig in the wrong place
you should connect your phone through usb and start adb shell
then type (change openvpn.conf to the conf file you are using)
Code:
openvpn --config /sdcard/openvpn/openvpn.conf
if you launch the command above there will some messages in the shell window
you should look for ifconfig
/system/xbin/bb/ifconfig tap0 192.168.1.40 netmask 255.255.255.0 mtu 1500 broadcast 192.168.1.255
Click to expand...
Click to collapse
now you know the path where OpenVPN is looking for ifconfig and where it can't find it (/system/xbin/bb/ifconfig)
now type the command below to locate where ifconfig is on your rom
Code:
which ifconfig
this could be for example
/system/xbin/ifconfig
Click to expand...
Click to collapse
now type the commands below in adb shell (ln -s <correct path> <incorrect path>)
Code:
cd /system/xbin
ln -s /system/xbin /system/xbin/bb
this will create a correct link for ifconfig and route commands
I have not tested it myself as I flashed a CM rom shortly after
but if you replace the values with your values it should work fine and not do any harm
if you get it to work could you please let me know?
thanks!
S2 is not in my hand right now. I'll try it tomorrow and thank you very much.
Sent from my Nexus One
OpenVPN works fine now and thx Gawis!!
This is my steps
1. Flashing Firmware with Odin (guide)
2. Root My S2, and busybox installed with SuperOneClick (guide)
3. Download OpenVPN File download and extract
4. Use adb tools
Code:
adb remount
adb push openvpn-static-2.1.1 /system/xbin/openvpn
adb shell
# chmod 775 /system/xbin/openvpn
# mkdir /system/xbin/bb
# ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
# ln -s /system/xbin/busybox /system/xbin/bb/route
5. Download and install OpenVPN Settings From Android Market
6. Upload My config files to USBstorage.The path is /sdcard/openvpn/
7. Flashing StockKernel with Odin (guide)
over~
Sorry for my poor English~
Hi diesiren,
thanks for confirming and putting up the guide!
I'm really glad it works, hope to have my phone nex week or the week after and will try this one myself then!
diesiren said:
Code:
adb remount
adb push openvpn-static-2.1.1 /system/xbin/openvpn
adb shell
# chmod 775 /system/xbin/openvpn
# mkdir /system/xbin/bb
# ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
# ln -s /system/xbin/busybox /system/xbin/bb/route
Click to expand...
Click to collapse
I just got my OpenVPN working on my SGSII!
I just rooted it with CF-Root 3.7 and then pushed the openvpn binary and executed the commands you posted
thanks for the guide!
I'm having problems getting openVPN to work.
I have adb pushed openvpn-static-2.1.1 to system/xbin already.
But when i adb shell, the result is "sh:applet not found"
I am 100% I am rooted. I am running root explorer, titanium backup, have busybox installed, and superuser.
Any advice would be extremely helpful.
Thanks!
Hmmm, haven't experienced any issues like that with adb yet so can't comment on that...
I created an update.zip for the whole thing a few days ago...
Are you running a custom rom? If so which one?
Am planning to post the update.zip here later...
I tested it with Cognition and CM7...
Sent from my GT-I9100 using Tapatalk
I just uploaded the update.zip in this thread
Gawis said:
Hmmm, haven't experienced any issues like that with adb yet so can't comment on that...
I created an update.zip for the whole thing a few days ago...
Are you running a custom rom? If so which one?
Am planning to post the update.zip here later...
I tested it with Cognition and CM7...
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
I'm on Exynos v3.6 ROM.
I saw your thread. Thanks for the zip, bro. Very much appreciated.
Thanks for the help! I found that I had to first remount in read/write mode the /system directory as mine was read-only.
Ran the code below to do this:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Hey...
I have a similar issue. My SGS2 already is connected to the openVPN but i can't connect to an other client at the vpn. So no Ping, no tracerroute or (most important) telnet connection. I think it might be something about the routing but I don't find a hint on any forum.

[SOLVED] "sh: applet not found" after BusyBox install

Background: On a rooted device, I installed busybox via the BusyBox Pro app, with the "symlinks" option checked. Afterwards, wifi stopped working, root stopped working, adb stopped working, and a lot of tasks started failing with "sh: applet not found".
The problem: BusyBox Pro 8.0 replaces /system/bin/ash with a symlink to busybox. This was problematic on my device, where /system/bin/sh was a symlink to ash, so now 'sh' is actually calling busybox, and this particular compilation of busybox didn't have 'sh' support compiled in, hence the "sh: applet not found" error everytime anything tried to call sh, which as it happens, is a lot! The bug was fixed quickly with a 8.1 release, but due to suspected caching policies on the Google Store, a lot of people still got the old release even after this was fixed!
Here's how I fixed this:
Prerequisite: You'll need a replacement sh binary. On another device, which was also an ARM device, sh was symlinked to 'mksh', and I just took this. You might want to verify that the binary works on your broken device before completing the final steps below.
Initial Wifi
It's only DHCP that is failing (on the "Obtaining IP address..." step), so go into your Wifi Settings, forget the network, add it again, and change DHCP to "static", manually fill in the appropriate IP info for your network, and you'll be good to go (encrypted network is fine).
Getting a Root terminal
Download KBOX from http://kevinboone.net/kbox.html
In KBox, menu -> more -> preferences, change shell -> "command line" to "/system/bin/ash"
su -s /system/bin/ash
Remounting /system as RW
In theory, all you should need to do is: busybox mount -o remount,rw /system
This didn't work for me, and I got a "permission denied (are you root)" error, I guess because the system was no longer booting properly. I had to redo some of the steps involved in rooting my device, in my case:
On phone:
mkdir /data/local/lib
echo ro.kernel.qemu=1 > /data/local.prop
reboot
(wait for reboot, and get into a root terminal again as per the above)
On PC (from previous files used for rooting my device):
adb push lsm_disabler.ko /data/local/lib/
Oh phone:
insmod /data/local/lib/lsm_disabler.ko
rm /data/local/lib/lsm_disabler.ko
cat > /data/local.prop
From this point, I was able to remount successfully:
mount -o remount,rw /system
Fixing sh
Now on your PC, push the replacement binary to /system/bin, in my case:
adb push mksh /system/bin
On phone:
cd /system/bin
busybox ln -sf sh mksh
Verify now that "./sh" gives you a working terminal.
If all is good:
mount -o remount,ro /system
reboot
All done! Wow, this saved me sending my device back to Japan, since it's still using the stock bootloader and there are now available update.zip's out there. Good luck everyone, feel free to ask questions :>
P.S. I'm going to contact BusyBox Pro's author now with some suggestions to prevent these kind of problems happening in the future.
Deleted.
Deleted.
I rant into the same problem on my Galaxy Tab. Thanks for this, it saved my day!
A little correction to this little thing:
Kinslayer81 said:
On phone:
cd /system/bin
busybox ln -sf sh mksh
Click to expand...
Click to collapse
This worked for me:
cd /system/bin
ln -sf mksh sh
chmod 755 sh
Thank you
Just want to say thanks.
Your Posting helped me out with the Problems on my htc flyer.
I installed BusyBox Pro by Stephen (Stericson) to fix a missing symlinks problem that I had after installing JRummy's Busy Box. I then encountered the applet not found problem and then just reinstalled JRummy's version and it fixed it without having to do anything else.
Kinslayer81 said:
Background: On a rooted device, I installed busybox via the BusyBox Pro app, with the "symlinks" option checked. Afterwards, wifi stopped working, root stopped working, adb stopped working, and a lot of tasks started failing with "sh: applet not found".
The problem: BusyBox Pro 8.0 replaces /system/bin/ash with a symlink to busybox. This was problematic on my device, where /system/bin/sh was a symlink to ash, so now 'sh' is actually calling busybox, and this particular compilation of busybox didn't have 'sh' support compiled in, hence the "sh: applet not found" error everytime anything tried to call sh, which as it happens, is a lot! The bug was fixed quickly with a 8.1 release, but due to suspected caching policies on the Google Store, a lot of people still got the old release even after this was fixed!
Here's how I fixed this:
Prerequisite: You'll need a replacement sh binary. On another device, which was also an ARM device, sh was symlinked to 'mksh', and I just took this. You might want to verify that the binary works on your broken device before completing the final steps below.
Initial Wifi
It's only DHCP that is failing (on the "Obtaining IP address..." step), so go into your Wifi Settings, forget the network, add it again, and change DHCP to "static", manually fill in the appropriate IP info for your network, and you'll be good to go (encrypted network is fine).
Getting a Root terminal
Download KBOX from http://kevinboone.net/kbox.html
In KBox, menu -> more -> preferences, change shell -> "command line" to "/system/bin/ash"
su -s /system/bin/ash
Remounting /system as RW
In theory, all you should need to do is: busybox mount -o remount,rw /system
This didn't work for me, and I got a "permission denied (are you root)" error, I guess because the system was no longer booting properly. I had to redo some of the steps involved in rooting my device, in my case:
On phone:
mkdir /data/local/lib
echo ro.kernel.qemu=1 > /data/local.prop
reboot
(wait for reboot, and get into a root terminal again as per the above)
On PC (from previous files used for rooting my device):
adb push lsm_disabler.ko /data/local/lib/
Oh phone:
insmod /data/local/lib/lsm_disabler.ko
rm /data/local/lib/lsm_disabler.ko
cat > /data/local.prop
From this point, I was able to remount successfully:
mount -o remount,rw /system
Fixing sh
Now on your PC, push the replacement binary to /system/bin, in my case:
adb push mksh /system/bin
On phone:
cd /system/bin
busybox ln -sf sh mksh
Verify now that "./sh" gives you a working terminal.
If all is good:
mount -o remount,ro /system
reboot
All done! Wow, this saved me sending my device back to Japan, since it's still using the stock bootloader and there are now available update.zip's out there. Good luck everyone, feel free to ask questions :>
P.S. I'm going to contact BusyBox Pro's author now with some suggestions to prevent these kind of problems happening in the future.
Click to expand...
Click to collapse
This helped get my wifi back after flashing a kernel.
Hey there,
I've got the same problem.
After reinstalling the ROM everything works fine,
but when I try to install busybox, I get the same failure everytimes.
How can I prevent it?
Do I have to follow the steps above?
And where do I get the sh binary from?
Sorry guys, I'm a little confused and hope you may help me..
Thanks!!
Kbox not open in my ics when I open it its automatically closed
And i want to ask the script su -s /system/bin/ash where i put this script

How can I run 3 lines of code after Boot (to mount a network share)

Hi,
I've got a Probox2 AndroidTV box on Marshmallow.
I would like to mount a remote NFS share into it's filesystem, so that the share is accessible to all apps (I've disabled mountspace in SuperSU).
I can do this via terminal or SSH using the following 3 lines
Code:
su busybox mkdir -p /mnt/nfs/roms
su busybox chmod 777 /mnt/nfs
su --mount-master -c busybox mount -o rw,nolock,hard,intr,vers=3 -t nfs x.x.x.x:/mnt/Roms /mnt/nfs/roms
This works well and my Apps can find the network shares.
However I would like this be mounted automatically at every boot...
I've tried ScriptManager with this as the script
Code:
#!/system//bin/sh
su busybox mkdir -p /mnt/nfs/roms
su busybox chmod 777 /mnt/nfs
su --mount-master -c busybox mount -o rw,nolock,hard,intr,vers=3 -t nfs x.x.x.x:/mnt/Roms /mnt/nfs/roms
The script doesn't work from script manager or cli. (I know nothing about scripting).
I'm unsure how to go about getting it run/work....
Please could someone explain to me how to get those lines to run after boot or how to fix the script...
Thanks

Categories

Resources