2014年10月27日 星期一

[Android]記憶卡無法正常掛載 "DAMAGED SD CARD"



1.開啟dos視窗, 執行 >> cmd

2.輸入chkdsk /X /F <SD card drive letter>:

假設記憶卡是在 K 槽, 就輸入下方指令

chkdsk /X /F K:

[Android]SH-06E 中文化方式 (4.2.2)



JDK 7u45 & NetBeans 7.4
下載後請安裝

步驟二:
打開手機的USB除錯模式
他位於settings > developer options>USB debuggings
如果您在settings 裡面找不到開發者選項
請在settings>about phone>build number 快速連按七下
再回上一層就會出現

步驟三:
把手機用USB接到電腦

讓電腦去找硬體

步驟四:
下載 android sdk
載點
http://developer.android.com/sdk/index.html#download

請選擇您的位元版本

下載後解壓

執行圖示是一個小綠人的程式 名叫sdk manager

如果您稍待兩秒
這個程式沒有開啟視窗運行
而是閃退的話
表示您java沒裝好

請務必裝好java

接下來在sdk manager視窗中
勾選最上面的TOOLS及旗下的三個選項
分別為
sdk tools
sdk platform-tools
sdk build-tools

勾選後請按視窗右下角的 install packages
安裝後可關掉此視窗

步驟五:

打開裝置管理員
選取可攜式裝置
去手動更新它的驅動程式
https://sh-dev.sharp.co.jp/android/modules/driver_eng/
位置請指向下載的driver 資料夾

步驟六:
回到步驟三,下載的檔案的資料夾
應該是adt-bundle-windows-x86-20131030
這個資料夾
請在底下找
>sdk這個資料夾
把整個資料夾拷貝到C:底下
步驟七:
Play商店安裝Locale & Language 的程式

步驟八:
打開附屬應用程式>命令提是字元
或者win键+r,输入CMD

出現Dos視窗
輸入cd/
退出到跟目錄c槽
輸入cd sdk\platform-tools\
路徑更換了
輸入 adb devices
會出現
list of devices attached
(一串數字) device

接著使用Adb命令,Dos視窗上執行如下命令手動獲取該許可權
>adb shell
>pm grant com.sightidea.locale android.permission.CHANGE_CONFIGURATION

步驟九:
開啟手機裏的Locale & Language 程式
切換至 中文(繁體)

打完收功......^^

[Ubuntu]架IPv6 DHCP Server


sudo apt-get install isc-dhcp-server
1. set a static IPv6 address for the Interface I want to run the DHCPv6 server from that is part of the IPv6 network subnet outside the DHCP range.
2. Edit the /etc/dhcp/dhcpd6.conf file to configure the DHCPv6 range etc.
3. Create the /var/lib/dhcp/dhcpd6.leases
4. Manually start the DHCPv6 server.
----------------------------------------------------------------------------
sudo ifconfig eth0 inet6 add 2001:db8:0:1::128/64

[ configure dhcpd6.conf ]

default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet6 2001:db8:0:1::/64
{
#Range for clients
range6 2001:db8:0:1::129 2001:db8:0:1::254;
}

touch /var/lib/dhcp/dhcpd6.leases

chown dhcpd:dhcpd /var/lib/dhcp/dhcpd6.leases
sudo dhcpd -6 -f -cf /etc/dhcp/dhcpd6.conf eth0


****************************************************
Can't open /var/lib/dhcp/dhcpd6.leases for append.

sudo chmod 666 /var/lib/dhcp/dhcpd6.leases

[Ubuntu]install miniSIPServer



Download miniSIPServer

Please visit our website to download miniSIPServer. Please pay attention that you MUST download miniSIPServer for Debian/Ubuntu.
If you are working on Ubuntu/Kubuntu desktop, it is quite easy to install miniSIPServer. What you need do is just click ".deb" packages.
Following steps illustrate how to install miniSIPServer on Debian or Ubuntu/Kubuntu server.

 

Install libraries

miniSIPServer requires some libraries. We can get and install them from Debian/Ubuntu official sites directly:

sudo apt-get install gcc g++ libqt4-dev libqtcore4 libqtgui4 libqt4-network libqt4-xml libssl-dev libmysqlclient18 libmysqlclient-dev python-dev

 

Install miniSIPServer

It's assumed we have downloaded “mss_v14_u20.deb” package, then please run following command to install miniSIPServer:

sudo dpkg --install mss_v14_u20.deb

After above steps, you will find all miniSIPServer's files at directory "/opt/sipserver/".
If you are in GUI desktop, you will find miniSIPServer linker at "Internet" category.

 

Run

As you know, if you start GUI desktop, such as Gnome/KDE/Unity, you only need click miniSIPServer linker to start and configure it.You will see its interface is almost same with miniSIPServer for Windows.
If desktop environment is not started, we can run miniSIPServer CLI(command line) version. Please use following command.

/opt/sipserver/msscli&

[Ubuntu]install BlueGriffon



wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -

sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu saucy-getdeb apps" >> /etc/apt/sources.list.d/getdeb.list'

sudo apt-get update

sudo apt-get install bluegriffon

[Ubuntu]Thunderbird 中文化


1.Update the package index:
# sudo apt-get update
2.Install thunderbird-locale-zh-hant deb package:
# sudo apt-get install thunderbird-locale-zh-hant

[Linux]CrunchBang Linux

