IGPenguin / mobile-toolkit

📱 Terminal tool for Android & iOS device management
MIT License
356 stars 43 forks source link

ifillstorage - fill and clean device storage #197

Open IGPenguin opened 4 years ago

IGPenguin commented 4 years ago

🌈 Desired state

Create big file and push it into the device (preferably using terminal only) to fill system storage for edge case testing, when the app under test has offline mode etc.

📏 Challenges

It might not be possible to push files using USB connection to iOS.

📂 Sources

Create big dummy file https://stackoverflow.com/questions/13518016/how-to-simulate-an-out-of-disk-space-condition-on-ios-devices/13518195

Fill up your device via iTunes, you can create a large dummy file in your Mac's terminal using this command.
This will create a file that is 1 gigabyte large. You can then transfer this file via iTunes to fill up the space as quick as possible.

mkfile -n 1g ~/Desktop/LargeDummyFile.

Push it into the device storage ifuse -h https://github.com/posixninja/libirecovery-2.0 http://appium.io/docs/en/commands/device/files/push-file/