[HELP][Kernel][DEV] Monitor mode for BCM4329/4330 - HTC Desire X

Hi to all devs and members. I was wandering a few days ago ... can we enable monitor mode in our broadcom wifi chips ? i saw a few phones especialy older phones like htc desire (bravo) that this thing works on and newer like nexus s and sg s2,s3 where this thing is already enabled in driver code. i have a few refferences regardin to firmware and drivers for the wifi chip and i am asking of you if you could recompile the kernel with theese specific/patched firmware modules.
here are some refs:
http://forum.xda-developers.com/showthread.php?t=1893871
http://forum.xda-developers.com/showthread.php?t=2456888
https://code.google.com/p/bcmon/source/browse/#svn/trunk/bcm4330
http://bcmon.blogspot.ro/2013/01/new-firmware-for-bcm4330.html
http://wireless.kernel.org/en/users/Drivers/brcm80211
http://forum.xda-developers.com/showthread.php?t=2233282
http://forum.xda-developers.com/showthread.php?t=1892535
http://forum.xda-developers.com/showthread.php?t=1437321
Thank you !!!

We have above 3.2 kernel, so the source for that driver is already there. It may need to be enabled in compiler config though, but the dx's hardware could also just not be capable(Never really checked what wifi chipset we have). Have you tried Weaver/monitor mode yet?

CurtisMJ said:
We have above 3.2 kernel, so the source for that driver is already there. It may need to be enabled in compiler config though, but the dx's hardware could also just not be capable(Never really checked what wifi chipset we have). Have you tried Weaver/monitor mode yet?
Click to expand...
Click to collapse
i know mine is bcm 4329 ([ro.bt.chipset]: [Broadcom BCM4329-B1]) and form hardware specs it ses it is capable ... now it just has to be enabled from somewhere ... i got some kernel sources and i am looking in them and comparing with sta linux driver trying to see a match or somth .... compiling is not my gig ...so im puting my noobish knollage at work
if anyone cand be of any help it will be welcomed ! thanks in advance
LE: Found somth: look in "wl_iw.c"
in the patchd driver from S2 ( h t t p : / / code.google.com/p/bcmon/source/browse/trunk/bcm4329/driver/src/bcm4329/wl_iw.c?r=8 ) i see:
Code:
case IW_MODE_MASTER:
infra = ap = 1;
break;
case IW_MODE_ADHOC:
case IW_MODE_MONITOR:
case IW_MODE_AUTO:
and in original source from htc dev we have:
Code:
case IW_MODE_MASTER:
infra = ap = 1;
break;
case IW_MODE_ADHOC:
case IW_MODE_AUTO:
and your kernel: github.com/prototype-U/dx_kernel/blob/stable/drivers/net/wireless/bcm4329/wl_iw.c
Code:
case IW_MODE_MASTER:
infra = ap = 1;
break;
case IW_MODE_ADHOC:
case IW_MODE_AUTO:
break;
case IW_MODE_INFRA:
infra = 1;
break;
no monitor mode
Can u mod your BCM source with the one ive supplied and compile a test kernel ? If u have time that is ...

realy no one has any interest in this ?

d3m3 said:
realy no one has any interest in this ?
Click to expand...
Click to collapse
Well, I have got other projects to work on atm. I'll get on to this when I get time.

BUMP !

d3m3 said:
BUMP !
Click to expand...
Click to collapse
Oh come on ... is there noone interested in this ?

Well, I am, but don't have any solution

bump again ... still no interest

d3m3 said:
bump again ... still no interest
Click to expand...
Click to collapse
I dont really understand what really needs to be done.. maybe m too lazy xD

InfinityShooter said:
I dont really understand what really needs to be done.. maybe m too lazy xD
Click to expand...
Click to collapse
http://en.wikipedia.org/wiki/Monitor_mode --> What is monitor mode
https://code.google.com/p/bcmon/ --> how it works
wl_iw.c --> Kernel wifi driver to patch
case IW_MODE_MASTER:
infra = ap = 1;
break;
case IW_MODE_ADHOC:
case IW_MODE_MONITOR:
case IW_MODE_AUTO:

