GNU/Linux@N80XX

Search This thread

X-Stranger

Senior Member
Sep 2, 2008
164
204
Can this be installed in place of Android.

I wish to get rid of Android OS altogether.

If it can, what simple (simple being key) instruction to install Linux as only OS can you provide?

Would it be the same as replacing any other ROM?

It is possible, but not the same as replacing any other ROM. Generally you need to write boot image not istead of recovery, but instead of normal boot, then erase Android files and keep only Linux. For example, system partition might become root filesystem, and data partition mounted as home folder. I would also keep other Android partitions, but you can re-use them for other needs, like cache partition might be used as boot or something else. But please do not touch EFS, boot and recovery (and a few others I think). Something like this...
 

seniorivn

Member
Jun 12, 2014
8
0
new image


could you give your new image?
I have the problem with update arch from image from opensgn, after update i can't turn on. Error:"c1 systemd[1]: Failed to mount cgroup at /sys/fs/cgroup/systemd: No such file or directory". I don't know what does it mean. So, publish the image, please.
 
M

moonbutt74

Guest
hey

It is possible, but not the same as replacing any other ROM. Generally you need to write boot image not istead of recovery, but instead of normal boot, then erase Android files and keep only Linux. For example, system partition might become root filesystem, and data partition mounted as home folder. I would also keep other Android partitions, but you can re-use them for other needs, like cache partition might be used as boot or something else. But please do not touch EFS, boot and recovery (and a few others I think). Something like this...

hi,
i am coming from a different device gt-p5210 x86 but for what i'm asking the approach if feasible, should be universal.
so the question is, the kernel is linux, and by way of firmware/hardware already golden, so how do we sugically remove the
android userspace and reconstruct the ramdrive desired/accustomed to setup and what would that look like?
i know i can slay zygote from init.rc but after that do i tie in some kind of chroot script or do i change focus to a different mmcblk
with a proper / setup where /system/bin & /system/lib are /bin & /lib etc. and soforth. with filesystem in userspace [fuse]
my userdata is already an ext4 partition.... i could go on for longer but you get the general idea i hope.
i would appreciate hearing your thoughts on this. thankyou.

m
 

X-Stranger

Senior Member
Sep 2, 2008
164
204
Well, Android kernel is Linux, but without some features. You need to disable some Android-features and enable back some Linux-features. Thus I suggest kernel re-compilation. The Android userspace also contains some proprietary libs and drivers to have 3G working for example, so removing Android userspace or stopping some of his services might cause the necessity to enable those things in recompiled kernel - that is the second reason for this.

Of course you can keep Android things working aside, stop their GUI, chroot to your native userspace and do whatever you want. But this won't be really native Linux. I have seen this idea implemented for Nook Color device (which I owned a 2 years ago).
 
M

moonbutt74

Guest
thanks

Well, Android kernel is Linux, but without some features. You need to disable some Android-features and enable back some Linux-features. Thus I suggest kernel re-compilation. The Android userspace also contains some proprietary libs and drivers to have 3G working for example, so removing Android userspace or stopping some of his services might cause the necessity to enable those things in recompiled kernel - that is the second reason for this.

Of course you can keep Android things working aside, stop their GUI, chroot to your native userspace and do whatever you want. But this won't be really native Linux. I have seen this idea implemented for Nook Color device (which I owned a 2 years ago).

X,
thank you for your response,
my delimma is a lack of hardware and know-how with respect to kernel building/compiling etc.
my thought was to hex the bootloader to change the android cos default flag - couldn't find enough info so no go.
so my next thought was what i asked you about so that seems like a no go as well.
being an x86 device i had hoped for too much apparently. guess i'm stuck with android. [sigh]
you're on the mark about something linux-ish being less than desireable.
i guess i'll use a screenshot of openbox on my desktop as consolation. :D

thanks again

m
 

nando88

Member
Nov 24, 2014
12
0
Wifi does not work

I am connected to wifi through my laptop, and I'm using the same password in arch linux in my tablet, but I can't connect. Please tell me how to fix this.
Thanks in advance!
 

o1bloody1o

Member
Jul 14, 2013
21
18
Galati
Quick question: after you've replaced stock recovery, do official updates work? (the ones you can check for from settings->about)

