yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Development and Hacking General] azatoth:
Hi!

I've create an application that detect Gprs Connection and check how much traffic is genereted on a Smartphone WM2003 and WM5.

On WM2003 it's all right, but in WM5 the RasEnumConnections() function always return 0 with 0 connection active...

The code for detect Connection is:

DWORD isConnection = false;

RASCONN rgrc[4];

DWORD dwSize = sizeof(rgrc);

DWORD dwConn = 0;

DWORD dwREC;

dwREC = RasEnumConnections(rgrc, &dwSize, &dwConn);

if (dwREC == ERROR_SUCCESS)

{

DWORD i;

RASENTRY rasEntry;

rasEntry.dwSize = sizeof(RASENTRY);

for (i = 0; i < dwConn; i++)

{

if(!RasGetEntryProperties(NULL,

rgrcIdea.szEntryName,

&rasEntry,

&rasEntry.dwSize,

NULL,

NULL))

{

if(wcsstr(rasEntry.szLocalPhoneNumber, L"~GPRS!") != NULL)

{

isConnected = true;

break;

}

}

else{

Debug(TEXT("Error RasGetEntryProperties"));

}

}

}

else {

Debug(TEXT("Error RasEnumConnections [%d]", dwREC));

}

return isConnected;

How can I detect the Gprs Connection in native code for this goal in WM5?

Can anyone help me?

Thanks!!!
[Windows Mobile Development and Hacking General] sashje:
I experience the same problem on the P3300, but on the P3600, there is an application in the windows folder named datadisconnect.exe .. And i looked into it with a dissasembler... And it uses RasEnumConnections and RasHangup to disconnect.. So my question to you is... What device are you using? This might be bug of some sort.. I also see that there is a difference between the datadisconnect.exe on the p3300 and on the p3600.. so i'll look into them and see if i can find anything there...

SaSHje
[Windows Mobile Development and Hacking General] sashje:
Follow up

Hi .. i've looked into what the P3300 does.. and it seems like RAS isn't used at all.. When you are connected with i.e. GPRS, the connection adapter and connection name is stored in the registry under HKLM\System\State\Connection\Cellular.. The datadisconnect.exe on this device use these and the GetAdaptersInfo function from Iphlpapi.h. Based on the information from both... They call IpReleaseAddress from Iphlpapi.h .. So .. I'm gonna try to make my own datadisconnect where i do not use the info in the registry, but instead use GetInterfaceInfo from Iphlpapi.h, where i'll fill a PIP_INTERFACE_INFO structure, and based on the adapterindexmap in this structure, release the IP adress assigned to the adapter.

Hope this helps you a bit.. But .. strangely.. on the P3600, the RasHangup works.. I know we are trying to do different things here.. but the problems a similar... Ras doesn't function well ..
[Windows Mobile Development and Hacking General] paalkr:
Hi!

Sorry to interupt this tread, but this may explane why the standard Spb GPRS Monitor does not work on the P3300. On the CD shipped with the device there is a spesial version of Spb GPRS monitor that works.

Regards

PK
[Windows Mobile Development and Hacking General] sashje:
No problem PK.. Thanks for letting me know.. i'll take a look at it when i have time.. FYI, using the GetInterfaceInfo and IpReleaseAddress works like a charm..

azatoth: I do not know how we can use the Iphlp API to find statistics regarding traffic etc... If you manage to solve this, please let me know.. I will do the same if i stumble over something which could resolve this issue..
[Windows Mobile Development and Hacking General] Houser:
Hello,

I have the same problem and try to disconnect an active GPRS connection

with IpReleaseAddress(). I have found the adapter with GetInterfaceInfo()

but IpReleaseAddress() always fails with an unknown error code.

Can you give me an example how you got this working?

Thanks.

Houser
[Windows Mobile Development and Hacking General] sashje:
This worked for me..

I used this link http://msdn2.microsoft.com/en-us/library/aa366056.aspx .. and f.ex this worked:

PIP_INTERFACE_INFO pInfo;

pInfo = (IP_INTERFACE_INFO *) malloc( sizeof(IP_INTERFACE_INFO) );

ULONG ulOutBufLen = sizeof(IP_INTERFACE_INFO);

