Delete movies from USB/Network drives

Ideas and dreaming will go this forum
Post Reply

sectroyer2
Posts: 15
Joined: Wed Nov 13, 2013 7:07 pm

Delete movies from USB/Network drives

Post 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?

User avatar
bugficks
Official SamyGO Developer
Posts: 1062
Joined: Tue Jun 25, 2013 3:56 pm

Re: Delete movies from USB/Network drives

Post 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 :)

sectroyer2
Posts: 15
Joined: Wed Nov 13, 2013 7:07 pm

Re: Delete movies from USB/Network drives

Post 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 :)

sectroyer2
Posts: 15
Joined: Wed Nov 13, 2013 7:07 pm

Re: Delete movies from USB/Network drives

Post 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},

User avatar
juusso
SamyGO Moderator
Posts: 10125
Joined: Sun Mar 07, 2010 6:20 pm

Re: Delete movies from USB/Network drives

Post 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?
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

sectroyer2
Posts: 15
Joined: Wed Nov 13, 2013 7:07 pm

Re: Delete movies from USB/Network drives

Post 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:)

Post Reply

Return to “[E] Brainstorm”