Note 3 linux on android

Linux on DeX — работаем в Ubuntu на Android

Linux on Dex — разработка от Samsung и Canonical, позволяющая запускать Ubuntu на Galaxy Note 9 и Tab S4 при подключении к Samsung DeX, т.е. получить почти полноценный ПК на Linux из смартфона или планшета. На настоящий момент времени это бета-версия, но поэкспериментировать уже возможно (на свой страх и риск, разумеется).

В этом обзоре — мой опыт установки и запуска Linux on Dex, использования и установки приложений, настройка русского языка ввода с клавиатуры и субъективное общее впечатление. Для теста использовался Galaxy Note 9, Exynos, 6 Гб RAM.

Установка и запуск Linux on Dex

Для установки потребуется установить само приложение Linux on Dex (в Play Маркет недоступно, я брал на apkmirror, версию 1.0.49), а также загрузить на телефон и распаковать специальный образ Ubuntu 16.04 от Samsung, доступный на https://webview.linuxondex.com/.

Загрузка образа доступна и из самого приложения, но в моем случае почему-то не работала, более того, во время загрузки через браузер скачивание дважды обрывалось (никакое энергосбережение не стоит). В итоге образ все-таки был загружен и распакован.

  1. Кладем образ .img в папку LoD, которую приложение создаст во внутренней памяти устройства.
  2. В приложении нажимаем «плюс», затем Browse, указываем файл образа (если будет расположен не в том месте, вас предупредят).
  3. Задаем описание контейнера с Linux и устанавливаем максимальный размер, который он сможет занять при работе.
  4. Можно запускать. Аккаунт по умолчанию — dextop, пароль — secret

Без подключения к DeX, Ubuntu можно запустить только в режиме терминала (кнопка Terminal Mode в приложении). Установка пакетов исправно работает прямо на телефоне.

После подключения к DeX можно запускать полноценный десктопный интерфейс Ubuntu. Выбрав контейнер жмем Run, ждём очень короткий промежуток времени и получаем рабочий стол Ubuntu Gnome.

Из предустановленного софта в основном — средства разработки: Visual Studio Code, IntelliJ IDEA, Geany, Python (но он, я так понимаю, всегда в Linux присутствует). В наличии браузеры, средство для работы с удаленными рабочими столами (Remmina) и что-то ещё.

Я не разработчик, и даже Linux — не то, в чем я бы хорошо разбирался, а потому просто представил: а что, если написать эту статью от начала до конца в Linux on Dex (LoD), вместе с графикой и остальным. И установить что-нибудь ещё, что может пригодиться. Успешно установились: Gimp, Libre Office, FileZilla, ну а VS Code меня более чем устраивает для моих скромных кодерских задач.

Всё работает, запускается и я не сказал бы, что очень медленно: конечно, в обзорах я читал, что у кого-то проекты в IntelliJ IDEA компилируются по несколько часов, но это не то, с чем мне предстоит столкнуться.

А вот с чем я столкнулся, так это с тем, что план мой по подготовке статьи полностью в LoD может не сработать: нет русского языка не только интерфейса, но и ввода.

Настройка русского языка ввода Linux on Dex

С тем, чтобы заставить работать переключение клавиатуры Linux on Dex между русским и английским мне пришлось помучиться. Ubuntu, как я упоминал — не моя сфера. Гугл, что на русском, что на английском результатов особо не дает. Единственный найденный метод — запуск клавиатуры Android поверх окна LoD. Инструкции с официального сайта linuxondex.com в результате оказались полезными, но простое следование им не сработало.

Итак, сначала опишу тот метод, который сработал полностью, а затем — то, что не сработало и сработало частично (у меня есть предположение, что последний вариант кто-то, более дружный с Linux, сможет довести до конца).

