lynxeyedの電音鍵盤

MBDとFPGAと車載で使うデバイスの備忘録

Xperia U

独り言

最近、ちょっとした案件で香港やらアジア諸国に出かける事が多くなった事もあり、海外simフリー機を購入しました。
Xperia U
f:id:Lynx-EyED:20121113230221j:plain
公式サイト:
Xperia U | Android Mobile - Sony Smartphones (Global UK English)

Hutchison3 SIMでの運用です。国内でも"電波法第103条の5"に基づき『本邦内においてその包括免許に係る特定無線局と通信の相手方を同じくし、当該通信の相手方である無線局からの電波を受けることによつて自動的に選択される周波数の電波のみを発射する外国の無線局を運用することができる。』とのことなので問題は無く運用可能です。が、通信のお値段的にも日本国内で使う利点はほぼ無いです。

■ROMのアップデート
出荷時のROMはAndroid2.3.7というまた微妙な(ry
いま開発で使っているPhotonみたいにCWM+カスタムROM運用しようとしたのですが、うまく行かず断念。(ぉぃ
Xperiaに公式のAndroid4.0.4が降って来ていたのでPC Companionからアップデート。

■root化
Jelly Beanではデフォルトで「まともな」日本語フォントがありますが、ICSではfontは入れ替えたい。
あと/system/etc/やら弄る必要もあるだろうし…
ほぼ全自動でroot奪取してくれるバッチがあるのでありがたく使わせていただきました
Root MANY ANDROID! [Upd: 13.10.2012] - xda-developers
時々アップデートされているようです。自分のときはRoot_with_Restore_by_Bin4ry_v15.zipでした。このxdaのスレッド通り、USBデバッグを有効にした状態でXperiaを接続しrunme.bat動かすとXperiaは「バックアップと復元」が出現するので、復元を選択する。
2回ほど勝手にリブートしてからrootedなXperiaが登場。
これで、busyboxなどがはいりました。

シンボリックリンクを貼っておいたほうが後々楽(参考サイト:hpcalcのつぶやきメモ busyboxへのシンボリックリンク)なので、以下をadbから実行

su
mount -o rw, remount -t ext4 /dev/block/mmcblk0p10 /system 
cd /system/xbin
ln -s /system/xbin/busybox /system/xbin/arp
ln -s /system/xbin/busybox /system/xbin/ash
ln -s /system/xbin/busybox /system/xbin/awk
ln -s /system/xbin/busybox /system/xbin/basename
ln -s /system/xbin/busybox /system/xbin/bbconfig
ln -s /system/xbin/busybox /system/xbin/brctl
ln -s /system/xbin/busybox /system/xbin/bunzip2
ln -s /system/xbin/busybox /system/xbin/bzcat
ln -s /system/xbin/busybox /system/xbin/bzip2
ln -s /system/xbin/busybox /system/xbin/cal
ln -s /system/xbin/busybox /system/xbin/cat
ln -s /system/xbin/busybox /system/xbin/catv
ln -s /system/xbin/busybox /system/xbin/chgrp
ln -s /system/xbin/busybox /system/xbin/chmod
ln -s /system/xbin/busybox /system/xbin/chown
ln -s /system/xbin/busybox /system/xbin/chroot
ln -s /system/xbin/busybox /system/xbin/cksum
ln -s /system/xbin/busybox /system/xbin/clear
ln -s /system/xbin/busybox /system/xbin/cmp
ln -s /system/xbin/busybox /system/xbin/cp
ln -s /system/xbin/busybox /system/xbin/cpio
ln -s /system/xbin/busybox /system/xbin/cut
ln -s /system/xbin/busybox /system/xbin/date
ln -s /system/xbin/busybox /system/xbin/dc
ln -s /system/xbin/busybox /system/xbin/dd
ln -s /system/xbin/busybox /system/xbin/depmod
ln -s /system/xbin/busybox /system/xbin/devmem
ln -s /system/xbin/busybox /system/xbin/df
ln -s /system/xbin/busybox /system/xbin/diff
ln -s /system/xbin/busybox /system/xbin/dirname
ln -s /system/xbin/busybox /system/xbin/dmesg
ln -s /system/xbin/busybox /system/xbin/dnsd
ln -s /system/xbin/busybox /system/xbin/dos2unix
ln -s /system/xbin/busybox /system/xbin/du
ln -s /system/xbin/busybox /system/xbin/echo
ln -s /system/xbin/busybox /system/xbin/ed
ln -s /system/xbin/busybox /system/xbin/egrep
ln -s /system/xbin/busybox /system/xbin/env
ln -s /system/xbin/busybox /system/xbin/expr
ln -s /system/xbin/busybox /system/xbin/false
ln -s /system/xbin/busybox /system/xbin/fdisk
ln -s /system/xbin/busybox /system/xbin/fgrep
ln -s /system/xbin/busybox /system/xbin/find
ln -s /system/xbin/busybox /system/xbin/fold
ln -s /system/xbin/busybox /system/xbin/free
ln -s /system/xbin/busybox /system/xbin/freeramdisk
ln -s /system/xbin/busybox /system/xbin/fuser
ln -s /system/xbin/busybox /system/xbin/getopt
ln -s /system/xbin/busybox /system/xbin/grep
ln -s /system/xbin/busybox /system/xbin/gunzip
ln -s /system/xbin/busybox /system/xbin/gzip
ln -s /system/xbin/busybox /system/xbin/head
ln -s /system/xbin/busybox /system/xbin/hexdump
ln -s /system/xbin/busybox /system/xbin/id
ln -s /system/xbin/busybox /system/xbin/ifconfig
ln -s /system/xbin/busybox /system/xbin/insmod
ln -s /system/xbin/busybox /system/xbin/install
ln -s /system/xbin/busybox /system/xbin/ip
ln -s /system/xbin/busybox /system/xbin/kill
ln -s /system/xbin/busybox /system/xbin/killall
ln -s /system/xbin/busybox /system/xbin/killall5
ln -s /system/xbin/busybox /system/xbin/length
ln -s /system/xbin/busybox /system/xbin/less
ln -s /system/xbin/busybox /system/xbin/ln
ln -s /system/xbin/busybox /system/xbin/losetup
ln -s /system/xbin/busybox /system/xbin/ls
ln -s /system/xbin/busybox /system/xbin/lsmod
ln -s /system/xbin/busybox /system/xbin/lspci
ln -s /system/xbin/busybox /system/xbin/lsusb
ln -s /system/xbin/busybox /system/xbin/lzop
ln -s /system/xbin/busybox /system/xbin/lzopcat
ln -s /system/xbin/busybox /system/xbin/md5sum
ln -s /system/xbin/busybox /system/xbin/mkdir
ln -s /system/xbin/busybox /system/xbin/mke2fs
ln -s /system/xbin/busybox /system/xbin/mkfifo
ln -s /system/xbin/busybox /system/xbin/mkfs.ext2
ln -s /system/xbin/busybox /system/xbin/mknod
ln -s /system/xbin/busybox /system/xbin/mkswap
ln -s /system/xbin/busybox /system/xbin/mktemp
ln -s /system/xbin/busybox /system/xbin/modprobe
ln -s /system/xbin/busybox /system/xbin/more
ln -s /system/xbin/busybox /system/xbin/mount
ln -s /system/xbin/busybox /system/xbin/mountpoint
ln -s /system/xbin/busybox /system/xbin/mv
ln -s /system/xbin/busybox /system/xbin/nc
ln -s /system/xbin/busybox /system/xbin/netstat
ln -s /system/xbin/busybox /system/xbin/nice
ln -s /system/xbin/busybox /system/xbin/nohup
ln -s /system/xbin/busybox /system/xbin/nslookup
ln -s /system/xbin/busybox /system/xbin/ntpd
ln -s /system/xbin/busybox /system/xbin/od
ln -s /system/xbin/busybox /system/xbin/patch
ln -s /system/xbin/busybox /system/xbin/pgrep
ln -s /system/xbin/busybox /system/xbin/pidof
ln -s /system/xbin/busybox /system/xbin/ping
ln -s /system/xbin/busybox /system/xbin/pkill
ln -s /system/xbin/busybox /system/xbin/printenv
ln -s /system/xbin/busybox /system/xbin/printf
ln -s /system/xbin/busybox /system/xbin/ps
ln -s /system/xbin/busybox /system/xbin/pwd
ln -s /system/xbin/busybox /system/xbin/rdev
ln -s /system/xbin/busybox /system/xbin/readlink
ln -s /system/xbin/busybox /system/xbin/realpath
ln -s /system/xbin/busybox /system/xbin/renice
ln -s /system/xbin/busybox /system/xbin/reset
ln -s /system/xbin/busybox /system/xbin/rm
ln -s /system/xbin/busybox /system/xbin/rmdir
ln -s /system/xbin/busybox /system/xbin/rmmod
ln -s /system/xbin/busybox /system/xbin/route
ln -s /system/xbin/busybox /system/xbin/run-parts
ln -s /system/xbin/busybox /system/xbin/sed
ln -s /system/xbin/busybox /system/xbin/seq
ln -s /system/xbin/busybox /system/xbin/setsid
ln -s /system/xbin/busybox /system/xbin/sh
ln -s /system/xbin/busybox /system/xbin/sha1sum
ln -s /system/xbin/busybox /system/xbin/sha256sum
ln -s /system/xbin/busybox /system/xbin/sha512sum
ln -s /system/xbin/busybox /system/xbin/sleep
ln -s /system/xbin/busybox /system/xbin/sort
ln -s /system/xbin/busybox /system/xbin/split
ln -s /system/xbin/busybox /system/xbin/stat
ln -s /system/xbin/busybox /system/xbin/strings
ln -s /system/xbin/busybox /system/xbin/stty
ln -s /system/xbin/busybox /system/xbin/swapoff
ln -s /system/xbin/busybox /system/xbin/swapon
ln -s /system/xbin/busybox /system/xbin/sync
ln -s /system/xbin/busybox /system/xbin/sysctl
ln -s /system/xbin/busybox /system/xbin/tac
ln -s /system/xbin/busybox /system/xbin/tail
ln -s /system/xbin/busybox /system/xbin/tar
ln -s /system/xbin/busybox /system/xbin/tee
ln -s /system/xbin/busybox /system/xbin/telnet
ln -s /system/xbin/busybox /system/xbin/test
ln -s /system/xbin/busybox /system/xbin/tftp
ln -s /system/xbin/busybox /system/xbin/time
ln -s /system/xbin/busybox /system/xbin/top
ln -s /system/xbin/busybox /system/xbin/touch
ln -s /system/xbin/busybox /system/xbin/tr
ln -s /system/xbin/busybox /system/xbin/traceroute
ln -s /system/xbin/busybox /system/xbin/true
ln -s /system/xbin/busybox /system/xbin/tty
ln -s /system/xbin/busybox /system/xbin/tune2fs
ln -s /system/xbin/busybox /system/xbin/umount
ln -s /system/xbin/busybox /system/xbin/uname
ln -s /system/xbin/busybox /system/xbin/uniq
ln -s /system/xbin/busybox /system/xbin/unix2dos
ln -s /system/xbin/busybox /system/xbin/unlzop
ln -s /system/xbin/busybox /system/xbin/unzip
ln -s /system/xbin/busybox /system/xbin/uptime
ln -s /system/xbin/busybox /system/xbin/usleep
ln -s /system/xbin/busybox /system/xbin/uudecode
ln -s /system/xbin/busybox /system/xbin/uuencode
ln -s /system/xbin/busybox /system/xbin/vi
ln -s /system/xbin/busybox /system/xbin/watch
ln -s /system/xbin/busybox /system/xbin/wc
ln -s /system/xbin/busybox /system/xbin/wget
ln -s /system/xbin/busybox /system/xbin/which
ln -s /system/xbin/busybox /system/xbin/whoami
ln -s /system/xbin/busybox /system/xbin/xargs
ln -s /system/xbin/busybox /system/xbin/yes
ln -s /system/xbin/busybox /system/xbin/zcat

■フォントの入れ替え
フォントは下記のサイトから頂いてきます。
Android用日本語フォントパッケージ | Weboo! Returns.
参考サイト:
遊馬2の備忘録: Xperia Mini Pro SK17i、ICS フォント変更

Photonのときはfont installerアプリを使ったのですが、Xperia Uでは一部しか変更されない上、アプリの動作が遅くなる謎現象が発生したので、まじめに入れ替え作業をしました。
Xperia U内蔵のリムーバルディスク(/sdcard/)にフォントをコピーしておきます。

su
mount -o rw, remount -t ext4 /dev/block/mmcblk0p10 /system 
cp -a /sdcard/DroidSansFallback.ttf /system/fonts/
cp -a /sdcard/DroidSansJapanese.ttf /system/fonts/
cd /system/fonts
chmod 644 DroidSansFallback.ttf
chmod 644 DroidSansJapanese.ttf
cp /system/etc/fallback_fonts.xml /sdacard/
exit
exit


この後、参考サイト通り、fallback_fonts.xmlを編集します。PC上で編集した方がらくだと思います。

adb pull /sdcard/fallback_fonts.xml /(自分のPCの編集しやすいディレクトリ。)


fallback_fonts.xmlがPC上のディレクトリにコピーされたので、エディタで編集する。DroidSansFallback.ttfの直前にDroidSansJapanese.ttf を追加します。

(中略)
    <family>
        <fileset>
            <file>DroidSansJapanese.ttf</file>
        </fileset>
    </family>
    <family>
        <fileset>
            <file>DroidSansFallback.ttf</file>
        </fileset>
    </family>
</familyset>

保存し、adb経由でandroidに送ります。

adb push /(自分のPCディレクトリ)/fallback_fonts.xml /sdcard/
adb shell
su
mount -o rw, remount -t ext4 /dev/block/mmcblk0p10 /system
cp -a /sdcard/falback_fonts.xml /system/etc/ 
cd /system/etc
chmod 644 fallback_fonts.xml
reboot

これで、無事font入れ替え終了のはず。
f:id:Lynx-EyED:20121114235322p:plain

■Android2.3.7の時は電源ボタン長押しで、スクリーンキャプチャできたのに、Android 4.0.4でそのメニューが無い
電源と、ボリュームダウンボタン同時長押しでできる事が判明。。。

どこかでケース買おうかな。