Greetings, welcome to the forums.
Yikes, this looks bad. Plant leprosy? Plant syphilis? I'm not sure.
I'm not even certain the two plants have the same disease.
So the first shot is the Apricot (Prunus armeniaca), right? One possibility that comes to mind is Apricot Bacterial Canker, which is caused by one of many forms of bacteria lumped together as Pseudomonas syringae. however other bacterial, fungal, and water mold diseases could be responsible. A Phythopthora, such as P. ramorum is another possibility, though that doesn't usually affect Prunus so severely.
The second shot looks like a Mulberry, perhaps White Mulberry (Morus alba)? This spreading patch of discoloration that is completely destroying the tree's phloem is disturbing, like photo of all the flesh rotted away to the bone.
Pseudomona syringae is a possibility here as well, but wetwood/slime flux and other bacterial, fungal, and water mold infections are possible. Again I'm not sure.
Sometimes trees are able to seal off and compartmentalize such rots, and thus keep growing, but other times these rots will kill the tree. I would contact a local Agricultural Institution, either government or academic, and inquire more about this.