DWORD dwRetVal = 0;

// Make an initial call to GetInterfaceInfo to get

// the necessary size in the ulOutBufLen variable

if ( GetInterfaceInfo(pInfo, &ulOutBufLen) == ERROR_INSUFFICIENT_BUFFER)

{

free(pInfo);

pInfo = (IP_INTERFACE_INFO *) malloc (ulOutBufLen);

}

// Make a second call to GetInterfaceInfo to get

// the actual data we need

if ((dwRetVal = GetInterfaceInfo(pInfo, &ulOutBufLen)) == NO_ERROR )

{

for (int i=0; i<pInfo->NumAdapters; i++)

{

IpReleaseAddress(&pInfo->Adapter);

}

}

free(pInfo);
[Windows Mobile Development and Hacking General] Houser:
Thanks. Now it works. My mistake was that I call IpReleaseAddress()

for PPP connection. For ethernet connections it works well.

Houser
[LG Optimus G Pro] laith1234:
Hello guys

i just got an E980 Optimus G pro At&T i want i've already rooted it but now i want to install a normal stock rom on it, i dont want all the AT&T apps and features i want a normal stock Optimus G pro, how can i have this?

thanks in advance
[LG Optimus G Pro] shayneflashindaily:
Normal stock rom has all the att stuff in it , but hat you can do is use the app "system app remover " . Use it to debloat your rom. Good luck

2SHAYNEZ
[LG Optimus G Pro] laith1234:
thanks again my friend, u really rock, but i wanna ask u smth, can i flash e988 rom on my e980 or it will not work?
[LG Optimus G Pro] shayneflashindaily:
I'm pretty sure you can but don't take my word for it .......I never have.... Watch where you post stuff though this inquiry belongs in the q&a section . good day sir

2SHAYNEZ
[LG Optimus G Pro] lingo2012:
Yes you can flash e988 rom ive done it already. I flashed stock e988 rom
[LG Optimus G Pro] laith1234:
Thanks again Shayne and thanks lingo2012....
[LG Optimus G Pro] shayneflashindaily:
Anytime friend

2SHAYNEZ
[Galaxy Note II Q&A, Help & Troubleshooting] Nanafy:
Hello my friend gave me his note II to look at ( GT-N7100) , he has never tried to do anything to it other than use it regularly a.k.a no modding etc..

His phone suddenly just started to hang at the screen where it says Galaxy note II. Recovery mode does not work but download mode works. I downloaded a stock firmware to flash on ODIN but I receive this error every time.

<ID:0/003> Added!!

<OSM> Enter CS for MD5..

<OSM> Check MD5.. Do not unplug the cable..

<OSM> Please wait..

<OSM> N7100XXUFNG3_N7100AMNFNG2_N7100BVUFNE1_HOME.tar.md5 is valid.

<OSM> Checking MD5 finished Sucessfully..

<OSM> Leave CS..

<ID:0/003> Odin v.3 engine (ID:3)..

<ID:0/003> File analysis..

<ID:0/003> SetupConnection..

<ID:0/003> Initialzation..

<ID:0/003> Get PIT for mapping..

<ID:0/003> Firmware update start..

<ID:0/003> SingleDownload.

<ID:0/003> sboot.bin

<ID:0/003> NAND Write Start!!

<ID:0/003> FAIL!

<ID:0/003>

<ID:0/003> Complete(Write) operation failed.

<OSM> All threads completed. (succeed 0 / failed 1)

Is the hardware on the phone fried the eMMc chip ?

All the help would be greatly appreciated !!
[Galaxy Note II Q&A, Help & Troubleshooting] Nanafy:
I also tried flashing a recovery tar file and this is what I get

<ID:0/003> Odin v.3 engine (ID:3)..

<ID:0/003> File analysis..

<ID:0/003> SetupConnection..

<ID:0/003> Initialzation..

<ID:0/003> Get PIT for mapping..

<ID:0/003> Firmware update start..

<ID:0/003> SingleDownload.

<ID:0/003> recovery.img

<ID:0/003> NAND Write Start!!

<ID:0/003> FAIL!

<ID:0/003>

<ID:0/003> Complete(Write) operation failed.

<OSM> All threads completed. (succeed 0 / failed 1)
[Huawei Ascend P6, Mate] Biges:
Hi!

