Turn a Android Phone with broken screen into dedicated Web server I have a Nexus 4 with a broken LCD/Digitizer, I have no control via touch at all. The other parts of the phone are functional.
Now, what I want to do and hope is possible is to clear the phone and install some Linux distro via Usb. The trick is, I need to be able to control the installation via wifi or USB directly after the upload of the Linux package. After this I want to run it as a dedicated Web server of some sort. I welcome any type of solutions. All I want in the end is to use my phone as a dedicated Web Server which I can control remotely.

Thanks.
Welcome to the Android Enthusiasts, Majk! We support end-users with Android-specific issues, but cannot help you setting up a Linux server on a device, though it was running Android before. Still, some helpful hints:


There are means to control your device even with a broken screen. We've got several issues reported where people wanted to do exactly that. Please check e.g.:


My screen got broken, how to see on the computer what I'm doing in my device?
Control Android with broken screen from PC
Use android phone with broken screen as WiFi camera
Broken Screen + Using adb shell to run vnc server

There are several web server apps available for Android as well. Even some supporting/including things like PHP and MySQL. Some examples:


AndroPHP
Ulti Server: PHP, MySQL, PMA
KSWEB: server + PHP + MySQL
NAMP nginx android web server



I guess that should get you started if you want to solve your issue using Android. And as I initially wrote: Doing that with any other OS, even on an "Android device", is beyond the scope of this site. But I would wonder if you will really need that, after these details – right? :)