A phone thief viciously attacked a man in his own home during a “blackhole in his memory”, a court has heard