[MATH] Octave on Android! - Android Software Development

Who nowadays doesn't need, while on train, to know the eigenvalues of a square matrix?
{
"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"
}
...or don't you ever need to immediately solve a polinomial equation while on Holidays?
For all these - and even more - already exists a great Open Source Software called
OCTAVE
Well, stating that I'm not a true developer nor a true mathematician and that I needed a lot of time and a lot of googling, I was able to compile an Octave Working binary for Android !
Here there is a stripped archive ready to be unpacked into /data/local (octave.tar.gz) but, beware, it's 93Mb weighty, so you must check for enough free space in your internal memory...
I'm on a Galaxy Mini with Internal Memory expanded onto SD Card, so no problems for me... (- - - [ EDIT:in post n. 5 you find a tricked release with non need of internal memory ]- - - )
- - - [ EDIT: In my next post you find an updated version with readline and many more math stuffs compiled in! ] - - -
Once Unpacked you can simply run it from PC with "adb shell" or directly from the phone with a "Terminal Emulator" application, typing the following command:
Code:
$ /data/local/octave.sh
P.S, You probably need a rooted phone to extract the archive into /data/local but, after that, you can use it without any root permission...
Actually I disabled many octave features to build it ("native graphics", "opengl", "texinfo" and many others) and fixed the "library run path" of the shared objects immediately after...
This means that you must run the binary on /data/local, otherwise it will not work (not finding dependencies and needed shared libraries)...
...working on it...

U not a true dev Doc?
U must be kidding, ppl like u are the heartbeat of xda. U must be a Rec Dev!
Thanks for this...not sure how useful this is going to be for me, always admired ur work!
edit: sry still have not tried it...i'm thinking of rooting my mini ur way, and will try this after that. I've been using cm7 but now back to stock to try a few things ur things.

