بِكُلِّ فَنٍّ وَبِكُلِّ مَقْصِدٍ بِالْجِدِّ إِنْ أَجْدَى وَإِلَّا بِالدَّدِ
By every skill and every approach: with earnest effort if it succeeds, otherwise through play and diversion.
Fann is an approach or skill; maqṣid an aim or route; jidd earnestness; dad amusement or playful activity. The verse depicts Abū Zayd’s flexibility in inventing ways to survive.