Page 1 of 1

Delete movies from USB/Network drives

Posted: Sun Jan 26, 2014 11:43 pm
by sectroyer2
Here is very dirty patch which I would categorize as pre-alpha and therefore I don't post a binary and only a memjack patch information till someone figures out a way to make it more generic. Special thanks to bugficks for helping me with starting this journey :) The patch is for exeDSP from U46EH5450:
{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x000003f4, 0x00000000, 0x0000000, 0xe59432dc, 0xeaffff4e, NULL},
At the moment I hook up to the "Send to SugarSync" tools menu option and I believe we should find a way to add our own remove option to tools menu. We also have to put in some place code for calling (if I am not mistaken) UpdateBrowserData since now the TV doesn't recognize that it did in fact delete a file and still displays it on a list :)

BTW I have some problems with debugging exeDSP it complains about threads stuff:
"Unable to find libthread_db matching inferior's thread library, thread debugging will not be available."
Anyone knows how to fix it?

Re: Delete movies from USB/Network drives

Posted: Mon Jan 27, 2014 3:05 am
by bugficks
i havent got debugging to work neither.
for now id recommend using .so injection for this as it allows more control what/when/where to patch. im having something new in pipe though, injecting python runtime and use python scripts for patching, calling exeXXX functions and hooking :)

Re: Delete movies from USB/Network drives

Posted: Mon Jan 27, 2014 8:54 am
by sectroyer2
I know that samyGOso method is more reliable but ATM this patch is only PoC and to be honest I haven't figured out how to use this samyGOso way ;)
Attaching gdb and putting breakpoints work for me. However the last thing is this thread support since without it gdb stops the process but doesn't event notice it :) I know that someone on the forum was able to produce this libthread_db file to match libpthread from the TV so it's definitely possible however I haven't been able to figure out how to do it :)

Re: Delete movies from USB/Network drives

Posted: Tue Jan 28, 2014 10:01 pm
by sectroyer2
Better version. Now it uses it's own "Delete" option in tools menu but still doesn't update the file list and tv crashes on devices that are not writeable. Moreover for some strange reason it treats Virtual USB as not writable. Mounting network shares on regular vfat pendrive sovles the the problem :)

Code: Select all

{ "_ZN19CMMVideoBrowserView13t_SetToolListEv", 0x00000268, 0x00000000, 0x0000000,  0xeb00e055, 0xeb058b88, NULL},
{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x000003f4,  0x00000000, 0x0000000,  0xe59432dc, 0xeaffff4e, NULL},

{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x000003f8,  0x00000000, 0x0000000,  0xe1a00004, 0xe92d4
fff, NULL},
{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x000003fc,  0x00000000, 0x0000000,  0xe5942298, 0xebfb54ca, NULL},
{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x00000400,  0x00000000, 0x0000000,  0xe5832080, 0xe3560000, NULL},
{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x00000404,  0x00000000, 0x0000000,  0xebf9d040, 0xe3560000, NULL},
{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x00000408,  0x00000000, 0x0000000,  0xe5943000, 0xe3560000, NULL},
{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x0000040c,  0x00000000, 0x0000000,  0xe1a00004, 0xe5940304, NULL},
{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x00000410,  0x00000000, 0x0000000,  0xe59452dc, 0xe3a01008, NULL},
{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x00000414,  0x00000000, 0x0000000,  0xe5933134, 0xe3a02fd7, NULL},
{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x00000418,  0x00000000, 0x0000000,  0xe12fff33, 0xebfb54c3, NULL},
{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x0000041c,  0x00000000, 0x0000000,  0xe1a01000, 0xe3560000, NULL},
{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x00000420,  0x00000000, 0x0000000,  0xe1a00005, 0xe3560000, NULL},
{ "_ZN18CMMBrowserViewBase16m_ShowFileMgrWndENS_21EMM_ACTIONWINDOW_TYPEE", 0x00000424,  0x00000000, 0x0000000,  0xeb0149d4, 0xe8bd8fff, NULL},

Re: Delete movies from USB/Network drives

Posted: Wed Jan 29, 2014 8:21 am
by juusso
TV indexes files on each login to media player mode, while we see that f** "Loading...". Maybe you should dig there for filelist update?

Re: Delete movies from USB/Network drives

Posted: Wed Jan 29, 2014 8:44 pm
by sectroyer2
What's interesting is that if I open smb directory on regular pen drive I see only "quick" f** "Loading..." so this Virtual USB is handled in completely different way. Moreover since just mounting on regular usb disc solves this problem I am not planning on investigating this issue for a while. Firstly I have to deal with transitioning to samyGOso or making some patches to memjack or some other solution. I need to make this patch more generic, therefore I need to find better way for finding a place to put the patch. Matching of only four bytes that memjack does is not enough. The best way would be to put in the specific place a call to my code. I have to find a way to allocate some place in exeDSP's memory for code that I add (temporarily I just overwrite some instruction that I personally don't use). I also need to find a way to calculate all function call addresses (bl address) dynamically. For now I calculate them manually ;( Let me know if you know how to solve any of this issues:)