yashsingh1/xdaforums huggingface dataset:
[EVO 4G Q&A, Help & Troubleshooting] phsteve:
Since I updated to 3.29.651.5, the Sense widgets (Friendstream, Calendar, Bookmarks etc) have a strange problem where there is a static translucent image of the widget text/picture/calendar and then when I scroll down the text scrolls normally but the translucent image of the original text stays put. It's kind of hard to describe... Basically the widget looks and behaves normally except there is a translucent static image of the text (or images or calendar) behind it. What could be causing this? Any ideas of how to fix this?

I have a rooted, (mostly) stock EVO that I just updated to 3.29.651.5. I used the method (described here and at androidcentral) of manually downloading the stock update, rebooting into ClockworkMod recovery and loading it from there, and then used unrevoked to re-root the phone. I've been able to use all my root apps since then with no problems.
[EVO 4G Q&A, Help & Troubleshooting] snood123:
mine did this too then i realized there where two widgets on top of each other.
[EVO 4G Q&A, Help & Troubleshooting] phsteve:
You're exactly right! In fact all of the icons are doubled as well as the widgets. I just manually deleted the entire top "layer" of my icons and widgets. Problem solved but i'm still baffled....

Could this be a problem with Titanium Backup? I had to use it to restore some system data since I reverted to a week old nandroid backup to resolve an error while applying the new update.
[Galaxy S I9000 Android Development] newmail:
NOTE: there is no guarantee this will work, because without access to the corresponding kernel source I can't be sure. It may wipe out your device if there's memory corruption! You're warned, use it only at your risk!!

Over the last weekend I wanted to familiarize with the arm assembly, buildsystem, SDK so I created a tun.ko module for kernel running in the JPK ROM. But lots of the time was also wasted trying to guess their config (things like disabled DMABOUNCE and removal of the dummy they added in 2.6.29 from struct net_device, I hope I got it all right).

I encourage to release the kernel source along with the ROM images in the future (it'd be much simpler if there was a git tree that they can just tag with the name of the ROM), and to include the tun device into the modules/tun/tun.c (as in the tarball) so that it is included by default in the future. I won't be doing this process again.

I had to install openvpn with the openvpn installer a second time with openvpn in xbin, busybox in xbin/bb and I created the bb directory and two symlinks from xbin/bb/{ifconfig,route} to xbin/busybox (after mounting /system rw). The DNS to change during VPN must be set by long pressing on the left of the openvpn config slot in the OpenVPN settings GUI.

The tun.ko I keep it in /sdcard/openvpn/tun.ko and the path has to be configured in the openvpn settings advanced settings menu and I choose to load it with insmod.

This JPK rom works great for me, so I'll likely keep using it for a long while now that I've got openvpn running fine.

252ae6e655fa08774f32f67dd76dad3a tun.ko

EDIT: the same tun.ko module works for JPM too
[Galaxy S I9000 Android Development] captive:
Great job!!!

I use vpnc daily, so I couldn't even think to upgrade to JPK without an available tun module.. now I can! :)

Would you share your .config, so other devs can use it? Maybe we can hope in a Froyo-voodoo in a short time..
[Galaxy S I9000 Android Development] mathieumeuh:
I'm confirming that it works.

Here is how I did it (I garantee that THIS IS NOT THE MOST ELEGANT WAY to make it work)

Install Openvpn from Openvpn Installer

openvpn in /system/xbin

route and ifconfig in /system/bin

At this point, Openvpn could connect and create a tun device, but route are not pushed so it's not very usefull

So, I downloaded this version of Openvpn

http://github.com/downloads/fries/android-external-openvpn/openvpn-static-2.1.1.bz2

As superuser

su

I remounted in rw /system

mount -o remount,rw /system

I renamed /system/xbin/openvpn into openvpn_old

mv /system/xbin/openvpn /system/xbin/openvpn_old

I put that new openvpn binary in /system/xbin

I created symlinks from /system/bin/route and ifconfig to /system/xbin

ln -s /system/bin/route /system/xbin/route
ln -s /system/bin/ifconfig /system/xbin/ifconfig

I also created a symlink os /system/xbin to /system/xbin/bb, just in case

ln -s /system/xbin /system/xbin/bb

Here we go :)
[Galaxy S I9000 Android Development] kanemari:
+1

