HTC Battery Drainage Bug (Possible Fix) - Tilt, TyTN II, MDA Vario III General

Hello,
This is my first attempt at .NET CF programming. It is in reference to this thread.
It attempts to cycle the power to the GPS hardware eight times (at 200ms intervals) by calling GPSOpenDevice() and GPSCloseDevice().
It also shows the raw information provided by GetSystemPowerStatusEx2() if you need to troubleshoot your battery.
I'm not sure that it works, but it attempts to do programmatically what is described in the thread link above.
Full source code is included. I think it is also a great tutorial VB.NET project for anyone wanting to learn how to read the power on their device.
Please let me know what you think, and if it even works towards being a workaround for the HTC/Qualcomm chip standby-power drain bug. If it does work, I'll improve it (add autorun/exit-after capability, systray, etc..)
To use this without dealing with VS2005/compiling/etc, just copy HQPowerFix.exe from the bin/Release folder (in the zip) to your device (anywhere) and run it from there.
Note: These images are from my development machine. They look different on the device:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Regards,
--Weasel5i2

Nice idea! But it seems would be useful to cycle gps state not a fixed amount of times, but based on result of battery drainage (if it's below the certain level, the fix was succeed and no need to cycle gps anymore).
Also it would be useful to create a "command-line mode", when the program is starting and doing the fix without user interference. When done, it makes possible to launch iGo and this program from one script file, to implement the fix automatically after exit from iGo.

I found the MSDN documentation on the SYSTEM_POWER_STATUS_EX2 structure:
http://msdn.microsoft.com/en-us/library/aa926903.aspx.
It seems I didn't properly implement this structure's usage in my code, so I am planning to fix it tonight when I get home from the office.
@Vladimyr: That's a great idea, I do plan on doing that if this program turns out to be worthwhile and actually do the GPS power-drain fix as intended. Once I figure out how to more accurately read the mV/mA metrics, I will start working on that.
I'm also now working on a front-end/back-end for controlling a Car PC from a Pocket PC.. I think an older iPaq is cheaper than a Lilliput touchscreen
--W5i2

weasel5i2 said:
I found the MSDN documentation on the SYSTEM_POWER_STATUS_EX2 structure:
http://msdn.microsoft.com/en-us/library/aa926903.aspx.
It seems I didn't properly implement this structure's usage in my code, so I am planning to fix it tonight when I get home from the office.
@Vladimyr: That's a great idea, I do plan on doing that if this program turns out to be worthwhile and actually do the GPS power-drain fix as intended. Once I figure out how to more accurately read the mV/mA metrics, I will start working on that.
I'm also now working on a front-end/back-end for controlling a Car PC from a Pocket PC.. I think an older iPaq is cheaper than a Lilliput touchscreen
--W5i2
Click to expand...
Click to collapse
Any updates to your program? Also, is it possible to edit the thread title and put GPS in it? I'd been meaning to reference back to this one and it took me a while to find it.

HAVE ANYONE TRIED THIS ALREADY?
DID IT FIX THE PROBLEM?
weasel5i2 said:
Hello,
This is my first attempt at .NET CF programming. It is in reference to this thread.
It attempts to cycle the power to the GPS hardware eight times (at 200ms intervals) by calling GPSOpenDevice() and GPSCloseDevice().
It also shows the raw information provided by GetSystemPowerStatusEx2() if you need to troubleshoot your battery.
I'm not sure that it works, but it attempts to do programmatically what is described in the thread link above.
Full source code is included. I think it is also a great tutorial VB.NET project for anyone wanting to learn how to read the power on their device.
Please let me know what you think, and if it even works towards being a workaround for the HTC/Qualcomm chip standby-power drain bug. If it does work, I'll improve it (add autorun/exit-after capability, systray, etc..)
To use this without dealing with VS2005/compiling/etc, just copy HQPowerFix.exe from the bin/Release folder (in the zip) to your device (anywhere) and run it from there.
Note: These images are from my development machine. They look different on the device:
Regards,
--Weasel5i2
Click to expand...
Click to collapse

Doesnt work but nice idea

Related

Prophet Camera to Wizard

Hi...
Attached here are the Camera files from the Jamin.Install No Cert CAb first and then copy all the files to Windows folder.
I was not able to extract cameraDriver.dll...but the results are good.Pls post yr feedback.
Do we know what the differences are? Has anyone tried this, compared results, etc?
Isn't the camera in the Prophet completely different from the one in the Wizard?
what's supposed to be the point if the hardware is different?
Do you by chance have the original files in case something goes wrong or the quality isn't as good as the original (although I can't see how that's even possible :roll: ). Thanks for posting this, I'm anxious to give it a try.
hdubli said:
Hi...
Attached here are the Camera files from the Jamin.Install No Cert CAb first and then copy all the files to Windows folder.
I was not able to extract cameraDriver.dll...but the results are good.Pls post yr feedback.
Click to expand...
Click to collapse
Where I can find "No Cert CAb"?
Thanks
any special way im supposed to copy the files into the windows directory. its not lettin me do so. sayin access denied. I already have No Cert cab installed
I didn't have to install the no cert cab. All I did was connect the phone thru activesync, clicked the explore button in activesync, then copied all the files in the dloaded camera file and pasted them right into the Windows folder on the PPC. Soft reset and good to go. I think these are the same files that are already on the Wizard, though. I don't really see much if any difference.
Correction on my last post. I just reloaded the original camera files and recompared to the Prophet files - why didn't they install these in the first place? They're much more responsive than the Wizard files. The camera is much less grainy and more responsive when you first start looking and an object and focusing on it. The pics do seem to be a bit cleaner and brighter as well, but I'll have to take a couple shots from each to compare.
There's certainly no ill effects from installing the new camera app, I don't see any immediate benefit however. Attached are the old files (from the latest i-mate rom) so you can revert if you want to. I'll try it some more and report what I find. The important thing (assuming the camera on both Wizard and Prophet is identical) is the cameradriver.dll - if anyone has a JamIn could you please post the cameradriver.dll file so we can try it). Here's a quick before/after picture - not much difference, however I tried this in a decent light level.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
thanks for the example i also couldnt see any difference, but are there any new Options in the cam app?
One thing I've noticed in Adjust... is that Gamma has been replaced by Sharpness.
In fact, just hacked the .exes and although the JamIn's camera app is v3.02, it was compiled after the latest i-mate one (v3.00), so perhaps the Wizard files are the most up-to-date? (Maybe the .02 refers to a build specifically for the Prophet?) I've attached the original i-mate files this time (oops!).
anyone know what the problem is with mine. i cannot replace the files in the windows folder. i get a msg saying access denied

[SOLVED] SDCard not recognised, RAPI/ActiveSync disabled, caused by Exchange policies

Dear all,
My Storage Card keeps disappearing after a while. Can't get it back other than by hard-resetting the device.
I've rebuild the phone several times now, and after a few hours incl. some warm-reboots, it's not able to recognise the SDCard anymore. Another problem which I figured out is that it disables RAPI too, which makes connecting with ActiveSync impossible. Luckily I was able to build an enableRAPI.cab file, which enables it (which I sent by mail to my phone!)...Well... Anyone that knows what this might be caused by?
Regards,
Nika.
PS. This started when I started to use the new ROM (see signature), but I think it's a general issue, maybe caused by UC or other programs installed by UC, or myself (after restarting)...
Hi all,
I have figured out that this is caused by Exchange policies (after my first Activesync Sync) pushed to my mobile! I have no idea how to change them back, going to try to figure that out now...
Any thoughts?
Regards,
Nika.
Dear all,
I figured it out. This was caused by the "enforce security settings" which can be done by Microsoft Exchange push-mail.
I got the following message:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I hadn't realised before, but this caused my phone to be inaccessible for ActiveSync (RAPI was disabled) too, and made my StorageCard disappear.
When I realised this I started my investigation on Microsoft Exchange. I opened the Exchange Management Console:
And then I opened the Default Properties, and changed to the Sync Settings tab:
Here I turned on all options, resynced the phone, rebooted and all my issues were solved
Kind Regards,
Nika.
For those of you interested in the rest of the Exchange Security Policy settings, here's screenprints of the other tabs:
Regards,
Nika.
thanks
Nice info
many thanks, this helps much ppl...
Cheers
Lol, thanks. You wouldn't want to know how many times I reinstalled my phone due to this (thank god for Sleuth's UC!!), so I really hope this thread will help people struggling with the same problems if they arise...
Regards,
Nika.
Cert fixed my problem
I noticed that your Exchange 2007 settings had the "Allow nonprovisional devices..." setting still enabled. This was initially the setting I changed in our Exchange 2007 environment that made the difference, however, as others have suggested, this was an unacceptable long term solution and likely not even a possibility if you're not the Exchange Admin.
The solution for me was to export the cert (the same one that is used when logging into your Outlook Webmail) and install the cert on the phone.
The problems described in this thread only became an issue for me when I upgraded to 6.1. I kept the same radio 1.48 so I know it wasn't a radio issue in my case.
I switched the nonprovisional setting off once I installed my cert and the device has had no problems syncing ever since. Compromising policy and security is never the best solution (although still a solution sometimes) so I hope this helps some of you in the same boat as I was in.
Did you have to enable the options on the 'Device' tab as well as I would pretty much want all them features enabled ?
This worries me a bit as my company is about to upgrade to Exchange 2007 and they don't consult users before enabling things like this. I currently use BlackBerry Connect but would prefer to move to native ActiveSync since BBC has some other issues. If it means they are going to lock out all the functionality of my Kaiser then I'll not bother. I'll have to wait and see...
Andy