I have a problem with my Ascend P6. It used to work fine, but these days more and more often the GSM data connection just stops to work. It is still turned on, but data are just not transmitted. Turning it off and on does not help, neither switching on and off the air plane mode. The only thing which helps is to restart the phone.

I have had not changed any setting, I have still the original Android (4.2) and no crappy software installed, just same games.

Please, can you help? Can it be fixed, or is it a hardware problem? I imagine in the service centre they would just say they didn't reproduce the problem and/or perform a factory reset at best. And I would be without the phone for like a month, which suc*s.

Thanks
[Nexus 5 General] nagato86:
hello ... how did you get those two lines of commands on the keyboard ?!
[Nexus 5 General] chiragkrishna:
which command are you talking about?

you should use the commands one by one
[Nexus 5 General] Citizen_Snips:
If I'm not mistaken, I believe he means your screen shot. In terminal with Ctrl, alt, etc above the keyboard.
[Nexus 5 General] chiragkrishna:
you need to install aircrack-ng in kali

i am not going to guide you on how to use kali!! you have to figure it on your own!!

code used in that screenshot,

$ sudo airmon-ng
$ sudo airmon-ng start wlan1
[Nexus 5 General] shizkoff777:
Love this reply.Honestly if u don't know how then you should not be trying it
[Nexus 5 General] parker09:
What does this do, get you better WiFi connection in terms of speed/stability?
[Nexus 5 General] GT-af:
Search aircrack-ng on Google, you're very far !
[Nexus 5 General] snives:
Well..... It could, just not the way he was probably expecting :p
[Nexus 5 General] DragonHunt3r:
Pretty cool tut I must say, I'm wondering, could you make it support aswell the Wusb600n v2 ? that's what I'm currently having as usb wifi :P
[Nexus 5 General] chiragkrishna:
added support for WUSB600N V2

this guide will help you, do what a $1,295.00 PWN PHONE can!!
[Nexus 5 General] DragonHunt3r:
Oh woow cool, will test this out when I'm home :D

Hopefully packet injections etc will work ^.^
[Nexus 5 General] franciscofranco:
Yes, it turns your Wi-Fi into a 1Gb/s power house regardless of the connection you're on.

To test do this:

1 - hook up your dial-up cable and modem/router/whatever

2 - connect your N5 to that network and try to open www.nike.com

3 - if it takes 10m to load, then you're on the correct network, 56k yay!

4 - flash this

5 - connect to your 56k network

6 - ???

7 - www.nike.com loads in 2s

8 - profit

-----

Nice guide OP :)
[Nexus 5 General] DragonHunt3r:
Testing it out right now but there seems togo something weird ?

SIOCSIFFLAGS: No such file or directory

I gave the .bin file privs 644 and when trying airodump it says

Gave wlan1 and mon0 for fun a try... but not working
[Nexus 5 General] chiragkrishna:
Kill the processes

867

1263

867

These are the problems..
[Nexus 5 General] rhaml:
[MENTION=2750809]chiragkrishna[/MENTION]

You know man if it works with tp-link tl wn723n ou wn725n?
[Nexus 5 General] DragonHunt3r:
Killed em and the message dissapeared but it's still not working ?

http://puu.sh/b0BBg/18d9bc170b.png <- click the image
[Nexus 5 General] Rocketval:
Could the alfa awus036h be compatible in the future?
[Nexus 5 General] DragonHunt3r:
Orderd now the same as OP (TP-LINK TL-WN722N) and we'll see how it goes :)
[Nexus 5 General] chiragkrishna:
It looks like a driver problem... Don't have that USB to test... Will add other drivers and inform u
[Nexus 5 General] chiragkrishna:
Will try to include it
[Nexus 5 General] melbourne408:
Lmao very interesting, quackafella status.

More to read
[Nexus 5 General] DragonHunt3r:
Received the TP-LINK TL-WN722N and works better then the WUSB600N on my phone so far, monitor mode etc works

