[Q] pppwidget on our tab?? - Galaxy Tab 2 Q&A, Help & Troubleshooting

Has anyone tested if it works on our tab or not....Plus does anyone know ho to find the power output of our tab's usb host mode????
I'll be geting my new usbotg cable soon so i'll also try n post the result....
For those who don't know about pppwidget, its a which allows you to use your 3G/2G stick(dongle) on your tab using the otg cable...
Market link
Read More about project here..

Hi thanks for this information, I tried this and it requires extra kernel modules (option, which is not included in cm10 kernel).

proudfoot said:
Hi thanks for this information, I tried this and it requires extra kernel modules (option, which is not included in cm10 kernel).
Click to expand...
Click to collapse
Can you please tell the steps you took and the result you got...This isn't supposed to need any modules except usb_modswitch which it already include....It works on CM10 nexus 7 too...Which dongle did you use???

Yup, it works it requires couple of modules not included in cm10 p5100 kernel, i already build the modules (see attachment) . Enjoy
I uses zte cdma modem, that modem requires 'option' module but most 3g/CDMA dongle uses this module.
You just need to copy those modules to /system/lib/modules.
edit: forgot to actually attaching the modules ~_~

Update: Vpn doesn't seem to work with pppwidget.
Update2: works, needs to manually set the gateway

cool...i'll get back to you in couple of days(waiting for my new otg cable)... can you please give the .c file for the modules also....still learning all this stuff so wlll be helpful....

kan_bleach said:
cool...i'll get back to you in couple of days(waiting for my new otg cable)... can you please give the .c file for the modules also....still learning all this stuff so wlll be helpful....
Click to expand...
Click to collapse
clone it from here -> https://github.com/cmenard/android_kernel_samsung_espresso10
as for compiling it follow/adapt from this tutorial -> http://stevechui.blogspot.com/2011/10/compiling-kernel-modules-tunko-for.html

Its giving 'port not found'....any solutions??
Did you directly connected the dongle to tab or used a powered hub???

kan_bleach said:
Its giving 'port not found'....any solutions??
Did you directly connected the dongle to tab or used a powered hub???
Click to expand...
Click to collapse
Directly, what the log (it should be in /sdcard/pppwidget/log/) say?
edit: actually with this -> http://www.amazon.com/Samsung-EPL-1PL0BEGXAR-USB-Connection-Kit/dp/B005518J6Q it's still count as directly right?

proudfoot said:
Directly, what the log (it should be in /sdcard/pppwidget/log/) say?
edit: actually with this -> http://www.amazon.com/Samsung-EPL-1PL0BEGXAR-USB-Connection-Kit/dp/B005518J6Q it's still count as directly right?
Click to expand...
Click to collapse
Yup that's direct
Checked the log...mod_switch successful, but loading option module fails...option.ko is in the correct folder..
I tried insmod but it says operation not permitted...
Tried su and then insmod but then it says failed (trying using terminal emulator)..

kan_bleach said:
Yup that's direct
Checked the log...mod_switch successful, but loading option module fails...option.ko is in the correct folder..
I tried insmod but it says operation not permitted...
Tried su and then insmod but then it says failed (trying using terminal emulator)..
Click to expand...
Click to collapse
Your option.ko probably not compatible with the kernel, try to do
Code:
strings option.ko | grep vermagic
uname -a
and compare both output, it should be similar.
also if you use insmod I think you'll need to insmod usb_wwan.ko first, because option.ko depends on that module, so it should be
Code:
insmod usb_wwan.ko
insmod option.ko
then, move the pppwidget to launcher and plug the dongle.

