Custom kernel / HC / Ftdi / insmod error - General Questions and Answers

Hey,
I tried to modifiy the HC-Kernel (HTC-Flyer) to be able to recognize an attached ftdi device.
So I followed the instructions of the ftdi website (I can't insert links..):
TN 132 Adding FTDI Devices VCP Driver Support to Android
When I want to insmod ftdi_sio.ko I get the error "no such file or directory".
When I run demsg it shows:
Code:
<4>[20538.982604] ftdi_sio: Unknown symbol usb_serial_handle_sysrq_char (err 0)
<4>[20538.986175] ftdi_sio: Unknown symbol usb_serial_disconnect (err 0)
<4>[20538.989898] ftdi_sio: Unknown symbol usb_serial_generic_open (err 0)
<4>[20538.992431] ftdi_sio: Unknown symbol usb_serial_generic_close (err 0)
<4>[20538.998138] ftdi_sio: Unknown symbol usb_serial_generic_unthrottle (err 0)
<4>[20539.001403] ftdi_sio: Unknown symbol usb_serial_handle_break (err 0)
<4>[20539.001922] ftdi_sio: Unknown symbol usb_serial_generic_throttle (err 0)
<4>[20539.002532] ftdi_sio: Unknown symbol usb_serial_probe (err 0)
<4>[20539.002868] ftdi_sio: Unknown symbol usb_serial_register (err 0)
<4>[20539.003173] ftdi_sio: Unknown symbol usb_serial_deregister (err 0)
<4>[20546.767883] [BATT] [x0]3 [x8]f b0 7f f0 63 0 22 6e b 13
I was looking for solutions, but couldn't find anything that would help me..
In all instructions I've seen the ftdi_sio.ko (that was made earlier) was pushed to the device via adb and the last step should be use the insmod command.
I know (pretty sure..), that the Flyer is able to recognize a ftdi device.
So where is my mistake?
I would be really happy, if anybody could help me... my Latin is at its end
Regards, Kasch.

use
insmod usbserial.ko
first

Thanks for your reply... I already tried that, same result...
No such file or directory und "unknown symbol" when I run dmesg.
Somebody told me, the reason could be a wrong gcc version? For the kernel 4.4.0 was used; on my Ubuntu partition I have gcc 4.4.5 running..
And the next thing:
Everybody is talking about arm-eabi. After I have installed the Android-SDK I only found arm-linux-androideabi in the toolchains. Is there a difference?

Related

[Partial Solution] Wi-Fi unable to start.

"Wi-Fi unable to start" error appeared couple weeks ago.
I have tried everything - reflashing different images, radio, formatting ... etc.
Nothing helped.
In a desperate moment I tried something.
Here are the steps:
I made some progress and it seams that is pure software problem.
Currently I'm with G1/black Cyanogen 3.6.8.1, Recovery 1.4 and 8GB SD/class 4.
What I did is reformatting the SD card in 2 partitions 1st FAT32 and 2nd ext2 ~ 460MB.
Wiped before flashing cyanogen build and also I made sure that there is nothing on the ext2 partition.
When flashing finished I waited the phone to fully set up itself on the first boot ~5-7 min.
Then I tried the WiFi - it didn't start
The important and desperate thing I did was to go to su console in /system/lib/modules and tried to load wlan.ko manually (insmod wlan.ko) - it failed the 1st time.
Then I tried 2 times more and it loaded itself successfully (of course wifi connection is not established in that moment, because loading the module is just one step of the process).
I unloaded successfully (rmmod wlan) the module and tried to start WiFi again - gues what - It worked!
That is just partial solution of the problem, but shows that it is just a software problem.
I guess some timeouts appear and WiFi starting procedure is not so patient to wait for the module to start up and it's not retrying to unload and load again the module.
Good luck
Hope it will work on yours G1.
Cheers
this has been up on a google code bug report page for a while now. I had the same result when trying to start the module in the terminal
cyanogen's new 3.9.1 scary experimental build shows that he used a new wifi driver in the changelog but that hasn't helped me with this issue at all. I thought it might be a software conflict so I used a clean sd card, flashed my update.zip, and still had the same problem
I have tried Cyanogen 3.9.1 with the same result - it doesn't work for me.
I can't explain why it started to work again in 3.6.8.1
Anyway, try to copy all your important files (not system/applications created like thumbnails folder) to your PC, put the SD card to card reader connected to a PC and then do a full reformat to FAT32.
Partition the newly formatted SD card to FAT32 and EXT2 partitions.
Reformat partitions again, copy update.zip to your SD card.
Start up your G1 holding home button and do wipe ( I wiped 2-3 times just to be sure )
Do ext2 system repair from the repair menu.
Do not convert it to ext3.
Apply the update.zip and continue to the next steps I wrote above.
Hope that's info is useful for you.
Post the output of "dmesg" after you try to install the module. It will tell us whats going wrong. This is not normal at all and might be hardware related.
cssvb94 said:
but shows that it is just a software problem.
Click to expand...
Click to collapse
I don't see how you come to the conclusion that it is a software problem. Intermittence is typically a sign of a HARDWARE problem.
lbcoder said:
I don't see how you come to the conclusion that it is a software problem. Intermittence is typically a sign of a HARDWARE problem.
Click to expand...
Click to collapse
Simple, it works somethimes on some builds and it doesn't at all on others - same hardware, different software.
Anyway, I realy hope it's not hardware related ...
cyanogen said:
Post the output of "dmesg" after you try to install the module. It will tell us whats going wrong. This is not normal at all and might be hardware related.
Click to expand...
Click to collapse
Is that request for me or airmaxx?
I really don't want to reflash now when it's working.
In the moment when something goes wrong I'll post dmesg.
I've noticed "D/wlan_loader( 228): ConfigMge start rc = -1" couple times in dmesg output when it wasn't working and "D/wlan_loader( 228): ConfigMge start rc = 0" when it works.
after a clean install of cyanogen 3.9.1, i tried to start with in the gui, through settings menu. after it reported "unable to start wifi" this is my dmesg output....
Code:
<6>[ 695.675048] TIWLAN: Driver loading
<4>[ 695.679168] wifi_probe
<4>[ 695.681762] trout_wifi_power: 1
<4>[ 695.888366] trout_wifi_reset: 0
<4>[ 695.943084] trout_wifi_set_carddetect: 1
<7>[ 695.947265] mmc0: card_present 1
<6>[ 695.950744] mmc0: Slot status change detected (0 -> 1)
<3>[ 698.464202] mmc0: Command timeout
<4>[ 698.474548] mmc0: card claims to support voltages below the defined range. These will be ignored.
<4>[ 698.484191] mmc0: SDIO card claims to support the incompletely defined 'low voltage range'. This will be ignored.
<6>[ 698.497955] mmc0: new SDIO card at address 0001
<6>[ 698.508758] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
<6>[ 698.517639] tiwlan0 (): not using net_device_ops yet
<6>[ 698.530426] TIWLAN: Driver initialized (rc 0)
<3>[ 698.535705] mmc0: Data CRC error
<3>[ 698.539276] msmsdcc_data_err: opcode 0x00000035
<3>[ 698.544128] msmsdcc_data_err: blksz 4, blocks 1
<3>[ 698.549621] SDIO_SyncWrite: failed (-84)
<3>[ 698.554016] mmc0: Data CRC error
<3>[ 698.557586] msmsdcc_data_err: opcode 0x00000035
<3>[ 698.562713] msmsdcc_data_err: blksz 4, blocks 1
<3>[ 698.567718] SDIO_SyncWrite: failed (-84)
<3>[ 701.399383] mmc0: Data timeout
<3>[ 701.403289] SDIO_SyncRead: failed (-110)
<4>[ 701.407623] TIWLAN: invalid chip id = 0x 0 0 0 0!
<6>[ 701.412933] TIWLAN: Driver loaded
<4>[ 701.820495] select 226 (app_process), adj 15, size 3301, to kill
<4>[ 701.826873] send sigkill to 226 (app_process), adj 15, size 3301
<3>[ 704.165802] mmc0: Data timeout
<3>[ 704.169311] SDIO_SyncRead: failed (-110)
<3>[ 704.174041] TIWLAN: TIWLAN: Failed to start config manager
<6>[ 710.698730] RPC_TIME_TOD_SET_APPS_BASES:
<6>[ 710.698760] tick = 38620607
<6>[ 710.698760] stamp = 48907518449025024
<4>[ 735.120178] select 480 (app_process), adj 15, size 4338, to kill
<4>[ 735.126464] send sigkill to 480 (app_process), adj 15, size 4338
something i remembered earlier was that long ago, many roms and flashes prior (when I was still chasing after Hero and Rosie) i saw a wpa supplicant file had been installed on my fat32 partition, no system folder or anything just on the root of the card. i remember thinking at the time how odd this was and manually deleting the file prior to my next flash.
My problem may have started shortly thereafter but honestly don't remember, just grasping for straws here
cssvb94 said:
Simple, it works somethimes on some builds and it doesn't at all on others - same hardware, different software.
Anyway, I realy hope it's not hardware related ...
Click to expand...
Click to collapse
Really? That's not what you said before...
cssvb94 said:
I have tried everything - reflashing different images, radio, formatting ... etc.
Nothing helped.
Click to expand...
Click to collapse
Clearly, it is NOT related to the software since you TRIED CHANGING the software and it didn't help, and the SAME SOFTWARE works fine for everybody else, which means that it MUST be either USER ERROR, or HARDWARE DEFECT.
lbcoder said:
Really? That's not what you said before...
Clearly, it is NOT related to the software since you TRIED CHANGING the software and it didn't help, and the SAME SOFTWARE works fine for everybody else, which means that it MUST be either USER ERROR, or HARDWARE DEFECT.
Click to expand...
Click to collapse
Listen, I'm not here to argue and I don't have anything against you.
Why you are so catchy about that simple details?
I'm trying to help and share what I've been through.
If you are offended of something I said then - sorry.
Don't be such arrogant, capital letters don't work on me. =)
----------------------------------------------------------------------
This is cut from my dmesg :
WiFi starting OK
--- cut ---
<6>[ 268.613555] TIWLAN: Driver loading
<4>[ 268.617797] wifi_probe
<4>[ 268.620758] trout_wifi_power: 1
<4>[ 268.830261] trout_wifi_reset: 0
<4>[ 268.884521] trout_wifi_set_carddetect: 1
<7>[ 268.888824] mmc0: card_present 1
<6>[ 268.892303] mmc0: Slot status change detected (0 -> 1)
<3>[ 271.400268] mmc0: Command timeout
<4>[ 271.410339] mmc0: card claims to support voltages below the defined range. These will be ignored.
<4>[ 271.419982] mmc0: SDIO card claims to support the incompletely defined 'low voltage range'. This will be ignored.
<6>[ 271.436584] mmc0: new SDIO card at address 0001
<6>[ 271.446960] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
<6>[ 271.455352] tiwlan0 (): not using net_device_ops yet
<6>[ 271.464538] TIWLAN: Driver initialized (rc 0)
<4>[ 271.469909] TIWLAN: 1251 PG 1.2
<6>[ 271.473693] TIWLAN: Driver loaded
<3>[ 271.863403] mmc0: Data CRC error
<3>[ 271.866851] msmsdcc_data_err: opcode 0x00000035
<3>[ 271.871551] msmsdcc_data_err: blksz 512, blocks 1
<4>[ 271.877441] SDIO Write failure (-84)
<3>[ 271.883209] TIWLAN: TIWLAN: Failed to start config manager
--- cut ---
<6>[ 689.787445] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
<6>[ 689.795745] tiwlan0 (): not using net_device_ops yet
<6>[ 689.804901] TIWLAN: Driver initialized (rc 0)
<4>[ 689.810150] TIWLAN: 1251 PG 1.2
<6>[ 689.813690] TIWLAN: Driver loaded
<3>[ 690.153045] mmc0: Data CRC error
<3>[ 690.156463] msmsdcc_data_err: opcode 0x00000035
<3>[ 690.161163] msmsdcc_data_err: blksz 4, blocks 1
<4>[ 690.168182] SDIO Write failure (-84)
<3>[ 690.173889] TIWLAN: TIWLAN: Failed to start config manager
--- cut ---
Now new case: "Unable to stop Wi-Fi"
rmmod wlan throws back: "rmmod: delete_module 'wlan' failed (errno 11)"
lsmod returns: "wlan 566844 1 - Live 0xbf480000"
lbcoder, was there anything in my dmesg that confirmed it is indeed hardware, or anything useful at all in there?
after reading the reports on googlecode pages, i was leaning to hardware issue only because the problem is so rare and those people sent their g1's back in. I was really hoping this wasn't the case though.
I'd be happy with intermittent at this point, my wifi has not turned on in like 2 months my phone was purchased used (wifi worked fine at the time though) on craigslist so I can't return it to TMO
The CRC errors on mmc0 means that your sdcard is dying. It might seem unrelated but because how the way the G1 hardware works, this could be the problem. Yank your card and try it again.
No more WiFi
"Unable to stop" or "Unable to start" after reboot.
Tried with different SD card - no CRC errors and still no WiFi
for me the wifi turned on but it cant connect with a router... just write obtain ip address.. and after.. no connection
this is my log
<6>[ 175.583831] ept #2 out max:512 head:ffc0c100 bit:2
<6>[ 175.584289] ept #0 in max:64 head:ffc0c040 bit:16
<6>[ 175.585083] ept #1 in max:512 head:ffc0c0c0 bit:17
<6>[ 175.585510] ept #2 in max:512 head:ffc0c140 bit:18
<6>[ 175.586059] usb: notify offline
<6>[ 175.594207] usb: suspend
<6>[ 175.813262] usb: reset
<6>[ 175.815673] usb: portchange USB_SPEED_HIGH
<6>[ 175.967803] usb: reset
<6>[ 175.970092] usb: portchange USB_SPEED_HIGH
<6>[ 176.164825] usb_mass_storage usb_mass_storage: config #1
<6>[ 187.209259] request_suspend_state: wakeup (3->0) at 180968491210 (2009-07-
29 16:16:01.570098877 UTC)
<6>[ 188.333618] TIWLAN: Driver loading
<4>[ 188.334503] wifi_probe
<4>[ 188.334777] trout_wifi_power: 1
<4>[ 188.536346] trout_wifi_reset: 0
<4>[ 188.586914] trout_wifi_set_carddetect: 1
<7>[ 188.587432] mmc0: card_present 1
<6>[ 188.587738] mmc0: Slot status change detected (0 -> 1)
<3>[ 191.095031] mmc0: Command timeout
<4>[ 191.102386] mmc0: card claims to support voltages below the defined range.
These will be ignored.
<4>[ 191.103210] mmc0: SDIO card claims to support the incompletely defined 'lo
w voltage range'. This will be ignored.
<6>[ 191.112518] mmc0: new SDIO card at address 0001
<6>[ 191.118377] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
<6>[ 191.123901] TIWLAN: Driver initialized (rc 0)
<4>[ 191.125244] TIWLAN: 1251 PG 1.2
<6>[ 191.125701] TIWLAN: Driver loaded
<6>[ 192.657897] snd_set_volume 256 0 5
<6>[ 192.747344] snd_set_volume 256 0 5
<3>[ 198.871185] init: sys_prop: permission denied uid:1000 name:ro.config.noc
heckin
<6>[ 244.551879] TIWLAN: Driver unloading
<4>[ 244.553070] sdio_reset_comm():
<7>[ 244.631011] TIWLAN: Releasing SDIO resources
<7>[ 244.632324] TIWLAN: SDIO resources released
<4>[ 244.634918] wifi_remove
<4>[ 244.635406] trout_wifi_set_carddetect: 0
<7>[ 244.636199] mmc0: card_present 0
<6>[ 244.636627] mmc0: Slot status change detected (1 -> 0)
<6>[ 244.639465] mmc0: card 0002 removed
<4>[ 244.643585] trout_wifi_reset: 1
<4>[ 244.699401] trout_wifi_power: 0
<6>[ 244.905883] TIWLAN: Driver unloaded
<6>[ 246.548492] TIWLAN: Driver loading
<4>[ 246.549377] wifi_probe
<4>[ 246.549652] trout_wifi_power: 1
<4>[ 246.754119] trout_wifi_reset: 0
<4>[ 246.805236] trout_wifi_set_carddetect: 1
<7>[ 246.805786] mmc0: card_present 1
<6>[ 246.806060] mmc0: Slot status change detected (0 -> 1)
<3>[ 249.310638] mmc0: Command timeout
<4>[ 249.318481] mmc0: card claims to support voltages below the defined range.
These will be ignored.
<4>[ 249.319335] mmc0: SDIO card claims to support the incompletely defined 'lo
w voltage range'. This will be ignored.
<6>[ 249.326782] mmc0: new SDIO card at address 0001
<6>[ 249.332794] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
<6>[ 249.338226] TIWLAN: Driver initialized (rc 0)
<4>[ 249.339141] TIWLAN: 1251 PG 1.2
<6>[ 249.339599] TIWLAN: Driver loaded
<6>[ 994.061614] request_suspend_state: sleep (0->3) at 987820816650 (2009-07-2
9 16:29:28.422424317 UTC)
<4>[ 994.083801] deinit sharp panel
<4>[ 994.762908] save exit: isCheckpointed 1
<4>[ 994.765380] save exit: isCheckpointed 1
If you want help, get your details straight! If you contradict yourself all over the place, then nobody can possibly know what is going on and you won't get anywhere.
cssvb94 said:
Listen, I'm not here to argue and I don't have anything against you.
Why you are so catchy about that simple details?
Click to expand...
Click to collapse
You mention having tried flashing different software...
Have you tried flashing IMAGES (fastboot) or just update scripts (i.e. update.zip)?
If you haven't tried already, I suggest flashing the stock *engineering* bootloader 0.95.3000, ADP1-CRC1 images from www.htc.com -- the one that's labeled as "system image" (not the one labeled "recovery image", which is just an update.zip), and radio v2_22_19_26I (also from htc.com), write everything to the phone using fastboot, pull the battery, wait 10 minutes, and see what happens. IF it is a software problem, then this will *definitely* fix it. If it is a HARDWARE problem, then this will *definitely NOT* fix it. If the wifi starts working right after you write these things, *do not* conclude that it was a software problem since it could simply have gone intermittent-on. Keep the software like that and run it for at least a week to make sure the problem doesn't come back before making your conclusions.
Went back to stock 1.0 RC29 with original SPL, radio and bootloader and started from scratch.
Also formated SD card - only one partition FAT32.
Now I'm with ADP1.5 JF and WiFi is working most of the time.
So angry lbcoder what's your great verdict now? SOFTWARE or HARDWARE?
lbcoder said:
You mention having tried flashing different software...
Have you tried flashing IMAGES (fastboot) or just update scripts (i.e. update.zip)?
If you haven't tried already, I suggest flashing the stock *engineering* bootloader 0.95.3000, ADP1-CRC1 images from www.htc.com -- the one that's labeled as "system image" (not the one labeled "recovery image", which is just an update.zip), and radio v2_22_19_26I (also from htc.com), write everything to the phone using fastboot, pull the battery, wait 10 minutes, and see what happens. IF it is a software problem, then this will *definitely* fix it. If it is a HARDWARE problem, then this will *definitely NOT* fix it. If the wifi starts working right after you write these things, *do not* conclude that it was a software problem since it could simply have gone intermittent-on. Keep the software like that and run it for at least a week to make sure the problem doesn't come back before making your conclusions.
Click to expand...
Click to collapse
which is the commands for push the radio and the the adp1-crc1 image via fastboot?
i can t find ADP1-CRC1 images can you give me a url please?
success!!!!!!
the problem was the radio... i flashed 2 times the radio and now work!!!!!
thanks guyssss i love you aahahah
rock187 said:
the problem was the radio... i flashed 2 times the radio and now work!!!!!
thanks guyssss i love you aahahah
Click to expand...
Click to collapse
Great =)
Would you please post full step-by-step what you did.
10x in advance
It didn't work for me. I'm going to return my G1 back to the store I bought it, it's still under warranty.

