Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
Not open for further replies.

xxPatangTangxx

macrumors newbie
Dec 26, 2012
1
0
So I'm not really good at this whole terminal and coding stuff but I tried to use my knowledge of what you guys posted here BUT i can't figure it out... I'm on 10.8.2. Can someone give me some steps on how to do it...I hate looking at this ugly grey dock...

thanks :)
 

unsanity77

macrumors member
Original poster
Nov 22, 2012
67
0
Copy dockmod to your desktop.
Open Terminal.app.
In Terminal, type the following (or copy and paste from here):
Code:
sudo ~/Desktop/dockmod -c black
 

Life,Death,Tech

macrumors newbie
Jul 19, 2010
7
0
Thanks for making this program! It looks fantastic and was way easier to use than I thought it would be. Still debating whether I prefer reflections on or off.
 

Attachments

  • Dock.png
    Dock.png
    196.4 KB · Views: 401

TheAngryPenguin

macrumors member
Oct 1, 2012
39
0
Thanks for making this program! It looks fantastic and was way easier to use than I thought it would be. Still debating whether I prefer reflections on or off.
I'm actually digging the reflections with the black Dock:

ML-Dock2.png


(Indicators are sourced from here, and as I mentioned over here, they seem to overlap my MBP's bezel, which is really nice...)
 

76ShovelHead

macrumors 6502a
May 30, 2010
527
32
Florida
Here's something I came up with to help those who absolutely have to have a black dock. Since Apple moved from image files to CoreGraphics rendering code, the only way to customize the color of the dock is to modify the code.

It can be quite complex as it involves some hacking of the OS, but as I wanted a black dock bad enough to do this, I figured there may be others.




Automatic Method UPDATED:

Coded a program that should handle it for you without the need for any extra tools or files. It performs a static decryption on the file and removes an integral part of the code signature to bypass the signing process rather than fake codesigning the binary as I did in previous versions.

Consider this BETA software, and post if you have problems, and I will try to improve it.
Code:
usage:
    dockmod -c <color> -r

    -c, --color            color to make the dock ('default' or 'black')
    -r, --noreflections    disable icon reflections

Keep in mind, again, this will only work for 10.8.2 so far, and will have to be updated for future versions.

use it like this:
Code:
sudo dockmod -c black -r

The color options are "black" and "default" for the -c option, and the -r option will disable icon reflections.

This is what it looks like:

Love it! Thanks :D
 

1920s

macrumors newbie
Jan 5, 2013
2
0
Dear unsanity77,

I'm sorry to bother you with this, but I was wondering is there any way to make the dock display a wooden pattern?

Like for example:
161ygm0.png


Any info would be greatly appreciated!

Have a lovely day!
Michelle
 

unsanity77

macrumors member
Original poster
Nov 22, 2012
67
0
Michelle, unfortunately there is not a way to have it display a pattern.

The reason for this is because what I have done is simply zero out the color value. In machine code, there is an instruction (command) that moves a floating-point value into a floating-point register in the cpu. This floating-point value is a value between zero and one with zero being black and one being white, and decimal values in between would be a shade of gray (light grays being closer to one and dark grays being closer to zero). My program simply overwrites the instruction that moves the gray value into this register with an instruction that zeroes out the register instead, therefore making it zero (black). Using this simple method there is no way to make it any other color other than gray (because the code for that does not exist already in the program) but I also cannot even make it any other color than black because the length of the instruction to do that would be longer than the instruction that is already there and would overwrite code that we needed still.

TL;DR
Because we are patching the binary we have a lot of limitations in what we can do, and so all we can do is make it black like I have done.
 

commodore-64

macrumors newbie
Jan 5, 2013
2
0
Please Post the Original Patch Scripts

Hi unsanity:

I'd like to see your original patch scripts instead of the automatic patcher. The thing is that I'd like to learn how to patch the dock binary myself to get it to do something else (custom minimize behavior).

I don't know what is involved in patching an apple encrypted binary. I have tried reading the Dock binary with hopperapp and getting it to output the file unmodified using "Produce New Executable" menu option, but it ends up generating a broken Dock binary. If I replace the original Dock binary with the regenerated one, the Dock does not start.

I have also tried replacing the Dock binary with the output from the deprotect program, but the program generates a few warnings when it runs, so I am not comfortable using its output.

I am not sure if one has to re-encypt the binary after decrypting it. I don't understand why that would be necessary.
 

unsanity77

macrumors member
Original poster
Nov 22, 2012
67
0
The original patch scripts still used a program that I wrote, except that program just attached to the Dock process and dumped the decrypted code from memory. You can do this manually by using vmmap to find the __text section and then using gdb to dump that address by using the dump binary memory command.

In dockmod, I just use the key that I reversed and calls to BF_cbc_encrypt.
 

BoubakAy

macrumors newbie
Jan 7, 2013
1
0
How to use it?

Hi everybody, I'm new to this forum ;)
Maybe it's stupid, but I don't know how use your dockmod progrm at all ^^'
When I open it in Terminal, there's nothing happen...
TIA

EDIT : Sorry, I just saw the post which explain this perfectly... It's ok, and congratulations for this little program ;)
 
Last edited:

commodore-64

macrumors newbie
Jan 5, 2013
2
0
How did you avoid code signing?

As it turns out, if I modify the Dock myself using my own patches, then the Dock refuses to start again. I get constant crashes with the following:

Exception Type: EXC_CRASH (Code Signature Invalid)

To avoid this, I have to create a self-signed certificate and code-sign the Dock binary myself. This procedure is mentioned here:

http://forums.macnn.com/79/developer-center/355720/how-re-sign-apples-applications-once/

If I don't do this, then the Dock won't start.

I noticed that your dockmod program solves this problem by unsigning the Dock binary. How does one unsign a code-signed binary without having to resign it (like I had to do)?

Indigo:MacOS commodore_c64$ codesign -d Dock
Dock: code object is not signed at all
Indigo:MacOS commodore_c64$ codesign -d Dock.orig
Dock.orig: invalid signature (code or signature have been modified)
Indigo:MacOS commodore_c64$
 

urbantea

macrumors regular
Jun 12, 2012
141
6
OKay, I cant' get this to work. I downloaded your dock program. Ran it and it takes me to this screen

usage:
dockmod -c <color> -r

-c, --color color to make the dock ('default' or 'black')
-r, --noreflections disable icon reflections


and thats it

I exit the thing and thats it. Nothing happens to my dock, it's not black.

Am I supposed to do something at those screens? It wont let me type anything. I can't press "c" or anything. Now what???

----------

and when you said this

use it like this:
Code:

sudo dockmod -c black -r

sudo dockmod -c default -r

just drop the -r if you want the icon reflections.

The color options are "black" and "default" for the -c option, and the -r option will disable icon reflections.


Where do I do that? Where do I type/post this stuff?? In terminal? I did that, nothing happens...

----------

nvemrind, go tit. haha
 

unsanity77

macrumors member
Original poster
Nov 22, 2012
67
0
I noticed that your dockmod program solves this problem by unsigning the Dock binary. How does one unsign a code-signed binary without having to resign it (like I had to do)?

Think about it. When a binary gets codesigned, what does that mean? How does the OS tell the difference between a signed and an unsigned binary? Well, there's metadata in the mach-o file, information that codesign adds to the binary. All I do is remove some of this information. Specifically, I remove the LC_CODE_SIGNATURE load command, and then fix up the mach header.
 

deepsilver

macrumors newbie
Oct 16, 2011
1
0
new york
Hello guys I have one question. How do I make my dock look like this? My dock currently looks like this but it is not permanent. I dont know how it happened. When I restart my mb it disappears. Is there anyway to set this dock as default?
Thanks in advance!
 

Attachments

  • 66065217.jpg
    66065217.jpg
    66.1 KB · Views: 304
Last edited:

cubbie5150

macrumors 6502a
Mar 4, 2007
705
216
Thanks for making this mod very easy to implement for idiots like me, very much appreciated!
 

Omek

macrumors regular
Jun 6, 2003
145
9
Thank you!

Thank you so much for making this! I just upgraded and was blinded by that light-grey dock. And none of my customizing apps worked. Apple should really just implement a black dock feature. Not everyone wants that bright dock.
 

M0esmac

macrumors 6502a
Apr 25, 2012
749
28
UK
I sorry if I missed it, I downloaded program from first post and it doesn't work. Once I opened it with terminal it showed as [Process Complete], dock didn't change. Do I have to restart or something? I tried killall Dock, but didn't work.

Thanks
 

Dafnos3

macrumors newbie
Aug 23, 2012
10
0
NYC
Here's a screen shot of my dock. I think it looks pretty good!! :D
 

Attachments

  • My Dock.png
    My Dock.png
    147.8 KB · Views: 284

denisvj

macrumors regular
Sep 9, 2006
165
15
I`m getting " sudo: dockmod: command not found " and don't know why.

I have the file in the right folder and running sudo inside the folder :confused:

ML 10.8.2

Update: Added ./ and worked !! ( sudo ./dockmod -c black )

Thanks for the mod !
 
Last edited:
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.