[XAP] Phone Commander

Search This thread

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
INROM and ROMMODULE are file attributes which specify that the file is to be considered to be in read-only storage. The filesystem driver won't allow those files to be modified, regardless of the process's permissions. I have some ideas for ways to get around this, by hacking the kernel storage stack in memory directly, but that's going to be a hell of a project even with the HtcUtility driver, and it won't work on any ROM without a working version of that driver (so, basically any stock ROM these days).
 
  • Like
Reactions: pdaimatejam

Martin7Pro

Senior Member
Oct 23, 2011
385
363
htc7pro.howto.cz
Little repair file reading/editing.

Question: Do you know anybody Error 202 ERROR_INFLOOP_IN_RELOC_CHAIN? This error occures in PCMD, when sh file is interpreted, has more then one shell line, and VS debugger is not active. When I debug it or single shell line is writen to sh file, no error occures.

____________________________

Edit: There is two different errors. Error 202 means probably: My application wants to start another application, which is allready running. For example dde applications does not return right handle to WaitForSingleObject using. Second, bigger error is very crazy: When application runs outside debugger, WaitForSingleObject after ShellExecuteEx crashes most often. Do you know anybody, how it is? Is not it work of WatchDog?
 

Attachments

  • Phonmander.xap
    678.2 KB · Views: 23
Last edited:
  • Like
Reactions: farafr

Martin7Pro

Senior Member
Oct 23, 2011
385
363
htc7pro.howto.cz
Version 2.1

To test primitive shell copy the Shl folder to your phone root and doubletap in installed PhoneCommander on \Shl\Example.sh . It does not function for DDE (such as HTML links) now and sometime crashes probably by WatchDog behaviour (try stop mp3 playing by return arrow phone key, if it crashes everytime, it is only first attempt). You can edit Sh file by built/in Word application by "3 View" button and pencil icon. M.
 

Attachments

  • CopyToPhoneRootDirToTryShell.zip
    408.2 KB · Views: 31
  • Phonmander.xap
    679 KB · Views: 19
Last edited:
  • Like
Reactions: farafr and mikaelel

Martin7Pro

Senior Member
Oct 23, 2011
385
363
htc7pro.howto.cz
2.2 repaired

Hello. So here is a corrected and for some time the current version, I do not have free time to continue. Version is able to create simple playlists (link is in the 9/Menu, enabled when any files are rightsidetap multiselected) and merge the lists as text shell files. Shutdown error application I solved by the thread in the background, but I'd rather watchdog somehow turned off completely.

This version enables for me:

To manage all files very quickly include multioperations (like TotalCmd).
To copy mp3 files to any phone directory by desktop TotalCmd, create playlist on phone and hear music.
To do the same vith movies, photos etc.
To copy e-books from my desktop and read them in phone (formats: doc, RTF - the best reading, pdf etc).
To edit all files in phone (the same formats, include binaries).
 

Attachments

  • Phonmander.xap
    680.9 KB · Views: 15
Last edited:
  • Like
Reactions: mikaelel and farafr

Martin7Pro

Senior Member
Oct 23, 2011
385
363
htc7pro.howto.cz
Version 2.3

Repaired saving of changed text document from Built-in Word application to any directory.
Added 3s timeout to JPG files shell showing in built-in Pictures application (you can make simple presentation from pictures, videos and sounds in sh file).
 

Attachments

  • Phonmander.xap
    681.1 KB · Views: 38
  • Like
Reactions: farafr

Martin7Pro

Senior Member
Oct 23, 2011
385
363
htc7pro.howto.cz
is possible also delete inrom file?

INROM and ROMMODULE are file attributes which specify that the file is to be considered to be in read-only storage. The filesystem driver won't allow those files to be modified, regardless of the process's permissions. I have some ideas for ways to get around this, by hacking the kernel storage stack in memory directly, but that's going to be a hell of a project even with the HtcUtility driver, and it won't work on any ROM without a working version of that driver (so, basically any stock ROM these days).

Yes, you mean probably "system attribute" WinCE files. Phone Commander can replace it (on Fully unlocked devices only!!!) by any other (equal name) file, if file is not used (opened by any application or RAM loaded, if it is executable) actually. For security reason it cannot be deleted or renamed directly, substitution must be prepared first. For example - I want replace any system sound. I can create \Backup directory (on root etc), copy there xxx.wav file from \Windows directory. Now I can copy another sound file from \Windows (or another) directory to \Temp, rename it to equal name (xxx.wav) and copy or move it to \Windows directory. This way is working, I am using it to replace system dlls (drivers, language and hw keyboard layout files). But you must unload it from RAM first - for example change registry keys to another dll loading and restart device first. May be on not fully unlocked device cache copy must be prepared first (in dllcache directory etc, I do not know WinCE6 and WP7 security mechanisms).
 
Last edited:
  • Like
Reactions: farafr

Martin7Pro

Senior Member
Oct 23, 2011
385
363
htc7pro.howto.cz
Version HTC7Pro only

