Root access is required (see exception at the bottom). Alternatively, for rooted devices, terminal app like Terminal Emulator for Android can be used. For this answer, you would need ADB setup in your machine, USB debugging enabled in the device and connected to PC. The following solution is tested on COS12 (Android 5.0.2) and Carbon ROM (Android 5.1.1).