FORUMS
Remove All Ads from XDA

Reclaim Logcat ("Silent" hexxed proprietary libs)

4,992 posts
Thanks Meter: 10,205
 
By broodplank1337, Inactive Recognized Developer on 1st April 2014, 04:02 PM
Post Reply Email Thread
The proprietary libs of Samsung / Qcom are really chatty, in fact way too chatty in my opinion.
I have edited 3 proprietary libs that were the most annoying. Method of replacing those lines with null:

1. strings 'binaryname'
2. copy string you want to remove
3. in hex editor (ghex, bless or wxd or so), control + f, search for string
4. replace with zeros
5. save


Should work on all s4 devices.


mpdecision (make poor decision) (/system/bin)
likes to spam unneeded up/down state changes, when phone is idle for example

What is hexed out:

- 6E 75 6D 20 6F 6E 6C 69 6E 65 20 63 6F 72 65 73 3A 20 25 64 20 72 65 71 64 20 3A 20 25 64 20 61 76 61 69 6C 61 62 6C 65 20 3A 20 25 64 20 72 71 5F 64 65 70 74 68 3A 25 66
- 6E 75 6D 20 6F 6E 6C 69 6E 65 20 63 6F 72 65 73 3A 20 25 64 20 72 65 71 64 20 3A 20 25 64 20 61 76 61 69 6C 61 62 6C 65 20 3A 20 25 64 20 72 71 5F 64 65 70 74 68 3A 25 66 20 68 6F 74 70 6C 75 67 5F 61 76 67 5F 6C 6F 61 64 5F 64 77 3A 20 25 64 0A 00 44 4F 57 4E 20 63 70 75 3A 25 64
- 55 50 20 63 70 75 3A 25 64 20 63 6F 72 65 5F 69 64 78 3A 25 64 20 4E 77 3A 25 66 20 54 77 3A 25 64 20 74 6F 74 61 6C 5F 74 69 6D 65 5F 75 70 3A 25 66
- 63 70 75 25 64 3A 20 63 6F 72 65 5F 69 64 78 3A 20 25 64 20 75 70 74 69 6D 65 3A 20 25 66 20 64 6F 77 6E 74 69 6D 65 20 25 66
- 63 70 75 25 64 3A 20 63 6F 72 65 5F 69 64 78 3A 20 25 64 20 4E 77 3A 20 25 66 2C 20 54 77 20 3A 25 64 2C 20 4E 73 3A 20 25 66 2C 20 54 73 3A 20 25 64 2C 20 75 74 69 6C 5F 68 69 67 68 5F 61 6E 64 3A 25 64
- 63 70 75 73 5F 75 70 3A 20 25 64 20 63 70 75 73 5F 64 6F 77 6E 3A 20 25 64 20 74 68 65 72 6D 61 6C 5F 6D 61 73 6B 3A 20 30 78 25 78
- 20 63 6F 72 65 5F 69 64 78 3A 25 64 20 4E 73 3A 25 66 20 54 73 3A 25 64 20 74 6F 74 61 6C 5F 74 69 6D 65 5F 64 6F 77 6E 3A 25 66 0A 00 75 74 69 6C 5F 6C 6F 77 5F 61 6E 64 3A 20 25 64 2C 20 75 74 69 6C 5F 6C 6F 77 5F 6F 72 3A 25 64 0A 00 55 50 20 63 70 75 3A 25 64 20 63 6F 72 65 5F 69 64 78 3A 25 64 20 4E 77 3A 25 66 20 54 77 3A 25 64 20 74 6F 74 61 6C 5F 74 69 6D 65 5F 75 70 3A 25 66 0A 00 75 74 69 6C 5F 68 69 67 68 5F 61 6E 64 3A 20 25 64 2C 20 75 74 69 6C 5F 68 69 67 68 5F 6F 72 3A 20 25 64

