Disabling Phone - Windows Mobile Development and Hacking General

I really have two problems :
1- How can I disable the two phone buttons on the XDA. The green and the red buttons). Programmatically AND/OR physically?
2- How can disable the phone programatically. (by the way I am using EVB). So that when I am running my software in EVB any incomming calls would be ignored
Many Thanks for any suggestions

You could kill cprog.exe process. Unfortunatelly something else start it few minutes later. But while the cprog.exe process isn't runnign on the system the phone is dissabled
Regards,

put device in flight mode
Hi
You can put device in flight mode when Ur application runs and when you kill Ur application make sure to switch the flight mode Off. Device will not receive any radio signal. Other thing you could do is to turn off the recieving radio so that you can only transmit but couldnt receive any signal.
Hope this helps.
Cheers
Nitan Sehgal

Zmija9 said:
You could kill cprog.exe process. Unfortunatelly something else start it few minutes later. But while the cprog.exe process isn't runnign on the system the phone is dissabled
Click to expand...
Click to collapse
You are incorrect. The phone is still enabled, it still receives SMS and can use GPRS. Programs like KSE TrueFax can use it to make calls/send faxes. You only cannot receive/make calls manually. To kill cprog and prevent it from running you should register VK_HANGUP and VK_ANSWER hotkeys. Here are their defines:
#define VK_HANGUP 0x73 // VK_F4
#define VK_ANSWER 0x72 // VK_F5
Look into KillApp.cpp from CryptoPhone source code for an example.

Related

Make your XDA I/II turn itself off after new SMS faster,etc.