Android with Wifi Thread - Cooler wifi

Update:
handsets are becoming very hot when wifi is used, you can make them use less power by using the rootfs.img provided, changes where made to tiwlan.ini during testing which keeps the wifi on active even when not in use, this version has reverted the changes and now power saving can be used once more.
http://drop.io/coolerwifikaiser
Aims:
Wakelocks?
Looks like this thread has served its purpose
Wow, are you actually doing all of these commands through the phone? >_<
I really want to see wifi rollin on android too, can't wait to load the ol' Tilt up with it.
the '-f' option
Hi,
a short question, you wrote...
Code:
'wpa_supplicant -f -Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf &'
...and I've allready seen this in different ohter posts, but I don't know what the '-f' option effects.
I allready browsed the manpages an this option ins't listed. I just tried the command without this statement and it also worked (but did not create the output '-Dtiwlan0' to '/data/local/tmp'). But wlan also doesn't work...
For Polaris users who might need this info:
First things first, make sure wlan works in Windows Mobile. This seems to be the procedure for getting the wlan into do something in Android. It seems to be very similar to the wifi tethering guides on the G1.
Custom Kernel
We need a kernel, the kernel config produced by make vogue_defconfig ARCH=arm leaves the wireless extensions disabled, so this might the cause of the missing mac address in ifconfig. Current attempts to produce a kernel with these extensions have caused the settings dialogues and ifconfig to hang, Ctrl+C does not force an exit. I'll continue to investigate this.
Tiwlan kernel module
I've found another version of the tiwlan driver, other than the one that is currently in git master which loads the firmware and gives the ok - OK
Download Update: This driver skipped checks, ignore it
so lets see if we can merge this with the newer driver to get a working one.
Initial Variables
Code:
setprop wifi.interface tiwlan0
WLan Commands
Modprobe Method:
Code:
mkdir -p /lib/modules/`uname -r`
cp /sdcard/wlan.ko /lib/modules/`uname -r`/
Insmod Method:
Code:
insmod /sdcard/wlan.ko
Tiwlan0 Mac address: No
Required Output: TIWLAN: Driver loaded
WLAN_Loader
Code:
wlan_loader -f /sdcard/Fw1251r1c.bin -e /proc/calibration -i /sdcard/tiwlan.ini
Tiwlan0 Mac address: No
Required Output: Set property wlan.driver.status = ok - Ok
ifconfig -a might need to show a mac address at this point, i'm still not sure when ifconfig -a gets the mac address info
Code:
wpa_supplicant -ddK -Dtiwlan0 -itiwlan0 -c/sdcard/wpa_supplicant.conf &
ifconfig -a must show a mac address or the next step will error out, you can assign one using the following command, just change it to mac address you see in windows. However simply assigning one with this command might not be enough, it could be the sign of a bigger problem.
Code:
ifconfig tiwlan0 hw ether 00:00:00:00:00:00
Code:
ifconfig tiwlan0 192.168.1.100 netmask 255.255.255.0
ifconfig tiwlan0 up
Log Collecting:
Dmesg - Its a ring buffer so as new info is added old info will be removed, you need to run the command right after insmod or modprobe to see if it worked ok.
Code:
[B]dmesg|grep -i wlan[/B]
TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
TIWLAN: Driver initialized (rc 0)
TIWLAN: 1251 PG [B]1.1[/B]
TIWLAN: Driver loaded
If i'm right The kaiser has 1.1. the G1 has 1.2, its a reference to the chip used.
Logcat
You can run logcat at the start to keep a log of everything the machine has done since android has started. If you run it like this it will keep logging to the file as you run other commands so when you boot back to WM and sync you can open the file in an editor like Notepad++ and see what happened. This is the first thing i run when i get to the root shell
Code:
logcat -f /sdcard/debuglog.txt &
After running the wlan_loader you can run this to check it worked ok:
Code:
[B]grep -i 'wlan' /sdcard/debuglog.txt[/B]
D/wlan_loader( 395): adapter tiwlan0, eeprom /proc/calibration, init /sdcard/tiwlan.ini, firmware /sdcard/Fw1251r1c.bin
D/wlan_loader( 395): Configuring adapter
D/wlan_loader( 395): Adapter configuration rc = 0
D/wlan_loader( 395): Starting configMge
D/wlan_loader( 395): ConfigMge start rc = 0
D/wlan_loader( 395): Driver configured
D/wlan_loader( 395): Firmware loaded and running OK
D/wlan_loader( 395): Set property wlan.driver.status = ok - Ok
i did once end up with the ok - Ok but it was hit and miss, and i've ended up with all sorts from ok - Fail to fail - Ok to fail - Fail but ifconfig has never shown a mac address on its own
Email to...
The terminal emulator in android should have an option in the menu to email everything you've seen to an email address, use that to keep logs of the entire session. Better terminal has this feature, but it stopped working, try
Files
Fw1251r1c.bin
The firmware filenames of the G1 and the Kaiser have the same name. So we should get a list of good kaiser firmware to rule firmware issues out as soon as possible. If you can connect in windows mobile to a wpa secured AP then the Fw1251r1c.bin in the windows folder on the rom should be the one you are using in Android.
File, Size in bytes, MD5SUM, Source
Fw1251r1c.bin, 185388, ebf5c2036d37bc56b4d41ddcbda4311e, 6.1 WWE ROM shifu, Download
tiwlan.ini
Lets get a good tiwlan.ini file, so we know if its causing issues.
Values:
Comming Soon...
wpa_supplicant.conf
Code:
ctrl_interface=tiwlan0
ap_scan=1
eapol_version=1
fast_reauth=1
eapol_version=1
update_config=1
network={
ssid="WIFISSID"
...
priority=1
}
-------------------------------------------------------------------------------------
Quick Scripts:
Its hard to type long commands on the keyboard so here are some scripts to help:
Code:
[B]/sdcard/cmd1[/B]
#!/bin/sh
echo 'Setting Variables...'
setprop wifi.interface tiwlan0
echo 'Variables Set!'
echo 'Logging to /sdcard/debuglog.txt...'
pkill logcat
logcat -f /sdcard/debuglog.txt &
echo 'Logger Started!'
echo 'Copying WLan Module...'
mkdir -p /lib/modules/`uname -r`
cp /system/lib/modules/wlan.ko /lib/modules/`uname -r`/
echo 'Module Coppied!'
echo 'Loading Module...'
modprobe wlan
lsmod
echo 'Module Loaded!'
#
Code:
[B]/sdcard/cmd2[/B]
#!/bin/sh
echo 'Running Loader...'
wlan_loader -f /sdcard/Fw1251r1c.bin -e /sdcard/calibration -i /sdcard/tiwlan.ini
echo 'Loder Completed'
echo 'Ifconfig Output'
ifconfig -a
dmesg|grep -i wlan
cat /sdcard/debuglog.txt... |grep -i wlan
#
Output:
$ su
~ # cd /sdcard/
/sdcard # ./cmd1
Setting Variables...
Variables Set!
Logging to /sdcard/debuglog.txt...
Logger Started!
Copying WLan Module...
Module Coppied!
Loading Module...
wlan 584168 0 - Live 0xbf000000
Module Loaded!
/sdcard # ./cmd2
Running Loader...
Loder Completed
Ifconfig Output
tiwlan0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
[ 96.701234] TIWLAN: Driver loading
[ 97.593872] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
[ 97.599251] TIWLAN: Driver initialized (rc 0)
[ 97.599511] TIWLAN: 1251 PG 1.1
[ 97.599547] TIWLAN: Driver loaded
D/wlan_loader( 518): adapter tiwlan0, eeprom /sdcard/calibration, init /system/etc/wifi/tiwlan.ini, firmware /sdcard/Fw1251r1c.bin
D/wlan_loader( 518): Configuring adapter
D/wlan_loader( 518): Adapter configuration rc = 0
D/wlan_loader( 518): Starting configMge
D/wlan_loader( 518): ConfigMge start rc = 0
D/wlan_loader( 518): Driver configured
D/wlan_loader( 518): Firmware loaded and running OK
D/wlan_loader( 518): Set property wlan.driver.status = ok - Ok
thanks,
how did you manage that configMge doesn't fail on start? I still get 'rc = -1'. Did you build a new 'wlan.ko' with the Kernelsource from git (Vogue/Kaiser)? And what firmware are you using (the original or the extracted?)
maybe you can post your files for testing...
toasty_ said:
thanks,
how did you manage that configMge doesn't fail on start? I still get 'rc = -1'. Did you build a new 'wlan.ko' with the Kernelsource from git (Vogue/Kaiser)? And what firmware are you using (the original or the extracted?)
maybe you can post your files for testing...
Click to expand...
Click to collapse
Its either the variable being set or modprobe being used that does the trick, so try those, i'm in the middle of compiling a newer kernel to see if it works better
Thx for the short Tutorial and the scripts. Unfortunately I still get the message:
Code:
'ConfigMge start rc = -1'
I think the reason is the (my) wlan.ko module - it shows following message/warning while loading (insmod and modprobe)
Code:
wlan: version magic '2.6.25-00818-gf668526 preempt mod_unload ARMv6 ' should be '2.6.25-00832-g42c5da5 preempt mod_unload ARMv6'
but its loaded...
especialy lsmod gives me another value for the second number (think the allocated memory):
Code:
wlan 583852 0 - Live 0xbf000000
I use the firmware from '3.34.shifuv11F WWE':
Size: 185388 byte
MD5: ebf5c2036d37bc56b4d41ddcbda4311e
dmesg:
Code:
[ 114.718730] TIWLAN: Driver loading
[ 115.079288] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
[ 115.084840] TIWLAN: Driver initialized (rc 0)
[ 115.084952] TIWLAN: Driver loaded
[ 122.852419] TIWLAN: TIWLAN: Failed to start config manager
logcat:
Code:
D/wlan_loader( 444): adapter tiwlan0, eeprom /proc/calibration, init /sdcard/wlan/tiwlan.ini, firmware /sdcard/wlan/Fw1251r1c.bin
D/wlan_loader( 444): Configuring adapter
D/wlan_loader( 444): Adapter configuration rc = 0
D/wlan_loader( 444): Starting configMge
D/wlan_loader( 444): ConfigMge start rc = -1
D/wlan_loader( 444): Driver configuration failed (-1)
E/wlan_loader( 444): init_driver() failed
D/wlan_loader( 444): Set property wlan.driver.status = failed - Ok
can you tell me what wlan.ko you are using - maybe a link...
Upon further investigation it turns out that a specific version of the firmware and a compatible wlan.ko are needed to get it to work, i'm rolling up a fresh system.img to test now, i'll post it if it works
http://forum.xda-developers.com/showthread.php?p=4231219
toasty_ said:
Thx for the short Tutorial and the scripts. Unfortunately I still get the message:
Code:
'ConfigMge start rc = -1'
I think the reason is the (my) wlan.ko module - it shows following message/warning while loading (insmod and modprobe)
Code:
wlan: version magic '2.6.25-00818-gf668526 preempt mod_unload ARMv6 ' should be '2.6.25-00832-g42c5da5 preempt mod_unload ARMv6'
but its loaded...
especialy lsmod gives me another value for the second number (think the allocated memory):
Code:
wlan 583852 0 - Live 0xbf000000
I use the firmware from '3.34.shifuv11F WWE':
Size: 185388 byte
MD5: ebf5c2036d37bc56b4d41ddcbda4311e
dmesg:
Code:
[ 114.718730] TIWLAN: Driver loading
[ 115.079288] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
[ 115.084840] TIWLAN: Driver initialized (rc 0)
[ 115.084952] TIWLAN: Driver loaded
[ 122.852419] TIWLAN: TIWLAN: Failed to start config manager
logcat:
Code:
D/wlan_loader( 444): adapter tiwlan0, eeprom /proc/calibration, init /sdcard/wlan/tiwlan.ini, firmware /sdcard/wlan/Fw1251r1c.bin
D/wlan_loader( 444): Configuring adapter
D/wlan_loader( 444): Adapter configuration rc = 0
D/wlan_loader( 444): Starting configMge
D/wlan_loader( 444): ConfigMge start rc = -1
D/wlan_loader( 444): Driver configuration failed (-1)
E/wlan_loader( 444): init_driver() failed
D/wlan_loader( 444): Set property wlan.driver.status = failed - Ok
can you tell me what wlan.ko you are using - maybe a link...
Click to expand...
Click to collapse
So you'll have to compile a custom kernel, then a custom wlan.ko before you try this. I have also uploaded the wifi firmware, a link is in the first post
Custom Kernel:
I use the Kernelsources from git ("git.linuxtogo.org", vogue branch). I also tried to build the 'wlan.ko' from Android-source (I set 'KERNEL_DIR' to the Folder of my Kernel source). If I run make I get some errors because of missing include-files.
//Edit: just made symlink to arm-msm
If I'm home on weekend I try to build a new wlan.ko for my kernel. Is there anything, that needs to be patched for kernel 2.6.25?
btw. I found this page http://www.johandekoning.nl/index.php, there are some information about wlan and firmware loading issues (for the G1, but nearly the same problemes)
I didn't do anything special to get a wlan.ko, just compiled it as normal:
Code:
KERNEL_DIR=/Android/kernel make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
Current status from error log:
Code:
D/wlan_loader( 406): adapter tiwlan0, eeprom /proc/calibration, init /system/etc/wifi/tiwlan.ini, firmware /system/etc/wifi/Fw1251r1c.bin
D/wlan_loader( 406): Configuring adapter
D/wlan_loader( 406): Adapter configuration rc = 0
D/wlan_loader( 406): Starting configMge
D/wlan_loader( 406): ConfigMge start rc = 0
D/wlan_loader( 406): Driver configured
D/wlan_loader( 406): Firmware loaded and running OK
D/wlan_loader( 406): Set property wlan.driver.status = ok - Ok
D/dalvikvm( 161): GC freed 11747 objects / 572968 bytes in 363ms
V/WifiMonitor( 161): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2]
V/WifiMonitor( 161): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=1]
D/SettingsWifiEnabler( 390): Received wifi state changed from Enabling to Enabled
V/WifiMonitor( 161): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2]
V/WifiMonitor( 161): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=1]
[B]D/WifiHW ( 161): 'DRIVER RSSI' command timed out.[/B]
[B]D/WifiHW ( 161): 'DRIVER LINKSPEED' command timed out.[/B]
[B]D/WifiHW ( 161): 'DRIVER MACADDR' command timed out.[/B]
V/WifiStateTracker( 161): Connection to supplicant established, state=INACTIVE
[B]D/WifiHW ( 161): 'DRIVER RXFILTER-ADD 0' command timed out.[/B]
[B]D/WifiHW ( 161): 'DRIVER BTCOEXSCAN-STOP' command timed out.[/B]
V/WifiStateTracker( 161): Changing supplicant state: INACTIVE ==> SCANNING
I/WindowManager( 161): Setting rotation to 1, animFlags=1
I/WindowManager( 161): Config changed: { scale=1.0 imsi=0/0 locale=en touch=3 key=2/1/1 nav=1 orien=2 }
[B]D/WifiHW ( 161): 'DRIVER SCAN-PASSIVE' command timed out.[/B]
V/WifiStateTracker( 161): Changing supplicant state: SCANNING ==> INACTIVE
V/WifiStateTracker( 161): Changing supplicant state: INACTIVE ==> SCANNING
V/WifiStateTracker( 161): Changing supplicant state: SCANNING ==> INACTIVE
W/WindowManager( 161): Window freeze timeout expired.
W/WindowManager( 161): Force clearing orientation change: Window{43120508 StatusBar paused=false}
[B]D/WifiHW ( 161): 'SCAN_RESULTS' command timed out.[/B]
D/StatusBar( 161): updateResources
I/WindowManager( 161): Config changed: { scale=1.0 imsi=0/0 locale=en touch=3 key=2/1/2 nav=1 orien=2 }
D/dalvikvm( 161): GC freed 5792 objects / 384744 bytes in 220ms
D/StatusBar( 161): updateResources
[B]D/WifiHW ( 161): 'LIST_NETWORKS' command timed out.[/B]
W/SurfaceFlinger( 161): timeout expired mFreezeDisplay=1, mFreezeCount=1
W/WindowManager( 161): App freeze timeout expired.
W/WindowManager( 161): Force clearing freeze: AppWindowToken{43358af8 token=HistoryRecord{43358808 {com.android.settings/com.android.settings.wifi.WifiSettings}}}
D/WifiHW ( 161): 'STATUS' command timed out.
D/dalvikvm( 161): GC freed 946 objects / 43184 bytes in 188ms
D/dalvikvm( 317): GC freed 356 objects / 32824 bytes in 105ms
D/WifiHW ( 161): 'DRIVER RSSI' command timed out.
W/WindowManager( 161): Key dispatching timed out sending to com.android.settings/com.android.settings.wifi.WifiSettings
W/WindowManager( 161): Dispatch state: null
W/WindowManager( 161): Current state: {{null to Window{4335b828 com.android.settings/com.android.settings.wifi.WifiSettings paused=false} @ 1247587631205 lw=Window{4335b828 com.android.settings/com.android.settings.wifi.WifiSettings paused=false} [email protected] fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{4335b828 com.android.settings/com.android.settings.wifi.WifiSettings paused=false}}}
I/ActivityManager( 161): ANR (application not responding) in process: com.android.settings
I/ActivityManager( 161): Annotation: keyDispatchingTimedOut
I/ActivityManager( 161): CPU usage:
I/ActivityManager( 161): Load: 5.21 / 3.21 / 1.36
I/ActivityManager( 161): CPU usage from 9963ms to 28ms ago:
I/ActivityManager( 161): system_server: 8% = 7% user + 0% kernel
I/ActivityManager( 161): com.android.alarmclock: 1% = 1% user + 0% kernel
I/ActivityManager( 161): com.android.phone: 0% = 0% user + 0% kernel
I/ActivityManager( 161): loop0: 0% = 0% user + 0% kernel
I/ActivityManager( 161): rild: 0% = 0% user + 0% kernel
I/ActivityManager( 161): android.process.acore: 0% = 0% user + 0% kernel
I/ActivityManager( 161): com.android.inputmethod.latin: 0% = 0% user + 0% kernel
I/ActivityManager( 161): android.process.media: 0% = 0% user + 0% kernel
I/ActivityManager( 161): TOTAL: 8% = 7% user + 1% kernel + 0% irq
toasty_ said:
Custom Kernel:
I use the Kernelsources from git ("git.linuxtogo.org", vogue branch). I also tried to build the 'wlan.ko' from Android-source (I set 'KERNEL_DIR' to the Folder of my Kernel source). If I run make I get some errors because of missing include-files.
If I'm home on weekend I try to build a new wlan.ko for my kernel. Is there anything, that needs to be patched for kernel 2.6.25?
btw. I found this page http://www.johandekoning.nl/index.php, there are some information about wlan and firmware loading issues (for the G1, but nearly the same problemes)
Click to expand...
Click to collapse
Sorry, my mistake, i did in fact have a different driver version. I have uploaded it, check the first post. This driver does not seem to work and will need to be modified.
thanks for the files, where did you get them? Compiling worked without any failure (just had to create a symlink to 'arch-msm'
it seem as if the firmware is loaded (on my phone it only works with the fw of the G1). I think it is realiy loaded because you get 'failed - OK' if you try to load it a 2nd time.
by the way have you extraced wlan-eeprom ('/proc/calibration') http://projects.linuxtogo.org/tracker/index.php?func=detail&aid=32&group_id=37&atid=273
toasty_ said:
thanks for the files, where did you get them? Compiling worked without any failure (just had to create a symlink to 'arch-msm'
it seem as if the firmware is loaded (on my phone it only works with the fw of the G1). I think it is realiy loaded because you get 'failed - OK' if you try to load it a 2nd time.
by the way have you extraced wlan-eeprom ('/proc/calibration') http://projects.linuxtogo.org/tracker/index.php?func=detail&aid=32&group_id=37&atid=273
Click to expand...
Click to collapse
Yes, i have extracted my eeprom file and i have found my mac address in there 3 times, which seems strange. I found the area which has the same start as the carlibration of a G1 (found here) and extracted a chunk to get the same size file. I tried it but it doesn't seem to make a difference. Maybe the data is read after the point at which we are having errors?
So I've played a bit around with the files. At the moment the driver is loaded and the firmware is accepted. But the wlan adapter still doesn't get a Mac.
Btw. if you take a look at the eeprom-file you find the MAC from Offset 0x5C to 0x61 in reverse order. Would be interesting the G1 eeprom-file looks like. Maybe somebody can 'cat /proc/calibration > /sdcard/calibration.bin'.
//***OK nearly the same as you said - should write faster***//
OK, yes found the offset in my file, but the its a bit different
Code:
G1:
02 11 56 06 1C 06 01 16 60 03 07 01 09 56 12 00 00 00 01 0D 56 40
Kaiser:
02 11 56 06 1C 06 [COLOR="Red"]00[/COLOR] 16 60 03 [COLOR="Red"]02[/COLOR] 01 09 56 12 00 00 00 01 0D 56 40
Ah, i made a mistake, still need to find where the contents of calibration are in the rom dump
Ok in romdump there are some more Offsets (0x243E5C8, 0x2500040, 0x2500840, 0x2520040 from full rom-dump) that have nearly the same byte order
But only in 0x2500840 and 0x2500040 my MAC is included --> I've checked with 'diff' both extracted Offsets (752 Byte) and they are same
toasty_ said:
So I've played a bit around with the files. At the moment the driver is loaded and the firmware is accepted. But the wlan adapter still doesn't get a Mac.
Btw. if you take a look at the eeprom-file you find the MAC from Offset 0x5C to 0x61 in reverse order. Would be interesting the G1 eeprom-file looks like. Maybe somebody can 'cat /proc/calibration > /sdcard/calibration.bin'.
//***OK nearly the same as you said - should write faster***//
OK, yes found the offset in my file, but the its a bit different
Code:
G1:
02 11 56 06 1C 06 01 16 60 03 07 01 09 56 12 00 00 00 01 0D 56 40
Kaiser:
02 11 56 06 1C 06 [COLOR="Red"]00[/COLOR] 16 60 03 [COLOR="Red"]02[/COLOR] 01 09 56 12 00 00 00 01 0D 56 40
Click to expand...
Click to collapse
Ok i found the correct location, I searched for 021156061c in the eeprom dump and found it. I haven't had a chance to test this yet. Also another interesting thing to note is that both the kaiser' and G1's mac address started with 00:18 :41
Newbie16 said:
Ok i found the correct location, I searched for 021156061c in the eeprom dump and found it. I haven't had a chance to test this yet. Also another interesting thing to note is that both the kaiser' and G1's mac address started with 00:18 :41
Click to expand...
Click to collapse
yap, my does it too...

[GUIDE] Use aircrack-ng on android phone using Wireless USB Adapter

Hey everyone,
It is possible to use an external Wi-Fi adapter with an android phone to run aircrack-ng, however I've had a lot of difficulties doing so. Here is a tutorial to make it easier for you.
The theory
Running the aircrack-ng suite itself is not much of a problem, as android is pretty much like ubuntu. The most difficult part of running aircrack is that the wifi chipsets of most phones do not support "monitor mode". This mode is required to capture any information from the air, not just the ones for your computer, and is therefore necessary for aircrack (airmon-ng). First of all, you should Google if your phone's wifi chipset supports this mode. If it does, find out how. If it doesn't, you can follow this guide and use a usb wifi stick.
Android is linux, and uses a linux kernel. The easiest way to get the driver for our WiFi adapter to work is to rebuild the android kernel with the driver built-in. We can then flash the new kernel to the phone, and copy the firmware binary. This tutorial uses CyanogenMod, because it is a well documented, open-source ROM. With some adjustments you can use the same method on other ROMs. If you do not have experience building a linux kernel, it is best to stick to this guide and use CyanogenMod.
What you'll need:
- Android phone
- Computer with Ubuntu (or other linux distribution)
- USB OTG Adapter (micro usb to usb female)
- Wireless USB Adapter
- Time and patience
I am using my Samsung Galaxy S4 GT-i9505 and an Eminent EM4454 Wireless USB adapter using the rt73 driver, but I am sure this will work with other devices.
A. Install your ROM and aircrack-ng, on your phone...
1) ...install Cyanogenmod. Don't delete the .zip download after installation.
2) ...install "Complete Linux Installer" from Google Play and download and unpack Ubuntu in /sdcard/ubuntu/ubuntu.img as stated in the app.
3) ...install the aircrack-ng suite in the chrooted ubuntu. On ubuntu 12.04, this cannot be done using apt-get:
sudo apt-get install build-essential libssl-dev nano
wget http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz
tar -xzvf aircrack-ng-1.1.tar.gz
cd aircrack-ng-1.1
nano common.mak
Then find CFLAGS ?= -g -W -Wall -Werror -O3 and remove -Werror.
make
sudo make install
B. Rebuild the kernel, in a terminal on linux on your computer...
1) ...install adb and fastboot
sudo apt-get install adb fastboot
2) Enable USB-debugging on your phone, connect to your computer and test the connection on linux on your computer:
adb get-state
3) Find the GitHub page for the cyanogenmod kernel for your device. You can find this page on cyanogenmod.org. Now download the kernel source and extract it into a folder.
4) Change working directory into the kernel
cd pathtothekernel
5) See if there is a .config file. In a CyanogenMod kernel, there probably isn't. Type:
nano .config
If you see an empty screen, we need to get your devices current configuration:
adb pull /proc/config.gz config.gz
zcat config.gz > .config
rm config.gz
4) Make the necessary changes in the configuration file to have your USB wireless driver built in. To do so:
make menuconfig
Use the enter key to expand an item in the menu, and the space bar to mark a module. Make sure you mark the necessary modules with a *, not an 'M', so they will be built-in. Most wireless drivers have the mac80211 driver as a dependency. Make sure you select that one with an asterix (*), too.
For example, for my rt73 based adapter, I did:
Networking Support > Wireless > [*] ... (mac80211)
Device Drivers > Network > Wireless LAB > [*] Ralink Drivers > [*] rt73usb
5) Make some changes to fight errors:
Still in menuconfig, make the following changes:
Kernel Hacking > (1024) Block? size > 1032
Now to tell gcc to build ignoring warnings edit the Makefile
nano Makefile
Now go down a few pages and add the line:
KCONFIG_CFLAGS += -w
6) The normal gcc C compiler cannot be used as it will build for your computers processor. We need to build for ARM-processors, called cross-compiling. To make the cross-compiling work you need the arm-eabi- toolchain.
cd ~/Downloads
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
The will download the ~120Mb toolchain.
7) Tell the Makefile where the toolchain is
cd pathtothekernel
export PATH=$PATH:~/Downloads/arm-eabi-4.6/bin
export CROSS_COMPILE=arm-eabi-
export ARCH=arm
8) Then build the kernel. It you get errors, don't be scared and Google them. One cause of weird errors is not having enough memory; add a swapfile and try again. The building of the kernel will take quite some time:
make
C. Flash the new kernel to the phone
1) When the build is finished, it has saved "zImage". This image is our kernel. For the sake of simplicity, let's copy it to the desktop but rename it so that later commands won't override it:
cp arch/arm/boot/zImage ~/Desktop/new-zImage
2) For flashing, we need to pack this zImage into a boot.img. Get the boot.img out of the ROM you now run on your phone. For example, the CyangonMod.zip you had to flash to your phone to install it, contains a boot.img. Most flashable .zip files have a boot.img in them. Copy this boot.img to your desktop, too.
3) Extract the boot.img
sudo apt-get install abootimg
abootimg -x boot.img
this will place 3 new files on your desktop.
4) Delete the extracted zImage and boot.img, as we want our self-compiled kernel.
rm zImage
rm boot.img
5) Edit the configuration file and remove the line with kernel-size, as our new kernel's size will be slightly larger.
nano bootimg.cfg
Remove the line beginning with bootsize:, which is probably the first line
5) Use abootimg to repack new-zImage and the 2 extracted files.
abootimg --create boot.img -f bootimg.cfg -k new-zImage -r initrd.img
6) Backup your phone in case anything goes wrong, and flash the boot.img. For many phones, this can be done using fastboot on linux. On my Galaxy, I had to use Mobile Odin: http://forum.xda-developers.com/showthread.php?t=1347899
D. Copy the firmware and run, on your phone...
1) ... start the chrooted ubuntu
2) ... insert your USB OTG and in that the Wireless USB Adapter
3) ... run airmon-ng and make sure your device is listed.
airmon-ng
If not, check that your kernel is flashed (under Settings > About Device > kernel it should say [email protected]) and that the correct drivers were selected with an asterix * (built-in, y) in make menuconfig. If it is listed, continue.
4) We now have the correct driver, but the firmware is likely missing. Download the .bin firmware that belongs to your driver. In my case, I had to download the rt73 driver from aircrack-ng website, and copy the .bin firmware file. Install ES File Manager or another root explorer, choose Root Explorer and then mount /system as Read/Write so that you can edit the contents. Now copy the firmware file to /system/etc/firmware/.
5) Run airmon-ng and check which interface your Wireless USB Adapter is.
airmon-ng
6) Start the monitor mode
airmon-ng start wlan1
Replace wlan1 with the interface name of the Wireless USB Adapter
7) If everything went right, it should say that monitor mode is enabled. You can now use
airodump-ng mon0
replacing mon0 with the monitor interface. If you get the error SIOCFLAGS: No such file or directory, the firmware file (e.g. *.bin) is not placed in the right directory (/system/etc/firmware and maybe a path extension, check the firmware README) or has the wrong name.
Congratulations, you have now got a phone running aircrack-ng!
I got this to work on my stock Samsung TouchWiz ROM by making a few adjustments:
- Get the kernel from Samsung: http://opensource.samsung.com/
- Change the lines in the .config file of the kernel below ## Samsung Rooting ... from =y to =n using nano
- To get boot.img, download the ...tar.md5 firmware matching your current firmware from http://www.sammobile.com/firmware/, rename .tar.md5 to .tar, and extract the boot.img. You cannot use mkbootimg here, only abootimg, as this boot.img has a special ramdisk address!
Thank you helped heaps. had been compiling as modules and couldnt insmod.
s4 i9505 stock rom - aircrack - tp-link tl-wn722n
Jesus, that was awesome. Couldn't find a better tutorial on the net!
Thanks again.
Btw, could you please upload the Galaxy S4 Cyanogen rom with the kernel?
I would appreciate alot.
Hey i have Htc desire C! I did the instal "bcmon.apk" but when I run the program turns out this message "cant run as root,'su' failed... why ??? please help me !
argentux said:
Hey everyone,
It is possible to use an external Wi-Fi adapter with an android phone to run aircrack-ng, however I've had a lot of difficulties doing so. Here is a tutorial to make it easier for you.
The theory
Running the aircrack-ng suite itself is not much of a problem, as android is pretty much like ubuntu. The most difficult part of running aircrack is that the wifi chipsets of most phones do not support "monitor mode". This mode is required to capture any information from the air, not just the ones for your computer, and is therefore necessary for aircrack (airmon-ng). First of all, you should Google if your phone's wifi chipset supports this mode. If it does, find out how. If it doesn't, you can follow this guide and use a usb wifi stick.
Android is linux, and uses a linux kernel. The easiest way to get the driver for our WiFi adapter to work is to rebuild the android kernel with the driver built-in. We can then flash the new kernel to the phone, and copy the firmware binary. This tutorial uses CyanogenMod, because it is a well documented, open-source ROM. With some adjustments you can use the same method on other ROMs. If you do not have experience building a linux kernel, it is best to stick to this guide and use CyanogenMod.
What you'll need:
- Android phone
- Computer with Ubuntu (or other linux distribution)
- USB OTG Adapter (micro usb to usb female)
- Wireless USB Adapter
- Time and patience
I am using my Samsung Galaxy S4 GT-i9505 and an Eminent EM4454 Wireless USB adapter using the rt73 driver, but I am sure this will work with other devices.
A. Install your ROM and aircrack-ng, on your phone...
1) ...install Cyanogenmod. Don't delete the .zip download after installation.
2) ...install "Complete Linux Installer" from Google Play and download and unpack Ubuntu in /sdcard/ubuntu/ubuntu.img as stated in the app.
3) ...install the aircrack-ng suite in the chrooted ubuntu. On ubuntu 12.04, this cannot be done using apt-get:
sudo apt-get install build-essential libssl-dev nano
wget http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz
tar -xzvf aircrack-ng-1.1.tar.gz
cd aircrack-ng-1.1
nano common.mak
Then find CFLAGS ?= -g -W -Wall -Werror -O3 and remove -Werror.
make
sudo make install
B. Rebuild the kernel, in a terminal on linux on your computer...
1) ...install adb and fastboot
sudo apt-get install adb fastboot
2) Enable USB-debugging on your phone, connect to your computer and test the connection on linux on your computer:
adb get-state
3) Find the GitHub page for the cyanogenmod kernel for your device. You can find this page on cyanogenmod.org. Now download the kernel source and extract it into a folder.
4) Change working directory into the kernel
cd pathtothekernel
5) See if there is a .config file. In a CyanogenMod kernel, there probably isn't. Type:
nano .config
If you see an empty screen, we need to get your devices current configuration:
adb pull /proc/config.gz config.gz
zcat config.gz > .config
rm config.gz
4) Make the necessary changes in the configuration file to have your USB wireless driver built in. To do so:
make menuconfig
Use the enter key to expand an item in the menu, and the space bar to mark a module. Make sure you mark the necessary modules with a *, not an 'M', so they will be built-in. Most wireless drivers have the mac80211 driver as a dependency. Make sure you select that one with an asterix (*), too.
For example, for my rt73 based adapter, I did:
Networking Support > Wireless > [*] ... (mac80211)
Device Drivers > Network > Wireless LAB > [*] Ralink Drivers > [*] rt73usb
5) Make some changes to fight errors:
Still in menuconfig, make the following changes:
Kernel Hacking > (1024) Block? size > 1032
Now to tell gcc to build ignoring warnings edit the Makefile
nano Makefile
Now go down a few pages and add the line:
KCONFIG_CFLAGS += -w
6) The normal gcc C compiler cannot be used as it will build for your computers processor. We need to build for ARM-processors, called cross-compiling. To make the cross-compiling work you need the arm-eabi- toolchain.
cd ~/Downloads
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
The will download the ~120Mb toolchain.
7) Tell the Makefile where the toolchain is
cd pathtothekernel
export PATH=$PATH:~/Downloads/arm-eabi-4.6/bin
export CROSS_COMPILE=arm-eabi-
export ARCH=arm
8) Then build the kernel. It you get errors, don't be scared and Google them. One cause of weird errors is not having enough memory; add a swapfile and try again. The building of the kernel will take quite some time:
make
C. Flash the new kernel to the phone
1) When the build is finished, it has saved "zImage". This image is our kernel. For the sake of simplicity, let's copy it to the desktop but rename it so that later commands won't override it:
cp arch/arm/boot/zImage ~/Desktop/new-zImage
2) For flashing, we need to pack this zImage into a boot.img. Get the boot.img out of the ROM you now run on your phone. For example, the CyangonMod.zip you had to flash to your phone to install it, contains a boot.img. Most flashable .zip files have a boot.img in them. Copy this boot.img to your desktop, too.
3) Extract the boot.img
sudo apt-get install abootimg
abootimg -x boot.img
this will place 3 new files on your desktop.
4) Delete the extracted zImage and boot.img, as we want our self-compiled kernel.
rm zImage
rm boot.img
5) Edit the configuration file and remove the line with kernel-size, as our new kernel's size will be slightly larger.
nano bootimg.cfg
Remove the line beginning with bootsize:, which is probably the first line
5) Use abootimg to repack new-zImage and the 2 extracted files.
abootimg --create boot.img -f bootimg.cfg -k new-zImage -r initrd.img
6) Backup your phone in case anything goes wrong, and flash the boot.img. For many phones, this can be done using fastboot on linux. On my Galaxy, I had to use Mobile Odin: http://forum.xda-developers.com/showthread.php?t=1347899
D. Copy the firmware and run, on your phone...
1) ... start the chrooted ubuntu
2) ... insert your USB OTG and in that the Wireless USB Adapter
3) ... run airmon-ng and make sure your device is listed.
airmon-ng
If not, check that your kernel is flashed (under Settings > About Device > kernel it should say [email protected]) and that the correct drivers were selected with an asterix * (built-in, y) in make menuconfig. If it is listed, continue.
4) We now have the correct driver, but the firmware is likely missing. Download the .bin firmware that belongs to your driver. In my case, I had to download the rt73 driver from aircrack-ng website, and copy the .bin firmware file. Install ES File Manager or another root explorer, choose Root Explorer and then mount /system as Read/Write so that you can edit the contents. Now copy the firmware file to /system/etc/firmware/.
5) Run airmon-ng and check which interface your Wireless USB Adapter is.
airmon-ng
6) Start the monitor mode
airmon-ng start wlan1
Replace wlan1 with the interface name of the Wireless USB Adapter
7) If everything went right, it should say that monitor mode is enabled. You can now use
airodump-ng mon0
replacing mon0 with the monitor interface. If you get the error SIOCFLAGS: No such file or directory, the firmware file (e.g. *.bin) is not placed in the right directory (/system/etc/firmware and maybe a path extension, check the firmware README) or has the wrong name.
Congratulations, you have now got a phone running aircrack-ng!
I got this to work on my stock Samsung TouchWiz ROM by making a few adjustments:
- Get the kernel from Samsung: http://opensource.samsung.com/
- Change the lines in the .config file of the kernel below ## Samsung Rooting ... from =y to =n using nano
- To get boot.img, download the ...tar.md5 firmware matching your current firmware from http://www.sammobile.com/firmware/, rename .tar.md5 to .tar, and extract the boot.img. You cannot use mkbootimg here, only abootimg, as this boot.img has a special ramdisk address!
Click to expand...
Click to collapse
Thats insane that it can actually run aircrack, especially considering i had a hard time just running linux on it.
yoshihat said:
Thats insane that it can actually run aircrack, especially considering i had a hard time just running linux on it.
Click to expand...
Click to collapse
How is that so? For me it wasn't complicated at all.
I did everything and got everything ready, up to
Code:
make menuconfig
And it gives me error 2. And then it says something about there not being a variable.
:/
Please help?
I am actually having a time trying to make it work. I did everything right, then I sucessfully build the boot.img, but when I flash it through Mobile Odin as "Kernel" and the Cyanogenmod loads, the screen is all screwed up, like the SystemUI has crashed + interference signal effect, its unusable. Then I restore it through TWRP back to normal.
Do you know what may be the problem? Im using the 10.1.3 JFLTEXX CyanogenMod Build. (For the i9505.)
Edit: Nevermind, was compiling the M build against the Stable one. Obvious error. It works 100% now, thanks!
GruberEXN said:
I am actually having a time trying to make it work. I did everything right, then I sucessfully build the boot.img, but when I flash it through Mobile Odin as "Kernel" and the Cyanogenmod loads, the screen is all screwed up, like the SystemUI has crashed + interference signal effect, its unusable. Then I restore it through TWRP back to normal.
Do you know what may be the problem? Im using the 10.1.3 JFLTEXX CyanogenMod Build. (For the i9505.)
Edit: Nevermind, was compiling the M build against the Stable one. Obvious error. It works 100% now, thanks!
Click to expand...
Click to collapse
Could you please send the edited working kernel with the modules/drivers built in that you installed? (Please, like a link or something?)
androidiphonehacker said:
Could you please send the edited working kernel with the modules/drivers built in that you installed? (Please, like a link or something?)
Click to expand...
Click to collapse
Ok! I built the RTL8187/8187b driver, do you have that one? (Alfa wireless chipsets often use those ones.)
Edited for unknown reasons!
I have a TP-Link TL-wn722n USB wireless adapter. I'm kind of a noob at kernel building, and I'm not sure what driver/module it uses. Soooo... Could you build it for me please please pleaaaase? xD
I have (that USB adapter), and the newest CyanogenMod ROM for model SGS-i9505.
Tell you what: I'll pay you if you build it.
Sent from my GT-I9505 using Tapatalk
androidiphonehacker said:
I have a TP-Link TL-wn722n USB wireless adapter. I'm kind of a noob at kernel building, and I'm not sure what driver/module it uses. Soooo... Could you build it for me please please pleaaaase? xD
I have (that USB adapter), and the newest CyanogenMod ROM for model SGS-i9505.
Tell you what: I'll pay you if you build it.
Sent from my GT-I9505 using Tapatalk
Click to expand...
Click to collapse
Add'd your skype.
Building a kernel requires some troubleshooting, so prepare your device with TWRP or any recovery menu. (A nandroid backup would be nice too.)
And I don't mind a donation, although I don't want a payment. Maybe a cheap game would do the work after one day of troubleshooting your new kernel
Hello everyone....
i have a few little update form my side...
But first, my englisch is not the best, i'm sorry for it ^^
1. The is Important for every one how work at the end with aircrack... Then you need to get to patch the mac80211 data (channel-negative-one-maxim.patch and mac80211.compat08082009.wl_frag+ack_v1.patch from aircrack), otherwise you get at the end a fixed channel -1 problem in aircrack.... of which more later
Here now My litte Upgrade to build a another Kernel because CM10... For this session I use the Kernel form Yank555.lu on JB 4.1.2!
First you need to get the Kernel von GitHub. "github /yank555-lu/SGS3-JB/archive/Update11.zip"
After you extracte the kernel into your Kernel-Folder go in it.
cd ../path/to/kernel
########## 1. You need to edit the Makefile to beware for compile errors. ##########
nano Makefile
Search at the line 571:
-- KBUILD_CFLAGS += -fdiagnostics-show-option -Werror \
++ KBUILD_CFLAGS += -fdiagnostics-show-option \
Search at line 373:
-- -mcpu=cortex-a9 -mfpu=neon -mtune=cortex-a9 -fno-pic \
-- -munaligned-access
++ -mtune=cortex-a9
Now go to line 693:
++ #
++ # Edit by Mastaaa
++ #
++ KCONFIG_CFLAGS += -w
Save the file and Close it....
################ 2. Download and Patch the Wireless Patches. ################
For the negative-channel fix you need to get the Patches.
wget patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch &&
wget patches.aircrack-ng.org/channel-negative-one-maxim.patch
Now patch it...
patch ./net/mac80211/tx.c mac80211.compat08082009.wl_frag+ack_v1.patch &&
patch ./net/wireless/chan.c channel-negative-one-maxim.patch
################### 3. make .config and edit menuconfig. ####################
Ceate a Basic .config File with:
make Yank555.lu_v3.x_series_defconfig
Now Edit the Menuconfig:
make menuconfig
Here the Basic edit's (i think) you get to need:
1. Edit the Kernel Info (to what you want...):
General setup --->
(...) Local version - append to kernel release (Hit Enter to edit this...)#
2. Turn On the mac80211 driver:
[*] Networking support ---->
-*- Wireless ---->
< > Generic IEEE 802.11 Networking Stack (Mark to <*>)
[ ] Enable mac80211 mesh networking (pre-802.11s) support (Mark to [ * ]
3, Mark the additional usb drivers:
Device Drivers ---->
.....[*] Network device support ---->
..........[*] Wireless LAN ---->
...............(Mark <m> or <*> waht you need.... Here a few examples
...............<*> Atmel at76c503/at76c505/at76c505a USB cards
...............<*> Realtek 8187 and 8187B USB support
...............<*> Atheros Wireless Cards ----->
...............<*> Ralink driver support ----->
....................<*> Ralink rt2500 (USB) support
....................<*> Ralink rt2501/rt73 (USB) support
....................<*> Ralink rt27xx/rt28xx/rt30xx (USB) support
....................[ * ] rt2800usb - Include support for rt33xx devices
....................[ * ] rt2800usb - Include support for rt35xx devices (EXPERIMENTAL)
....................[ * ] rt2800usb - Include support for rt53xx devices (EXPERIMENTAL)
....................[ * ] rt2800usb - Include support for unknown (USB) devices
4. Mark the OTG support on !:
Device Drivers ---->
.....[*] USB support ---->
..........[ ] OTG support ............................................................(Mark it to [*])
..........< > Enable Wireless USB extensions (EXPERIMENTAL) ..(Makr it to <*>)
5. Make Kernel hacking:
Kernel hacking ---->
.....(1024) Warn for stack frames larger than (needs gcc 4.4) (Edit this to 1032)
######################### 4. compile the Kernel. ###########################
make ARCH=arm CROSS_COMPILE=$CCOMPILER -j6
(with make -i ... you can ignor errors, but i think thats not good ^^)
########################## 5. make ramdisk.gz. ###########################
mkdir ramdisk-new
cp -ax ramdisk ./ramdisk-new
#clear git repositories in ramfs
find ramdisk-new -name .git -exec rm -rf {} \;
#remove empty directory placeholders
find ramdisk-new -name EMPTY_DIRECTORY -exec rm -rf {} \;
rm -rf ramdisk-new/tmp/*
#remove mercurial repository
rm -rf ramdisk-new/.hg
#copy modules into ramfs
mkdir -p ramdisk-new/lib/modules
find -name '*.ko' -exec cp -av {} ramdisk-new/lib/modules/
#make ramdisk.gz
mkbootfs ./ramdisk-new | gzip > ramdisk.gz
########################### 6. make boot.img. ############################
./mkbootimg --kernel arch/arm/boot/zImage --ramdisk ramdisk.gz --board smdk4x12 --base 0x10000000 --pagesize 2048 --ramdiskaddr 0x11000000 -o boot.img
################ 7. make modules.tgz for your chroot Linux. ###################
tar -czf modules.tgz `find . | grep ko$`
(... This modules.tgz you have to copy to sdcard0,
then go into chrootet (after you have flashed the new Kernel!) Linux and make: )
cd /lib/modules
mkdir `uname -r`
cd *
tar -zxf /sdcard0/modules.tgz
depmod -a
now turn the usb-wlan on S3 and make:
modprobe <your-driver>
example:
modprobe rt73usb
Now your Wifi-USB must be Online...
Soooo that was it from my self...
(For any Questions, you have. I'm on my Position...
Bye bye,
Master X
Please help me I have got HTC one mini on stock . Is it possible...?
Yes i think so...
In the theory at android 2.3 its possible to compile it with rt73usb extentials...
I'll do the kernel for i9500, but I'm afraid to damage the phone the wrong make.
If one makes the kernel for i9500 you Could you share?
yes, I did. and running rlt8187 alfa wifi on ubuntu.but wps not work. Everything other than these problems well
Probably, to add to another something and there are ( in kernel)
GT-I9500 cihazımdan Tapatalk kullanılarak gönderildi
LG G2 802 International Version
Can someone create a Kernel for This Device? Please?
With RTL 8187 Support
Would pay for it.
I added usb adapter device support to kernel successfully but then my wifi stopped working here is the dmesg of turning wifi on
Code:
<4>[ 2273.866333] wlan: disagrees about version of symbol cfg80211_ready_on_channel
<4>[ 2273.866455] wlan: Unknown symbol cfg80211_ready_on_channel (err -22)
<4>[ 2273.866729] wlan: disagrees about version of symbol __ieee80211_get_channel
<4>[ 2273.866821] wlan: Unknown symbol __ieee80211_get_channel (err -22)
<4>[ 2273.867065] wlan: disagrees about version of symbol cfg80211_cqm_rssi_notify
<4>[ 2273.867187] wlan: Unknown symbol cfg80211_cqm_rssi_notify (err -22)
<4>[ 2273.867370] wlan: disagrees about version of symbol cfg80211_roamed
<4>[ 2273.867523] wlan: Unknown symbol cfg80211_roamed (err -22)
<4>[ 2273.867614] wlan: disagrees about version of symbol cfg80211_pmksa_candidate_notify
<4>[ 2273.867736] wlan: Unknown symbol cfg80211_pmksa_candidate_notify (err -22)
<4>[ 2273.867858] wlan: disagrees about version of symbol wiphy_register
<4>[ 2273.868011] wlan: Unknown symbol wiphy_register (err -22)
<4>[ 2273.868133] wlan: disagrees about version of symbol cfg80211_disconnected
<4>[ 2273.868286] wlan: Unknown symbol cfg80211_disconnected (err -22)
<4>[ 2273.868499] wlan: disagrees about version of symbol cfg80211_new_sta
<4>[ 2273.868591] wlan: Unknown symbol cfg80211_new_sta (err -22)
<4>[ 2273.868774] wlan: disagrees about version of symbol cfg80211_tdls_oper_request
<4>[ 2273.868865] wlan: Unknown symbol cfg80211_tdls_oper_request (err -22)
<4>[ 2273.869018] wlan: disagrees about version of symbol cfg80211_connect_result
<4>[ 2273.869171] wlan: Unknown symbol cfg80211_connect_result (err -22)
<4>[ 2273.869262] wlan: disagrees about version of symbol cfg80211_inform_bss_frame
<4>[ 2273.869415] wlan: Unknown symbol cfg80211_inform_bss_frame (err -22)
<4>[ 2273.869506] wlan: disagrees about version of symbol wiphy_new
<4>[ 2273.869659] wlan: Unknown symbol wiphy_new (err -22)
<4>[ 2273.869781] wlan: disagrees about version of symbol cfg80211_rx_mgmt
<4>[ 2273.869903] wlan: Unknown symbol cfg80211_rx_mgmt (err -22)
<4>[ 2273.870117] wlan: disagrees about version of symbol cfg80211_send_unprot_deauth
<4>[ 2273.870239] wlan: Unknown symbol cfg80211_send_unprot_deauth (err -22)
<4>[ 2273.870361] wlan: disagrees about version of symbol cfg80211_mgmt_tx_status
<4>[ 2273.870513] wlan: Unknown symbol cfg80211_mgmt_tx_status (err -22)
<4>[ 2273.870727] wlan: disagrees about version of symbol cfg80211_inform_bss
<4>[ 2273.870819] wlan: Unknown symbol cfg80211_inform_bss (err -22)
<4>[ 2273.871002] wlan: disagrees about version of symbol wireless_send_event
<4>[ 2273.871093] wlan: Unknown symbol wireless_send_event (err -22)
<4>[ 2273.871246] wlan: disagrees about version of symbol wiphy_free
<4>[ 2273.871337] wlan: Unknown symbol wiphy_free (err -22)
<4>[ 2273.871520] wlan: disagrees about version of symbol cfg80211_scan_done
<4>[ 2273.871612] wlan: Unknown symbol cfg80211_scan_done (err -22)
<4>[ 2273.871795] wlan: disagrees about version of symbol regulatory_hint
<4>[ 2273.871856] wlan: Unknown symbol regulatory_hint (err -22)
<4>[ 2273.872039] wlan: disagrees about version of symbol cfg80211_get_bss
<4>[ 2273.872100] wlan: Unknown symbol cfg80211_get_bss (err -22)
<4>[ 2273.872283] wlan: disagrees about version of symbol cfg80211_michael_mic_failure
<4>[ 2273.872436] wlan: Unknown symbol cfg80211_michael_mic_failure (err -22)
<4>[ 2273.872528] wlan: disagrees about version of symbol cfg80211_ibss_joined
<4>[ 2273.872680] wlan: Unknown symbol cfg80211_ibss_joined (err -22)
<4>[ 2273.872833] wlan: disagrees about version of symbol cfg80211_del_sta
<4>[ 2273.872985] wlan: Unknown symbol cfg80211_del_sta (err -22)
<4>[ 2273.880584] wlan: disagrees about version of symbol cfg80211_remain_on_channel_expired
<4>[ 2273.880737] wlan: Unknown symbol cfg80211_remain_on_channel_expired (err -22)
<4>[ 2273.880889] wlan: disagrees about version of symbol wiphy_unregister
<4>[ 2273.880950] wlan: Unknown symbol wiphy_unregister (err -22)
<6>[ 2277.103332] SLIM_CL: skip reconfig sequence
<6>[ 2336.262878] SLIM_CL: skip reconfig sequence
<6>[ 2341.206115] SLIM_CL: skip reconfig sequence
<3>[ 2372.867187] init: untracked pid 7791 exited
<6>[ 2375.211242] SLIM_CL: skip reconfig sequence
<6>[ 2378.713043] SLIM_CL: skip reconfig sequence
<6>[ 2385.924896] check_recover_vbus_collapse: VBUS input current still limiting to 700 mA. Retry set
<6>[ 2397.413330] SLIM_CL: skip reconfig sequence
<4>[ 2464.730682] set_usb_max_current: setting current max to 1500
<4>[ 2544.752166] set_usb_max_current: setting current max to 1500
<4>[ 2604.769744] set_usb_max_current: setting current max to 1500
<4>[ 2674.810363] set_usb_max_current: setting current max to 1500
<6>[ 2686.035491] SLIM_CL: skip reconfig sequence
<3>[ 2690.290008] qup_i2c qup_i2c.0: QUP: I2C status flags :0x1300c8, irq:226
<3>[ 2690.290191] qup_i2c qup_i2c.0: I2C slave addr:0x28 not connected
<3>[ 2690.300445] pn544 0-0028: pn544_dev_write: i2c write err -107, but retry 1
<3>[ 2691.778778] qup_i2c qup_i2c.0: QUP: I2C status flags :0x1343c8, irq:226
<3>[ 2691.778961] qup_i2c qup_i2c.0: I2C slave addr:0x28 not connected
<3>[ 2691.789093] pn544 0-0028: pn544_dev_write: i2c write err -107, but retry 1
<6>[ 2694.949035] SLIM_CL: skip reconfig sequence
<4>[ 2714.834625] set_usb_max_current: setting current max to 1500
<6>[ 2715.883575] SLIM_CL: skip reconfig sequence
<6>[ 2843.803405] SLIM_CL: skip reconfig sequence
<6>[ 2854.273345] SLIM_CL: skip reconfig sequence
<6>[ 2955.025512] msm_otg msm_otg: USB exited from low power mode
<6>[ 2955.026306] msm_otg msm_otg: b_idle work, inputs=0x00000001
<6>[ 2955.026580] msm_otg msm_otg: Avail curr from USB = 0
<6>[ 2955.026885] msm_otg msm_otg: phy_reset: success
<6>[ 2955.136352] msm_otg msm_otg: USB in low power mode
<6>[ 2969.677581] msm_otg msm_otg: USB exited from low power mode
<6>[ 2969.678131] msm_otg msm_otg: b_idle work, inputs=0x00000003
<6>[ 2969.853424] msm_otg msm_otg: chg_type = USB_SDP_CHARGER
<6>[ 2969.853576] msm_otg msm_otg: b_idle work, inputs=0x00000003
<6>[ 2969.859283] msm_hsusb msm_hsusb: vbus online
<6>[ 2969.859436] msm_hsusb msm_hsusb: CI13XXX_CONTROLLER_RESET_EVENT received
<6>[ 2969.859558] msm_otg msm_otg: changed to b_peripheral, from b_idle
<6>[ 2970.140228] msm_hsusb msm_hsusb: reset
<6>[ 2970.140686] android_work: android_work: did not send uevent (0 0 (null))
<6>[ 2970.178863] android_work: android_work: sent uevent USB_STATE=CONNECTED
<6>[ 2970.182403] msm_hsusb msm_hsusb: reset
<6>[ 2970.182891] android_work: android_work: sent uevent USB_STATE=DISCONNECTED
<6>[ 2970.261993] android_work: android_work: sent uevent USB_STATE=CONNECTED
<6>[ 2971.677764] android_usb gadget: high-speed config #1: android_usb
<6>[ 2971.677917] msm_otg msm_otg: Avail curr from USB = 500
<6>[ 2971.733306] android_work: android_work: sent uevent USB_STATE=CONFIGURED
<6>[ 2971.880920] mtp_open
<6>[ 2974.863128] msm_ta_detect_work: USB exit ta detection - frindex
<3>[ 3000.568115] init: untracked pid 8878 exited
<3>[ 3003.624877] init: untracked pid 8948 exited
<6>[ 3005.894012] SLIM_CL: skip reconfig sequence
I think problem occurs when I enable "cfg80211 wireless extensions compatibility" but unless enabling it i cannot see the wifi adapter in airmon-ng
if CONFIG_CFG80211_WEXT=y = inner WLAN wont work
if CONFIG_CFG80211_WEXT=n = usb wifi adapter wont work with aircrack, reaver
getprop
[wifi.interface]: [wlan0]
[wlan.driver.ath]: [0]
[wlan.driver.config]: [/data/misc/wifi/WCNSS_qcom_cfg.ini]
[wlan.driver.status]: [unloaded]
logcat:
I/WifiManager(16050): Process ndroid.settings enabled Wifi
D/WifiService( 779): setWifiEnabled: true pid=16050, uid=1000
E/WifiStateMachine( 779): Failed to load driver!
E/WifiStateMachine( 779): DriverFailedState
here are documentations about it but they are too complex for me :
https://community.freescale.com/docs/DOC-93603
http://blog.linuxconsulting.ro/2010/04/porting-wifi-drivers-to-android.html
as fas as I understand from what I read I should recompile wlan.ko after building new kernel but i dont know how
can't find any help

DVD-R burned with vanilla Android 4.1.1

I have just burned a DVD-R connected to my Padfone 2 under vanilla Android 4.1.1. Here are the steps:
(0) install version 9 of gentooandroid.sourceforge.net on a device on which step (4) below can be done (root rights will do).
(1) Connect the DVD writer with an OTG cable, a V cable if you can http://www.ebay.fr/itm/Micro-USB-Ho..._MobilePhoneDataCables_JN&hash=item417d1627de or use a powered USB HUB.
(2) /dev/sg0 should appear
(3) dmesg (if run as root) should show
Code:
[15:35:07.998763](CPU:0-pid:29826:scsi_scan_0) scsi 0:0:0:0: Attached scsi generic sg0 type 5
and take note of the 0:0:0:, which will be refered to as dev=0,0,0 below.
(4) Setup /dev/sg0 so that it will be accessible from Terminal IDE:
Code:
chgrp-moved 10105 /dev/sg0 ; chmod 660 /dev/sg0
where 10105 is the gid of terminal IDE (or, in my case, terminal emulator)
(5) install cdrecord with
Code:
FEATURES=-sandbox PORTAGE_BINHOST=http://sourceforge.net/projects/gentooandroid/files/packages/packages emerge --autounmask-write -gbav --binpkg-respect-use=y cdrtools
(6) insert a blank DVD-R media and close the drive
(7)
Code:
cdrecord dev=0,0,0 driveropts=help -checkdrive
which shows:
Cdrecord-ProDVD-ProBD-Clone 3.00 (--) Copyright (C) 1995-2010 Jo:rg Schilling
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Linux sg driver version: 3.5.34
Using libscg version 'schily-0.9'.
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :
Vendor_info : 'TSSTcorp'
Identifikation : 'CDDVDW SE-218CN '
Revision : 'MF00'
Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.
Driver options:
burnfree Prepare writer to use BURN-Free technology
noburnfree Disable using BURN-Free technology
layerbreak Write DVD-R/DL media in automatic layer jump mode
layerbreak=val Set jayer jump address for DVD+-R/DL media
(8) Burn NOW the content of directory/ on the DVD-R:
Code:
mkisofs -V DVDName directory/ | cdrecord -v -dao -tsize `mkisofs -V DVDName -print-size directory/`s fs=6m speed=2 dev=0,0,0 -
(9) eject manually, and test media on another computer.
I may post a video of (8) if asked for that, showing the DVD-R writer in action.
i will try it and tell you.....good work
digyvijaykumar123 said:
i will try it and tell you.....good work
Click to expand...
Click to collapse
If you have any problem installing gentooandroid, I can help you. You can use this thread for example.
I have a lot of messages in dmesg :
Code:
[14:55:47.055035](CPU:0-pid:7033:cdrecord) usb-storage: queuecommand_lck called
[14:55:47.055127](CPU:0-pid:6499:usb-storage) usb-storage: *** thread awakened.
[14:55:47.055188](CPU:0-pid:6499:usb-storage) usb-storage: Command WRITE_10 (10 bytes)
[14:55:47.055249](CPU:0-pid:6499:usb-storage) usb-storage: 2a 00 00 00 ba 00 00 00 10 00
[14:55:47.055401](CPU:0-pid:6499:usb-storage) usb-storage: Bulk Command S 0x43425355 T 0xf9b L 32768 F 0 Trg 0 LUN 0 CL 12
[14:55:47.055493](CPU:0-pid:6499:usb-storage) usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[14:55:47.055707](CPU:0-pid:6499:usb-storage) usb-storage: Status code 0; transferred 31/31
[14:55:47.055798](CPU:0-pid:6499:usb-storage) usb-storage: -- transfer complete
[14:55:47.055859](CPU:0-pid:6499:usb-storage) usb-storage: Bulk command transfer result=0
[14:55:47.055920](CPU:0-pid:6499:usb-storage) usb-storage: usb_stor_bulk_transfer_sglist: xfer 32768 bytes, 1 entries
[14:55:47.057721](CPU:0-pid:6499:usb-storage) usb-storage: Status code 0; transferred 32768/32768
[14:55:47.057813](CPU:0-pid:6499:usb-storage) usb-storage: -- transfer complete
[14:55:47.057874](CPU:0-pid:6499:usb-storage) usb-storage: Bulk data transfer result 0x0
[14:55:47.057935](CPU:0-pid:6499:usb-storage) usb-storage: Attempting to get CSW...
[14:55:47.057996](CPU:0-pid:6499:usb-storage) usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[14:55:47.058209](CPU:0-pid:6499:usb-storage) usb-storage: Status code 0; transferred 13/13
[14:55:47.058270](CPU:0-pid:6499:usb-storage) usb-storage: -- transfer complete
[14:55:47.058331](CPU:0-pid:6499:usb-storage) usb-storage: Bulk status result = 0
[14:55:47.058392](CPU:0-pid:6499:usb-storage) usb-storage: Bulk Status S 0x53425355 T 0xf9b R 0 Stat 0x0
[14:55:47.058484](CPU:0-pid:6499:usb-storage) usb-storage: scsi cmd done, result=0x0
[14:55:47.058545](CPU:0-pid:6499:usb-storage) usb-storage: *** thread sleeping.
for each write of 32768 bytes. I wonder if Android stores all the dmesg somewhere or not.

[Dev-talk] [Kernel development] wlan/wifi and other modules failing,not being updated

Hi guys,
alright, so this should be a pretty "standard" question,
but I'm still having issues to solve it:
I'm getting errors like the following:
<4>[ 8.899871] ecryptfs: Unknown symbol wake_up_process (err -22)
<6>[ 10.418523] subsys-pil-tz fe200000.qcom,lpass: adsp: Power/Clock ready interrupt received
<6>[ 10.456267] subsys-pil-tz fe200000.qcom,lpass: Subsystem error monitoring/handling services are up
<6>[ 10.462157] platform fe034000.sound: Driver msm8994-asoc-snd requests probe deferral
<4>[ 10.480352] wlan: Unknown symbol sched_setscheduler (err -22)
<4>[ 10.480426] wlan: Unknown symbol wake_up_process (err -22)
<4>[ 10.915183] texfat: Unknown symbol wake_up_process (err -22)
...
<4>[ 54.177317] core_ctl: Unknown symbol core_ctl_get_policy (err -22)
<4>[ 54.177351] core_ctl: Unknown symbol set_user_nice (err -22)
<4>[ 54.177375] core_ctl: Unknown symbol wake_up_process (err -22)
<4>[ 54.177490] core_ctl: Unknown symbol core_ctl_put_policy (err -22)
Click to expand...
Click to collapse
The thing is:
I've removed the exfat driver from the kernel source !
So how and why is it still being loaded - where is it stored above all ?
And how to force update it ?
This is sort of like a Gentoo user (which I am) figuring out why the modules that are included in a packaged up blob are re-occuring
Hope you guys can help me out with this one since this is massively hindering kernel development and evaluation what commits work best for our device (performance, stability, battery runtime, etc.)
Thanks !
take a look at the following branch:
https://github.com/zachariasmaladro.../commits/32.0.A.6.200_AP_Sun-Kernel_v6-stable
the 5 last comments before the newest (or only the sched/fair, scheduler related) commits had to be reverted before WIFI and other components started to work again !
The Kernel and its driver are built from friggin' source !
How is that possible ?
is the ROM using proprietary kernel modules (including WIFI, I thought bcmdhd was supposed to get opensourced meanwhile) and those depend on certain symbols ?
Blasted ! :/

Categories

Resources