Artigos‎ > ‎Android‎ > ‎Outros‎ > ‎

chroot ubuntu on android


Primeiramente gostaria de salientar que não sou o autor principal do conteúdo deste artigo. A minha intenção é de mostrar o que outros autores tem realizado (referenciando links para o conteúdo original) neste blog até como um guia pessoal para uso próprio e ainda compartilhar minhas anotações e pequenas modificações que realizo no conteúdo, desejando que possa ajudar mais alguém em algum lugar.
First and foremost, I take no credit for any of this post’s content. I am really just taking what others have done (which I have links to bellow) and am putting it on my blog for a personal reference and hopefully the small changes that I made to their guides will help someone somewhere.


Link: http://androlinux.com/android-ubuntu-development/how-to-build-chroot-arm-ubuntu-images-for-android/

Em construção ....

Por enquanto tenho utilizado o aplicativo Linux Deploy
Escolho as seguintes opções para o Asus TF-300T: Ubuntu, precise, armhf, ext4

E nas opções do vnc escolho:
Depth = 24
width = 1280
Height = 750

Altere a senha do usuário: android
sudo passwd android
vncpasswd
sudo service vncserver restart

Altero para português:
sudo locale-gen pt_BR pt_BR.UTF-8 
sudo dpkg-reconfigure tzdata

Alguns programas adicionais:
sudo apt-get install xvfb x11vnc lxde nano
sudo apt-get --reinstall install xfonts-base

Desabilitar a opção de logout:
sudo dpkg-divert --local --rename --add /usr/bin/lxde-logout 
sudo cp /bin/true /usr/bin/lxde-logout


Problemas com chromium e firefox:

sudo ln -s /run/shm /dev/shm
sudo chmod 1777 /dev/shm

sudo gedit /etc/sysctl.conf

incluir a linha
kern.ipc.shm_allow_removed=1


link: http://sourceforge.net/projects/ubsh/

Precisa adaptar o script abaixo:

##########################################
#Ubuntu boot script for Android          #
#Built by Zachary Powell (zacthespack)   #
#But changed by tiborr for SGS3          #
##########################################
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This script requires root! Type: su"; exit; fi
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export USER=root
mkdir $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
if [ -b /dev/block/loop255 ]; then
	echo "Loop device exists"
else
	busybox mknod /dev/block/loop255 b 7 255
fi
#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
losetup /dev/block/loop255 $kit/ubuntu.img
mount -t ext2 /dev/block/loop255 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox mount -o bind /sdcard /data/local/mnt/sdcard
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "ubuntu is configured with SSH and VNC servers that can be accessed from the IP:"
ifconfig eth0
echo " "
busybox chroot $mnt /root/init.sh

echo "Shutting down ubuntu ARM"
umount $mnt/dev/pts
umount $mnt/proc 
umount $mnt/sys 
umount $mnt
losetup -d /dev/loop7


O URL específico do gadget não foi encontrado



Comments