proudfoot said:
Your option.ko probably not compatible with the kernel, try to do
Code:
strings option.ko | grep vermagic
uname -a
and compare both output, it should be similar.
also if you use insmod I think you'll need to insmod usb_wwan.ko first, because option.ko depends on that module, so it should be
Code:
insmod usb_wwan.ko
insmod option.ko
then, move the pppwidget to launcher and plug the dongle.
Click to expand...
Click to collapse
Tried the command...output is the same...still not able to use insmod...
Log
Code:
USB_ModeSwitch log from Sat Oct 27 16:23:19 IST 2012
Raw args from udev: 1-1.4/1-1.4:1.0
Using top device dir /sys/bus/usb/devices/1-1.4
----------------
USB values from sysfs:
manufacturer ZTE, Incorporated
product USB Storage
serial 000000000002
----------------
bNumConfigurations is 1 - don't check for active configuration
SCSI attributes not needed, moving on
checking config: /data/data/de.draisberghof.pppwidget/app_tmp/19d2.fff5
! matched. Reading config data
config: TargetVendor set to 19d2
config: TargetProductList set to fff1,fffe,ffff
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
Logger is: /system/bin/log
Command to be run:
usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 14 -v 19d2 -p fff5 -f $configBuffer
Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------
Reading long config from command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.4 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x19d2
DefaultProduct= 0xfff5
TargetVendor= 0x19d2
TargetProduct= not set
TargetClass= not set
TargetProductList="fff1,fffe,ffff"
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent="5553424312345678c00000008000069f030000000000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode enabled
Use given bus/device number: 001/014 ...
Looking for default devices ...
bus/device number matched
searching devices, found USB ID 19d2:fff5
found matching vendor ID
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Skipping the check for the current configuration
Using interface number 0
Using endpoints 0x0a (out) and 0x89 (in)
USB description data (for identification)
-------------------------
Manufacturer: ZTE, Incorporated
Product: USB Storage
Serial No.: 000000000002
-------------------------
Looking for active driver ...
OK, driver found; name unknown, limitation of libusb1
OK, driver "unkown" detached
Setting up communication with interface 0
Using endpoint 0x0a for message sending ...
Trying to send message 1 to endpoint 0x0a ...
OK, message successfully sent
Resetting response endpoint 0x89
Resetting message endpoint 0x0a
Could not reset endpoint (probably harmless): -34
Device is gone, skipping any further commands
Bus/dev search active, referring success check to wrapper. Bye.
ok:busdev
--------------------------------
(end of usb_modeswitch output)
Checking success of mode switch for max. 20 seconds ...
Waiting for device file system (1 sec.) ...
Reading attributes ...
All attributes matched
Mode switching was successful, found 19d2:fff1 (ZTE, Incorporated: ZTE CDMA Tech)
Now checking for bound driver ...
No driver has bound to interface 0
Module loader is /system/bin/insmod
Trying to find module "option"

Have you try to insert those modules manually first, before running pppwidget and plug-in the dongle? I think we use the same dongle, so it should works ~_~
anyway this is how i get this to work:
1. create directory /data/loca/modules/ on tab
2. move all those modules (option.ko, usb_wwan.ko, ppp_async.ko) to this directory.
3. su and insmod all those modules:
Code:
insmod /data/local/modules/usb_wwan.ko
insmod /data/local/modules/option.ko
insmod /data/local/modules/ppp_async.ko
5. move pppwidget to launcher and plug the dongle.
optional:
create this script and put it in /data/local/userinit.d/93loadmod directory
Code:
#!/system/bin/sh
/system/bin/insmod /data/local/modules/usb_wwan.ko
/system/bin/insmod /data/local/modules/option.ko
/system/bin/insmod /data/local/modules/ppp_async.ko
so it will load all those modules at boot time.

I am doing the same thing...but insmod is giving error
When i run the insmod command i get
insmod: init_module 'usb_wwan.ko' failed(Exec format error)

kan_bleach said:
insmod: init_module 'usb_wwan.ko' failed(Exec format error)
Click to expand...
Click to collapse
From a bit of googling it looks like your module is not build for your kernel (or even build for wrong architecture), what is your kernel? and where do you get the modules, do you compile it yourself or is it from somebody else?
try to do dmesg after you do insmod to see more information.
btw, the module that i have posted only works for p5100 and cm10 kernel (3.0.8-CM-g11fad65)

proudfoot said:
From a bit of googling it looks like your module is not build for your kernel (or even build for wrong architecture), what is your kernel? and where do you get the modules, do you compile it yourself or is it from somebody else?
try to do dmesg after you do insmod to see more information.
btw, the module that i have posted only works for p5100 and cm10 kernel (3.0.8-CM-g11fad65)
Click to expand...
Click to collapse
I used the modules you posted...I am using CMOC-10 kernel....Maybe that is the issue...But the kernels are supposed to be identical except for the OC and the governors feature...i am on 3.0.8-CM-gbd034d0

