[GUIDE] Keepass2 with Keepasshttp on TF700 Lubuntu - Asus Transformer TF700

Hey guys,
I struggled for a long time to get keepass2 to work on the TF700 Lubuntu and finally got it working, so I want to share with you so you don't have to go all the same way.
What is keepass?
With keepass2 you can store all your passwords in a strongly encrypted database. You can store this database on dropbox, google drive or an own ftp server (my choice) to keep it up-to-date on all devices all the time. Keepass integrates this solution very well. It integrates also perfectly with chromium. Once you unlock the database with one secure master password the username and password for the website you need are automatically typed in (just like if you saved them with chromiums built-in "save password" feature) But there is even a well maintained Android app and iOS app, so you are very independent.
How to get it to work?
Background:
Keepass relies on mono. Until version 3.4 mono used only soft float calculation (armel) but our Infinity is armhf (hard float). Since 3.4 it *should* work without modifications to the source. The newest version (3.8.1, I compiled it from git) started fine but had no Internet access at all. So I found a version of mono ported to support hard-float where everything works as expected, although it is an older version.
To install this version:
Open a terminal (In Lubuntu 12.04 v1.3 this can be done by pressing the "Touchpad enable/disable" button)
Code:
sudo apt-get install git-core
git clone git://github.com/directhex/mono-1.git
cd mono-1
git checkout remotes/origin/armhf-port
./autogen.sh --disable-mcs-build --prefix=/usr
make -CFLAGS=-DARM_FPU_VFP_HARD
sudo make install
Download this: https://mega.co.nz/#!Tcw3ABLb!ETpn4SDEy1i2Pj8pFN2VyVpyAfGvmNv8q0BdIZCvDZ8
Code:
cd /usr/lib
sudo tar -xvf ~/mono.tar.lzma
To test your installation this should be the output:
Code:
mono -V
Mono JIT compiler version 2.11.4 ((no/50bb5e4 Thu Aug 28 13:46:52 CEST 2014)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: armel,vfp(hardfp-abi)
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)
To install keepass:
Download the latest "Portable" zip from http://keepass.info and extract it to a folder of your desire (my choice was ~/.keepass2)
Keepass requires the locale settings to be C, otherwise the settings would not be saved after exit, so to start keepass create a file startkeepass.sh with following content:
Code:
#!/bin/bash
LC_ALL=C
mono ~/.keepass2/KeePass.exe
Make it executable (chmod 755 startkeepass.sh) and from now on you can start keepass by executing that script.
To install keepasshttp
Keepasshttp is used to connect Keepass with the chromium plugin chromeipass. The plgx file does not work, but following method works:
Code:
git clone git://github.com/pfn/keepasshttp.git
cd keepasshttp/mono
cp * ~/.keepass2/
To install ChromeIPass
In Chromium: Menu -> Tools -> Extensions -> Get more extensions
Search for ChromeIPass and install it.
Congratulations! You can now use Keepass2 to manage your passwords on your TF700!

Related

[Q][Froyo][ndk]Subversion Building and Installation of Shared Libs

Disclaimer: This post is unstructured and may be missing crucial info because of that. Please point out the glaring errors and omissions.
Background:
Phone: Huawei Ideos U8150 (Aircel India branding)
OS: Stock 2.2 original firmware (Build number: U8150V100R001C234B832SP02)
Root: Z4Root temporary root (superuser and su installed by z4root)
Relavant Apps: SL4A+Perl for android, Vim for android, Connectbot, dropbear ssh client
I use vim and perl as my primary work tools and have them working beautifully on my Ideos. However, I am unable to access my source code as it is in a subversion repository with only svn+ssh access. So first, I got ssh on my phone (dropbear client 0.49) and then, searched for a subversion build for Froyo.
Finding nothing by way of a command line client for subversion, I decided to build it on my own with the NDK. This is where I've run into trouble. It has a lot of issues building it and once I do, it fails to run on the phone. Has someone tried to do this and successfully managed it? If so, I'd really appreciate the binaries and info on how to install
If not, I'd like to pool our knowledge for getting a successful build/run.
My process:
1) minimal Ubuntu lucid lynx
2) install ant1.8, make, and sun jdk 1.6 using apt-get (no X)
3) get the SDK in $HOME and use the Commandline interface to get everything (no package selection possible, just oneshot all selection)
4) get the NDK into $HOME
5) get svn source tar
6) get svn dependencies tar (svn site itself)
7) untar them together
8) Follow this and this to get the configure script running.
My configure is (using froyo: android-8 platform)
Code:
PATH="$PATH:$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/"
./configure --prefix=/usr/local/android-arm/sysroot/usr \
--build=i686-pc-linux-gnu --host=arm-linux-androideabi \
CFLAGS="-mandroid -nostdlib" \
CPPFLAGS="-I$NDK/platforms/android-8/arch-arm/usr/include" \
LDFLAGS="-Wl,-rpath-link=$NDK/platforms/android-8/arch-arm/usr/lib/ \
-L$NDK/platforms/android-8/arch-arm/usr/lib/" \
LIBS="-lc -lcrypt" --without-ssl --without-neon --without-serf --disable-dso
9) Get configure to run successfully.
9.1)Fix failures because cross-compile checks not possible: yes to /dev/null, yes to setpgrp void, no to PROCESS SHARED locks, no to TCP_NODELAY with TCP_CORK
9.2) Fix all config.sub to accept androideabi as a valid os (add relevant section into OS switch-case),
10) run make
11) Fix make issues (make APR_HAVE_IOVEC = 1 in apr.h, remove conditional so that fdatasync is defined as fsync in sqlite3.c)
12) fix link issues with libcrypt by creating the libcrypt from here and adding it to $NDK/platforms/android-8/arch-arm/usr/lib/
13) Run make install to create deployment tree.
14) tar gzip it and push on phone. (including libcrypt)
Open issues/steps with unknown solutions:
15) How to install shared libs (libcrypt)?
16) how to build static?
17) How to make this post better?
Could the mods please shift this thread to the android dev forum?

[Scripting][ARM][Installer][Port] Python (static) 2.7.9 and 3.4.2

