2012年6月27日 星期三

[Win7 64]Eclipse 抓不到 Android 設備解決

  1. 安裝JDK (設定PATH)
  2. 安裝ADT
  3. 安裝Android SDK (不能安裝請參考 http://www.wretch.cc/blog/DavidHo/907412 )
  4. 找不到Android 實體設備,確認Eclipse ADT中此檔案是否有裝
  5. 安裝過程中,裝置管理員即會找設備並安裝 Driver 
  6. 裝置管理員已經找到:


2012年6月8日 星期五

解決 VSFTP 無法上傳的問題



修改
 vi /etc/vsftpd/vsftpd.conf
把 anon_upload_enable=YES  前面註解的# 移除即可(不需要重新開FTP Server)




2012年6月5日 星期二

原來Ubuntu 內建沒有Gparted分割軟體@@

原來Ubuntu 內建沒有Gparted分割軟體@@
只有Live CD開機會有
只要手動從 Ubuntu Software Center 搜尋 "gparted" 安裝完成囉

Java \r \n

原先以為 \n 即可換行
但是寫個JAva程式輸出文字到windows 記事本後
發現\n 無效
必須也要加入\r
於是開始找網路資料才知道
而且一定要先 \r 再 \n
不能 \n \r

例如
char asus[] = {'A','S','U','S','\r','\n'};
String str = "End of file";
->正確換行


char asus[] = {'A','S','U','S','\n','\r'};
String str = "End of file";
->不能換行


这个跟操作系统有关
\r Mac
\n Unix/Linux
\r\n Windows
http://zhidao.baidu.com/question/234228652.html

find, grep

 find . -name "*.c" -exec grep "capacity" {} =nH \;
search .c file with "capacity"

2012年6月4日 星期一

[HTC One X]Howto: Compile Your Own Kernel


sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev g++-multilib lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z-dev libgl1-mesa-dev git

get One X source code from  http://htcdev.com/devcenter/downloads
I use Carrier is hTC Asia




download tool chain from:
https://sourcery.mentor.com/sgpp/lite/arm/portal/release1802


IA32 GNU/Linux TAR c6930d14801b4fab6705d72df013e58b

cd [Your kernel source]

make  endeavoru_android_defconfig (be found from kernel/arch/arm/configs/

make  endeavoru_android_defconfig ARCH=arm CROSS_COMPILE=/home/howy/android/arm-2010q1/bin/arm-none-linux-gnueabi-

make -j5 ARCH=arm CROSS_COMPILE=/home/howy/android/arm-2010q1/bin/arm-none-linux-gnueabi-

Result: Kernel: arch/arm/boot/zImage is ready




refer
http://rootzwiki.com/topic/8824-howto-compile-your-own-kernel-v-01/



boot.img tool
http://forum.xda-developers.com/showthread.php?t=562318
download:
http://forum.xda-developers.com/attachment.php?attachmentid=229872&d=1253485580


./mkbootimg --kernel /home/howy/kernel/arch/arm/boot/zImage --ramdisk /home/howy/ramdisk.img --output boot.img







relpace the boot.img on HTC One X

 root@howy-U53Jc:/root/android-sdks/platform-tools# ./fastboot flash boot /home/howy/boot.img


2012年5月31日 星期四

yum install xinetd


[root@howy public_html]# yum install xinetd
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.stuhome.net
 * extras: mirrors.stuhome.net
 * updates: mirrors.stuhome.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package xinetd.x86_64 2:2.3.14-33.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch            Version                    Repository     Size
================================================================================
Installing:
 xinetd          x86_64          2:2.3.14-33.el6            base          120 k

Transaction Summary
================================================================================
Install       1 Package(s)

Total download size: 120 k
Installed size: 259 k

Is this ok [y/N]: y
Downloading Packages:
xinetd-2.3.14-33.el6.x86_64.rpm                                                                                                                  | 120 kB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 2:xinetd-2.3.14-33.el6.x86_64                                                                                                                        1/1

Installed:
  xinetd.x86_64 2:2.3.14-33.el6

Complete!


21.2.6 針對實體帳號的設定
http://linux.vbird.org/linux_server/0410vsftpd.php#server_real



[root@howy public_html]# getsebool -a | grep ftp
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> on
ftpd_connect_db --> off
httpd_enable_ftp_server --> off
tftp_anon_write --> off