Open Android Manager - Updated 9-6-9

Well that didn't last long. My whole point with starting this project was to create an open source PC side manager. It turns out there were more talented minds than mine already at work on the same thing. At this point I'm shutting this project down and throwing my hat in the ring to helping with Droid Explorer however I can.
MODS - Please feel free to lock/delete this thread as you see fit.
Open Android Manager
Right now it doesn't do much at all. This is only about one week's worth of work and most of that was spent getting it to auto-detect the phone and the command line interface wrapper. As a proof of concept I threw in the reboot commands and the beginnings of a file browser. It's written in VB.Net and I'm posting the entire project so far. If you just want to take a look at the finished product look at the “release” link.
I’m not a professional developer or even formally trained. I’m entirely self-taught so if you think there’s a better way to do something let me know, or just add it yourself. I hope to see this become a community developed tool.
There are probably a few bugs and more features to come soon. In the mean time how about we get a wish list going.
Update - 9/2/2009
I've rewritten the command line interface and it's much more efficient. The automatic phone detection is now spot on. I also corrected a bug that left an orphaned instance of ADB running in the background when the application exited (Sorry about that). I'll be posting an update soon with the changes and hopefully some added features. The new links will be up then.
Update - 9/6/2009
After spending this weekend retooling things I thought I should actually post the update. The file browser is just a "look" only at this point. I've started work on the drag and drop interface but it doesn't actually do anything with the files yet. The good news is that the file browser is FAST!
Oh and I'm off work this week so I'll actually have time to work on this.
Source Code 0.0.3
Change Log
0.0.2
Began work on file browser
Cleaned up orphaned ADB instances on application close
Rewrote command line interface for continuous asynchronous output retrieval
Improved automatic phone detection
0.0.1
Automatic device detection
Reboot commands
Screen Shots
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hey man can I help develop? I am trying to make my own program right now called superg1 and I see that yours already has adb and everything built in. I am doing mine in C++ and I see your doing yours in vb.net but I would still love to help develop yours.
HA! I just posted on your thread
I just posted the updated source, the 0.0.3 is the most recent. I've made some more changes to the command line wrapper. Every time I think I've gotten it all worked out something throws an error or doesn't return the right values.
Haha that same thing has been happening to me. We are working on a way to automatically root there phone and flash the scary spl and the radio and we can do it through batch file just not through C++ project
Ok I am looking over your source and it seems like vb is way more user friendly then C++ with easier to remember commands. Did you know if you want to have it scan to see if the phone is there you can use the command : adb wait-for-device
if you have microsoft Visual C++ I can send you my project folder and you can look through my code and tell me what I am doing wrong ( cause I am sort of a noob)
kickfliprock13 said:
Ok I am looking over your source and it seems like vb is way more user friendly then C++ with easier to remember commands. Did you know if you want to have it scan to see if the phone is there you can use the command : adb wait-for-device
if you have microsoft Visual C++ I can send you my project folder and you can look through my code and tell me what I am doing wrong ( cause I am sort of a noob)
Click to expand...
Click to collapse
I'd love to take a look, send it over. I'm not that familiar with C++ but I can pick my way through it. I'm curious to see how you're handling the cmd process.
I was looking at the "ADB Wait-for-device" but I didn't like the way the process would hang while it waited. With the check based on the usb arrival and removal events the application essentially just pings adb when the event occurs. Also the ADB devices will return "device" or "recovery" to indicate the state and the device serial. I don't use that info for anything yet. Theoretically it could support multiple handsets simultaneously by addressing the adb commands to a particular serial.
Good news! I finally got the output of the confirmation for file pushes and pulls. I ended up building a process wrapper around ADB itself rather than the CMD.exe and calling adb from there. This was the last piece I needed for the drag & drop file manager I'd been working on. It also means I can get full input and output control from ADB. It's still at just a proof of concept at this point, so I still have a bit of work to do to clean up the class module and swap it out for the command line module I'd built previously. I'll post the update in the thread once I get it all done. Possibly tonight, but probably tomorrow depending on how much I geek out on it tonight.
Everything else from here is working out the scripts, adding buttons, and UI stuff.

