[Q] the meaning of the byte array read from socket - Java for Android App Development

I am trying to develop a sniffer in android using VpnService. I modified the ToyVpn example so that i am capable to read the ip packets from the ParcelFileDescriptor. For every packet I open a Socket with the dest ip and port and send the payload(whitout IP or TCP header) and read the response from the server.
I use this code:
Code:
// We keep forwarding packets till something goes wrong.
while (vpnInterface != null && vpnInterface.getFileDescriptor() != null
&& vpnInterface.getFileDescriptor().valid()) {
packet.clear();
// Read the outgoing packet from the input stream.
final byte[] data = packet.array();
int length = in.read(data);
//for geting unsigned int from byte
int[] d = new int[data.length];
if (length > 0) {
packet.limit(length);
StringBuilder sb = new StringBuilder("");
for (int i = 0; i < length; i++) {
d[i] = data[i] & 0xFF;
sb.append(Integer.toHexString(d[i])+" ");
}
Log.i("packet", sb.toString());
Socket socket = SocketChannel.open().socket();
this.protect(socket);
//connect to output ip and port
socket.connect(new InetSocketAddress(d[16] + "." + d[17] + "."
+ d[18] + "." + d[19], (d[22] * 256) + d[23]));
DataOutputStream dOut = new DataOutputStream(
socket.getOutputStream());
DataInputStream dIn = new DataInputStream(
socket.getInputStream());
dOut.write(data, 40, length - 40);
//read data from the socket
length = dIn.read(data);
if (length > 0) {
sb = new StringBuilder("");
for (int i = 0; i <length; i++) {
d[i] = data[i] & 0xFF;
sb.append(Integer.toHexString(d[i])+" ");
}
Log.w("lungime", length+"");
Log.i("response", sb.toString());
//write data to virtual interface
out.write(data, 0, length);
}
socket.close();
}
Thread.sleep(5);
}
The Log looks like this:
Code:
12-04 15:37:29.891: I/packet(7029): 45 0 0 3c a3 8b 40 0 40 6 b8 35 a 0 0 2 ad c2 27 37 88 c3 0 50 d4 8f 3b 1b 0 0 0 0 a0 2 35 20 f9 ce 0 0 2 4 5 50 4 2 8 a 2 1c 9f a0 0 0 0 0 1 3 3 6
12-04 15:37:29.986: W/lungime(7029): 1068
12-04 15:37:29.991: I/response(7029): 48 54 54 50 2f 31 2e 30 20 34 30 30 20 42 61 64 20 52 65 71 75 65 73 74 d a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f 68 74 6d 6c 3b 20 63 68 61 72 73 65 74 3d 55 54 46 2d 38 d a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 39 32 35 d a 44 61 74 65 3a 20 57 65 64 2c 20 30 34 20 44 65 63 20 32 30 31 33 20 31 34 3a 33 36 3a 31 33 20 47 4d 54 d a 53 65 72 76 65 72 3a 20 47 46 45 2f 32 2e 30 d a d a 3c 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e a 3c 68 74 6d 6c 20 6c 61 6e 67 3d 65 6e 3e a 20 20 3c 6d 65 74 61 20 63 68 61 72 73 65 74 3d 75 74 66 2d 38 3e a 20 20 3c 6d 65 74 61 20 6e 61 6d 65 3d 76 69 65 77 70 6f 72 74 20 63 6f 6e 74 65 6e 74 3d 22 69 6e 69 74 69 61 6c 2d 73 63 61 6c 65 3d 31 2c 20 6d 69 6e 69 6d 75 6d 2d 73 63 61 6c 65 3d 31 2c 20 77 69 64 74 68 3d 64 65 76 69 63 65 2d 77 69 64 74 68 22 3e a 20 20 3c 74 69 74 6c 65 3e 45 72 72 6f 72 20 34 30 30 20 28 42 61 64 20 52 65 71 75 65 73 74 29 21 21 31 3c 2f 74 69 74 6c 65 3e a 20 20 3c 73 74 79 6c 65 3e a 20 20 20 20 2a 7b 6d 61 72 67 69 6e 3a 30 3b 70 61 64 64 69 6e 67 3a 30 7d 68 74 6d 6c 2c 63 6f 64 65 7b 66 6f 6e 74 3a 31 35 70 78 2f 32 32 70 78 20 61 72 69 61 6c 2c 73 61 6e 73 2d 73 65 72 69 66 7d 68 74 6d 6c 7b 62 61 63 6b 67 72 6f 75 6e 64 3a 23 66 66 66 3b 63 6f 6c 6f 72 3a 23 32 32 32 3b 70 61 64 64 69 6e 67 3a 31 35 70 78 7d 62 6f 64 79 7b 6d 61 72 67 69 6e 3a 37 25 20 61 75 74 6f 20 30 3b 6d 61 78 2d 77 69 64 74 68 3a 33 39 30 70 78 3b 6d 69 6e 2d 68 65 69 67 68 74 3a 31 38 30 70 78 3b 70 61 64 64 69 6e 67 3a 33 30 70 78 20 30 20 31 35 70 78 7d 2a 20 3e 20 62 6f 64 79 7b 62 61 63 6b 67 72 6f 75 6e 64 3a 75 72 6c 28 2f 2f 77 77 77 2e 67 6f 6f 67 6c 65 2e 63 6f 6d 2f 69 6d 61 67 65 73 2f 65 72 72 6f 72 73 2f 72 6f 62 6f 74 2e 70 6e 67 29 20 31 30 30 25 20 35 70 78 20 6e 6f 2d 72 65 70 65 61 74 3b 70 61 64 64 69 6e 67 2d 72 69 67 68 74 3a 32 30 35 70 78 7d 70 7b 6d 61 72 67 69 6e 3a 31 31 70 78 20 30 20 32 32 70 78 3b 6f 76 65 72 66 6c 6f 77 3a 68 69 64 64 65 6e 7d 69 6e 73 7b 63 6f 6c 6f 72 3a 23 37 37 37 3b 74 65 78 74 2d 64 65 63 6f 72 61 74 69 6f 6e 3a 6e 6f 6e 65 7d 61 20 69 6d 67 7b 62 6f 72 64 65 72 3a 30 7d 40 6d 65 64 69 61 20 73 63 72 65 65 6e 20 61 6e 64 20 28 6d 61 78 2d 77 69 64 74 68 3a 37 37 32 70 78 29 7b 62 6f 64 79 7b 62 61 63 6b 67 72 6f 75 6e 64 3a 6e 6f 6e 65 3b 6d 61 72 67 69 6e 2d 74 6f 70 3a 30 3b 6d 61 78 2d 77 69 64 74 68 3a 6e 6f 6e 65 3b 70 61 64 64 69 6e 67 2d 72 69 67 68 74 3a 30 7d 7d a 20 20 3c 2f 73 74 79 6c 65 3e a 20 20 3c 61 20 68 72 65 66 3d 2f 2f 77 77 77 2e 67 6f 6f 67 6c 65 2e 63 6f 6d 2f 3e 3c 69 6d 67 20 73 72 63 3d 2f 2f 77 77 77 2e 67 6f 6f 67 6c 65 2e 63 6f 6d 2f 69 6d 61 67 65 73 2f 65 72 72 6f 72 73 2f 6c 6f 67 6f 5f 73 6d 2e 67 69 66 20 61 6c 74 3d 47 6f 6f 67 6c 65 3e 3c 2f 61 3e a 20 20 3c 70 3e 3c 62 3e 34 30 30 2e 3c 2f 62 3e 20 3c 69 6e 73 3e 54 68 61 74 e2 80 99 73 20 61 6e 20 65 72 72 6f 72 2e 3c 2f 69 6e 73 3e a 20 20 3c 70 3e 59 6f 75 72 20 63 6c 69 65 6e 74 20 68 61 73 20 69 73 73 75 65 64 20 61 20 6d 61 6c 66 6f 72 6d 65 64 20 6f 72 20 69 6c 6c 65 67 61 6c 20 72 65 71 75 65 73 74 2e 20 20 3c 69 6e 73 3e 54 68 61 74 e2 80 99 73 20 61 6c 6c 20 77 65 20 6b 6e 6f 77 2e 3c 2f 69 6e 73 3e a
The first is really an IP packet but the problem is that I don't know what this response means. I was expecting to receive a IP packet,too. This response that you see above, I write it to the OutputStreamReader coresponding to the virtual interface and it apears to me in the VPN Status that I received packets. All this packets are from browser trying to access the google page but that packets which I write to Virtual interface maybe are thrown because the page does not open.
In adb shell netstat I get this:
Code:
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 1 0 10.0.0.2:35011 173.194.39.55:80 SYN_SENT
tcp 1 0 10.0.0.2:35010 173.194.39.55:80 SYN_SENT
tcp6 0 1 ::ffff:172.21.201.226:39772 ::ffff:173.194.39.39:80 CLOSE_WAIT
tcp6 0 0 ::ffff:172.21.201.226:45095 ::ffff:173.194.39.55:443 ESTABLISHED
tcp6 1 0 ::ffff:10.0.0.2:38484 ::ffff:173.194.70.95:443 SYN_SENT
tcp6 0 0 ::ffff:172.21.201.226:59836 ::ffff:173.194.70.188:5228 ESTABLISHED
tcp6 1 0 ::ffff:172.21.201.226:50164 ::ffff:173.194.70.95:443 SYN_SENT
tcp6 0 0 ::ffff:172.21.201.226:55260 ::ffff:54.228.207.7:5223 ESTABLISHED
So it seems that the SYN package was send but I receive nothing. If anybody could tell me what the received bytes means and how to write them properly in the virtual interface I will be deeply grateful.