In a few minutes of playing around I was getting the WPA Handshake, so yeah it's deffo working :p
[Nexus 5 General] chiragkrishna:
That's because wusb600n v2 uses a different driver than I used... There is no good documentation for it... It will be just trial n error for it...
[Nexus 5 General] chiragkrishna:
Busy this week... So I shall add support for other USB WiFi devices later
[Nexus 5 General] DragonHunt3r:
If anyone is interested, I just compiled Franco's Kernel (r61 Nightly) with support only for the TP-LINK TL-WN722N

You can grab it from here: https://www.mediafire.com/?v56czrl5xfpd178
[Nexus 5 General] vboyz103:
Cool, I'll try to get this working next week when my adapter is here.

Quick note, I tried the apt-get command on Ubuntu 14.04 and get errors on a few packages. Perhaps, not in regular repo? OP, what version of ubuntu do you use?
[Nexus 5 General] chiragkrishna:
I used Ubuntu 14.04

What errors r u getting?
[Nexus 5 General] vboyz103:
Weird, I tried it on a different ubuntu 14.04 and all apt-get commands went through just fine. However, I'm now stuck and configuring the build. I used both ElementalX and Franco source (Download via zip and git) but can't seem to find the support for ath9k. Went into the section Atheros Wireless Cards and it's empty...no options underneath that.
[Nexus 5 General] DragonHunt3r:
If you want I could give ElementalX kernel compiling a try
[Nexus 5 General] chiragkrishna:
You have to first enable this... Or else it will be empty...

Networking --->
Wireless --->
< * > Improved wireless configuration API
< * > Generic IEEE 802.11 Networking Stack (mac80211)

If u had followed the guide step by step... You wouldn't have faced the problem
[Nexus 5 General] vboyz103:
Yes, I did enable those two options first and triple check but still same behavior. BTW, the labeling of those options are a bit different specially the "Improved wireless configuration API". Also, for me it is not under Networking to start, but it is Networking Support -> Wireless, etc.

---------- Post added at 04:03 PM ---------- Previous post was at 04:02 PM ----------

Something is weird for me, I tried all 3 kernels: ElementalX, Franco and even stock and followed instructions step-by-step but still no dice.
[Nexus 5 General] vboyz103:
OMG I feel stupid now...ahhah...I did not select the option to enable ATH Wireless card, and of course I won't see any options if it's disabled. ahhah feel so dumb now...
[Nexus 5 General] legionpr:
Hello friend I see that you use the latest kernel of franco for use in kalipwn my question you will be able to put this module support rtl8187 to the kernel that you changed ?? I like to compile a kernel in ubuntu but i am new to this and I want to learn you will be able to do a video how to compile the kernel of the nexus 5 i would be willing to donate thank you for your work friend
[Nexus 5 General] chiragkrishna:
Added support for (I haven't tested, they may or may not work)

1) TP-LINK TL-WN725N V1 & V2

2) ALFA Network AWUS036H(hopefully it works)

3) changed firmware files for Linksys WUSB600N V2(may work now)

no longer compiling kernels,... you can compile for yourself using the guide,...
[Nexus 5 General] DragonHunt3r:
Compiled the Franco kernel r61 again for more support https://www.mediafire.com/?v21z8883d02n19a

I only tested the TP-LINK TL-WN722N & Linksys WUSB600N V2, so you'd have to test your own USB device

Supported USB Devices in this kernel:

TP-LINK_TL-WN722N

TP-LINK TL-WN725N V1 & V2

Linksys WUSB600N V2

ALFA Network AWUS036H

[MENTION=2750809]chiragkrishna[/MENTION] thanks for the updated WUSB600N driver, it's working now :p
[Nexus 5 General] legionpr:
Thanks friend for updating the franco kernel it is grateful for their work a question you are using the manual of the first post to compile the kernel yourself frank I may say that command used to create the kernel modules with their wifi ?? I could use the kali linux to compile the kernel or the requirement is to do it in ubuntu??
[Nexus 5 General] chiragkrishna:
these are not modules,... you can use any linux,... this guide is based on ubuntu,... which android source say is the best,...

for other devices follow here
[Nexus 5 General] chiragkrishna:
next project is to skip the kali linux altogether,.... and use the aircrack-ng suite within android,... interested users can pm me,.... (strictly not how to use them... if u know about cross compiling then pm me)
[Nexus 5 General] TaRsY:
Nice! Looking forward to it. I have a TL-WN725N, will test it.
[Nexus 5 General] chiragkrishna:
Can you please provide the screenshot... So that other ppl can know that it works...

