Android源码编译
编译设备系统
18.04LTS—-22.04LTS
远程控制
1 | sudo apt install openssh-server openssl |
源码拉取工具
1 | sudo apt install curl repo git wget |
git ssh配置
1 | git config --global user.name "Your.Name" |
将python映射到默认
1 | sudo ln -s /usr/bin/python3 /usr/bin/python |
原生编译依赖库
1 | sudo apt install git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 libncurses5 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig lib32z-dev ccache default-jdk |
高通源码依赖编译库
1 | sudo apt install libx11-dev libreadline-dev libgl1-mesa-dev g++-multilib git flex bison gperf build-essential libncurses-dev tofrodos python3-markdown libxml2-utils xsltproc zlib1g-dev dpkg-dev libsdl1.2-dev gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev libgl1-mesa-dev libxml2-utils xsltproc unzip m4 lib32z1-dev ccache libssl-dev |
关闭系统默认的oom进程
1 | sudo systemctl disable systemd-oom.service |
拉取源码
1 | curl -OC - https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly/aosp-latest.tar # 下载初始化包 |
详情参考:清华AOSP
开始编译
1 | cd aosp |
单独编译
1 | source build/envsetup.sh |
推自己的apk
1 | adb root |
安装所需开发工具软件
根据开发需要和个人习惯安装一些工具软件,只列出一些通用的,默认系统没有安装的软件:
1)vim-gtk
带UI的vim,在图形界面下使用方便一点,不用专门开一个终端。
$ sudo apt install vim-gtk
1
2)vs code
主页:https://code.visualstudio.com/
Ubuntu上dep安装包下载连接:https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64
我下载的版本是:code_1.75.0-1675266613_amd64.deb
使用dpkg命令安装:
sudo dpkg -i code_1.75.0-1675266613_amd64.deb
1
安装后选装需要的extension或者通过登录微软账号自动同步vs code配置。
3)google chrome (或者chromium)
(1) install chrome browser by wget
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
(2) install chrome browser by ppa
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c ‘echo “deb http://dl.google.com/linux/chrome/deb/ stable main” >> /etc/apt/sources.list.d/google-chrome.list’
sudo apt update
sudo apt install google-chrome
(3) install chromium browser (chromium is open source and can not login google account or sync data)
sudo apt install chromium-browser
4)搜狗输入法,sogou pinyin
(1) download: https://shurufa.sogou.com/linux
(2) Ubuntu安装搜狗输入法
sudo apt-get install fcitx libgsettings-qt1 libqt5qml5 libqt5quick5 libqt5quickwidgets5 qml-module-qtquick2
sudo apt -f install
sudo apt purge ibus
设置fcitx开机自启动
在终端执行sudo cp /usr/share/applications/fcitx.desktop /etc/xdg/autostart/
5)android studio, sdk, ndk
(1) android studio
https://developer.android.google.cn/studio/
https://developer.android.google.cn/studio/preview
(2) ndk
https://developer.android.google.cn/ndk/downloads
6)WPS
https://linux.wps.cn/
https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/11698/wps-office_11.1.0.11698_amd64.deb
sudo dpkg -i wps-office_11.1.0.11698_amd64.deb
7)WindTerm(或者terminator)
WindTerm download
https://master.dl.sourceforge.net/project/windterm.mirror/2.5.0/WindTerm_2.5.0_Linux_Portable_x86_64.tar.gz?viasf=1
sudo apt install terminator
8)docker
9)Clion
(1) Clion
https://www.jetbrains.com.cn/en-us/clion/download/#section=linux
(2) IntelliJ IDEA Ultimate
https://www.jetbrains.com.cn/idea/download/?section=linux
(3) goland
https://www.jetbrains.com.cn/en-us/go/download/#section=linux
(4) pycharm
https://www.jetbrains.com.cn/en-us/pycharm/download/?section=linux
10)minicom
sudo apt install minicom
minicom安装、配置和使用
dingtalk:
https://page.dingtalk.com/wow/z/dingtalk/simple/ddhomedownload#/
lvm
sudo apt install lvm2
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 nathanwriting@126.com