Related

Static on earphone speaker...anoying!!! help!!!!

I usually have a static signal/sound (clicking loud!!) whenever there is high pitch (like a loud voice) from the caller.
Is my speaker busted? what should i do. My xda mini is just 2 months old.
please help
Hi,
i had the same problem and upgraded the ROM to the latest and the audio improved.
Thanks
Msuk
msuk said:
Hi,
i had the same problem and upgraded the ROM to the latest and the audio improved.
Thanks
Msuk
Click to expand...
Click to collapse
Upgraded to which ROM and issit the Radio version you upgraded?
In the registry "HKEY_LOCAL_MACHINE\Drivers\Builtin\WaveDev"
Try changing the value from parameter "Priority256" from 100 to 80 (hexa)
I've read in some threads that a radio is enough. Do some search and you might find a proper explanation.
I'm no expert yet on this unit since I had mine for a week only, I immediately upgraded to ROM 1.11 (full) and already noticed a difference.
Try first the reg hack mentioned by pms and if it does not improve then upgrade the radio
pms and zerimar,
At priority256 the hexa (base) is 6E while the deci is110.
If I change the Hexa at 80, the deci becomes 128.
If I change the deci at 80, the hexa becomes 50.
Which should I do?
What I did is to do the hexa at 80 and the deci becomes 128. As a result, the Priority256 = 0x80 (128). I hope this is correct.
zerimar,
Can you post the thread you followed when you did the upgrade? I am a bit confused.
Thanks.
That is correct! Put the priority to 80 (hex) or 128 (deci)!
That has solved all my cracking noises....
pms said:
That is correct! Put the priority to 80 (hex) or 128 (deci)!
That has solved all my cracking noises....
Click to expand...
Click to collapse
Thanks man,
That was great. It solved my problem. I thought it was a hardware issue as stated in the other thread. I will post you of its effects if ever it has.
See you around and more power.
Hi,
Just to confirm for improved audio:
Priority256 128(0x000080)
I have a document that suggests the following:
Audio Tweak (thanks to Uniquexme)
Audio Tweak enhances the speaker performance of the O2 Mini (some devices have this set to a lesser priority and by using this you get better sound, if your device is already set to a high level you have no need for this)
HKEY_LOCAL_MACHINE\Drivers\BuiltIn\WaveDev\Priority256
Default: 110
Changed to: 80