kan_bleach said:
gbd034d0
Click to expand...
Click to collapse
Yup that the problem, it needs to have the same extra version number even though it comes from same source. I guess I could compile it for you.

proudfoot said:
Yup that the problem, it needs to have the same extra version number even though it comes from same source. I guess I could compile it for you.
Click to expand...
Click to collapse
Please do...

kan_bleach said:
Please do...
Click to expand...
Click to collapse
Here, I hope it works because it comes from cm10 source, I only change the extra version to match yours.

proudfoot said:
Here, I hope it works because it comes from cm10 source, I only change the extra version to match yours.
Click to expand...
Click to collapse
Thanks i'll try and post the result...can you give me the github link for the cm10 kernal for our tab???

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?

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.

[GUIDE][CWM] WLAN Calibration and MAC address fix [CM]

This is for CyanogenMod and its derivates. Stock ROMs should be fine.
If you are inrested in editing your MAC address, there's a guide linked below. I don't know if stock ROMs will automcatically correct the MAC. In this case I think you have to edit /efs/imei/.nvmac.info (read more something about /efs before playing with it!)
Click to expand...
Click to collapse
The easiest way to do the calibration is:
Turn wifi ON and run
Code:
tiwlan_plts -n
This is the script called from a oneshot init service in my init.latona.rc if someone is interested. It will calibrate and correct the MAC automatically, even after a data wipe:
Code:
#!/system/bin/sh
if [ ! -f /data/misc/wifi/nvs_map.bin ]; then
insmod /system/lib/modules/tiwlan_drv.ko
/system/bin/tiwlan_loader -i /system/etc/wifi/tiwlan.ini -f /system/etc/wifi/firmware.bin
/system/bin/tiwlan_plts -n
rmmod tiwlan_drv
fi
____________________________________
Older method
Click to expand...
Click to collapse
UPDATE: I found an easy way to get the real MAC.
Download the apk attached or run the following commands:
Code:
su
mount -o remount,rw /system
ln -s /system/lib/modules/tiwlan_drv.ko /system/etc/wifi/tiwlan_drv.ko
#Make sure wifi is off
./mfgloader -l #Take the binary from a stock ROM
./mfgloader -u
rm /system/etc/wifi/tiwlan_drv.ko
mount -o remount,ro /system
After that your MAC address shoud begin with D0:C1:B1 and not 08:00:28.
To see your current MAC: System Settings > About phone > Status (turn wifi on)
Click to expand...
Click to collapse
____________________________________
This is the first post with some more informations about the calibration
Click to expand...
Click to collapse
While I was reading some logs, I noticed these lines
Code:
TIWLAN: 1089.979242: Starting to process NVS...
TIWLAN: 1089.983698: No Nvs, Setting default MAC address
TIWLAN: 1089.989007: pHwInit->uEEPROMCurLen: 1c
TIWLAN: 1089.993462: ERROR: If you are not calibating the device, you will soon get errors !!!
...
TIWLAN: 1094.726827: Station ID : 08-00-28-12-03-58
...
You can see that the device is not calibrated and that the default MAC address is assigned.
Each device should have a unique MAC address, two devices with the same MAC address in the same network will give problems.
________
UPDATE
I made two flashable files:
wlan_calibration.zip will only do the calibration
wlan_calibration_rand.zip will do the calibration and will randomize the last three octets of the address
Click to expand...
Click to collapse
If you still want to do it on your own, here the guide:
_______________
WLAN Calibration
Here the steps you need to follow (taken from: WLAN Calibration):
1) Turn wifi off
2) From ADB/terminal emulator run the following commands [1]:
Code:
$ su
# cd /data/misc/wifi
# insmod /system/lib/modules/tiwlan_drv.ko
# start wlan_loader
# ifconfig tiwlan0 up
# tiwlan_cu -b
/ w p 1 l 2 f 2
/ t b v 21
/ t b t 1 0 0 0 0 0 0 0
/ q
# rmmod tiwlan_drv
This will create this file: /data/misc/wifi/nvs_map.bin. If it's not there, you did something wrong.
After that you should not get the error while turning wifi ON.
________
MAC address fix
Even after the calibration, you'll still have the default MAC address (Station ID : 08-00-28-12-03-58). But no problem, you can 'easly' change it: Editing the MAC Address.
You need to get the newly created /data/misc/wifi/nvs_map.bin and edit it with an hex editor as described in the guide linked above.
I still don't know if the calibration will improve anything, but it surely won't hurt:
For optimal Wi-Fi performance it is mandatory to calibrate the Wi-Fi hardware
Click to expand...
Click to collapse
NOTE: nvs_map.bin is in /data, so if you do a factory reset you have to do this again.
___
[1]
ADB: System settings > Developers options (ON) > Root access > Apps and ADB
Wow...good solution buddy. I think u shouldpost this in development thread. People dont look much in general thread.
this should be added to the cm9/10 instalation .zip file
I did flash the zip file, ran the other commands thru terminal and see the file /data/misc/wifi/nvs_map.bin.
I don't understand the next step to be done.
I cannot open the bin file using hexeditor, I gave it root access.
And, in case i open it what mac address should i use? Is some address hard coded to each phone?
Hetalk said:
I did flash the zip file, ran the other commands thru terminal and see the file /data/misc/wifi/nvs_map.bin.
I don't understand the next step to be done.
I cannot open the bin file using hexeditor, I gave it root access.
And, in case i open it what mac address should i use? Is some address hard coded to each phone?
Click to expand...
Click to collapse
I don't know how MAC are assigned, I simply randomized the last part of the address (I kept the first part: 80:00:28).
Anyway I just uploaded a new zip file to make things even simpler. It will automatically randomize the last four three groups. If you want to use it, you need to delete /data/misc/wifi/nvs_map.bin first. EDIT: I changed the script, now you can do the calibration without removing the file.
Anyway I don't know what's wrong with your editor, I did it from my computer.
I tried using hex editor from play store.
I'll try the new zip tomorrow..
As I wrote in the OP, today I found the way to get the original MAC.
I don't know what is needed to make the commands work while in recovery (services needed etc...), so I made a dummy app (I simply adapted the code of an app I made few days ago to do a similar thing).
No fancy icon (it's the default one), no checks, ugly etc... It simply does the job (my Java knowledge is almost zero)
EDIT:
I almost forgot to say that the real MAC is in /efs/imei/.nvmac.info. It was the first place where I looked, but it's an hidden file an I didn't see at first.
bam....
Dear @loSconosciuto
I following this guide to solve the problem that actually I have in my phone with CM 11. In the Status menu, "non available" appears in my device WIFI mac. I following the guide step by step and I couldn't change it.
Could you help me?
carniman78 said:
Dear @loSconosciuto
I following this guide to solve the problem that actually I have in my phone with CM 11. In the Status menu, "non available" appears in my device WIFI mac. I following the guide step by step and I couldn't change it.
Could you help me?
Click to expand...
Click to collapse
This guide is for the kernel 2.6.35 which uses a completely different driver, it's quite an old thread. The calibration is done in a different way and I don't think that's the problem.
I'm not using CM11, so it's quite hard for me to know exactly what's wrong.
loSconosciuto said:
This guide is for the kernel 2.6.35 which uses a completely different driver, it's quite an old thread. The calibration is done in a different way and I don't think that's the problem.
I'm not using CM11, so it's quite hard for me to know exactly what's wrong.
Click to expand...
Click to collapse
Ok, sir. Thank you for your help.
Hi there
trying to fix Samsung s4 active i9295 wifi problem. at least got the MAC address showing (was 02:lots of zeroes) still unable to start wifi. is there anything else I should search for? tiwlan_drv.ko was not there so I downloaded it sepparately. do I need some more modules to be added? using stock 4 file engineering FW Android 5.0.1

100% WiFi Monitor Mode using Samsung Galaxy S2 (GT-I9100) Step by Step

Hi xda-mates. In this post I'm gonna show you, How to get wifi monitor mode on your device without external wifi adapter. If you don't know what is "wifi mode" goto wikipedia. The package consist from drivers, some wifi tools and aircrack.
Monitor Mode getting steps:
1. You have to root your device.
2. Flash CM 9.1.0.
3. Check out, your using originally cwm kernel included in the firmware you flashed.
4. Download my package(the password is my nickname).
5. Extract it to your sd.
6. Open up the terminal.
7. Type
Code:
su
cd pathToYourSd
sh install.sh
it will simply install all stuff to your system.
8. Type 'wmon on' in the terminal to activate monitor mode (type 'wmon off' to activate managed mode).
That's all. You have installed all that you needed, activated monitor mode and now you can use aircrack.
Troubleshooting:
Problem:
Code:
cannot find wireless tools, exiting!
Solution:
a) You must execute wifi tools (aircrack also) from root directory!
Code:
cd /
b) Check out of iwconfig, iwmulticall, iwpriv existance in /data/local/bin/.
Problem:
Code:
insmod: can't insert 'dhd.ko': invalid module format
error: SIOCGIFFLAGS (No such device)
Solution:
a) Make sure you are in supported rom and kernel.
b) Check out the file existance in /data/wmon/ (3 file).
Credits:
Aspartame21
Omri Ildis
Ruby Feinstein
Yuval Ofir
MemoryController
Could this possibly work on the Sprint Galaxy S2?
Sent from my SPH-D710 using xda premium
Mattix724 said:
Could this possibly work on the Sprint Galaxy S2?
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
May be but I don't know exactly. Try to istall it. I'll help you.
GREAT!
Thanks man! i was waiting for someone to go into this much detail, but does the wmon siyah mean that i can dualboot CM 9 and w/e rom ( in my case alliance) and get this to work? my problem with this before is that nothing would happen after my wifi is disabled and module is "loaded", also what do you mean run aircrack from the root dir? like root of the sd?
P.S. Testing now on the Galaxy S2 LTE version ( Rogers)
tutchthesky7 said:
Thanks man! i was waiting for someone to go into this much detail, but does the wmon siyah mean that i can dualboot CM 9 and w/e rom ( in my case alliance) and get this to work? my problem with this before is that nothing would happen after my wifi is disabled and module is "loaded", also what do you mean run aircrack from the root dir? like root of the sd?
P.S. Testing now on the Galaxy S2 LTE version ( Rogers)
Click to expand...
Click to collapse
I get suck after airmon-ng wlan0
says cannot find wireless tools, exiting!
Some help please and thanks?
tutchthesky7 said:
I get suck after airmon-ng wlan0
says cannot find wireless tools, exiting!
Some help please and thanks?
Click to expand...
Click to collapse
Use iwconfig wlan0 instead of airmon-ng wlan0. And make sure that you are in the root directory.
Code:
su
cd /
wmon on
iwconfig wlan0
iwconfig wlan0
aspartame21 said:
Use iwconfig wlan0 instead of airmon-ng wlan0. And make sure that you are in the root directory.
Code:
su
cd /
wmon on
iwconfig wlan0
Click to expand...
Click to collapse
OK thank you!, i'll give that a shot and post back!
Nada
aspartame21 said:
Use iwconfig wlan0 instead of airmon-ng wlan0. And make sure that you are in the root directory.
Code:
su
cd /
wmon on
iwconfig wlan0
Click to expand...
Click to collapse
# wmon on
Original module loaded. disabling wifi
LOADING MODULE
insmod: cant insrt dhd.ko : file exists error : SI0CIFFLAGS (no such device)
then i tried iwconfig wlan0
wlan0 No such device
so i checked iwconfig to see whats up
and my Wlan0 isn't there.. hmmm
Edit: I typed in wmon on and it responded with LOADING MODULE, then i did iwconfig wlan0 and it showed it in manage mode, what next?
tutchthesky7 said:
# wmon on
Original module loaded. disabling wifi
LOADING MODULE
insmod: cant insrt dhd.ko : file exists error : SI0CIFFLAGS (no such device)
then i tried iwconfig wlan0
wlan0 No such device
so i checked iwconfig to see whats up
and my Wlan0 isn't there.. hmmm
Edit: I typed in wmon on and it responded with LOADING MODULE, then i did iwconfig wlan0 and it showed it in manage mode, what next?
Click to expand...
Click to collapse
Don't pay attention to "managed mode" lettering, you are in monitor mode. To test monitor mode working type 'airodump-ng wlan0' and you will see that everything works perfect.
errrm.. not QUIIITEE, it says cannot find wireless tools, exiting. then it deletes all the files i extracted
IT IS WORK! one little question
THIS WORK, first, and ofc, THX man
I had a sgs2(official), rooted in gingerbread, and then i flashed ICS with CM 9.1, then i folllow yours steps, y putted my sgs2 in mode monitor and i checked.
Just one question, i searched in google, and ask in IRC, but i don't find the answer:
¿Do can i use the same steps to get WPA as Ubuntu or Backtrack? else... ¿do you know some link where a tutorial get wpa via sgs2?
I want complete the last step, thx for your time, and sry for my english
Clitoris Errante said:
THIS WORK, first, and ofc, THX man
I had a sgs2(official), rooted in gingerbread, and then i flashed ICS with CM 9.1, then i folllow yours steps, y putted my sgs2 in mode monitor and i checked.
Just one question, i searched in google, and ask in IRC, but i don't find the answer:
¿Do can i use the same steps to get WPA as Ubuntu or Backtrack? else... ¿do you know some link where a tutorial get wpa via sgs2?
I want complete the last step, thx for your time, and sry for my english
Click to expand...
Click to collapse
You can use all stuff like in ubuntu/bt.
Mode inyecction?
Thx for answer me, i did decide install another time backtrack in my sgs2(i removed ), but i want crack wpa without brute force or diccionaries, because it is imposible.
¿Is there some way to crack a wpa without brute force or diccionaries? ¿Do i could implement rainbow tables in sgs2, or is there some way to hashing with aircrack?
Thx for your time,
Clitoris Errante said:
Thx for answer me, i did decide install another time backtrack in my sgs2(i removed ), but i want crack wpa without brute force or diccionaries, because it is imposible.
¿Is there some way to crack a wpa without brute force or diccionaries? ¿Do i could implement rainbow tables in sgs2, or is there some way to hashing with aircrack?
Thx for your time,
Click to expand...
Click to collapse
Aircrack-ng is included to the package you installed. Just type aircrack-ng after switching wifi monitor mode
from a day to other, i can't use this
i didn't use somedays, and now i can't use, it is appears as delete, or simplely, not work. I did install applications in my sgs2.
But now i can't run it. I tried reinstall, but always put in the output:
"wmon on" not found
"wmod on" not found
"wmod monitor" not found
i did that in /, and i executed the install.sh in sdcard as you said in your post.
In internet i not found nothing, and i know programming bash a little, i tried solved gave wmon bit executable but is useless, i follow all steps rights as you said. The only one thing interesant when i execute install that is the output:
Installing Driver...
OK
Installing Utils...
OK
Creating Symlink...
link failed FIle exists
link failed File exists
//I think here is the fail of my steps, i think that make reference to /data/wmon, but i am not sure, i checked that files, but i can't solved
OK
Fixing Permissions...
OK
Temporary FIles Cleaning...
OK
Installation COmpleted! To start WiFi monitor mode just type : "wmod monitor"
I am sry if i am heavy, thx for your time.
This is pretty cool, I managed to make some progress, however got error at authorization stage at line:
aireplay-ng -1 0 -a MAC wlan0
Waiting for beacon frame (BSSID: .......) on channel -1
Couldn't determine current channel for wlan0, you should either force the operation with --ignore-negative-one or apply kernel patch
same error with injection
I'm pretty new to linux stuff, is there any way to bypass this?
Another thing is that I can't use wi-fi after using monitor mode, even if i shut it down (wmon off) until phone restart, is that alright?
Thanks in advance, and keep doing the great job!
Clitoris Errante said:
i didn't use somedays, and now i can't use, it is appears as delete, or simplely, not work. I did install applications in my sgs2.
But now i can't run it. I tried reinstall, but always put in the output:
"wmon on" not found
"wmod on" not found
"wmod monitor" not found
i did that in /, and i executed the install.sh in sdcard as you said in your post.
In internet i not found nothing, and i know programming bash a little, i tried solved gave wmon bit executable but is useless, i follow all steps rights as you said. The only one thing interesant when i execute install that is the output:
Installing Driver...
OK
Installing Utils...
OK
Creating Symlink...
link failed FIle exists
link failed File exists
//I think here is the fail of my steps, i think that make reference to /data/wmon, but i am not sure, i checked that files, but i can't solved
OK
Fixing Permissions...
OK
Temporary FIles Cleaning...
OK
Installation COmpleted! To start WiFi monitor mode just type : "wmod monitor"
I am sry if i am heavy, thx for your time.
Click to expand...
Click to collapse
I've to correct my scripts, but don't wait for it. Just type "export PATH=/data/local/bin:$PATH". You can also add this to your terminal emulator as launch commands or create a script in autostart folder:
Code:
su
cd /system/etc/init.d/
touch 17env
echo "#!/system/bin/sh\nexport PATH=/data/local/bin:$PATH\nexit 0" > 21env
makslll said:
This is pretty cool, I managed to make some progress, however got error at authorization stage at line:
aireplay-ng -1 0 -a MAC wlan0
Waiting for beacon frame (BSSID: .......) on channel -1
Couldn't determine current channel for wlan0, you should either force the operation with --ignore-negative-one or apply kernel patch
same error with injection
I'm pretty new to linux stuff, is there any way to bypass this?
Another thing is that I can't use wi-fi after using monitor mode, even if i shut it down (wmon off) until phone restart, is that alright?
Thanks in advance, and keep doing the great job!
Click to expand...
Click to collapse
I use "aireplay-ng -2 -b VICTIM -h FAKEDMAC wlan0"
aspartame21 said:
I've to correct my scripts, but don't wait for it. Just type "export PATH=/data/local/bin:$PATH". You can also add this to your terminal emulator as launch commands or create a script in autostart folder:
Code:
su
cd /system/etc/init.d/
touch 17env
echo "#!/system/bin/sh\nexport PATH=/data/local/bin:$PATH\nexit 0" > 21env
Click to expand...
Click to collapse
Where is this Terminal autostart folder? Also, I tried executing the first command and it gave me nothing but a "> " line. What should I do?
Hi guy,
first of all, thanks for your great job.
I've seen as you have uploaded a wmon_siyah4.5.1 version... does it work with that siyah version?
I have that kernel (and that version), and I get the error:
Code:
insmod: can't insert 'dhd.ko': invalid module format
error: SIOCGIFFLAGS (No such device)
just after run 'wmon on'.
Can you help me, please?
thanks