i tried to complie cifs.ko and tun.ko for the JPC kernel and couldnt get it to work. i ultimately went back to eclair because of this so would like to be able to compile modules and other filesystem support.

thanks.
[Galaxy S I9000 Android Development] newmail:
config attached, but the config is not enough and it may not be fully correct (it is enough as far as the data structures used by tun.ko are concerned, I checked them all against the zImage assembly). The diff of the v2.1 image, has to be applied too but with DMABOUNCE removed from Kconfig of the subarch of the galaxy as far as I can tell and the placeholder added to struct net_device in their v2.1 diff, has to be removed too. cifs.ko may be more complicated than tun, good luck. Unless you've personal interest to familiarize with the enviroment and the arm assmbly like I had, I would wait the source to released, it has to be released eventually to comply with the GPLv2.
[Galaxy S I9000 Android Development] foloap:
Thankyou Newmail!!

I've tryed VPNC 0.99 and works great!!

You have only to type from terminal: insmod /system/folder/tun.ko

After that you can use VPNC...

I've found an issue with the FQDN of the VPN gateway... solved setting the IP address ;)

Just a question:

when I'll update my JPK.. what I have to do to recompile the tun.ko?

Can you write here the procedure?

Cheers

Paolo
[Galaxy S I9000 Android Development] raven-au:
OK, but is the placeholder field at the end of the net_device struct?

If so it shouldn't matter and a module cross compiled from the 2.6.29 source should be OK. The absence of DMABOUNCE shouldn't matter for tun.ko either.

In theory you should be able to clone the AOSP git kernel repo and use that kernel for building a module, as long as the module itself doesn't actually use changes that have been made by Samsung (unlikely).

The .config used probably does deserve some attention though, as you have done.
[Galaxy S I9000 Android Development] newmail:
Glad it works great for you too. So the tun.ko has to be recompiled if they alter .config. It may work but it's not guaranteed. The procedure is nasty and hard to document and I don't have enough time for that sorry. But I'm sure we'll get the source when there will be an official Froyo release that is shipped to all phones so I wouldn't worry.
[Galaxy S I9000 Android Development] newmail:
The .config is the fundamental part, and it may be enough I'm not sure. There was a placeholder was a samsung customization done in the middle of net_device and that was removed in the Froyo ROM (initially I applied it). the DMABOUNCE removal affects the struct device that is part of net_device so a lot of stuff goes off by 4 bytes by tweaking that arch config option. That gets set in some Kconfig patched in by samsung. You're right that probably tun isn't affected by the DMABOUNCE but I tried to get the net_device size right (just in case) and it may affect other net modules.
[Galaxy S I9000 Android Development] bdl1969:
Hi newmail, thanks so much for the tun.ko file, this is the first time I've managed to get VPNC working on my SGS!! One question though, I find I'm having to run insmod everytime I reboot the phone to make tun.ko available again, does anyone know if there's a way around this please so it stays permanently available? Many thanks!!
[Galaxy S I9000 Android Development] captive:
@bdl1969

I made a subdir in /system/lib called "modules" and placed my tun.ko there.

Now it's insmodded automagically.. :)
[Galaxy S I9000 Android Development] raven-au:
Oh crap, that is bad news.

Then both the DMABOUNCE and the net_device are likely a problem.