I'll put it on op....
[Nexus 5 General] DragonHunt3r:
Could only take a screenshot currently of the TP-LINK TL-WN722N since that's what I'm having currently with me

Image of Airmon: http://puu.sh/b8mrw/e0e276bf49.png

Kernel version: http://puu.sh/b8mME/5a4bbb0421.png
[Nexus 5 General] chiragkrishna:
WUSB600N V2.... I mean to say with the device ... Like the 1 in the op....
[Nexus 5 General] DragonHunt3r:
oh ok since u asked for a screenshot instead of a photo :P

Will take 1 when I'm back home
[Nexus 5 General] DragonHunt3r:
For anyone who wants updates here u go with some updates

https://www.mediafire.com/?8958owr75glxn15

-Changes

Maybe faster boot times

Changed compression to LZO

Updated tool-chain to arm-eabi 4.8
[Nexus 5 General] chiragkrishna:
The main goal of this was never to release a full fledge kernel... Its just for understanding....

Even I could have released the kernel with best specs... But my goal is letting others know how to do it...

You can go ahead n release a kernel... But obviously if u used this guide... I dont ming the credits...

I don't want to be a developer... I want u guys to be 1... That's how I am!!!
[Nexus 5 General] mokhdzanifaeq:
Tl-wn725n v2

tested with tl-wn725n v2 (rtl8188eu). it was not detected as an interface. failed i guess :(
[Nexus 5 General] DragonHunt3r:
Did u flash the kernel ?, did u copy the firmware ? important stuff :p

Btw I'm trying to keep this up-to-date with Kernels

https://github.com/AnguisCaptor/PwnKernel_Hammerhead

Will maybe create a thread... who knows

Lastest compile can be downloaded from here: https://www.mediafire.com/?c5x0uou43mhbrnk

Changes so far:

Based of Franco's Kernel r62

LZO Compression

Default is governor Ondemand

-O3 Flag

Support for the following devices

TP-LINK TL-WN722N

TP-LINK TL-WN725N V1 & V2

Linksys WUSB600N

ALFA Network AWUS036H
[Nexus 5 General] mokhdzanifaeq:
i've done both of that. but with the kernel that i compiled myself. gonna try with yours next

EDIT : does not work either
[Nexus 5 General] chiragkrishna:
i will try to change the firmwares,... but i dont think ur device will work,... but will try my best,..
[Nexus 5 General] chiragkrishna:
pwnkernel is same as the kernel this guide compiles,... only difference is it uses elementalx kernel sources i think,...
[Nexus 5 General] FutureBSD:
It's based on Franco, based on the posting and the website. But a precompiled version of this with EX would be sweet. I'm currently lacking time to get the compilation environment set up on my machine. It's a pity. :)
[Nexus 5 General] mokhdzanifaeq:
nahh. i managed to compile the driver myself. the adapter was detected but it doesn't support monitor mode. i guess i'll just use the big wn722n ;)
[Nexus 5 General] DragonHunt3r:
Updated PwnKernel :victory:

Changes:

Changed somewhere else the Flag to -o3

Fetched changes from upstream to Franco r63

Compiled with SaberMod 4.9.2 (previously it was ARM-EABI 4.8)

Source: https://github.com/AnguisCaptor/PwnKernel_Hammerhead

Download: https://www.mediafire.com/?l3vzucrd9i07zo6

HaveFun :p
[Nexus 5 General] legionpr:
thanks friend franco kernel update with monitor stand thanks I hope you continue updating the kernel work good friend frank as I'd like to compile a kernel android :)
[Nexus 5 General] chiragkrishna:
complete rom with all the required apps coming up soon,...

[IMG="pwn phone"]http://cdn.slashgear.com/wp-content/uploads/2014/05/Pwn-Phone-2014-820x420.jpg[/IMG]
[Nexus 5 General] FutureBSD:
What's the base of the rom? And what kernel would it include? Paranoid with EX kernel would be killer
[Nexus 5 General] chiragkrishna:
well it would be stock android,... and stock kernel for the beginning,... who know i might change it,... n requires a full wipe and linux to install the rom(i am working to remove that part),... and the rom size is well 1.3GB for now,... installation can be more than 30 mins,... so have my own doubts about releasing this thing,...

