[MultiROM] Debian for the Moto G

Search This thread

Top Liked Posts

  • There are no posts matching your filters.
  • 29
    After a lot of work, I've been able to create a functioning MultiROM installer for a GNU/Linux distribution. Currently most things, such as WiFi, bluetooth, the display or the GSM modem, don't work. The only way to interface with the ROM while it's running is by connecting the phone to a computer, and then using ssh. My goal is getting all the phone-specific things working (WiFi first), and making GNU/Linux a viable primary OS for the Moto G.

    Why GNU/Linux, when Android is already Linux-based?

    While it is true that what is possible with GNU/Linux is also possible with Android with a little bit of work, I don't like that Android is, at heart, an embedded system. This has some negative implications for hackers (not crackers) that would like to use it as a normal UNIX. For example, the whole system is treated as one big blob and many things can't be changed without recompiling., which is why there are so many ROMs available, and why they are not compatible between devices.

    Guide

    Install the debian.mrom file as a normal MultiROM ROM via TWRP and select the ROM at bootup. Connect a USB cable from your computer to the phone. After around a minute, a new interface should appear on your computer (usb0 for most Linux distros, enp* for those using udev's "persistent" naming). Set its IP address to 10.0.10.1/24. Optionally, you can also set up internet access on that interface. The phone's IP address is 10.0.10.2. You can also use my script to setup the network (setup_net.sh) after changing wlp2s0 to your computer's internet-facing interface. You can then connect to the phone via SSH or a netcat shell on port 2323. The root password is root.

    What I've learned about WiFi

    The WiFi setup procedure is complicated. First, the wcnss compound driver needs to be activated. Android does this by running wcnss_service, whose modified version (I basically just altered the paths and replaced Android logging with printf) I've included in the ROM (/sbin/wcnss_service). Wcnss_service does many things, but the only important one (AFAIK) is open()ing /dev/wcnss_wlan. After activating wcnss, the WiFi driver needs to be activated. Recent versions of Cyanogenmod have the driver built-in and activate it via WifiHAL (I have no idea how...), I've decided to instead build the driver as a kernel module (/wlan.ko). Insmoding the LKM does something, but the initialization fails, and I don't know why.

    Dowloads
    debian.mrom
    setup_net.sh
    The kernel is Optimus kernel by Flashhhh with a custom config
    .

    XDA:DevDB Information
    Debian for the Moto G, ROM for the Moto G

    Contributors
    dvdkon
    ROM OS Version: 5.1.x Lollipop
    ROM Kernel: Linux 3.4.x
    Based On: Debian

    Version Information
    Status: Testing

    Created 2015-08-21
    Last Updated 2015-08-29
    3
    Something new??

    Enviado desde mi Moto G mediante Tapatalk

    i have wifi running. next step is framebuffer.
    2
    The display work? The touch? A is for computer in a smartphone? Wow
    Nothing but USB works as of now, but I'm currently working on the display.
    1
    Can you consider mirroring it to androidfilehost??
    Is that Ubuntu touch ???
    Please give us more explanations and screenshots... Consider a video too :)

    If I understand is a complete pc system , not a touch optimize system.Very useful for numerical computation, testing or something of similar.

    The Ubuntu touch forum is this http://xdaforums.com/moto-g/development/ubuntu-touch-utopic-ubuntu-touch-falcon-t2820359

    I don't now if it is working on MultiRom.
    (Sorry for my bad english)
    1
    Is it using a LXC Container ?

    No, I'm just starting Debian instead of Android with my custom init script.

    Where could I find kernel sources :) ?

    I'm using the Optimus kernel with a few options changed (the config).