That's a stupid way of doing things.
[Galaxy S I9000 Android Development] newmail:
The smart way of doing things I already mentioned in the first post (public git tree tagged at every ROM release :).
[Galaxy S I9000 Android Development] newmail:
hmm I tried and it didn't work for me... are you sure? openvpn GUI runs insmod for me so it's no big deal.
[Galaxy S I9000 Android Development] bdl1969:
That worked great for me, thanks for the suggestion! The only problem I found was that it caused my Good for Enterprise app to crash so I uninstalled and reinstalled it and then it was all fine. Only problem I'm left with now is when using VPNC, I make the VPN connection fine but I can't disconnect via the app, I have to bounce the network connection (eg. toggle WiFi) to drop the tunnel!
[Galaxy S I9000 Android Development] sztupy:
I compiled tun.ko using the 2.6.32 kernel from android git and your .config, but it won't load with dmesg saying "Unknown symbol mem_map". May I ask which kernel version did you use, and what arm toolchain are you using?
[Galaxy S I9000 Android Development] newmail:
Probably you have discontigmem off in the .config. The platform of the galaxy isn't in the android kernel, it's in arch/arm/plat-s5pc11x (it's the thing that sets DMABOUNCE in v2.1 roms and I guess it doesn't on the JPK kernel).

You need to make a diff between android 2.6.29 and their tree, and apply it to the 2.6.32 kernel, then you need to solve enough rejects so that it can build external module. I didn't port the whole diff of course, just enough so make can start with the headers and .config all right. Then I built the module externally (adding the tun/ directory to their modules/ directory) but it should also work with just make modules setting CONFIG_TUN=m if you want to build it in-tree.

It's a bit tricky.. If you really need I can give you the broken diff to apply to the 2.6.32.9 android kernel. That is enough to build some module including tun.ko :)
[Galaxy S I9000 Android Development] sztupy:
It'd be great. I've already tried to do the patching. It compiles, but crashes the phone when loaded. Maybe your version is a bit better.
[Galaxy S I9000 Android Development] newmail:
Did you find the source now that JPM has been released officially with Kies? I upgraded to JPM now, in the hope we get the source....

BTW, my tun.ko and my rfs_async.ko also works fine on JPM. I don't know about my ext4 build but I assume that will work too.

I used one CSC of this thread http://xdaforums.com/showthread.php?t=802909 and I deleted the KOR /efs/nv_data* created by the JPK ROM (leaving the .nv_data.bak*). So with this combination of CSC from that thread, and MODEM and PDA from the JPM rar, I apparently restored the original product_id (SGSToolbox also says I'm back to the original product_id). Not that product_id matters but I thought I'd try that next time I flashed and apparently it worked fine...
[Galaxy S I9000 Android Development] sztupy:
The JPM source was avialable for a few hours on the samsung's site, did grap it. You can find it on megaupload somewhere. I couldn't manage to compile a working module from that source either (it now loads fine, but does a kernel panic when I try to mount a loop device formatted with ext4), but I'm sure that's my fault.
[Galaxy S I9000 Android Development] achiles01:
hello, im newbee in android and openvpn, so i need some help.

when i tray connect thought "OpenVPN Settings app" to my server, is displayed: (status Get Config) "FATAL:Cannot allocate TUN/TAP dev dynamically" and then disconnect.

in openvpn server log is this (so that a connection is present):

-------------------------------------------------------------------------------------

Oct 17 02:09:34 openvpn openvpn[936]: xxx.xxx.xxx.xxx:41580 Re-using SSL/TLS context

Oct 17 02:09:34 openvpn openvpn[936]: xxx.xxx.xxx.xxx:41580 LZO compression initialized

Oct 17 02:09:35 openvpn openvpn[936]: xxx.xxx.xxx.xxx:41580 [openvpn-all-xxx] Peer Connection Initiated with xxx.xxx.xxx.xxx:41580

Oct 17 02:09:35 openvpn openvpn[936]: MULTI: no dynamic or static remote --ifconfig address is available for openvpn-all-xxx/xxx.xxx.xxx.xxx:41580

-------------------------------------------------------------------------------------

