[App] libLogChannel B/D/E/F/H

Here are software that related with Samsung F series TVs.
Please don't create any new topic here unless you have software to post/release.

sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: [App] libLogChannel D/E/F/H

Post by sectroyer »

zoelechat wrote:For now I'm nearly beginner and I've absolutely no idea on how to develop for C nor Dmips (Dmips must not be too different, but AFAIK C is), and I'm not sure it will interest me one day, too outdated. :D
So, in state and since you already do a firmware/TV series check, I guess it means no real-time infos on C/Dmips :)
For D you can use same code just use D Mips headers :) For C it "all" should work but please first start by reading my C Hacking Tutorial :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [App] libLogChannel D/E/F/H

Post by zoelechat »

sectroyer wrote:For D you can use same code just use D Mips headers :) For C it "all" should work but please first start by reading my C Hacking Tutorial :)
Maybe one day, who knows... ;)
I do NOT receive any PM. Please use forum.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: [App] libLogChannel D/E/F/H

Post by juusso »

Compiled "as is" for B series. Got crash an empty file as result:

Code: Select all

# samyGOso -d -A -B -l /mtd_swu/libLogChannel.so
samyGOso v1.2.4 for B series(c) bugficks 2013, sectroyer 2014
Injecting '/mtd_swu/libLogChannel.so' resident: '0'
adding libc addr to found symaddress b63a0 + 4076f000 408253a0
mprotect: 0x408253a0
dlopen: 0x4060698c
dlclose: 0x40606b40
dlsymaddr: 0x40606b98
pc=405f3008 lr=405f5a44 sp=be9a4a18 fp=0
r0=fffffffc r1=0
r2=0 r3=0
stack: 0xbe990000-0xbe9a5000 length = 86016
executing injection code at 0xbe9a48e8
library injection completed!
Succeeded.
# cat /dtv/LogChannel.log
[LogChannel] SamyGO D/E/F/H libLogChannel v0.1.1 - (c) zoelechat 2015
[LogChannel] >>>
#

affected functions needed to be checked inside B series exeDSP...
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
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [App] libLogChannel D/E/F/H

Post by zoelechat »

juuso wrote:affected functions needed to be checked inside B series exeDSP...
You should comment "unlink(LOG_FILE);" (line 194) if you want to see if at least some of them are existing :)
I do NOT receive any PM. Please use forum.
geo650
Official SamyGO Developer
Posts: 303
Joined: Wed Oct 07, 2009 12:03 pm

Re: [App] libLogChannel D/E/F/H

Post by geo650 »

zoelechat wrote:
juuso wrote:affected functions needed to be checked inside B series exeDSP...
You should comment "unlink(LOG_FILE);" (line 194) if you want to see if at least some of them are existing :)
Hello! I know your lib is made for D/E/F/H models, but I also wanted to use your module on B-series TV. I cannot compile it at all (probably due to differences in toolchain), but this is not the problem. The problem is that I wanted to use directly exeDSP functions listed in your code to determine current channel number. And it doesn't work.
This is the code I wrote:

Code: Select all

#include <stdio.h>
#include <memory.h>

extern void * _ZN9TCChannelC2Ev(void *);
extern short _ZNK9TCChannel5MajorEv(void *);

#define CHANNEL_SIZE 0x20 //maximum size, actually only 16 bytes but just in case ;)

int Game_Main(const char  *path, const char *udn __attribute__ ((unused)))
{
   static unsigned int ChannelNum;
   unsigned char channel[CHANNEL_SIZE];
   char s[255];

   FILE *f; f=fopen("/mtd_ram/test.txt", "wt");

   memset(channel, 0, sizeof(channel));
   _ZN9TCChannelC2Ev(channel);                      // <---- here we call external function 1
   ChannelNum = _ZNK9TCChannel5MajorEv(channel);    // <---- here we call external function 2

   sprintf(s, "ChannelNum=%d", ChannelNum);
   fputs(s, f);
   fclose(f);

   return 0;
}
After compiling and linking to *.so file I call it on B650 TV and the result should be in "/mtd_ram/test.txt" file. But it probably crashes in-between (file is not created). If I delete calling _ZN9TCChannelC2Ev(channel), I get the file with "ChannelNum=0" (always). If I add third external _ZN9TCChannelD2Ev function, TV crashes and coredump is created. Have you an idea what should I do to make it working on B650 (CHL7DEUC) ?
Strange that other known exeDSP functions like _ZN4TCTv14PreferLanguageEv (get current language) work well this way.
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [App] libLogChannel D/E/F/H

Post by zoelechat »

Honestly, I've absolutely no idea of how B-series behaves, and without the help of existing tools done by more advanced developers than me, I wouldn't be able to do anything :) .
Are you sure that function names are the same? Especially the ones causing crash, if other "well-known" ones work.
Maybe TCChannel handling isn't done the same way, maybe different size, or whatever else...
I'd say what sectroyer always repeats to me: you have to check what TV does ;)
I do NOT receive any PM. Please use forum.
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: [App] libLogChannel D/E/F/H

Post by sectroyer »

Probably:

Code: Select all

 _ZN9TCChannelC2Ev
->

Code: Select all

 _ZN9TCChannelC1Ev
In the future:

Code: Select all

strings exeDSP | grep FUNCTION
:)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
geo650
Official SamyGO Developer
Posts: 303
Joined: Wed Oct 07, 2009 12:03 pm

Re: [App] libLogChannel D/E/F/H

Post by geo650 »

zoelechat wrote:...Are you sure that function names are the same? ...you have to check what TV does ;)
Absolutely. Of course, I am not sure. You're right. I want to know what TV does. Debug log (RS232C) doesn't provide enough data (no function names), so I am looking for a description how to "strace" exeDSP on B650. I was searchig this forum and Google and found many references to strace topic, but nothing for (linux-)dummies like me ;)
All I have got to know until now is that I need strace utility compiled for B650 (ARM CPU) and to call exeDSP using this tool.
sectroyer wrote:Probably:

Code: Select all

 _ZN9TCChannelC2Ev
->

Code: Select all

 _ZN9TCChannelC1Ev
In the future:

Code: Select all

strings exeDSP | grep FUNCTION
:)
_ZN9TCChannelC2Ev() returned nothing (zeros), but...
_ZN9TCChannelC1Ev() returned something (8 bytes of "random" data) in channel array, but it still cannot work when called next function to get channel number (still 0 or strange negative "random" number).
I don't want to do a mess on this forum topic due to it is on F Series section, so you don't need to answer here. If you could help me, please send me a PM or write it on B Series forum. When it is researched (i.e. functions calling method found), it will be possible to expand this lib to B series, too. Thanks.
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [App] libLogChannel D/E/F/H

Post by zoelechat »

And what about exeDSP reversing? Isn't it reliable on B? That's what I meant by "check what TV does" :)
I do NOT receive any PM. Please use forum.
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: [App] libLogChannel D/E/F/H

Post by sectroyer »

geo650 wrote: _ZN9TCChannelC1Ev() returned something (8 bytes of "random" data) in channel array, but it still cannot work when called next function to get channel number (still 0 or strange negative "random" number).
I don't want to do a mess on this forum topic due to it is on F Series section, so you don't need to answer here. If you could help me, please send me a PM or write it on B Series forum. When it is researched (i.e. functions calling method found), it will be possible to expand this lib to B series, too. Thanks.
Well it's expected :) You created channel and than checked what it's Major was and it's garbage. Now everything works :) Check "what TV does" :) Now problem is with your reversing skills nothing more. The code works as EXPECTED :) Good luck :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

Post Reply

Return to “[F] Software”