Actually I've done almost the same thing, but a bit different: using LinuxDeploy I've got installed ArchLinux to disk image file, then configured the things including Xorg + fbdev-driver for screen + evdev-driver for S-pen and hardware buttons + wacom-driver for touchscreen. Then you just need to start Linux from LinuxDeploy, run Xorg session and stop media/zygote from ADB and - voila! - you get working chroot-ed linux environment with native screen support without any VNC nightmares. When you need your Android env back - just start zygote/media via ADB and stop xserver.

The only problem that touchscreen (Wacom w8008 based on Atmel mXT1664S) does not work by default, because stock kernel does not provide correct ABS axis values for it, so I did a little dirty hack to xf86-input-wacom code to set xmax=1280 and ymax=800, then it has started to work, but is still not completely correct (precision and sensivity looks badly - probably there are some others things to be set correctly).

For sure topicstarter's method looks better, however I'm still worried about official updates... But anyway I would like at least to test dualboot method.
How did you set the axis? Can you explain how you did that?
 

Danny Hefer

New member
Feb 16, 2015
2
0
Bluetooth is almost the same: we must load firmware file. But also a bit tricky: it does not work properly due to some problems with memory management, so we should use "valgrind" utility to make it running (please install it and "bluez" packages if you don't have it yet). The next thing - we need to get your bluetooth address file:
Code:
mount /dev/mmcblk0p3 /srv
cp -f /srv/bluetooth/bt_addr /opt/bluez/
umount /srv
Next run this:
Code:
nohup /opt/bluez/brcm_patchram_plus --bd_addr `cat /opt/bluez/bt_addr` --enable_hci --enable_lpm --no2bytes --tosleep 50000 --baudrate 4000000 --use_baudrate_for_download --patchram /opt/bluez/bcm4334.hcd --i2s=1,0,0,0 /dev/ttySAC0 >/dev/null 2>&1 &
nohup /usr/bin/valgrind /usr/sbin/bluetoothd --noplugin=mgmr >/dev/null 2>&1 &
This will load firmware with special settings and bring up bluetooth daemon via valgrind with "mgmr" module disabled. Those lines can be also added to /etc/rc.local (but for some reason it does not work for me from here, so every time I need to run in manually when want to use bluetooth). Now you can pair your wireless keyboard and mouse using "bluez-simple-agent" utility for example.

As for me, WiFi works stable, but bluetooth is buggy, and sometimes gave me kernel panic on system reboot. Probably this can be fixed with some kernel patches - feel free to post any if you are the expert in this ;)

Hi!

I know it's kind of an old thread, but I'm a bit desperate when it comes to bluetooth. I've installed Linux Deploy on my Galaxy Note 8, and everything works really well in chrooted + framebuffer modes... except the bluetooth.
When I launch my distro (Wheezy) in frame buffer mode, I have to stop the Android UI. Everything is okay for something like 2 minutes but then Bluetooth drops and I can't use my mouse/keyboard anymore.

I've tried your method for force loading the firmware, but Debian still won't see my adapter. I'm quite the noob... do you have some pointers I could use? Thanks a lot!
 

ricks1

New member
Apr 28, 2018
2
0
Arch on a Motorola moto g2