my config:

--------------------------------------

client

dev tap

proto udp

remote xxx.xxx.xxx.xxx 1194

;remote-random

resolv-retry infinite

nobind

ca cacert.pem

cert openvpn-all-xxx.pem

key openvpn-all-xxx.key

comp-lzo

verb 3

--------------------------------------

IP address and route is not pushing from server, so, i must it set somehow manually, but i dont know how. may be a problem that has no IP address is now set anywhere?

sorry for my english :]
[Galaxy S I9000 Android Development] newmail:
why no "ns-cert-type server"? Otherwise you can still get a man in the middle... :)

I never used tap, only tun... no point to use tap unless you use legacy protocols that requires broadcast.... if you don't use broadcast/bridiging it just increases traffic on your vpn connection for no good.
[Galaxy S I9000 Android Development] newmail:
Still not there it seems.

Unfortunately my idea to specify my modem/csc while flashing JPM to fixup product_id didn't work out very well... well there was just one defect in not showing the dBm signal asc levels in the phone status and I didn't like that. So I had to re-flash only with PDA. PDA seems to contain its own modem and it seems not to require CSC as it installs multi CSC (unfortunately none of those CSC matches my original product_id). I didn't want to mess further for something I considering utterly useless, and so I let it go with the KOR thing, and this time it converted back my nv_data.bin to KOR but without generating .nv_data.bak with my original product_id. I guess they stopped creating the backup because efs gets full pretty quick and I guess if it gets full and backup fails you get no imei and some people would get into trouble in trying to fix it... Not creating backup anymore sounds good. I've old backup anyway of nv_data.bin/nv_data.bin.md5 that has my original product id, just in case I need it (even the version named nv_data.bin as the hash seems to be in function of the filename too, so renaming those files is not ok, it must be renamed by the boot process).

So after the second flash with embedded modem.bin and multicsc shipped with JPM, I started fixing up /system to fit my needs (fill /system/etc/hosts to stop risk of unauthorized info leak to data.flurry.com etc...), root, rfs_async_unsafe.ko to remove the lag and make k9 usable, etc.... I got corruption in the /system/xbin/bb directory because probably I rebooted the phone without remounting /system readonly! So I had to flash JPM a third time, this time apparently I lost nothing and it only replaced /system, so I adjusted /system once again my way, and after reinstalling the few apps that needed to modify /system it seems everything is fine without deleting /data... product_id remained KOR and nv_data.bin was again the same after the third flash. It's very annoying not to have a fsck for rfs, that requires recreating the fs in case of corruption.

So apparently the flashing doesn't touch /data at all, the only thing that changed was the desktop and the application list order (and of course it brought back /system to the original post-flash state which is exactly what I needed as the /system/xbin/bb directory was corrupted!).

About your rom, I guess you can convert efs to ext4 too without much issues. I'd recommend using ext4 not ext2 for your native rom, native rom with ext4 is the way to go... DB people don't publish benchmark with ACID guarantees of the database off or without journaling in the filesystem where the db logs are stored :), I doubt you can feel much difference between ext2 and ext4 even if surely quadrant will be showing a lower score. But we're comparing apples to oranges, the nexus one numbers don't turn off the metadata journaling!
[Galaxy S I9000 Android Development] achiles01:
hi, so problem has been resolved. i have android 2.1, so i installed wrong tun.ko file (for 2.2 from this thread). now is everything working OK :]
[Galaxy S I9000 Android Development] giovannivl:
hi, i know that this thread is not the correct for my questions, somebody can help me with the correct, i'm trying to find the correct thread related to openvpn on a 2.1...but the search doesn't give me someone related...
[Galaxy S I9000 Android Development] kanemari:
i know the thread is for JPK, but has anyone got this working on JP6?

i had it working on 2.1 JM8 but the same settings and links dont seem to work on JP6. have tried the settings in the first page post as well.