Начинаем со следования указаниям на официальном сайте и слегка их модифицируем:

  1. Ставим uim (sudo apt install uim в терминале).
  2. Устанавливаем uim-m17nlib
  3. Запускаем gnome-language-selector и при предложении загрузки языков нажимаем Remind Me Later (всё равно не загрузит). В пункте Keyboard input method указываем uim и закрываем утилиту. Закрываем LoD и снова заходим (я закрывал поднесением указателя мыши к верхнему правому углу, где появляется кнопка «Назад» и нажатием по ней).
  4. Открываем Application — System Tools — Preferences — Input Method. Выставляем как у меня на скриншотах в пунктах 5-7.
  5. Изменяем пункты в Global Settings: устанавливаем m17n-ru-kbd в качестве метода ввода, обращаем внимание на Input method switching — клавиши переключения клавиатуры.
  6. Очищаем пункты Global On и Global Off в Global key bindings 1.
  7. В разделе m17nlib выставляем «on».
  8. Также Samsung пишет, что в Toolbar требуется установить Never в пункте Display Behavior (не помню точно, менял или нет).
  9. Нажимаем Apply.
Читайте также:  Не могу изменить тему linux

У меня всё заработало без перезагрузки Linux on Dex (но, опять же, в официальной инструкции такой пункт присутствует) — клавиатура успешно переключается по Ctrl+Shift, ввод на русском и английском работает и в Libre Office и в браузерах, и в терминале.

Прежде чем я добрался до этого метода, было опробовано:

  • sudo dpkg-reconfigure keyboard-configuration (вроде бы настраивается, но к изменениям не ведет).
  • Установка ibus-table-rustrad, добавление русского метода ввода в параметрах iBus (в разделе Sundry в меню Applications) и настройка метода переключения, выбор iBus в качестве метода ввода в gnome-language-selector (как на 3-м шаге выше).

Последний способ на первый взгляд не сработал: появился индикатор языка, переключение с клавиатуры не работает, при переключении мышью по индикатору ввод продолжает осуществляться на английском. Но: когда я запустил встроенную экранную клавиатуру (не ту, что от Android, а ту, что Onboard в Ubuntu), я с удивлением обнаружил, что комбинация клавиш на ней работает, язык переключается и ввод происходит на нужном языке (до настройки и запуска ibus-table такого не происходило), но только с клавиатуры Onboard, физическая продолжает набирать на латинице.

Возможно, существует способ перенести это поведение и на физическую клавиатуру, но тут мне не хватило навыков. Обратите внимание, что для работы клавиатуры Onboard (находится в меню Universal Access) сначала требуется зайти в System Tools — Preferences — Onboard Settings и переключить Input event source на GTK в Keyboard Advanced Settings.

Впечатления

Не могу сказать, что Linux on Dex — это то, чем я буду пользоваться, но сам факт того, что на телефоне, вынутом из кармана, запускается десктопное окружение, всё это работает и можно не только запустить браузер, создать документ, отредактировать фото, но и программировать в настольных IDE и даже написать что-то на смартфоне для запуска на этом же смартфоне — это вызывает то подзабытое ощущение приятного удивления, которое возникало когда-то давно: когда в руки попадали первые КПК, на обычные телефоны получалось устанавливать приложения, появлялись сильно сжатые форматы аудио и видео, рендерились первые чайники в 3D, рисовались первые кнопки в RAD-средах, а на смену дискетам приходили флешки.

Источник

Kali Linux on Android Note 3 Guide

Roottransformer

New member

Loop device problem

I’ve done everything like you said but my phone says unable to create loop device. How did you get passed that error. Pls help me?

siriom

Senior Member

Selinux to permissive

Anyone find a way to set selinux to permissive on the SM n9005 without tripping knox?

magaiverzinho

Member

Hi, i try install complete linux instaler on my stock n9005 rooted, i try to start linux , the app start terminal emulator aplication and not execute any file or script, only open terminal emulator in prompt and not execute any comand or script.

PapoNL

Member

complet linux doesn’t make folder