Added some stuffs to the octave binary...
Here there is a new compiled version of octave 3.2.4 for Android...
Just added support to ncurses and readline and to several math improvements...
Actually the binary still lacks "arpack", "fftw3", "cholmod", "umfpack" and "qhull" libraries...
Of course no "native graphics" support (I think I'll cannot do it...) but, so forth, I think it's really a usable version for students and so on...
HOW I DID IT!
Chapter 1 - the cross compiler toolchain
I could not immediately use one of the toolchains freely distributed on the net because they usually lack fortran language, so I made one on my own...
I work on a Gentoo LinuX Distribution 64Bit No multilib... briefly I made a chroot environment locked to 32bit executables, binaries and libraries... inside that jail I compiled a cross toolchain using the wonderful package "Crossdev"!
My working parts of the toolchian are:
binutils-2.22
gcc-4.5.3 with gfortran enabled
glibc-2.14.1
kernel-headers-2.35.7
Finally I choose the followin tuplet as the name for this local toolchain:
arm-vfp-linux-gnueabi
Actually it was a "no effort" step... my Gentoo made everything I asked for
Chapter 2 - compiling octave dependencies from scratch
I had to compile several dependencies and then octave itself... in the following I report the console commands used for any of them assuming that I'm always inside their working source directory.
I prepared a sysroot environment on my PC starting from /data/local to meet my android path and to avoid strange configurations during compile time...
That is: /data/local is /data/local everywhere...
Man Pages 3.38
Code:
make prefix=/data/local/usr install
ZLib 1.26
Code:
CC="arm-vfp-linux-gnueabi-gcc" CXX="arm-vfp-linux-gnueabi-g++" AR="arm-vfp-linux-gnueabi-ar" AS="arm-vfp-linux-gnueabi-as" RANLIB="arm-vfp-linux-gnueabiranlib" LD="arm-vfp-linux-gnueabi-ld" STRIP="arm-vfp-linux-gnueabi-strip" ./configure --prefix=/data/local/usr --shared
make
make install
cp /usr/arm-vfp-linux-gnueabi/lib/libc-2.14.1.so /data/local/usr/lib/libc.so.6
cp /usr/arm-vfp-linux-gnueabi/lib/ld-2.14.1.so /data/local/usr/lib/ld-linux.so.3
cp /usr/arm-vfp-linux-gnueabi/lib/libdl-2.14.1.so /data/local/usr/lib/libdl.so.2
cp /usr/lib/gcc/arm-vfp-linux-gnueabi/4.5.3/libgcc_s.so /data/local/usr/lib/
cp /usr/lib/gcc/arm-vfp-linux-gnueabi/4.5.3/libgcc_s.so.1 /data/local/usr/lib/
cp /usr/arm-vfp-linux-gnueabi/lib/libm-2.14.1.so /data/local/usr/lib/libm.so.6
cp /usr/lib/gcc/arm-vfp-linux-gnueabi/4.5.3/libstdc++.so.6.0.14 /data/local/usr/lib/libstdc++.so.6
cp /usr/arm-vfp-linux-gnueabi/lib/libpthread-2.14.1.so /data/local/usr/lib/libpthread.so.0
XZ 5.0.3
Code:
./configure --prefix=/data/local/usr --host=arm-vfp-linux-gnueabi
make
make install
Ncurses 5.9
Code:
./configure --prefix=/data/local/usr --host=arm-vfp-linux-gnueabi --with-shared
getting this message: ** Include-directory is not in a standard location
make
make install
ReadLine 6.2
Code:
./configure --prefix=/data/local/usr --host=arm-vfp-linux-gnueabi --with-curses
make
make install
BLAS (march 2007)
I edited the make.inc file adding/changing the following lines:
Code:
#PLAT = _LINUX
FORTRAN = arm-vfp-linux-gnueabi-gfortran
LOADER = arm-vfp-linux-gnueabi-gfortran
ARCH = arm-vfp-linux-gnueabi-ar
RANLIB = arm-vfp-linux-gnueabi-ranlib
and the compiled with
Code:
make clean
make
cp blas.a /data/local/usr/lib/
cp /usr/lib/gcc/arm-vfp-linux-gnueabi/4.5.3/libgfortran.so.3.0.0 /data/local/usr/lib/libgfortran.so.3
Lapack 3.4.0
I edited the make.inc file adding/changing the following lines:
Code:
FORTRAN = arm-vfp-linux-gnueabi-gfortran
LOADER = arm-vfp-linux-gnueabi-gfortran
ARCH = arm-vfp-linux-gnueabi-ar
RANLIB = arm-vfp-linux-gnueabi-ranlib
BLASLIB = /data/local/usr/lib/blas.a
and then compiled with
Code:
cd SRC
make clean
make
cd ..
cp lib{lapack,tmglib}.a /data/local/usr/lib/
UFconfig 3.7.0
Code:
CC="arm-vfp-linux-gnueabi-gcc" CXX="arm-vfp-linux-gnueabi-g++" AR="arm-vfp-linux-gnueabi-ar" AS="arm-vfp-linux-gnueabi-as" RANLIB="arm-vfp-linux-gnueabiranlib" LD="arm-vfp-linux-gnueabi-ld" STRIP="arm-vfp-linux-gnueabi-strip" make
cp libufconfig.a /data/local/usr/lib
cp UFconfig.h /data/local/usr/include
chmod 0644 /data/local/usr/lib/libufconfig.a
chmod 0644 /data/local/usr/include/UFconfig.h
AMD 2.2.3
Code:
cd Lib
CC="arm-vfp-linux-gnueabi-gcc" Cf="arm-vfp-linux-gnueabi-gfortran" ARCHIVE="arm-vfp-linux-gnueabi-ar" RANLIB="arm-vfp-linux-gnueabiranlib" make
cd ..
cp Lib/libamd.a /data/local/usr/lib
cp Include/amd.h /data/local/usr/include
chmod 0644 /data/local/usr/lib/libamd.a
chmod 0644 /data/local/usr/include/amd.h
CAMD 2.2.3
Code:
cd Lib
CC="arm-vfp-linux-gnueabi-gcc" Cf="arm-vfp-linux-gnueabi-gfortran" ARCHIVE="arm-vfp-linux-gnueabi-ar" RANLIB="arm-vfp-linux-gnueabiranlib" make
cd ..
cp Lib/libcamd.a /data/local/usr/lib
cp Include/camd.h /data/local/usr/include
chmod 0644 /data/local/usr/lib/libcamd.a
chmod 0644 /data/local/usr/include/camd.h
COLAMD 2.7.4
Code:
cd Lib
CC="arm-vfp-linux-gnueabi-gcc" Cf="arm-vfp-linux-gnueabi-gfortran" ARCHIVE="arm-vfp-linux-gnueabi-ar" RANLIB="arm-vfp-linux-gnueabiranlib" make
cd ..
cp Lib/libcolamd.a /data/local/usr/lib
cp Include/colamd.h /data/local/usr/include
chmod 0644 /data/local/usr/lib/libcolamd.a
chmod 0644 /data/local/usr/include/colamd.h
CCOLAMD 2.7.4
Code:
cd Lib
CC="arm-vfp-linux-gnueabi-gcc" Cf="arm-vfp-linux-gnueabi-gfortran" ARCHIVE="arm-vfp-linux-gnueabi-ar" RANLIB="arm-vfp-linux-gnueabiranlib" make
cd ..
cp Lib/libccolamd.a /data/local/usr/lib
cp Include/ccolamd.h /data/local/usr/include
chmod 0644 /data/local/usr/lib/libccolamd.a
chmod 0644 /data/local/usr/include/ccolamd.h
CHOLMOD
Code:
cd Lib
CC="arm-vfp-linux-gnueabi-gcc" Cf="arm-vfp-linux-gnueabi-gfortran" ARCHIVE="arm-vfp-linux-gnueabi-ar" RANLIB="arm-vfp-linux-gnueabiranlib" make
cd ..
cp Lib/libcholmod.a /data/local/usr/lib
cp Include/cholmod.h /data/local/usr/include
chmod 0644 /data/local/usr/lib/libcholmod.a
chmod 0644 /data/local/usr/include/cholmod.h
UMFPACK 5.5.2
Code:
cd Lib
CC="arm-vfp-linux-gnueabi-gcc" Cf="arm-vfp-linux-gnueabi-gfortran" ARCHIVE="arm-vfp-linux-gnueabi-ar" RANLIB="arm-vfp-linux-gnueabiranlib" make
cd ..
cp Lib/libumfpack.a /data/local/usr/lib
cp Include/umfpack.h /data/local/usr/include
chmod 0644 /data/local/usr/lib/libumfpack.a
chmod 0644 /data/local/usr/include/umfpack.h
CXSparse 2.2.6
Code:
cd Lib
CC="arm-vfp-linux-gnueabi-gcc" Cf="arm-vfp-linux-gnueabi-gfortran" ARCHIVE="arm-vfp-linux-gnueabi-ar" RANLIB="arm-vfp-linux-gnueabiranlib" make
cd ..
cp Lib/libcxsparse.a /data/local/usr/lib
cp Include/cs.h /data/local/usr/include
chmod 0644 /data/local/usr/lib/libcxsparse.a
chmod 0644 /data/local/usr/include/cs.h
ARPACK 96
I edited the ARmake.inc file:
Code:
home = $(HOME)/builds/ARPACK
DIRS = $(UTILdir) $(SRCdir)
ARPACKLIB = $(home)/libarpack.a
LAPACKLIB = /data/local/usr/lib/lapack.a
BLASLIB = /data/local/usr/lib/blas.a
#PLAT = SUN4
FC = arm-vfp-linux-gnueabi-gfortran
FFLAGS = -O
MAKE = make
SHELL = sh
AR = arm-vfp-linux-gnueabi-ar
RANLIB = arm-vfp-linux-gnueabi-ranlib
and then compiled with
Code:
make lib
cp libarpack.a /data/local/usr/lib
fftw 3.3.1
Code:
./configure --prefix=/data/local/usr --host=arm-vfp-linux-gnueabi --enable-shared
make
make install
glpk 4.47
Code:
./configure --prefix=/data/local/usr --host=arm-vfp-linux-gnueabi
make
make install
QRupdate 1.1.1
I edited Makeconf:
Code:
FC=arm-vfp-linux-gnueabi-gfortran
#BLAS=-lblas
#LAPACK=-llapack
PREFIX=/data/local/usr
and compiled with
Code:
make solib
cp libqrupdate.so /data/local/usr/lib/libqrupdate.so.1
qhull 2010.1
I edited directly Makefile this way:
Code:
BINDIR = /data/local/usr/bin
MANDIR = /data/local/usr/man/man1
CC = arm-vfp-linux-gnueabi-gcc
# ar -r libqhull.a $(OBJS)
arm-vfp-linux-gnueabi-ar -r libqhull.a $(OBJS)
# -test -x /bin/ranlib -o -x /usr/bin/ranlib && ranlib libqhull.a
arm-vfp-linux-gnueabi-ranlib libqhull.a
removing lines where test programs are lanched (arm binaries on linux host don't obviously work) and compiling
Code:
make
make install
cp libqhull.a /data/local/usr/lib
mkdir /data/local/usr/include/qhull
cp qhull_a.h /data/local/usr/include/qhull/qhull_a.h
chmod 0644 /data/local/usr/lib/libqhull.a
chmod 0644 /data/local/usr/include/qhull/qhull_a.h
PCRE 8.30
Code:
./configure --prefix=/data/local/usr --host=arm-vfp-linux-gnueabi
make
make install
Chapter 3 - compiling octave 3.2.4
configure script
I removed from the configure script few lines, where it tries to launch test programs failing (arm binaries on i686 machine...)
This is the 'diff' output after editing:
Code:
14710,14714c14710,14714
< { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
< $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
< as_fn_error "cannot run test program while cross compiling
< See \`config.log' for more details." "$LINENO" 5; }
< else
---
> # { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
> #$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
> #as_fn_error "cannot run test program while cross compiling
> #See \`config.log' for more details." "$LINENO" 5; }
> #else
15763,15767c15763,15767
< { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
< $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
< as_fn_error "cannot run test program while cross compiling
< See \`config.log' for more details." "$LINENO" 5; }
< else
---
> # { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
> #$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
> #as_fn_error "cannot run test program while cross compiling
> #See \`config.log' for more details." "$LINENO" 5; }
> #else
configuration options
Code:
CPPFLAGS="-I/data/local/usr/include" LDFLAGS="-L/data/local/usr/lib" ./configure --host=arm-vfp-linux-gnueabi --with-x=no --prefix=/data/local/usr --with-blas=/data/local/usr/lib/blas.a --with-lapack=/data/local/usr/lib/liblapack.a --disable-freetypetest --without-framework-carbon --without-framework-opengl --disable-docs
Actually I cannot set correctly umfpack, cholmod, arpack, fftw and qhull (working on them)
configuration TRICK
I took several days to figure out this trick: even if I disable "native graphics", opengl and "carbon framework" I got errors dealing with Linux X-Windows System...
Finally, I removed from two lines in config.status script (generated with the previous command) any reference to X_WINDOWS:
Code:
-DHAVE_X_WINDOWS=1
and
Code:
D["HAVE_X_WINDOWS"]=" 1"
And I relaunched immediately config.status to propagate these options:
Code:
./config.status
compiler time
Code:
make
make install
Yes... That's All
Chapter 4 - Post Install tweaks
I decided to compile octave with shared libraries to avoid very huge binaries...
...So, first of all, I strip unwanted debug symbols from all libraries and binaries, saving about 200Mb...
Code:
arm-vfp-linux-gnueabi-strip --strip-unneeded /data/local/usr/lib/octave-3.2.4/*
arm-vfp-linux-gnueabi-strip --strip-unneeded /data/local/usr/lib/* 2>/dev/null
arm-vfp-linux-gnueabi-strip --strip-debug /data/local/usr/bin/* 2>/dev/null
Now I must deal with libraries who want references to my cross toolchain inside my PC..
using a program called patchelf I check binaries and libraries one by one changing links from my PC to the generic /data/local/usr wherever it is...
Code:
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libz.so.1.2.6
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libc.so.6
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libdl.so.2
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libm.so.6
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libgcc_s.so.1
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libstdc++.so.6
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libpthread.so.0
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/liblzma.so.5.0.3
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libform.so.5.9
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libmenu.so.5.9
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libncurses.so.5.9
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libpanel.so.5.9
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/clear
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/infocmp
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/tabs
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/tic
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/toe
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/tput
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/tset
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libgfortran.so.3
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libfftw3.so.3.3.1
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libglpk.so.0.32.0
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libqrupdate.so.1
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/qconvex
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/qdelaunay
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/qhalf
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/qhull
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/qvoronoi
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/rbox
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libpcre.so.1.0.0
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/libpcrecpp.so.0.0.0
patchelf --set-rpath /data/local/usr/lib /data/local/usr/bin/octave-3.2.4
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/octave-3.2.4/libcruft.so.3.2.4
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/octave-3.2.4/liboctinterp.so.3.2.4
patchelf --set-rpath /data/local/usr/lib /data/local/usr/lib/octave-3.2.4/liboctave.so.3.2.4
After that I remove symbolic links, not needed on Android while not compiling there anything else (...for now...), some static libraries and duplicates not needed too:
Code:
rm /data/local/usr/lib/libz.a
rm /data/local/usr/lib/libz.so
rm /data/local/usr/lib/libz.so.1
mv /data/local/usr/lib/libz.so.1.2.6 /data/local/usr/lib/libz.so.1
rm /data/local/usr/lib/liblzma.{a,la}
rm /data/local/usr/lib/liblzma.so
rm /data/local/usr/lib/liblzma.so.5
mv /data/local/usr/lib/liblzma.so.5.0.3 /data/local/usr/lib/liblzma.so.5
rm /data/local/usr/lib/lib{form,form_g,menu,menu_g,ncurses++,ncurses,ncurses_g,panel,panel_g}.a
rm /data/local/usr/lib/libform.so
rm /data/local/usr/lib/libform.so.5
mv /data/local/usr/lib/libform.so.5.9 /data/local/usr/lib/libform.so.5
rm /data/local/usr/lib/libmenu.so
rm /data/local/usr/lib/libmenu.so.5
mv /data/local/usr/lib/libmenu.so.5.9 /data/local/usr/lib/libmenu.so.5
rm /data/local/usr/lib/libncurses.so
rm /data/local/usr/lib/libncurses.so.5
mv /data/local/usr/lib/libncurses.so.5.9 /data/local/usr/lib/libncurses.so.5
rm /data/local/usr/lib/libpanel.so
rm /data/local/usr/lib/libpanel.so.5
mv /data/local/usr/lib/libpanel.so.5.9 /data/local/usr/lib/libpanel.so.5
rm /data/local/usr/lib/lib{history,readline}.a
rm /data/local/usr/lib/libhistory.so
rm /data/local/usr/lib/libhistory.so.6
mv /data/local/usr/lib/libhistory.so.6.2 /data/local/usr/lib/libhistory.so.6
rm /data/local/usr/lib/libreadline.so
rm /data/local/usr/lib/libreadline.so.6
mv /data/local/usr/lib/libreadline.so.6.2 /data/local/usr/lib/libreadline.so.6
rm /data/local/usr/lib/libfftw3.{a,la}
rm /data/local/usr/lib/libfftw3.so
rm /data/local/usr/lib/libfftw3.so.3
mv /data/local/usr/lib/libfftw3.so.3.3.1 /data/local/usr/lib/libfftw3.so.3
rm /data/local/usr/lib/libglpk.{a,la}
rm /data/local/usr/lib/libglpk.so
rm /data/local/usr/lib/libglpk.so.0
mv /data/local/usr/lib/libglpk.so.0.32.0 /data/local/usr/lib/libglpk.so.0
rm /data/local/usr/lib/libpcre.{a,la}
rm /data/local/usr/lib/libpcrecpp.{a,la}
rm /data/local/usr/lib/libpcreposix.{a,la}
rm /data/local/usr/lib/libpcre.so
rm /data/local/usr/lib/libpcre.so.1
mv /data/local/usr/lib/libpcre.so.1.0.0 /data/local/usr/lib/libpcre.so.1
rm /data/local/usr/lib/libpcrecpp.so
rm /data/local/usr/lib/libpcrecpp.so.0
mv /data/local/usr/lib/libpcrecpp.so.0.0.0 /data/local/usr/lib/libpcrecpp.so.0
rm /data/local/usr/lib/libpcreposix.so
rm /data/local/usr/lib/libpcreposix.so.0
mv /data/local/usr/lib/libpcreposix.so.0.0.0 /data/local/usr/lib/libpcreposix.so.0
mv /data/local/usr/lib/octave-3.2.4/* /data/local/usr/lib
rmdir /data/local/usr/lib/octave-3.2.4/
rm /data/local/usr/lib/libcruft.so
mv /data/local/usr/lib/libcruft.so.3.2.4 /data/local/usr/lib/libcruft.so
rm /data/local/usr/lib/liboctave.so
mv /data/local/usr/lib/liboctave.so.3.2.4 /data/local/usr/lib/liboctave.so
rm /data/local/usr/lib/liboctinterp.so
mv /data/local/usr/lib/liboctinterp.so.3.2.4 /data/local/usr/lib/liboctinterp.so
chmod 0644 /data/local/usr/lib/lib*
chmod 0755 /data/local/usr/lib/ld-linux.so.3
wow... did I really do this? I don't believe it...
Chapter 5 - Final stuffs and packaging
I created a really simple bash script to use like a wrapper for the octave binary:
Code:
echo '#!/system/bin/sh' > /data/local/octave.sh
echo "export HOME=/data/local/tmp" >> /data/local/octave.sh
echo "/data/local/usr/lib/ld-linux.so.3 /data/local/usr/bin/octave" >> /data/local/octave.sh
chmod 0755 /data/local/octave.sh
This wrapper is mandatory! I don't want to change the phone behaviour changing libraries path and similar environment variables... I could make unusable something else already installed on the phone...
I prefer to call the binary with this command
Code:
/data/local/usr/lib/ld-linux.so.3 /data/local/usr/bin/octave
and after that any binary or Library perfectly knows where to find what needed: /data/local/usr
root permissions and packaging
I issued these commands from my PC as superuser fixing octave permissions to the phone "shell" user... I'll use it later on the phone...
Code:
chown -R 2000:2000 /data/local/usr
chown -R 2000:2000 /data/local/octave.sh
cd /data/local
tar -cpf octave.tar octave.sh usr/
gzip octave.tar
chown -R 2000:2000 /data/local/octave.tar.gz
Finally I copy the archive onto the Sdcard
Code:
adb push /data/local/octave.tar.gz /sdcard/
and from there I install in the right place (rooted phone needed here!) with these "adb shell" commands:
Code:
$ su
# cd /data/local
# tar xpf /sdcard/octave.tar.gz
# exit
$
Chapter 6 - Daily usage
from "adb shell" or "Terminal Emulator" (no root needed anymore) I simply call the wrapper:
Code:
$ [b]/data/local/octave.sh[/b]
[color=gray]GNU Octave, version 3.2.4
Copyright (C) 2009 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.
Octave was configured for "arm-vfp-linux-gnueabi".
Additional information about Octave is available at http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html
Report bugs to <[email protected]> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).
For information about changes from previous versions, type `news'.
octave:1> [/color]
This is the link to the last version of the binary (140Mb huge)

Hi to all. I tried to run octave from sd but i have the error "permission denied". I have to run this program only from /data/local? I don't have enough space...
This is a great project!

Not enough space? Now Octave asks for 10Kb max...
First of all really many thanks to mortadelax, who's helping me around an "octave reboot issue on Xperia mini"; not solved yet, but we figured out a method to launch octave binary from SDCard... only 10Kb needed on internal memory
...maybe a bit slower but now usable on low memory phones too...
Just a step back anyway: this release lack several math stuffs, which will be added as soon as possible... we used a different toolchain and a different "shared libraries approach" (I'll explain everything later on) on a bare octave suite...
What's the trick?
Almost any android kernel has the loopback device support built in... let's use it!
By the way we need a rooted/busyboxed phone otherwise the trick will not work...
HOWTO
1)
In this archive (octave-3.2.4-shell_files.tar) we find three shell scripts. We need to put them into
/data/local/
as usual...
2)
Download the octave archive (octave-3.2.4.disk.gz) and unzip it into the sdcard. You'll get this file:
/sdcard/octave-3.2.4.disk
it's a file with a true filesystem inside.
3)
Use the first script provided from the terminal of your choice being superuser:
Code:
$ su
# /data/local/octave-mount.sh
Mounting octave Disk...
All done!
Remember to unmount octave disk when finished with it.
#
This script Tells Android to use the latter file exactly like an Hard Disk (it's called loopback device) starting from /data/local/usr/ folder as usual.
4)
Octave on the Rock!
Use the second script provided to use octave as you wish; no need to be superuser:
Code:
$ [b]/data/local/octave.sh[/b]
[color=gray]GNU Octave, version 3.2.4
Copyright (C) 2009 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.
Octave was configured for "arm-214-linux-gnueabi".
Additional information about Octave is available at http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html
Report bugs to <[email protected]> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).
For information about changes from previous versions, type `news'.
octave-3.2.4:1>[/color]
If you need to save workspace, or something else, to disk you'll find everything in the SDcard in a folder called /sdcard/octave-3.2.4. When finished your math jobs simply exit from octave:
Code:
octave-3.2.4:46> exit
$
5)
Use the third script provided to tell Android to close the loopback device (root user needed):
Code:
# /data/local/octave-unmount.sh
UnMounting octave Disk...
All done!
#
That's all
Now working on a release full of math stuffs... please hold on!

Is this project dead???

Related

Vogue Android in depth Rom Building guide requested

Hi all , i am a new android user and would like to have a go a biulding some custom roms, Now i have no experiene with linux.. well the last 3days.. lol, and i have read the how to make a hero rom txt from the vogue - hero site and while that maybe suffucient for others to get up and away with rom building its not for me, So i am wondering if there is a more in depth step by step guide for not only a new android user but a new linux user also, would be very much appreciated
ok so there hasnt been much of a respone so ill share the steps i have so far
1. I installed Ubuntu linux ( Dual Boot with win 7 )
2. Needed to know how to install Squashfs did a search on google found this
A) open terminal window ( Ubuntu start menu, accessories )
B) type: sudo aptitude search squashfs , u will be prompted for password
this is what happened with mine:
[email protected]:~$ sudo aptitude search squashfs
[sudo] password for ali3nfr3ak:
i squashfs-tools - Tool to create and append to squashfs filesystems
C) type this command:sudo apt-get install squashfs-tools
My Dialog ( ihad to uninstall and then reinstall to get this so mine will be alittle different to
yours
[email protected]:~$ sudo apt-get install squashfs-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
squashfs-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/122kB of archives.
After this operation, 319kB of additional disk space will be used.
Selecting previously deselected package squashfs-tools.
(Reading database ... 115049 files and directories currently installed.)
Unpacking squashfs-tools (from .../squashfs-tools_1%3a4.0-1_i386.deb) ...
Processing triggers for man-db ...
Setting up squashfs-tools (1:4.0-1) ...
[email protected]:~$
C) all done close terminal i type: exit
3: Next for testing purposes download this Google-Android-Ion-v1.5-2009-10-23-sdcard-not-google-apps and etract this and placed a copy of system.sqsh into it s own directory
4: i then opened another terminal window ( easier to copy and paste show you what my window looks like
[email protected]:~$ dir
Desktop Documents Downloads examples.desktop HERO Music Pictures Public Templates Videos
[email protected]:~$ cd HERO
[email protected]:~/HERO$ dir
Testing
[email protected]:~/HERO$ cd Testing
[email protected]:~/HERO/Testing$ dir
system.sqsh
[email protected]:~/HERO/Testing$ unsquashfs system.sqsh
Parallel unsquashfs: Using 2 processors
650 inodes (1408 blocks) to write
[=====================================================================================================================================================-] 1408/1408 100%
created 650 files
created 45 directories
created 0 symlinks
created 0 devices
created 0 fifos
[email protected]:~/HERO/Testing$ dir
squashfs-root system.sqsh
[email protected]:~/HERO/Testing$
basicially u can use the same commands as windows but with out the / and the spelling and Capitial letters have to be exact
Windows
/dir
/cd hero
Linux
dir
cd HERO
A new folder is created called squashfs-root which has all the files/ folders from the system.sqsh u just decompressed ( my description )
and that is a far as i have got so far
ali3nfr3ak said:
Hi all , i am a new android user and would like to have a go a biulding some custom roms, Now i have no experiene with linux.. well the last 3days.. lol, and i have read the how to make a hero rom txt from the vogue - hero site and while that maybe suffucient for others to get up and away with rom building its not for me, So i am wondering if there is a more in depth step by step guide for not only a new android user but a new linux user also, would be very much appreciated
Click to expand...
Click to collapse
If you still have that txt, would you mind hosting or pasting it here? I've been asking around for a copy and everyone seems to have lost it.
clockworx said:
If you still have that txt, would you mind hosting or pasting it here? I've been asking around for a copy and everyone seems to have lost it.
Click to expand...
Click to collapse
same here. trying to make my first rom also
How-To-Make-A-Hero-ROM.TXT attached
MUCH appreciated!
updated 1st post with my very linux noob steps lol
having alittle trouble anyone can someone shed some light please
[email protected]:/home/ali3nfr3ak/Downloads/HERO2# genext2fs -d ./system -b 180000 -a system.ext2
genext2fs: invalid option -- 'a'
genext2fs: Note: options have changed, see --help or the man page.
[email protected]:/home/ali3nfr3ak/Downloads/HERO2# genext2fs -help
Usage: genext2fs [options] image
Create an ext2 filesystem image from directories/files
-x, --starting-image <image>
-d, --root <directory>
-D, --devtable <file>
-b, --size-in-blocks <blocks>
-i, --bytes-per-inode <bytes per inode>
-N, --number-of-inodes <number of inodes>
-m, --reserved-percentage <percentage of blocks to reserve>
-g, --block-map <path> Generate a block map file for this path.
-e, --fill-value <value> Fill unallocated blocks with value.
-z, --allow-holes Allow files with holes.
-f, --faketime Set filesystem timestamps to 0 (for testing).
-q, --squash Same as "-U -P".
-U, --squash-uids Squash owners making all files be owned by root.
-P, --squash-perms Squash permissions on all files.
-h, --help
-V, --version
-v, --verbose
and
[email protected]:/home/ali3nfr3ak/Downloads/HERO2# mkdir rootfs-mount
[email protected]:/home/ali3nfr3ak/Downloads/HERO2# mount -o loop rootfs.img
mount: can't find rootfs.img in /etc/fstab or /etc/mtab
ali3nfr3ak said:
having alittle trouble anyone can someone shed some light please
[email protected]:/home/ali3nfr3ak/Downloads/HERO2# genext2fs -d ./system -b 180000 -a system.ext2
genext2fs: invalid option -- 'a'
genext2fs: Note: options have changed, see --help or the man page.
[email protected]:/home/ali3nfr3ak/Downloads/HERO2# genext2fs -help
Usage: genext2fs [options] image
Create an ext2 filesystem image from directories/files
-x, --starting-image <image>
-d, --root <directory>
-D, --devtable <file>
-b, --size-in-blocks <blocks>
-i, --bytes-per-inode <bytes per inode>
-N, --number-of-inodes <number of inodes>
-m, --reserved-percentage <percentage of blocks to reserve>
-g, --block-map <path> Generate a block map file for this path.
-e, --fill-value <value> Fill unallocated blocks with value.
-z, --allow-holes Allow files with holes.
-f, --faketime Set filesystem timestamps to 0 (for testing).
-q, --squash Same as "-U -P".
-U, --squash-uids Squash owners making all files be owned by root.
-P, --squash-perms Squash permissions on all files.
-h, --help
-V, --version
-v, --verbose
and
[email protected]:/home/ali3nfr3ak/Downloads/HERO2# mkdir rootfs-mount
[email protected]:/home/ali3nfr3ak/Downloads/HERO2# mount -o loop rootfs.img
mount: can't find rootfs.img in /etc/fstab or /etc/mtab
Click to expand...
Click to collapse
first no -a it doesn't work
[CODEgenext2fs -d ./system -b 180000 system.ext2[/CODE]
then mount it for me i made the directory /mnt/system
Code:
sudo mkdir /mnt/system
sudo mount -o loop /whereever/system.ext2 /mnt/system
then make sure you do not have squashfs-tools 4.0 it wont work
make the sqsh file
Code:
sudo mksquashfs /mnt/system system.sqsh
say rootfs.img was on your desktop
Code:
sudo mkdir /mnt/rootfs
sudo mount -o loop /home/king0fkings/desktop/rootfs.img /mnt/rootfs
jamezelle said:
first no -a it doesn't work
[CODEgenext2fs -d ./system -b 180000 system.ext2[/CODE]
then mount it for me i made the directory /mnt/system
Code:
sudo mkdir /mnt/system
sudo mount -o loop /whereever/system.ext2 /mnt/system
then make sure you do not have squashfs-tools 4.0 it wont work
make the sqsh file
Code:
sudo mksquashfs /mnt/system system.sqsh
say rootfs.img was on your desktop
Code:
sudo mkdir /mnt/rootfs
sudo mount -o loop /home/king0fkings/desktop/rootfs.img /mnt/rootfs
Click to expand...
Click to collapse
Ok thank you very kindly.. just got in from milking the cows, so ill give this a blast
Code:
genext2fs -d ./system -b 180000 -a system.ext2
the -a does work when you use the right genext2fs from the sdk or from pulling the android source and building it. the genext2fs i had uploaded uses the -a but you need to have it in your path before the generic genext2fs gets used or directly execute it. i keep it in /root/bin and execute it from there.
Code:
~/bin/genext2fs -d ./system -b 180000 -a system.ext2
the -a is for making android specific images and sets correct permissions
http://dl.dropbox.com/u/2888561/porting/genext2fs
make sure you set it to executable
Code:
chmod 755 genext2fs
zenulator said:
Code:
genext2fs -d ./system -b 180000 -a system.ext2
the -a does work when you use the right genext2fs from the sdk or from pulling the android source and building it. the genext2fs i had uploaded uses the -a but you need to have it in your path before the generic genext2fs gets used or directly execute it. i keep it in /root/bin and execute it from there.
Code:
~/bin/genext2fs -d ./system -b 180000 -a system.ext2
the -a is for making android specific images and sets correct permissions
http://dl.dropbox.com/u/2888561/porting/genext2fs
make sure you set it to executable
Code:
chmod 755 genext2fs
Click to expand...
Click to collapse
hey there thanks for the info , i cannot get this command to work :
Code:
~/bin/genext2fs -d ./system -b 180000 -a system.ext2
i worked out how to get root on linux, copied genext2fs into /root/bin did this command
Code:
chmod 755 genext2fs
i dunno what to try now
[email protected]:~/Downloads/HERO2# ~/bin/genext2fs -d ./system -b 180000 -a system.ext2
bash: /root/bin/genext2fs: No such file or directory
[email protected]:~/Downloads/HERO2# chmod 755 genext2fs
[email protected]:~/Downloads/HERO2# ~/bin/genext2fs -d ./system -b 180000 -a system.ext2
bash: /root/bin/genext2fs: No such file or directory
im lost
ali3nfr3ak said:
hey there thanks for the info , i cannot get this command to work :
Code:
~/bin/genext2fs -d ./system -b 180000 -a system.ext2
i worked out how to get root on linux, copied genext2fs into /root/bin did this command
Code:
chmod 755 genext2fs
i dunno what to try now
[email protected]:~/Downloads/HERO2# ~/bin/genext2fs -d ./system -b 180000 -a system.ext2
bash: /root/bin/genext2fs: No such file or directory
[email protected]:~/Downloads/HERO2# chmod 755 genext2fs
[email protected]:~/Downloads/HERO2# ~/bin/genext2fs -d ./system -b 180000 -a system.ext2
bash: /root/bin/genext2fs: No such file or directory
im lost
Click to expand...
Click to collapse
1 go to package manager and remove genext2fs
2 login as root and copy zens genext2fs to /bin/
3 open terminal and type in
Code:
chmod 755 /bin/genext2fs
4 logout, then login as normal
5 it should work like so
Code:
genext2fs -d ./system -b 180000 -a system.ext2
I JUST DID IT SO I KNOW IT WORKS!!1
jamezelle said:
1 go to package manager and remove genext2fs
2 login as root and copy zens genext2fs to /bin/
3 open terminal and type in
Code:
chmod 755 /bin/genext2fs
4 logout, then login as normal
5 it should work like so
Code:
genext2fs -d ./system -b 180000 -a system.ext2
I JUST DID IT SO I KNOW IT WORKS!!1
Click to expand...
Click to collapse
ok thank you ill try that, thanks for all the help to by the way, its been a trying process learning how to use linux and build android roms, so thank u
ok got everything working and managed to create a system.sqsh to load, using msmisson ext2 method i tried to load it but has error:
mount: mounting /dev/block/loop1 on/sdcard/temp failed Invalid argument
failed
failed to mount /system
/bin/still (maybe ??? cant read properly) can't access tty: job control turned off
im basicially dumping Ion bundle and remaking it with no changes
big problem!!!!!!!
Selecting previously deselected package squashfs-tools.
(Reading database ... 115049 files and directories currently installed.)
Unpacking squashfs-tools (from .../squashfs-tools_1%3a4.0-1_i386.deb) ...
Processing triggers for man-db ...
Setting up squashfs-tools (1:4.0-1) ...
[email protected]:~$
4.0 will not work!!!!!!!!
1 do
Code:
sudo apt-get remove squashfs-tools
2 download this HERE
zenulator said:
Code:
genext2fs -d ./system -b 180000 -a system.ext2
the -a does work when you use the right genext2fs from the sdk or from pulling the android source and building it. the genext2fs i had uploaded uses the -a but you need to have it in your path before the generic genext2fs gets used or directly execute it. i keep it in /root/bin and execute it from there.
Code:
~/bin/genext2fs -d ./system -b 180000 -a system.ext2
the -a is for making android specific images and sets correct permissions
http://dl.dropbox.com/u/2888561/porting/genext2fs
make sure you set it to executable
Code:
chmod 755 genext2fs
Click to expand...
Click to collapse
damn zen i bet that has been half my battle with the power wake ups. i just ported a rom last night and got the power wakeups.
recreated it today with your genext2fs with -a and it booted right up thanks
I wanted to try testing some stuff using the emulator (not hardware related, obviously). Does anyone know if there a standalone tool for making yaffs2 filesystems (for system.img), or is my only option to install android source and compile it all?
jamezelle said:
big problem!!!!!!!
Selecting previously deselected package squashfs-tools.
(Reading database ... 115049 files and directories currently installed.)
Unpacking squashfs-tools (from .../squashfs-tools_1%3a4.0-1_i386.deb) ...
Processing triggers for man-db ...
Setting up squashfs-tools (1:4.0-1) ...
[email protected]:~$
4.0 will not work!!!!!!!!
1 do
Code:
sudo apt-get remove squashfs-tools
2 download this HERE
Click to expand...
Click to collapse
ok i see that , i saw that i had 4 but i guess when you said squashfs 4 wouldnt i guess i literally took it as it wouldnt work lol, not that the command would still work but the .sqsh not load , sorry bout that, but also once again thank you
woohoo got a booting image ,lol keeps telling me process android.process.acore has stopped unexpectedly, lots of times probably all those google packages i removed ...oh well i have a start now thanks jamezelle without your help wouldnt have happened
Thought you might want to take a look at this little script I made: ROM porting

Installing Debian on the HTC TATTOO / CLICK

i read here
http://android-dls.com/wiki/index.php?title=Installing_Debian
you can run debian on android whit installing it.
and dont loos your droid
first isseu i got. chmodding the thing
download and push debian to /sdcard/debian
Code:
cd /sdcard/debian
su
chmod 4755 *
Code:
# su
su
su: access granted, courtesy of www.magicandroidapps.com
# chmod 4755 /sdcard/debian/*
chmod 4755 /sdcard/debian/*
Unable to chmod /sdcard/debian/bootdeb: Operation not permitted
#
than whitout bootdeb is chmodded i tried the installer.sh
Code:
cd /sdcard/debian as root
sh ./installer.sh
it just say's
Code:
# sh ./installer.sh
sh ./installer.sh
su: access granted, courtesy of www.magicandroidapps.com
#
so ?
Code:
# exit
Code:
# exit
exit
modprobe: not found
clear: not found
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
mkdir failed for /data/local/mnt, File exists
clear: not found
cp: not found
cp: not found
cp: not found
cp: not found
cp: not found
Unable to chmod bootdeb: Operation not permitted
clear: not found
VERSION 2.1
Custom Debian Bootloader is now installed! Quick huh?
This process does NO damage to your Android underlying OS!
Courtesy of http://www.androidfanatic.com
Installer by Mark Walker (ghostwalker)
To enter the Debian Linux console just type 'bootdeb'
PS: Be sure to run /scripts/onetime.sh as root from the shell after your FIRST
boot'.
??
Code:
# rm
rm
rm [-rR] <target>
availible
Code:
cp: not found
not availible.. Busybox availible only cp but the debian installer does not support the busybox way.
Code:
# busybox cp
busybox cp
BusyBox v1.8.1 (2007-11-14 10:11:37 EST) multi-call binary
Usage: cp [OPTION]... SOURCE DEST
enz.
Code:
#modprobe
not found
Code:
# busybox modprobe -h
busybox modprobe -h
modprobe: invalid option -- h
BusyBox v1.8.1 (2007-11-14 10:11:37 EST) multi-call bin
Usage: modprobe [-knqrsv] MODULE [symbol=value ...]
what to do to get this running?
Troubleshooting
Troubleshooting
If chmod 4755 * gives you an error stating that you do not have permissions, close Terminal Emulator and run su again, this time when SuperUserWhitelist asks for if you should give Terminal Emulator super user permissions hit yes instead of always.
If running installer.sh tells you that installer.sh could not be found, type su, followed by sh installer.sh
what whitelist?
I'm getting the same errors as u are. I belive the whitelist sugestion is only for those who have the app installed. The problem must lie somewhere else.
Have you done my busybox install (somewhere in this forum)? Looks like if you use stock ultities you don't have requirements...
bootdev.sh
keatonreckard said:
or you can simply rename the attached bootdev.sh.txt to bootdev.sh and put it in your debian folder and its good as new
Click to expand...
Click to collapse
these posts or were is that installer??
Yah I did have busybox installed.
superuser.apk
http://androidforums.com/all-things-root-behold-2/46137-how-root-apps-working-persistent-root.html
i think this is that superuser whitlist
I have fixed the bootdeb file, but im stuck at mounting the debian image...
Did anyone make any new progress on getting debian to work?
lgstoian said:
Did anyone make any new progress on getting debian to work?
Click to expand...
Click to collapse
I haven't made much progress...
But with Fyodor's 0.4.1 ROM modprobe works but i get this error when mounting the debian image:
ioctl: LOOP_SET_FD: Device or resource busy
Click to expand...
Click to collapse
And after that the rest ****s up...
Who can write a tutorial of Debian on TATTOO?

[Guide] Building CyanogenMod 7 (CM7) on Mac OSX Lion

This is a guide to build your own CM7 on Mac OSX Lion. I can't guarantee 100% that this will work for everyone, but it worked for me. I want to thank Paul from Modaco, CyanogenMod team, Batista Harahap, ahbeng, and anyone else I can't remember atm.
1. Download and install Xcode, Java Mac OS X 10.5 SDK (later versions don't seem to work)
2. I recommend uninstalling existing MacPorts (using the codes below) and then install a fresh copy just to be safe.
Code:
$ sudo port -fp uninstall --follow-dependents installed
$ sudo rm -rf /opt/local /Applications/DarwinPorts /Applications/MacPorts /Library/LaunchDaemons/org.macports.* /Library/Receipts/DarwinPorts*.pkg /Library/Receipts/MacPorts*.pkg /Library/StartupItems/DarwinPortsStartup /Library/Tcl/darwinports1.0 /Library/Tcl/macports1.0 ~/.macports
3. Follow these steps below to teleport String errors at compile time
Code:
$ sudo vi /opt/local/etc/macports/sources.conf
* press ]]
* press i
* Append # at the beginning of the line
* Press Enter
* Add the following lines
Code:
file:///Users/Shared/dports
rsync://rsync.macports.org/release/ports/
* Press Esc
* Type :wq and press enter
4. Update Macports and install the necessary packages and revert gmake to 3.81 (This takes a long time)
Code:
$ sudo port selfupdate
$ POSIXLY_CORRECT=1 sudo port install gmake libsdl git-core gnupg e2fsprogs gsed curl libiptcdata xorg-libX* pngcrush findutils
$ sudo ln -s /opt/local/bin/gsed /opt/local/bin/sed
$ sudo ln -s /opt/local/libexec/gnubin/find /opt/local/bin/find
$ vi /opt/local/etc/macports/sources.conf
$ mkdir /Users/Shared/dports
$ cd /Users/Shared/dports
$ svn co --revision 50980 http://svn.macports.org/repository/macports/trunk/dports/devel/gmake/ devel/gmake/
$ portindex /Users/Shared/dports
$ sudo port install gmake @3.81
5. comment a line in one of Darwin’s C Library to get rid of compile time errors
Code:
$ sudo vi /usr/include/string.h
* Press :143
* Press i
* Append //
* Press Esc
* Type :wq!
* Press enter
6. Add a symlink for 10.5 SDKs
Code:
$ sudo ln -s /Developer/SDKs/MacOSX10.6.sdk /Developer/SDKs/MacOSX10.5.sdk
7. Create a sparseimage with a Case Sensitive FS
a. Open the Disk Utility (/Applications/Utilities/Disk Utility.app).
b. Click on New Image.
c. Save as "cyanogenmod.sparseimage" and set the following parameters as followed:
d. Name: "cyanogenmod"
e. Size: 15 GB is minimum recommended (A sparseimage will save unused space)
f. Format: Mac OS Extended (CASE-SENSITIVE, Journaled)
g. Encryption: none, Partition- Single Apple Partition Map
h. Image Format: Sparse Disk Image (this will save you disk space)
i. Save this wherever you like, and then double-click the sparseimage file to mount.
j. Your workspace will be: /Volumes/cyanogenmod/
8. Macports version of e2fsprogs will fail to compile, download the source and compile it yourself
Code:
$ mkdir -p ~/src
$ cd ~/src
$ git clone http://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
$ cd e2fsprogs
$ ./configure --prefix=/opt/local
$ make -j4 && sudo make install
9. Set up the pre-requisites for CyanogenMod to compile, there are
Code:
$ cd /Volumes/cyanogenMod
$ mkdir -p bin
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > bin/repo
$ chmod a+x bin/repo
$ mkdir -p android/system/
$ PATH=${PATH}:/Volumes/cyanogenmod/bin:
$ echo "PATH=\${PATH}:/Volumes/cyanogenmod/bin:" >> ~/.profile
10. Clone CyanogenMod repository into our sparse image (This takes a long time)
Code:
$ cd /Volumes/cyanogenmod/android/system
$ repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
$ repo sync
11. Now to get all closed source binaries from the device and into our device build folder (replace *company* and *model* with the device you want e.g. /lge/p990)
Code:
$ cd /Volumes/cyanogenmod/android/system/device/*company*/*model*
$ ./extract-files.sh
12. ROMManager is a requirement for CyanogenMod
Code:
$ /Volumes/cyanogenmod/android/system/vendor/cyanogen/get-rommanager
13. edit cm source to make it compile on lion
Add lines in red to android/system/external/elfutils/config-compat-darwin.h:
Code:
[COLOR="Red"]#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070
[/COLOR]
static inline size_t strnlen (const char *__string, size_t __maxlen)
{

int len = 0;
while (__maxlen-- && *__string++)
len++;

return len;
}
[COLOR="red"]#endif[/COLOR]
Comment out every line in android/system/external/qemu/Android.mk:
Code:
# the following test is made to detect that we were called
# through the 'm' or 'mm' build commands. if not, we use the

# standard QEMU Makefile
#
#ifeq ($(DEFAULT_GOAL),droid)
# LOCAL_PATH:= $(call my-dir)
# include $(LOCAL_PATH)/Makefile.android
#else
# include Makefile.qemu
#endif
14. Now here comes the real fun, let’s compile CyanogenMod. (replace *model* with the device you want e.g. cyanogen_p990)
Code:
$ cd /Volumes/gingerbread/android/system/
$ cp ./vendor/cyanogen/products/cyanogen_*model*.mk ./buildspec.mk
$ . build/envsetup.sh
$ lunch cyanogen_*model*-eng
$ make -j`sysctl -an hw.logicalcpu` bacon
If the build was successful, there should be an update-cm-X.X.X-RC0-KANG-signed.zip in the /android/system/out/target/product/*model* folder.
If you were successful, go get yourself a treat.

Tizen

As tizen source is available now I wondered if anyone has taken a look at it yet.
I prepared my machine to start building it and test it.
Will publish updates in this thread.
Sent from my GT-I9300 using xda premium
Another mobile OS. Like there isnt enough already.
Subscribe
Tapatalk 2-vel küldve az én GT-I9300-ről
As far as I have read the new phone with Tizen which Samsung will release (i9500) uses the i9300 modem.
Looking at the structure, used kernel etc now.
For building a kickstart file is used, it is looking like this:
Code:
# -*-mic2-options-*- -f loop [email protected]@-rs.tar.gz -*-mic2-options-*-
#
# Do not Edit! Generated by:
# kickstarter.py
#
lang en_US.UTF-8
keyboard us
timezone --utc America/Los_Angeles
# ROOT fs partition
#part / --size=800 --ondisk mmcblk0p --fstype=ext4 --label=platform
# Use larger partition for creation, and will be shrinked at last, workaround of libzypp bug
#part / --size=2000 --ondisk mmcblk0p --fstype=ext4 --label=platform
# DATA partition
#part /opt/ --size=1800 --ondisk mmcblk0p --fstype=ext4 --label=data
# ROOT fs partition
part / --size=1700 --ondisk mmcblk0p --fstype=ext4 --label=platform
# DATA partition
part /opt/ --size=3000 --ondisk mmcblk0p --fstype=ext4 --label=data
# UMS partition
part /opt/media/ --size=300 --ondisk mmcblk0p --fstype=vfat --label=ums
rootpw tizen
bootloader --timeout=0 --append="rootdelay=5"
desktop --autologinuser=root
user --name root --groups audio,video --password ''
repo --name=Tizen-main --baseurl=https://download.tizen.org/snapshots/trunk/common/@[email protected]/repos/main/armv7l/packages/ --save --ssl_verify=no
repo --name=Tizen-base --baseurl=https://download.tizen.org/snapshots/trunk/common/@[email protected]/repos/base/armv7l/packages/ --save --ssl_verify=no
%packages
@tizen-c210
@tizen-bootstrap
-glib2-static
-gettext-tools
-eglibc-utils
-imake
-giflib-utils
-brcm-gps-daemon
-insserv
%end
%prepackages
libgcc
eglibc
sqlite
zlib
libpython
libdlog
libcap
libattr
default-files-slp
busybox
python-base
libacl
glib2
tzdata-slp
vconf
libxml2
heynoti
openssl
shared-mime-info
libudev
security-server
dbus-libs
cert-svc
libsecurity-server-client
%end
%post
echo 'kickstart post script start'
if [ -d /etc/init.d ]; then
cp /etc/init.d/* /etc/rc.d/init.d/ -rdf
fi
rm -rf /etc/init.d*
ln -sf /etc/rc.d/init.d /etc/init.d
# Without this line the rpm don't get the architecture right.
echo -n 'armv7l-meego-linux' > /etc/rpm/platform
ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
ail_initdb
/opt/apps/com.samsung.menu-screen/bin/menuscreen_initdb
cat > /usr/bin/press << EOF
#!/bin/sh
JUNK="SLP"
[ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1"
echo "Press return key to stop scripts"
read -t \$TIMEOUT JUNK
exit \$?
EOF
chmod +x /usr/bin/press
ln -s /opt/etc/X11/xkb /usr/share/X11
echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev
rm -rf /usr/include
rm -rf /usr/share/man
rm -rf /usr/share/doc
MAJOR="2"
MINOR="0"
cat >/etc/info.ini <<EOF
[Version]
Major=$MAJOR;
Minor=$MINOR;
Build=TIZEN_`date +%Y%m%d`_1;
Order=;
[Build]
Date=`date +%Y.%m.%d`;
Time=`date +%H:%M:%S`;
EOF
ln -sf /etc/info.ini /opt/etc/info.ini
ln -sf /etc/info.ini /usr/etc/info.ini
mkdir -p /home/app
cp -a /etc/skel/.e /home/app/
chown -R 5000:5000 /home/app
chmod 0755 /home/app
chown -R 5000:5000 /opt/home/app
chmod 0755 /opt/home/app
cat > /usr/lib/systemd/system/usb-debug.service << EOF
[Unit]
Description=Start usb networking for debugging
ConditionPathExists=/sys/devices/platform/usb_mode/UsbMenuSel
[Service]
Type=oneshot
RemainAfterExit=yes
Environment=PATH=/bin:/sbin
ExecStart=/bin/bash -c 'echo 4 > /sys/devices/platform/usb_mode/UsbMenuSel'
ExecStart=/sbin/ifconfig usb0 192.168.129.3 netmask 255.255.255.0
ExecStop=/bin/bash -c 'echo 0 > /sys/devices/platform/usb_mode/UsbMenuSel'
#
# We now don't launch this USB mode hack by default. If you need that, run this:
# systemctl enable usb-debug.service
# or create a link manually like below:
# ln -s ../usb-debug.service /usr/lib/systemd/system/basic.target.wants/usb-debug.service
#
[Install]
WantedBy=basic.target
EOF
# required for the connman systemd service
cat > /etc/sysconfig/connman << EOF
OPTIONS="-W wext"
EOF
# required for the wpa_supplicant systemd service
cat > /etc/sysconfig/wpa_supplicant << EOF
OPTIONS="-Dwext"
EOF
ldconfig
rpm --rebuilddb
echo 'kickstart post script end'
%end
%post --nochroot
%end
News ?
It is nice Android to have competition but from what I saw on youtube Tizen is just android stuck at version 2.3. Is there anything new except that there will be no native apps?
gud to here that
now wating for ur good work

[Linux on Dex] Void Linux and others... run different systems in LOD

.
Do you want to keep LoD alive ? Sign this petition​
I have built these images to find a better replacement for Samsung's Ubuntu image which has many bugs due to compatibility issues.
Void Linux
{
"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"
}
​
Void is a general purpose operating system, based on the monolithic Linux® kernel. Its package system allows you to quickly install, update and remove software; software is provided in binary packages or can be built directly from sources with the help of the XBPS source packages collection.
It is available for the Intel x86®, ARM® and MIPS® processor architectures; Software packages can be built natively or cross compiling through the XBPS source packages collection.
Click to expand...
Click to collapse
Void Linux is an interesting alternative to Ubuntu and other Linux distros.
It has Xfce4 installed and works smoothly in my Note9.
Faster in starting up than Samsung's Ubuntu image and less memory usage!!!!
Click to expand...
Click to collapse
​
Wiki:
https://wiki.voidlinux.org/Main_Page
Forums:
https://reddit.com/r/voidlinux
Packages Repo:
https://github.com/void-linux
Zip File
MD5: 5DF7F1D204CAAF787E6380544A9E76A0
SHA-1: 97C767FD195F915E45BDCEA8870F82E6CE986765
Image File
MD5: F35C28F5F8CB33C1C4881B42921157EA
SHA-1: B4ADB33D105FDC2443C16867B124F866B0758E65
User: void
password: secret
DOWNLOAD
Click to expand...
Click to collapse
Devuan Linux
Devuan GNU+Linux is a fork of Debian without systemd that offers users control over their system by avoiding unnecessary entanglements and ensuring Init Freedom. Devuan’s stable release is now 2.0.0 ASCII.
Click to expand...
Click to collapse
The image was built using Devuan’s stable release 2.0.0 and has more than 50K packages for aarch64. It has Xfce4 installed and runs fast in my Note9 without issues.
Click to expand...
Click to collapse
​
Zip File
MD5: E332CE238A295E991F60BBB2DCAEF5A7
SHA-1: C706122C7E25C9C2ED21C5738CF1996E6C7EF2B8
Image File
MD5: 32FB1F0B297F3E5AB07CD1FAC3FC6E81
SHA-1: 86B3EA0262BA8C2C455DF32346EDACF5436B39BC
User: devuan
password: secret
DOWNLOAD
Click to expand...
Click to collapse
openSUSE Tumbleweed
​
The Tumbleweed distribution is a pure rolling release version of openSUSE containing the latest stable versions of all software instead of relying on rigid periodic release cycles. The project does this for users that want the newest stable software.
Click to expand...
Click to collapse
Thanks to openSUSE Build Service, building any package should be so easy beside downloading thousands of pre-built packages. Xfce4 is installed with some tools.
Click to expand...
Click to collapse
Updated (10/22)
Image File
MD5: DE827017321ADB67DD1AA769FB4A4510
SHA-1: D14A05730CB8BEC309C353950D875EB3D5EC9FA7
User: opensuse
password: secret
DOWNLOAD
Click to expand...
Click to collapse
Ubuntu 19
​
Latest stable version of Ubuntu to get the latest updates.
Click to expand...
Click to collapse
Updated 10/22
Image File
MD5: 841AC5C260462A853359A4FFB7E78972
SHA-1: 3185CC8A188C3B17D7984CF13B2B3DA22BDFCE63
User: ubuntu
password: secret
@gilvbp fixed a problem related to security on some devices
Fix's Post
DOWNLOAD
Click to expand...
Click to collapse
Screenshots: Link
Others​
1. Arch Linux by @basurapr
Click to expand...
Click to collapse
How to build your own ​
1-Download the zip file and extract the image file
Link
2-Mount the image
Code:
sudo mount -o loop,sync build_your_own.img /home/your_user/your_directory
You should see 1 file and 4 directories
/dev /devro LoDVersion /share /tmp
Note:You must keep these and never overwrite them
3-Copy your Linux’s system files and directories (rootfs) with all symbolic links to the mounted image
Note: you must maintain files’ ownership and permissions
4-Create the directory if it does not exist
Code:
/etc/init.d/
6-Create a script shell file init_container.sh inside the directory /etc/init.d/
Code:
#! /bin/sh
setsid /bin/bash --login >/devro/tty1 2>&1 < /devro/tty1
7-Change the directories, files and symbolic links ownership to
Code:
chown -R 1638400000:1638400000
8-Move the file LoDVersion to /etc/ directory
9- Un-mount the image file
10- Copy it to your device.
11-Add it in LoD and run the terminal mode
Congratulations !!! you built your own system’s image.
Click to expand...
Click to collapse
Not working for Dex on Tab S4. LoD app complained an Invalid image when import the img file.
lky745 said:
Not working for Dex on Tab S4. LoD app complained an Invalid image when import the img file.
Click to expand...
Click to collapse
Check the image checksum
https://imgur.com/a/A93BRrl
Awesome! (I'm not a Ubuntu fan). I will give it a test for sure
Awesome!!! I'm going to try it on my tab s4
Edit: I can't conect to internet in Void and Devuan give me an error when I try to run it. The error says "LoD container error. Cannot run this LoD container. Close the Linux on Dex app and try again."
InsertCoin_Pls said:
Awesome!!! I'm going to try it on my tab s4
Edit: I can't conect to internet in Void and Devuan give me an error when I try to run it. The error says "LoD container error. Cannot run this LoD container. Close the Linux on Dex app and try again."
Click to expand...
Click to collapse
I get the same error when trying to run Devuan on my S5e/Note 9. If I try in terminal mode, it flashes this screen and then immediately closes.
Adakenko said:
I get the same error when trying to run Devuan on my S5e/Note 9. If I try in terminal mode, it flashes this screen and then immediately closes.
Click to expand...
Click to collapse
Yeah, Devuan wont work because of sudo and your devices' kernel .
I have updated the image and it should work now.
BTW can you run Void Linux and post the output of the following commands :
Code:
sudo ping -c 5 google.com
Code:
sudo cat /etc/resolv.conf
Code:
sudo cat /etc/group
Code:
sudo cat /etc/passwd
@[email protected] said:
Yeah, Devuan wont work because of sudo and your devices' kernel .
I have updated the image and it should work now.
BTW can you run Void Linux and post the output of the following commands :
Code:
sudo ping -c 5 google.com
Code:
sudo cat /etc/resolv.conf
Code:
sudo cat /etc/group
Code:
sudo cat /etc/passwd
Click to expand...
Click to collapse
Code:
[[email protected] ~]$ sudo ping -c 5 "google.com"
Password:
PING google.com (172.217.1.174) 56(84) bytes of data.
64 bytes from yyz10s04-in-f14.1e100.net (172.217.1.174): icmp_seq=1 ttl=56 time=18.1 ms
64 bytes from yyz10s04-in-f14.1e100.net (172.217.1.174): icmp_seq=2 ttl=56 time=90.1 ms
64 bytes from yyz10s04-in-f14.1e100.net (172.217.1.174): icmp_seq=3 ttl=56 time=21.7 ms
64 bytes from yyz10s04-in-f14.1e100.net (172.217.1.174): icmp_seq=4 ttl=56 time=20.9 ms
64 bytes from yyz10s04-in-f14.1e100.net (172.217.1.174): icmp_seq=5 ttl=56 time=21.3 ms
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 18.144/34.414/90.075/27.858 ms
Code:
[[email protected] ~]$ sudo cat /etc/resolv.conf
nameserver 8.8.4.4
nameserver 8.8.8.8
Code:
[[email protected] ~]$ sudo cat /etc/group
root:x:0:
bin:x:1:
sys:x:2:
kmem:x:3:
wheel:x:4:void
tty:x:5:
tape:x:6:
daemon:x:7:
floppy:x:8:
disk:x:9:
lp:x:10:
dialout:x:11:
audio:x:12:void,pulse
video:x:13:void
utmp:x:14:
adm:x:15:
cdrom:x:16:void
optical:x:17:
mail:x:18:
storage:x:19:
scanner:x:20:
network:x:21:
kvm:x:24:
input:x:25:void
nogroup:x:99:
users:x:100:void
xbuilder:x:101:
_uuidd:x:999:
inet:x:53003:root,void
polkitd:x:998:
dbus:x:22:
void:x:1000:
rtkit:x:997:
pulse-access:x:996:
pulse:x:995:
Code:
[[email protected] ~]$ sudo cat /etc/passwd
root:x:0:0:root:/root:/bin/sh
nobody:x:65534:65534:Unprivileged User:/dev/null:/bin/false
_uuidd:x:999:999:_uuidd unprivileged user:/var/empty:/sbin/nologin
polkitd:x:998:998:polkitd unprivileged user:/var/empty:/sbin/nologin
dbus:x:22:22:dbus unprivileged user:/var/empty:/sbin/nologin
void:x:1000:1000::/home/void:/bin/bash
rtkit:x:997:997:rtkit unprivileged user:/proc:/sbin/nologin
pulse:x:996:995:pulse unprivileged user:/var/empty:/sbin/nologin
Done using Void Linux terminal mode on my Note 9. Also worth noting that Devuan works now, on both of my devices.
---------- Post added at 04:54 AM ---------- Previous post was at 04:41 AM ----------
Forgot to share this image. There's an error when I start Void Linux, but it doesn't seem to interfere with anything.
Adakenko said:
Code:
[[email protected] ~]$ sudo ping -c 5 "google.com"
Password:
PING google.com (172.217.1.174) 56(84) bytes of data.
64 bytes from yyz10s04-in-f14.1e100.net (172.217.1.174): icmp_seq=1 ttl=56 time=18.1 ms
64 bytes from yyz10s04-in-f14.1e100.net (172.217.1.174): icmp_seq=2 ttl=56 time=90.1 ms
64 bytes from yyz10s04-in-f14.1e100.net (172.217.1.174): icmp_seq=3 ttl=56 time=21.7 ms
64 bytes from yyz10s04-in-f14.1e100.net (172.217.1.174): icmp_seq=4 ttl=56 time=20.9 ms
64 bytes from yyz10s04-in-f14.1e100.net (172.217.1.174): icmp_seq=5 ttl=56 time=21.3 ms
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 18.144/34.414/90.075/27.858 ms
Click to expand...
Click to collapse
It looks like the internet is working on your device.
Ping will not work if you do not have an internet connection.
can you run it again without sudo
Code:
ping -c 5 "google.com"
Adakenko said:
Forgot to share this image. There's an error when I start Void Linux, but it doesn't seem to interfere with anything.
Click to expand...
Click to collapse
This is a permission issue related to policykit daemon.
You can ignore it because it cannot be solved so easily in all LoD's images including Samsung's Ubuntu image.
Solving it wont make a big difference. All should work.
Can you share how you are generating the Linux on Dex images? I would like to make an ArchLinux image. I tested the voidlinux image (currently writing this message from it) and works really well, much more better than running on VNC since graphics work much better and mouse/keyboard input, I did have to install some font packages because xfce-terminal and firefox looked horrible. The issue I have with voidlinux is the limited repository, for example, I want to install PHP to do some development but it isn't available for the aarch64 port.
@[email protected] said:
It looks like the internet is working on your device.
Ping will not work if you do not have an internet connection.
can you run it again without sudo
Code:
ping -c 5 "google.com"
This is a permission issue related to policykit daemon.
You can ignore it because it cannot be solved so easily in all LoD's images including Samsung's Ubuntu image.
Solving it wont make a big difference. All should work.
Click to expand...
Click to collapse
Code:
[[email protected] ~]$ ping -c 5 "google.com"
PING google.com (172.217.164.206) 56(84) bytes of data.
64 bytes from yyz12s04-in-f14.1e100.net (172.217.164.206): icmp_seq=1 ttl=56 time=21.6 ms
64 bytes from yyz12s04-in-f14.1e100.net (172.217.164.206): icmp_seq=2 ttl=56 time=27.6 ms
64 bytes from yyz12s04-in-f14.1e100.net (172.217.164.206): icmp_seq=3 ttl=56 time=28.0 ms
64 bytes from yyz12s04-in-f14.1e100.net (172.217.164.206): icmp_seq=4 ttl=56 time=25.7 ms
64 bytes from yyz12s04-in-f14.1e100.net (172.217.164.206): icmp_seq=5 ttl=56 time=26.3 ms
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4007ms
rtt min/avg/max/mdev = 21.592/25.823/27.993/2.283 ms
Adakenko said:
Code:
[[email protected] ~]$ ping -c 5 "google.com"
PING google.com (172.217.164.206) 56(84) bytes of data.
64 bytes from yyz12s04-in-f14.1e100.net (172.217.164.206): icmp_seq=1 ttl=56 time=21.6 ms
64 bytes from yyz12s04-in-f14.1e100.net (172.217.164.206): icmp_seq=2 ttl=56 time=27.6 ms
64 bytes from yyz12s04-in-f14.1e100.net (172.217.164.206): icmp_seq=3 ttl=56 time=28.0 ms
64 bytes from yyz12s04-in-f14.1e100.net (172.217.164.206): icmp_seq=4 ttl=56 time=25.7 ms
64 bytes from yyz12s04-in-f14.1e100.net (172.217.164.206): icmp_seq=5 ttl=56 time=26.3 ms
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4007ms
rtt min/avg/max/mdev = 21.592/25.823/27.993/2.283 ms
Click to expand...
Click to collapse
I think internet is working fine on your device ... have you installed a web-browser on Void?
Code:
xbps-install -S firefox
@[email protected] said:
I think internet is working fine on your device ... have you installed a web-browser on Void?
Code:
xbps-install -S firefox
Click to expand...
Click to collapse
I think we misunderstood each other. I was originally referring to the issue they had with Devuan. :silly:
basurapr said:
Can you share how you are generating the Linux on Dex images? I would like to make an ArchLinux image. I tested the voidlinux image (currently writing this message from it) and works really well, much more better than running on VNC since graphics work much better and mouse/keyboard input, I did have to install some font packages because xfce-terminal and firefox looked horrible. The issue I have with voidlinux is the limited repository, for example, I want to install PHP to do some development but it isn't available for the aarch64 port.
Click to expand...
Click to collapse
You can build an image file for any linux distro which supports aarch64 architecture by modifying Samsung's Ubuntu image file.
However, it is difficult to make them work prefectly on your android devices because of the kernel setup and the security issues.
To make it simple
Just download the image, mount it in your Linux PC, remove everything except the device special files and copy the new OS rootfs to the mounted image.
Adakenko said:
I think we misunderstood each other. I was originally referring to the issue they had with Devuan. :silly:
Click to expand...
Click to collapse
np
@[email protected] said:
You can build an image file for any linux distro which supports aarch64 architecture by modifying Samsung's Ubuntu image file.
However, it is difficult to make them work prefectly on your android devices because of the kernel setup and the security issues.
To make it simple
Just download the image, mount it in your Linux PC, remove everything except the device special files and copy the new OS rootfs to the mounted image.
np
Click to expand...
Click to collapse
I wrote a script that downloads and generates the image, also I tried to strip needed components into a "Template" directory, where I placed the lod_daemon, Xtightvnc binaries as the init.d/init_container.sh and vnc.sh. The issue is when I try to add the image on LinuxOnDex app it says invalid image format. I even tried by taking your void image deleting everything and copying the archlinux image content into your img file and when I transfer it into my galaxy s9+ and try to open it on dex app I get the invalid image format again... maybe it is ext3 instead of ext4?
In any case I uploaded the scripts here mega_nz/#!lVEjzazL!cpuxEf_W6m-9GdytwzQMr0OWplXrqxylrHifQdJcOkw, would be nice to make a github repo or something with the required scripts so people can create their own images after everything is sorted out.
Here are the main scripts for easier inspection:
LoDGenerator
Code:
#!/bin/bash
# Notes:
# blkid image_name.img to view the image details.
#
# To edit the image arm image on x86_64:
# ================================================================
# This provides the qemu-aarch64-static binary
# yay -S qemu-arm-static
#
# Mount my target filesystem on /mnt
# mount -o loop fs.img loddir
#
# Copy the static ARM binary that provides emulation
# cp $(which qemu-aarch64-static) loddir/usr/bin
# Or, more simply: cp /usr/bin/qemu-aarch64-static loddir/usr/bin
#
# Finally chroot into loddir, then run 'qemu-aarch64-static bash'
# This chroots; runs the emulator; and the emulator runs bash
#
# cp /etc/resolv.conf loddir/etc/
# chroot loddir qemu-arm-static /bin/bash
# ================================================================
if [ ! -e "/usr/bin/arch-chroot" ]; then
echo "Please install arch-chroot to continue."
exit
fi
if [ ! -e "/usr/bin/qemu-aarch64-static" ]; then
echo "Please install qemu-arm-static for qemu-aarch64-static support."
exit
fi
if [ ! -e "FileSystems" ]; then
mkdir FileSystems
fi
function make_archlinux {
distro="ArchLinux"
url="os_archlinuxarm_org/os/ArchLinuxARM-aarch64-latest.tar.gz" # cant post links yet
directory=archlinux
filesystem=ArchLinuxARM-aarch64-latest.tar.gz
image_name=ArchLinux_LoD.img
image_size=3076
setup_file=archlinux_setup.sh
if [ ! -d "${directory}" ]; then
mkdir $directory
fi
if [ "$(ls $directory)" != "" ]; then
echo "Umounting previous image."
umount $directory/proc 2>&1 > /dev/null
umount $directory/sys/firmware/efi/efivars 2>&1 > /dev/null
umount $directory/sys 2>&1 > /dev/null
umount $directory/dev/pts 2>&1 > /dev/null
umount $directory/dev/shm 2>&1 > /dev/null
umount $directory/dev 2>&1 > /dev/null
umount $directory/run 2>&1 > /dev/null
umount $directory/tmp 2>&1 > /dev/null
umount $directory/etc/resolv.conf 2>&1 > /dev/null
umount $directory 2>&1 > /dev/null
sleep 3
fi
echo "Creating ${distro} disk image..."
if [ -e "${image_name}" ]; then
rm $image_name
fi
dd if=/dev/zero of=$image_name bs=1M count=$image_size
mkfs.ext4 -L cloudimg-rootfs \
-U 455a35d3-488b-4c5e-89b0-883ef8e77f68 \
$image_name
mount -o loop $image_name $directory
echo "Downloading ${distro}..."
if [ ! -e "FileSystems/${filesystem}" ]; then
wget -O "FileSystems/${filesystem}" "${url}"
fi
echo "Decompressing ${distro}..."
bsdtar -xpf FileSystems/$filesystem -C $directory
echo "Preparing image for chroot with qemu..."
cp /usr/bin/qemu-aarch64-static $directory/usr/bin/
echo "Starting distro setup..."
cp -av Setup/$setup_file $directory/
arch-chroot $directory qemu-aarch64-static /bin/bash $setup_file
rm $directory/$setup_file
umount $directory/proc 2>&1 > /dev/null
umount $directory/sys/firmware/efi/efivars 2>&1 > /dev/null
umount $directory/sys 2>&1 > /dev/null
umount $directory/dev/pts 2>&1 > /dev/null
umount $directory/dev/shm 2>&1 > /dev/null
umount $directory/dev 2>&1 > /dev/null
umount $directory/run 2>&1 > /dev/null
umount $directory/tmp 2>&1 > /dev/null
umount $directory/etc/resolv.conf 2>&1 > /dev/null
# Wait for proper umount
sleep 3
echo "Setting dextop user account..."
echo "dextop:x:1000:1000::/home/dextop:/bin/bash" \
>> $directory/etc/passwd
echo "dextop:$6$3uD6fDYK$U.wCye7zuGkuyftaiuKbJ35nQiY6eeS0QCbRJSLmGBJBXR9jpif4Yw/fFdrHoI4Y6MT.Dh9dcpqkNNQDj.jcz/:17644:0:99999:7:::" \
>> $directory/etc/shaddow
echo "dextop:x:1000:" \
>> $directory/etc/group
echo "dextop:!::" \
>> $directory/etc/gshadow
echo "Setting directory permissions..."
chown -R 1638400000:1638400000 $directory/bin
chown -R 1638400000:1638400000 $directory/boot
chown -R 1638400000:1638400000 $directory/dev
chown -R 1638400000:1638400000 $directory/devro
chown -R 1638400000:1638400000 $directory/etc
chown -R 1638400000:1638400000 $directory/ext_sd
chown -R 1638400000:1638400000 $directory/home
chown -R 1638400000:1638400000 $directory/lib
chown -R 1638400000:1638400000 $directory/lost+found
chown -R 1638400000:1638400000 $directory/mnt
chown -R 1638400000:1638400000 $directory/opt
chown -R 1638400000:1638400000 $directory/proc
chown -R 1638400000:1638400000 $directory/root
chown -R 1638400000:1638400000 $directory/run
chown -R 1638400000:1638400000 $directory/sbin
chown -R 1638400000:1638400000 $directory/share
chown -R 1638400000:1638400000 $directory/srv
chown -R 1638400000:1638400000 $directory/sys
chown -R 1638400000:1638400000 $directory/tmp
chown -R 1638400000:1638400000 $directory/usr
chown -R 1638400000:1638400000 $directory/var
echo "Copying LinuxOnDex dependencies..."
cp -av Template/usr $directory/
cp -av Template/devro $directory/
cp -av Template/share $directory/
cp -av Template/ext_sd $directory/
cp -av Template/etc/init.d $directory/etc/
cp -av Template/home/dextop $directory/home/
cp -av Template/dev/* $directory/dev/
}
make_archlinux
and here is the script that setups ArchLinux:
Code:
#!/bin/bash
# to prevent mmap errors due to qemu and proper mount...
sleep 3
# since network isnt't working with plain resolv.conf we add some hosts
cp /etc/hosts /etc/hosts.original
echo "50.116.36.110 mirror.archlinuxarm.org" >> /etc/hosts
echo "216.155.157.40 fl.us.mirror.archlinuxarm.org" >> /etc/hosts
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.original
echo 'Server = fl_us_mirror_archlinuxarm_org/$arch/$repo' \
> /etc/pacman.d/mirrorlist
# Init archlinuxarm packages keyring
pacman-key --init
pacman-key --populate archlinuxarm
# Remove kernel
pacman --noconfirm -Rcs linux-aarch64
# Update the base system
pacman --noconfirm -Suy
# Install additional packages
pacman --noconfirm -S sudo pulseaudio xorg-server xorg-apps \
ttf-liberation ttf-opensans ttf-hack \
tigervnc fluxbox
# Clean downloaded packages
pacman --noconfirm -Scc
# Enable sudo on all user accounts
echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/wheel
# Fix Xtightvnc missing dependency
ln -s /usr/lib/libXfont2.so.2.0.0 /usr/lib/libXfont.so.1
# Remove default user
userdel -f -r alarm
exit
Few screens from my note9 running in DeX mode
Excellent job @@[email protected] :good:
get "LoD container error. cannot run this LoD container. close the linux on Dex app and try again.
downloaded, extracted and created lod folder to place .img. did i miss a step? parrot OS would be amazing to run on DeX.
edit** has started working!
After many tears I finally got archlinux working under LinuxOnDex thanks to @root@ for the tip it was really crazy becayse the /etc/ folder couldn't be deleted, it seems removing the LoDVersion file and replacing it again breaks something on the image that makes it look like invalid, anyways... I'm not sure which files on /etc/ make it a valid image yet...
ScreenShot! imgur.com/a/0V0oVHj
The image file was initially like 400mb but in the process of getting it to work I added gcc and many other stuff that made it grow like to almost 2 Gb.
Here is the download link for those that would like to test it:
mega.nz/#!4MVGVCrY!bMwFynLS-4zy7cxT2OzRZS7tn7slvfkTBme0mxzEuQ
Also for anyone interested I uploaded to GitHub some initial shell scripts that I wrote while trying to generate a working image. They need more work to automate the entire process since I discovered lot of stuff while working on this but they serve as a guidance for future work.
github.com/basukon/archlinux-lod
basurapr said:
After many tears I finally got archlinux working under LinuxOnDex thanks to @root@ for the tip it was really crazy becayse the /etc/ folder couldn't be deleted, it seems removing the LoDVersion file and replacing it again breaks something on the image that makes it look like invalid, anyways... I'm not sure which files on /etc/ make it a valid image yet...
ScreenShot! imgur.com/a/0V0oVHj
The image file was initially like 400mb but in the process of getting it to work I added gcc and many other stuff that made it grow like to almost 2 Gb.
Here is the download link for those that would like to test it:
mega.nz/#!4MVGVCrY!bMwFynLS-4zy7cxT2OzRZS7tn7slvfkTBme0cmxzEuQ
Also for anyone interested I uploaded to GitHub some initial shell scripts that I wrote while trying to generate a working image. They need more work to automate the entire process since I discovered lot of stuff while working on this but they serve as a guidance for future work.
github.com/basukon/archlinux-lod
Click to expand...
Click to collapse
Super awesome mate, great work and thanks for your time. Keep up with more linux OS and it will be nice to see deepin OS too, Donwload page:
https://www.deepin.org/en/download
Super nice looking OS
I'm not much of a developer and what I do know is all windows based so I'm completely out of my league here but I was wondering if it would be possible to run Manjaro on Dex?
I understand that changes would need to be made and I'm willing to make those changes myself if someone could point me in the right direction.
According to distrowatch it is aarch64.

Categories

Resources