the tun.ko loads ok, but openvpn aborts before really thinking about starting a connection. where does it store its logs?

EDIT:

Just to note... it does work via the command line so i have no idea why it doesnt work in the app. all the paths are correct but here it is working...

/data/system/bin/openvpn --config test.ovpn

Tue Oct 19 16:26:34 2010 OpenVPN 2.1.1 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] bu

ilt on Feb 2 2010

Tue Oct 19 16:26:34 2010 NOTE: OpenVPN 2.1 requires '--script-security 2' or hig

her to call user-defined scripts or executables

Tue Oct 19 16:26:34 2010 WARNING: file 'test-vpn/test.key' is group or

others accessible

Tue Oct 19 16:26:34 2010 LZO compression initialized

Tue Oct 19 16:26:35 2010 UDPv4 link local: [undef]

Tue Oct 19 16:26:35 2010 UDPv4 link remote: xxx.xxx.xxx.xxx:1194

Tue Oct 19 16:26:39 2010 [server.does.not.exists] Peer Connection Initiated with

xxx.xxx.xxx.xxx:1194

Tue Oct 19 16:26:41 2010 TUN/TAP device tun0 opened

Tue Oct 19 16:26:41 2010 /system/xbin/bb/ifconfig tun0 172.16.26.21 pointopoint

172.16.26.22 mtu 1500

Tue Oct 19 16:26:41 2010 Initialization Sequence Completed

what the...?
[Galaxy S I9000 Android Development] redace85:
can this also work in samsung vibrant?
[Galaxy S I9000 Android Development] gregc2009:
Thank you OP for the tun.ko file. Works perfectly on my Vibrant running Froyo!
[Galaxy S I9000 Android Development] Technecium:
This is not directly related but here is my issue and maybe someone can help me resolve it.

Everything seems to be working with one exception...

NOTE: unable to redirect default gateway -- VPN gateway parameter (--route-gateway or --ifconfig) is missing

It has to do with how I installed busybox. If I issue ...

# ifconfig

#

If I issue ...

# route

Invalid argument

#

However, if I issue ...

# busybox ifconfig

and

# busybox route

I get the expected results.

I have issued ...

# busybox --install -s /system/bin

and

# busybox --install -s /system/xbin

I have tried to link via ...

ln -s /system/xbin /system/xbin/bb

How can I correct this so that when I issue ifconfig or route it is actually issuing them with the prefix busybox?
[Galaxy S I9000 Android Development] captive:
Busybox "installation" is nothing but a bunch of symlinks to busybox. you can check which route (or ifconfig) is used doing:

which route

you'll get the complete path to the command itself (let's say /system/bin/route). You can now check which binary implements the command doing:

ls -l /system/bin/route

which will give you something like:

lrwxr-xr-x root shell 2010-10-25 18:37 route -> toolbox

This means that route is implemented using the toolbox binary. If you want busybox to doing this instead of toolbox just do:

rm /system/bin/route
ln -s /system/xbin/busybox /system/bin/route

and you're done. I'm assuming that busybox is installed in /system/xbin/ and there's an actual symlink that implements route (or ifconfig); if route (or ifconfig) simply doesn't exists on your device, just ignore the rm command and create the correct link using ln.

Hope that helps!
[Galaxy S I9000 Android Development] mesahin:
Thanks,

it is working on my Galaxy S with JPO Rom.
[Galaxy S I9000 Android Development] Technecium:
Yes that helped correct the problem with route and ifconfig but I still get the same error.

On my PC using Ubuntu 10.10 and OpenVPN