[REQ] Video Output app...

I have documents that show what needs to be done for the chip to put out video, I just don't know how on earth to program...code, or whatever you call it. Is this possible? or impossible? Who's willing to give it a shot?
What are you trying to accomplish? Be specific.
Yes, of course, I'm sorry....
A Jailbroken iPod Touch has the ability to output the whole UI (not just when playing a video) with the use of ScreenSplitr. I'm wondering if there's someone out there that would be able to develop the same thing so we could use the G1 as a good portable media device.
I'm currently using my iPod in my car as my media center/internet device...which I don't want to do anymore.
lbcoder said:
What are you trying to accomplish? Be specific.
Click to expand...
Click to collapse
I think he wants to output the frame buffer over usb.. I've thought of doing it before but I have no idea if it's possible.
Right...that's what I said...framebuffer...usb...I have a table with arm registers...I don't know what can be done with that...but yeah...I have it.
its noway to output video from a G1..the phone dont have the hardware for it..thats what i think
But it does...the chipset does...
Im sure it's possible to dump the screen output straight to usb, but then you need a program on the host pc to receive the feed. I use RemoteJoy to play my girlfriend's PSP on the tv.. it's essentially the same thing you're looking for.
I wish I could attach the file I have...It's actually in this link it shows a link to PDFs...
And, I meant video out like how the Touch Pro has...with a little HTC video cable output etc...
RavenII said:
I wish I could attach the file I have...It's actually in this link it shows a link to PDFs...
And, I meant video out like how the Touch Pro has...with a little HTC video cable output etc...
Click to expand...
Click to collapse
Tv Out, or something like that.
And I posted a thread asking if it could be developed but I guess the actual Drivers to the usb port can't do it or some junk.
See that's what I don't get...everyone keeps saying it's not doable, but the fact of the matter is, the chip supports it...so what is it that doesn't allow it? I've tried searching for "TV Out", "TV Output", "Video Out", "Video Output"...etc, throwing HTC, G1, Dream in to google, and come up with threads that seems like no one followed up on...
Andddd....this thread is dead....great.
The framebuffer is located at /dev/graphics/fb0. Reading this is trivial. For example, fbvncserver from here: http://code.google.com/p/android-vnc/ uses it as the display source.
You won't be able to get a video source straight from the hardware since this capability is physically not connected to anywhere, at least as far as I can tell. I know that an actual video out signal is generated by the "big chip" but you wont be able to get at it without butchering the mainboard. There is a slim possibility that these pins may be connected up to test pads on the mainboard, but I wouldn't count on it.
Either way, use of the framebuffer would definitely be the best approach, and can be done as is without much effort. What you do with this is up to you and your exact objectives -- as I've mentioned, you can *right now* just run fbvncserver and pull the video to a vnc client over the network connection (preferably wifi, bluetooth, or USB -- note that USB networking is possible using the program "wired tether for root users" and related driver...). VNC is probably a little slow though -- it won't carry video framerates.
See...I'm just up for discussion...brainstorm if you will...I don't know if many of you are into hardware, but typically, a chip HAS to be wired a certain way...
For example...the USB port on the bottom of the phone is typically configured where
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If you notice, some pins can be assigned to different functions...I think the chip routes what to where...but I just don't know arm...or anything like that...
Yeah but your main problem is that you need to have a microusb to composite/component/s-video/hdmi dongle. Even if you did have that dongle you would still need drivers to support sending a video signal to that port and decoding it to be used by said output device. You might be able to make a break out box that can do the video separation but still getting it to that box involves a lot of drivers on both ends.
psychoace said:
Yeah but your main problem is that you need to have a microusb to composite/component/s-video/hdmi dongle.
Click to expand...
Click to collapse
HTC does make the cable, but it is meant for the various version of the HTC Touch and a few other HTC models.
See, there are a few WM based HTC phones that people have gotten to do video out that never even had the option listed...For example, my old HTC Mogul (Titan)...Simple registry hack, and 5 bucks later...Video output...or you could even get the app from a Touch Pro, and run it, and get video out.
http://forum.ppcgeeks.com/showthread.php?t=59236
Bueller....Bueller............Bueller?
http://forum.xda-developers.com/showthread.php?t=557717&page=13
Probably the closest you'll get for a while I'm afraid
Damn it, looks like i need to learn how to code...

