There are definitely some instances where breaking the law is justified. For example, getting someone or something out of danger, like a kid or an animal, is worth breaking and entering. For the ends to justify the means, the result has to be something that is legitimately helpful and morally right to outweigh the law breaking.
I think it truly does depend on what it is and if it justifies the means. If you have to steal medicine to help your dying child, then I think the stealing might be okay. If you are stealing from people just to make your life better and have more money, then it's not okay.
To say that you can do anything just because your desired ends are seemingly noble is a cop out. If you have to go by ignoble means to accomplish something noble, you rob your end state of credibility.
It also reflects a lack of imagination, and begs the question of whether the person understands the root cause of the problem they are trying to solve.
As an example, there is a lot of push for social justice these days. They feel that their ends justify the means. Pressuring and shaming people for speaking out against the problems with Islam is done because not all Islamic people buy into the bad parts. But they dehumanize people with legitimate concerns, and open us up to even more issues with how they go about it.
The same applies to the approach with many social problems, such as domestic violence. The end goal is to reduce violence against women, but they instate policy such as the predominant aggressor that approaches domestic violence as default perpetrated by men. This throws innocent until proven guilty out the window, potentially jails the victim, and insulates abusers from the law in that same regard. It also dehumanizes men as a group. These are horrible things. The ends do not justify the means.
I'm not a big fan of clichéd sayings, especially ones like this, because they are too broad and way too abstract. When it comes to a specific end, sometimes the means can be justified when breaking the law, sometimes they can't. But there are usually more legal ways to go about things.
No, the ends do not truly justify the means, even when it means breaking the law, because people who use that phrase only know that they are about to hurt or be unfair to someone else in order to get what they want. People justify all manners of illness and lawlessness by saying that it's for the greater good.