(Check out https://www.python.org for information on what python is.)
Yes you read that correctly, static python for Android! It took a while to figure out how to get this compiled, but I finally did it. I present you with an installer and a little bit of testing. The second post contains information on compilation and the sources. Btw, any cool python scripts are welcomed!
INSTALLATION
Recovery flash installers are attached that will install python 2.7.9 and/or 3.4.2 to /system/pythonX.X.X. You can install both if you want. Installation size is about 41MB, 43MB, and 49MB respectively for python 2.7.8, python 2.7.9, and python 3.4.2.
After installation, the python director(ies) in /system will contain the static python binary, some scripts, and a bunch of modules and documents. Separate scripted executables will be installed to /system/bin/python or /system/bin/python3 depending on which one is installed. These basically just set the PYTHONHOME environment variable and execute the python binary.
TESTING
When you boot up to Android after installation, you should be able to just open up a terminal and fire off some python commands.
Test using python 2.7.9:
Code:
python -c 'print "Hello World!"'
Test using python 3.4.2:
Code:
python3 -c 'print("Hello World!")'
You can also write scripts shelled with python:
Code:
#!/system/bin/python
print "Hello World!"
Make sure to set them as executable with "chmod +x".
Adjust your screen brightness via /sys (root required, tested on Galaxy Nexus):
Code:
python -c 'f=open("/sys/devices/omapdss/display0/backlight/s6e8aa0/brightness","w"); f.write("40"); f.close()'
A cool script I made to tweak file system I/O like rq_affinity, rotational, etc for I/O blocks:
Code:
#!/system/bin/python
import os,re,sys
list=[]
# find all directories containing rq_affinity
for roots, dirs, files in os.walk('/sys'):
for file in files:
match=re.search(r'\S+/rq_affinity',os.path.join(roots,file))
if match:
list.append(match.group().replace('rq_affinity',''))
# write specific values to files in each directory found before
for dir in list:
for name in 'rq_affinity', 'rotational', 'read_ahead_kb', 'nr_requests', 'iostats', 'nomerges', 'add_random':
try:
f=open(dir+name,'w')
if name is 'rq_affinity': f.write('1')
elif name is 'read_ahead_kb': f.write('512')
elif name is 'nr_requests': f.write('512')
else: f.write('0')
f.close()
except IOError:
sys.stderr.write('Problem writing to ' + dir+name + '\n')
Or execute "python" or "python3" without any parameters to open up the interpreter and go from there. When you start for example "python" (python 2.7.8), you should see something like:
Code:
Python 2.7.8 (default, Dec 2 2014, 05:15:18)
[GCC 4.9.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
***I haven't fully tested this yet, so let me know how it goes. I know basic commands work, but there are still some complexities in the compilation that may need to be figured out.***
(update) -- Install Extra Packages/Modules via "easy_install" -- (root required)
1) In a shell, remount /system read-writable with:
Code:
mount -o remount,rw /system
2) Change directory to /system/pythonX.X.X, i.e.,
Code:
cd /system/pythonX.X.X
3) Execute easy_install followed by a package name, i.e.,
Code:
./easy_install [i]package_name[/i]
4) Let it download and install! Then test it out.
5) Remount /system read-only with:
Code:
mount -o remount,ro /system
Also, to remove a package, execute:
Code:
./easy_install -m [i]package_name[/i]
rm -r ../lib/pythonX.X/site-packages/[i]package_name[/i]*.egg
*** Flashing the resolv.conf patch may be required to make an internet connection to download modules.
Also, a few things need to be done to get easy_install working:
1) For python 2.7.8 or 2.7.9 you need to link python2.7 to python like this:
Code:
ln -s /system/python2.7.9/bin/python2.7 /system/python2.7.9/bin/python
I'll make sure this is automatically done in future installs.
2) SSL certificates need to be added to "/etc/pki/tls/certs/" to use SSL with easy_install.
Code:
mkdir -p /etc/pki/tls/certs
curl http://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt
ISSUES
The python installations have the following modules compiled in with external dependencies such as libraries not included at this point:
Code:
--------------PYTHON 2.7.8-2.7.9----------------------
_hashlib _multiprocessing _ssl
_testcapi bz2 crypt
dbm
Code:
--------------PYTHON 3.4.2-----------------------------
_crypt _dbm _decimal
_hashlib _multiprocessing _ssl
_testcapi
I will look into this more.
As @bubbleguuum points out, name resolution with python 3.4.2's urllib wasn't working. I found a workaround by adding the line
Code:
options single-request-reopen
to /system/etc/resolv.conf. This still needs some testing but seemed to work for me. I've included a recovery flash zip to patch /system/etc/resolv.conf if the line is not there since this is a root operation.
UPDATES
* 2014-12-02 * Compiled in more modules for each installation. This makes the installation a bit bigger, but it's worth it. You get a more complete python! To get stuff like help functions and math and readline modules, you need the larger installations linked below under "DOWNLOADS".
* 2014-12-03 * Thanks @cybojenix for pointing out some incapatibility issues with the original edify installer I was using. I have now updated the installers to use SuperSU's great non-edify sh-script installer.
* 2014-12-05 * Some updates to the installers to include more modules, plus size reduction for python 3.4.2. Modules added to python 2.7.8 : _bsddb _ctypes, _ctypes_test, _hotshot, _json, _lsprof, _sqlite3, future_builtins, and ossaudiodev, easy_install, pip(broken for now). Modules added to python 3.4.2: _bz2, _ctypes, _ctypes_test, _gdbm, _json, _lsprof, _opcode, _sqlite3, _testbuffer, _testimportmultiple, ossaudiodev, xxlimited
* 2014-12-05 * Some big updates to the installer to include almost the rest of the modules that wouldn't compile. Also easy_install is working on my end with these new experimental builds. With a little effort, should be able to get pip working as well. I had to use some hacky flags to get it to compile, ignore unresolved-symbols and such, so it definitely needs some testing. Another thing I did was tweak the install script to write over previous installations from these installations. I recommend downloading the experimental builds if you read this. The worst thing that might happen is one of the new modules I've included won't work completely.
* 2014-12-14 * Added python 2.7.9. Trimmed the installation sizes down to the much more reasonable 41MB, 43MB, and 49MB respectively for python 2.7.8, python 2.7.9, and python 3.4.2.
* 2014-12-24 * Attached a recovery flash.zip to patch resolv.conf to try and fix a urllib name resolution error.
* 2014-12-26 * A couple updates: Tweaked python installations so that modules looks for "/system/bin/sh" instead of "/bin/sh" when needed. Also a few "#!" corrections for scripts in the python bin directory. This shouldn't break anything from what I've tested, only make Android python more capable, but I'll keep the old installations attached for now just in case since the modifications involved using "sed". The second update is nice. I've added a little section on installing extra modules with easy_install(included and working with all installations).
Compiling
The environment I compiled in was a debian "wheezy" image mounted as a loop device on Android. The reason I compile this way is so I have full access to the arm environment tools, gcc compiler, etc. without having to go through the trouble of using a cross-compiler (which doesn't work in this case from my testing with uClibc, or eglibc. Code sourcery's might work but I didn't feel like booting an x86 linux installation to try). You can recreate the same environment pretty easily by using either Complete Linux Installer or Linux Deploy apps. I use both.
To get a static python compiled, I first downloaded the following packages with APT:
Code:
[i]apt-get build-dep python python3[/i]
build-essential gcc make # building tools
binutils-gold # awesome gold linker
zlib1g-dev # zlib
libreadline-dev, libncurses5-dev # readline, curses
libbz2-dev # bz2
libsqlite3-dev # sqlite3
python-bsddb3, python3-bsddb3
libgdbm-dev # gdb
libssl-dev # ssl
python-tk, python3-tk # tkinter
libdb-dev # db
python-gdbm python-bsddb3
libffi-dev # _ctypes
tcl8.6-dev # tkinter
libx11-dev # tkinter
libmpdec-dev # decimal
Then I manually installed binutils-gold by unpacking the rpm for armv7h (this isn't available with APT yet). You can get it here though. (Update: this should be available in the debian repositories now.)
For static compilation, you need to make some changes to Modules/Setup from the python source directory. Specifically, you need to add
Code:
*static*
to the top of the file. Then you need to uncomment any commented modules you would like compiled in. When you compile and see a list of failed modules, search for each of these in Modules/Setup and uncomment them. For example, change
Code:
#math mathmodule.c _math.c
to
Code:
math mathmodule.c _math.c
. Then recompile. There may be some shared dependencies and packages as well you need to figure out to get them to compile. Take a look at the attached "Setup" files for more detail.
The actually compile steps look like this:
(1)
Code:
./configure --build=arm --prefix="$PWD"/out LDFLAGS="-static -static-libgcc -Wl,--unresolved-symbols=ignore-all -Wl,--export-dynamic" CPPFLAGS=-static CXXFLAGS=-static CFLAGS="-Os -static" LDFLAGS=-static LD=ld.gold
(2) Modify the Modules/Setup file.
(3)
Code:
make clean; make install
After compiling, there are some things you can do to make your installation in "./out" smaller. Strip the large binaries in "out/bin", i.e.
Code:
strip -s ./out/bin/python2.7
Also remove the python archive library, *.o's, etc. with:
Code:
make clean
This might seem kind of weird, but it works and cleans out unnecessary files from your installation.
**Make sure to backup your Modules/Setup file if you run "make distclean". I lost my 3.4.2 Modules/Setup file after doing this. :silly: Now I gotta recreate it, dammit.
**I should also mention that compile time is very fast given the amount of data generated. It takes about 10 minutes to get python and all it's modules compiled on my Galaxy Nexus.**
:EDITS:
: Updated some configure parameters. Removed unnecessary, extra "./configure". Also added some updates to the included "Setup" files.
: Hacky update to "./conifgure" to ignore unresolved symbols, export dynamic. This allows certain modules to be compiled which have shared dependencies.
: Update to trimming down the installation size after "make". Use another "make clean".
Downloads - Extract in the source directory
Setup (python 2.7.8)
Setup (python 3.4.2)
Setup (Experimental) (python 2.7.8)
Setup (Experimental) (python 3.4.2)
Something that would be interesting to look in to would be to have pip/easy_install running, so you can install extra non c packages onto the sdcard/data/wherever.
Would you also consider opening up the sources please? There is a project I'm interested in doing involving python on Android, however a lack of time meant I couldn't finish building it.
Give me a shout if you need anything. I hope to see even more come out of this thread
Edit:
I've just looked at the updater-script. The mount command won't work on the majority of devices. Can you turn the update-binary in to a shell script please? See the SuperSU updater for reference
cybojenix said:
Something that would be interesting to look in to would be to have pip/easy_install running, so you can install extra non c packages onto the sdcard/data/wherever.
Would you also consider opening up the sources please? There is a project I'm interested in doing involving python on Android, however a lack of time meant I couldn't finish building it.
Give me a shout if you need anything. I hope to see even more come out of this thread
Edit:
I've just looked at the updater-script. The mount command won't work on the majority of devices. Can you turn the update-binary in to a shell script please? See the SuperSU updater for reference
Click to expand...
Click to collapse
Thanks for your reply! I've changed the installer to use SuperSU's no-edify sh-scripted updater. I tested on my device, but let me know if there are any issues though. I kept it pretty basic.
I added some stuff on the source modifications and compilation to the 2nd post. The only file I've actually modified so far in the source is the generated Modules/Setup file, and I've included the one I used for python 2.7.8. Unfortunately, I over-cleaned the python 3.4.2 directory, which deleted my modified Modules/Setup there, so I'll have to add it later when I re-edit it.
That's a great idea on pip/easy_install. I did download the pip_installer and tried out installing on the static python I made. Got some errors though pointing to a few modules I haven't gotten compiled into the static python installation (listed in the OP near the bottom, specifically _ctypes). I'll see what I can do about that. The line for compiling the module might just need to be added to Modules/Setup. Hopefully that's the case.
@7175
Thank you very much for these binaries.
There is however a problem: name resolution (DNS) doesn't seem to work at all (with both python 2 and 3 downloads).
All attempts to use urllib.request.urlopen('http://somehost.com') fail with "<urlopen error [Errno -2] Name or service not known>" (running python as root but it doesn't matter, and a rooted Nexus 4 running 4.4.4 stock ROM):
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/system/python3.4.2/lib/python3.4/urllib/request.py", line 153, in urlopen
return opener.open(url, data, timeout)
File "/system/python3.4.2/lib/python3.4/urllib/request.py", line 455, in open
response = self._open(req, data)
File "/system/python3.4.2/lib/python3.4/urllib/request.py", line 473, in _open
'_open', req)
File "/system/python3.4.2/lib/python3.4/urllib/request.py", line 433, in _call_chain
result = func(*args)
File "/system/python3.4.2/lib/python3.4/urllib/request.py", line 1202, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/system/python3.4.2/lib/python3.4/urllib/request.py", line 1176, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>
Click to expand...
Click to collapse
it works if replacing somehost.com by its ip address.
To reproduce above stack trace with python 3:
import urllib.request
urllib.request.urlopen('http://www.google.com')
while this work:
urllib.request.urlopen('http://173.194.45.229')
nslookup and general name resolution work anywhere else:
[email protected]:/ # nslookup www.google.com
nslookup wwwgoogle.com
Server: 8.8.4.4
Address 1: 8.8.4.4 google-public-dns-b.google.com
Name: wwwgoogle.com
Address 1: 2a00:1450:4007:80c::1014 par03s15-in-x14.1e100.net
Address 2: 173.194.45.242 par03s15-in-f18.1e100.net
Address 3: 173.194.45.240 par03s15-in-f16.1e100.net
Address 4: 173.194.45.244 par03s15-in-f20.1e100.net
Address 5: 173.194.45.241 par03s15-in-f17.1e100.net
Address 6: 173.194.45.243 par03s15-in-f19.1e100.net
Click to expand...
Click to collapse
This issue has probably something to do with how python was compiled to do name resolution. I remember vaguely a similar issue
on Ubuntu 12.04, with a ffmpeg compile that would always fail to resolve hostnames in URLs. No sure what the exact fix was but it had something to do with the libc and its name resolution mechanism. Or maybe something ipv6 related ?
@bubbleguuum : Thanks for checking out that important issue.
I did a little research and it seems there is some issue with DNS name resolution related to ipv6. I recompiled with "--disable-ipv6" and that seemed to fix the issue. I also found that adding the line
Code:
options single-request-reopen
to /etc/resolv.conf did the trick as well. Apparently this tells the resolver to use a new socket for ipv6 resolution instead of same one as ipv4. It thereby reduces wait-time as well. Maybe check on your end and see if that works. Otherwise I'll upload ipv4-only installations since this issue at least needs to be side-stepped.
EDIT: Hmm, looks like re-compiling with "--disable-ipv6" didn't fix the problem. Will have to look more into this issue and hold off on uploading ipv4-only python3 since it didn't fix it. In the meantime, I've attached a recovery flash.zip to the OP to add the above mentioned line to /system/etc/resolv.conf if needed, which seems to fix the issue for me.
7175 said:
@bubbleguuum : Thanks for checking out that important issue.
I did a little research and it seems there is some issue with DNS name resolution related to ipv6. I recompiled with "--disable-ipv6" and that seemed to fix the issue. I also found that adding the line
Code:
options single-request-reopen
to /etc/resolv.conf did the trick as well. Apparently this tells the resolver to use a new socket for ipv6 resolution instead of same one as ipv4. It thereby reduces wait-time as well. Maybe check on your end and see if that works. Otherwise I'll upload ipv4-only installations since this issue at least needs to be side-stepped.
Click to expand...
Click to collapse
Thank you for looking into this so fast.
My intended usage is for running the python binary from a regular non-root app (which works great!), so editing resolv.conf is not an option.
I've been researching that DNS resolving issue and could not find a clear explanation on why it fails on Android and not on other systems, and why exactly the added line in resolv.conf fixes (or rather workaround) it.
All seems to point to socket.getaddrinfo() failing for an unknown reason.
Is Python compiled with HAVE_GETADDRINFO defined ? If that's the case it uses the libc definition of getaddrinfo, otherwise
it uses an emulation function found in getaddrinfo.c.
My guess is that it is the latter, and what is causing this issue on Android.
It's probable this issue has already been solved on Android since other Python binaries exists, but Googling around do not give
much answer.
I get this error when trying to install anything with easy_install (using /system/python3.4.2/bin/easy_install-3.4 because /system/python3.4.2/easy_install doesn't seem to exist like in the OP):
Code:
# ./easy_install-3.4 feedparser
Searching for feedparser
Reading https://pypi.python.org/simple/feedparser/
Download error on https://pypi.python.org/simple/feedparser/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'feedparser' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or download links found for feedparser
error: Could not find suitable distribution for Requirement.parse('feedparser')
i got curl and the certs installed in /etc/pki/tls/certs/ as per instrucions in the OP, any help?
Thoughts on PIL?
Hmm... new problems here. Android Lollipop have no /system/etc/resolv.conf by-default and urllib patch is no more works.
How it can be fixed?
http://qpython.net/index.php
Where I can find source code and related documents for project
Pratik Raj said:
Where I can find source code and related documents for project
Click to expand...
Click to collapse
I would like to know the same, as well as what license it is under... Also, I don't care about the network, but does it work on Oreo? Also, do you think I could customise the installer to install to a non-system location (/tmp) so that my flashable zip can use python?
hackintosh5 said:
I would like to know the same, as well as what license it is under... Also, I don't care about the network, but does it work on Oreo? Also, do you think I could customise the installer to install to a non-system location (/tmp) so that my flashable zip can use python?
Click to expand...
Click to collapse
Idk about OP, but I can surely post my source for python 2.7 on arm/arm64. I compiled it like a year ago, but it wasn't too bad, just required a bunch of patches and code for dlopen
I just want to say thank you so much.

[GUIDE]Cross Compiling C/C++ for ARM on Linux

I wrote this guide to make it easy for everyone to be able to cross compile c/c++ for android, the easy way that I know. I admit, I am a total n00b to c/c++. I started learning to cross compile when I got my new nexus 9 for christmas. I, for some reason, couldnt get busybox installed on it. So, I had to manually compile and load it on there. After reading a hundred tutorials and none of them working, I got frustrated. Finally, I compiled a working version. And it was SO EASY. Anyway, Im specifically giving instructions for Ubuntu 14.04/14.10. First thing you need to do is download a package called binutils-arm-linux-gnueabi.
- sudo apt-get install binutils-arm-linux-gnueabi
- sudo apt-get install binutils-aarch64-linux-gnu (for aarch64, or arm 64bit, or armv8)
- sudo apt-get install binutils-arm-linux-gnueabihf (for armhf)
To compile busybox for your platform, you must download the source package you want to compile from http://busybox.net/downloads/. Then extract it
- tar xvf busybox.tar.gz
Then, cd into your root busybox folder.
- export ARCH=arm
- export CROSS_COMPILE=arm-linux-gnueabi- (dont forget the trailing dash(-))
This will setup your variables for compilation. Then
- make menuconfig (if you dont get a config menu, you need to "sudo apt-get install libncurses5-dev")
Now, go into the busybox settings -> Build options. Select the option "build busybox as static executable". You can select/deselect options by hitting the space bar. [ESC] key will take you back. Make sure to save your new configuration. Its almost time to compile! One last thing. If you want to add your name to it, go into the Makefile in the root busybox folder. At the top of the file, where it says EXTRAVERSION = .git, you can add something like -bynarie or whatever you want. That way when you run busybox on the terminal emulator on android, it will print out something like "BusyBox v1.24.0-bynarie". OK! Time to compile. Really simple:
- make install
This will compile every applet, and put everything in a folder called _Install. You will have busybox and busybox_unstripped in the root directory. Please, be aware that this busybox puts an applet named "su" in the bin folder in the _install folder. So, DO NOT COPY THE SU APPLET INTO YOUR ANDROID BIN FOLDER, OR YOU WILL LOSE ROOT!!! Now, to verify it compiled to the right architecture, do "file busybox" at the term and it should spit out something like "ELF 32bit ARM executable". If this is the case, congrats. We have successfully compiled busybox for android arm!! Copy the needed files over to your device and set permissions and you are done. The suggested way to move the busybox binary to your device is as follows:
- adb push busybox /data/local/tmp/busybox
- open adb shell and do "chmod 755 /data/local/tmp/busybox" or chmod it on your linux box before pushing.
- open file manager on device and move busybox to /system/xbin
- If properly done, should work.
For other nix programs like tar, the procedure is as follows:
- Open term, cd into root source folder
- ./configure CC="arm-linux-gnueabi-gcc" CPP="arm-linux-gnueabi-cpp" --host=arm-linux-gnueabi
- make
The CC variable is your C compiler command and the CPP variable is the C preprocessor, if you need to add a C++ compiler just add CXX="arm-linux-gnueabi-g++" but TAR is specifically C only. You can add all three variables I would assume to be safe. Most of the time, the readme or install documents will give you some guidance on cross compiling. But, this is how I successfully compiled TAR for arm and aarch64.
If you want to compile small/single source file c/c++, you will be using the same tools, but in a different way. Cd into your source file directory, and depending on which type of source it is (c or cpp), you will do the following:
- arm-linux-gnueabi-gcc helloWorld.c -static -o helloworld.out (for C)
- arm-linux-gnueabi-g++ helloWorld.cpp -static -o helloworld.out (C++)
Yep, its that easy. I cant guarantee 100% this will work on everything, but its a good starting point. And you dont even have to fool with the Android NDK. I find that the android ndk would mostly benefit "Apps" that need to integrate c/c++ code into them, not little console apps run from the terminal emulator. I hope someone finds this guide useful and if anyone has any problems trying to get somethin to work, you can respond and I will do my best to help.
thanks

[Guide] Plex Media Server on Full Android

Background
I've been looking for the ultimate low powered Plex Media Server. I knew that Plex worked directly on Linux but NOT directly on Android. After some thinking, I started looking for a way to install Linux on top of Android without having to dual boot. Once I stumbled upon Deploy Linux, I spent several days experimenting on a functional combination. I tried using ARM guides to setup the Nexus Player with no luck. However, after trying a i386 build, voila! It successfully booted & most channels even work.
Notes
It is possible to install a similar setup on any ARM based devices using ARM based repos. I successfully installed it on my OnePlus but I have NOT had time to experiment with this particular ARM setup any further.
This will ONLY work with a full Android build. If you are using stock, this will NOT work. For some reason, certain buttons & menus do not exist in stock android builds that exist in full AOSP builds.
DISCLAIMER
I take NO responsibility for any fault or damage caused by using this guide. NO EXPRESS or IMPLIED warranties of any kind are given.
Pre-Requisites
Lollirock + Root LolliRock | XDA
Linux Deploy Linux Deploy | Google Play
VNC Viewer (Chrome App available to access Linux Image) VNC Viewer | Chrome Web Store
4GB of Storage on Built-In Memory (may work on External drives but will likely affect performance)
Preparation
Launch Linux Deploy
Click on the download like icon (Brings up Properties for Linux Image)
Distribution: Debian
Distribution Suite: Jessie
Architect: i386
Installation Path: /sdcard/NAME_OF_IMAGE.img (Any name should work & haven't tested with any spaces in the name)
Desktop environment: KDE or XFCE (most lightweight GUI)
Install (Start GNU/Linux installation) [at top under Action]
Exit (After exit, force stop Linux Deploy & swipe away the app)
Restart Linux Deploy
Press the START button to start the image
Setup
Launch VNC Viewer
Address: IP Address of Nexus Player (IP address is listed at the top next to image name)
Launch Terminal App
Enter following code below
Code:
sudo su
sudo curl http://shell.ninthgate.se/packages/shell-ninthgate-se-keyring.key | sudo apt-key add -
echo "deb http://shell.ninthgate.se/packages/debian wheezy main" | sudo tee -a /etc/apt/sources.list.d/plex.list
sudo apt-get update
sudo apt-get install plexmediaserver
sudo nano /etc/default/plexmediaserver
[U]Find this line of code[/U] (should be near the end of the file)
PLEX_MEDIA_SERVER_USER=plex
change plex to linux username (default is android)
Ctrl-X (to save & close)
Y (yes to save changes)
Enter (apply)
sudo service plexmediaserver restart
http://nexus_player_ip_address:32400/web (BE PATIENT! May take a few minutes for the server to initialize or even a few refreshes but it will eventually work)
Configure Plex Server
Enjoy!
Untested
Mounting Network Locations
Transcoding
Channels (I have only tested a few & most but not all of them worked)
Credit
yakumo (Plex Forum | Debian Guide)
xxrazorxx (Plex Forum | Android ARM Processor notes)
meefik (Creator of Linux Deploy)
HTPCGuides.com (General Guides for installing different Plex Builds in Linux)
xaudiblex said:
Background
I've been looking for the ultimate low powered Plex Media Server. I knew that Plex worked directly on Linux but NOT directly on Android. After some thinking, I started looking for a way to install Linux on top of Android without having to dual boot. Once I stumbled upon Deploy Linux, I spent several days experimenting on a functional combination. I tried using ARM guides to setup the Nexus Player with no luck. However, after trying a i386 build, voila! It successfully booted & most channels even work.
Notes
It is possible to install a similar setup on any ARM based devices using ARM based repos. I successfully installed it on my OnePlus but I have NOT had time to experiment with this particular ARM setup any further.
This will ONLY work with a full Android build. If you are using stock, this will NOT work. For some reason, certain buttons & menus do not exist in stock android builds that exist in full AOSP builds.
DISCLAIMER
I take NO responsibility for any fault or damage caused by using this guide. NO EXPRESS or IMPLIED warranties of any kind are given.
Pre-Requisites
Lollirock + Root LolliRock | XDA
Linux Deploy Linux Deploy | Google Play
VNC Viewer (Chrome App available to access Linux Image) VNC Viewer | Chrome Web Store
4GB of Storage on Built-In Memory (may work on External drives but will likely affect performance)
Preparation
Launch Linux Deploy
Click on the download like icon (Brings up Properties for Linux Image)
Distribution: Debian
Distribution Suite: Jessie
Architect: i386
Installation Path: /sdcard/NAME_OF_IMAGE.img (Any name should work & haven't tested with any spaces in the name)
Desktop environment: KDE or XFCE (most lightweight GUI)
Install (Start GNU/Linux installation) [at top under Action]
Exit (After exit, force stop Linux Deploy & swipe away the app)
Restart Linux Deploy
Press the START button to start the image
Setup
Launch VNC Viewer
Address: IP Address of Nexus Player (IP address is listed at the top next to image name)
Launch Terminal App
Enter following code below
Code:
sudo su
sudo curl http://shell.ninthgate.se/packages/shell-ninthgate-se-keyring.key | sudo apt-key add -
echo "deb http://shell.ninthgate.se/packages/debian wheezy main" | sudo tee -a /etc/apt/sources.list.d/plex.list
sudo apt-get update
sudo apt-get install plexmediaserver
sudo nano /etc/default/plexmediaserver
[U]Find this line of code[/U] (should be near the end of the file)
PLEX_MEDIA_SERVER_USER=plex
change plex to linux username (default is android)
Ctrl-X (to save & close)
Y (yes to save changes)
Enter (apply)
sudo service plexmediaserver restart
http://nexus_player_ip_address:32400/web (BE PATIENT! May take a few minutes for the server to initialize or even a few refreshes but it will eventually work)
Configure Plex Server
Enjoy!
Untested
Mounting Network Locations
Transcoding
Channels (I have only tested a few & most but not all of them worked)
Credit
yakumo (Plex Forum | Debian Guide)
xxrazorxx (Plex Forum | Android ARM Processor notes)
meefik (Creator of Linux Deploy)
HTPCGuides.com (General Guides for installing different Plex Builds in Linux)
Click to expand...
Click to collapse
Have any screenshots how looks the Plex Media Server on Nexus Plaxer? Anyone did try this? Thanks!
There is no way with the apk for nividia Shield ?
ALEX37330 said:
There is no way with the apk for nividia Shield ?
Click to expand...
Click to collapse
It simply crashes or you don't tested it?
I m one oneplus 3 so it s arm64 like nividia app start i have notification plex media server runing but i m blocked at the screen configuration of plex media server please wait
Everything work except the last screen where the process never end
This screen
I find log
Dec 01, 2016 15:01:48.053 [0x61e1] DEBUG - ChangestampAllocator: initialized to 0
Dec 01, 2016 15:01:48.083 [0x61e1] ERROR - Error: Unable to set up server: bind: Address already in use (N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEEE)
If someone known how fix this ?
New key sever:
sudo curl http://shell.ninthgate.se/packages/shell.ninthgate.se.gpg.key | sudo apt-key add -
It works.
How can I access to real device file system?
EDIT:
That's it: https://github.com/meefik/linuxdeploy/issues/95

[GUIDE][NO-ROOT] How to install Ubuntu and other Linux Distros on Your Phone or Android TV Box, using Termux

NOTICE:
THIS METHOD IS ONLY FOR NON ROOTED DEVICES
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
PROOT-DISTRO GITHUB PAGE
Hello Friends!
Today I wanted to start a thread that will house prebuilt Linux environments, as well as instructions for building the Linux environments yourself. These "environments" theoretically can be run on any non-rooted Android Device.
The first premade being released is an Ubuntu (Jammy) environment with a GUI that I built from scratch and will show you how to build as well! It is as bare bones as I could get with just xfce4 for the gui and it's goodies package. Tightvncserver is installed as well so we can remote into the environment.
(If you would rather use windows RDC then do not install tightvncserver)
Spoiler: WHAT IT LOOKS LIKE
UBUNTU THEMED VERSION:
BASIC 'BUNTU VERSION:
Spoiler: PREMADE UBUNTU ENVIRONMENT
INSTALLATION INSTRUCTIONS:
Download and install Termux on your Android Device: DIRECT DOWNLOAD LINK
Download the Premade Ubuntu Backup of your choice on your Android Device.
JAMMY JELLYFISH ENVIRONMENTS:
Spoiler: BASIC
Basic Ubuntu Environment (xfce4, xfce4-goodies, tightvncserver) with no additional programs: DIRECT DOWNLOAD LINK (394MB)
You are able to set your own user name and root password for the premade environment.
Open Termux and run these commands:
Code:
pkg install x11-repo
pkg update -y
pkg install proot-distro -y
proot-distro install ubuntu
termux-setup-storage
cd storage/downloads
proot-distro restore ./ubxfce-backup.tar.gz
proot-distro login ubuntu
Now to setup your user name and root password:
Code:
passwd root
useradd USERNAME
passwd USERNAME
Now run:
Code:
vncstart
You will be asked to set a password for your vnc. Then you will be told which port number to use in your vnc.
Now you need to connect to the vnc server by using an app on your phone or by remotely connecting with your pc, both instructions are provided below. Then as soon as you connect, you will be done! Your Ubuntu Environment is now fully setup with a GUI, working internet, and root access.
To change over to your user name and home, run this command:
Code:
su USERNAME
Spoiler: BASIC WITH CHROMIUM AND FIREFOX
Same as above, but with Chromium and Firefox installed: DIRECT DOWNLOAD LINK (625MB)
You need to open chromium and then close it the very first time, it opens to a blank screen the first run for whatever reason.
Open Termux and run these commands:
Code:
pkg install x11-repo
pkg update -y
pkg install proot-distro -y
proot-distro install ubuntu
termux-setup-storage
cd storage/downloads
proot-distro restore ./ubxfce2-backup.tar.gz
proot-distro login ubuntu
Now to setup your user name and root password:
Code:
passwd root
useradd USERNAME
passwd USERNAME
Now run:
Code:
vncstart
You will be asked to set a password for your vnc. Then you will be told which port number to use in your vnc.
Now you need to connect to the vnc server by using an app on your phone or by remotely connecting with your pc, both instructions are provided below. Then as soon as you connect, you will be done! Your Ubuntu Environment is now fully setup with a GUI, working internet, and root access.
To change over to your user name and home, run this command:
Code:
su USERNAME
Spoiler: BASIC WITH BROWSERS RDP VERSION
RDP Version for use with Windows Remote Desktop Connection on PC: DIRECT DOWNLOAD LINK (626MB)
OR you can use an RDP app on your phone.
Firefox and chromium are preinstalled. Xrdp is used instead of tightvncserver.
Open Termux and run these commands:
Code:
pkg install x11-repo
pkg update -y
pkg install proot-distro -y
proot-distro install ubuntu
termux-setup-storage
cd storage/downloads
proot-distro restore ./ubxfce3-backup.tar.gz
proot-distro login ubuntu
service xrdp restart
Now to setup your user name and root password:
Code:
passwd root
useradd USERNAME
passwd USERNAME
To change over to your user name and home, run this command:
Code:
su USERNAME
lastly run ifconfig
Take note of your ip address and make sure you have setup a user with a password or a password for root, then open RDC on your PC or Phone and connect to this IP address. You will then need to type in your user name and password to connect.
Spoiler: UBUNTU THEMED RDP VERSION
Customized to look more like Ubuntu, built for Windows RDC DIRECT DOWNLOAD LINK (804MB)
OR you can use an RDP app on your phone.
Sudo has been added to this machine. Thus it will come with a user this time.
USERNAME PASSWORD
root root
zero zero
Chromium asks for a key, it is 1111.
Open Termux and run these commands:
Code:
pkg install x11-repo
pkg update -y
pkg install proot-distro -y
proot-distro install ubuntu
termux-setup-storage
cd storage/downloads
proot-distro restore ./ubxfce4-backup.tar.gz
proot-distro login ubuntu
service xrdp restart
ifconfig
Take note of your ip address and open RDC on your PC or Phone and connect to this IP address. You will then need to type in either root root for the username and password or use the username zero password zero.
LUNAR LOBSTER ENVIRONMENTS:
Spoiler: BASIC
For use with TightVNC or other VNC apps: DIRECT DOWNLOAD LINK
Code:
proot-distro install ubuntu
termux-setup-storage
cd storage/downloads
proot-distro restore ./lunar.tar.gz
proot-distro login ubuntu
vncpasswd
#set your password
vncserver
Built per this guide with no browsers or other programs installed : SEE GUIDE
Spoiler: BASIC WITH FIREFOX
For use with TightVNC or other VNC apps: DIRECT DOWNLOAD LINK
Code:
proot-distro install ubuntu
termux-setup-storage
cd storage/downloads
proot-distro restore ./lunar2.tar.gz
proot-distro login ubuntu
vncpasswd
#set your password
vncserver
Spoiler: RDP VERSION WITH FIREFOX
For use with Windows RDC or other RDC / RDP apps: DIRECT DOWNLOAD LINK
Code:
proot-distro install ubuntu
termux-setup-storage
cd storage/downloads
proot-distro restore ./lunar3.tar.gz
proot-distro login ubuntu
service xrdp restart
Now to setup your user name and root password:
Code:
passwd root
useradd USERNAME
passwd USERNAME
Spoiler: BUILD YOUR OWN FROM SCRATCH
There are many ways to do this, the first way being demonstrated today is using the gui package "xfce4" which will install a desktop environment for us, along with other features added from the "xfce4-goodies" package. Lastly tightvncserver is installed so we are able to remote into the distro. Takes 30 mins to an hour to install.
If you would rather use RDC, do not install tightvncserver, use the package xrdp instead. You would then skip the vncserver step below.
Lastly, it is possible to upgrade the distro's file system from Jammy Jellyfish, to Lunar Lobster. See the Customize spoiler below for more details. OR SEE THIS POST FOR A FULL LUNAR BUILD
INSTALLATION INSTRUCTIONS:
Download and install Termux on your Android Device: DIRECT DOWNLOAD LINK
Code:
pkg install x11-repo
pkg update -y
pkg install proot-distro -y
proot-distro install ubuntu
proot-distro login ubuntu
apt update -y
apt install xfce4 xfce4-goodies tightvncserver -y
Spoiler: OPTIONAL -- BACKUP YOUR DISTRO
You can backup your Distro at this point prior to adding any passwords or users, or you may do this step later to backup your customizations to ubuntu with all the programs you have installed.
To backup your distro, type:
Code:
exit
termux-setup-storage
cd storage/downloads
proot-distro backup --output ubxfce-backup.tar.gz ubuntu
#run this command on your pc
adb pull sdcard/Download/ubxfce-backup.tar.gz
#Return to Ubuntu
proot-distro login ubuntu
Now to setup your user name and root password:
Code:
passwd root
useradd USERNAME
passwd USERNAME
Lastly run:
Code:
vncstart
You will be asked to set a password for your vnc. Then you will be told which port number to use in your vnc.
Now you need to connect to the vnc server by using an app on your phone or by remotely connecting with your pc, both instructions are provided below. Then as soon as you connect, you will be done! Your Ubuntu Environment is fully setup with a GUI, working internet, and root access.
To change over to your user name and home, run this command:
Code:
su USERNAME
Spoiler: REMOTE CONNECT WITH A PC OR PHONE
If you are going to be connecting to your Ubuntu Environment using only your phone, you will need a Vnc Viewing App.
Spoiler: VNC VIEWER FOR ANDROID
RealVNC Viewer: Remote Desktop - Apps on Google Play
Remotely control a desktop anywhere in the world from your Android device!
play.google.com
Type our local ip address of "127.0.0.1:" then add your port number after the :
You can name the connection whatever you like, then save and connect. You should be asked for your vnc server password now.
Spoiler: REMOTE DESKTOP APP FOR ANDROID
Remote Desktop – Apps on Google Play
Remote Desktop allows you to connect to remote PCs and apps.
play.google.com
Run ifconfig
Note your ip address next to wlan0.
Then connect to the ip address in the app with your user name and password.
If you know of a better RDC app please let us know in the comments below. I do not use these apps regularly. (personally use the PC RDC) Only verified it could run in the app.
If you want to be able to remote connect using your pc, decide if you want to use TightVNC or Windows Remote Desktop Connection.
Spoiler: TIGHTVNC FOR PC
Run ifconfig
Note your ip address next to wlan0.
Now open TightVNC for Windows - DIRECT DOWNLOAD LINK
Enter your local ip address: and the port number provided to us earlier.
Then enter your vnc password.
Now you are all set!
Spoiler: WINDOWS REMOTE DESKTOP CONNECTION
So, the package "xrdp" in this Ubuntu port cannot run with tightvncserver installed. Idk why. It took me 3 days to learn this... x.x but yay here we go!
INSTRUCTIONS:
Code:
apt purge tightvncserver
apt install xrdp
service xrdp start
ifconfig
Grab your ip address and make sure you have setup at least a root password, or a user.
then login to windows remote desktop connection with your ip address and type either root and your root password or the username and user password you set.
If you get disconnected and are unable to reconnect in RDC, run this command:
Code:
service xrdp restart
It is also possible to remote into your phone without installing proot-distro.
Spoiler: CUSTOMIZE YOUR ENVIRONMENT
Spoiler: CHANGE UBUNTU VERSION
OPTIONAL STEP!!
You are able to change your Ubuntu file system version by updating the repository sources.
Code:
nano /etc/apt/sources.list
Then edit jammy to lunar or whatever version you want and save. (ctrl + o and enter, then ctrl +x to exit)
TIMESTAMPED VIDEO OF THIS PART (earlier versions are likely not to work but it doesn't hurt to try. confirmed bionic beaver is not working)
Lastly run:
Code:
apt update
apt upgrade -y
Spoiler: MANUALLY INSTALL FIREFOX & CHROMIUM
This is for the Jammy Jellyfish version, since the snaps wont work. It is being determined now if Lunar is still having these troubles
Code:
echo "deb http://ftp.debian.org/debian stable main contrib non-free" >> /etc/apt/sources.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys 648ACFD622F3D138
apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys 605C66F00D6C9793
apt update
apt install firefox-esr
apt install chromium
nano /usr/share/applications/chromium.desktop
press ctrl + w and search for "exec"
then add --no-sandbox after chromium
press ctrl + o to save and ctrl + x to exit
Spoiler: ADD SUDO PACKAGE
This port does not come with sudo natively installed. We are able to install it and add any users to the sudoers file.
Code:
apt install sudo
nano /etc/sudoers
Now scroll down to where you see Root, and add your username below. Then copy the ALL=(ALL:ALL) ALL and paste it next to your username.
TIMESTAMPED VIDEO OF THIS PART
Spoiler: EDIT THE LOOK OF YOUR ENVIRONMENT
This is how the ubxfce4 environment was built. This is a write up of the video below with some modifications and is easier to go through if you watch the video with it.
Code:
apt install ubuntu-wallpapers gedit plank yaru-theme-gtk yaru-theme-icon xfce4-appmenu-plugin rofi git -y
Right click on your desktop and select desktop settings.
In desktop settings, select Folder, then select Other.
This should open you into the xfce backgrounds folder, at the top left, click on the "share" tab. Now highlight the backgrounds folder and select open at the top right.
This will load our wallpapers into settings, make a selection!
Now go into settings > appearance and select the color you would like for your windows.
Next go into settings > windows manager and select your theme, yaru-dark is what is used in the premade.
Now go into settings > default applications and you can change the file manager and terminal emulator.
Now go into settings > window manager tweaks and uncheck Draw frame around selected window while cycling.
Now select the Placement tab and move the ball to the middle.
Now right click on your panel and highlight panel, then select panel preferences.
Switch to panel 2 and select the minus button to remove it.
Switch back to panel 1, You may edit your icon size if you like under Appearance, then switch to the items menu and select applications menu.
You can select any icon you would like by hitting "select icons from" and then the "image file" tab
Apps Start Here Ubuntu Icon | Flatwoken Iconpack | alecive
Click to download App, Application, Software, Apps, Start, Here, Ubuntu icon from Flatwoken Iconpack by alecive
www.iconarchive.com
(I downloaded the SVG file and placed it into usr/share/icons)
You can remove the workgroup, notifications, and windows button panel options if you would like.
You can double click on the clock option to edit the time to look how you want.
You can move the clock in between the separators and expand the separators to change the clock's placement.
Now we can click on action buttons and take the check off everything except logout.
pling.com/p/1463576
Now open a terminal
Code:
cd ~/Downloads
mv Azeny.tar.gz /usr/share/plank/themes
cd /usr/share/plank/themes
tar -xvf Azeny.tar.gz
rm Azeny.tar.gz
Now right click on desktop and go into desktop settings.
Click on the icons tab and change icon type to none.
Now run:
plank --preferences
Turn on Icon Zoom then change position to the left and switch the theme to Azeny.
Go back into panel preferences, click on items, and add a new item. Select App menu plugin.
Shift the app menu plugin's position to second from the top to fix the panel.
Click on app menu and select use CompactMode.
Now go into settings > session and startup session, switch to application autostart and select add.
Name it plank and set the command to plank.
Now exit the ubuntu session and restart.
Now you can add more applications to the plank menu by running them then right clicking their icons to dock them.
Code:
git clone https://github.com/adi1090x/rofi
cd rofi
./setup.sh
cd
cd .config/rofi
rm config.rasi
cd launchers/type-3
nano launcher.sh
change the theme number from 10 to 1
Code:
nano style-1.rasi
Under fullscreen false, change the width to: 1400
Add a line beneath width called height and set it to: 650
Edit background-color to black / 10% --- you can set this to what you like
Scroll down to input bar and change margin to 0% 25%
Scroll down to list view and set scrollbar to true;
pling.com/p/1529470
https://www.iconarchive.com/download/i124716/pictogrammers/material/dots-square.svg
Code:
cd ~/Downloads
unzip xpple_menu.zip
rm xpple_menu.zip
mkdir ~/local/share
mv applications ~/local/share/
mv Pictogrammers-Material-Dots-square.svg ~/local/share/applications
mkdir -p ~/local/share/menu
mv xpple.menu ~/local/share/menu
cd ~/local/share/applications
nano Launchpad.desktop
change Exec=sh -c ~/.config/rofi/launchers/misc/launcher.sh
to Exec=sh -c ~/.config/rofi/launchers/type-3/launcher.sh
Then in applications, drag and drop rofi to your panel and open panel prefs. We can change the icon in here like before.
(/local/share/applications/Pictogrammers-Material-Dots-square.svg)
Spoiler: IF TERMUX KEEPS FORCE CLOSING
Only if you need!
There are / were problems with Android 12 and force closing Termux. To fix this you can run this adb command:
Code:
adb shell device_config put activity_manager max_phantom_processes 2147483647
TERMUX'S KNOWN ISSUES GITHUB LINK
Spoiler: SOURCES
WHAT IS THE DIFFERENCE BETWEEN A WINDOWS MANAGER AND A DESKTOP ENVIRONMENT GUI
Differences in vnc xrdp and gnome desktop:
Some xrdp knowledge, the installer script does not work for this distro:
Ranking linux desktops:
How to use the GNOME Desktop Environment:
How to install gnome in ubuntu --not working:
How to install Gnome on Ubuntu 22.04 LTS Jammy Jellyfish
In this tutorial, we show how to install the GNOME desktop environment as a GUI on Ubuntu 22.04 Jammy Jellyfish Linux.
linuxconfig.org
How to make tasksel work (^):
sudo tasksel install ubuntu-desktop doesn't work
After I type this command and the password nothing happens.
askubuntu.com
A good writeup on gui environments usable in Ubuntu:
ServerGUI - Community Help Wiki
What is the xserver
What is the X server?
I have been using Ubuntu for quite some time but, I have no idea what the X server is? I hear it quite often. I would like to know what the X Server is and what it does. How ~/.xinitrc file is use...
askubuntu.com
Wild tangent on proot-distro origins and one of the devs
Explains ppa repository:
What does "Package <package> has no installation candidate" mean?
What does the above Error mean? What is an installation candidate? I was trying to do sudo apt-get install munin-memcached and I get this message: Reading package lists... Done Building depen...
askubuntu.com
Fix apt-get update “the following signatures couldn’t be verified because the public key is not available”:
Fix apt-get update “the following signatures couldn’t be verified because the public key is not available” :: Chris Jean
chrisjean.com
How to manually add repositories:
How to Fix 'add-apt-repository command not found' on Ubuntu / Debian
How to fix the add-apt-repository command not found error on Ubuntu or Debian in 2 SIMPLE COMMANDS. Learn about Package Management and Software Repositories.
phoenixnap.com
Step by step guide installing xfce:
Install Xfce VNC remote desktop on Ubuntu – ServerOK
XFCE is a lightweight Desktop Environment for Linux. XFCE + vnc allows you to set up a remote desktop on a VPS or dedicated server located in a remote data center or cloud. You can connect to remote…
serverok.in
How to add or delete users in Ubuntu:
How to Add and Remove Users on Ubuntu 20.04
Knowing how to add and remove users is one of the basic skills a Linux user should know. This article explains how to add and remove user accounts on Ubuntu 18.04.
linuxize.com
Make the Ubuntu port look like a traditional ubuntu desktop environment:
Sysv way to get around sysd things (in comments)
How to check processes:
How to Solve libvirt Error Message : Failed to connect socket to '/var/run/libvirt/virtlogd-sock' : No such file or directory - Just Another Sharing Site ...
Having an Ubuntu Linux operating system installed with libvirt daemon or KVM-based virtualization, there is an error suddenly triggered. So, […]
www.dark-hamster.com
How to check if your device supports kvm and other kvm knowledge:
KVM/Installation - Community Help Wiki
Building Android for Qemu -- saving for me
Building Android for Qemu: A Step-by-Step Guide
Developing Linux for Android on Qemu allows you to do some things that are not necessarily possible using the stock emulator.
www.collabora.com
How to list all installed packages:
How to list all installed packages
I'd like to output a list of all installed packages into a text file so that I can review it and bulk-install on another system. How would I do this?
askubuntu.com
Build Your Own Distro With Archiso:
How to edit Tightvncserver password:
TightVNC: Manual Page for vncpasswd(1)
TightVNC - VNC-Compatible Remote Desktop Software
www.tightvnc.com
Showed where xrdp config files are located:
Xrdp - ArchWiki
wiki.archlinux.org
Please note the environments aren't perfect, there's a lot to be discovered and learned here. The way this is built, as improvements are made, the backups can be updated to reflect those changes. Please please do share if you understand how to improve anything or if you know anything about this stuff you want to share. I love learning from you all!
A Very Special Thank You to @ze7zez for taking the time to test the prebuilt, as well as educate us!!
PS I made a mistake in referring to these "Environments" as "Virtual Machines" They are not vms. They share the same kernel as our phone, and therefore are not as secure as a VM. THANKS!
The next "Premade" is a Debian Environment built from scratch with all code provided. It's gui environment is provided by gnome, which I haven't been successful installing in ubuntu
Spoiler: WHAT IT LOOKS LIKE
Spoiler: DEBIAN PREMADE AND BUILDING INSTRUCTIONS
HOW TO INSTALL THE PREMADE:
First Download the Debian Backup: DIRECT DOWNLOAD LINK
Then run this code:
Code:
pkg install x11-repo
pkg update -y
pkg install proot-distro -y
proot-distro install debian
termux-setup-storage
cd storage/downloads
proot-distro restore ./debian-backup.tar.gz
proot-distro login debian
vncserver
HOW TO BUILD YOUR OWN:
You can select your native language this way. It will take 30 mins - an hour to setup
Code:
pkg install x11-repo
pkg update
pkg install proot-distro -y
proot-distro install debian
proot-distro login debian
apt update -y
apt install task-gnome-desktop -y
apt install gnome-session-flashback tightvncserver vim -y
vncserver
vi .vnc/xstartup
Press the letter "i" and then erase everything on screen and paste all of the code below
Code:
#!/bin/sh
autocutsel -fork
xrdb $HOME/.Xresources
gnome-control-center "$VNCDESKTOP Desktop" &
xsetroot -solid grey
export XKL_XMODMAP_DISABLE=1
export XDG_CURRENT_DESKTOP="GNOME-Flashback:Unity"
export XDG_MENU_PREFIX="gnome-flashback-"
unset DBUS_SESSION_BUS_ADDRESS
gnome-session --session=gnome-flashback-metacity --disable-acceleration-check --debug &
When done, press ESC and type :wq to save and exit vim
Now type vncserver and connect to your machine using the port number provided
Source:
Very correctly written instructions.
I don't know if it's Nethunter Kex or Ubuntu's fault, but after logging out of Ubuntu there is some crash with a message about "Connection failed". Restarting Nethunter Kex ends with a java error message and you have to restart the phone.
ze7zez said:
Very correctly written instructions.
I don't know if it's Nethunter Kex or Ubuntu's fault, but after logging out of Ubuntu there is some crash with a message about "Connection failed". Restarting Nethunter Kex ends with a java error message and you have to restart the phone.
Click to expand...
Click to collapse
Thank you for reporting this. I am unsure which it would be, or if it is due to how the distro was backed up and restored, but will see if it can be fixed somehow. This is the first day with the backups, had always just ran it off the scripts and didn't experience that error running it that way. So interesting!
It would be extremely interesting if you described how to open a connection on the local network from a larger PC screen, for example.
The operation of the interface on a smartphone is smooth and efficient, but still, the virtualization of the desktop size is not what is easy to use.
Spoiler: USB HUB / CHROMECAST KNOWLEDGE
@ze7zez
Hi, I know of two ways to achieve this. One requires the use of a usbc hub with an hdmi port, the other uses a tv or device with chromecast built in support.
Using a usbc hub:
This video illustrates that any generic usbc hub with the hdmi port can be attached to your phone and then your tv or monitor and function just like a pc!
I have one from walmart, its super old but it works, cannot find the link but something like this bestbuy one would work
https://www.bestbuy.com/site/belkin-usb-c-hub-4-in-1-multi-port-laptop-dock-with-4k-hdmi-docking-station-with-100w-power-delivery-for-mac-pc-and-more-gray/6452574.p?skuId=6452574
Chromecast mirroring:
Otherwise it is possible if you have a chromecast or a tv / screen with chromecast built in, you could use the "mirroring" feature.
I didn't mean imaging the smartphone screen on a larger screen, because that drains the battery, but using, for example, TightVNC Viewer on a PC.
Spoiler: PROGRESS REMOTING INTO TERMUX
ze7zez said:
I didn't mean imaging the smartphone screen on a larger screen, because that drains the battery, but using, for example, TightVNC Viewer on a PC.
Click to expand...
Click to collapse
Hi it took me all day but I figured it out! We have to do it through termux first. I will explain in full details how to do it tomorrow, have run out of play time for today. This is what termux with a gui looks like and then we can proot into any of our machines like ubuntu
as an edit before i have to go, we can proot in, but it is still just the terminal, so maybe we can install a viewer in this environment to see that machine, not sure!
Spoiler: REMOTING INTO TERMUX WITH RDC
@ze7zez Was able to get free and figured out how to setup tightvncserver in the ubuntu machine, vnc connect to it using the termux package tigervnc-viewer, whilest rdp'd into that termux session with my windows pc.
Here's how:
Okay so in termux we need to install these packages:
Code:
pkg install xfce4 xfce4-goodies tigervnc tigervnc-viewer xrdp vim
Then we need to run this code to be able to edit the rdp init port:
Code:
vim ../usr/etc/xrdp/xrdp.ini
Scroll to the bottom, press the letter "i" and set to port 5901 (change the -1 to 5901)
Now we need to press the ESC key and type :wq to write or save the changes and quit out of vim.
Spoiler: SHOW PIC
Now run:
Code:
xrdp
vncserver -xstartup ../usr/bin/startxfce4 -listen tcp :1
ifconfig
And look for your local ip address
Spoiler: SHOW EXAMPLE
We will use this ip address in windows rdp client. Search in windows for "RDP" and open the Remote Desktop Connection App. type in your local IP address. If you did everything correctly you will be presented with the xrdp login screen and need to enter your vnc password. Then you will be all set!
Then if you want to connect to a premade machine, open a new terminal window and type in:
Code:
proot-distro login ubuntu
Do not change user yet.
Code:
apt install tightvncserver
Change user now
Code:
su zero
tightvncserver
Set a password again and note the port number it tells you.
Now open a new terminal in termux and type:
vncviewer
This will open a new window, type in:
127.0.0.1: and add the port number tightvncserver told you after the :
(mine was 127.0.0.1:2)
Crappy video example I took of the rdps
PS Thank You so much for asking about this x.x my gosh this will make playing with these things so much easier now.
Spoiler: SOURCE
Source where I learned some of this stuff:
pkg install xfce4 xfce4-goodies tigervnc tigervnc-viewer xrdp vim requires another 1271 MB of disk space, unfortunately. Currently, since the beginning of the installation of the components, it already occupies 2980 MB. I think that it is not necessary to add another desktop environment, but to use the existing one and pkg install x11vnc. I will test it this coming weekend.
ze7zez said:
pkg install xfce4 xfce4-goodies tigervnc tigervnc-viewer xrdp vim requires another 1271 MB of disk space, unfortunately. Currently, since the beginning of the installation of the components, it already occupies 2980 MB. I think that it is not necessary to add another desktop environment, but to use the existing one and pkg install x11vnc. I will test it this coming weekend.
Click to expand...
Click to collapse
Thank you so much! I didn't even think about how much storage it was using, if you could reduce that, that would help folks a lot! I appreciate you taking the time and look forward to anything you share. I had no idea any of this existed until now (or yesterday haha) so... yay!
It is worth doing in ubuntu apt install net-tools
So far I'm trying, but x11vnc doesn't start properly.
I prepared x11vnc configuration for later for easy session opening in TightVNC Viewer on PC. The session password is zero.
Code:
echo "zero" > /home/zero/.vnc/passvnc
echo "-forever" > /home/zero/.x11vncrc
echo "-shared" >> /home/zero/.x11vncrc
echo "-passwdfile /home/zero/.vnc/passvnc" >> /home/zero/.x11vncrc
There is no need to install anything else.
I used >this< help.
USB debugging should be enabled on the phone.
On the smartphone in termux I typed:
proot-distro login ubuntu (I used history. Execute the history command and read the command number, type the command number e.g. !11)
su zero
vncstart
and read the VNC server's assigned port 5904.
After connecting the smartphone to USB (you can also connect the phone to a local WiFi router), I typed adb forward tcp:5904 tcp:5904 in the terminal on the PC and opened the connection on the PC via TightVNC Viewer.
The PC mouse and keyboard work smoothly.
edit
====
There is no error after logging out ubuntu in TightVNC Viewer that occurred after logging out in Nethunter Kex.
In order to easily use commands in termux in android, it is useful to install a simple GUI fluxbox environment with a terminal:
pkg install aterm fluxbox
Once fluxbox& is running, you can open a termux session in TightVNC Viewer and you will see a gray fluxbox desktop. Use the right mouse button to open the terminal and type commands in termux, for example by pasting them (middle mouse button) from the Windows clipboard.
@ze7zez Thank You sosososo much for these shares. I finally have time to work through all this and will try to get the guide and machine updated in the next day or two with the steps you shared and credits to you. I really appreciate your time and most especially how you explained what fluxbox actually is. I had read that page before but I didn't understand fully what it was telling us. Thank you so much.
jenneh said:
(...)
The machines are built from user submitted scripts that use proot. I am not the Author of the script that built this machine. The Honor lies HERE ( Source - Github)
(...)
Click to expand...
Click to collapse
It is worth building a new ubuntu.tar.gz from scratch, because of the audio output repair. I made one unsuccessful attempt, but ended up with no root access on the phone.
I thought about creating a proot-distro for another linux distribution since there are not many on https://github.com/termux/proot-distro
However, the above problem showed me that I don't have enough time to do that.
ze7zez said:
It is worth building a new ubuntu.tar.gz from scratch, because of the audio output repair. I made one unsuccessful attempt, but ended up with no root access on the phone.
I thought about creating a proot-distro for another linux distribution since there are not many on https://github.com/termux/proot-distro
However, the above problem showed me that I don't have enough time to do that.
Click to expand...
Click to collapse
Oh goodness I had read about root users having trouble with these things, because of the shared kernel, I am going to add a warning to the thread to help warn others about this. I'm sorry for your trouble on that front but I am glad you reported it. Thank you for suggesting to build a new ubuntu from scratch, I agree. I finally finished writing up a guide that will show the remoting part separately from this thread, so I don't confuse new users too much... So expect an @ later on when it's published. Then I'll do my best to build a new ubuntu machine with the steps now that we kinda understand whats going on here a little better.
Hello the thread has been completely reworked with a new ubuntu vm built from scratch, that is half the size of the original share (394MB)
The build instructions were provided as well, so now anyone can make a distro in their preferred language. (after running the apt install xfce4 command, at some point you will be able to set this up)
Spoiler: BROWSERS FIX
Hi There! The Ubuntu distro poses some problems when trying to install certain packages like firefox or chromium due to snapd and it's inability to operate correctly in android. Therefore we have to manually add the repositories so apt install will fetch the right repository and not the silly snap. (I may or may not be explaining that correctly, feel free to correct me if you know)
Here is how to fix the problem and install your browsers:
Code:
echo "deb http://ftp.debian.org/debian stable main contrib non-free" >> /etc/apt/sources.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys 648ACFD622F3D138
apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys 605C66F00D6C9793
apt update
apt install firefox-esr
apt install chromium
nano /usr/share/applications/chromium.desktop
press ctrl + w and search for "exec"
then add --no-sandbox after chromium
SOURCE
As an edit, another premade has been added to the OP with Chromium and Firefox preinstalled.
The guide has been updated with steps how to connect to the ubuntu environment with windows remote desktop connection. A new premade has been added as well with the RDP already setup.

Categories

Resources