What do you think this means? "know how to be friendly with you"? Is this an idiom or a made-up expression?
mo33)Thereís a reason a dog is a manís best friend. Your puppy is always happy to see you. He doesnít care if you failed a math test―he jumps all over you and treats you like the best thing. So whatís going on here? Your dog never sat through a psychology lecture, but he automatically knows the way to your heart: to make you feel important and loved. Now imagine how well people would respond to you if ...
"Know how to be friendly with you" is unnatural.
"He knows the way to your heart" means "He knows how to get you to you love him."
In the case of your dog, you love him because he loves you absolutely.