When i downloaded complet linux i cant find the folder what is told in the guide where to put the file..

please can someone help ?

Zaileion

Senior Member

1. Is there a way I can dual boot with android and kali and pick on boot just like grub?

2. Has there been any advances on packet injection?

sinanlenfom

Senior Member

Hi,
i am using n9000q. I am installed all steps.

But not accept my password. Screen attached.
I am wrote «ubuntu». (Step 16)

And
su : authentication failed.

Sorry for my English.

nimish77

Senior Member

Hi,
i am using n9000q. I am installed all steps.

But not accept my password. Screen attached.
I am wrote «ubuntu». (Step 16)

And
su : authentication failed.

Sorry for my English.

the username should be root and the password should be toor as in pc versions.

———- Post added at 01:28 PM ———- Previous post was at 01:25 PM ———-

1. Is there a way I can dual boot with android and kali and pick on boot just like grub?

Читайте также:  Windows сохранила текущий сеанс

2. Has there been any advances on packet injection?

scndthe2nd

Member

Hey, I got Deploy Linux working on my note 3. I have two profiles going, one running ubuntu as basically a vnc-style chromebook and the other running Kali.

I’m on CM12 nightly. Note 3 Sprint.

There were a bunch of things that had to be done first. In settings i had to ‘update environment’ after the install and before starting everything. Simlink had to be enabled durring the installation, I had to specify a different file and file path for the img (before i changed to a partitioned layout), and the Default Password for VNC and SSH was weird — «changeme».

The username and password you specify in the image is different. I think it’s the root password.

There may have been more, i took about a day of tinkering just to get it to boot.

Linux runs in the background, and you vnc into it when you want to use it (i think it has to do with the android deployment acting like a sister-vm, and using the initial structure as a hypervisor). I’m using bvnc, which lets you use your pen as a seemingly functional mouse. The keyboard is still kind of awkward, but it’s nice if you need a desktop application, or even just the chromium browser.

Oh Yeah. Gnome doesn’t work. Use lxde or one of the other gui instead.

Everything about this setup is tinkering. There are a lot of great resources, but they’re all in Russian.

sinanlenfom

Senior Member

the username should be root and the password should be toor as in pc versions.

———- Post added at 01:28 PM ———- Previous post was at 01:25 PM ———-

answer 1: this process doesnt change your current android OS and runs kali linux though an emulator like vmware in pc.
answer 2: i think packet injection process is quite same as of that in pc versions. good:

All steps is ok but not connection on vnc.

Rzessski

New member

dalisoft

Senior Member

sinanlenfom

Senior Member

fdrph

Member

rasoulia

Senior Member

liam69

Senior Member

levi1696

New member

jakustar007

Member

$ sudo -i
sudo: PERM_ROOT: setresuid(0, -1, -1): Permission denied
[email protected]:

Biogenisis

Member

sparky vicky

Senior Member

jprimero15

Recognized Developer

Similar threads

Top Liked Posts

This may have been posted some where in the past but I have been searching for some time and found nothing but others looking for this information. So I though I would document what I did to get everything up and running on my note 3 and share it here.
Requirements

  1. Rooted Note 3

Recommended

  1. Bluetooth keyboard and mouse

From a PC

1. Download kali from the LOA website kalilinux.FULL.ext4.20131031 (5.8 GB Uncompressed) (2.0GB Download)
2. Once the download is complete extract the contents of the folder so you have a folder named “kali” then an .img and .md5 file in it then copy that to the Note 3 device storage root. I strongly recommend using USB 3.0.