Try it, but may be it will crash on other devices instead HTC7Pro. This is first version with unicate hardware keyboard support. Keys "0" to "9", "Enter" and cursor arrows works now.
Reboot device feature was aded in 9/Menu navigation.
Have you got somebody any BT hardware keyboard? We can probably make its connection to all WP7 phone and:
1. use HW keys in homebrew apps,
2. redirect HW keys to SIP emuation.
 

Attachments

  • Phonmander.xap
    496 KB · Views: 12
  • Like
Reactions: mikaelel

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
No, not System. I addition to the usual Readonly, Hidden, System, and Archive flags on FAT filesystems, the WinCE filesystem supports the INROM (indelible readonly mark) and ROMMODULE (can *only* be opened by the program loader, at least in theory, not even read like a normal file).

The degree to which WP7 enforces these restrictions, even on stock ROMs, is a bit unclear. For example, it's possible to "shadow" ROM files by overwriting them with a different file that has the same name. The old file doesn't actually get deleted or changed, though, and while attempting to just open the file by name will get the new version, it seems to still be possible to also get the old one, and deleting the shadowing file will just reveal the ROM file.
 

Martin7Pro

Senior Member
Oct 23, 2011
385
363
htc7pro.howto.cz
No, not System. I addition to the usual Readonly, Hidden, System, and Archive flags on FAT filesystems, the WinCE filesystem supports the INROM (indelible readonly mark) and ROMMODULE (can *only* be opened by the program loader, at least in theory, not even read like a normal file).

The degree to which WP7 enforces these restrictions, even on stock ROMs, is a bit unclear. For example, it's possible to "shadow" ROM files by overwriting them with a different file that has the same name. The old file doesn't actually get deleted or changed, though, and while attempting to just open the file by name will get the new version, it seems to still be possible to also get the old one, and deleting the shadowing file will just reveal the ROM file.


I mean it may be really ROM including --> after hardreset those files are changed to original, is not it? I do not know WinCE and WP7 ROMs cooking, but I mean it can be similar to dllcache on Desktops, but hidden on WP7 filesystem. Then this is probably impossible to change it on running system, may be in boot time only (by mtty, GC, cab sending etc), what do you mean about it?
I found MS explanation here: http://social.msdn.microsoft.com/Fo.../thread/44ce4f7b-7037-4288-9480-1a3c8634bc21/

I have a important question:

Do you know, how to start Silverlight dll programmatically? Not by SHLaunchSessionByUri, this way is working good from Silverlight application only. I mean direct shell TaskHost.exe calling. Or it is not allowed on fully unlocked devices too? When I use SHLaunchSessionByUri from native exe, error 0x0202 occures everytime, from Silverlight code it works properly. Is not it problem of root access? Root manager on my phones (both DFT and Dynamics) ROMs knows managed dlls only. My native code is working, but COM calling from it is not allowed probably. Or I must load any next libraries to device? And, this is not right way for debugging, I want to call managed entry point by the same way as TaskHost.exe, but I do not know, how to do it.
 
Last edited:

Martin7Pro

Senior Member
Oct 23, 2011
385
363
htc7pro.howto.cz
UI and Keyboard optimisation

There is a new 2.5 version (changed februar 10, 2013 evening, download newest build).
It has better UI scrollbar management (probably only one WP7 application, able to show and trace quickly full \windows\ directory). Tap and hold 'U' screen button as 'up' and 'D' as 'down' quick navigation.
This version supports hardware HTC7Pro keyboard fully!
Use hardware keys:
'0'..'9' for filesystem commander directions,
'Q' for second panel activating,
'W' for panels swapping,
'Enter' for shell direction starting,
'Space' for select/unselect item on caret position,
'keyUp' and 'keyDown' for moving up and down,
combination 'Fn'+'keyUp' and 'Fn'+'keyDown' for very quick navigation (especially in \windows\ directory),
combination 'Chr'+'keyUp' and 'Chr'+'keyDown' for moving up and down without caret position change,
combination 'Chr'+'Fn'+'keyUp' and 'Chr'+'Fn'+'keyDown' for very quick moving up and down without caret position change,

Next version will have (still in development):

Opensource plugin system (like desktop TotalCommander). First plugin will support registry keys (as 'directories' ) and values (as 'files'). Second plugin in development is FTP, where one panel will contain normal WP7 filesystem, second panel FTP site filesystem, all commander directions will works in this configuration. Third plugin will support HWND Windows, processes and threads. Another plugins you can code yourself with pre-defined plugin interface (tiles/installed/running apps, Hardware drivers, URL protocols, system services, mailboxes, SMSBox, Calls, Schedulers etc).

I examined HTC7Pro keyboard driver and it's integration into the system. I'm not sure now if bigger idiots are engineers of HTC or MS WP7 development team. The simplies keyboard functions, usual on 15 years old Nokia communicators 9110/9210/9300/9500 are reachless on HTC7Pro without very hard hacks or full keyboard driver rewriting. We can use only "non Fn modified keys" as quick shortcuts now. All top (numers+Backspace) keyboard line works with long delay.
 
Last edited:

Martin7Pro

Senior Member
Oct 23, 2011
385
363
htc7pro.howto.cz
Hi Martin,

