[FOR CHEFS] xpad/cifs/hfs/squashfs/btrfs modules for stock kernel ICS v9.2.1.11 - Eee Pad Transformer Android Development

I took a vanilla 2.6.39.4 linux source tree, copied in the .config from /proc from my running ICS v9 build. And compiled it.
After that, turned on CIFS and XPAD support in the config and compiled them as modules.
These modules load fine if I insmod them, and I can confirm that after loading ff_memless and xpad I now have my xbox360 pad working on the home screen (I can move through screens and icons).
edit: Just played a round of Riptide GP, works fine .
edit: I updated the cifs module and included the md4 crypto module, and they now work! I manually 'insmodded' md4.ko and then cifs.ko, and from the command line and / or from cifsmanger I can now mount a share.
As I said, these modules load fine, but in dmesg there is a notion that the version magic isn't perfect yet. So I might make updated ones with proper versionmagic set. But for now it seems to be working.
Might be handy for ROM chefs who are working with the stock ICS kernel for which we have no sources yet.
TUN module is _builtin_ by default on ICS stock kernel, so no need for it anymore.
EDIT v2 zips: I recompiled them with the correct version info, so they give no more warnings when loaded through insmod. I added them to my stock rom to auto-load during boot (created a simple /system/etc/install-recovery.sh) and all seems fine so far.
For voodoo sound to work, is it a simple module which I can get anywhere? I only see 2.6.36 kernel trees on Project Voodoo website
----------------------------------------------------------
hfs @ http://forum.xda-developers.com/showpost.php?p=23018909&postcount=19
squashfs + btrfs @ http://forum.xda-developers.com/showpost.php?p=23019453&postcount=20

good for those complaining about cifs

dipje said:
I took a vanilla 2.6.39.4 linux source tree, copied in the .config from /proc from my running ICS v9 build. And compiled it.
After that, turned on CIFS and XPAD support in the config and compiled them as modules.
These modules load fine if I insmod them, and I can confirm that after loading ff_memless and xpad I now have my xbox360 pad working on the home screen (I can move through screens and icons).
edit: Just played a round of Riptide GP, works fine .
edit: I updated the cifs module and included the md4 crypto module, and they now work! I manually 'insmodded' md4.ko and then cifs.ko, and from the command line and / or from cifsmanger I can now mount a share.
As I said, these modules load fine, but in dmesg there is a notion that the version magic isn't perfect yet. So I might make updated ones with proper versionmagic set. But for now it seems to be working.
Might be handy for ROM chefs who are working with the stock ICS kernel for which we have no sources yet.
TUN module is _builtin_ by default on ICS stock kernel, so no need for it anymore.
For voodoo sound to work, is it a simple module which I can get anywhere? I only see 2.6.36 kernel trees on Project Voodoo website
Click to expand...
Click to collapse
in case you want to try that too because its faster than cifs
nfs support is in the kernel, no additional modules required
to get it working with cifsmanager mountings nfs shares i did the following
(it also works with commandline)
### as su and /system readwrite mounted
### remove symlink to toolbox
rm /system/bin/mount
### and use busybox instead
ln -s /system/xbin/busybox /system/bin/mount
mount options: rw,intr,soft,nolock

the modules are already working.
NFS support is nice for people with linux boxes but most windows users don't have a use for it , that's why they want cifs .
I don't care much for overclocking, so with cifs support + xbox360 support I'm more than happy with rooted stock now . And rom chefs can include the modules in their optimized ROMs until we have proper kernel source

Care to share how to get this loaded into the current ics roms. I have copied to /system/lib/modules and tried to load using mount manager and cifs manager with no luck.

comfort69 said:
Care to share how to get this loaded into the current ics roms. I have copied to /system/lib/modules and tried to load using mount manager and cifs manager with no luck.
Click to expand...
Click to collapse
you can e.g. create a script (like I believe OP did) in /etc/system/install-recovery.sh with
#!/system/bin/sh
insmod cifs.ko
insmod md4.ko
or you can mount it by hand in terminal (with insmod)

or you can simply create init.d script and call it 91modules:
#!/system/bin/sh
sleep 1
insmod /system/lib/modules/cifs.ko
echo "CIFS support activated";
and place it in system/etc/init.d if custom ROM supports init.d support.

comfort69 said:
Care to share how to get this loaded into the current ics roms. I have copied to /system/lib/modules and tried to load using mount manager and cifs manager with no luck.
Click to expand...
Click to collapse
jerry was close. Module auto-loading won't work, so you have to do it by hand.
Through an 'adb shell' or with a terminal emulator app from the market, type the following:
su -
insmod /system/lib/modules/md4.ko
insmod /system/lib/modules/cifs.ko
cifsmanager should work, until you reboot, you'll have to do the lines again.
Creating a file /system/etc/install-recovery.sh will do it auto on boot:
Code:
#!/system/bin/sh
insmod /system/lib/modules/md4.ko
insmod /system/lib/modules/cifs.ko
Make sure to create the file executable (permissions 777 will do ).
I hope rom chefs will use them and make them auto-load at boot until we have the sources from Asus.
edit: What mike said works, IF you have init.d support. Most custom ROMs have this, stock rom has not I believe.