So, after diggin' for long time in registry on Pocket PC 2002 ROMs I've found nice feature - HKLM\System\CurrentControlSet\Control\Power\
(may vary cause this is from 2003 ROM, for now I have but was like this and works on 2002), has value WakeUpPowerOff = 180 (by default).
This value (in seconds) determines, how long device will be on after:
1. power on by "power" button (and no other activity - no taps, no any hardware buttons pressing) - it userful for example to see "what's on
today", time, etc...
2. power on by incoming event like SMS or calendar one.
And after you touch screen\ other button - then as I found starts another, "original" timer, defined in Start->Settings->System->Power.
I've set above WakeUp parameter to WakeUpPowerOff = 12 (smallest that works really at mine device) and what I got? This:
When I need to look into today's or time or missed calls etc - I just press power look at screen and devices turns iself off byself. Not great effort but - heh - longer live for power button
But this is more important: When incomes SMS (I have gate from internet inbox to sms so have a lot of smses) - devices comes on only for 12 secs - for day it increases significantly battery life. (aha - 180sec and 12sec - differs!) (etc...). So we can set auto Off timer for 1 minute and work in normal mode (when we tap or read something, smaller is not so much siutable), but with this WakeUp timer also when we don't use device we get very small time to byself on\off-ing and longer battery life.
But after appearing 2003 in my wallaby and then after bying himalaya I have changed this parameter with no effect.
Now I find solution!
We need to change one more parameter in that registry subdirectory named:
DisableGwesPowerOff=1 by defalut. Simpy set it to 0.
And now on my XDA II (and on XDA I with 2003) this hacks works.
I think this will be userful for our XDA community. Thanks for paying attention for this text.
Hey, that is a very, very cool hack! I have always been annoyed when my XDA2 is in my pocket and I receive an SMS when I can't reply. During the 2 minutes before it switches itself off I find that the screen gets pressed a lot in my pocket with sometimes disastrous results.
This hack seems to have no side-effects at all. The XDA2 stays switched on in the cradle and changing the Power-off-on-battery setting doesn't reset this auto-off timer.
I dare to suggest even that it is perfect! Thank you very much nugged.
Thank you realy love this one :idea:
Works fine with 5sec off on XDAII.
goodluck
2 SiliconS: That's some kind of pleasure to share with info and to help.
2 eme: 5 sec? hmm... Ah! I think I have bigger lag cause I have setted up password protection and maybe it needs some time to initialize after on/before off... You haven't password protection on?
Anyway - it's works.
I've just had a thought: does this hack affect the alarms and appointment notifications? Does the machine turn itself off after 12 seconds and stop the alarm working? That might be a problem for some people if so. I can't test at the moment - my wife is asleep
Edit:
Just tested, quietly . It does affect the alarm. I set a repeating alarm. The machine turned on, sounded the alarm once and then switched off. When I turned it on again a few seconds later it sounded a repeat.
I think this hack is excellent if you don't use your XDA2 for alarms or notifications. Otherwise it might cause problems. :?
@nugged:
every PocketPC turns itself automatically on at midnight, to perform some magic regarding alarms etc. It is a known problem that sometimes it turns off too soon again, before having finished its work. There are even programs to make this time-out longer. Question: does you hack also affect this time-out, or is it something completely unrelated?
Cheers
Daniel
2 tadzio: Mine never do this. What "reorganization"? Mine works fine, don't miss any appointments and haven't midnight magic power-ons ...
2 SiliconS: Yes, so that's maybe who need to have long alarms install additional soft and\or set up time longer, smth like 15 seconds.
As for me - yes, I use mine device lot of time so it often in mine hands and at my eyes so I don't need long alarms.
Lets explore info above (at 1st post) here more deeply maybe someone find solution for short WakeUpPowerOff time and working long alarms if needed.
Put down the pipe!!
What are you guys on, hacking the on time? I must be really confused... what about just using the power settings to turn of backlight after 10 seconds and power off if not used for 1 minute?
That's all I ever do and mine lasts easily through a weekend with a few hours of talk time and checking my e-mail at least 20 times.
2 wayandrs: That's your decision If you satisfied with that standard system - good . Anyway - it's not an order - it's just advice
Look - when you setup to run your backlight off after 10 seconds - try to work normally then .
nugged said:
2 tadzio: Mine never do this.
Click to expand...
Click to collapse
Yes, it does. You just don't see it because it's only a partial power-up: the display does not get switched on.
The OS needs to clean up appointments, and set alarms for the new day. Most of the time it succeeds, but sometimes the device powers off automatically before the OS could finish, resulting in alarms not going off. This is what tools like "Wakeup Tweak" are for - they just extend the time-out until the device powers down again.
Also, zendrui (the PocketZenPhone author) had a lot of... umm... fun with this feature when users configured PocketZenPhone to automatically switch modes at midnight. Ask him, I think he knows a lot more about this than he ever wanted to know.
Cheers
Daniel
I miss the old 2003 future and wish SMS dose not turn IMATE-II on..
hope some body listen there and give a soltion. it was built in before some bodies complain about it.
2 eme: 5 sec? hmm... Ah! I think I have bigger lag cause I have setted up password protection and maybe it needs some time to initialize after on/before off... You haven't password protection on?
Yes, no password protection.
Btw I managed to connect over BT to Linux machine and have acces to local net and web. That 's nothing ok. But managed also to use device cca
100m+ away form my BT acces point. Just put USB dongle on extended
cable and if possible outside of your room. My is on the attic.
Think, PC makes som interference to BT rx for sure. If anybody interesting
on this can write som more..
goodluck
2 eme: after setting this hack do you have some troubles with 'midnight self turning-ONs of device with turned off display and some reogranization' as tadzio has?
2 tadzio: so, device turning itself on withot turning on display? Sounds very interesting. Anyway - we can say so our devices stays on every time even turned off by the key, they only slowing down processor and turning off display and some hardware, cause they need to refresh SDRAM memory, to track and remember appointments to wake up at needed time, etc.
And, anyway, if this 'midnight ONs' are have place, if they are not turning on display - ppc works in another mode and I think this registry value is not related to them. But this - for me - is very strange information.
Please, Daniel, give detailed info/links, if you know this question good or don't bewilder other peoples, who read this topic.
nugged said:
2 eme: after setting this hack do you have some troubles with 'midnight self turning-ONs of device with turned off display and some reogranization' as tadzio has?
I do not have any appointments stored in my device.
Cant wait for Linux to run on it with graphical enviromet.
Than we can all forget this misterious M$ hacks.
Click to expand...
Click to collapse
eme said:
nugged said:
2 eme: after setting this hack do you have some troubles with 'midnight self turning-ONs of device with turned off display and some reogranization' as tadzio has?
Click to expand...
Click to collapse
Oh, I didn't mean to say that I have any problems. In fact, before I apply this hack I wanted to make sure that it will likely not cause any problems, that's why I asked if the author knows about any possible interaction between the midnight wakeup and his hack. I would suspect there is none, but I am not sure.
Cheers
Daniel
Click to expand...
Click to collapse
nugged said:
Please, Daniel, give detailed info/links, if you know this question good or don't bewilder other peoples, who read this topic.
Click to expand...
Click to collapse
Here is more information about this: http://www.mtekk.com.au/browse/page826.html
Cheers
Daniel
problem need help
Alrite i tried with a 12. It works well. As expected, but things happen when my phone rings, with a long rintone i have, it got cut off and then it went back to standby mode, making the call still ringing behind the background, after a while it was turn on again. It annoying when i cannot hear the first part of the ring. I end up not picking up importants calls... Anyway to help this desperado? ow i want to change back but its like the same...