The app looks nice. I will try it. But I saw that you use libraries from Ultrashot, fiinix, W.I.N.C.O and others. So it would be appropriate to give them credits in the opening post.

Ciao,
Heathcliff74

Sorry, you are right. I will add references, when finish next usable Phone Commander version. 3rd libraries are linked by any past attempts, but W.I.N.C.O's one is really used only, I must clean release version much. But, I used a much of your, fiinix, and mostly Ultrashot knowlidge in all my WP7 applications, getted from different XDA posts and PMs, binaries are less important than know how for me.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    I am working on TCMD equivalent for Windows Phone. It may be:
    Two-panel filemanager,
    SMS and Mail configurator (groups, searching, backup),
    Registry editor (editing, export, import),
    Taskmanager (working apps dehydrating, resuming, closing, memory increasing),
    Tiles configurator (creating, grouping),
    MultiMedia manager (searching, playing etc.),
    Applications configurator (uninstalling, grouping),
    Keyboard Shortcuts configurator (HTC 7 Pro, Gold, Prime),
    and another next by plugins system.

    It will use direct access for unlocked ROMs, HtcRoot project (http://xdaforums.com/showthread.php?t=1453343) for full access on (dev and) InterOP unlocked devices (where it is possible), ProvXML method for incompatible devices.

    There is first screenshot:
    PhoneCommanderScreen.jpg


    Try it, post experiences. This is designed for HTC7Pro hardware keyboard, but must be usable for touch conntrolling too. For big dirrectories (\Windows etc.) scrollbars are necessary. I want to have as far as possible biggest amount of controls on main screen. It may not be a game, it must be working tool. In long future I want integrate also simple programming IDE to this tool.


    Newest version will everytime here.


    Actual attached version enables for me:

    To manage all files very quickly include multioperations (like TotalCmd).
    To copy mp3 files to any phone directory by desktop TotalCmd, create playlist on phone and hear music.
    To do the same vith movies, photos etc.
    To copy e-books from my desktop and read them in phone (formats: doc, RTF - the best reading, pdf etc).
    To edit all files in phone (the same formats, include binaries).
    To import .reg files to Registry

    From version 2.3 added 3s timeout to JPG files shell showing in built-in Pictures application (you can make simple automatic presentation from pictures, videos and sounds in sh file).
    4
    Hi Martin,

    The app looks nice. I will try it. But I saw that you use libraries from Ultrashot, fiinix, W.I.N.C.O and others. So it would be appropriate to give them credits in the opening post.

    Ciao,
    Heathcliff74
    3
    UI and Keyboard optimisation

    There is a new 2.5 version (changed februar 10, 2013 evening, download newest build).
    It has better UI scrollbar management (probably only one WP7 application, able to show and trace quickly full \windows\ directory). Tap and hold 'U' screen button as 'up' and 'D' as 'down' quick navigation.
    This version supports hardware HTC7Pro keyboard fully!
    Use hardware keys:
    '0'..'9' for filesystem commander directions,
    'Q' for second panel activating,
    'W' for panels swapping,
    'Enter' for shell direction starting,
    'Space' for select/unselect item on caret position,
    'keyUp' and 'keyDown' for moving up and down,
    combination 'Fn'+'keyUp' and 'Fn'+'keyDown' for very quick navigation (especially in \windows\ directory),
    combination 'Chr'+'keyUp' and 'Chr'+'keyDown' for moving up and down without caret position change,
    combination 'Chr'+'Fn'+'keyUp' and 'Chr'+'Fn'+'keyDown' for very quick moving up and down without caret position change,

    Next version will have (still in development):

    Opensource plugin system (like desktop TotalCommander). First plugin will support registry keys (as 'directories' ) and values (as 'files'). Second plugin in development is FTP, where one panel will contain normal WP7 filesystem, second panel FTP site filesystem, all commander directions will works in this configuration. Third plugin will support HWND Windows, processes and threads. Another plugins you can code yourself with pre-defined plugin interface (tiles/installed/running apps, Hardware drivers, URL protocols, system services, mailboxes, SMSBox, Calls, Schedulers etc).

    I examined HTC7Pro keyboard driver and it's integration into the system. I'm not sure now if bigger idiots are engineers of HTC or MS WP7 development team. The simplies keyboard functions, usual on 15 years old Nokia communicators 9110/9210/9300/9500 are reachless on HTC7Pro without very hard hacks or full keyboard driver rewriting. We can use only "non Fn modified keys" as quick shortcuts now. All top (numers+Backspace) keyboard line works with long delay.
    3
    Version 2.0

    This is first version, which allowes multiple file operations. All unique operations must be confirmed in this beta version (for example - use *.* selecting, do "6/move" operation, but you must confirm every unique file moving in this multioperation). Multiconfirmation ("rewrite all" etc.) will allowed in prepared full version. Use carefully, WP7 filesystem operations are danger!
    3
    That's too bad - with WP7 Root Tools out, the time is ripe for an app like this - but I definitely understand (having run into the "no time!" problem myself a few times). Good luck on whatever it is, and we look forward to hearing from you again.