Code:
sed -i 's/0x6E756D206F6E6C696E6520636F7265733A2025642072657164203A20256420617661696C61626C65203A2025642072715F64657074683A2566//g' mpdecision
sed -i 's/0x6E756D206F6E6C696E6520636F7265733A2025642072657164203A20256420617661696C61626C65203A2025642072715F64657074683A256620686F74706C75675F6176675F6C6F61645F64773A2025640A00444F574E206370753A2564//g' mpdecision
sed -i 's/0x5550206370753A256420636F72655F6964783A2564204E773A25662054773A256420746F74616C5F74696D655F75703A2566//g' mpdecision
sed -i 's/0x63707525643A20636F72655F6964783A20256420757074696D653A20256620646F776E74696D65202566//g' mpdecision
sed -i 's/0x63707525643A20636F72655F6964783A202564204E773A2025662C205477203A25642C204E733A2025662C2054733A2025642C207574696C5F686967685F616E643A2564//g' mpdecision
sed -i 's/0x637075735F75703A20256420637075735F646F776E3A20256420746865726D616C5F6D61736B3A2030782578//g' mpdecision
sed -i 's/0x20636F72655F6964783A2564204E733A25662054733A256420746F74616C5F74696D655F646F776E3A25660A007574696C5F6C6F775F616E643A2025642C207574696C5F6C6F775F6F723A25640A005550206370753A256420636F72655F6964783A2564204E773A25662054773A256420746F74616C5F74696D655F75703A25660A007574696C5F686967685F616E643A2025642C207574696C5F686967685F6F723A202564//g' mpdecision


thermal-engine (/system/bin)
Likes to spam actions taken on cpu freq. problem is that it claims way to much space in log. so I removed those particular messages

What is hexxed out:

- 54 4D 20 49 64 20 27 25 73 27 20 53 65 6E 73 6F 72 20 27 25 73 27 20 2D 20 61 6C 61 72 6D 20 72 61 69 73 65 64 20 25 64 20 61 74 20 25 64 2E 25 64 20 64 65 67 43
- 54 4D 20 49 64 20 27 25 73 27 20 53 65 6E 73 6F 72 20 27 25 73 27 20 2D 20 61 6C 61 72 6D 20 63 6C 65 61 72 65 64 20 25 64 20 61 74 20 25 64 2E 25 64 20 64 65 67 43
- 41 43 54 49 4F 4E 3A 20 43 50 55 20 2D 20 53 65 74 74 69 6E 67 20 43 50 55 5B 25 64 5D 20 74 6F 20 25 64

Code:
sed -i 's/0x544D20496420272573272053656E736F722027257327202D20616C61726D207261697365642025642061742025642E25642064656743//g' thermal-engine
sed -i 's/0x544D20496420272573272053656E736F722027257327202D20616C61726D20636C65617265642025642061742025642E25642064656743//g' thermal-engine
sed -i 's/0x414354494F4E3A20435055202D2053657474696E67204350555B25645D20746F202564//g' thermal-engine



sensors.msm8960.so (/system/lib/hw)
likes to say 'mCompEngine is NULL' very often for no reason. it spams non stop

Dont have the actual hexadecimal code that I removed on this one


Try running antutu benchmark before and after, the result is amazing
The Following 9 Users Say Thank You to broodplank1337 For This Useful Post: [ View ] Gift broodplank1337 Ad-Free
 
 
2nd April 2014, 11:23 PM |#2  
CNexus's Avatar
Senior Member
Flag ~/android
Thanks Meter: 14,053
 
Donate to Me
More
Very nice

Also, I'm fairly sure this could be applied to all devices not just jflte variants

Of course the msm8960 would change to $BOARD_TYPE but yeah
The Following User Says Thank You to CNexus For This Useful Post: [ View ] Gift CNexus Ad-Free
3rd April 2014, 12:52 AM |#3  
broodplank1337's Avatar
OP Inactive Recognized Developer
Flag Nijmegen
Thanks Meter: 10,205
 