d3m3 said:
http://en.wikipedia.org/wiki/Monitor_mode --> What is monitor mode
https://code.google.com/p/bcmon/ --> how it works
wl_iw.c --> Kernel wifi driver to patch
case IW_MODE_MASTER:
infra = ap = 1;
break;
case IW_MODE_ADHOC:
case IW_MODE_MONITOR:
case IW_MODE_AUTO:
Click to expand...
Click to collapse
Can you give me the source file from where I need to port the code from?

InfinityShooter said:
I dont really understand what really needs to be done.. maybe m too lazy xD
Click to expand...
Click to collapse
InfinityShooter said:
Can you give me the source file from where I need to port the code from?
Click to expand...
Click to collapse
Working src from SG S2 -> HERE
Aircrack-ng for testing HERE
App that patches S2 Driver HERE
Thread on XDA HERE
Nexus one reference on how to Modify BCM4329 driver HERE
Project HOME HERE
Thank yow !

Related

Ki3 can't support the UsbHost

Here is my code:
Code:
UsbManager manager = (UsbManager) arg0.getSystemService(Context.USB_SERVICE);
HashMap<String, UsbDevice> deviceList = manager.getDeviceList();
Iterator<UsbDevice> deviceIterator = deviceList.values().iterator();
while(deviceIterator.hasNext()){
UsbDevice device = deviceIterator.next();
Log.v(TAG,"Vendor-Id ="+device.getVendorId());
Log.v(TAG,"Product-Id="+device.getProductId());
Log.v(TAG,"DeviceName="+device.getDeviceName());
}
it works well on my Galaxy SII(android 2.3.4),but when i upgrade my phone to KI3(2.3.5),this code didn't work.And the logcat show me "java.lang.NoSuchMethodError: android.hardware.usb.UsbManager.getDeviceList"
I can't seem to find any info on this either.
This particular API was introduced in API 12 (3.1) and yet Galaxy S2 had this in 2.3.4, I wonder if it was experimental, or some code Samsung ported over for the USB host support for pen drives they added and have now gone and removed these additional APIs which just happened to have been working in 2.3.4.
Real shame because things like the DSLR Dashboard and any other host related things we want to implement can't be done, at least not until we get ICS it seems.

[SOLVED] Nexus 10 USB tether

