Hello - I am attempting to connect to a cisco vpn using the instructions here but have run into a "common" problem- I copied a post over on the EVO forum- I have exactly the same problem- could some one help me out to compile a tun.ko that is compatible with the current stock kernel- thanks in advance!!! The instructions are found here
I am attempting to get vpnc (for cisco vpn) working on the epic but have run into a snag getting the tun.ko module loaded. When I attempt to insmod tun.ko I get exec format error and dmesg yields
tun: version magic '2.6.32.9-27220-g328f560 preempt mod_unload ARMv7 ' should be '2.6.29-a2443432 preempt mod_unload ARMv7 '
I found an excellent post (#12) by sjakub at hxxp://forum.xda-developers.com/showthread.php?t=630703&page=2
which describes step by step how to overcome this but unfortunately I have no access to linux in order to attempt this myself.
Would anyone be kind enough to compile the proper file for please?
Thanks very much.
Click to expand...
Click to collapse
jimmyz said:
could some one help me out to compile a tun.ko that is compatible with the current stock kernel
Click to expand...
Click to collapse
Does this work?
Mirror link (does not require forum login):
tun-DI18.zip
Thanks- will try it a soon as I get home!
EDIT: I did not receive any errors with your file- I will report back as soon as I try to connect to VPN!
Sent from my SPH-D700 using XDA App
I was able to insmod it, but my modem is down at home so I can't start my VPN.
I'll be jumping for joy if this works, I beat my head against the wall trying to find a good tun.ko for DI18 a few days back.
And I'm tunneled in. Seems to be working but I'm having trouble getting my traffic to route right so far, but I doubt that's related to the tun.ko.
Thanks a ton!
Hemick said:
And I'm tunneled in. Seems to be working but I'm having trouble getting my traffic to route right so far, but I doubt that's related to the tun.ko.
Thanks a ton!
Click to expand...
Click to collapse
what version of the VPN connections are you using? Could you find it on the market?
mkasick said:
Does this work?
Click to expand...
Click to collapse
Mkasick- thanks again for the tun.ko!!! After some troubleshooting (I needed to append a domain setting) I got it to work!!!!!
Can you please set up a way to donate to you- I would like to buy you a beer! I was going to ask for a kernel that automatically loads tun.ko but the vpn_connections apk seems to do it automatically
thanks again for you help!!!!
jimmyz said:
Can you please set up a way to donate to you- I would like to buy you a beer!
Click to expand...
Click to collapse
I appreciate the gratitude. Unfortunately I think it would take me far longer to figure out how to setup donations than it did to compile the module. So, in the meantime, enjoy a beer yourself as a "thanks" to me.
Thank you for this
I have been waiting for this too. Now I need to generate an OpenVPN configuration for our ssl VPN.
I registered just so I could download this module.
I must be doing something wrong because when I try to insmod I get init_module 'tun.ko' failed (Exec format error). I'm at 2.1-update1, 2.6.29, and SPH-D700 ECLAIR.DI18 so guess I'm not holding my mouth right.
flash_c4 said:
I must be doing something wrong because when I try to insmod I get init_module 'tun.ko' failed (Exec format error). I'm at 2.1-update1, 2.6.29, and SPH-D700 ECLAIR.DI18 so guess I'm not holding my mouth right.
Click to expand...
Click to collapse
I decided to try and copy the file over again and this time it worked so something must have happened during the transfer the first time.
How does one "install" this module? I have the Xtreme 1.0.1 kernel and I ran "insmod -v tun.ko" and it seems to stop the FC on the cisco ipsec vpn. But the module does not survive a reboot. I'm guessing I need to recompile it into the kernel? Can someone post some steps on how to do that?
Also, when using the vpn, after hitting connect, it immediately says failed. I'm not sure if that's because I didn't get tun.ko installed correctly, or just bad credential.
you all rock
first time poster, short time lurker...just started flashing my droid a few weeks ago, and am now also playing with an epic.
just wanted to comment on how much i liked this thread, even though i understand, uh, not much of it. you all rock! keep up the open source mentality and for my part i'll keep purchasing/donating for things i enjoy using. And hefting beers for all of you
jimmyz said:
Mkasick- thanks again for the tun.ko!!! After some troubleshooting (I needed to append a domain setting) I got it to work!!!!!
Can you please set up a way to donate to you- I would like to buy you a beer! I was going to ask for a kernel that automatically loads tun.ko but the vpn_connections apk seems to do it automatically
thanks again for you help!!!!
Click to expand...
Click to collapse
droid is currently running UD 2.0 with Chevy 1.25 low voltage kernel - fast and awesome!! quadrant in the 1100s
epic currently using syndicate fully loaded 1.0.2 but also tried and liked the froyo betas... quadrant = 1207
Kernel module
Having the tun.ko file alone might not work. For example, I have a Desire HD. I extracted the kernel config from /proc/config.gz and saw that the TUN/TAP module was not even included in the kernel as a module (M). Correct me if I'm wrong but if the kernel isn't even compiled for support for a module, the module will not load even if you try to load the tun.ko module using insmod/modprobe. Your kernel either needs to have the module selected as (M) or (Y) - if you want it buit-in.
Therefore, I had to:
(1) grab the Desire HD sources from http://developer.htc.com
(2) extract the config for that kernel from /proc/config.gz
(3) Also get hold of the android ndk compiler for x-platform compilation for the arm architecture.
(4) compile the kernel sources using that config file in (2) but also with support for tun.ko as a module (m). You can do this with the command 'make menuconfig' in the kernel sources dir. The kernel sources I grabbed from the url above from htc seemed to have a few files missing. One of them was the ntrig.c file, which I got from the main android kernel sources instead.
(5) Once I got them compiled, this generated the kernel as bZimage a few modules (including tun.ko).
(6) For me the next issue was to get the kernel on my device because unless you have a bootloader than ignores signatures on the kernel, you won't be able to upload your new kernel.
(7) I flashed my bootloader to clockworkmod. Used this guide: http://forum.xda-developers.com/showthread.php?t=805327
(8) once i unlocked the bootloader I issued a 'fastboot flash zimage zImage' (my compiled version of the kernel)
(9) Uploaded the tun.ko too and did an insmod to loads tun.ko and it worked.
rcboosted said:
How does one "install" this module?
Click to expand...
Click to collapse
You don't, you have to "insmod" it on every reboot.
rcboosted said:
I'm guessing I need to recompile it into the kernel?
Click to expand...
Click to collapse
You can compile a kernel with the tun driver built-in, so you don't need to rely on an external module. But it's tougher to keep up with kernel updates that way. Ask in the thread of your favorite kernel where to obtain the source and instructions for compiling it.
shakeup said:
Correct me if I'm wrong but if the kernel isn't even compiled for support for a module, the module will not load even if you try to load the tun.ko module using insmod/modprobe. Your kernel either needs to have the module selected as (M) or (Y) - if you want it buit-in.
Click to expand...
Click to collapse
That's not the case. The kernel does need to be compiled with general module support, but this will always be the case since the Epic uses a fair number of proprietary driver modules.
Setting a particular driver to be compiled as a module (=m) in the kernel config simply means the module, and any of its dependencies, are built alongside the kernel. The kernel itself is the same in either case, unless the module requires a kernel option/driver that can't be compiled as a module, which is rare these days, but was more common in Linux 2.4 and earlier.
In any event, the tun.ko posted here does work with stock DI18.
Edit: There is an issue when you try to compile a driver module that requires an option to be enabled in a different driver that's built-in to the kernel you're using but is currently disabled. I can't think of a good example of such at the moment, but I think I have ran into it in the past.
It's obvious I'm no linux or android expert by any means. I have no clue how to compile a kernel or recompile a module. So all this talk about recompiling is way over my head.
I'm just trying to connect to a IPSec vpn server using vpnc client (http://code.google.com/p/get-a-robot-vpnc/). Currently running Epic Experience rom and the latest Xtreme kernel. Everytime I tried to connect, it fails immediately. I've verified my credentials are correct, so I don't know what else I can do except wait for CM 6 to come out for the Epic.
rcboosted said:
Everytime I tried to connect, it fails immediately.
Click to expand...
Click to collapse
I'm not familiar with that particular program, but you can get a better idea of what's going wrong with a logcat dump.
For example, your credentials might be correct, but your phone might still have difficulty resolving the server, negotiating the connection, etc.
Thanks for the help. I tried logcat and the authentication part seems to be ok, this is what happens after the authentication:
D/VPN_Connections(29594): done interacting with vpnc
D/VPN_Connections(29594): process stderr:
D/VPN_Connections(29594): Read vpnc process line as null
D/VPN_Connections(29594): Attempt to read vpnc process id did not return anything
D/VPN_Connections(29594): process had died, return as failed connection
It doesn't tell me much, but maybe it means something to you.
rcboosted said:
It's obvious I'm no linux or android expert by any means. I have no clue how to compile a kernel or recompile a module. So all this talk about recompiling is way over my head.
I'm just trying to connect to a IPSec vpn server using vpnc client (http:/9/code.google.com/p/get-a-robot-vpnc/). Currently running Epic Experience rom and the latest Xtreme kernel. Everytime I tried to connect, it fails immediately. I've verified my credentials are correct, so I don't know what else I can do except wait for CM 6 to come out for the Epic.
Click to expand...
Click to collapse
I would guess you need a tun.ko specifically for that kernel you are using (Xtreme)- maybe its best to go back to stock- use the tun.ko in this thread and see if you can get it to work?
Related
Hey,
I've compiled my own kernel with a few tweaks and to add EB support. I used rafpigna 1.7 as a base.
However, after numerous attempts I can't get wifi working (When you attempt to activate it in gingerbread it just returns "Error"). I've tried to compile the driver as a module and into the kernel, neither works.
Anyone have any pointers, or can you tell me where to start looking?
Thanks, Rick
RickAstley said:
Hey,
I've compiled my own kernel with a few tweaks and to add EB support. I used rafpigna 1.7 as a base.
However, after numerous attempts I can't get wifi working (When you attempt to activate it in gingerbread it just returns "Error"). I've tried to compile the driver as a module and into the kernel, neither works.
Anyone have any pointers, or can you tell me where to start looking?
Thanks, Rick
Click to expand...
Click to collapse
You have to copy some modules to the rom, /system/lib/modules/ , as well from the compiled source, bcm4329.ko and tun.ko
Also check for permissions on those files and try rebooting the phone.
Trying to use anyconnect and get an error about Tun/Tap driver. On android 3.2 touchwiz. Have found several but every time i do a insmod tun.ko get a error. Is there a tun.ko driver available, if so can you please point me in the right direction. Thanks!
Anyone
Can anyone point me in the right direction please?
Where did you get Android 3.2 for the Galaxy Tab 10.1?
My bad
my bad, 3.1, fat finger syndrome
This might help:
forum.xda-developers.com/showthread.php?t=1262315
U da MAN
morkli thank a million times over, that was it. I have been searching all day, I knew if i came to this forum, I would get the answer and help. Again thank you!!
Glad I could help
sorry to dig up the dead, but i cant get this working.
I have a LTE tab running liquidspeed beta 6. I am trying to use the Cisco anyconnect client (not the same as used in the link above) I was getting the error that the tun module was missing from /data/local/kernel_modules.
I dled the tun.ko file and placed it in /data/local/modules folder and ran su and then insmod /data/local/modules/tun.ko both commands had no response or errors.
I then said, okay it is looking in /data/local/kernel_modules so i will place it there and run the insmod command to point there.
When i run the anyconnect app, it hangs and reboots my tablet.
Anyone get this working? i need some help as I use VPN for work often.
See my post in http://forum.xda-developers.com/showpost.php?p=19007667&postcount=20
Digging this up...
I'm using liquid speed beta 6. Can get connected with AnyConnect, but it reboots when trying to finishes the connection. I've insmod and tried from data/local/modules... And just copies to kernel_modules with same result.
Had anyone done a full anyconnect with a pershoot kernel yet?
iceshrike said:
Digging this up...
I'm using liquid speed beta 6. Can get connected with AnyConnect, but it reboots when trying to finishes the connection. I've insmod and tried from data/local/modules... And just copies to kernel_modules with same result.
Had anyone done a full anyconnect with a pershoot kernel yet?
Click to expand...
Click to collapse
i never got mine working either
**DEV ONLY**
Acer released ICS kernel sources for A200. Like HC sources, it seems to support picasso board as well.
Tried to compil with config from leaked kernel. Had to fix a build issue, but all went fine.
ATM It doesn't boot, and dunno why. I tried to enable console to check what's wrong without success.
picasso and picasso_e config are really closed.
Maybe someone can do some magic with this =)
Kernel sources : http://global-download.acer.com/GDF...AB&Step3=A200&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
ICS A500 Config : http://minus.com/memdYnyCy#3 - http://pastebin.com/CfErz5cz
vache said:
**DEV ONLY**
Acer released ICS kernel sources for A200. Like HC sources, it seems to support picasso board as well.
Tried to compil with config from leaked kernel. Had to fix a build issue, but all went fine.
ATM It doesn't boot, and dunno why. I tried to enable console to check what's wrong without success.
picasso and picasso_e config are really closed.
Maybe someone can do some magic with this =)
Kernel sources : http://global-download.acer.com/GDF...AB&Step3=A200&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
ICS A500 Config : http://minus.com/memdYnyCy#3 - http://pastebin.com/CfErz5cz
Click to expand...
Click to collapse
I had the same idea yesterday. There were some drivers missing missing im moving from HC and atmel touch yas529 compass and some camera drivers need work to compile. Also the memory carveout will need to be changed to boot on orig bootloader.
vache said:
**DEV ONLY**
Acer released ICS kernel sources for A200. Like HC sources, it seems to support picasso board as well.
Tried to compil with config from leaked kernel. Had to fix a build issue, but all went fine.
ATM It doesn't boot, and dunno why. I tried to enable console to check what's wrong without success.
picasso and picasso_e config are really closed.
Maybe someone can do some magic with this =)
Kernel sources : http://global-download.acer.com/GDF...AB&Step3=A200&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
ICS A500 Config : http://minus.com/memdYnyCy#3 - http://pastebin.com/CfErz5cz
Click to expand...
Click to collapse
if you dont mind me asking... how did you get past the build issue? im getting a mess of errors....
EDIT:
got it. nvm. (shows how much a few weeks of research and learning gets me )
Sorry, wrong place. Delete Post.
has anyone had any luck getting this to boot? i cant get anything out of it :/ no adb no nothing. ideas?
EDIT:
just an observation, the size of this kernel after its compiled is aprox. 3.3 mb, where as the kernel in the leaked copy is aprox. 3.4 mb. which reinforces my belief that something is missing here. which seeing as it is not our "official" source would make sense... going to keep researching.
okay, so i got it to compile, and i got it to sort of boot. it turns on, after the acer screen all it does is display garbage on the screen, nothing useful, just random pixels then reboots. still no adb. it also appears to begin the boot sequence as it looks like its reading my flashdrive the exact same way it does with a normal boot. im going to mess with the video driver libs, and use ones that are designed for this kernel and report back. if anyone thinks they can help let me know, or post here.
EDIT:
i think the garbage is normal with the old bootloader. i hope some of the stuff im posting is helpful lol
Grrr,,
Well on the unlocked bootloader the kernel sorta boots:
However I'm running into the following:
Code:
[ 1.131021] Unpacking initramfs...
[ 1.146564] Initramfs unpacking failed: uncompression error
This then followed by much more errors that Init can't be found/executed and an automatic reboot.
(FYI I have the stock ICS kernel in a recovery image that I used to read out the last_kmsg of my kernels attempt to boot)
This issue came up both with a patched a200 and a510 kernel (with the stock ICS config as a template).. so something is up.. did they change the location of the initrc image?
all versions of code I have say (for Tegra2):
Code:
zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00008000
params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100
initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000
from: arch/arm/mach-tegra/Makefile.boot
(I know my code may be missing some drivers and camera is not quite initializing correctly.. but nothing related to init.. and besides a camera init warning nothing went wrong up too that point. I expect Init to be read, particuarly since the bootloader ought to have loaded the ramdisk into ram .. we are just de-compressing the cpio archive.. The uncompression error seems like a generic message for something unexpected reading the gzip data.. thus I wonder if it was just loaded elsewhere)
Edit:
Still lost..
The ramdisk is being loaded.. and position not static but passed into the kernel by the bootloader:
parse_tag_initrd2: 0x05000000,0x161e0e (an added debug string)
The first few bytes of the file are correct and the length is right.. but the CRC32 dosn't check out.. so something is overwrittiing it... seems odd that far into ram.
being slightly curious, I looked at the URL and changed the Step3=A200 to Step3=A500, got a download, don't know if its the same though..
Step3=A500&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
LC = looks like the language - maybe change this to eng.. maybe its possible to get the correct download by altering the URL..
http://global-download.acer.com/GDF...AB&Step3=A500&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
kiwi_mat said:
being slightly curious, I looked at the URL and changed the Step3=A200 to Step3=A500, got a download, don't know if its the same though..
Step3=A500&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
LC = looks like the language - maybe change this to eng.. maybe its possible to get the correct download by altering the URL..
http://global-download.acer.com/GDF...AB&Step3=A500&OS=a08&LC=fr&BC=Acer&SC=EMEA_13
Click to expand...
Click to collapse
it old kernel source 4.0.3 for A200 (dating 21.02.2012)
ready...
set...
GO
http://global-download.acer.com/GDFiles/Document/App.%20Guide/App.%20Guide_Acer_1.0_A_A.zip?acerid=634729317909661533&Step1=Tablet&Step2=ICONIA%20TAB&Step3=A500&OS=a08&LC=en&BC=Acer&SC=AAP_9
compiled the following from the supplied defconfigs for testing purposes, flash at your own risk:
picasso_defconfig-signed.zip
picasso_e_defconfig-signed.zip
vangogh_defconfig-signed.zip
waydownsouth said:
On your marks...
Get set...
GO
Click to expand...
Click to collapse
And after waiting 5h longer my local mirror at last had the file.
Github
I hate dealing with kernels w/o full git history.. since asking acer for their git tree probably won't achieve results:
I've integrated the code on top of a nvidia tegra sample git repository (to re-add git history) and uploaded the source to my github:
https://github.com/ezterry/AcerTabKernel
Tag: A500_ICS_4.0.3_OfficialDrop is identical to the code in the acer ZIP
(actually master also is at the time of this writing, but bits and pieces of my own hackery may be added to that)
Feel free to clone to your own projects (or use github as a download mirror)
Quick Test
I did a quick test, took the config.gz from ICS, and built the kernel, (then re-patched with my script for system r/w) just to make sure the kernel we had could be re-created, appears to have booted my A500 Public Recovery Image without incident.
Code:
[email protected]:/ # [email protected]:~$ adb shell
~ # uname -a
Linux localhost 2.6.39.4+ #1 SMP PREEMPT Sun May 20 02:06:41 EDT 2012 armv7l GNU/Linux
~ # cat /proc/version
Linux version 2.6.39.4+ ([email protected]) (gcc version 4.4.3 (GCC) ) #1 SMP PREEMPT Sun May 20 02:06:41 EDT 2012
also checked the picasso_defconfig with the config in the stock rom:
Code:
[email protected]:/usr-vm/android/aosp/acer-kernel/kernel$ diff .config arch/arm/configs/picasso_defconfig
4d3
< # Thu Mar 29 22:57:19 2012
1337d1335
< # CONFIG_TOUCHSCREEN_CYPRESS is not set
2826c2824
< CONFIG_ACER_SECURE_MOUNT=y
---
> # CONFIG_ACER_SECURE_MOUNT is not set
so only change is CONFIG_ACER_SECURE_MOUNT was added to the stock rom (meaning we don't need to configure it out (or rum the hack script I've been running) to allow system remount.
Building crash course
I'll keep this short since its 3:20AM and I know most reading this thread have built an android kernel before but here is the crash course: (remember this uses linux to build)
Have an android build tree or my Public Recovery tree on your computer
add the arm toolchain to your path
eg: export PATH=<path/to/android/tree/root>/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
change directory into where you extracted the kernel code (or cloned it into)
run:
export ARCH=arm;export CROSS_COMPILE=arm-eabi-;export KERNEL_DIR=`pwd`
run 'make picasso_defconfig' to get acer's default .config (or fetch your own template)
if you want to re-configure parts of the kernel run 'make menuconfig'
to build run 'make -j5' (where 5 ought to be the number of cores in your computer +1)
This generates the zImage that is then placed in the boot.img with mkbootimg
to get modules prepared for install run 'make modules_install INSTALL_MOD_PATH=./build'
This will set up modules as if installed on your linux box in a ./build sub directory these are then manually installed into the rom
----
Ok now with this update its well past my bedtime.. I'll poke more when I am awake
waydownsouth said:
ready...
set...
GO
http://global-download.acer.com/GDF... TAB&Step3=A500&OS=a08&LC=en&BC=Acer&SC=AAP_9
compiled the following from the supplied defconfigs for testing purposes, flash at your own risk:
picasso_defconfig-signed.zip
picasso_e_defconfig-signed.zip
vangogh_defconfig-signed.zip
Click to expand...
Click to collapse
Looks like Acer figured you out. The file is no longer available at that address. I get a 404 error.
Sent from my A500 using XDA Premium HD app
BakaNeko59 said:
Looks like Acer figured you out. The file is no longer available at that address. I get a 404 error.
Sent from my A500 using XDA Premium HD app
Click to expand...
Click to collapse
Works just fine for me. Are you running an ad blocker?
amphi66 said:
Works just fine for me. Are you running an ad blocker?
Click to expand...
Click to collapse
Not all of the Acer download mirrors got the file at the same time.. so its possible some are not synced yet.
Sent from my Galaxy Nexus using Tapatalk 2
waydownsouth said:
ready...
set...
GO
http://global-download.acer.com/GDF... TAB&Step3=A500&OS=a08&LC=en&BC=Acer&SC=AAP_9
compiled the following from the supplied defconfigs for testing purposes, flash at your own risk:
picasso_defconfig-signed.zip
picasso_e_defconfig-signed.zip
vangogh_defconfig-signed.zip
Click to expand...
Click to collapse
Put it into a boot.img flashed it with the modules and running nice (no need to use the systemRW hack) , any OC posible for next release ? (a500)
Will do more testing ................
ezterry said:
Not all of the Acer download mirrors got the file at the same time.. so its possible some are not synced yet.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
It already shows in here as well: http://support.acer.com/product/default.aspx?modelId=3851
Is it just me or when you use self compiled kernel cpufreq doesn't work well?
Skrilax_CZ said:
Is it just me or when you use self compiled kernel cpufreq doesn't work well?
Click to expand...
Click to collapse
Not here , I only used the zImage and put it together with the ramdisk I use for my tweaked kernel and it is very smooth with almost no browser glitches , in fact I didn't have any today.
I got the highest score with this one 2740 quadrant .
I also didn't use the modules , I used the stock one from Acer , I did notice a little performance drop using the modules that came with the kernel waydownsouth build so I switch to the stock ones from the Acer 1.031.00 release.
Skrilax_CZ said:
Is it just me or when you use self compiled kernel cpufreq doesn't work well?
Click to expand...
Click to collapse
No problem here..
and even now a test build with overclock:
http://forum.xda-developers.com/showpost.php?p=26432810&postcount=4
(richardtrip's patches merged cleanly once i found them..)
Still not sure what to do about the initrd issue some people are having with my recovery.. (any insight into the logic in these bootloaders about how it loads the ramdisk into ram?)
Do you happen to have a mirror or another address for the Acer source to download the single file? I still get a 404 error on three different systems and two different browsers (including my tab itself) when I try http://global-download.acer.com/GDFiles/Document/App. Guide/App. Guide_Acer_1.0_A_A.zip.
Thanks
I have been looking into slow "cold-start" gps locks & in some peoples cases, complete lack of gps.
In testing, everything I've found so far, seems to be pointing at the lack of Broadcom's proprietary long term orbit data (lto.dat) used by the GPS Daemon on our devices...
These chips are in the a500/a200/a100 devices (101 & 501 devices use an ericsson GPS)
For the sake of not regurgitating a whole heap of info, you can read more about the lto.dat file in plenty of places across the web.
pacificwing recently bought this up in crypted's aGPS patch thread, some discussion on the subject starts around page 30.
The attached, recovery flashable zip will patch your system with a *workaround* to automate the download & update of lto.dat...
It is derived from past work in CyanogenMod for the aries (& other) devices.
It should be compatible with most ROM's, but may need adjusting if your busybox wget applet can't resolve dns. (see notes in the script)
What it does:
Installs the script "get-gps-lto" to /system/bin
Creates a service entry in the init.<boardname>.rc file which runs the script on a semi regular basis. (triggered by network connectivity)
The script is tunable by a number of variables, modify as you see fit.
Or, flash & forget... messages are sent to logcat so you can check up on it easily.
This zip has only been tested on a500, cm9, ics bootloader & cwm recovery.
Mileage may vary on other combinations, the zip patches your boot.img so please make a nandroid backup to be safe. (only need to restore /boot if there's a problem)
Installation problem? please let me know & provide a recovery.log so I can make adjustments to the zip if need be.
Standard disclaimers apply, flash at your own risk.
Oh nice I can build in my rom and the kernel before I release it.
Thanks in advance! I'll flash it in a bit!
civato said:
Oh nice I can build in my rom and the kernel before I release it.
Click to expand...
Click to collapse
Not a problem, you'll be sure to test it before releasing the rom I hope?
Anyone has this working yet? Btw, thank you waydownsouth
waydownsouth said:
Not a problem, you'll be sure to test it before releasing the rom I hope?
Click to expand...
Click to collapse
No
waydownsouth said:
The attached zip will patch your system with a *workaround* to automate the download & update of lto.dat...
It is derived from past work in CyanogenMod for the aries (& other) devices.
It should be compatible with most ROM's, but may need adjusting if your busybox wget applet can't resolve dns. (see notes in the script)
> Download here <
Click to expand...
Click to collapse
So that explains why I could never get my wget script to work....
Sent from my A500 using XDA Premium HD app
would it be possible to port this to another device? nice job by the way
waydownsouth said:
It should be compatible with most ROM's, but may need adjusting if your busybox wget applet can't resolve dns. (see notes in the script)
Click to expand...
Click to collapse
Other than hard coding the IP address (which worked for me by the way) is there a better solution to fixing the busybox DNS problem? I've read that putting a resolve.conf file in /system/etc that contains the Google DNS nameservers should work but I tried it and no luck.
Also, any reason you're not using the 30 day file rather than the 7 day? With the 30 day you wouldn't have to run the script all that often... Is the 30 day less accurate or something?
In any event, thanks.
Sent from my A500 using XDA Premium HD app
I build in my kernel for RF1
civato said:
No
Click to expand...
Click to collapse
azoller1 said:
would it be possible to port this to another device? nice job by the way
Click to expand...
Click to collapse
possible, yes... the installer zip will only work for the picasso, picasso_e & vangogh devices... I could add more devices to the installer if need be?
Only thing I could see being a problem is the where the service entries get written to in the init.<boardname>.rc
The device would need to use a boot.img for it's ramdisk too... Most Samsungs are very different in that regard
BakaNeko59 said:
Other than hard coding the IP address (which worked for me by the way) is there a better solution to fixing the busybox DNS problem? I've read that putting a resolve.conf file in /system/etc that contains the Google DNS nameservers should work but I tried it and no luck.
Also, any reason you're not using the 30 day file rather than the 7 day? With the 30 day you wouldn't have to run the script all that often... Is the 30 day less accurate or something?
Click to expand...
Click to collapse
Most statically compiled generic busyboxes will be like that on android, in the case of CyanogenMod, the busybox has been compiled against the android bionic lib & has a number of modifications for Android compatibility.
I stuck to the 7day data so it will stay a bit fresher... I figured that 60kb isn't much to download every few days.
It's easy enough to change those parameters in the script to point to the 30day
Also, haven't yet had time to test how effective the 30day data is after 20 + days... since I only made this yesterday.
What has been your experience?
waydownsouth said:
possible, yes... the installer zip will only work for the picasso, picasso_e & vangogh devices... I could add more devices to the installer if need be?
Only thing I could see being a problem is the where the service entries get written to in the init.<boardname>.rc
The device would need to use a boot.img for it's ramdisk too... Most Samsungs are very different in that regard
Most statically compiled generic busyboxes will be like that on android, in the case of CyanogenMod, the busybox has been compiled against the android bionic lib & has a number of modifications for Android compatibility.
I stuck to the 7day data so it will stay a bit fresher... I figured that 60kb isn't much to download every few days.
It's easy enough to change those parameters in the script to point to the 30day
Also, haven't yet had time to test how effective the 30day data is after 20 + days... since I only made this yesterday.
What has been your experience?
Click to expand...
Click to collapse
it actually is a samsung, the galaxy player 5.0 so you dont have to do it you could pm me a short tut.
i
This works great! Thanks!
waydownsouth said:
Most statically compiled generic busyboxes will be like that on android, in the case of CyanogenMod, the busybox has been compiled against the android bionic lib & has a number of modifications for Android compatibility.
I stuck to the 7day data so it will stay a bit fresher... I figured that 60kb isn't much to download every few days.
It's easy enough to change those parameters in the script to point to the 30day
Also, haven't yet had time to test how effective the 30day data is after 20 + days... since I only made this yesterday.
What has been your experience?
Click to expand...
Click to collapse
Well,since I've never gotten my sManager script method to work I've just been manually downloading the 30 day one every every now and then. I haven't actually been using my GPS much so I can't say how good it's been.
Is there a busybox installer on the market that you think would be better than the generic one? Or is it possible the CM one would work with Flexreaper?
Sent from my A500 using XDA Premium HD app
BakaNeko59 said:
Well,since I've never gotten my sManager script method to work I've just been manually downloading the 30 day one every every now and then. I haven't actually been using my GPS much so I can't say how good it's been.
Is there a busybox installer on the market that you think would be better than the generic one? Or is it possible the CM one would work with Flexreaper?
Sent from my A500 using XDA Premium HD app
Click to expand...
Click to collapse
I build IT in flexreaper RF1 and the kernel of RF1. Release maybe tomorrow.
BakaNeko59 said:
Is there a busybox installer on the market that you think would be better than the generic one? Or is it possible the CM one would work with Flexreaper?
Click to expand...
Click to collapse
I think all the busybox installers have generic, compiled for arm versions, they will likely have the same problem.
The cm/bionic one is dynamically linked, so depends on some libs in the rom. You could compile a static version against the android source (or ndk), but probably won't work on different versions of android.
Other option, there are real wget binaries compiled for android floating about which aren't neutered like the busybox version... they have no problems resolving dns.
delete the busybox wget symlink & drop in the binary...
waydownsouth said:
I think all the busybox installers have generic, compiled for arm versions, they will likely have the same problem.
The cm/bionic one is dynamically linked, so depends on some libs in the rom. You could compile a static version against the android source (or ndk), but probably won't work on different versions of android.
Other option, there are real wget binaries compiled for android floating about which aren't neutered like the busybox version... they have no problems resolving dns.
delete the busybox wget symlink & drop in the binary...
Click to expand...
Click to collapse
Well, in my 53 years of existence I've grown lazy. I think I'll just use your solution and stop worrying about my own since yours works like a charm.
Sent from my A500 using XDA Premium HD app
I think that gpsfix needs some more fixing comparing with manually downloading lto.dat and copying it at system/gpsconfig file..lr data/gps file..........
mine wouldn't find location at all before on cm9 but with this, after initial long lock, other locks only took ~5 secs. thanks!
drharisis said:
I think that gpsfix needs some more fixing comparing with manually downloading lto.dat and copying it at system/gpsconfig file..lr data/gps file..........
Click to expand...
Click to collapse
This downloads the lto.dat file to the default location /data/gps/
If your gpsconfig.xml file has been modified to point to /system rather than /data, then it won't work.
You could modify the script to point to /system, but, you would also need to include code to mount /system rw before attempting to update.
I think that's what your post was about?
Hey everyone. I bought this device specifically because I do a lot of work on linux in command line world and I though it would be the perfect device when combined with the Logitech Pro keyboard and Complete Linux Installer (it's an app on Google Play). It turned out to be quite a bit of work getting everything working because of Knox and SELinux. Eventually I got a custom kernel working that allows me to toggle SELinux between permissive and enforcing.
I attached an Odin flashable tar that works on the SM-P900 (wifi version). I am on the North American version, so I have no idea whether it will work in other regions. If you flash this kernel then there are a few things you need to know:
I'm assuming you already have root on your device.
When you boot it will still be in "Enforcing" mode. This change simply allows you to use the "setenforce" terminal command or any of the apps on Google Play that do this for you.
You might experience some wifi weirdness after you flash the kernel. You just need to open up /system/build.prop and change ro.securestorage.support from true to false and then reboot to resolve the issue.
If you have a different version of the device or want to compile it yourself for any reason I wrote an article describing how I compiled it here:
http://graemehill.ca/compiling-permissive-android-kernel/
I also did a few other things to fix the keyboard and get linux running properly, so if you're interested in that I described my setup in more detail here:
http://graemehill.ca/turning-a-galaxy-note-pro-into-a-linux-laptop/
Thank you for this!
Sent from my SM-P900 using Tapatalk
trying to build kernel
I'm trying to follow your guide to compile a kernel from source. I have installed (on my Win 8.1_64 PC) Android SDK/NDK. GnuWin32, JavaJRE, and downloaded SM-P900 kernel source.
I'm getting errors at "Apply Kernel Config" step.
here's the output: http://pastebin.com/yFqDrNY8
Thanks for your help
Don :good:
dodo99x said:
I'm trying to follow your guide to compile a kernel from source. I have installed (on my Win 8.1_64 PC) Android SDK/NDK. GnuWin32, JavaJRE, and downloaded SM-P900 kernel source.
I'm getting errors at "Apply Kernel Config" step.
here's the output: http://pastebin.com/yFqDrNY8
Thanks for your help
Don :good:
Click to expand...
Click to collapse
It looks like you're in Windows. To my knowledge it is not possible to compile a Linux kernel in windows. I would recommend downloading virtual box and installing some Linux distro in there. This is what I was talking about in the "environment" section at the top of the article.
For android development I find that you need access to a lot of tools where some are only available on Windows and others are only available on Linux so a Windows PC with a Linux VM is ideal in my opinion.
Oh ok, no problem. I just misread the guide. I've setup a build environment in a vm before to compile aosp for my Nexus 10. Shouldn't be too hard to do it again. I recently rebuilt my pc so the vm I had got nuked.
Sent from my SM-P900 using Tapatalk
ok I got my Ubuntu VM up and running using this guide
http://forum.xda-developers.com/showpost.php?p=50748836&postcount=25
installed android NDK to ~android/NDK, and unzipped the kernel source to ~android/kernel
followed your guide to build a SELinux permissive kernel but i'm getting some errors when trying to compile. here's the output:
http://pastebin.com/Npdu7J5h
EDIT: retried doing the EXPORT command and now it seems to be compiling
dodo99x said:
EDIT: retried doing the EXPORT command and now it seems to be compiling
Click to expand...
Click to collapse
When you export a variable in the terminal it only exists for that one session, so if you open a new terminal instance you need to run the command again. If you want to set it permanently normally you can just put the export command into ~/.bashrc
Oh I see. I'll give that a try. I was able to create a new boot.img following the rest of your guide. I have yet to try flashing it though. Will have to find some info about all the kernel options that can be set. Hopefully be able to integrate HMP to get all eight cores running at the same time.
Sent from my SM-P900 using Tapatalk
Cool, let us know how that goes. I wonder how much it would affect battery life.
Graeme H said:
Hey everyone. I bought this device specifically because I do a lot of work on linux in command line world and I though it would be the perfect device when combined with the Logitech Pro keyboard and Complete Linux Installer (it's an app on Google Play). It turned out to be quite a bit of work getting everything working because of Knox and SELinux. Eventually I got a custom kernel working that allows me to toggle SELinux between permissive and enforcing.
I attached an Odin flashable tar that works on the SM-P900 (wifi version). I am on the North American version, so I have no idea whether it will work in other regions. If you flash this kernel then there are a few things you need to know:
I'm assuming you already have root on your device.
When you boot it will still be in "Enforcing" mode. This change simply allows you to use the "setenforce" terminal command or any of the apps on Google Play that do this for you.
You might experience some wifi weirdness after you flash the kernel. You just need to open up /system/build.prop and change ro.securestorage.support from true to false and then reboot to resolve the issue.
If you have a different version of the device or want to compile it yourself for any reason I wrote an article describing how I compiled it here:
http://graemehill.ca/compiling-permissive-android-kernel/
I also did a few other things to fix the keyboard and get linux running properly, so if you're interested in that I described my setup in more detail here:
http://graemehill.ca/turning-a-galaxy-note-pro-into-a-linux-laptop/
Click to expand...
Click to collapse
I tried to install this using VBox Odin and I couldnt get it to work. Tried using BOOTLOADER and also PDA. Not sure the correct one but neither worked for me. Also, Moblie ODin hasnt yet worked but when it does, things will be much easier for me at least.
I have a newly rooted SM-900. I will have to find time someday to compile the kernel against what I have. Must be a slightly newer version than the one you posted. That is only thing I can think since I just got my 12.2. Thanks for the detailed info.
Camera?
Hey, thanks for the great kernel. It's working as expected to enable permissive mode, but I'm having one issue with it. When I use your kernel, the camera is disabled (says something like "Camera Failed"), and it won't work even when trying different software besides stock, like Google Camera. Anyway, clearing cache, etc. doesn't do anything, but the camera works again when I flash the stock kernel. Is this related to permissive mode or something else with the settings?
aarstar said:
Hey, thanks for the great kernel. It's working as expected to enable permissive mode, but I'm having one issue with it. When I use your kernel, the camera is disabled (says something like "Camera Failed"), and it won't work even when trying different software besides stock, like Google Camera. Anyway, clearing cache, etc. doesn't do anything, but the camera works again when I flash the stock kernel. Is this related to permissive mode or something else with the settings?
Click to expand...
Click to collapse
The camera fails for me too. I dumped a logcat and isolated the issue here:
W/ActivityManager( 2746): Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
V/ApplicationPolicy( 2746): isApplicationStateBlocked userId 0 pkgname com.google.android.GoogleCamera
But... the camera is not a huge deal. It did, however, break wifi. I did not get a logcat of that yet, but I would assume it is also a permission issue.
Wifi works for me using the fix mentioned in the OP. Also, thanks for looking into the camera issue. I agree it's not a big deal, and it's easily fixed by flashing the stock kernel, until someone figures out a proper fix.
aarstar said:
Wifi works for me using the fix mentioned in the OP. Also, thanks for looking into the camera issue. I agree it's not a big deal, and it's easily fixed by flashing the stock kernel, until someone figures out a proper fix.
Click to expand...
Click to collapse
Wow, I totally missed that entire line in the OP... You literally just made my whole day. I fought this all day long, desperate to get ubuntu working. Thank you for pointing that out.
I get "xt_mark.h" is missing (no such file or directory) error. Any idea why that may be?
I'm using the source for p900 international hoping that I may sidestep the camera issue that way (by enabling permissive to the international kernel I mean), but as it stands it does not compile.
I've googled it but until now it was/is to no avail...
Graeme H said:
Hey everyone. I bought this device specifically because I do a lot of work on linux in command line world and I though it would be the perfect device when combined with the Logitech Pro keyboard and Complete Linux Installer (it's an app on Google Play).
Click to expand...
Click to collapse
Hey Graeme H,
we both have the same intention. I am downloading the international Kernel at the moment and will compile it again for you guys. The download takes a little longer as I am at vacations.
I am going this route: doviak.net/debian-kit/debian-kit_p00.html . In the future I would like to have arch linux running on this device but a customized debian would be okay for the beginning, too.
Eventually I will try to use framebuffer instead of vnc or something like that. I would love to use sublime-text and dwm on that device with that resolution
Good luck guys. I will try to update.
Edit: hehe I have dwm in front of me now and the resolution is so high that I am barely able to read
Compiled the kernel and flashed in on my device but my camera is still not working. Maybe we need to edit the config:
# Camera sensor devices
#
# CONFIG_VIDEO_OV7670 is not set
# CONFIG_VIDEO_VS6624 is not set
# CONFIG_VIDEO_MT9M032 is not set
# CONFIG_VIDEO_MT9P031 is not set
# CONFIG_VIDEO_MT9T001 is not set
# CONFIG_VIDEO_MT9V011 is not set
# CONFIG_VIDEO_MT9V032 is not set
# CONFIG_VIDEO_TCM825X is not set
# CONFIG_VIDEO_SR030PC30 is not set
# CONFIG_VIDEO_NOON010PC30 is not set
CONFIG_VIDEO_S5K6B2=y
# CONFIG_S5K6B2_CSI_C is not set
CONFIG_S5K6B2_CSI_D=y
CONFIG_S5K6B2_POSITION_FRONT=y
# CONFIG_S5K6B2_POSITION_REAR is not set
CONFIG_VISION_MODE=y
# CONFIG_VIDEO_M5MOLS is not set
# CONFIG_VIDEO_S5K6AA is not set
Click to expand...
Click to collapse
Rather than each people compiles its kernel, could someone put a link to download the international kernel compiled? I think this would allow more people to get this kernel. Thank
PHP:
smylion said:
Rather than each people compiles its kernel, could someone put a link to download the international kernel compiled? I think this would allow more people to get this kernel. Thank
Click to expand...
Click to collapse
Compiled from Kitkat source. [ur#l]erhan.es/upload/sm-p900-permissive-intl.tar[/url] (odin)
Thank you but the link does not work
smylion said:
Thank you but the link does not work
Click to expand...
Click to collapse
Sorry, it is erhan.es/upload/sm-p900-intl-permissive.tar