1, sudo apt-get install openssh-server
sudo service ssh restart
2, sudo apt install git
git config --global user.name "xxx"
git config --global user.email xx.xxxxx@xxx.com
git config --global core.editor vim
3, clone some useful git
git clone https://github.com/damonkohler/sl4a.git
4, clone and sync android aosp code
sudo apt-get install vim
sudo apt install curl
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/repo
chmod a+x ~/repo
mkdir maddev_o-ear
cd maddev_o-ear/
./repo init -u https://android.googlesource.com/platform/manifest
./repo sync
5, setup java environment (install java)
sudo apt-get update
sudo apt-get install openjdk-8-jdk
6, compile android code (need lzop at first)
sudo apt-get update
sudo apt-get install lzop
sudo apt-get install device-tree-compiler
sudo apt-get install m4
sudo apt-get install bison
sudo apt-get installg++-multilib gcc-multilib lib32ncurses5-dev lib32z1-dev
sudo apt-get installlibxml2-utils
7, change java setting
zhangbo@OptiPlex-7020:~/maddev_o-ear/prebuilts/sdk/tools$ vi jack-admin
diff --git a/tools/jack-admin b/tools/jack-admin
index 96a4dc3..abc5bba 100755
--- a/tools/jack-admin
+++ b/tools/jack-admin
@@ -484,7 +484,7 @@ case $COMMAND in
if [ "$RUNNING" = 0 ];
then
echo "Server is already running"
else
-JACK_SERVER_COMMAND="java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -cp $LAUNCHER_JAR $LAUNCHER_NAME"
+JACK_SERVER_COMMAND="java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -Xmx2048M -cp $LAUNCHER_JAR $LAUNCHER_NAME"
echo "Launching Jack server" $JACK_SERVER_COMMAND
(
trap "" SIGHUP
Change the jack server setting(port number) to others if exist other project in the same server:
vi ~/.jack-settings
vi ~/.jack-server/config.properties
SERVER_PORT_SERVICE=8076
SERVER_PORT_ADMIN=8077
jack.server.service.port=8076
jack.server.admin.port=8077
ps axu |grep jack
jack-admin kill-server
cd prebuilts/sdk/tools && touch jack && cd ../../../
jack-admin start-server
8, install useful tools
sudo apt install ckermit
vi ~/.kermrc
set line /dev/ttyUSB1
set speed 115200
set carrier-watch off
set handshake none
set flow-control none
robust
set file type bin
set file name lit
set recpack 1000
set send pack 1000
set window 5
Connect and open console:
kermit -c
Enter command line mode:
[Ctrl]\
Quit in command line mode:
Exit
sudo apt-get install samba
sudo apt-get install smbclient
sudo vi /etc/samba/smb.conf
[share]
comment=this is Linux share directory
path=/home/zhangbo
available = yes
browseable = yes
public=yes
writable=yes
create mask = 0644
directory mask =0777
force user = zhangbo
force group = zhangbo
Create samba account (must be an account exist in system):
sudo touch /etc/samba/smbpasswd
sudo smbpasswd -a zhangbo
sudo /etc/init.d/samba start
sudo /etc/init.d/samba stop
sudo /etc/init.d/samba restart
9, install download and debug tools:
sudo apt install android-tools-fsutils
sudo apt install android-tools-adb
sudo apt install android-tools-fastboot
sudo adb kill-server
sudo adb devices
8, download error: simg2img: command not found******not work
sudo apt install android-tools-fsutils
9, set system time
tzselect
sudo date -s "2017-08-08 14:22:00"
[sudo cp /usr/share/zoneinfo/Asia/ShangHai /etc/localtime]
【移动开发|Setting Ubuntu16.04 environment for android】转载于:https://my.oschina.net/u/3583648/blog/1505041
推荐阅读
- 操作系统|[译]从内部了解现代浏览器(1)
- Java|Java基础——数组
- 人工智能|干货!人体姿态估计与运动预测
- java简介|Java是什么(Java能用来干什么?)
- Java|规范的打印日志
- Linux|109 个实用 shell 脚本
- 程序员|【高级Java架构师系统学习】毕业一年萌新的Java大厂面经,最新整理
- Spring注解驱动第十讲--@Autowired使用
- SqlServer|sql server的UPDLOCK、HOLDLOCK试验
- jvm|【JVM】JVM08(java内存模型解析[JMM])