Bluetooth states

I've been doing some research on the states bluetooth can have on windows mobile 6.1, i have got them from this registry value:
HKLM\System\State\Hardware\Bluetooth
I have found the following states:
Code:
8 = "OFF/NoBrdcst"
9 = "ON/NoBrdcst"
11 = "ON/Brdcst"
13 = "A2DP/NoBrdcst" //bluetooth on before headset
15 = "A2DP/Brdcst" //bluetooth on before headset
25 = "Headset/NoBrdcst" //headset on before bluetooth
27 = "Headset/Brdcst" //headset on before bluetooth
29 = "A2DP/NoBrdcst" //headset on before bluetooth, if a call comes true and the state was 13, the state switches to this state after and just before the call
31 = "A2DP/NoBrdcst" //headset on before bluetooth, if a call comes true and the state was 15, the state switches to this state after and just before the call
57 = "callPrevStateHeadset/NoBrdcst"
59= "callPrevStateHeadset/NoBrdcst"
61= "callPrevStateA2DP/NoBrdcst"
63 = "callPrevStateA2DP/Brdcst"
It would be nice if this list could be extended. If you know a state not mentioned above, please post!
*Kick
It would be nice if more states are known

bricked my artemis (p3300) long time ago trying again to get it alive

i can get into bootloader but nothing else, batterycharging seems to work but no light turns on on phone.
i realized that i have messed up my cid somehow. i used htc flasher today and this is what happen when i tried to flash via ubuntu:
[] Verbose mode enabled
[] Using device '/dev/ttyUSB0'
[] Flash NBH file '/media/OS/Documents and Settings/Sneaker/Skrivbord/HTC_P3300_WWE_3.13.405.1_4.1.13.44_02.94.90_Ship_R/RUU_signed.nbh'
[] Setting RUU mode, please wait............done
FSEND: [password BsaD5SeoA]
GET:
[
00000: 50 61 73 73 2e 0d 0a 0d 2b 20 53 44 20 43 6f 6e |Pass....+ SD Con|
00010: 74 72 6f 6c 6c 65 72 20 69 6e 69 74 0d 0d 0a 2d |troller init...-|
00020: 20 53 44 20 43 6f 6e 74 72 6f 6c 6c 65 72 20 69 | SD Controller i|
00030: 6e 69 74 0d 0d 0a 2b 53 74 6f 72 61 67 65 49 6e |nit...+StorageIn|
00040: 69 74 0d 0d 0a 53 44 49 6e 69 74 2b 2b 2b 20 0d |it...SDInit+++ .|
00050: 0a 53 44 43 6d 64 31 20 43 6f 6d 6d 61 6e 64 20 |.SDCmd1 Command |
00060: 72 65 73 70 6f 6e 73 65 20 74 69 6d 65 2d 6f 75 |response time-ou|
00070: 74 2e 20 4d 4d 43 5f 53 54 41 54 20 3d 20 38 30 |t. MMC_STAT = 80|
00080: 20 0d 0a 53 44 43 6d 64 31 20 43 6f 6d 6d 61 6e | ..SDCmd1 Comman|
00090: 64 20 72 65 73 70 6f 6e 73 65 20 74 69 6d 65 2d |d response time-|
000a0: 6f 75 74 2e 20 4d 4d 43 5f 53 54 41 54 20 3d 20 |out. MMC_STAT = |
000b0: 38 30 20 0d 0a 53 44 43 6d 64 31 20 43 6f 6d 6d |80 ..SDCmd1 Comm|
000c0: 61 6e 64 20 72 65 73 70 6f 6e 73 65 20 74 69 6d |and response tim|
000d0: 65 2d 6f 75 74 2e 20 4d 4d 43 5f 53 54 41 54 20 |e-out. MMC_STAT |
000e0: 3d 20 38 30 20 0d 0a 53 44 43 6d 64 35 35 20 43 |= 80 ..SDCmd55 C|
000f0: 6f 6d 6d 61 6e 64 20 72 65 73 70 6f 6e 73 65 20 |ommand response |
00100: 74 69 6d 65 2d 6f 75 74 2e 20 4d 4d 43 5f 53 54 |time-out. MMC_ST|
00110: 41 54 20 3d 20 38 30 20 0d 0a 53 44 43 6d 64 35 |AT = 80 ..SDCmd5|
00120: 35 20 43 6f 6d 6d 61 6e 64 20 72 65 73 70 6f 6e |5 Command respon|
00130: 73 65 20 74 69 6d 65 2d 6f 75 74 2e 20 4d 4d 43 |se time-out. MMC|
00140: 5f 53 54 41 54 20 3d 20 38 30 20 0d 0a 53 44 43 |_STAT = 80 ..SDC|
00150: 6d 64 35 35 20 43 6f 6d 6d 61 6e 64 20 72 65 73 |md55 Command res|
00160: 70 6f 6e 73 65 20 74 69 6d 65 2d 6f 75 74 2e 20 |ponse time-out. |
00170: 4d 4d 43 5f 53 54 41 54 20 3d 20 38 30 20 0d 0a |MMC_STAT = 80 ..|
00180: 43 4d 44 35 35 20 66 61 69 6c 65 64 0d 0a 2b 20 |CMD55 failed..+ |
00190: 53 44 20 43 6f 6e 74 72 6f 6c 6c 65 72 20 69 6e |SD Controller in|
001a0: 69 74 0d 0d 0a 2d 20 53 44 20 43 6f 6e 74 72 6f |it...- SD Contro|
001b0: 6c 6c 65 72 20 69 6e 69 74 0d 0d 0a 2b 53 74 6f |ller init...+Sto|
001c0: 72 61 67 65 49 6e 69 74 0d 0d 0a 53 44 49 6e 69 |rageInit...SDIni|
001d0: 74 2b 2b 2b 20 0d 0a 53 44 43 6d 64 31 20 43 6f |t+++ ..SDCmd1 Co|
001e0: 6d 6d 61 6e 64 20 72 65 73 70 6f 6e 73 65 20 74 |mmand response t|
001f0: 69 6d 65 2d 6f 75 74 2e 20 4d 4d 43 5f 53 54 41 |ime-out. MMC_STA|
00200: 54 20 3d 20 38 30 20 0d 0a 53 44 43 6d 64 31 20 |T = 80 ..SDCmd1 |
00210: 43 6f 6d 6d 61 6e 64 20 72 65 73 70 6f 6e 73 65 |Command response|
00220: 20 74 69 6d 65 2d 6f 75 74 2e 20 4d 4d 43 5f 53 | time-out. MMC_S|
00230: 54 41 54 20 3d 20 38 30 20 0d 0a 53 44 43 6d 64 |TAT = 80 ..SDCmd|
00240: 31 20 43 6f 6d 6d 61 6e 64 20 72 65 73 70 6f 6e |1 Command respon|
00250: 73 65 20 74 69 6d 65 2d 6f 75 74 2e 20 4d 4d 43 |se time-out. MMC|
00260: 5f 53 54 41 54 20 3d 20 38 30 20 0d 0a 53 44 43 |_STAT = 80 ..SDC|
00270: 6d 64 35 35 20 43 6f 6d 6d 61 6e 64 20 72 65 73 |md55 Command res|
00280: 70 6f 6e 73 65 20 74 69 6d 65 2d 6f 75 74 2e 20 |ponse time-out. |
00290: 4d 4d 43 5f 53 54 41 54 20 3d 20 38 30 20 0d 0a |MMC_STAT = 80 ..|
002a0: 53 44 43 6d 64 35 35 20 43 6f 6d 6d 61 6e 64 20 |SDCmd55 Command |
002b0: 72 65 73 70 6f 6e 73 65 20 74 69 6d 65 2d 6f 75 |response time-ou|
002c0: 74 2e 20 4d 4d 43 5f 53 54 41 54 20 3d 20 38 30 |t. MMC_STAT = 80|
002d0: 20 0d 0a 53 44 43 6d 64 35 35 20 43 6f 6d 6d 61 | ..SDCmd55 Comma|
002e0: 6e 64 20 72 65 73 70 6f 6e 73 65 20 74 69 6d 65 |nd response time|
002f0: 2d 6f 75 74 2e 20 4d 4d 43 5f 53 54 41 54 20 3d |-out. MMC_STAT =|
00300: 20 38 30 20 0d 0a 43 4d 44 35 35 20 66 61 69 6c | 80 ..CMD55 fail|
00310: 65 64 0d 0a 47 65 74 44 65 76 69 63 65 43 49 44 |ed..GetDeviceCID|
00320: 3a 20 45 72 72 6f 72 20 2d 20 49 6e 69 74 44 65 |: Error - InitDe|
00330: 63 6f 64 65 72 0d 0d 0a 67 5f 63 4b 65 79 43 61 |coder...g_cKeyCa|
00340: 72 64 53 65 63 75 72 69 74 79 4c 65 76 65 6c 20 |rdSecurityLevel |
00350: 3d 20 46 46 0d 0d 0a 48 54 43 53 54 00 00 00 48 |= FF...HTCST...H|
00360: 54 43 45 48 54 43 45 |TCEHTCE |
]
durring this the flashing bar came up but stayed at 0% for at least 10 minutes.
should i wait or is it a brick for ever?
dont know about all your numbers,
but if you get into bootloader...try using sd-card-flashing
http://wiki.xda-developers.com/index.php?pagename=Artemis_SD_Card_Flashing
for sure made all my machines come back to life
and:
what happens if you uspl it again? :
http://forum.xda-developers.com/showthread.php?t=311403
greetz
no help
Icant boot WM so i cant active sync so i can't "Re USPL"
and i can't hard reset.
and SD flash wont work serches for SD card or reading SD card conntent but then get back to tri coulour screen.
so nothing of the above will help
I have tried roms swedish and WWW shipped but non i working
i think u can run USPL in the bootloader mood
and for the original romm be sure to use the one for ur device cuz there are alot of them
Hi,
I'm having the same problem...
Flashed a new rom on my P3300 en worked very fine for a week.
After that the screen freezed and now I can only get into Bootloader.
Also the lights of charging the battery doesn't work, but the battery is full loaded.....
I read that it was possible to flash the rom from the memorycard... but wen I'm starting Bootloader en it's reading the memorycard the screen freeze.
Is my phone usable now for opening beerbottles? or is this problem solved??
Greets John
problem NOT solved
how can i bee sure that i have original rom?
when i look inside (under battery) it says arte 100 but i think it said arte 1000 in mtty ????
I think my phone was shipped with swedish rom wm5 but it could have been english it wasent branded or looked.
arte 1000 doesnt exist!
I have nearly the same problem. I cannnot turn on the device either when i try to charge the led light is not on.
I tried to flash with SD card. But it starts to check sd and on the screen it writes "checking sd card" and remains that, and nothing happened. I coulndt flash the nbh file.
Does anyone have idea?

