Also (just so that to be clear), no matter which version of this guide that you are going to follow, you'd need at least 5GB of free Internal Storage.
Since the advent of the Microsoft Surface Pro line we had a great "great-computer/mediocre-tablet" combo on one hand, and through the already running iPad line we had a "great-tablet/bad-computer" on the other hand.
One of the primary reasons to buy into the Note tablet line is because I always thought that it conveniently sandwiches itself between the above categories hopefully avoiding the pitfalls of both. Sadly the reality was a bit further than that and our tablet seems to have taken equally the bad and the good of the above lines. I set to ameliorate part of those faults, since I mostly lack coding expertise or indeed deep knowledge of the Linux kernel I created a ... patchy solution.
Sooo the following is a ... rather monumental guide/tutorial to set up Gui - Linux with acceptable performance on top of android in our devices. Since I'm running it "on top" it relies to the chroot method (it's been detailed in quite many posts). For simplicity's (and ... repeatability's) sake I'm using the "LinuxDeploy" app which can be found here (buy a beer to the creator, don't forget that he's practically giving away his software).
Ook, let me say right out of the bat that I could have had released a ready-made Linux image so that everybody could benefit instantly, or alternatively write a script to automate the process that I'm going to detail next.
Instead I decided against it, firstly because (as you will soon find out) this guide is a work in progress, so through exposing each individual step it can/would actually become better (hopefully through the help of more talented/knowledgeable individuals than I). Secondly many of the steps would most certainly break down, down the road (continuously changing software tend to do that to tutorials), yet since all/most steps would be exposed a simple tweak to them would save it...
Important Note: This particular Guide is tested to work on both KitKat and Lollipop (Samsung) Roms for P600. Even a slightly different setup may cause it to misbehave. So that's one more reason why I chose to expose the relevant steps (what/how they do). Hopefully slight tweaks to some of the steps would make Linux perfectly functional on all variants of Note tablet and their many differing roms.
Let me move to the particulars then:
You'd definitely need root and a "Virtual Terminal" enabled kernel (I can't stress this enough), xposed framework/modules is optional (only needed for one work-around). I'm sure a mere Google search can tell you how to achieve the 1st and the 3rd requirement but the CONFIG_VT enabled kernel is a tougher nut to crack. Therefore I'm willing to make a list with VT_Enabled kernels for out tablet, for the time being I'll only be offering kernel based on Samsung Roms (many thanks to @xluco). Non-P600 guys should find an equivalent kernel on their own (or compile one for their own usage).
KitKat: http://forum.xda-developers.com/atta...mentid=3686507 , reportedly Disabl0w's version works better
Marshmallow: I'm willing to post a VT Enabled kernel here when (and if) our device reach nightly status on CM13.
BEWARE those kernels are for P600 (wifi version of Note 10.1 2014). I take no responsibility if you've bricked your device by flashing it to the wrong device/setup.
Additionally those apps would be needed:
a) Meefik's Busybox v1.24.1 (Download the apk and install it, once installed, do as follows: open the app -> tap "install" in the lower right corner -> OK)
b) LinuxDeploy v1.5.6 (Download the apk and install it, once installed, open the app -> press the "menu" button -> tap "settings" -> tap "update env" -> OK )
c) Linux Deploy's companion app (LinuxCanvas I named it)
d) Privilege Terminal (Terminal Emulator is more feature packed but for the purposes of this guide Privilege Terminal is preferable as you can paste content coming from HTML pages, directly to it)
e) Lastly, certain Configuration Files are needed (download and extract the contents to the root of your internal storage)
The guide is really made out of 11 simple steps. You can "blindly" follow them and you'd get a fully working image. Preferably, though, you'd also read the explanations of each step. I've included them because (as mentioned above) this guide is a work in progress. So making you privy to what each step does would hopefully lead to a better guide. Probably one with less steps and even more functionality. The explanation part would also help you debug a step if (for some reason) it didn't work correctly to your device.
So on we go:
1) Copy xorg.conf:
a) Open Privilege TerminalExplanation:
b) Run:Code:su; cp /data/media/0/Linux/res/xorg.conf /data/data/ru.meefik.linuxdeploy/files/share; echo"";
Note: Apart from S-pen everything else doesn't *have to* be mapped precisely (even if your mouse is called "keyboard" it would still work"). Also as a general heads up please connect your devices after device boot as if you have them connected already (say through OTG connection) as the device boots, the handler numbering would be messed up (for example the mouse could be event5 and s-pen event10)
2) Create a Linux image
a) Open Linux DeployExplanation:
b) Navigate to properties (Arrow showing "down") and choose the following Configuration:
Use the Default option to all except:
To Distribution Suite: Wheezy
To Installation Path: change the "/storage/emulated" part to "/data/media" (everything else stays as is)
To Select components: Tick X server, untick VNC server
To Graphics subsystem: choose Framebufer
To GUI settings: choose DPI = 230 (or anything higher if it suits you) and untick Force Refresh
To Custom Mounts: Tick it
To Mount Points: Delete the extant mount points (select them -> press "menu" -> delete) and add the following:
If you want to add support for more External devices you can add up to 4 more ( /mnt/media_rw/UsbDriveC - /mnt/media_rw/UsbDriveF )
c) Return to Properties' main menu and Tap Install (first selection)
d) Wait (quite a bit) until it reads "<<< install". It should read "processing triggers" on the line just before it, if not, reboot and follow step (c) again (re-install)
Note: Our tablet's internal SDcard is/would be mounted to /mnt/0 when inside the chroot Linux environment ( similarly External SDcard -> /mnt/extSdCard , 1st external Storage -> /mnt/UsbDriveA , etc ). If you're on another device (not P600) running the command "mount" from Terminal is going to give you where in which paths your storage mounts to, in which case you'd have to change the mount points in LinuxDeploy accordingly.
3) After the linux image is created (Linux deploy says "<<< install") go to Linux's Shell:
a) Go back to Privilege TerminalExplanation:
Code:/data/data/ru.meefik.linuxdeploy/files/bin/linuxdeploy shell; echo"";
3.5) This step is only relevant to those running Stock Samsung 5.1.1 rom. DO-NOT-RUN it if you're on any other version. Giving root permissions to the default user ("android"):
Run:Explanation:Code:sed -i '/android/c\android:x:0:5000:x:/mnt/0/Linux/Home:/bin/bash' /etc/passwd; echo"";
4) Change Home folder's path:
Run the following commands:Explanation:
Code:usermod android -d /mnt/0/Linux/Home; rm -rf /mnt/0/Linux/Home; mkdir /mnt/0/Linux/Home; cp -a /home/android/. /mnt/0/Linux/Home; echo"";
5) Apply basic HiDPI fixes:
Run:Explanation:Code:cp /mnt/0/Linux/res/.gtkrc-2.0 /mnt/0/Linux/Home/; echo"";
6) Enable GUI Repaint:
Run:Explanation:Code:chmod +x /mnt/0/Linux/bin/logout; echo"";
7) Resize Windows Borders:
Run:Explanation:Code:chmod +x /mnt/0/Linux/bin/resizeBorder; chmod +x /mnt/0/Linux/bin/revertBorder; /mnt/0/Linux/bin/resizeBorder; echo"";
8) Fix Mouse Cursor size:
Run:Explanation:Code:sed -i '/CursorThemeSize/c\iGtk/CursorThemeSize=58' /etc/xdg/lxsession/LXDE/desktop.conf; echo"";
9) Install basic Components:
Run the following:Explanation:
Code:apt-get update; sudo -u android sudo apt-get install -y samba gvfs-bin gvfs-backends zip iceweasel xfce4-mixer dmz-cursor-theme gstreamer0.10-alsa; echo"";
Close Privilege Terminal (press "CLOSE" on the upper right of the app and then "OK")Explanation:
11) Start Linux:
a) Open "LinuxCanvas"Explanation:
b) Press Volume Up, wait a bit and voila! (if it doesn't work the first time, press the "menu" button to repaint)
Volume up -> starts the chroot environment
Volume down -> kills it ("un-chroot")
Menu button -> "redraws" the graphical environment
And that's it. The caveat is of course (as a companion app to LinuxDeploy) that it is heavily dependent to LinuxDeploy, so any change that the developers would choose to make would -predictably- break functionality, so please PM me if/when that will happen. Also I'm a very un-creative person when it comes to App-creation so I would be veeery happy if another user was to take this task from me (someone who -hopefully- would make a much better featured and beautiful companion app), so updating this guide would be the only task that would remain to me.
As you may be able to see, by (as of) now you're good to go and you can fully work on your brand new Desktop environment. However I would like to add some less essential tips/fixes on my second post as well as a list with the remaining issues and workarounds to them (in my third post).