可是大部分我在用的大概就是tar或gzip或rar或zip,但今天遇到一個用上述方法都會出現的問題,只好改用cpio備份
Archival
$ find | cpio -ov > [file|device]Extraction
$ cpio -idv < [file|device]
NAME cpio - copy files to and from archives SYNOPSIS cpio {-o|--create} [--verbose] {-i|--extract}
$ find | cpio -ov > [file|device]Extraction
$ cpio -idv < [file|device]
NAME cpio - copy files to and from archives SYNOPSIS cpio {-o|--create} [--verbose] {-i|--extract}
$ cd /path/to/android
$ cd build
$ . envsetup.sh
$ help
Invoke ". build/envsetup.sh" from your shell to add the following functions to your environment: - croot: Changes directory to the top of the tree. - m: Makes from the top of the tree. - mm: Builds all of the modules in the current directory. - mmm: Builds all of the modules in the supplied directories. - cgrep: Greps on all local C/C++ files. - jgrep: Greps on all local Java files. - resgrep: Greps on all local res/*.xml files. - godir: Go to the directory containing a file. Look at the source to view more functions. The complete list is: add_lunch_combo cgrep check_product check_variant choosecombo chooseproduct choosetype choosevariant cproj croot findmakefile gdbclient get_abs_build_var getbugreports get_build_var getprebuilt gettop godir help isviewserverstarted jgrep lunch m mm mmm pid printconfig print_lunch_menu resgrep runhat runtest setpaths set_sequence_number set_stuff_for_environment settitle smoketest startviewserver stopviewserver systemstack tapas tracedmdump
$ cd /path/to/android
$ mmm external/ping
============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=2.2.1 TARGET_PRODUCT=generic TARGET_BUILD_VARIANT=eng TARGET_SIMULATOR= TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release BUILD_ID=MASTER ============================================ target Non-prelinked: ping (out/target/product/generic/symbols/system/bin/ping) Install: out/target/product/generic/system/bin/ping
$ cd /path/to/android
$ cd development/samples/NotePad
$ mm
============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=2.2.1 TARGET_PRODUCT=generic TARGET_BUILD_VARIANT=eng TARGET_SIMULATOR= TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release BUILD_ID=MASTER ============================================ Copying: out/target/common/obj/APPS/NotePad_intermediates/classes-full-debug.jar Install: out/target/product/generic/system/app/NotePad.apk Copying: out/target/common/obj/APPS/NotePadTests_intermediates/classes-full-debug.jar Install: out/target/product/generic/data/app/NotePadTests.apk
$ cd /path/to/android
$ make Phone
PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=2.2.1 TARGET_PRODUCT=generic TARGET_BUILD_VARIANT=eng TARGET_SIMULATOR= TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release BUILD_ID=MASTER ============================================ Install: out/host/linux-x86/bin/aapt Install: out/host/linux-x86/bin/aidl Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes-full-debug.jar Install: out/host/linux-x86/framework/dx.jar Install: out/host/linux-x86/bin/dx Copying: out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes-full-debug.jar Copying: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar Copying: out/target/common/obj/APPS/Phone_intermediates/classes-full-debug.jar Install: out/host/linux-x86/framework/signapk.jar Install: out/host/linux-x86/bin/zipalign target Package: Phone (out/target/product/generic/obj/APPS/Phone_intermediates/package.apk) 'out/target/common/obj/APPS/Phone_intermediates/classes.dex' as 'classes.dex'... Install: out/target/product/generic/system/app/Phone.apk
# development tool sudo apt-get install sun-java5-jdk sun-java5-plugin sun-java6-jdk sun-java6-plugin eclipse # java sudo apt-get install gcc-4.1 gcc-4.3 gcc-4.4 g++-4.1 g++-4.3 g++-4.4 autoconf automake # c/c++ sudo apt-get install libgtk2.0-dev libwebkit-dev # gtk sudp apt-get install gtkterm minicom putty # serial port utility sudo apt-get install meld kdiff cscope ctags # programing utility sudo apt-get install bootchart pybootchartgui # boot analysis utility sudo apt-get install ant maven2 # java project utility sudo apt-get isntall gpm # deivce driver sudo apt-get install procmail uboot-mkimage # uboot # kernel sudo apt-get install fakeroot build-essential makedumpfile kernel-package crash kexec-tools makedumpfile kernel-wedge build-dep dos2unix squashfs-tools # data recovery sudo apt-get install e2fslibs e2fslibs-dev e2fsprogs Download extundelete # android sudo apt-get install git-core gitweb gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib x11proto-core-dev libx11-dev libncurses5 libncurses5-dev libc6-dev libreadline-dev libreadline6-dev sudo apt-get install bison flex gettext patch build-essential texinfo # toolchain # system administration sudo apt-get install vncviewer gtkvncviewer xtightvncviewer # vnc sudo apt-get install ncdu htop # system utility sudo apt-get install chkconfig sysv-rc-conf # service utility sudo apt-get install vsftpd samba smbfs samba-tools smbclient openssh-server # service sudo apt-get install filezilla wget bareftp ftp gftp-common gftp gftp # ftp sudo apt-get install wireshark nmap # security # emulator sudo apt-get install qemu uml-utilities # qemu sudo apt-get install busybox # busybox sudo apt-get install virtualbox # virtualbox sudo apt-get install wine # win32 emulator Ubuntu Software Center -> PlayOnLinux # PlayOnLinux # utility sudo apt-get install shutter smartmontools preload prelink localepurge apt-file # misc sudo apt-get install pdfedit gs pdftk # pdf $ gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=firstANDsecond.pdf -dBATCH first.pdf second.pdf usage # lamp sudo apt-get install libtool libltdl-dev libgnutls-dev libssl-dev fig2ps libgpg-error-dev libgpg-error0 libexpat1 libexpat1-dev libxml2 libxml2-dev libgcrypt11 libgcrypt11-dev libmcrypt4 libmcrypt-dev mcrypt libt1-5 libt1-dev libfreetype6 libfreetype6-dev libjpeg62 libjpeg62-dev libxpm4 # Qt4 sudo apt-get install libqwt5-qt4 libqwt5-qt4-dev pyqt4-dev-tools python-qt4 python-qt4-dev python-qwt5-qt4 qsource-highlight libqt4-dbg libqt4-dbus libqt4-declarative libqt4-designer libqt4-dev libqt4-gui libqt4-help libqt4-network libqt4-script libqt4-scripttools libqt4-sql-sqlite libqt4-webkit-dbg libqt4-xml libqt4-xmlpatterns qt4-demos qt4-demos-dbg qt4-designer qt4-dev-tools qt4-doc qt4-doc-html qt4-qmake libqt4-assistant libqt4-core libqt4-webkit qt4-qtconfig # development lib sudo apt-get install emacsen-common exiv2 exuberant-ctags gdebi-kde graphviz install-package kate kdebase-runtime kdebase-runtime-data kdelibs-bin kdelibs-data kdelibs4c2a kdelibs5 kdelibs5-data kdepimlibs-data kdepimlibs5 kdesudo kpackagekit kubuntu-debug-installer libakonadiprivate1 libattica0 libavahi-qt3-1 libboost-program-options1.40.0 libclucene0ldbl libdbusmenu-qt2 libexiv2-6 libiodbc2 liblua50 liblualib50 libmng1 libmodplug0c2 libmpcdec3 libmysqlclient16 libpackagekit-glib2-12 libpackagekit-qt-12 libphonon4 libplasma3 libpolkit-qt-1-0 libqca2 libqt3-mt libqt4-assistant libqt4-dbus libqt4-designer libqt4-help libqt4-network libqt4-opengl libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-mysql libqt4-svg libqt4-test libqt4-webkit libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4 libsoprano4 libssh-4 libstreamanalyzer0 libstreams0 libxcb-shape0 libxcb-shm0 libxcb-xv0 libxine1 libxine1-bin libxine1-console libxine1-misc-plugins libxine1-x mysql-common oxygen-icon-theme packagekit packagekit-backend-apt phonon phonon-backend-xine plasma-scriptengine-javascript polkit-kde-1 python-kde4 python-packagekit python-qt4 python-sip shared-desktop-ontologies software-properties-kde soprano-daemon ttf-dejavu ttf-dejavu-extra update-manager-kde virtuoso-nepomuk libelf-dev libdw-dev asciidoc binutils-dev
"=== basic ===" filetype plugin on "plugin enable filetype indent on "auto indent "=== encoding ===" set encoding=utf-8 "enc set fileencodings=utf-8,gbk,big5,cp950,gb18030,gb2312 "fenc set termencoding=utf-8 "tenc "=== editing ===" syntax on set nocompatible set backspace=indent,eol,start set shiftwidth=2 set tabstop=2 set softtabstop=2 set expandtab set ic "ignorecase set ru "position set nu "line number set hls "hlsearch set confirm set wrapscan set history=1000 set laststatus=2 set statusline=%4*%<\%m%<[%f\%r%h%w]\ [%{&ff},%{&fileencoding},%Y]%=\[Position=%l,%v,%p%%] "=== buffer ===" set clipboard+=unnamed "=== color scheme ===" set t_Co=256 colorscheme blackbeauty "for java colorscheme leo "for c/c++ "=== vim ===" autocmd FileType java runtime! autoload/javacomplete.vim autocmd Filetype java setlocal omnifunc=javacomplete#Complete autocmd Filetype java set completefunc=javacomplete#CompleteParamsInf inoremapinoremap "=== tab ===" nmap tc :tabnew nmap te :tabedit nmap tm :tabmove nmap tk :tabclose "=== folding ===" set foldenable set foldlevel=10000
$ adb pull /proc/config.gz .
$ gunzip config.gz
$ mv config .config
$ vim .config
CONFIG_MODULES=y
$ vim Makefile
# Use --build-id when available. #LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ # $(call ld-option, -Wl$(comma)--build-id,))
$ make mrproper
$ sudo make ARCH=arm CROSS_COMPILE={/path/to/android}/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/zImage is ready
#include <linux/init.h> #include <linux/module.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/fs.h> #include <linux/cdev.h> #include <asm/uaccess.h> MODULE_LICENSE("Dual BSD/GPL"); static int devone_devs = 1; /* device count */ static int devone_major = 0; /* dynamic allocation */ static int devone_minor = 0; static struct cdev devone_cdev; ssize_t devone_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos) { int i; unsigned char val = 0xff; int retval; for (i = 0 ; i < count ; i++) { if (copy_to_user(&buf[i], &val, 1)) { retval = -EFAULT; goto out; } } retval = count; out: return (retval); } struct file_operations devone_fops = { .read = devone_read, };
KERNELDIR={/path/to/android}/kernel PWD := $(shell pwd) obj-m := devone.o modules: make -C $(KERNELDIR) M=$(PWD) modules clean: rm -rf *.o *~ core.depend .*.cmd *.ko *.mod.c .tmp_versions modules.* Module*
$ sudo make ARCH=arm CROSS_COMPILE={/path/to/android}/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
$ emulator -avd {name} -partition-size {number} -kernel {/path/to/kernel/zImage}
$ adb push busybox /system/bin
$ adb shell chmod 755 /system/bin/busybox
$ adb remount
$ adb push devone.ko /system/lib
$ adb shell
# insmod devone.ko
# lsmod
devone 1784 - - Live 0xbf000000
# cat /proc/devices
... 136 pts 252 devone 253 ttyS ...
# /system/bin/busybox mknod /dev/devone c 252 0
# /system/bin/busybox ls /dev/
... device-mapper tty20 tty51 devone tty21 tty52 eac tty22 tty53 ...
# /system/bin/busybox ls -al /dev/devone
crw-rw-rw- 1 0 0 252, 0 Jan 4 05:33 /dev/devone
$ mkdir ~/.vim/colors2.看到喜歡的,下載{COLOR_SCHEME}.vim到colors目錄下
$ mv /path/to/{COLOR_SCHEME}.vim ~/.vim/colors3.修改Vim顏色設定,我目前是用blackbeauty和leo
$ vim ~/.vimrc
set t_Co=256 "support 256 colors colorscheme blackbeauty "blackbeauty is the name of color scheme colorscheme leo "leo is the name of color scheme4.在Vim中使用
:colorscheme COLOR_SCHEME