Shaykh Zayd Bin Muhammad Al-Madkhalee was asked:

Question:

Can [a person] enter the washroom with a cellphone which has the entire Quran recorded on it, either written or audio?

Answer:

“[As for] that which is in the cellphone, [which] it is necessary for him to enter [the washroom] with it, there is no blame on him, except if you find a brother who can guard it for you outside the place of relieving oneself, then do so. [This is] for everything that has the remembrance of Allah whether through this means or other than it.”

Translated by

Faisal Ibn Abdul Qaadir Ibn Hassan
Abu Sulaymaan