Thu Nov 11 00:48:39 2010 us=179947 TUN/TAP TX queue length set to 100
Thu Nov 11 00:48:39 2010 us=179980 /sbin/ifconfig tun0 [IP REMOVED] pointopoint [IP REMOVED] mtu 1500
Thu Nov 11 00:48:41 2010 us=264917 /sbin/route add -net [IP REMOVED] netmask 255.255.255.255 gw 192.168.1.1
Thu Nov 11 00:48:41 2010 us=265886 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw [IP REMOVED]
Thu Nov 11 00:48:41 2010 us=266690 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw [IP REMOVED]
Thu Nov 11 00:48:41 2010 us=268317 /sbin/route add -net [IP REMOVED] netmask 255.255.255.255 gw [IP REMOVED] metric 1
Thu Nov 11 00:48:41 2010 us=269080 Initialization Sequence Completed

On my SGS

Thu Nov 11 00:41:52 2010 us=314269 TUN/TAP TX queue length set to 100
Thu Nov 11 00:41:54 2010 us=387389 NOTE: unable to redirect default gateway -- VPN gateway parameter (--route-gateway or --ifconfig) is missing

Any ideas?
[Galaxy S I9000 Android Development] captive:
I do not use openvpn, I just use vpnc ipsec client to connect to a cisco device: the only command I had to link to busybox to make it work was ifconfig, while route is still handled by toolbox. You can try this way, since your problem seems to be about routing..
[Galaxy S I9000 Android Development] Technecium:
Yes. It looks as if I will have to script the process. I manually added the routing (ifconfig and route) commands and everything works now.

Thanks for the help. Being outside of the US limits which apps I can get from the market and openVPN help circumvent much of the geographical issues.

EDIT: I fixed the issue by correcting the ifconfig and route issues mentioned earlier and by adding links to bb and by replacing the openvpn binary in openvpn installer with a statically linked openvpn binary from here

http://github.com/downloads/fries/android-external-openvpn/openvpn-static.bz2
[Galaxy S I9000 Android Development] adiep:
I finally got this working.

The ifconfig and route commands were failing for me, turns out that a sym link directly to the busybox binary in /sbin did it for ifconfig but route still sisnt work, so i copied the busybox binary to /system/xbin/bb and named it route

cp /sbin/busybox /system/xbin/bb/route

that did it... now working !!!

The sym links just dont seem to work for me, but copying the entire bin to the location does.
[Galaxy S I9000 Android Development] Technecium:
I just did a full HowTo OpenVPN for the Korean SGS using StrongVPN's services if anyone needs some pointers or help on the install process. It should be pretty similar to other SGS and openVPN servers.

Thanks for the help and the module!
[Galaxy S I9000 Android Development] trad2kx:
Yay. Worked for me on my SGS I9000 JPO.I Used the tun.ko from the 1st post and followed the steps from the 3rd post. Had to change a line in my ovpn config file:

-------------------------

client

dev tun

proto udp

remote vpn.sfo.witopia.net 1194

resolv-retry infinite

nobind

persist-key

persist-tun

ns-cert-type server

cipher bf-cbc

comp-lzo

verb 3

mute 20

ca ca.crt

mssfix 1450

key ***********.key

cert ***********.crt

show-net-up <========= I REMOVED ONLY THIS LINE AND IT WORKED

-----------------------------
[Galaxy S I9000 Android Development] boredtoday:
runs fine on JPU as well (I'm using DocRambone's JPU Ultraslim 3.0.1 ATM)
[Galaxy S I9000 Android Development] sky01x:
Hello

I got VPN running with the the VPN FritzBox.apk on my Samsung I9000 Froyo XXJPU and Fritzbox 7390

The VPN Fritzbox.apk is from:

http://xdaforums.com/showthread.php?p=10078563

First I had a force closure because the tun.ko was missing. Now it works but I have to load the kernel module tun.ko every reboot in the console with insmod /system/lib/modules/tun.ko

I edited the file /init.rc with the line insmod /system/lib/modules/tun.ko but every reboot a "recovery" init.rc is loaded without my insmod line. There was also the tip to copy the tun.ko into /lib/modules/tun.ko but the tun.ko gets deleted after every reboot.

Any idea how to load the kernel module at start automatically?

Thanks.

Kind regards