1. First Download Linux on Android It might be called Complete Linux Installer now
2. Then Download androidVNC and Terminal Emulator
3. Download the modified bootscript.sh from attchments and extract
4. Copy to /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh
5. Start Linux on Android
6. Swipe from the left of the screen to the right and open the menu
7. Select “Launch”
8. Using the drop down box select “Kali”
9. Press the “Settings” button on the top right
10. Select “Edit”
11. On the line that says “Image” click the “…” button
12. Select the img file you copied to the storage in the kali folder
13. Click the “Save Changes” button
14. Then you are ready to click the “Start Linux” button
15. There will be a question if you want to check the img with the MD5 I would go ahead and type “y” and do this step to verify your download was not messed up.
16. Then it will ask you to create a new password. Type it in. And again. Make it 6 char alpha numeric.
17. If all is good it will ask if you would like to start vnc and ssh servers. Select yes to both.
18. Next it will ask you if you would like to save as default settings. I would select yes.
19. After things finish loading and you have a prompt. We will have to configure ssh
20. Type “ssh-keygen –R localhost”
21. Then you will be able to connect to the linux shell via ssh
22. Type «ssh localhost»
23. It will ask you if you want to add localhost to the list of allowed hosts
24. Type «yes» then press enter
25. Type in your password
26. Once connected to the emulator you will need to setup the VNC password
27. Type «vncpasswd» then press enter
28. Type your password in. And again. I would use the same 6 char password from before
29. Then you are ready to connect to the desktop
30. Open androidVNC from them the main menu leaving the terminal running in the background
31. Create a new connection from the dropbox
32. Name it kalilinux
33. Fill in the password you created
34. Use localhost for the address and the default port
35. Select 24-bit color (4 bpp) for the color format
36. Click connect.

Читайте также:  Windows mobile как сохранить контакты

I set up a Debian chroot on my CM11 Note 3 and have been using it for a long time with great success. Here’s a tip, don’t bother with the loopback-mounted images, it’s pointless on a phone with a datamedia partition layout (where /data and /sdcard are the same partition, which the Note 3 is). Instead, just dump the root filesystem directly into the /data directory in a folder, i.e. /data/debian (or /data/arch, /data/ubuntu, /data/kali, etc). This way you don’t have to have loopback device support in your kernel, you can install as much crap as you want and not have to resize your image/partition, and you can delete crap you don’t want to free up space for Android apps or user storage because all of them share the same space.

Another tip, instead of VNC server which is not accelerated and pretty crap overall, use XServer XSDL. This implements an X-server at the Android app level so it can take advantage of some acceleration (not 3D but possibly 2D) and is drawing with native Android surfaces rather than rendering into a VNC buffer and such. To use it, simply run a command such as:

from a chroot terminal. This particular one will open a MATE desktop session in XServer XSDL (make sure you either open the app right before or right after running the command, leave it too long and it times out). There’s also a libandroid_shmem.so or something library you can use to speed up the chroot->xserver memory performance. Best thing is you can configure the touchscreen to act as a trackpad like on a laptop, then use the left and right (up and down, but landscape) volume keys as left and right click.

On CM11 you can even write a script and add it to /data/local/userinit.sh to automatically start the chroot (bind mount all the devices and set up networking) and even start services if you want. I have mine automatically fire up a samba server and an SSH server on boot so I can access files remotely as well as remote in and use my Note 3 as an ARM build box for compiling stuff.

Finally, I’m looking into booting Debian natively. I’ve already got it working on my Note 1 and my HP TouchPad. Booting natively means you get full access to run an X server with full graphics hardware access, and with the Freedreno driver you can get actual GL and GLES acceleration. The Adreno 330 should be able to handle this pretty well. The first step towards this goal is getting dual-booting kernels to work as the native Debian kernel will need some stuff that Android doesn’t want and vice-versa. I’m working towards porting Kexecboot and the kexec-hardboot patches which will allow booting of multiple kernels without reflashing. Then you can boot Debian (or other Linux) natively or you can boot Android and use services from that Linux install in chroot and easily switch back and forth by rebooting. I already have this working on the Note 1 (HP TouchPad has kexecboot but it isn’t really necessary as the main bootloader supports multiple kernels already).

Источник

Оцените статью