Is there any way to port this installation to the motorola moto g2?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 24
    I'm successfull running Debian GNU/Linux on my SGN 10.1 with "dualboot" (my kernel and debian initrd in recovery partitions). It's very easy and nice to use.

    look at demo video

    currently don't work: GPU (hardkernel can release exynos Xorg drivers for Odroid project, DRI work in progress), MFC (hardware encoder/decoder), cameras (work in progress), gps (work in progress), modem (work in progress).

    and it's nice work with my laser printer via cups ;)

    ---

    Linux Kernel source code and other stuff http://code.google.com/p/opensgn
    11
    How To install Linux to N80XX

    Okay, below is my successfull story, which is still going on.

    So, as the prerequisite you need to have Samsung Galaxy Note 10.1 rooted. You can do this anyhow described on the forum, I've used "Exynos Abuse" utility for that purpose.


    The first step that I've done - got chrooted Linux distribution. The easyest wat is to install "Linux Deploy" program from Google Play, then select options you like. I've choosen the next:
    • distribution: ArchLinux (there are also Ubuntu, Debian, and a few more in the latest version)
    • version: latest
    • architecture: armv7h
    • mirror address: http://de.mirror.archlinuxarm.org
    • installation type: image file (this is important, because I wanted to later boot Linux using loopback device)
    • destination path: /sdcard/arch.img (internal emmc "sdcard")
    • image size: 4096 (in Mb, e.g. 4Gb - better this size, because later you might want to move it to your real sdcard)
    • filesystem: ext4
    • username: stranger
    • DNS-server: automatic detection
    • locale: en_US.UTF-8
    • desktop environment: LXDE (works fast when you don't have 3D acceleration or work via VNC)
    • install GUI: yes
    • SSH: yes
    • VNC: yes (no, if you don't want to work with your chrooted environment via VNC client)
    • other options: you might select as you like. Later I've added run of shell script, which was configuring a few things very useful for my chrooted Linux
    As soon as you done with settings, get back and press "Download" button, then wait until downloading, installing, configuring is done. Voila! Now you can press "Play" button and work with your favorite distribution right from Android, or connect to it remotely from desktop. Just use proper VNC/SSH client. I was using VNC Viewer for VNC and ConnectBot for SSH.


    All right, all this looks good, but how to get dualboot and run Linux natively? As you know, our device already has dual boot: regular Android and recovery. We'll just replace recovery with our Linux kernel (zImage) and initramfs (initrd.img), so they'll boot our Linux. For sure we can use the native Android kernel, but if you want to get for example CIFS filesystem support and working touchscreen - you need to compile your own kernel. For that purpose we need:
    I've unpacked all this to /opt folder:
    • /opt/linux - unpacked kernel sources
    • /opt/platform_prebuilt-master - prebuilt toolchain
    You'll also need my kernel config and patch based on the config/patch ((fix for touchscreen and power button) provided by exception13 - I've just tuned it and added a few fixes for successfull compilation. Please find both files attached to this message. The file config.txt must be renamed to .config and moved to /opt/linux, n8000.patch must be applied to kernel sources (something like "cd /opt/linux && patch -s -p1 ../n8000.patch"). My kernel config uses the next kernel parameters: "root=/dev/loop0 ro rootfstype=ext4 rootwait quiet". E.g. it suggests to boot from loopback device, but you can change it to /dev/mmcblkXX, if you have already re-partitioned EMMC and installed Linux on separate partition (I'm have done this later). Any change to kernel config can be done using "make menuconfig" inside kernel sources folder. After you done, run this:
    Code:
    export ARCH=arm
    export SUBARCH=armv7h
    export CROSS_COMPILE=/opt/platform_prebuilt-master/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
    cd /opt/linux
    make -j2
    make modules_install
    After compilation is done, you can find brend new shining kernel image as /opt/linux/arch/arm/boot/zImage file, and modules in /lib/modules/3.0.31 folder. I've copied those files to my chrooted Linux using SCP (zImage to /boot and modules folder to /lib/modules), and all other things was doing here: started LinuxDeploy, pressed Play, logged in to Linux using SSH.

    So, we have kernel, modules, but still need to built initrd.img and replace original recovery with ours. First we need to get original recovery image, because we'll just update it and write back. By the second, we want to keep copy in safe place, just in case:
    Code:
    dd if=/dev/block/mmcblk0p6 of=/boot/recovery.img
    cp /boot/recovery.img /boot/recovery.img_orig
    Preparing initrd.img depends on distribution you are working with. My ArchLinux has mkinitcpio utility, but as soon as I want it to boot from loopback device I did a few tricks based on the next HowTo: http://felixc.at/ArchLinux-loopback (I just needed /lib/initcpio/hooks/looproot file and /lib/initcpio/install/looproot, fixed /etc/mkinitcpio.conf by adding looproot to HOOKS, and properly changed /etc/fstab). Please note that internal sdcard is not ntfs or vfat, it is ext4, so the file looproot should be a bit different, and there is no need to include ntfs-3g or fuse into initrd. Also the path to arch.img file is /media/arch.img on /dev/mmcblk0p12 partition, so the looproot hook will look like this:
    Code:
    # vim:set ft=sh:
    run_hook ()
    {
            # Now mount the host filesystem
            mkdir /host
            mount -t ext4 /dev/mmcblk0p12 /host -o defaults,noatime,acl,barrier=1,data=ordered
    
            # And the loop filesystem
            losetup /dev/loop0 /host/media/arch.img
            mount -t ext4 /host/media/arch.img /new_root -o defaults,noatime,acl,barrier=1,data=ordered
            mount --bind /host /new_root/mnt/sdcard
    }
    Then I've run:
    Code:
    cd /boot
    mkinitcpio -k 3.0.31 -g initrd.img
    Okay, right now a few other tricks :) Install abootimg utilities package (ArchLinux users can find them in AUR if I remember correcly). Then run "abootimg-unpack-initrd" in "/boot" folder, this will create "/boot/ramdisk" directory, go into it and edit "init" file commenting out ""$mount_handler" /new_root" line. Then run "abootimg-pack-initrd" in the same path and get initrd.img finally ready. To update recovery.img with our files and write it back to the system run:
    Code:
    cd /boot
    abootimg -u recovery.img -k zImage -r initrd.img
    dd if=/boot/recovery.img of=/dev/block/mmcblk0p6
    Well done! Now, we are almost ready to reboot.


    The last things: install Xorg + fbvev video driver + evdev input driver + some login manager ("lightdm" for example) + some onscreen keyboard (I would recommend "florence"). Configure login manager to autologin. Make /etc/X11/xorg.conf looking like this:
    Code:
    Section "ServerLayout"
        Identifier  "Layout0"
        Screen      "Screen0"
        InputDevice "Mouse0" "CorePointer"
        InputDevice "Keyboard0" "CoreKeyboard"
        InputDevice "Touchscreen0" "SendCoreEvents"
    EndSection
    
    Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "evdev"
        Option      "Device"        "/dev/input/event0"
    EndSection
    
    Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "evdev"
        Option      "Device"        "/dev/input/event6"
        Option      "ButtonMapping" "1 3 0"
    EndSection
    
    Section "InputDevice"
        Identifier  "Touchscreen0"
        Driver      "evdev"
        Option      "Device"        "/dev/input/event1"
        Option      "Calibration"   "0 4096 0 4096"
    EndSection
    
    Section "Device"
        Identifier  "Card0"
        Driver      "fbdev"
        Option      "fbdev"            "/dev/fb0"
        VendorName  "Unknown"
        BoardName   "Unknown"
    EndSection
    
    Section "Screen"
        Identifier  "Screen0"
        Device      "Card0"
        DefaultDepth        24
    EndSection
    
    Section "DRI"
        Mode 0666
    EndSection

    if all is okay, we can logout our chrooted system, press "pause" button in LinuxDeploy program and try to poweroff tablet. Press buttons "Volume-Up" and "Power", wait until Linux booting messages appear, and release buttons. If you've done all correctly, graphics should be started and LXDE too. Touchscreen must be working as touchscreen :), S-Pen as mouse, when tablet is idle for a long time and screen becomes dark - just press "Power" button.

    If something is wrong - you can reboot your tablet to Android, login to chroot via LinuxDeploy and fix anything you need.

    The next things we will do are: configure WiFi, Bluetooth, sound. And also will repartition emmc and move Linux to the internal native partition (optional). See my next messages...
    10
    ArchLinux

    For the interested people, below are the links to the updated recovery and rootfs images with ArchLinux:
    - recovery: http://dfiles.ru/files/r6y96x5oo
    - rootfs: http://dfiles.ru/files/dcolx02nj

    Changelog:
    - rootfs image size increased up to 3Gb
    - Samsung Kernel Update 5 + our patches + working Mali/UMP support merged
    - LXDM/XFCE stuff removed
    - ArchLinux updates installed
    - GDM/Gnome3 + extra packages installed
    - wpa_supplicant disabled, NetworkManager activated instead
    - Mali video driver and all dependencies installed and configured, so Gnome UI acceleration should work

    How to install on to device with stock firmware:
    - root your device and make sure you have "dd" utility
    - backup your stock recovery partition just in case (dd if=/dev/block/mmcblk0p6 of=recovery.img_orig)
    - burn recovery image to recovery partition (dd if=recovery.img of=/dev/block/mmcblk0p6)
    - put rootfs file to the "internal" sdcard
    - reboot to recovery and see Linux booting
    - see GDM, select "android" user, enable onscreen keyboard if needed (in the accessibility menu, top right corner), type "changeme" password and press enter

    P.S. ADB interface still works in case something is wrong and you need to login to Linux "from the backdoor"

    P.P.S. The images are posted "As Is", feel free to change anything you think works incorrectly or you can do better
    7
    i create http://code.google.com/p/opensgn. current in this repo my linux kernel for n8000 and some stuff
    6
    I have got a few advices and help from exception13, and has successfully compiled kernel, replaced recovery and now have ArchLinux working natively on my N8000. However it is in loop-filesystem placed on emmc, instead of repartitioning. But this might be more useful for most of users. So, I'm going to post a small HowTo and probably something pre-ready for you very soon.

    P.S. Attached is the picture of "Home PC" based on N8000 + Apple Wireless Keyboard + bluetooth mouse :)