dipje said:
jerry was close. Module auto-loading won't work, so you have to do it by hand.
Through an 'adb shell' or with a terminal emulator app from the market, type the following:
su -
insmod /system/lib/modules/md4.ko
insmod /system/lib/modules/cifs.ko
cifsmanager should work, until you reboot, you'll have to do the lines again.
Creating a file /system/etc/install-recovery.sh will do it auto on boot:
Code:
#!/system/bin/sh
insmod /system/lib/modules/md4.ko
insmod /system/lib/modules/cifs.ko
Make sure to create the file executable (permissions 777 will do ).
I hope rom chefs will use them and make them auto-load at boot until we have the sources from Asus.
Click to expand...
Click to collapse
Keep in mind that install-recovery.sh is executed from ramdisk (init.ventana.rc or init.rc, don't remember now) and some chefs (including me) removed that execution line. So much easier to add init.d script I think. Just a suggestion
EDIT:
yeah, for those on stock ROMs install-recovery.sh method is good, for those using custom ROMs it's better to use init.d

I tried to get it to run manually using terminal emulator and get
failed file exists
Sent from my Transformer TF101 using Tapatalk

comfort69 said:
I tried to get it to run manually using terminal emulator and get
failed file exists
Sent from my Transformer TF101 using Tapatalk
Click to expand...
Click to collapse
my guess is you're trying to load them double or something.
If you give the command 'lsmod' you get a listed of loaded modules. Check if they're there or not.

Anyone got Junos working with the builtin tun.ko ?

comfort69 said:
Care to share how to get this loaded into the current ics roms. I have copied to /system/lib/modules and tried to load using mount manager and cifs manager with no luck.
Click to expand...
Click to collapse
cifsmanager - preferences:
check "load with insmod"
if its not already, adjust path to cifs.ko and other modules
btw: as rmmod tries to remove /lib/modules/cifs.ko instead of /system/lib/modules/cifs.ko there's no way to unload the module other than rebooting.

just sharing how I did manage cifs to work
I've installed Revolution HD 3.00 (ICS 4.0.3), installed CifsManager, didn't work, tried to copy cifs.ko and md4.ko in /system/lib/modules with File Expert or Root Explorer, couldn't because of a read-only system files, plugged my tablet on a PC, launched an adb session and typed:
$ adb shell
$ su
$ mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
pushed through adb cifs.ko and md4.ko in /system/lib/modules
changed the permission to 777 using File Expert
launched cifs and md4 using terminal emulator:
insmod /system/lib/modules/cifs.ko
insmod /system/lib/modules/md4.ko
in cifsmanager settings, didn't check load modules on boot and load through insmod
tried to connect my shares: succeed
Hope it will help somebody

jeanvdr said:
$ mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
hmm strange
my /system is mounted elsewhere
/dev/block/mmcblk0p1 on /system type ext4
anyway
another method without terminal (and.revol hd 3.0.0 only)
adb shell sysrw
adb push cifs.ko /system/lib/modules
adb push md4.ko /system/lib/modules
adb shell chmod 644 /system/lib/modules/*.ko
adb shell insmod /system/lib/modules/cifs.ko
adb shell insmod /system/lib/modules/md4.ko

If the modules don't cause problems, they will likely be in the next ARHD version.
Remounting goes like this: busybox mount -o remount,rw /system
Yaffs2 filesystem isn't used anymore, and 'remount ' ignores these parameters anyway .
Please keep it readable for people on stock ics, custom roms will get these modules somehow anyway.
Adb sysrw will not work without modified bootdisk AFAIK.
Wat is Janos? ? Maybe it needs more than the tun module, like crypto modules?
Btw, my tablet still working fine. Never had a Sleep of Death. Actually, never EVER had a SOD with my tablet, and I can't seem how any cifs module can cause it like some people are saying.

woti23 said:
cifsmanager - preferences:
check "load with insmod"
if its not already, adjust path to cifs.ko and other modules
Click to expand...
Click to collapse
The problem is this cifs.ko module required md4.ko, and AFAIK cifsmanager doesn't try to load it.

dipje said:
The problem is this cifs.ko module required md4.ko, and AFAIK cifsmanager doesn't try to load it.
Click to expand...
Click to collapse
actually it does, if you
check "load cifs module at start"
check "load per insmod"
fill out "path to cifs.ko":
/system/lib/modules/cifs.ko:/system/lib/modules/md4.ko:/system/lib/modules/nls_iso8859_1.ko
[email protected]:/~# >lsmod
nls_iso8859_1 3107 0 - Live 0xbf066000
cifs 218286 0 - Live 0xbf12a000
md4 3007 0 - Live 0xbf003000
it is a little work to type the pathes, and you surely are right that for most people its easier if it is loaded in the rom (init.d or somewhere else) automagically
btw: if you once compile modules again would you mind compiling the hfsplus module en passant? it should compile without any troubles and dependencies and allows manually (command line) mounting a mac os x external harddisk?

woti23 said:
btw: if you once compile modules again would you mind compiling the hfsplus module en passant? it should compile without any troubles and dependencies and allows manually (command line) mounting a mac os x external harddisk?
Click to expand...
Click to collapse
I haven't tested them (as in, didn't even try if they would load OK).
I just noticed I screwed up the vermagic again, so you'll get a warning in dmesg while loading. Should load ok though.
edit: Ok I've redone them. Proper cpu + vermagic now

And if people wanna experiment, mess with stuff:
squashfs
btrfs

Related

[KERNEL] CIFS + UTF8 NLS support for the official HTC Desire Froyo kernel

with the release of the source code for the bravo kernel this has become redundant
to be able to directly access my stuff on samba shares i made a _patch_ for the cifs code in 2.6.32.15 and built cifs.ko and nls_utf8.ko with arm-eabi-4.4.0
i thought i'd share them here in case it was of use to anyone else
this is how i installed them:
Code:
(boot into recovery mode)
$ adb shell mount /system
$ adb push cifs.ko /system/lib/modules
$ adb push nls_utf8.ko /system/lib/modules
$ adb shell chmod 644 /system/lib/modules/*.ko
$ adb shell "cd /system/lib/modules; ln -s . 2.6.32.15-gf9c0527"
$ adb shell umount /system
(reboot)
this is how i tested them:
Code:
sh-3.2$ su
sh-3.2# modprobe nls_utf8
sh-3.2# modprobe cifs
sh-3.2# busybox mount -t cifs -o user=<username>,password=<password>,uid=1000,gid=1015,file_mode=0775,dir_mode=0775,iocharset=utf8,nodfs //10.0.1.2/public2 /sdcard/smb/public2
(1015 is the gid of 'sdcard_rw')
--
cifs_bravo_2.6.32.15-gf9c0527.zip
cifs_bravo_2.6.32.15-gd96f2c0.zip
Hey cheers for this will try it out
Sent from my C64
just tried
init_module 'cifs.ko' failed (Exec format error)
epyon1873 said:
init_module 'cifs.ko' failed (Exec format error)
Click to expand...
Click to collapse
as stated above it works with the stock htc kernel, which is 2.6.32.15-gf9c0527
check the output of uname -r
snq- said:
as stated above it works with the stock htc kernel, which is 2.6.32.15-gf9c0527
check the output of uname -r
Click to expand...
Click to collapse
Thx find htc kernel is 2.6.32.15-g1fc4045 @ NexTSense Rom orz
epyon1873 said:
Thx find htc kernel is 2.6.32.15-g1fc4045 @ NexTSense Rom
Click to expand...
Click to collapse
afaik the current nextsense comes with Myshkinbob's cifs module (although not with the latest one) - it's module version id was simply patched to suppress the version mismatch error message you got
here is mine if still interested:
(be sure to type "ln -s . 2.6.32.15-g1fc4045" instead of "ln -s . 2.6.32.15-gf9c0527" when installing)
--
cifs_bravo_2.6.32.15-g1fc4045.zip
Thx~! go to try it.
Greetings,
I tried using your patch on the source for the supersonic (evo) and it went in and compiled perfectly, i was able to do an insmod and loaded the driver fine, but when i go to do a mount the phone crashes.
any ideas?
(i have tried both the arm-eabi-4.4.0 and the arm-2010q1 toolchains)
Thanks!!
adambot said:
I tried using your patch on the source for the supersonic (evo) and it went in and compiled perfectly, i was able to do an insmod and loaded the driver fine, but when i go to do a mount the phone crashes.
any ideas?
(i have tried both the arm-eabi-4.4.0 and the arm-2010q1 toolchains)
Click to expand...
Click to collapse
the patch does not cleanly apply to supersonic-2.6.32.15-g746f4f0, as it is for vanilla 2.6.32.15
please overwrite fs/cifs with the vanilla sources before you apply it
just tried and was able to build the very same .ko published in the first post (except for the buildstamp of course):
pulled the supersonic kernel source from developer.htc.com
overwrote fs/cifs/* with vanilla
pulled & applied the patch from pastebin
pulled .config from my phone
in menuconfig
set the localversion (general setup)
selected cifs + nls_utf8 to be built as module
did _not_ touch the debug options already set
did 'make modules'
stripped the modules with arm-eabi-strip --strip-debug
insmod worked, mount worked, browsing the share worked
if you get crashes, check /proc/last_kmsg after reboot
snq- said:
the patch does not cleanly apply to supersonic-2.6.32.15-g746f4f0, as it is for vanilla 2.6.32.15
please overwrite fs/cifs with the vanilla sources before you apply it
Click to expand...
Click to collapse
What is considered "vanilla sources"?
I used git and pulled the whole android repo but am not finding the vanilla sources there...
do you mean the vanilla linux sources??
[edit]
i tried the cifs files from the vanilla linux source (same version) but the phone still crashes (even after the debug strip)
Should i try to use a different config (rather than the one from the supersonic templates?)
Do you have an evo that you tested this on?
Thanks again!!!
[/edit]
adambot said:
do you mean the vanilla linux sources??
Click to expand...
Click to collapse
sorry if i wasn't clear enough. linux-2.6.32.15.tar.bz2 (kernel.org)
adambot said:
Should i try to use a different config
Click to expand...
Click to collapse
i pulled the config from the device ($adb shell zcat /proc/config.gz > .config)
i do not own an evo, the only reason for me to use evo/incredible sources is that htc haven't released bravo-froyo kernel sources yet
adambot, please let me know if this works for you
--
cifs_supersonic_2.6.32.15-g746f4f0.zip
snq- said:
adambot, please let me know if this works for you
Click to expand...
Click to collapse
WOW!!! That worked PERFECTLY!!!!!
Thanks SO MUCH!!!
(now i just have to figure out why mine wasn't working... I'll try again with your steps and compare the good one to mine with diff)
if you don't mind just to recap:
get linux vanilla kernel source
get supersonic kernel source
replace supersonic fs/cifs with vanilla
edit Makefile with extra EXTRAVERSION info
get .config from running device
make CROSS_COMPILE=CROSS_COMPILE=arm-eabi-4.4.0/bin/arm-eabi- oldconfig (accept defaults)
edit .config and make cifs and nls_utf8 modules
make CROSS_COMPILE=arm-eabi-4.4.0/bin/arm-eabi- modules
arm-eabi-4.4.0/bin/arm-eabi-strip fs/cifs/cifs.ko and fs/nls/nls_utf8.ko
adambot said:
WOW!!! That worked PERFECTLY!!!!! Thanks SO MUCH!!!
Click to expand...
Click to collapse
no problem, glad it worked out
adambot said:
if you don't mind just to recap: ...
Click to expand...
Click to collapse
- i don't see the step where you applied the patch
- i didn't edit the makefile per hand
- i didn't edit .config per hand
- as i don't own an evo, instead of pulling the config from the device i did a 'make supersonic_defconfig' before 'make menuconfig'
snq- said:
no problem, glad it worked out
- i don't see the step where you applied the patch
- i didn't edit the makefile per hand
- i didn't edit .config per hand
- as i don't own an evo, instead of pulling the config from the device i did a 'make supersonic_defconfig' before 'make menuconfig'
Click to expand...
Click to collapse
I got it to work FINALLY!!! I will be posting the step by step (copy/paste) directions in the evo section. Do you mind if i post the patch here as an attachment? also -- how do you want credit -- do snq- or do a different name?
thanks again!!
Adam
adambot said:
Do you mind if i post the patch here as an attachment?
Click to expand...
Click to collapse
feel free to use it for whatever you want
you might however want to post the patch directly applicable to the supersonic source (attached)
thanks for crediting me, using the nick is fine
--
supersonic-2.6.32.15-g746f4f0_cifs.patch
snq- said:
feel free to use it for whatever you want
you might however want to post the patch directly applicable to the supersonic source (attached)
thanks for crediting me, using the nick is fine
Click to expand...
Click to collapse
What did you do differently? (or what is the difference between cifs-supersonic and cifs-vanilla) -- I would look myself, but i'm not the best at coding... (that's what i get for being a sysadmin and not a dev -- but i can script until the cows come home )
Help me
I need nls_utf8.ko for 2.6.34 kernel
I would like cifs module for 2.6.32.15-g6a358a9 kernel, is it posible?
Thanks!
any for 2.6.32.15-ge2fb08e?

wifi cifs

I've searched and posted twice about this. Has anyone with a wifi xoom gotten cifs to mount successfully? I can mount fine on my incredible but nothing on my xoom....just "no such device"
Same issue here, even after flashing a kernel with cifs support. I am using wifi on a 3G Xoom.
Yes. It probably has to do with the wrong path to the system modules. Actually, that /system/lib/modules path is pretty common. So you're probably not checking the option to load via insmod - double check the path to make sure its correct. Also try (via terminal emulator) cd /system/lib/modules && insmod cifs.ko
And then lsmod (if you have busybox set up) to verify. On second thought, cifsmanager has sort of a built in lsmod via clicking "about" and then "modules". You should see bcm4329 (or dhd, I don't know what its called on the Xoom exactly) and if the cifs module is correctly loaded - you should also see cifs loaded.

CIFS Manager on CM 7

Here is what I've tried:
1. Settings -> about tablet to get kernel version: 2.6.32.39-cyanogenmod [email protected] #1
2. Go to http://droidbasement.com/db-blog/ and find the kernel for gTab. There are several one, I just picked one with Gingerbread and downloaded
lib-2632.39_gb.tar.gz
Unpack on put cifs.ko under /system/lib/modules
3. Install CIFS Manger
4. Run CIFS Manager, add the share
5. If there is problem mount it in rw mode, use option "rw,noperm" (thanks, rajeevvp)
The share is successfully mounted.
Thanks!
redhonker said:
Here is what I've tried:
1. Settings -> about tablet to get kernel version: 2.6.32.39-cyanogenmod [email protected] #1
2. Go to http://droidbasement.com/db-blog/ and find the kernel for gTab. There are several one, I just picked one with Gingerbread and downloaded
lib-2632.39_gb.tar.gz
Unpack on put cifs.ko under /system/lib/modules
3. Install CIFS Manger
4. Run CIFS Manager, add the share
The share is successfully mounted.
The only issue I have is that it can't seem to mount a share in read-write mode even though it's shared with write permission. Does anyone know how to fix it?
Thanks!
Click to expand...
Click to collapse
After pushing the cifs module to the tablet you need to add an chmod and then you also need a insmod line every time you want to use it (at least after following a reboot).
Go back and read the instructions on droid basement. He has the details of the steps following loading the cifs.ko.
Good luck.
Sent from my ADR6300 using Tapatalk
CIFS manager already loads the module fine. Are you saying in order to mount in rw mode, it needs permission on cifs.ko file?
redhonker said:
CIFS manager already loads the module fine. Are you saying in order to mount in rw mode, it needs permission on cifs.ko file?
Click to expand...
Click to collapse
No, you don't.
CIFS Manager should have an option to do a read-write mount.
Otherwise, you can try changing the mounting back into read-write mode:
Code:
$ su
# /system/xbin/mount -w -o remount /CIFS/PATH
Replace, /CIFS/PATH with the directory you provided to CIFS Manager.
Also, understand my cautions, as mentioned in the other thread, about mixing and matching kernels and kernel modules. I would suggest that you also install the kernel that goes with the module file you downloaded--ie. get the one in the same blog post.
Appreciate your advice on not mixing kernel and modules. I could not tell which exact build CM 7 uses so I had to pick one. When I get more experienced with Android, I may start changing kernels.
Doesn't CIFS uses rw mount by default? If not, what's the option? rw? I've tried that as well.
If I change the system file to mount it by default, I'd have to save the password on the command line, right? Will wireless be ready at that time? And if server or wireless is not ready at the time, I'd need to manually remount with some tool, do I?
Thanks!
redhonker said:
Appreciate your advice on not mixing kernel and modules. I could not tell which exact build CM 7 uses so I had to pick one. When I get more experienced with Android, I may start changing kernels.
Doesn't CIFS uses rw mount by default? If not, what's the option? rw? I've tried that as well.
If I change the system file to mount it by default, I'd have to save the password on the command line, right? Will wireless be ready at that time? And if server or wireless is not ready at the time, I'd need to manually remount with some tool, do I?
Thanks!
Click to expand...
Click to collapse
Cm7 includes pershoots kernel. The gb one.
Sent from my ADR6300 using Tapatalk
not to confuse issue with whatop is having but I wonder if anyone has run into a problem with cifs in which it doesn't include all of the folders from your windows shares.
redhonker said:
Here is what I've tried:
1. Settings -> about tablet to get kernel version: 2.6.32.39-cyanogenmod [email protected] #1
2. Go to http://droidbasement.com/db-blog/ and find the kernel for gTab. There are several one, I just picked one with Gingerbread and downloaded
lib-2632.39_gb.tar.gz
Unpack on put cifs.ko under /system/lib/modules
3. Install CIFS Manger
4. Run CIFS Manager, add the share
The share is successfully mounted.
The only issue I have is that it can't seem to mount a share in read-write mode even though it's shared with write permission. Does anyone know how to fix it?
Thanks!
Click to expand...
Click to collapse
OP,
See modified instructions from your first post. This should get you up and running.
1. Settings -> about tablet to get kernel version: 2.6.32.39-cyanogenmod [email protected] #1
2. Go to http://droidbasement.com/db-blog/ and find the kernel for gTab. There are several one, I just picked one with Gingerbread and downloaded
lib-2632.39_gb.tar.gz
Unpack on put cifs.ko under /system/lib/modules/2.6.32.39-cyanogenmod/
From ADB or terminal emulator (enable SU and do not need the adb part)
adb remount
adb shell chmod 644 /system/lib/modules/2.6.32.39-cyanogenmod/MODULE.ko
adb shell insmod /system/lib/modules/2.6.32.39-cyanogenmod/MODULE.ko
3. Install CIFS Manger
4. Run CIFS Manager, add the share
I wanted to help you with this earlier but been sidetracked. I hope this helps
redhonker said:
Doesn't CIFS uses rw mount by default? If not, what's the option? rw?
Click to expand...
Click to collapse
Yes, by default it should be mounted read-write. If, for some reason, it gets mounted read-only, you can use the remount command I gave earlier to make the mount read-write again.
But, there could be other reasons for you not being able to write to the share directory. Permission and UID/GID mismatches could be one reason. Try adding the "noperm" flag to tell Linux not to check permissions locally ie. do the permission checking only on Windows:
Code:
/system/xbin/mount -t cifs //SERVER-IP-ADDRESS/SHARENAME /some/path -o rw,noperm,domain=DOMAIN,username=USER.NAME,password=PASSWORD
If I change the system file to mount it by default, I'd have to save the password on the command line, right? Will wireless be ready at that time? And if server or wireless is not ready at the time, I'd need to manually remount with some tool, do I?
Click to expand...
Click to collapse
Which system file? If you mean /etc/fstab, then that file does not exist on Android.
CIFS Manager (I haven't used it) should have an option to let you store the password securely. On normal Unix systems, the mount command accepts a "credentials=/some/file.txt" option which can be used in place of the "domain=XXX,username=YYY" options when mounting. Unfortunately, the mount command on the gTablet does not understand that option--I checked: you have to do it the old-fashioned way. You can't even skip the "password=" bit. On Unix, if you skip that, the mount command will prompt you for the password.
The solution, if you don't use CIFS Manager, is to place all the commands--the insmod and the mount--into a shell-script and give it 700 permissions. That way only the owner can see what's inside it and you can run the script after the wireless has come up.
noperm does the trick. Will update first post.
Oozura said:
From ADB or terminal emulator (enable SU and do not need the adb part)
adb remount
adb shell chmod 644 /system/lib/modules/2.6.32.39-cyanogenmod/MODULE.ko
adb shell insmod /system/lib/modules/2.6.32.39-cyanogenmod/MODULE.ko
[/B]
Click to expand...
Click to collapse
Could you explain the exact process for doing this from a terminal emulator. My main hold up is the /system directory being read only, so I can't copy the module (CIFS.KO in this case) to that directory.
h3llphyre said:
Could you explain the exact process for doing this from a terminal emulator. My main hold up is the /system directory being read only, so I can't copy the module (CIFS.KO in this case) to that directory.
Click to expand...
Click to collapse
You don't need to put cifs.ko into /system. If CIFS Manager asks for the path to a cifs.ko file, then you can put the file anywhere you want.
I have a new problem. There seems to be a limit on the file size. I have a 3 GB file shows up as 28 KB. Does anyone have success with large file? Thanks
I tried your instruction... there are two problems...(my rom is also cm7.0.3)
1. I can't put the cifs.ko into /system/lib/modules~ it seems that it is forbid to copy some files into system folder...
2. so I tried to put the cifs.ko in the /mnt/cifs.ko, and made the related setting in cifs manager(path to cifs.ko), then i mounted, but it showed that:"no route to host"
but i am sure that my ip and password is correct... so is there anyone know how to solve this problem?
I used Root Explorer. I am sure there are other means to put it under /system. I am not sure if that's necessary
savage0 said:
I tried your instruction... there are two problems...(my rom is also cm7.0.3)
1. I can't put the cifs.ko into /system/lib/modules~ it seems that it is forbid to copy some files into system folder...
2. so I tried to put the cifs.ko in the /mnt/cifs.ko, and made the related setting in cifs manager(path to cifs.ko), then i mounted, but it showed that:"no route to host"
but i am sure that my ip and password is correct... so is there anyone know how to solve this problem?
Click to expand...
Click to collapse
I literally just went through this today. Download Terminal Emulator (free on the market).
PS: Don't type the '#' sign below.
#su
#/system/xbin/mount -w -o remount /system
#cp /SDCARD/cifs.ko /system/lib/modules/2.6.32.41-cyanogenmod/
#/system/xbin/mount -r -o remount /system
Then, just add the path /system/lib/modules/2.6.32.41-cyanogenmod/ into CIFS Manager. Should be all set.
redhonker said:
I have a new problem. There seems to be a limit on the file size. I have a 3 GB file shows up as 28 KB. Does anyone have success with large file? Thanks
Click to expand...
Click to collapse
File size limits depend on the underlying filesystem.
I tried the following command on an external NTFS formatted USB HDD connected to a Linux desktop mounted on the gTablet at /mnt/usbdisk via CIFS, and had no problems.
Code:
# ls -l /mnt/usbdisk/rvp/bak/hda3.img
-rw-rw-rw- 1 root root 8011422720 Apr 17 2010 /mnt/usbdisk/rvp/bak/hda3.img
# dd if=/mnt/usbdisk/rvp/bak/hda3.img of=/dev/null bs=1M skip=7500
140+1 records in
140+1 records out
147102720 bytes (140.3MB) copied, 150.135761 seconds, 956.8KB/s
The command skips the initial 7.5 GB of a 8,011,422,720 byte file and reads the rest (~140 MB).
rob_z11 said:
not to confuse issue with whatop is having but I wonder if anyone has run into a problem with cifs in which it doesn't include all of the folders from your windows shares.
Click to expand...
Click to collapse
I had the same issue, but I found the guide on abettergeek which helped me fix it. Turns out the problem is that the mount point created by Cifs Manager doesn't have execute permissions.
I don't have enough seniority to post the link, but it's a recent post on abettergeek.com. If someone with enough seniority wants to paste it, some others may find it extremely helpful.
archmcd said:
I had the same issue, but I found the guide on abettergeek which helped me fix it. Turns out the problem is that the mount point created by Cifs Manager doesn't have execute permissions.
I don't have enough seniority to post the link, but it's a recent post on abettergeek.com. If someone with enough seniority wants to paste it, some others may find it extremely helpful.
Click to expand...
Click to collapse
The link I believe you are refering to is here: http://blog.abettergeek.com/hardwar...n-cyanogenmod-7-0-3-on-the-viewsonic-gtablet/
I have the same issue. I haven't tried this fix yet, but I will give it a go.
ByteWrencher
Pls, where I can put "rw,noperm" in cifs manager? I tried in module path as:
/system/lib/modules/slow-work.ko:/system/lib/modules/cifs.ko rw,noperm
And:
/system/lib/modules/slow-work.ko:/system/lib/modules/cifs.ko:rw,noperm
But still don't working as rw.
Ty.

Load Kernel Modules On Boot?

Hi guys,
I'm trying to get my Xoom to load some kernel modules automatically when it restarts/boots. I placed the built .ko files in /system/lib/modules, and I tried to edit/replace both init.rc and init.stingray.rc, but they seem to get overwritten by the default file whenever the Xoom restarts. I figured I'd create a service in init.rc that would load the modules (insmod) directly, or call a shell script to load the modules, but neither worked when the init files get overwritten every time. Is there a better solution or way to avoid this?
Thanks in advance for any help.
i will post a init script that will load them tomorrow. Use modprobe for modules. It installs the entire driver stack. Insmod often gives errors because some drivers, like compat-wireless, have 6 or 7 modules. And they have to be loaded in correct order. Modprobe handles all that automatically.
bigrushdog said:
i will post a init script that will load them tomorrow. Use modprobe for modules. It installs the entire driver stack. Insmod often gives errors because some drivers, like compat-wireless, have 6 or 7 modules. And they have to be loaded in correct order. Modprobe handles all that automatically.
Click to expand...
Click to collapse
Thanks bigrushdog, much appreciated. I only use insmod for single modules, and I'm sure it works because when I run it manually it correctly loads and starts the modules I'm using (they are all self-contained single modules with no deps). How do you modify the init scripts so that they are not erased when the device is rebooted?
mattberman said:
Thanks bigrushdog, much appreciated. I only use insmod for single modules, and I'm sure it works because when I run it manually it correctly loads and starts the modules I'm using (they are all self-contained single modules with no deps). How do you modify the init scripts so that they are not erased when the device is rebooted?
Click to expand...
Click to collapse
My bad. I "assumed" you were unlocked and root. Otherwise it becomes many factors more difficult. You would have to write an app extending service. Even then you may not be able to set perms high enough without being root.
bigrushdog said:
My bad. I "assumed" you were unlocked and root. Otherwise it becomes many factors more difficult. You would have to write an app extending service. Even then you may not be able to set perms high enough without being root.
Click to expand...
Click to collapse
I am unlocked and rooted. Sorry, maybe my description of the problem was vague. I'm trying to edit any of the boot scripts to load my kernel modules when the device resets. Whenever I make any edits, they are lost when the device reboots, and my commands/scripts are never called.
That is because the init scripts are in the ramdisk.
drop this in /system/etc/init.d
give it a filename like "06loadModules"
Code:
#!/system/bin/sh
#
# Load any extra modules
MODPATH=/system/lib/modules/
for i in `ls $MODPATH | grep -v bcm4329.ko`
do
modprobe `basename $i .ko` >/dev/null 2>&1
done
exit 0
dont forget to
Code:
chmod 755 /system/etc/init.d/06loadModules
this will cleanly install all modules in /system/lib/modules on boot
bigrushdog said:
drop this in /system/etc/init.d
give it a filename like "06loadModules"
Code:
#!/system/bin/sh
#
# Load any extra modules
MODPATH=/system/lib/modules/
for i in `ls $MODPATH | grep -v bcm4329.ko`
do
modprobe `basename $i .ko` >/dev/null 2>&1
done
exit 0
dont forget to
Code:
chmod 755 /system/etc/init.d/06loadModules
this will cleanly install all modules in /system/lib/modules on boot
Click to expand...
Click to collapse
I don't have an /init.d folder in /system/etc; don't only certain ROMs use init.d? I'm not using any ROM, so maybe that is the problem. If the init scripts are stored in the ramdisk, can I just extract the ramdisk, edit the init scripts and reflash? I know that's more of a hassle, but it should work the same way right? Thanks again for your help.

Working aircrack-ng with monitor mode and packet injection !

Hi,
so after few days of playing with drivers patches kernel sources i finally got aircrack-ng working on g1 ! ( If you dont know whats aircrack-ng http://www.aircrack-ng.org/) I tested airodump for 1h, had it dumping packets to the sdcard to a cap file with channel switching and aireplay with deauth attack. I monitored this from my laptop to see if the packets are being sent ok and the client was disconnected from the network as expected.
I used patches for the n900 form the "download here" link at the bottom of this page http://david.gnedt.eu/blog/wl1251/. I also followed this tutorial http://bobcopeland.com/android_wifi.html and used his excellent kernel patch to get the msm_wifi.ko module. I then used the kernel and the zip file herehttp://forum.xda-developers.com/showpost.php?p=14768272&postcount=2427
You will want to make a backup of your system before you do anything. With that kernel you won't be able to use wifi in the Android UI.
Requirements to use attached files:
2.2 Rom
Debian installed in chroot on g1 with aircrack-ng installed ( you can use this img http://www.mediafire.com/?0ab95ia8xbale0i , just extract in on /sdcard/ so debian.img path is /sdcard/debian/debian.img )
How to make it work ?
steps 1-5 are one time only
First boot your android ROM and type
adb shell
$ su
# mount -o remount,rw /
# cd /system/etc/firmware
# ln -s ../wifi/Fw1251r1c.bin wl1251-fw.bin
# cat /proc/calibration > wl1251-nvs.bin
# mount -o remount,ro /
Click to expand...
Click to collapse
Extract attached files ( g1_wl1251.zip ) to sdcard
Apply ez_1.5.1_wl1251.signed.zip from recovery ( it got 2708 and ebi0 kernel for now will add ebi1 later)
Boot the phone
adb shell
su
cd /sdcard/wl1251_modules
sh ../insmod.sh
Click to expand...
Click to collapse
Now chroot into you debian installation ( if you used mine debian.tar.bz2 there is script startdeb just write: sh /sdcard/debian/startdeb and you should be chrooted correctly )
screen ( dont know why airodump doesnt give any output without screen on adb shell ?! )
bash
airmon-ng start wlan0
airodump-ng -i mon0
and DONE
How com compile it
First you need to get sources:
kernel sources i used https://github.com/ezterry/kernel-biff-testing tag ezgb-2636-v1.5.1-20110820
prepatched compat-wireless-2010-12-22 ( attached in sources.zip. I did some small build fixes and applied every patch from wl1251-maemo/patches/wireless-testing/ EXCEPT 0003-wl1251-fix-scan-behaviour-while-not-associated.patch as i got build errors with it )
rest of the files in patches.zip
Kernel:
You can just apply all patches in the kernel dir
If you want to make your config by yourself you have to compile as module cfg80211 and mac80211, compile in CONFIG_RFKILL_PM, CONFIG_CRC7 and UNSET CONFIG_TIWLAN1251. Its important as there as some ifdefs for CONFIG_TIWLAN1251 in drivers/mmc/core/core.c which is compiled in and with CONFIG_TIWLAN1251 WL1251 drivers doesnt work !
Compat wireless:
there is make.sh script edit it and change the patchs for your crosscompile toolchain and kernel location
./make.sh
and copy all *.ko modules
I hope everything is clear and more ppl can use it in custom roms If something is unclear plz write about it
too bad i sold my g1!
Thank you for the great tutorial! I think many people are using Gingerbread right now with several different incompatible ROMs. I think it would be useful if you list your ROM version as well as SPL & Radio info. Also if you could PLEASE make an image of your G1 with the debian install, it would help a lot. If you don't want your personal data in the image then I can remove it for you and will host the image. At the very least people need to know how exactly you installed debian before attempting this.
Please PM me if you can supply the image, thanks again!
Debian location can by anywhere, nothing depends on it and i got it on sdcard so g1 dump wont do anything. But i can send u ready debian.img to mount it with wireless tools installed just want to add new kismet and as i cant find ready deb for debian i would need to compile it probably. As for the radio u can use that new 2708 radio and old one for kernel i provided. I used cm6 for it but i think you can use any 2.2 rom as its froyo kernel. I need to clean up everything and redo it to write good tutorial how to compile it for any kernel and how to patch drivers.
zewelor said:
Debian location can by anywhere, nothing depends on it and i got it on sdcard so g1 dump wont do anything. But i can send u ready debian.img to mount it with wireless tools installed just want to add new kismet and as i cant find ready deb for debian i would need to compile it probably. As for the radio u can use that new 2708 radio and old one for kernel i provided. I used cm6 for it but i think you can use any 2.2 rom as its froyo kernel. I need to clean up everything and redo it to write good tutorial how to compile it for any kernel and how to patch drivers.
Click to expand...
Click to collapse
Thanks for the response. I just upgraded my hboot to a version that CM6 doesn't support, but I can use a different Froyo ROM that is still working.
On Gingerbread I am having a very hard time getting ext2.ko loaded. I already have an EXT(4) partition mounted, but since I am not on Froyo none of the kernel modules can be loaded correctly. I also think that ext2 support is already there but I don't know how to make use of it. There are filesystem modules under /system/lib/modules/2.6.36.4-s3-cos/.
My goal is to create a clockwork image of a Froyo/Debian install (with working injection driver) and use it as needed while keeping a 2.3.4/2.3.5 Android image for testing newer Apps that don't work on 2.2.
For anyone that just needs the Debian image, you can download it from the original G1 Debian tut site here: http://www.saurik.com/id/10
Please PM me if you are willing to upload a copy of your .img container file & I will host it for everyone to use. Thanks!
If u want u can still flash cm6 and after flashing it, flash kernel.zip from attached zip in 1st post ( it got also kernel for newer radio, but i havent tested it as i got older radio). As i saw in ezterry's kernel config ext2 partitions are mounted using ext4 so u dont have to load ext2 ( it works at least in froyo version of ezterry's kernel ). I can send now debian.img without working kismet but i think its better to get also kismet running so ppl wont have to redownload it. My debian.img its normal debian only with aircrack-ng installed nothing special in it. Only magic is kernel config and modules with patches compiled for that kernel thats it nothing more.
zewelor said:
If u want u can still flash cm6 and after flashing it, flash kernel.zip from attached zip in 1st post ( it got also kernel for newer radio, but i havent tested it as i got older radio). As i saw in ezterry's kernel config ext2 partitions are mounted using ext4 so u dont have to load ext2 ( it works at least in froyo version of ezterry's kernel ). I can send now debian.img without working kismet but i think its better to get also kismet running so ppl wont have to redownload it. My debian.img its normal debian only with aircrack-ng installed nothing special in it. Only magic is kernel config and modules with patches compiled for that kernel thats it nothing more.
Click to expand...
Click to collapse
Yes, let's wait until Kismet is working and then you can upload the image. I will try your suggestion and use EXT4. If I still have trouble I will create a flashable ZIP that has Froyo optimized for Debian with your Kernel patch included and a startup app to launch Debian via UI. Thanks again for your great contribution!
But when you mount debian img just write mount -o loop -t ext2 not ext4 it should work
Updated first post with some instructions how to compile drivers and kernel
Constantly getting "mount: can't setup loop device: No such file or directory"
I tried "mknod /dev/loop0 b 7 0" but neither "mount -o loop,noatime /mnt/sdcard/debian.img /data/local/mnt" nor other variations using ext2 work. I did mount / as rw and created the /data/local/mnt directory. I also tried 2 versions of busybox and so far no luck; I guess you are using the version that comes with CM6? Thanks
Yes i used busybox from cyanogenmod
Copy debian.img to /sdcard/debian/debian.img ( or change location in startdeb script )
First do mkdir -p /data/local/debian/mnt
then sh /sdcard/debian/startdeb ( or where u got it )
startdeb script i used:
#!/system/bin/sh
if [ ! -e /dev/block/loop99 ]
then
mknod -m 660 /dev/block/loop99 b 7 99
fi
if [ ! -e /dev/loop1 ]
then
ln /dev/block/loop99 /dev/loop0
fi
mount -o loop -t ext2 /sdcard/debian/debian.img /data/local/debian/mnt
busybox mount -o bind /sdcard /data/local/debian/mnt/sdcard
export PATH=/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
export USER=root
busybox mount -t proc none /data/local/debian/mnt/proc
busybox mount -t sysfs sysfs /data/local/debian/mnt/sys
busybox mount -t devpts devpts /data/local/debian/mnt/dev/pts
busybox chroot /data/local/debian/mnt/ /bin/bash
Click to expand...
Click to collapse
can u do it for lg optimus black ?
That depends on wifi chipset there, if its wl1251 it should be doable.
nice work, a year ago I did the same work (I think I posted it in the modaco android forum), however there was no injection patch at that time, so only packet capturing worked. The HTC Hero has the same TI wifi chip (wl1251). By the way you don't need an entire linux environment it is sufficient to compile static binaries (aircrack, kismet..). If i remember correctly compiling aircrack was very straight forward, however for kismet I had to make a dirty hack because it complained for a missing environment variable, but int he end Kismet worked fine too, even the gps . Unfortunately I lost my dev environment due to a harddisk failure, otherwise I would share the patches and binaries.
[EDIT]
HA! I found the aircrack binaries on an old backup disc
If you want to copy the files on your sdcard remember to remount it with (mount -o,exec,remount /mnt/scard), because by default the noexec flat is set or you copy the files to internal memory.
Thx for that aircrack I have chosen debian to avoid recompiling everything i will like to use and to have normal command line enviroment. Except aircrack and kismet u can also like to have iw / wireless tools / ping / nmap /tcpdump etc so you will have to search for it or recompiling staticly everything. I just prefer to find .deb file and install it, as using apt-get on g1 takes forever Also htc magic got wl1251 as afaik its the same as g1 (?).
yeah thats true, I decided to compile everything statically because I had very poor performance using debian (apt-get, compiling stuff etc), another advantage is you can start the programs very easily from the homescreen using gscript, sl4a..., in the end its just a question of preference
Sorry for asking in wrong topic, but:
Is there any airdump app that works well on HD2 ? (Broadcom chip: bmc 4329).
Or maybe the right question is : If it is even possible to create such app for hd2/nexus ?
misieq666 said:
Sorry for asking in wrong topic, but:
Is there any airdump app that works well on HD2 ? (Broadcom chip: bmc 4329).
Or maybe the right question is : If it is even possible to create such app for hd2/nexus ?
Click to expand...
Click to collapse
The problem is not the app, the problem is having wireless driver that support packet injection/Promiscuous-mode for the specific wireless chip, which in this case are afaik not available.
And even not a driver but firmware for specific chipset that allow to do that. As i read the main problem in bmc4329 is the firmware as driver can only do what firmware will allow. Well u can rewrite driver to workaround some limitations in firmware etc. Anyway here is a page u can follow http://linuxwireless.org/en/users/Drivers/brcm80211 they even got monitor mode in todo so maybe it can be done
Hi guy, final step, I got this:
airmon-ng start wlan0
Interface Chipset Driver
wlan0 wl1251_sdio - [phy0]SIOCSIFFLAGS: No such file or directory
(monitor mode enabled on mon0)
Click to expand...
Click to collapse
and this:
airodump-ng mon0
ioctl(SIOCSIFFLAGS) failed: No such file or directory
Click to expand...
Click to collapse
how should i fix this? plz.
Thank you.

Categories

Resources