I have a hand-me-down LG 7 (I think it's a 7 -- I'm charging it so I can turn it back on), and I have never set it up to have a phone number; I use it exclusively via wifi. I know it's just a computer, so the answer is probably "yes," but given what I read while researching this real quick ("hackers just need your mobile number"), I wanted to confirm before freaking out.
I had my alarm set, and shortly before it would've gone off, the battery beeped low (15%) and just as I was checking that, the phone started acting weird. It kept pulling down the top screen thing, and then some other screens I don't usually open, and then it opened up an extra window, and wouldn't respond to button input. It started playing this song "If you've got nothing to hide, you've got nothing to fear -- if you've done nothing wrong, you shouldn't even be here" (I looked it up, it's "Integral" by The Pet Shop Boys), and when I tried to turn it off it wouldn't respond to button input to turn off or restart. I opened the back and took the battery out for a second, and now it's at 0% battery when I've plugged it in (how did it go from 15% to 0% almost instantly? weird).
I don't think I had that song anywhere loaded -- it's slightly familiar, but nothing I looked up recently -- and the lyrics make me think it was chosen for a ransomware thing or something, if indeed this is a hacking job, so....
I'm currently charging it, and will probably turn it back on and see what I can do with it before you guys get back to me, so I guess I'll have more info by the time I come back to this thread.
I have visited sites to download videos from YouTube -- the kind of sketchy sites that pop up new windows and try to pretend that if you leave you'll be hurting your computer, but I just close or back out of those tabs and get on with what I'm doing. (I have yet to find a site that provides that ability and is trustworthy. One of the wifi networks I'm on blocks YouTube but downloading from these sites gets around that; I figure the Betamax court case covers this, in principle.) Other than that, I don't think there's any sites I go to on the phone that are an obvious risk; I look things up, read fanfics, watch YouTube, play downloaded videos. And I haven't gone to those download sites in the past couple weeks, so there's no time correlation between visiting them and having this happen.
The other thing is, I had dropped it in the mud like a month ago, and that could account for some of the button-press problems; I've been having little problems since that point. The phone doesn't seem to be significantly water-damaged, and water didn't make it through to the water indicator (it's still white), and I let it dry out for a few days before even turning it on again. Sometimes it'll have problems like I'm pressing the wrong part of the screen, or things like that. I figured it was due to that, anyway, but until today nothing has acted like this, to this degree, at all.
Oh, and I have over a hundred tabs open in Chrome, in case the overall load is a problem.
Beyond the "is hacking a significant risk for a phone that doesn't even have a phone number?" question, I'd like to know what I should be doing to prevent hacking in the future.