[SOLVED] OpenVPN on SGSII? - Galaxy S II Q&A, Help & Troubleshooting

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.

Related

[Q] tun.ko and vpn for Dell Streak

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 ?

[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..

How to install OpenVPN on GT 10.1

Hi everyone,
I tried to gather some information to install OpenVPN on the Galaxy Tab 10.1, but could not complete the install.
I already installed successfully OpenVPN Installer, BusyBox Installer, OpenVPN Settings, copied tun.ko to modules folder (/system/lib/modules).
I ran those commands (first had read only errors but eventually succeeded with adb console) :
insmod /modules/tun.ko
ln -s /system/bin/busybox/system/xbins/bb/ route
ln -s /system/bin/busybox/system/xbins/bb/ ifconfig
Then, when i launch OpenVPN Settings, it starts connecting but finally says "FATAL: Linux ifconfig failed, could not start external program".
Anybody could tell me how to do it properly? Is it even possible on the Galaxy Tab 10.1?
Many thanks!!!
I'm about to try it right now, I have ovpn running on my galaxy s, just going to create certificates for my tablet, and copy the config across and see if it works.
I believe the default kernel includes tun support.. or so I have been told.. will find out I guess.
Thanks! Keep me updated please.
Anyone able to make progress on getting openvpn working?
Hi. I just wanted to add that if anyone have any more info on openvpn and tun.ko for the gt-7100 that i too would be greatful.
Vissie
I have openvpn working. I installed busybox installer, openvpn and openvpn settings from the market place.
I Used root explorer and made the directory /system/xbin/bb. I also used root explorer to make this directory read/write. Then I used a terminal app to do
Su
ln -s /system/xbin/route /system/xbin/bb/route
ln -s /system/xbin/ifconfig /system/xbin/bb/ifconfig
after this make the directory read only. In openvpn settings point tun.ko path to
/data/media/openvpn/openvpn/tun.ko
add your config and that should do it
i still can't connect
Well when i comment
iproute /data/local/bin/iproute-wrapper.sh
Click to expand...
Click to collapse
openvpn connects but i cant browse my local lan
when i uncomment this line nothing happens when i try to connect
what did i missed?
one more question - im using ccd folders with different push commands on my vpn server - this doesnt seem to work aswell.
Anyone could post stepby step iproute configuration for our devices?
thanks
Wojtek
I've been trying again and again.
I always get "FATAL: Linux ifconfig failed, could not start external program".
Anyone could post a complete tutorial ?
Thanks.
I did it!!!
I installed OpenVPN Installer, BusyBox Installer, OpenVPN Settings, copied tun.ko to modules folder (/system/lib/modules), then copied the configuration files of my VPN (ca.crt and client.ovpn) to /sdcard/openvpn.
I ran those commands with adb tools :
mount -o remount,rw /system
insmod /modules/tun.ko
mkdir /system/xbin/bb
ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
ln -s /system/xbin/busybox /system/xbin/bb/route
In the advanced settings of OpenVPN Settings, the path to tun module is "/system/lib/modules/tu", the path to configurations is "/sdcard/openvpn" and the path to openvpn binary is "/system/xbin/openvpn".
Then i launched OpenVPN Settings, entered the username and password and it connected.
I hope it can help...
Which kernel are you using -- stock or ??
I'm running the stock kernel.
can you please tell me......
armavista said:
I installed OpenVPN Installer, BusyBox Installer, OpenVPN Settings, copied tun.ko to modules folder (/system/lib/modules), then copied the configuration files of my VPN (ca.crt and client.ovpn) to /sdcard/openvpn.
I ran those commands with adb tools :
mount -o remount,rw /system
insmod /modules/tun.ko
mkdir /system/xbin/bb
ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
ln -s /system/xbin/busybox /system/xbin/bb/route
In the advanced settings of OpenVPN Settings, the path to tun module is "/system/lib/modules/tu", the path to configurations is "/sdcard/openvpn" and the path to openvpn binary is "/system/xbin/openvpn".
Then i launched OpenVPN Settings, entered the username and password and it connected.
I hope it can help...
Click to expand...
Click to collapse
You said you run stock kernel, but what rom are you on: kmb, kme?
Also, can you please point me to the tun.ko file or a pointer of where I can get it.(the one that you have working)
Much thanks.
The version of my kernel is [email protected] #1.
ROM : HMJ37.UEKF3 P7510UEKF3
I attached the tun.ko file i used for you.
Keep me updated...
I managed to make openvpn work.
I am using openvpn setting software.
For galaxy tab 10.1, the openvpn binary and the associated lib liblzo.so is missing, so you just need to copy those two files from , say cm7 sources.
Simply download the attachment and extract it, there are two files:
openvpn : copy it to /system/xbin/openvpn ( don't forget chmod 755 to it )
liblzo.so: copy it to /system/lib/liblzo.so ( don't forget chmod 644 to it )
I have tested it on my galaxy tab 10.1 P7510, works great.
Hoping this would help.
Sorry to mention, i am using starburst kernel which already have tun support in the kernel.
For stock kernel, maybe you need to have matched tun.ko copied from elsewhere.
I get this message
[email protected]:/ # insmod /modules/tun.ko
insmod: can't open '/modules/tun.ko
I pushed tun.ko to /system/lib/modules via adb , though I cant see it with root explorer
If it's there tou should be able to see it with root explorer
I run GT-P7500, Kernel 2.6.36.3, [email protected] #1, buildnr HMJ37 P7500XXWKG9, baseband XXKG7, ).
I have seen statements that there is no tun.ko in the kernel and the available versions of tun.ko do not work with the 3.1 Honeycomb kernel, I have.
I do not have a folder called modules under /system/lib, shall I create one.
The directory modules I have is /lib/modules/...
insmode did not work.
I run openvpn from the shell and it stops after establishing the TCP connection, this is just before establishing the tun...clearly I am still missing the tun.
Does anyone else experienced same problem or have a solution?
Hi I'm having a nightmare trying to get openvpn installed.
When I do the insmod /modules/tun.ko i get
the following
[email protected]:/ # insmod /modules/tun.ko
insmod: can't open '/modules/tun.ko'
255|[email protected]:/ #
any idea what I'm doing wrong
Hey everybody.
I also have some problem with openvpn connection.
At first i turn on openvpn the start the configuration (at the same time i started a ping on my server: ping 300.300.300.300 -t)
After that my ping works for 12 - 14 times. After the 12 + 14 times then it shows "out of time" error message.
What have i done wrong? (Every 5 seconds at the bottom of my tab it shows "myvpn.openvpn: Connected"
Preferences:
Samsung Galaxy Tab 10.1 Rooted
Android 3.1
Newest Busybox
Done everything from the tutorial of this topic
Update: When i turn the tun module on then the ping only works for about 9 times.
After about 20 failed pings, the pink works again for the amount i wrote.

[Q] New Tutorial for OPENvpn?

hi there..is there a thread for new tutorial for installing openvpn for the gingerbread?
i already tried the search button but theres such no topic except for jimbo..which is kinda outdated..im a bit skeptic asking him because he no longer possess an x10.?
i tried to issue this command on TE
su
mkdir /system/xbin/bb
ln -s /system/bin/busybox /system/xbin/bb/ifconfig
ln -s /system/bin/busybox /system/xbin/bb/route
Click to expand...
Click to collapse
but the openvpn settings wont let me select any of my OVPN files..?
thanks.
forget it..
already figured it out..

[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

Categories

Resources