Flight-Mode problem

i was testing the Flight-Mode tool. when i switched it on it works. but when i tried to switch it off it didn't do anything. i tried to switch it off a couple of times and still wouldn't work. i just recently upgraded my ROM to this : K-JAM_WWE_1010903_106_10110_ship. does anyone have the same problem as me?
I have the same issue -- the only way I can get out of flight mode is to soft reset.
yea. i did a soft reset and tried switching on & off the flight mode again. it still won't turn off the flight-mode. so i had to soft reset it again.
Yep -- each time I go into flight mode, I have to soft reset in order to get out. A rather minor inconvenience, but an inconvenience nonetheless. I wonder if anyone else has this issue?
if you guys have a pin code for the phone.
turn off flight mode, then go to phone and write in your pin code then the flightmode goes off.
pin?? hmm i dont think i've created a pin for my phone. what if you don't have a pin? what should you do?
hum, then i acctually don't know sorry this way works for me
Hmm. I don't have any trouble switching flight mode on and off and never have. When turning FM off the phone asks for my sim pin and then locks onto the signal within 15 seconds.
Perhaps you have a 3rd party app interfearing somewhere?
For your info I have a K-Jam with standard shipped rom.
Apps currently installed:
Pocket informant 2005
WiFiFoFum
MS Voice command
PPC Profiles Pro
Check Notifications
Total commander
PHM Regedit
Pocket weather
TCPMP media player
I also did some of the reg hacks posted on HoFo and here.
I don't use a pin code.
I, too, do not use the PIN code, but I get in and out of flight mode with no problems at all (I have a K-Jam).
Do you wait at least 10-20 seconds after you turn flight mode off before thinking that it is not working? It takes that long before it activates the SIM and gets back the signal.
hey, guess wat... it works heheh i waited about 15 secs or so heheh. but previously it didnt work heheh
Just be patient - don't expect things to happen instantly.
10-15 seconds is reasonable.
I've not experienced any problem with the FM. just be patient

gprs auto disconnect on wm6.5

anyone knows how it's possible to get the gprs connection automatically closed after X secs/mins?
I've already tried this one:
HKEY_LOCAL_MACHINE\Comm\ConnMgr\Planner\Settings\
SuspendResume = GPRS_bye_if_device_off
CacheTime = xxx (where xxx are seconds before auto disconnect, for me the best value is 60)
and this one:
http://www.gb-soft.cz/xdaii/product_gprs-umts_tweak_wm61_diamond.htm
but no success...
there are only solutions for wm5 and wm6...but not for wm6.5....
any ideas?
tnx.
I've tried this Reghack on my Xperia R3AA 6.1 ROM, but it doesn't seem like I have success either. I'm trying to figure it out, because when I initiate the connection myself, it seems to disconnect properly, but if another program opens the connection while in standby, it seems to always stay open.
This issue started happening for me after installing S2U2 v2.01, which seems to keep the device from entering TRUE standby mode (power savings, not just screen off). A_C is aware as I PM'ed him, because this never used to happen with S2U2 prior to the recently released v2.
I'm still trying to test, but this problem is usually related to some background process keeping the CPU going, so your device uptime never pauses (check with AE Button+, Uptime). I feel like I'm so close to getting the *perfect* setup on my phone, but this battery issue is the one thing holding me back right now...
I can confirm the s2u2 issue, so for the moment I think I'll try to get back to v1...
I've the same issue with wm6.5 slide to unlock screen...
without any screen locker the automatic disconnection seems to work fine.
now I try with s2u2 v1
I don't use S2U2 or the default Windows Lock screen, yet my data connection stays open all the time.
The best solution I came up with was this:
Code:
[HKEY_LOCAL_MACHINE\ControlPanel\Phone]
"Flags2"=dword:A
That disabled the data connection while pressing END on the homescreen. Saves time instead of launching the connection managers to end it.
It's annoying and has to eat battery.
Is there any auto solution of disconnecting on WM6.5?
I did not find any yet :/
still nothing?
use de free bandswitch 1.2.any...
it´s great program.
I have a solution that works for me:
HKLM\Comm\ConnMgr\Planner\Settings\
SuspendResume = just delete everything, leave it blank
CacheTime = xxx (where xxx are seconds before auto disconnect, for me the best value is 60)
Restart your phone.
I hope it will work for everybody!
PS. I have a GSmart S1205