Hi, I'm trying to enable USB tethering on the Nexus 10, similar to how was done for the Nexus 7 in this thread.
I've done the required changes in the android os code, however I don't know how to modify the exynos kernel config to enable RNDIS (like was done for the tegra kernel in that same thread).
Anyone have any tips on how to go about doing this? I would really appreciate any help you could throw my way.
agentx3r said:
Hi, I'm trying to enable USB tethering on the Nexus 10, similar to how was done for the Nexus 7 in this thread.
I've done the required changes in the android os code, however I don't know how to modify the exynos kernel config to enable RNDIS (like was done for the tegra kernel in that same thread).
Anyone have any tips on how to go about doing this? I would really appreciate any help you could throw my way.
Click to expand...
Click to collapse
Fixed. No kernel changes needed, just add this to /device/samsung/manta/overlay/frameworks/base/core/res/res/values/config.xml:
Code:
<!-- List of regexpressions describing the interface (if any) that represent tetherable
USB interfaces. If the device doesn't want to support tething over USB this should
be empty. An example would be "usb.*" -->
<string-array translatable="false" name="config_tether_usb_regexs">
<item>"rndis0"</item>
</string-array>
<!-- Array of allowable ConnectivityManager network types for tethering -->
<!-- Common options are [1, 4] for wifi and dun or [0,1,5,7] for -->
<!-- mobile, wifi, hipri and bluetooth -->
<integer-array translatable="false" name="config_tether_upstream_types">
<item>0</item>
<item>1</item>
<item>5</item>
<item>7</item>
</integer-array>
agentx3r said:
Fixed. No kernel changes needed, just add this to /device/samsung/manta/overlay/frameworks/base/core/res/res/values/config.xml:
Code:
<!-- List of regexpressions describing the interface (if any) that represent tetherable
USB interfaces. If the device doesn't want to support tething over USB this should
be empty. An example would be "usb.*" -->
<string-array translatable="false" name="config_tether_usb_regexs">
<item>"rndis0"</item>
</string-array>
<!-- Array of allowable ConnectivityManager network types for tethering -->
<!-- Common options are [1, 4] for wifi and dun or [0,1,5,7] for -->
<!-- mobile, wifi, hipri and bluetooth -->
<integer-array translatable="false" name="config_tether_upstream_types">
<item>0</item>
<item>1</item>
<item>5</item>
<item>7</item>
</integer-array>
Click to expand...
Click to collapse
Where do you find that file path?
unknown_owner said:
Where do you find that file path?
Click to expand...
Click to collapse
Root of your source directory, it'll be there once you've completed everything you need to do before actually building android.
agentx3r said:
Root of your source directory, it'll be there once you've completed everything you need to do before actually building android.
Click to expand...
Click to collapse
Thanks. If I have to do all that they did for the nexus 7, then it's really worth it to me. I'm constantly changing ROMs and such. Thanks anyway. Thought it was a simple solution.
unknown_owner said:
Thanks. If I have to do all that they did for the nexus 7, then it's really worth it to me. I'm constantly changing ROMs and such. Thanks anyway. Thought it was a simple solution.
Click to expand...
Click to collapse
Yeah, I wish it was baked into all of the modified ROMs that are made (since it's such an easy fix in source) but I guess it's not something most people would find useful.
Hi,
just found this thread via search.
Do you guys know any other solution than building android from source with the suggested changes?
Is there any Custom Rom which has USB tethering enabled?
BUMP... come on. I have CM10 can't do it... blew my mind. Need this added into CM10 for N10!
mrsato said:
BUMP... come on. I have CM10 can't do it... blew my mind. Need this added into CM10 for N10!
Click to expand...
Click to collapse
you should have that using cm10.1 ? at least my n7 has the tethering option on cm10.1..
we ordered a n10 for work and need tethering. if cm does not support i probably will have to built aosp with the suggested "fix".
.Zip!
Now only if someone could make it into a update zip, It'd be great!
so i just set up the nexus 10 at work.
flashed cm10.1 and I'm a little disappointed that tethering option is not enabled in cm. (since it is for the n7).
maybe we should ask the devs to for the n10 cm to enable it by default.
btw: downloading cm source now -.-
Has anyone had any luck finding a ROM that has built-in support for USB tethering or networking?
EDIT: Just wanted to point out that this thread was helpful for me: http://forum.xda-developers.com/showthread.php?t=2013742&highlight=usb+tethering.

[Q] My chinese tablet got into DEMO mode.

Hi, i bough a chinese tablet a few weeks ago.
I didnt intalled anything bad or risky in it.
And this night i got unexplicable popups, adds and applications that i didnt installed.
The source of this activity was a app called com.android.server and com.android.popupreciver
I unistalled them and then i rebooted my tablet, then i got a message saying DEMO.
I heard that the only way to solve this is a hard reset, but i would like to know if there is something else i can do.
=====
Else, i would like to know if there is any ROM compatible for a 7" chinese tablet.
Removing Demo mode from Chinese tablets
I have one of these and have not been using it for a long time due to all the unwanted ads and being unable to figure it out. The other day I decided to give it another try and this is what I found:
A lot of these cheap tablets comes with a trojan and on my A23 Q8H 7" tablet it was in CloudsService.apk. If you remove it the tablet will show big red "Demo" letters across the screen. This comes from the SystemUI.apk and when I decompiled it I saw the following:
Code:
private void showDemoOverlay() {
TextView textview = new TextView(this);
textview.setText("Demo");
textview.setTextSize(180F);
textview.setGravity(17);
textview.setBackgroundColor(0);
textview.setTextColor(0xffff0000);
android.view.WindowManager.LayoutParams layoutparams = new android.view.WindowManager.LayoutParams();
layoutparams.type = 2006;
layoutparams.width = -1;
layoutparams.height = -2;
layoutparams.gravity = 17;
layoutparams.format = textview.getBackground().getOpacity();
layoutparams.flags = 24;
((WindowManager)getSystemService("window")).addView(textview, layoutparams);
}
The above function in SystemUIService.java is indirectly called by this one
Code:
private boolean hasOTAServer() {
android.content.pm.PackageInfo packageinfo;
try {
packageinfo = getPackageManager().getPackageInfo("com.clouds.server", 0);
}
catch (android.content.pm.PackageManager.NameNotFoundException namenotfoundexception) {
packageinfo = null;
namenotfoundexception.printStackTrace();
}
return packageinfo != null;
}
So in short all it does is look for is a package called com.clouds.server and if it doesn't find it the Demo is displayed.
The solution is to create a blank app in Android studio, make sure the package name is com.clouds.server and then install it on the device.
Now this I call informed investigation! I was trying to get rid of the trojan on a chinese tab and after removing at least 5 apps and rebooting i got the DEMO overlay.
I found a blog post dealing with the same problem and this person provided an APK to install (I checked it via virustotal and it came back clean): cmcm.com/article/share/2015-11-09/840.html
How did you find out it was the SystemUI.apk showing the overlay? Or was it just an educated guess? I tried finding the app via dumpsys but couldn't see anything...
P.S.: THANKS!!
Surrogard said:
Now this I call informed investigation! I was trying to get rid of the trojan on a chinese tab and after removing at least 5 apps and rebooting i got the DEMO overlay.
I found a blog post dealing with the same problem and this person provided an APK to install (I checked it via virustotal and it came back clean): cmcm.com/article/share/2015-11-09/840.html
How did you find out it was the SystemUI.apk showing the overlay? Or was it just an educated guess? I tried finding the app via dumpsys but couldn't see anything...
P.S.: THANKS!!
Click to expand...
Click to collapse
It has been a while but if you extract all the APK files and run grep on them you should be able to find the one you are looking for. You can then decompile the APK to have a look at the source code. Another way would be to remove the apps one by one and reboot each time. When you find the APK which causes the Demo mode to be activated just replace it with a blank APK file with the same package name and it should be good. If that does not work then it could be that the tablet checks for more things which means you'll have to go with option 1. I would also not trust virustotal with this as there are many reasons why it could return a false result and it does not take too much skills to bypass virustotal checks.
The solution!
Just install a clean CloudsService.
Normal_CloudsService.apk
Mirror1: https ://drive .google .com/file/d/0B1CH2n58TrbiSFl4Y0twRk5LX3M/view?usp=sharing
Mirror2: https ://drive .google .com/file/d/0B65Tvd8zpsRPOFNLY2NTRVMxckU/view?usp=sharing
VirusTotal: https ://www .virustotal .com/en/file/a014b81ce3cbee336a705eb54a0d6081038d67cc34b65688304a3ee41861903a/analysis/1455333414/
cheers
ofernandofilo said:
Just install a clean CloudsService.
Normal_CloudsService.apk
Mirror1: https ://drive .google .com/file/d/0B1CH2n58TrbiSFl4Y0twRk5LX3M/view?usp=sharing
Mirror2: https ://drive .google .com/file/d/0B65Tvd8zpsRPOFNLY2NTRVMxckU/view?usp=sharing
VirusTotal: https ://www .virustotal .com/en/file/a014b81ce3cbee336a705eb54a0d6081038d67cc34b65688304a3ee41861903a/analysis/1455333414/
cheers
Click to expand...
Click to collapse
Thank you!
Note that you might need to do
adb uninstall com.clouds.server
before you will be able to install this one if you get "Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]"
it works
I JUST INSTALLED THE APK POSTED IN THE FIRS LINK ... AND IT WAS MY SOLUTION..... I DO IT TO ZEEPAD 7DRK
---- drive.google.com/file/d/0B1CH2n58TrbiSFl4Y0twRk5LX3M/view#! -------
GREETENGS FROM MEXICO LEON GTO
....my english is bad .. i know i know.... jajajaj lool

[Q] Help with kernel adding driver

Hi guys
I am new to android and i need some help. Apologies if i have posted this in the wrong place.
I manufacture and supply large touch screens to special needs schools and in the past i have used multitouch overlays that came with a mini pc android called istick by PQ Labs that were coded to work as multi touch. now i have changed touch panel product i need an android pc to work with it.
I am thinking of using a MK809iv and the company that supplies the overlay has sent me the mods that need to be made to the kernel but i have no idea how to do this.
Here is what they sent me.
Transplanting under Android4.0 For IRMT Multi Touch Frame Driver V1.1
The following method is suitable for the kernel which above Linux 3.0, we take an example of Kernel 3.08.
1. Add manufacturer ID and Device ID in the 352st line of “drivers/hid/hid-ids.h”
#define USB_VENDOR_ID_IRMTOUCH 0x23c9
#define USB_DEVICE_ID_IRMTOUCH_SSERIAL 0x5666
2. Add device according to put the following program in the 669st line of “/drivers/hid/hid-multitouch.c”
/* IRM Multi-touch panel */
{ .driver_data = MT_CLS_CONFIDENCE,
HID_USB_DEVICE(USB_VENDOR_ID_IRMTOUCH,
USB_DEVICE_ID_ IRMTOUCH_SSERIAL) },
3. Add special protocol support in the 1392st line of “drivers/hid/hid-core.c”
{HID_USB_DEVICE(USB_VENDOR_ID_IRMTOUCH, USB_DEVICE_ID_IRMTOUCH_SSERIAL) },
4. Configuring the kernel. (menuconfig)
Firstly enter Device Drivers, then enter HID Devices ,then select Special HID drivers. Build-in HID Multitouch panels . ( select “*” )
Save and exit.
5. Compile the kernel and update the mirror of android 4.0
Shanghai IRMTouch Technology Co.,Ltd
2012.8.31
Any help would be greatly appreciated
Thanks
Ty
I suppose you already solved the problem or left it, anyway thanks for pasting the info, very usefull to modify the kernel to support this IRM Touch.
Regards

[Team Up] [Only Devs] Cm11 for zenfone 5

I have tried to manage to make a build of cm11
Links : http://d-h.st/tuND
But i get status 7 error for this
so i edited my tree a little bit and tried to build again
here's my tree : https://github.com/missesmr/android_device_zenfone5
Kernel : https://github.com/ZenfoneArea/android_kernel_asus_zenfone5
i used X86 deconfig
If anyone can help me , i would be happy
Great! I tried to build with shakalaca's tree, succeed but didnt past the asus oem splash will try today. Will let you know.
deleted
sai dev said:
I have tried to manage to make a build of cm11
Links : http://d-h.st/tuND
But i get status 7 error for this
so i edited my tree a little bit and tried to build again
here's my tree : https://github.com/missesmr/android_device_zenfone5
Kernel : https://github.com/ZenfoneArea/android_kernel_asus_zenfone5
i used X86 deconfig
If anyone can help me , i would be happy
Click to expand...
Click to collapse
http://www.mediafire.com/download/x33wtk1w9ohgm4z/A500CG_PHILZTOUCH_RECOVERY_WW-2.21.40.44.7z
Try this recovery with external sdcard support(ext4 formatted).
If you get status 7, try to wipe data.
X AnwarMov said:
hy @sai dev i'm succesfully build CM 11 from your source
i using asus Zenfone 4 A400CG
THANKS mate , but i found bugs . systemUi has stoped , telephony stoped .
how to fix it mate . ?
anyone can help me ?
Click to expand...
Click to collapse
Can you post logcat please? If you dont know you can search it on google.
deleted
X AnwarMov said:
hii @smgdev logcat in attachments
. i hope anyone help me
Click to expand...
Click to collapse
E/hwcomposer( 177): int hwc_eventControl(hwc_composer_device_1*, int, int, int): unsupported event 1
This is your error. Same as cm11 zenfone 5. Hwcomposer is broken in intel patches so you can try to replace hwcomposer.so file from your original rom and try to flash it again. It is something like hwcomposer.devicecode.so device code is a400cg I guess. I will update you on this. Good luck.
smgdev said:
E/hwcomposer( 177): int hwc_eventControl(hwc_composer_device_1*, int, int, int): unsupported event 1
This is your error. Same as cm11 zenfone 5. Hwcomposer is broken in intel patches so you can try to replace hwcomposer.so file from your original rom and try to flash it again. It is something like hwcomposer.devicecode.so device code is a400cg I guess. I will update you on this. Good luck.
Click to expand...
Click to collapse
Any updates?

Categories

Resources