Wild camping is oficially forbidden in Mallorca, however, it's fine if you do it secretly and don't leave any trace. You can find a spot for camping along most of the trek. Another option is to use the mountain huts.