User:Asasaki:TouchProSetup

From MozillaWiki
Jump to: navigation, search

You'll need both a win32 host machine with a free USB port (a win32 VM works if you can connect it to the VM host USB port) and an HTC Touch Pro.

Setup from scratch

stuff goes here =)

Talos steps

  • PythonCE. Download the exe and install on the host win32 box; install on the device from cab or from ActiveSync. The exe is needed for ActiveSync not to barf on transferring .py files.
  • osce.py (found here, download from here).
    • os.system() is completely broken in PythonCE. osce.py provides an osce.systema() that can be used as a replacement.
    • I've added blockingtee() to osce.py, which needs PipeDev.dll and this hacked version of PipeLib.dll to work. The original sources can be found here.
  • PyYAML 3.05: download, python setup.py build on your win32 box, copy build/lib/yaml to \talos\yaml

Disable "untrusted app" warning

  • Install CERegEditor on your win32 box.
  • (make sure your Touch Pro is connected via USB)
  • Connection -> Connect
  • If you want, create a backup Tools -> Backup/Restore -> Create image/backup
  • Tools -> Unlock Registry
    • This will pop up an untrusted app warning on your device. Hit OK.
  • Change HKEY_LOCAL_MACHINE\Security\Policies\Policies\0000101a to 1

Set up hack to download/install Fennec

@hourly /Users/cltbld/abin/download_fennec.py
@daily find /Library/WebServer/Documents/wince -mtime +1 -exec rm -rf {} \; -prune
  • This will create a fennec-YYYYMMDDHHMMSS directory that we can then recursively download onto the device.
  • then put download_fennec_handset.py on your device, update the IP, run, and notice that it downloads the latest fennec onto \talos\fennec. HOWEVER, it doesn't run. Small detail.

Misc

  • blassey wrote me a utility called ceexec that you can run on win32 to run commands on the device over ActiveSync (using CeCreateProcess). I'm attempting other routes first, since this limits you to a 1-to-1 ratio of win32 mini's to wince handhelds.
  • I found something that purports to be a wince webserver mobile web server , but for the sake of less memory/cpu usage on the device, I'm investigating file:// options first.
  • You can run rshd.exe from the command line on wince if you're feeling brave. This doesn't work while connected via USB. Original source here.

Current blockers

  • lack of subprocess.py and/or popen due to lack of wince pipes. Investigating cegcc's pipelib.dll as a possible workaround.
  • that's still a possible workaround, but now i'm working on getting everything working by replacing subprocess.popen calls with osce.systema calls. this is currently blocked by the fact that shutil.copytree is borked.

The above two *may* be fixed by wrapping CreateProcess() in another c++ function that redirects stdout to a file before and back to stdout afterwards.

  • I can download the zip and/or cab, but installing the cab silently or extracting the zip without some sort of "corrupt" message is impossible so far.
    • going to try cross-compiling 7zip