Data Disconnects in Sleep

Well it's been an eventful month
Lost old faithful (700wx), bought an 800w just returned it due to keyboard issues, got a treo pro this morning.
Got my pro activated this morning, which seems to be very nice.
But of course things were going too well... lol
I have an IM app that I keep running along with some email apps.
They maintain a connection and notify me about messages.
As soon as the screen turns off, the data cuts out and doesn't kick in again until I turn the phone back on.
I tried Wifi the same thing happens.
Does anyone know how to get around this?
________________________________
Another related topic. The programs in question normally run in the background. When I hit the "X" they should keep running in the background like they did on my other two treo's. On this guy when I hit that X on either app it completely exits.
Is this some kind of OS configuration I need to change?
Thanks,
Kenny
Well I figured out the "X"
Still can't get the data connection to stay on though
Well I found diamond tweak that always keeps the connection on so that'll work.
Can you share the reg change plz? I'd like to do the same while slinging wifi
There is a program called "advance configuration tool" that has a setting to keep wifi on while the screen turns off. Download it and give it a try, the setting is kind of hidden, once you install go to the bottom right softkey and seach for it there. I do not remember exactly where it is but you could google it and you will surely find it.
That works with Wifi connection, should works with dataconnection
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contro l\Power\State\Suspend\{98C5250D-C29A-4985-AE5F-AFE5367E5006}
-change (Default) DWORD Dec to 1
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contro l\Power\State\Resuming\{98C5250D-C29A-4985-AE5F-AFE5367E5006}
-change (Default) DWORD Dec to 1
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contro l\Power\State\Unattended\{98C5250D-C29A-4985-AE5F-AFE5367E5006}
-change (Default) DWORD Dec to 1
^^ Awesome thanks for posting the individual reg changes!
I don't use Advance Config Tool because it messes with some of my reg changes I made so everytime I open/close ACT it changes some stuff and I have to go back and reset them in the reg...
I have the problem that the device does not check my email account. Do I understand it correctly, that no data sessions are active in sleep mode? No GPRS (or above)?!
What's that for a config? You buy a phone where you can set up your mail account to check every 10 minutes your email account but in 99% of the time the phone is in sleep mode and therefore does not check mails...?!
Please say that's not the reason for my problem...
Would these work to keep the GPS alive when I lock the keyboard. I want to turn on GPSTuner and toss the Treo Pro in my pocket. So far my choices are a) leave it unlocked and risk making an unintended call from the trail or b) locking the device using "keylock" and then the GPS shuts down so the GPS does not record my hike.
Is there a way to keep the GPS alive while Keylock is engaged?
The three registry changes did not keep the GPS active when Keyguard was engaged. Shucks. So again...
Is there any way to keep the GPS alive while Keylock is engaged? Thanks.
dbsoundz said:
I have the problem that the device does not check my email account. Do I understand it correctly, that no data sessions are active in sleep mode? No GPRS (or above)?!
What's that for a config? You buy a phone where you can set up your mail account to check every 10 minutes your email account but in 99% of the time the phone is in sleep mode and therefore does not check mails...?!
Please say that's not the reason for my problem...
Click to expand...
Click to collapse
Is this a problem with all treo pro devices?! Also flexmail does not check mails regularly... The programm is also configured not to close while pushing X...
This is really a really big bug... This phone is almost not usable...
I noticed this article regardin setting up an email account:
http://kb.palm.com/wps/portal/kb/common/article/32429_en.html
Last sentence is:
IMPORTANT: The device power-off timer is reset each time you synchronize. If your sync interval is shorter than the power-off interval, your smartphone doesn't turn off.
If I do understand it correctly that means: power of = no email checking...
this works at any damn phone... such a "feature" is really inappropriate.
dbsoundz said:
I noticed this article regardin setting up an email account:
http://kb.palm.com/wps/portal/kb/common/article/32429_en.html
Last sentence is:
IMPORTANT: The device power-off timer is reset each time you synchronize. If your sync interval is shorter than the power-off interval, your smartphone doesn't turn off.
If I do understand it correctly that means: power of = no email checking...
this works at any damn phone... such a "feature" is really inappropriate.
Click to expand...
Click to collapse
No. Let me give you an example. Let's say your phone is set to blank out in 5 minutes. You set your email sync time to 4 minutes. After 4 minutes, your phone polls for new mail. At the same time, the phone resets the power down timer for another 5 minutes. So, by the phone continually resetting the power off for one minute longer than the mail sync time, it never powers down. And, because of that, drains the battery quicker. They're not telling you this is a "feature". They're warning you that this setup is a battery drainer -- better to lose some automatic mail syncing than lose phone power before the end of the day.
Hello kraski,
I think you mistaken me a little.
Problem is in one sentence summarized: scheduled Mail receiving does not work with Palm Treo unless you make above written steps to prevent the phone from going to standby, (most) other WM phones receive mails while in standby...
-> Where is the point to make such a "feature"? In standby the phone also receives phone calls! And SMS... And such an internet phone has to check mails also in standby, w/o discussion or not?!