[GPS] Another fix by me

I made my own fix and it's working pretty fine for me. I get a fix in 15 secs and a hook in about 30-60 secs. I've also got a maximum of 11 sats.
It's a flashable archive through CWM.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Gingerbread only
Please consider that I won't give any support if it still doesn't work for you. I don't use any custom ROM yet and made this for myself after some researches so I'm free of any responsibilities. You're free to test.
- Download it and put it in your SDC
ensure of every related settings (apn datas, wireless networks and of course gps) are enabled
Reboot into CWM, fully nand backup
Flash the fix and reboot. Wait for the boot complete (2 min at least)
Now shutdown your device then turn it ON
edit /system/gps.conf with a text editor if you want to make the main servers matching with your country. Visit www.pool.ntp.org to get your country/region servers list
Code:
# Main server
NTP_SERVER=[COLOR="Red"]fr[/COLOR].pool.ntp.org
# Secondary servers
NTP_SERVER=0.[COLOR="Red"]fr[/COLOR].pool.ntp.org
NTP_SERVER=1.[COLOR="Red"]europe[/COLOR].pool.ntp.org
NTP_SERVER=2.[COLOR="Red"]oceania[/COLOR].pool.ntp.org
NTP_SERVER=3.[COLOR="Red"]asia[/COLOR].pool.ntp.org
# Hosts part
SUPL_HOST=supl.sonymobile.com
SUPL_HOST=supl.sonyericsson.com
SUPL_HOST=supl.google.com
SUPL_HOST=lge.glpals.com
SUPL_HOST=supl.nokia.com
This is actually my config. Mod it as your wants by refering to the servers list mentionned above.
You should now be able to hook to 6 sats at least (11 for me). You might use an app like GPS Status or GPS Test for viewing detailed stats.
yet another gps fix ....
-for a device that it's confirmed that has HARDWARE RELATED issues with GPS
-for a majority of ppl, who DONT use assisted GPS
i dont get it .. !!!
dude, did you even read something ? you didn't get the goal of this because there is no particular goal, I basically made it for myself.
confirmed by who ? 3 persons ? if your gps is broken, of course it won't work. mine had hard difficults to get a poor hook for dozen minutes while I was under froyo, and wasn't working anymore after migrating to gingerbread.
this solved my issue, and could potentially solve those of others, so I share. majority doesn't matter, if I can make at least one being alive happy with my knowledge, I'll do.
and, what would you do if you didn't know how to reach to a place ? in this case I guess the majority wins because it will use gps, the easiest way.
Let's be funky
morx said:
yet another gps fix ....
-for a device that it's confirmed that has HARDWARE RELATED issues with GPS
-for a majority of ppl, who DONT use assisted GPS
i dont get it .. !!!
Click to expand...
Click to collapse
Dude, this is a community. We share knowledge/MODs/KANGs/fixes etc. If you ought not to use it, just ignore.
morx said:
yet another gps fix ....
-for a device that it's confirmed that has HARDWARE RELATED issues with GPS
-for a majority of ppl, who DONT use assisted GPS
i dont get it .. !!!
Click to expand...
Click to collapse
I'm not sure that it's a real Hardware issue when OB have problem with GPS !
If you try Zeus ROM by Huexxx you'll see that GPS is working fine and you'll get a fix in less than 15 sec ! I suppose it's just base software that is **** !!
Bye
download
Man,
I want to test your fix, but i can't download it from minus
thanks
going to uptade the link, but you can dl it from my current shares. but note that it's basically made for GB

Categories

Resources