Kernel-Perf/Oprofile support?

As the title implies, I'm trying to figure out is any kernel includes perf or OProfile support.
What is perf?
https://perf.wiki.kernel.org/index.php/Main_Page
What is OProfile?
http://oprofile.sourceforge.net/news/
I know that in some sources... I can see in /arch/Kconfig:::
Some options for OProfile...
/////////////////////
config OPROFILE
tristate "OProfile system profiling"
depends on PROFILING
depends on HAVE_OPROFILE
select RING_BUFFER
select RING_BUFFER_ALLOW_SWAP
help
OProfile is a profiling system capable of profiling the
whole system, include the kernel, kernel modules, libraries,
and applications.
If unsure, say N.
config OPROFILE_EVENT_MULTIPLEX
bool "OProfile multiplexing support (EXPERIMENTAL)"
default n
depends on OPROFILE && X86
help
The number of hardware counters is limited. The multiplexing
feature enables OProfile to gather more events than counters
are provided by the hardware. This is realized by switching
between events at an user specified time interval.
If unsure, say N.
config HAVE_OPROFILE
bool
/////////////
How do I enable these?
In addition to that, I see perf under tools, how do I enable it?
<><> What I want to do?
I'm doing some college research on app's performance.
And I'm well done using MethodTracing.
I want to be able to run stress test codes on the tablet and measure the different speeds every test achieves.
Thank you.
At first glance, OProfile Event Multiplex won't work because it depends on the x86 architecture.
Im not interested only in OProfile.
As you may see, I mention Perf too.
As a possibility of tracing...
OProfile is enabled in my kernel (should be in all kernels ). Perf on the other hand, I need to check.
Thanks, can you direct me to your kernel.
Also I was trying franco Kernel, I'm seeing OProfile is enabled too, but I can't see to get it running though.
To see if OProfile is enabled in the kernels I had used, i just pull out the kernel config.gz file from my phone and read it.
What I'm trying to see...
this values with y
CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_HAVE_OPROFILE=y
CONFIG_OPROFILE_ARMV7=y
Click to expand...
Click to collapse
To get the file:::
on a terminal...
adb pull /proc/config.gz
gunzip -c config.gz > .config
Click to expand...
Click to collapse
Update:
Also one can see if OProfile is installed once inside a root terminal
Just type # opcontrol --help
It should give you some usage info about opcontrol.
opcontrol: usage:
--list-events list event types
--help this message
--verbose show extra status
--verbose-log=lvl set daemon logging verbosity during setup
levels are: all,sfile,arcs,samples,module,misc
--setup setup directories
--quick setup and select CPU_CYCLES:150000
--timer timer-based profiling
--status show configuration
--start start data collection
--stop stop data collection
--reset clears out data from current session
--shutdown kill the oprofile daeman
--callgraph=depth callgraph depth
--event=eventspec
Choose an event. May be specified multiple times.
eventspec is in the form of name[:count], where :
name: event name, see "opcontrol --list-events"
count: reset counter value
--vmlinux=file vmlinux kernel image
--kernel-range=start,end
kernel range vma address in hexadecimal
xbin (busybox) MUST be installed for this to work also.
Errors I'm having, while I'm trying to use it on my nexus 7 3G+WIFI::
..Having errors when I run setup… //Can’t see to get it running .
# opcontrol --setup
it outputs:
mount: No such device
# opcontrol --start //doesn't start the trace, says can’t find folder….
it outputs:
Cannot open /dev/oprofile/enable: No such file or directory
http://forum.xda-developers.com/showthread.php?t=2373410&page=3
I too checked for these flags only. Also during the compile it actually picked up oprofile.o etc. Therefore kernel has OProfile.
Just a heads up on perf.
PERF is a modern tool and requires some kernel components that are only supported from the 2.6.36 Linux kernel (K36) and onward. If you are using the 2.6.32 Linux kernel (K32) you should use OProfile for CPU profiling.
If you are building a custom Android/Linux kernel please check that the following lines are present in your .config:
2.6.36 KERNEL (K36)
CONFIG_PROFILING=y
CONFIG_PERF_EVENTS=y
CONFIG_HW_PERF_EVENTS=y
CONFIG_PERF_ANDROID_BACKTRACE=y
CONFIG_CACHE_PL310_PERF_EVENTS=y
You can test to see if the target device already has these kernel configuration options via the following:
adb pull /proc/config.gz config.gz &&
gunzip -c config.gz | grep '\(CONFIG_O*PROFIL\)\|\(_PERF_EVENTS\)'
see more::
http://docs.nvidia.com/tegra/data/How_To_Profile_a_Tegra_Android_NDK_Application_with_PERF.html
Actually regarding OProfile, I just tested out the commands you listed earlier. They work on my kernel perfectly.
Perf is a different story though.
sgt. meow said:
Actually regarding OProfile, I just tested out the commands you listed earlier. They work on my kernel perfectly.
Perf is a different story though.
Click to expand...
Click to collapse
Perfect, then I just need to actually succesfully build your kernel from source or get the dropbox link of the compiled kernel to work.
That's what I was trying to do yesterday.
Apparently dropbox is block in my work network.
Unfortunately Dev-Host does not want to work for me. I'll try mirroring it to Sendspace or Mediafire. Wait a while.
sgt. meow said:
Unfortunately Dev-Host does not want to work for me. I'll try mirroring it to Sendspace or Mediafire. Wait a while.
Click to expand...
Click to collapse
I got dropbox to work using a proxy..
Thank you.
Any direction on a tutorial to learn on how to build the kernel from source my self?
Update::
Flashing oxydo kernel on nexus 7 3g+wifi (tilapia) right now...
http://source.android.com/source/building-kernels.html
Adjust as needed.
sgt. meow said:
http://source.android.com/source/building-kernels.html
Adjust as needed.
Click to expand...
Click to collapse
Thank you very much.
Gonna start building, and changing parameters in .config file of the kernel.
Ultimate goals:
-Get both perf and OProfile to work with your kernel.
-Know how to replicate this task so it can be replayed later in other android kernels.

Categories

Resources