Problem with GPS and unattended mode

Hi
I'm developing a GPS application (http://www.marathon-mobile.net/Download/DownloadLatestVersion), its working fine on most phone but I'm having some problems with HTC HD2.
The problem is that the GPS doesn't seem work when the phone is locked.
I have set the following:
PowerPolicyNotify(CoreDll.PPN_UNATTENDEDMODE, true)
SetPowerRequirement("gpd0:", CedevicePowerStateState.D0, POWER_NAME | POWER_FORCE, null, 0);
I'm also calling SystemIdleTimerReset(); every 100 ms.
This seems to work for all other devices (I havent received any complaints about them), but no the HTC HD2. Have anyone else experienced problems with HD2, do I have to set any other Power Policies for this device?
//Johan
I think another app got the same problem as well. I run the wmTorrent on my HD2 and when the screen's locked the WiFi shows reconnection when I unlock it. It seems to be some sort of power saving feature that's cutting off everything when it's idle (including GPS). I take it you're requesting GPS data via Windows API.
Nice app by the way, saw it on the marketplace and was gonna place an order. I'll wait till it's fully supported on HD. Let us know pls.
I see.. Thats maybe why I can not get TrackMe to work..
Sounds to me like some kind of power saving design. After all the HD2 haven't exactly got the biggest battery in the world.
Sorry guys, that comment doesn't really help solve you problem I know.
But it would be interesting to know if this is a Microsoft / HTC design 'feature'...Maybe it's worth checking with Acer Neotouch / Omnia II user?
Or does this issue exist on any other WM6.5 handset?
I have installed OziExplorerCE GPS Mapping and Real Time Tracking Software, and it has an option to turn the display off whilst leaving the GPS functioning, pressing the <end> button will turn the display back on as per normal.
This is definitely different to pressing the <end> button to suspend the device as if I do this then Ozi also wakes up with a reconnecting to GPS message.
I have tried this with both TomTom and Oziexplorer running, and as long as I use Ozi's own display off option, both programs keep running and tracking movements.
So it seems that it is possible to do what you wish.
abucas said:
I have installed OziExplorerCE GPS Mapping and Real Time Tracking Software, and it has an option to turn the display off whilst leaving the GPS functioning, pressing the <end> button will turn the display back on as per normal.
This is definitely different to pressing the <end> button to suspend the device as if I do this then Ozi also wakes up with a reconnecting to GPS message.
I have tried this with both TomTom and Oziexplorer running, and as long as I use Ozi's own display off option, both programs keep running and tracking movements.
So it seems that it is possible to do what you wish.
Click to expand...
Click to collapse
Sounds like they use SetSystemPowerState(null, POWER_STATE_IDLE, POWER_FORCE); in combination with multiple calls to SystemIdleTimerReset(); This could be a solution. Unfortunately it keeps the entire device in on, so it'll consume more power than just keeping the GPS on. I've currently sent a version to a tester with this enabled, so we'll see if it works.
I'm still interested in a solution using unattended mode if its possible. It could be as easy as setting another power requirement, if so we just need to find it.
Thanks for all the replies .
Good to find that, I will need that for SciLor's GrooveMobile

Categories

Resources