OmniRom OpenVPN quick fix (kernel issue: cannot acquire tun interface socket) - Desire Q&A, Help & Troubleshooting

Hi,
I've found a quick and dirty fix for kernel issue related with tun.ko module in OmniRom/KitKang roms with kernel 2.6.38.8-evervolv-02127-...
Just create file /data/local/userinit.sh containing folowing lines (or add, if you've already have a file):
#!/system/bin/sh
rm -rf /dev/tun
insmod /system/lib/modules/tun.ko
Click to expand...
Click to collapse
Next reboot, or run it with:
sh /data/local/userinit.sh
Click to expand...
Click to collapse
I'm using openvpn binary from OpenVPN Installer app and it works like a charm!
If this fix is already known, please remove this thread (I can't write to thread related to OmniRom). Probably there is a better fix for this issue.
Greetings

Related

Modules for Gingerbread (cifs/ext4)

Because of the newer kernel for Gingerbread (2.6.35.7) we need newer modules for cifs and ext4. Compiled them:
download here: http://xda.richardtrip.org/?dir=tab/Gingerbread/modules
Before you ask.... a tun.ko is not needed (compiled in the kernel).
Correct me if im wrong but will these modules give us EXT4 support on ginger ?
crisvillani said:
Correct me if im wrong but will these modules give us EXT4 support on ginger ?
Click to expand...
Click to collapse
insmod /system/lib/modules/jbd2.ko
insmod /system/lib/modules/ext4.ko
and it should work.
how to?
i have kernel 2.6.32.9
hmm .. i doubt about it ... the rom is very fast and as far its good , why do i need to go for ext4 if the ext4 suck the battery life ?
k0sh said:
hmm .. i doubt about it ... the rom is very fast and as far its good , why do i need to go for ext4 if the ext4 suck the battery life ?
Click to expand...
Click to collapse
I have never heard of a file system sucking the battery life. If anything, FAT32 would be the worst used in practice today.
richardtrip said:
insmod /system/lib/modules/jbd2.ko
insmod /system/lib/modules/ext4.ko
and it should work.
Click to expand...
Click to collapse
So really dumb, newb ( but learning so much so quickly ) question. Can I get my CIFS support back to stream videos on Overcome 2.0.0 if I use
insmod /system/lib/modules/cifs.ko
insmod /system/lib/modules/slow-work ???
( think slow-work is needed from research )
( Settings ->About Device->Kernel Version 2.6.35.7 [email protected] #2 )
fidjit said:
So really dumb, newb ( but learning so much so quickly ) question. Can I get my CIFS support back to stream videos on Overcome 2.0.0 if I use
insmod /system/lib/modules/cifs.ko
insmod /system/lib/modules/slow-work ???
( think slow-work is needed from research )
( Settings ->About Device->Kernel Version 2.6.35.7 [email protected] #2 )
Click to expand...
Click to collapse
you need to load slow-work.ko first.
please,
howto install these modules on the new GB roms?
Wow. This is great now i have working cisco vpn.
Thank you very much
Sent from my GT-P1000 using XDA App
bartito said:
please,
howto install these modules on the new GB roms?
Click to expand...
Click to collapse
Download the modules to /system/lib/modules/ (or anywhere really, just not the SD card) then load them using insmod. If you need them of every boot you can use an init.d script to load them automatically
For those of you who are inept, please find a link below to the same modules inside a CWM flashable zip.
CLICK ME!
TheGrammarFreak said:
Download the modules to /system/lib/modules/ (or anywhere really, just not the SD card) then load them using insmod. If you need them of every boot you can use an init.d script to load them automatically
Click to expand...
Click to collapse
Unfortunatly, init.d doesn't work in current version...
Tried to manually load as per instructions.
Didn't seem to do anything to assist my cifs manager. Figured I'd go back to my nandroid backup I'd made just before. Stuck on Samsung screen. on reboot after restore
Had to do a restock and rebuild. As say in previous post learning a lot ..........like always take an Nandroid
Think I'll be leaving this to the experts and wait for a new already compiled kernel
fidjit said:
Tried to manually load as per instructions.
Didn't seem to do anything to assist my cifs manager. Figured I'd go back to my nandroid backup I'd made just before. Stuck on Samsung screen. on reboot after restore
Had to do a restock and rebuild. As say in previous post learning a lot ..........like always take an Nandroid
Think I'll be leaving this to the experts and wait for a new already compiled kernel
Click to expand...
Click to collapse
Cifs mananager doesn't help you. But it is simple to do that manually:
$su
#busybox insmod /system/lib/modules/easy-work.ko &&
#busybox insmod /system/lib/modules/cifs.ko
#mount -r -t cifs -o <YourShareName,login,password> <MountingPoint>
I use GscriptLite for that.
acolwill said:
For those of you who are inept, please find a link below to the same modules inside a CWM flashable zip.
CLICK ME!
Click to expand...
Click to collapse
so if i flash this via cwm it will give me ext4?
acolwill said:
For those of you who are inept, please find a link below to the same modules inside a CWM flashable zip.
CLICK ME!
Click to expand...
Click to collapse
Sorry for being inept, but that doesn't make CIFS Module to work
--
Enviado desde mi móvil
maxtcee said:
so if i flash this via cwm it will give me ext4?
Click to expand...
Click to collapse
it just copy the *.ko to your /lib/module,you still have to add script inside init.d to make it load automatically when boot
init.d dobt supported in gb, seems to me
howto make these modulez autoloaded without init.d?
bartito said:
init.d dobt supported in gb, seems to me
howto make these modulez autoloaded without init.d?
Click to expand...
Click to collapse
CF-Root will run scripts from init.d. Overcome includes CF-Root.
Sent from my Galaxy Tab. Now that's dedication

[RECOVERY] Custom Recovery AmonRA-GNM 2.2.1 for Optimus Me P350

So far fresh users can't post in development forum, I make post here.
maybe moderators can move this topic...
This is custom recovery for Optimus Me P350 based on AmonRA-GNM 2.2.1
How to install:
1. Yes, you need to have root GingerBreak APK
2. Download zip file in attachment and unpack, you get 3 files:
- recovery-RA-pecan-2.2.1-GNM-drap.img
- flash_image
- md5sum
3. check md5sum
Code:
md5sum -c md5sum
4. copy .img file and flash_image to sdcard
Code:
adb push recovery-RA-pecan-2.2.1-GNM-drap.img /sdcard/
adb push flash_image /sdcard/
5. login, remount /system in rw mode and "install" flash_image util
Code:
adb shell
$ su
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock1 /system
# cat /sdcard/flash_image > /system/bin/flash_image
# chmod 755 /system/bin/flash_image
# sync
6. and last but not least, flash it
RECOMMENDED
because there sometimes not enough virtual ram, it is recommended reboot phone before flashing
Code:
adb shell
$ su
# flash_image recovery /sdcard/recovery-RA-pecan-2.2.1-GNM-drap.img
# sync
7. reboot
Code:
# reboot recovery
Profit!
Update:
Now with custom recovery you can install customized linux kernel
Sources on Github
This is custom recovery for Micromax A60 based on AmonRA-GNM 2.2.1
DO NOT USE IT FOR LG P350
Is there a advantage to using this recovery over milks clockwork???? Or original recovery thunderdog?????
Sent from my LG-P500 using XDA Premium App running CM7 over clocked at 787
dislplin01 said:
Is there a advantage to using this recovery over milks clockwork???? Or original recovery thunderdog?????
787
Click to expand...
Click to collapse
No, you can't use it on P500 this is only for P350,
a post here because the is no forum for 350,
not yet ;-) I hope it comes in near future.
You did a great job mate. Finally,LG Optimus Me/Life(P350) is starting to get hacked.
thank you!!!
drapalyuk said:
No, you can't use it on P500 this is only for P350,
a post here because the is no forum for 350,
not yet ;-) I hope it comes in near future.
Click to expand...
Click to collapse
Good to know thanks
Sent from my LG-P500 using XDA Premium App running CM7 over clocked at 787
any custom roms for this device?
Pecamod for LG Optimus Me
Pecamod v0.5
FEATURES::
# Android 2.2.2 (V10F)
# root and BusyBox
# Deodex & Zipalign apks
# HW acceleration enabled + JIT enabled
# Heap size = 40MB
# Franciscofranco's tweaks applied on boot
# Script for SD-card
# Patch Hosts file
# Patch libsqlite.so
# Ad-hoc Wi-Fi
# New sound
# Front Honeycomb
megaupload . com/ ?d=J4L72S1K
Have you tried it? Is it good?
I from Russia. I make this ROM. This ROM is good....IMHO. Create backup and flash this rom)
I use p500 and my sister use p350..
She ask me for repair her optimus-me about memory drain, so i answered that nothing i can do for her phone.
So, Is this rom can help me?
Sent From a Long Time ago...
I can't register to the russian forum to get the recovery
EDIT: I got it. Thank you!
dislplin01 said:
Is there a advantage to using this recovery over milks clockwork???? Or original recovery thunderdog?????
Sent from my LG-P500 using XDA Premium App running CM7 over clocked at 787
Click to expand...
Click to collapse
lol
Sent from my... you know the rest.
method77 said:
I can't register to the russian forum to get the recovery
Click to expand...
Click to collapse
recovery in first message of this topic Custom Recovery AmonRA-GNM 2.2.1 for Optimus Me P350
drapalyuk said:
This is custom recovery for Micromax A60 based on AmonRA-GNM 2.2.1
DO NOT USE IT FOR LG P350
Click to expand...
Click to collapse
Well just now i have also tested it ant it works.
If you please let me know the fix it will be great, I am asking this because keys isn't matching as expected.
Also can you share the source code or the branch you have used?
Screenshots my ROM
help me i want to install recovery on P350
someone can give me tutorial how to use ADB on P350, it is same with P500??
or i can use Terminal-Emulator?
Please help me..
Sorry for my bad english.
ngage_me said:
Well just now i have also tested it ant it works.
If you please let me know the fix it will be great, I am asking this because keys isn't matching as expected.
Also can you share the source code or the branch you have used?
Click to expand...
Click to collapse
sure, i just need to clean up a lite bit remove tons of debug outputs
cupliz said:
someone can give me tutorial how to use ADB on P350, it is same with P500??
or i can use Terminal-Emulator?
Please help me..
Sorry for my bad english.
Click to expand...
Click to collapse
1. yes adb work similar for all android devices
2. and yes, you can use terminal emulator to execute commands
and just copy files to sd card in usual way
in our case we use adb to copy a files and for remote shell
some basic information about adb

[Q] CIFS support module

Hello,
I would like to use cifsmanager apps but I see that our kernel doesn't have the proper module built in.
I just updated the kernel and modules using the latest available in the the kernel build service (following the incremental updates guide):
http://xdandroid.com/wiki/Incremental_Updates
but I'm not able to insmod the module.
I also tried to manually download the cifs.ko module and to load it telling to cifsmanager app where the module is, but I continue to receive the same error, no such device, like if the module isn't loaded correctly.
How can I solve this problem?
Thank you
Why not just use adb...? I don't see the need for CIFS.
If you can figure out how to get CIFS working, we can look about implementing it mainline.
Have you tried insmodding it after cp'ing the .ko file to /lib/modules?
ok thank you,
I tried to load the module using adb, but I think I'm using a wrong file because when I try to load it insmod return me the "invalid module format" output.
I'm using the kernel downloaded here:
http://zimages.googlecode.com/files/htc-msm-linux-20110914_084441-package.tar.bz2
somebody can tell me if is there a module that I can use with this kernel?
thank you
Caio said:
ok thank you,
I tried to load the module using adb, but I think I'm using a wrong file because when I try to load it insmod return me the "invalid module format" output.
I'm using the kernel downloaded here:
http://zimages.googlecode.com/files/htc-msm-linux-20110914_084441-package.tar.bz2
somebody can tell me if is there a module that I can use with this kernel?
thank you
Click to expand...
Click to collapse
Where did you get the module from...? Our kernel is probably not equipped with that module.
Caio,i've sent you a pm,let me know if it works,so i'll maybe push it in the mainline kernel
I downloaded the module on a thread of HTC Diamond's...can someone link me a module that could work with this kernel?
Or is there another way I can use to mount my samba share on my android?
thank you
Caio said:
I downloaded the module on a thread of HTC Diamond's...can someone link me a module that could work with this kernel?
Or is there another way I can use to mount my samba share on my android?
thank you
Click to expand...
Click to collapse
Did you miss helicopter88's PM? He built you a kernel that should have the module built into it...
arrrghhh said:
Did you miss helicopter88's PM? He built you a kernel that should have the module built into it...
Click to expand...
Click to collapse
Failed to boot,pheraps my fault or too much oc..
Later i'll make a stock kernel
Here's the module http://www.mediafire.com/?w6fp94b464cktkc
So you can put it somewhere and insmod it
well, i have the same problem, can anyone solve it?
helicopter88 said:
Here's the module
So you can put it somewhere and insmod it
Click to expand...
Click to collapse
sadly to say that, but the files had been removed
Here's the module..
thanks for your reply, but seems no luck, it just says "invalid module format" when insmod (using the FRX07.1)
ZSaberLv0 said:
thanks for your reply, but seems no luck, it just says "invalid module format" when insmod (using the FRX07.1)
Click to expand...
Click to collapse
Pheraps I should make it from original xdandroid source..
Here's another one
http://www.mediafire.com/file/wsw6tlah3lzp3gs/cifs.ko
helicopter88 said:
Pheraps I should make it from original xdandroid source..
Here's another one
http://www.mediafire.com/file/wsw6tlah3lzp3gs/cifs.ko
Click to expand...
Click to collapse
Didn't you just say it was some simple config flag?
Make use of that "recognized developer" insignia you throw around there and commit something . (Or at least post something to the ML!!)
still doesn't work, shows the same message when insmod or insmod -f
btw, the kernel is modules-2.6.27.46-01356-gd4c73bd.tar.gz, maybe you should build a complete one? (well, i have never played with linux kernel...)
ZSaberLv0 said:
still doesn't work, shows the same message when insmod or insmod -f
btw, the kernel is modules-2.6.27.46-01356-gd4c73bd.tar.gz, maybe you should build a complete one? (well, i have never played with linux kernel...)
Click to expand...
Click to collapse
Assuming his patch is accepted, it will get committed mainline. It's a quite simple change to how the kernel is built.
arrrghhh said:
Assuming his patch is accepted, it will get committed mainline. It's a quite simple change to how the kernel is built.
Click to expand...
Click to collapse
I think phh had an issue with the patch submitted. I have a patch to commit soon so i can look into this. One question i have is how do yall plan to load the module? Does the app insmod it ? or does it expect the module to be built into the kernel?
[ACL] said:
I think phh had an issue with the patch submitted. I have a patch to commit soon so i can look into this. One question i have is how do yall plan to load the module? Does the app insmod it ? or does it expect the module to be built into the kernel?
Click to expand...
Click to collapse
I think people just want the module available in the 'modules`uname-r`.tar.gz' file. That way they at least have the option of insmodding it...(*.user.conf etc) who knows what they want to do with it afterwards - I guess access their phone on a LAN from their PC?
just want to mount my share folder from my PC to Android, so that i can use the shared files online without copy-paste (it'll be quite annoying by copy-paste, especially when you want to edit file, because you must upload it after editing)
in short, same as Caio, just want to use cifsmanager, and it says "no such device"
ZSaberLv0 said:
just want to mount my share folder from my PC to Android, so that i can use the shared files online without copy-paste (it'll be quite annoying by copy-paste, especially when you want to edit file, because you must upload it after editing)
in short, same as Caio, just want to use cifsmanager, and it says "no such device"
Click to expand...
Click to collapse
The fixed patch has been sent to Mailing List,now let's see if it gets approved..

/etc/init.d support in AK Purity kernel?

I'm using the AK Purity kernel 0.30 along with Andorid 4.2.2 stock. I've notice a file named 99zipalign in /system/etc/init.d/ so I've supposed that this kernel supports init.d. I've placed a custom file 00akkern in that folder, for setting the kernel governor at boot time:
Code:
#!/system/bin/sh
# ==============================================================
# CPU settings
# ==============================================================
echo interactivex > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
echo 350000 > /sys/devices/system/cpu/cpu0/cpufreq/screen_off_max_freq;
These commands work fine in terminal. Then I've fixed permissions:
Code:
chmod 755 00akkern
But it's not working!
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Still getting interactive, that's the default.
Thanks :fingers-crossed:
Why not just use Trickster MOD?
lost_ said:
Why not just use Trickster MOD?
Click to expand...
Click to collapse
I want to learn how this stuff works and because I don't need an app just to tweak two settings...
No one?
supporting init.d scripts or not isn't the kernel thing... it's the ROM thing.
if you are using stock rom (probably the factory image I guess...), you should get rooted your phone and install busybox on rom
after that init.d scripts will work fine
R: /etc/init.d support in AK Purity kernel?
dozingblack said:
supporting init.d scripts or not isn't the kernel thing... it's the ROM thing.
if you are using stock rom (probably the factory image I guess...), you should get rooted your phone and install busybox on rom
after that init.d scripts will work fine
Click to expand...
Click to collapse
Thank you very much! I've asked a question in the AK thread about support for init.d and no one has mentioned the fact that's it's a ROM feature. Yes, I'm stock. Which busybox should I install? Should I configure it for enabling init.d support?
Inviato dal mio Galaxy Nexus con Tapatalk 2
Gremo said:
Which busybox should I install? Should I configure it for enabling init.d support?
Click to expand...
Click to collapse
I'm not remembering precise name of it... maybe Stericson's Busybox in Play Store. Download it and install busybox at /system/xbin folder.
And after that if your device's permission of /system/etc/init.d and scripts file inside of it has set right(755, check it via root explorer or other file explorers that can have root access), one rebooting of nexus will make the scripts start to work
[sorry for my awful english i know mine is quite bad... but i'm learning and practicing it!]
dozingblack said:
I'm not remembering precise name of it... maybe Stericson's Busybox in Play Store. Download it and install busybox at /system/xbin folder.
And after that if your device's permission of /system/etc/init.d and scripts file inside of it has set right(755, check it via root explorer or other file explorers that can have root access), one rebooting of nexus will make the scripts start to work
[sorry for my awful english i know mine is quite bad... but i'm learning and practicing it!]
Click to expand...
Click to collapse
I've ended up installing busybox lmanually (busybox --install -s /system/xbin). Busybox commands works fine, but my init.d script still doesn't work! Any idea?
Permissions of /system/etc:
Code:
drwxr-xr-x root root 2013-03-09 22:14 init.d
Inside /system/etc/init.d:
Code:
-rwxr-xr-x root shell 1425 2008-08-01 14:00 99zipalign
-rwxr-xr-x root shell 317 2013-03-09 16:47 99akkernel
init.d is fully working into kernel.
Have you launch script with scriptmanager before put into init.d folder?
Do you have any errors?
anarkia1976 said:
init.d is fully working into kernel.
Have you launch script with scriptmanager before put into init.d folder?
Do you have any errors?
Click to expand...
Click to collapse
Thank you for helping anarkia! You were right: there was a problem with the file (line endings). I've edited it using vi and now the governor part works. The only think that does not work is setting the screen_off_max_freq.
When i boot i get interactivex and 700000 (wrong). After manually executing sh 99akkernel i get the correct values: interactivex and 350000
Is there any restriction about screen_off_max_freq that I don't know?
You can try to add "sleep x" command before screen off.

[Q] Frandom

I did a little search but couldn't actually find a thing. Is there any kernel for 4.1.2 with Frandom module instead of Urandom?
Sent from my Galaxy Nexus
Anyone? I read around that frandom should give real improvement compared to urandom, but didn't actually notice much people talking about it!
Sent from my Galaxy Nexus
have a look at this MOD CrossBreeder,
Frandom support (Optional)
Click to expand...
Click to collapse
i'm on Amperific's Kernel [A.S.K.P-Build14] with CrossBreeder, and i must say its a killer combination, i havnt tried the Frandom though..
Peace,
LastForOne
lastforone said:
have a look at this MOD CrossBreeder,
i'm on Amperific's Kernel [A.S.K.P-Build14] with CrossBreeder, and i must say its a killer combination, i havnt tried the Frandom though..
Peace,
LastForOne
Click to expand...
Click to collapse
I had a look at it, but still isn't what I'm looking for.
It says frandom module still needs to be compiled from the kernel source, and I'm not good at it. I googled a little bit to have an idea about what compiling a module means but it seems too difficult for my experience (never compiled a thing ).
So maybe someone could briefly link me a to a tutorial or (and this would be way better) explain me how to do it...
That would really be appreciated..
Acording to this guy seems like an easy thing.. If one is used to compiling modules.. >>
https://github.com/Ryuinferno/frandom-android
Sent from my Galaxy Nexus
I'll have a look at it and get back to you...
EDIT: I'l just quote this.
You will need to ask your ROM developer to develop the kernel module for you and then place it in /system/lib/modules.
&
Advanced users can even try and load the frandom module built for other kernels if they don't have one readily available for their own kernel version using the Punchmod utility.
Click to expand...
Click to collapse
so as it says you can try the Punchmod but before you do that i'd recommend you to give a try to Amperific's Kernel [A.S.K.P-Build14] with CrossBreeder combo, you may not even need the frandom after that.
Thank you for your suggestion, but I'm looking for the frandom module alone.. In addition, I'm on 4.1.2 so I'm using old kernels!
I think I'll just try asking for someone to compile it for me, provided with the kernel sources.. Or in extremis I'll try compiling it myself..
Sent from my Galaxy Nexus
Jar3112 said:
Thank you for your suggestion, but I'm looking for the frandom module alone.. In addition, I'm on 4.1.2 so I'm using old kernels!
I think I'll just try asking for someone to compile it for me, provided with the kernel sources.. Or in extremis I'll try compiling it myself..
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
GoodLuck with that ^^
After many tries, I managed to compile frandom for my kernel, though executing insmod gave an error:
[email protected]:/ $ su
[email protected]:/ # cd /sdcard
[email protected]:/sdcard # insmod frandom.ko
insmod: init_module 'frandom.ko' failed (Exec format error)
How can I troubleshoot this error? Maybe I should run the insmod command on the pc, using adb shell?
Sent from my Galaxy Nexus
Jar3112 said:
After many tries, I managed to compile frandom for my kernel, though executing insmod gave an error:
[email protected]:/ $ su
[email protected]:/ # cd /sdcard
[email protected]:/sdcard # insmod frandom.ko
insmod: init_module 'frandom.ko' failed (Exec format error)
How can I troubleshoot this error? Maybe I should run the insmod command on the pc, using adb shell?
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
I found something else.
After facing the error I executed dmesg and this was the output:
<3>[23304.409484] frandom: version magic '3..0..31-04244-g560d2c8-dirty SMP preempt mod_unload ARMv7 ' should be '3.0.31-04244-g560d2c8-dirty SMP preempt mod_unload ARMv7 '
I tried changing the extraversion in the kernel source makefile, but still couldn't find the right, what am i missing?
I swear after this I'm writing a noob-proof tutorial for compiling kernel modules.
That would surely help, considering the amount of difficulties I am facing trying this for the first time..
Sent from my Galaxy Nexus

Categories

Resources