新增中文字體及輸入法
sudo apt-get update
sudo apt-get install ttf-wqy-microhei
sudo apt-get install ibus-chewing

im-config


桌面解析度設定
nano ~/.config/openbox/autostart

新增
xrandr --size 1600x768 &

sudo reboot

[ubuntu]Install TFTP Server


sudo apt-get install tftpd-hpa tftp-hpa

sudo gedit /etc/default/tftpd-hpa

####################
#Defaults for tftpd-hpa
TFTP_USERNAME="root"
TFTP_DIRECTORY="/home/takashi/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-l -s -c --secutre"

####################
PS:/home/takashi/tftpboot 需要自已新增目錄

sudo mkdir /home/takashi/tftpboot

sudo chmod 777 /home/takashi/tftpboot

sudo service tftpd-hpa start

在Ubuntu上面直接裝的TFTP server套件不會在開機時執行,精確一點說應該是開機時跑了卻沒有起來。
這是個老毛病,修一下就好。
編輯 /etc/init/tftpd-hpa.conf ,修改它錯誤的初始條件。

#start on runlevel [2345] # the original line which is wrong
start on (filesystem and net-device-up IFACE!=lo)

[Linux]Lubuntu install Xrdp



sudo apt-get install xrdp
echo 'lxsession' > .xsession
sudo apt-get install xvfb lxde
sudo service xrdp restart

[Linux] ubuntu install telnet service


ubuntu安装telnet服务
1. sudo apt-get install xinetd telnetd
sudo gedit /etc/inetd.conf并加入以下一行,假如没有发现这个文件,
自己新建立一个也是可以的.
 ------------------------------------------------------------------------------------------------------------
telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd
 ------------------------------------------------------------------------------------------------------------
3. sudo gedit /etc/xinetd.conf并加入以下内容:

------------------------------------------------------------------------------------------------------------
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/

defaults
{
# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}
 ------------------------------------------------------------------------------------------------------------
4. sudo gedit /etc/xinetd.d/telnet并加入以下内容:

 ------------------------------------------------------------------------------------------------------------
# default: on
# description: The telnet server serves telnet sessions; it uses
# unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
} 
 ------------------------------------------------------------------------------------------------------------
5. 重启机器或重启网络服务 
sudo /etc/init.d/xinetd restart

[Linux]Pure-FTPD + pureadmin


Install ''Pure-FTPD'' with GUI

1. Install the pure-ftpd package and the pureadmin package from the Universe Repository.

sudo apt-get install pure-ftpd pureadmin  

2.新增虛擬使用者所要對應的系統使用者(ftpuser)與其家目錄
sudo adduser --system --home /home/ftpuser --shell /dev/null --disabled-password  --disabled-login ftpuser

3.新增虛擬使用者
sudo pure-pw useradd user01 -u ftpuser -d /home/ftpuser

如果要不同使用者有不同家目錄需在 -d 指定且新增其家目錄, 如
sudo mkdir /home/ftpuser/joe; sudo chown -R ftpuser /home/ftpuser/joe
sudo pure-pw useradd joe -u mis91 -d /home/ftpuser/joe
預設會新增在 /etc/pure-ftpd/pureftpd.passwd 中,或使用 pure-pw -f your.passwd.file 指定

4.建立 db 並確認 /etc/pure-ftpd/conf/PureDB 中資料為 /etc/pure-ftpd/pureftpd.pdb
sudo pure-pw mkdb /etc/pure-ftpd/pureftpd.pdb -f /etc/pure-ftpd/pureftpd.passwd

加入 DB 認証模式至設定中
sudo ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/45puredb

5.確認幾項設定
* 確認 cat /etc/pure-ftpd/conf/UnixAuthentication 中指有字串 no
* 確認 cat /etc/pure-ftpd/conf/MinUID 中的數值比 ftpuser 的 UID 還小(如: adduser --system 的 UID 通常會預設值) , 不然虛擬帳號無法登入

6.重新啟動 pure-ftpd service
sudo /etc/init.d/pure-ftpd restart

============================================================
其他常用到的幾個設定,檔案都需寫在 /etc/pure-ftpd/conf 下
* ) echo "yes" > ChrootEveryone (使用者被限制在家目錄下)
* ) echo "no" > PAMAuthentication (不使用 PAM 認証:一般用者無法用 pure-ftpd 登入)
*) echo ",9188" > Bind (設定 ip/port )
* ) echo "yes" > KeepAllFiles (這個應該是不允許用戶端刪除文件)
* ) echo "yes" >DontResolve (不解釋主機名,可以加快登錄速度)

設定允許 symbolic links :
1) 編輯 /etc/default/pure-ftpd-common
將 VIRTUALCHROOT=false 改為 VIRTUALCHROOT=true
2) Restart service

設定允許 匿名登入
1) echo "no" > /etc/pure-ftpd/conf/NoAnonymous
2) sudo adduser --system --home /home/ftpuser --shell /sbin/nologin --disabled-password  --disabled-login  ftp
3) Restart service

設定 Passive mode
1) echo "29799 29899" > /etc/pure-ftpd/conf/PassivePortRange

 設定最多 clients 數量
1) echo "50" > /etc/pure-ftpd/conf/MaxClientsNumber

[Game] Rimworld enable Dev mode (for Mac)

In Finder Press Command+Shift+Dot to open hidden folder /Users/[user name]/Library/Application Support/RimWorld/Config/DevModeDisable Dele...