which base rom and kernel you guys prefer???
[Nexus 5 General] FutureBSD:
Maybe it's possible to install any standard rom and install the apps as a GAPPS approach? So as an additional package? In this case people can choose whatever rom they like. Not sure if it's that simple though
[Nexus 5 General] Alexandar92zr:
relese the rom for the people who want it that steps would not be that hard...maybe franco's kernel or idk what ever is easy to compile.
[Nexus 5 General] melbourne408:
Current method is legit.

If it's stock there could be a small incremental update to avoid confusion.

Alongside the pwnkernel update, stock would run smooth.

Franco is fine.
[Nexus 5 General] my-blue-snog-box:
Any chance at support for Netgear a6200?
[Nexus 5 General] chiragkrishna:
this is unedited pwnexpress community edition rom from pwnexpress,....

download

this will complete wipe your phone back up your current rom and then install,...

use it at your own risk

installation instruction

1) you need a linux machine

2) adb fastboot installed ($sudo apt-get install android-tools-adb android-tools-fastboot)

3) $ tar zxvf pwnphone-ce.tar.gz

$ cd pwnphone-ce/

$ chmod +x flash.sh

$ sudo ./flash.sh
[Nexus 5 General] FutureBSD:
Personally I like the concept of Binkybear over at the zetaboards forum much better as everyone can choose the preferred ROM and kernel (e .g. the PWNkernel based on Franco posted in this thread):

Introduction

A lot of people have asked for Kali linux on a multitude of devices, not just the Nexus 7. So I set out to make a "universal installer" that will add all the needed apps/firmware/file systems/etc. so that Kali could be run from any Android device. CCCP-82060 was kind enough to help with the install script so big thanks are in order.

Please note that Wireless USB requires a device that supports OTG, a custom kernel with wifi modules baked in or loadable, and enough power to the wireless device.

Pre-reqs

Rooted device with recovery image such as TWRP installed (see xda-forums or youtube for help with rooting/installing)

At least 4-5GB+ of free space

--------------------------------------------------------------------------------------------------------------------------------------------

STEP 1

Make a backup in recovery and wipe.

Install ROM of your choice. I recommend Cyanogenmod for stability but give different ROMs a shot. Reboot

STEP 2

Download update-kalipwn.zip and install in recovery. This will take some time as it unzips Kali linux into the /data/local/kali folder.

update-kalipwn-v0.4fix.zip = 1.28GB | Update 9 NOV | Confirmed working Android 4.3 and below.

update-kalipwn-v0.5-2.zip = 1.18 GB | Update on 20 JAN 14 | Confirmed working (by Binkybear) on Android 4.4+

STEP 3

Download and install SuperSU in recovery: http://download.chainfire.eu/supersu

Optional: Download and flash customer kernel from below for external Wifi support.

One Problem I currently have with it though (seems I'm one of the few who has the issue) is, that when I want to run any console script, it doesn't find the shell script. Doesn't seem to be the case with Nexus 7 and also not with Cyanogenmod for the Nexus 5. I will stay with PA though and try to figure out how to fix it with this rom.
[Nexus 5 General] chiragkrishna:
binkybear just automated everything this guide explains and made it into a neat a flashable zip,... only thing missing is the pwnexpress apps i guess,..
[Nexus 5 General] FutureBSD:
Didn't know that. Thanks for the clarification.

I think one advantage on BB's over the PWNexpress version is the free choice of the rom.

But as you explained, maybe with the disadvantage of a few missing apps (if important at all).
[Nexus 5 General] chiragkrishna:
in that case u just need to use this guide,.... compile your fav kernel,... use any rom,... install kali manually as explained,... and happy pen testing,... yea the apps are not that useful as you have kali linux,... its just to cut down few steps anyways,...
[Nexus 5 General] melbourne408:
The community steps on your website work perfectly. I had set it up perfectly the other day.

Changed one line on my build.prop to incremental to avoid the update system notice.

Amazing work, alongside my order (which is in the mail), I'm sure that all my families networks will be safer.

Thanks man for providing all the work