Donate to Me
More
Quote:
Originally Posted by CNexus

Very nice

Also, I'm fairly sure this could be applied to all devices not just jflte variants

Of course the msm8960 would change to $BOARD_TYPE but yeah

Thank you and that would be great. I currently run them in my rom and when you do a lot of logcat reading this really pleases your eyes / brain hehe.
3rd April 2014, 12:54 AM |#4  
CNexus's Avatar
Senior Member
Flag ~/android
Thanks Meter: 14,053
 
Donate to Me
More
Quote:
Originally Posted by broodplank1337

Thank you and that would be great. I currently run them in my rom and when you do a lot of logcat reading this really pleases your eyes / brain hehe.

Haha yeah I know what you mean, I'm porting stuff all the time so I'll definitely be doing this on my S3 libs and any others that like to spam junk into the log (surfaceflinger is another one that likes to spam)
The Following User Says Thank You to CNexus For This Useful Post: [ View ] Gift CNexus Ad-Free
3rd April 2014, 12:55 AM |#5  
Maribou's Avatar
Senior Member
Flag Oklahoma City
Thanks Meter: 627
 
More
If I can ever finish up with work I'll try this out. It seems very interesting. Thank you.
The Following User Says Thank You to Maribou For This Useful Post: [ View ] Gift Maribou Ad-Free
3rd April 2014, 01:32 AM |#6  
broodplank1337's Avatar
OP Inactive Recognized Developer
Flag Nijmegen
Thanks Meter: 10,205
 
Donate to Me
More
Quote:
Originally Posted by CNexus

Haha yeah I know what you mean, I'm porting stuff all the time so I'll definitely be doing this on my S3 libs and any others that like to spam junk into the log (surfaceflinger is another one that likes to spam)

Ok thats nice When something is closed source you have to deal with it the low level way i guess.
Luckily it's really easy to hex out strings safely when using the strings command and copying the exact string (if you still make a mistake which can happen pretty easily you will notice it very fast, namely that the file will not run)

if you shush all libs/binaries logcat will be a ghosttown in logcat terms

Quote:
Originally Posted by Maribou

If I can ever finish up with work I'll try this out. It seems very interesting. Thank you.

Ok cool, let me know if you succeeded if you want to do it


edit: added sed replacement commands, will make a prorietary lib cleaner very soon ^^ so everyone can easily silence them
15th April 2014, 09:35 AM |#7  
broodplank1337's Avatar
OP Inactive Recognized Developer
Flag Nijmegen
Thanks Meter: 10,205
 
Donate to Me
More
Have been working on a proprietary libs cleaner, and it worked out pretty sweet. I have made it that users can add their own templates easily.

It works like this:

Main Script: PLC > has 3 subscripts called, database, patcher and picker.

Template system: Place file where it normally would be on your phone, for example, 3 binaries are added in there, one of them is mpdecision, which is placed in corresponding dir like on phone, unhide it to see whats inside, just all strings that need to be removed. line by line

rootdir/dbs/system/bin/mpdecision
num online cores: %d reqd : %d available : %d rq_depth:%f
num online cores: %d reqd : %d available : %d rq_depth:%f hotplug_avg_load_dw: %d
UP cpu:%d core_idx:%d Nw:%f Tw:%d total_time_up:%f
DOWN cpu:%d core_idx:%d Ns:%f Ts:%d total_time_down:%f
cpu%d: core_idx: %d uptime: %f downtime %f
cpu%d: core_idx: %d Nw: %f, Tw :%d, Ns: %f, Ts: %d, util_high_and:%d
cpus_up: %d cpus_down: %d thermal_mask: 0x%x


screenshots:












Release 0.5: https://github.com/broodplank/ProprietaryLibCleaner

http://forum.xda-developers.com/show....php?t=2718884
The Following User Says Thank You to broodplank1337 For This Useful Post: [ View ] Gift broodplank1337 Ad-Free
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes