Android memory stuck Once my phone froze and reboot by itself and then I notice all apps and every change i made went back in time :D. After few tries and reboots i decided to wipe all data it gave me this error:

-- mkdir /data/app/ fail. err is -1


I tried everything, even recording clean image by HDDRawCopy but it still goes back to this one state. I have no idea what I can do and what kind of magic is this. Do you know how to fix it or even what is it?
mkdir is a command that is intended to create a directory. The /data/app/ folder is an integral part of your android OS which practically stores all of your apps data. The fact that this command failed likely means your partition wasn't formatted appropriately as such the OS doesn't have permission to write to it. The only solution I'd advice is performing a factory reset/wipe data from recovery menu.Most android devices recovery menu are accessible through the following method


press the VOLUME UP + HOME + POWER buttons all the same time and
HOLD THEM DOWN
release only the POWER button when the device vibrates
release the other buttons when the ANDROID SYSTEM RECOVERY screen
appears
using the VOLUME DOWN / UP buttons to navigate, select WIPE CACHE
PARTITION
Then navigate to the wipe data/factory reset

For more information on different android partitions read here