What's a usb/H2W headset?

The CPLD info of the HTC dream shows some H2W signals listed below. But I can not understand what is it. It looks like it includes 2 kinds of the H2W devices. Could anyone please shed some light on it?
CPLD info on Dream:
2 H2W_DAT_DIR
3 H2W_CLK_DIR
4 H2W_DAT_GPO
5 H2W_CLK_GPO
6 H2W_SEL0
7 H2W_SEL1
Also some codes about the H2W on Nike phone.
i2c_register_board_info(0, htcnike_i2c_board_info,
279 280 ARRAY_SIZE(htcnike_i2c_board_info));
280 281 /* H2W pins <-> UART3, Bluetooth <-> UART1 */
281 282 /* Dumped from board-trout.c -- bluetooth 1st attempt */
282 283 gpio_set_value(HTCNIKE_GPIO_H2W_SEL0, 0);
283 284 gpio_set_value(HTCNIKE_GPIO_H2W_SEL1, 1);

Screen goes Black with Gingerbread?

Hello Guys
Just tried to install allmost every CM7 mods for my DHD, but every time, when i receive a call, the screen goes black, and can't get awake again....
Whn running standard 2,2 Rom, there's no problems at all - so it must be a bug with the 2.3 version?
Does anyine have a solution for this?
Numsefis said:
Hello Guys
Just tried to install allmost every CM7 mods for my DHD, but every time, when i receive a call, the screen goes black, and can't get awake again....
Whn running standard 2,2 Rom, there's no problems at all - so it must be a bug with the 2.3 version?
Does anyine have a solution for this?
Click to expand...
Click to collapse
Did you flash using clockwork recovery 3. The 2.5.3 is not compatible with cm7
Sent from my Desire HD using Tapatalk
Yes i did, tried both of them...
I didn't get any problems when flashing with CWM 2,5.... Other than the screen bug...
But that's the same with CWM 3,5
Numsefis said:
Hello Guys
Just tried to install allmost every CM7 mods for my DHD, but every time, when i receive a call, the screen goes black, and can't get awake again....
Whn running standard 2,2 Rom, there's no problems at all - so it must be a bug with the 2.3 version?
Does anyine have a solution for this?
Click to expand...
Click to collapse
Sounds to me like you have a faulty proximity sensor. Do you have this problem with a stock rom as well? If so, I should try to return your DHD to get a replacement or repair.
There's no problems at all with the standard DHD Sense rom.... That's what wondering me - i tried restoring it, to confirm that the phone wasn't broken...
Made a log with logcat, when receiving a call:
D/alogcat ( 2223): stopped
D/alogcat ( 2223): starting ...
D/dalvikvm( 1561): GC_EXPLICIT freed 4K, 53% free 2809K/5895K, external 0K/512K, paused 71ms
I/AudioService( 1330): AudioFocus requestAudioFocus() from AudioFocus_For_Phone_Ring_And_Calls
I/dalvikvm( 2223): Jit: resizing JitTable from 4096 to 8192
D/AccelerometerListener( 1423): enable(false)
V/alogcat ( 2223): save instance
V/alogcat ( 2223): paused
I/power ( 1330): *** set_screen_state 1
D/AudioHardwareInterface( 1208): setMode(RINGTONE)
D/AudioFlinger( 1208): setParameters(): io 1, keyvalue routing=2, tid 1299, calling tid 1208
V/AudioHardwareMSM7X30( 1208): AudioStreamOutMSM72xx::setParameters() routing=2
V/AudioHardwareMSM7X30( 1208): set output routing 2
I/AudioHardwareMSM7X30( 1208): Routing audio to Speakerphone
I/AudioHardwareMSM7X30( 1208): aic3254_configure: sound effect (Recording)
I/AudioHardwareMSM7X30( 1208): do_aic3254_control (1, 175, 1)
V/AudioHardwareMSM7X30( 1208): getACDB, return ID 507
V/AudioHardwareMSM7X30( 1208): doAudioRouteOrMute: rx acdb 0, tx acdb 507
V/AudioHardwareMSM7X30( 1208): doAudioRouteOrMute() device 1, mMode 1, mMicMute 0
D/AudioHardwareMSM7X30( 1208): do_route_audio_rpc(1, 1, 0)
V/AudioHardwareMSM7X30( 1208): In SPEAKER
E/AudioHardwareMSM7X30( 1208): new_rx = 6
E/AudioHardwareMSM7X30( 1208): new_tx = 11
V/AudioHardwareMSM7X30( 1208): 1. De-route Stream/Voice
V/AudioHardwareMSM7X30( 1208): VOICE_CALL 0
V/AudioHardwareMSM7X30( 1208): FM_RADIO 0
V/AudioHardwareMSM7X30( 1208): PCM_PLAY 0
V/AudioHardwareMSM7X30( 1208): PCM_REC 0
V/AudioHardwareMSM7X30( 1208): 2. Route Stream/Voice OR Update Table
V/AudioHardwareMSM7X30( 1208): 3. Disable Current Device RX(0)/TX(1)
V/AudioHardwareMSM7X30( 1208): 4. Enabled New Device RX(6)/TX(11)
V/AudioHardwareMSM7X30( 1208): do_route_audio_rpc END, curr_out_device = 6, curr_mic_device = 11
I/AudioFlinger( 1208): setFmVolume 73
V/AudioHardwareMSM7X30( 1208): open pcm_out driver
V/AudioHardwareMSM7X30( 1208): get config
V/AudioHardwareMSM7X30( 1208): set config
V/AudioHardwareMSM7X30( 1208): buffer_size: 4800
V/AudioHardwareMSM7X30( 1208): buffer_count: 2
V/AudioHardwareMSM7X30( 1208): channel_count: 2
V/AudioHardwareMSM7X30( 1208): sample_rate: 44100
V/AudioHardwareMSM7X30( 1208): get_snd_dev: curr_device 1, mCurSndDevice 1
I/AudioHardwareMSM7X30( 1208): do_aic3254_control (1, 1, 0)
I/AudioHardwareMSM7X30( 1208): aic3254: change rx mode to 13
W/AudioFlinger( 1208): write blocked for 102 msecs, 5 delayed writes, thread 0x12658
V/AudioHardwareMSM7X30( 1208): dec_id = 5 current rx device = 6 mPCMEnableRx= 6
V/AudioHardwareMSM7X30( 1208): get_snd_dev: curr_device 1, mCurSndDevice 1
V/AudioHardwareMSM7X30( 1208): getACDB, return ID 607
I/HTC Acoustic( 1208): update ACDB id: (tx, rx, tx_acdb, rx_acdb) = (11, 6, 0, 607)
D/AudioHardwareMSM7X30( 1208): updateACDB: (6, 11, 607, 0) success!
D/AudioHardwareMSM7X30( 1208): addToTable (dec_id 5, dev_rx 6, dev_tx -1, type 1, active 1)
I/AudioHardwareMSM7X30( 1208): AUDIO_START: start kernel pcm_out driver.
D/alogcat ( 2223): stopping ...
D/alogcat ( 2223): stopped
D/InCallTouchUi( 1423): onTrigger(whichHandle = 1)...
I/phone ( 1423): acceptCall: incoming...
D/InCallTouchUi( 1423): updateState: Too soon after last action; not drawing!
I/AudioService( 1330): AudioFocus requestAudioFocus() from AudioFocus_For_Phone_Ring_And_Calls
D/AccelerometerListener( 1423): enable(false)
D/AudioHardwareInterface( 1208): setMode(IN_CALL)
D/AudioFlinger( 1208): setParameters(): io 1, keyvalue routing=1, tid 1299, calling tid 1208
V/AudioHardwareMSM7X30( 1208): AudioStreamOutMSM72xx::setParameters() routing=1
V/AudioHardwareMSM7X30( 1208): set output routing 1
I/AudioHardwareMSM7X30( 1208): Routing audio to Handset
I/HTC Acoustic( 1208): set_audio_effect: DualMic_Phone
I/HTC Acoustic( 1208): set_audio_effect: match with name DualMic_Phone (0)
I/AudioHardwareMSM7X30( 1208): aic3254_configure: sound effect (DualMic_Phone)
I/AudioHardwareMSM7X30( 1208): do_aic3254_control (0, 175, 0)
I/AudioHardwareMSM7X30( 1208): aic3254: change rx mode to 1
I/AudioHardwareMSM7X30( 1208): aic3254: change tx mode to 1
V/AudioHardwareMSM7X30( 1208): getACDB, return ID 205
V/AudioHardwareMSM7X30( 1208): getACDB, return ID 105
V/AudioHardwareMSM7X30( 1208): doAudioRouteOrMute: rx acdb 205, tx acdb 105
V/AudioHardwareMSM7X30( 1208): doAudioRouteOrMute() device 0, mMode 2, mMicMute 0
D/AudioHardwareMSM7X30( 1208): do_route_audio_rpc(0, 0, 0)
V/AudioHardwareMSM7X30( 1208): In HANDSET
E/AudioHardwareMSM7X30( 1208): new_rx = 0
E/AudioHardwareMSM7X30( 1208): new_tx = 1
V/AudioHardwareMSM7X30( 1208): 1. De-route Stream/Voice
V/AudioHardwareMSM7X30( 1208): VOICE_CALL 0
V/AudioHardwareMSM7X30( 1208): FM_RADIO 0
V/AudioHardwareMSM7X30( 1208): PCM_PLAY 1
V/AudioHardwareMSM7X30( 1208): PCM_REC 0
V/AudioHardwareMSM7X30( 1208): De-route PCM_PLAY stream (dec 5, dev 6)
V/AudioHardwareMSM7X30( 1208): 2. Route Stream/Voice OR Update Table
V/AudioHardwareMSM7X30( 1208): ==== Voice Call Start====
E/AudioHardwareMSM7X30( 1208): Starting voice on Rx 0 and Tx 1 device
I/HTC Acoustic( 1208): update ACDB id: (tx, rx, tx_acdb, rx_acdb) = (1, 0, 105, 205)
D/AudioHardwareMSM7X30( 1208): updateACDB: (0, 1, 205, 105) success!
E/AudioHardwareMSM7X30( 1208): Starting voice call and UnMuting the call
D/AudioHardwareMSM7X30( 1208): addToTable (dec_id 0, dev_rx 0, dev_tx 1, type 3, active 1)
V/AudioHardwareMSM7X30( 1208): Device switch during pcm play (old dev 6, new dev 0)
I/HTC Acoustic( 1208): update ACDB id: (tx, rx, tx_acdb, rx_acdb) = (1, 0, 105, 205)
D/AudioHardwareMSM7X30( 1208): updateACDB: (0, 1, 205, 105) success!
D/AudioHardwareMSM7X30( 1208): modify stream type 1 => dev_rx 0, dev_tx -1
V/AudioHardwareMSM7X30( 1208): 3. Disable Current Device RX(6)/TX(11)
V/AudioHardwareMSM7X30( 1208): 4. Enabled New Device RX(0)/TX(1)
V/AudioHardwareMSM7X30( 1208): do_route_audio_rpc END, curr_out_device = 0, curr_mic_device = 1
I/AudioFlinger( 1208): setFmVolume 73
I/power ( 1330): *** set_screen_state 0
D/NetworkCollector( 2150): state now IDLE
D/SurfaceFlinger( 1330): About to give-up screen, flinger = 0x93320
D/AK8975 ( 1212): Compass CLOSE
V/AudioHardwareMSM7X30( 1208): Out::standby()
V/AudioHardwareMSM7X30( 1208): Deroute pcm stream
D/AudioHardwareMSM7X30( 1208): deleteFromTable, type 1
V/AudioHardwareMSM7X30( 1208): get_snd_dev: curr_device 0, mCurSndDevice 0
I/AudioHardwareMSM7X30( 1208): do_aic3254_control (0, 1, 1)
I/AudioHardwareMSM7X30( 1208): AudioHardware pcm playback is going to standby.
I/AudioService( 1330): AudioFocus abandonAudioFocus() from AudioFocus_For_Phone_Ring_And_Calls
D/alogcat ( 2223): stopping ...
D/alogcat ( 2223): canceling periodic saves
V/alogcat ( 2223): started
V/alogcat ( 2223): resumed
V/alogcat ( 2223): save instance
V/alogcat ( 2223): paused
D/alogcat ( 2223): starting ...
V/AudioHardwareMSM7X30( 1208): open pcm_out driver
V/AudioHardwareMSM7X30( 1208): get config
V/AudioHardwareMSM7X30( 1208): set config
V/AudioHardwareMSM7X30( 1208): buffer_size: 4800
V/AudioHardwareMSM7X30( 1208): buffer_count: 2
V/AudioHardwareMSM7X30( 1208): channel_count: 2
V/AudioHardwareMSM7X30( 1208): sample_rate: 44100
V/AudioHardwareMSM7X30( 1208): get_snd_dev: curr_device 0, mCurSndDevice 0
I/AudioHardwareMSM7X30( 1208): do_aic3254_control (0, 1, 0)
D/AccelerometerListener( 1423): enable(false)
V/AudioHardwareMSM7X30( 1208): dec_id = 5 current rx device = 0 mPCMEnableRx= 0
V/AudioHardwareMSM7X30( 1208): get_snd_dev: curr_device 0, mCurSndDevice 0
V/AudioHardwareMSM7X30( 1208): getACDB, return ID 0
I/HTC Acoustic( 1208): update ACDB id: (tx, rx, tx_acdb, rx_acdb) = (1, 0, 0, 0)
D/AudioHardwareMSM7X30( 1208): updateACDB: (0, 1, 0, 0) success!
D/AudioHardwareMSM7X30( 1208): addToTable (dec_id 5, dev_rx 0, dev_tx -1, type 1, active 1)
I/AudioHardwareMSM7X30( 1208): AUDIO_START: start kernel pcm_out driver.
W/IInputConnectionWrapper( 2223): showStatusIcon on inactive InputConnection
D/dalvikvm( 1330): GC_EXTERNAL_ALLOC freed 939K, 56% free 5571K/12615K, external 9675K/9679K, paused 123ms
D/AudioHardwareInterface( 1208): setMode(NORMAL)
D/AudioFlinger( 1208): setParameters(): io 1, keyvalue routing=1, tid 1299, calling tid 1208
V/AudioHardwareMSM7X30( 1208): AudioStreamOutMSM72xx::setParameters() routing=1
V/AudioHardwareMSM7X30( 1208): set output routing 1
I/AudioHardwareMSM7X30( 1208): Routing audio to Handset
I/HTC Acoustic( 1208): set_audio_effect: Recording
I/HTC Acoustic( 1208): set_audio_effect: match with name Recording (23)
I/AudioHardwareMSM7X30( 1208): aic3254_configure: sound effect (Recording)
I/AudioHardwareMSM7X30( 1208): do_aic3254_control (0, 175, 0)
I/AudioHardwareMSM7X30( 1208): aic3254: change rx mode to 11
I/AudioHardwareMSM7X30( 1208): aic3254: change tx mode to 15
V/AudioHardwareMSM7X30( 1208): getACDB, return ID 0
V/AudioHardwareMSM7X30( 1208): getACDB, return ID 507
V/AudioHardwareMSM7X30( 1208): doAudioRouteOrMute: rx acdb 0, tx acdb 507
V/AudioHardwareMSM7X30( 1208): doAudioRouteOrMute() device 0, mMode 0, mMicMute 0
D/AudioHardwareMSM7X30( 1208): do_route_audio_rpc(0, 1, 0)
V/AudioHardwareMSM7X30( 1208): In HANDSET
E/AudioHardwareMSM7X30( 1208): new_rx = 0
E/AudioHardwareMSM7X30( 1208): new_tx = 1
V/AudioHardwareMSM7X30( 1208): 1. De-route Stream/Voice
V/AudioHardwareMSM7X30( 1208): VOICE_CALL 1
V/AudioHardwareMSM7X30( 1208): FM_RADIO 0
V/AudioHardwareMSM7X30( 1208): PCM_PLAY 1
V/AudioHardwareMSM7X30( 1208): PCM_REC 0
V/AudioHardwareMSM7X30( 1208): Ending Voice call
V/AudioHardwareMSM7X30( 1208): De-route voice stream (rx 0, tx 1)
V/AudioHardwareMSM7X30( 1208): 2. Route Stream/Voice OR Update Table
D/AudioHardwareMSM7X30( 1208): deleteFromTable, type 3
V/AudioHardwareMSM7X30( 1208): ==== Voice Call End ====
V/AudioHardwareMSM7X30( 1208): 3. Disable Current Device RX(0)/TX(1)
V/AudioHardwareMSM7X30( 1208): 4. Enabled New Device RX(0)/TX(1)
V/AudioHardwareMSM7X30( 1208): do_route_audio_rpc END, curr_out_device = 0, curr_mic_device = 1
I/AudioFlinger( 1208): setFmVolume 73
D/dalvikvm( 2223): GC_CONCURRENT freed 367K, 55% free 2819K/6215K, external 1106K/1618K, paused 3ms+3ms
V/AudioHardwareMSM7X30( 1208): Out::standby()
V/AudioHardwareMSM7X30( 1208): Deroute pcm stream
D/AudioHardwareMSM7X30( 1208): deleteFromTable, type 1
E/AudioHardwareMSM7X30( 1208): disable current rx device = 0
V/AudioHardwareMSM7X30( 1208): get_snd_dev: curr_device 0, mCurSndDevice 0
I/AudioHardwareMSM7X30( 1208): do_aic3254_control (0, 1, 1)
I/AudioHardwareMSM7X30( 1208): aic3254: change rx mode to 29
I/AudioHardwareMSM7X30( 1208): AudioHardware pcm playback is going to standby.
I/power ( 1330): *** set_screen_state 1
D/SettingsAppWidgetProvider( 2264): Widget is from a previous version... Let's update
D/SettingsAppWidgetProvider( 2264): No instances yet... Wait for at least one instance to exist before adding global settings
V/alogcat ( 2223): resumed
D/NetworkCollector( 2150): moved
D/SurfaceFlinger( 1330): Screen about to return, flinger = 0x93320
D/AK8975 ( 1212): Compass Start
W/ApplicationContext( 1330): Unable to create files directory
D/WriteApps( 1330): Error: java.lang.NullPointerException
D/Tethering( 1330): sendTetherStateChangedBroadcast 1, 0, 0
D/Tethering( 1330): interfaceAdded :usb0
D/SettingsAppWidgetProvider( 2264): Widget is from a previous version... Let's update
D/SettingsAppWidgetProvider( 2264): No instances yet... Wait for at least one instance to exist before adding global settings
D/SettingsAppWidgetProvider( 2264): Widget is from a previous version... Let's update
D/SettingsAppWidgetProvider( 2264): No instances yet... Wait for at least one instance to exist before adding global settings
D/Tethering( 1330): InitialState.processMessage what=4
D/Tethering( 1330): sendTetherStateChangedBroadcast 0, 0, 0
W/KeyCharacterMap( 2223): No keyboard for id 65537
W/KeyCharacterMap( 2223): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
I have exactly the same problem with the cm7 With the original Rom everything works fine and i have no problems with the phone
Did you fully wipe between cm6 and cm7?
Sent from my Desire HD using XDA App
pwraggcan said:
Did you fully wipe between cm6 and cm7?
Sent from my Desire HD using XDA App
Click to expand...
Click to collapse
Yes i did, even installed the "Full Wipe"
tpauli said:
I have exactly the same problem with the cm7 With the original Rom everything works fine and i have no problems with the phone
Click to expand...
Click to collapse
i think senseUI doesnt use the proximity sensor..
i am also having the same problem..
it was fine till today, i flashed build #30 however i nadroid backed to old builds (when is was working) and the problem persist.
I suspect my sensor is faulty..
hey go download Light Sensor from market.
Seems like my proximity sensor is working.. shows
lux - 59 in room light
lux - 7 if i use my hand to cover
lux - 137 if under my lamp
lux - 4k if i use my nexus one flash light.
if u are getting the same settings, i suspect there's a bug in CM7.

Categories

Resources