[Galaxy Note 10.1 (2014 Edition) General] injola:
Success with Debian Kit, Stock KitKat ROM, SM-P600

Debian GNU/Linux on SM-P600 Samsung Galaxy Note 10.1 2014 edition, stock KitKat ROM

Can also get Ubuntu using this method. Disclaimer: If you do the

following, you may damage your device and render it unusable. Proceed

at your own risk!

I am running stock kitkat ROM from Samsung. Requirements:

1) root system. 2) install permissive kernel.

There are several methods for Linux available. I wanted one that does

not run in chroot environment, but rather side-by-side with Android. I

tried Debian-kit by Sven-Ola Tuecke.

http://sven-ola.dyndns.org/repo/debian-kit-en.html

This allows you to use your device normally, but simultaneously use

Debian via a terminal on the device or ssh or the LXDE desktop on the

device. The latter runs as an app that can be switched to and from

just like any other app. The Note 10.1 2014 seems to have plenty of

resources for me run android apps and LXDE and a compiler and emacs,

etc. Haven't used it seriously on the road. The installation procedure

is relatively easy, but not 100% plug and play.

See other threads for rooting. First I used TWRP recovery to do a full

backup. Flashed a kernel by xluco on xda developer's forum.

http://xdaforums.com/showthread.php?t=2725193

There are several versions of kernels on this thread. I chose the

kernel with has selinux permissive mode set and a couple of other

things, but almost no mods, so it may be more stable.

Xluco supplies the kernel as a zip. You can transfer it to the ext SD

card on the device, then boot to TWRP recovery if you have it, and

choose install and select the zip file, and then reboot. WARNING, the

xda forums have another selinux permissive kernel for 10.1 2014, but

it is for Android 4.3. Flashing it will leave your device in an

unbootable state, and you will have to reflash your backed up stock

kernel.

Doing this on a command line

/system/bin/getenforce

shows 'Permissive'

I used a modified version of debian kit by Eric Doviak, just to get

a later distribution.

Downloaded debian-kit-1-6.shar from:

http://www.doviak.net/debian-kit/debian-kit_p00.html

Transfer this to anywhere on your device, I think. Used USB cable and

adb. That is, I am typing on my linux box, communicating with the

device via USB and executing commands on the device.

On linux box (You can do this from an MSWin terminal, too I think), do

adb shell

Then do su to get root. Then do

sh /path/to/debian-kit-1-6.shar

Follow instructions.

I chose the the large 2GB debian wheezy distribution. This is

installed to a loop-mounted file, I think. IIUC, This means that the

system is installed in a file rather than a separate partition and the

file can be mounted and unmounted. If this works out, I will install

it to a partition on the external SD card.

Follow installation instructions given by Doviak and/or Tuecke. Get to

this command

> apt-get install andromize-lxde

Lots of files are downloaded and installation starts, but fails after

a while because dbus cannot be started. Fix this with

> apt-get install selinux-policy-default

At various points, installation may fail and you can enter

> dpkg --configure -a

and/or

> apt-get -f install

every now and then, which may fix things. Maybe I needed to

do

> apt-get install andromize-lxde

once more, I'm not sure.

If you followed all instructions, your ssh server is installed. Now

I use terminal programs on the device and ssh from linux box and

adb shell from the linux box. Sometimes, there is some confusion

and the linux system is not visible from adb shell. Maybe rebooting

or restarting things or something resets this. Not sure when it

happens.

Passwords: I logged in using adb shell and then su and then 'deb'. This

gave me root shell. Then I did 'passwd' and set my root password. I

used adduser to make a user account. I can ssh into this account

using 'ssh -X user@tablet' on linux box allows me to run X applications

on device and they display on linux box. Laggy, probably because of

wifi. Is there a way to do this over USB ?

Installed remote RDP app Lite by Walter Yongtao Wang on Google Play. Set

up a session, but got connection refused. When using the

debian system, I sometimes have to kill all xrdp procs by hand and

remove files ending in 'pid' in /var/run/xrdp and restart with

/etc/init.d/xrdp restart

Then the desktop will start. Install Hacker's keyboard from playstore so

that you can enter symbols, ctrl. etc. Search around Settings until

you find how to make it default keyboard. I can never remember how to

switch quickly between Samsung and hackers keyboard, maybe there is

not an easy; wish I knew how.

All fonts are extremely tiny. There are two places in the

configuration menu on the LXDE desktop to change fonts. 'Customize

look and feel', and 'Openbox configuration menu'. Start lxpanelctl

from the command line (open a terminal) and choose pixel sizes of the

panel. I don't know how to get this config dialog by other means. All

the apps have their own minuscule fonts. After a lot of work, many

things are no longer tiny. Action buttons on the window decorations

are still tiny. Someone online talked about resizing the images for

these buttons by hand and changing an xml file. Gotta be a better way.

Also, I think there is another way to get an x session, maybe using

framebuffer. It renders much faster. But, I don't know how to do

this yet.

The spen or finger can be used to move the cursor around and maybe

select and so forth. However, Using the spen in a window frequently

(almost always) causes the xrdp session to close. You reopen it and

your windows are still there (how to stop this from happening?). Using

the pen for other things, resizing and menu selection, does not cause

the session to close.

I got a sudden reboot once, first ever on the device. Don't know if it was

the kernel or system using too much memory or what.

Do 'apt-get install cpufrequtils'

> cpufreq-info

shows info on current freq and settings. Also the

CPU adjuster app from playstore shows some info and allows some

settings. It uses and unlabeled graph which is not the best.

Must use 'cpufreq-set -c 0 -f 1900MHz'. The man page says GHz will

work, but it does not.

CPU freq governor is userspace. To get automatic scaling, set to ondemand

> cpufreq-set -g ondemand

This now shows high freq. when loaded. Low freq. when idle.

-----------------------

gcc. I apt-get install gcc and g++ 4.7. Follow instructions online

to set update alternatives for 4.7. gcc 4.6 is installed and linked

to /usr/bin/gcc. I don't want gcc 4.6, but can't remove it because of

dependencies. I suspect this might cause problems with configuring

build environment.

Using -march=native build flag causes g++ to crash. Don't know why.

-----------------------

/etc/resolv.conf

Usually is not updated as it should be according to instructions. I

have to change this by editing by hand to get correct nameserver.

Once my wireless password was forgotten. Never was before. Don't

know if this is the kernel or the debian installation.

-----------------------

Mounting OTG USB. I can format a USB stick partition to ext4 and

mount it and use it. But TotalCommander cannot see the files on it.

There may be a good way to integrate this. It would be nice if

using different filesystems were transparent.

-----------------------

Latex: not enough space left in 2GB image to install

texlive-latex.