Main Page‎ > ‎

EZX

EZX

A780/A910/A1200/ROKRE2/ROKRE6 consist in linux based (ezx) phones from Motorola

File:A780-small.png File:A1200-small.png

Contents

 [hide]

Must see links

Good links to start with for discovering ezx phones:

Crosstool toolchain

There are many toolchains floating around:

SDK: software development kit

There is no official version. All the SDKs have been reversed engineered from the phone binaries. For the A780 and E680 one can use the following unofficial sdk:http://lsb.blogdns.net/ezx-devkit Note that no corresponding version exist for A1200, ROKRE2 and ROKRE6. In order to reconstruct from scratch the library headers files from the stripped binaries present on the phone you can play with:

arm-linux-objdump -T --demangle libezxappbase.so
arm-linux-nm -aDC libezxappbase.so

Native applications: mkezx distrib/packaging framework

I contribute to the mkezx project http://www.mkezx.org which

  1. provides a distribution debian like packaging framework for creating native applications
  2. contains a self generated toolchain
  3. provides its own mini web server in order to be able to update your phone through a simple apt-get update and apt-get dist-upgrade
  4. packages a full xorg kdriver, gtk libraries, matchbox window manager, gpe applications suite
  5. embeds an open telephony application (handling calls, sms)
  6. provides the basis to wipe out all motorola applications and qt server and switch to a real open-phone!

I use mutt with ssl support to read and write emails on my phone based thanks to mkezx! The number of applications is still growing but already you have access to the following packages:

  • alsa-lib antiword apt aptitude atk1.0 audiofile autoconf automake autotools-dev bash binutils-arm binutils-mipsel binutils-powerpc bluez-hcidump bluez-libs bluez-utils busybox bzip2 chrpath cramfs crosstool crosstool-ezx crosstool-mipsel cyrus-sasl2 db4.4 dbus dbus-glib dfbterm diffutils directfb1.0 dosfstools dpkg dropbear e2fsprogs ecore edje eet elinks embryo esmtp esound evas expat fakeroot fbgrab fbset file file-static fontconfig freetype gconf2 gconf2-static gdb gdbm gettext glib2.0 glib2.0-static glibc gnokii gnome-mime-data gnome-vfs2 gnupg gnuplot gnutls13 gomunicator gpe gpe-calculator gpe-calendar gpe-contacts gpe-edit gpe-filemanager gpe-gallery gpe-go gpe-icons gpe-lights gpe-othello gpe-plucker gpe-sketchbook gpe-taskmanager gpe-tetris gpe-todo gtk+2.0 gtk+2.0-directfb gtk+2.0-static gtk2-directfb-test gtk2-engines gtk2-test gtk2-theme-angelistic gzip hexedit hping2 httptunnel inetutils intltool-static iptables jffs-utils lcms less lftp libao libbonobo libcairo libcairo-directfb libcontactsdb libdts libesmtp libeventdb libfakekey libfontenc libgcrypt11 libgd2 libglade2 libgpelaunch libgpepimc libgpevtype libgpewidget libgpg-error libgtkinput libgtkstylus libhandoff libice libid3tag libidl libjpeg6b libmad libmatchbox libmimedir libmng libmpcdec libnet libogg libopenobex libpcap libpng libschedule libsigc++-2.0 libsm libsoup libtasn1-3 libtheora libtododb libtool libupnp libusb libvorbis libwnck libx11 libxau libxcursor libxdmcp libxext libxfixes libxfont libxi libxinerama libxkbfile libxml2 libxmu libxpm libxrandr libxrender libxsettings libxsettings-client libxt libxtst linux-ezx linux-fusion linux-headers-2.4-ezx linux-headers-2.6-mipsel linux-headers-2.6-powerpc linux-source-a1200 linux-source-a780 linux-source-rokre2 lite lsof lzo lzo2 m4 matchbox matchbox-applet-input-manager matchbox-applet-tasks matchbox-common matchbox-config-gtk matchbox-desktop matchbox-keyboard matchbox-panel matchbox-panel-manager matchbox-stroke matchbox-themes-extra matchbox-themes-gtk matchbox-window-manager mcabber mediatomb minicom mkezx mkezx-image mkphone mpg321 mplayer mrxvt mutt nano ncurses net-tools netcat nmap nsqld ntp octave opencdk8 openssl openvpn orbit2 orbit2-static pango1.0 pango1.0-directfb patchutils pciutils pcre3 pkg-config popt pump qonsole qt2-embedded qt2-x11-static qt3-x11 qt3-x11-static qt3-x11-test readline5 rsync samba screen settings-daemon sqlite sqlite3 startup-notification strace tar tcpdump tcptraceroute tiff tinyproxy traceroute tslib uclibc unzip usbutils ushare vim wget x11proto-bigreqs x11proto-composite x11proto-core x11proto-damage x11proto-evie x11proto-fixes x11proto-fontcache x11proto-fonts x11proto-input x11proto-kb x11proto-randr x11proto-record x11proto-render x11proto-resource x11proto-scrnsaver x11proto-trap x11proto-video x11proto-xcmisc x11proto-xext x11proto-xf86bigfont x11proto-xf86dga x11proto-xf86misc x11proto-xf86vidmode x11proto-xinerama xbase-clients xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils xfonts-utils-static xft xinetd xorg xorg-server xst xtrans xutils-dev zlib

A piece of advice: always use the svn checkout and do read the README (everything is explained there for newbies!).

Linux desktop configuration to use ezx phones

  • add usb0 usbnet interface configuration in /etc/network/interfaces (debian style). Note the mtu 900 which is very important to have the telnet session not to freeze
iface usb0 inet static
  address 192.168.1.1
  pointopoint 192.168.1.2
  netmask 255.255.255.0
  network 192.168.1.0
  broadcast 192.168.1.255
  mtu 900
  • to mount the phone add in /etc/fstab the following entry (do not forget to create /mnt/ezx directory)
//ezx/system /mnt/ezx smbfs guest,noauto,user 0 0

Hardware information

Package installation process

Package installation on a1200, rokre6

On the a1200 and rokre6 only signed mpkg can be installed. Thanks to yan0 there is a work around: a package installer application mpkg that enables to get around the signature check and enables the installation of unsigned .pkg packages. Compared to the original yan0 version I made some speed enhancements and code cleanups consisting in:

  • avoiding the unnecessary testing of the pkg file format (i.e. tar.gz or .tar) through the use of its magic
  • adding ezxpopup touch providing a popup notification of the start of the install and completion
  • performing a kill of am (application manager) at the end of the installation in order to refresh the icon list (kind of bruteforce but I haven't found a cleaner way...)

In order to install this package installer you need to:

  1. retreive mpkg from the following forum topics: http://www.motorolafans.com/forums/viewtopic.php?t=9681 (rokre6) or http://www.motorolafans.com/forums/viewtopic.php?t=9680 (a1200)
  2. untar the content of the archive at the root of the phone (micro-)sd card: this should create a .system folder

http://www.motorolafans.com/forums/viewtopic.php?t=7175

Once mpkg package installer is operational in order to install a .pkg touch the package icon you wish to install until a menu appears and select "open with" mpkg striking the "always use the program..." box in order to make the correct association once for all.

Package installation on other handsets (a780, e680, rokre2)

In order to install a .mpkg package you need to install the provided package through the use of the native installer. Installation is performed by by touching the package icon you wish to install until a menu appear and select "Install"

Inet daemon with telnet and samba daemon packages

Since on the a1200 and rokre6 for the latest released firmware telnet and samba are gone, I have made some package to reintroduce these important development features.

The binaries provided here come from the a780. The only difference for inetd is that I modified the call in in.telnetd to telnetlogin to redirect it to /mmc/mmca1/sbin/tnlg though a simple sed When touching the inetd or smbd icons it simply enables/disables the daemon. The icon is used as an on and off switch.

Ssh daemon package with a patched version of dropbear

Introduction

This is the sshd package embedding an ssh server for ezx phones based on a patched version of dropbear. The motivation for this package is to provide a more secure login process on the phone than telnet with an empty root password. By the way, note that telnet is now disabled on the latest production firmwares for the new generation ezx phones. Compared to the vanilla dropbear version the provided dropbear binary has been patched to:

  1. allow only public key authentication
  2. disable empty password check to allow root login even with an empty password in /etc/passwd

If you wish to analyze the resulting source code, please have a look at mkezx: http://www.mkezx.org these patches have been contributed to this great generic build framework and can be browsed online at mkezx dropbear patches

Principle

This package replicates at the first start the content of the read only directory /etc in /ezxlocal/rwetc and modifies the home directory of ezx and root users to be set to a writeable location: /ezxlocal/home/ezx and /ezxlocal/home/root respectively. Directory /ezxlocal/rwetc is mounted in place of /etc through the use of mount -t bind command. This way /etcbecomes writeable (you can even change root and ezx password). The host keys are installed in /etc/dropbear and uses keys are also generated. This trick enabled me to get rid of many unnecessary dropbear patches compared to former version.

Preparation before usage

The creation of the root and ezx home directories and replication and modification of the /etc directory are performed automatically at the fist launch of the script. Since the authentication for ssh is based on public key thus in order to allow login you need to:

  • distribute the ssh key of the host user you want to allow to connect to the phone on the handset by simply appending the public portion of the key to the handset user authorized keys file: e.g. /ezxlocal/home/ezx/.ssh/authorized_keys. This can simply be done using the samba server smb package through a mount of the relevant directories.

Usage

The application icon is used as an on and off switch launching the ssh daemon (dropbear) in background. If this package does not work please refer to dropbear succinct documentation and also check the permission of the ssh users configuration files on the handset (they should be read only for the user!).

Download

The resulting packages are available at a1200 sshd versionrokre6 sshd version and rokre2 sshd version

Mplayer recompilation and further acceleration

What was available before starting this effort

A packaged version of mplayer for the a780/e680 is available around: eplayer. The original post is from icq8 on ccmove: http://club.ccmove.com/nclub/topicdisplay.aspx?boardid=-2&pageno=1&TopicID=150559. This version contained already some optimized for the arm core based on the zaurus code from http://atty.skr.jp/pukiwiki/?Zaurus%2Fmplayer The latest version is available through svn browsing at http://atty.skr.jp/WebSVN/listing.php?repname=mplayer-w100&path=%2Ftrunk%2F&rev=0&sc=0#/trunk/.

Further enhancements brought to the code

All started by trying to to recompile this optimized version: it is requiring unfortunately the non-free optimized arm intel libraries Integrated Performance Primitiveshttp://intel.com/cd/software/products/asmo-na/eng/perflib/ipp/index.htm or linux download http://www.intel.com/software/products/ipp/downloads/ipplin.htm (you need to apply for a license). Since A780/A1200 core has the iWMMX extensions, you can download the binaries for Intel PCA Processors with Intel Wireless MMX Technology.

Now a working set of patches against MPlayer v1.0pre8 source merging all the mplayer-zaurus modifications is available in the patches directory of mkezx mplayer package and is composed of the following pieces:

  • 01_zaurus.diff: this patch doesn't contain the non required ATI imageon acceleration parts since the a780 phone uses the embedded LCD controler present in the PXA27x processor. The A780/A1200 could theoretically use the bvdd acelerated video output but it is not working yet and interfering with the motorola kernel pxafb driver.

Compared to this plain IPP library based accelerated patch we have contributed new code to enable the following features:

Please note that:

  • all this code is available and committed to the mkezx phone extension framework for an easy build
  • the provided patches could also be applied to the zaurus mplayer mainstream
  • the mplayer binary might work on tomtom linux GPS devices!

WIP: work in progress, a new version of mplayer is being worked out based on 1.0rc1 svn tree. We have been contacted by the mplayer maintainers and are trying to integrate as much as possible of the above modifications into the mplayer mainstream! More to come soon I hope...

Zmplayer package

Introduction

zmplayer includes:

  • an accelerated version of mplayer based on v1.0pre8 with the following enhancements:
  1. zaurus patch including the zaurus PXA27x iWMMX acceleration code making use of the Intel Integrated Performance Primitive
  2. bring 18bpp support (e.g. for A1200)
  3. prevent fbdev initialization since it crashes on 19bpp phones
  4. accelerate YUV2RGB conversion using Intel IPP library for 16bpp phones (A780/E680)
  5. perform cache optimized 8x8 block rotations and also adds contextual rotation based on aspect ratio (rotate=9 or rotate=10 option)
  6. allow osd and subtitle rotation through subrotate=1 or subrotate=2 option
  7. include extension based file filtering capability
  8. add get_property code to allow the presence of the menu on thescreen to be probed
  9. add a background video for audio only tracks
  • a minimalistic ezx mplayer fqt rontend: zmplayer that consists of the launcher and an event handler communicating with the mplayer process. This frontend takes care of disabling power management to keep the screen backlight on.

Note that enhancements 2 through 6 are custom patches made by us which basically ensures that the mplayer binary provided is the fastest one for ezx phones :-) Though distributed as a separate package you can build your own latest mplayer binary version by using mkezx since all the patches have been contributed to this open source framework. Unfortunately the source code of the ezx mplayer frontend: zmplayer will not be distributed for now. If you wish to convert a video for the phone an example script: mkvideo-ezx.sh based on mencoder is included in the package.

Installation

In order to install this package you need to follow package installation procedure described above and:

  1. download an avi video in your phone transflash and make the association with zmplayer application. The association is performed by touching the avi file to play until a menu appears and select "open with" zmplayer striking the "always use the program..." box.

Key mapping

Key/function mapping:

  • Volume select: toggle Volume/Brightness/Contrast/Speed/Audio delay/Subtitle delay
  • Volume+: decrease volume selection
  • Volume-: increase volume selection
  • Navigation up: slow rewind
  • Navigation down: slow forward
  • Navigation right: fast forward
  • Navigation left: fast rewind
  • Navigation select: pause
  • Camera: quit (A780), toggle OSD (otherwise)
  • End (Off): quit (except A780)
  • Send (Home): toggle menu
  • Play/Pause (ROKRE2): pause

Configuration

Global shell variables:

  • ZMPLAYER_BACKGROUND: specifies the location of the background.avi to display if zmplayer is called without argument.
  • ZMPLAYER_LEFT_HANDED: if not empty then assumes the phone is turned the other way.
  • ZMPLAYER_PLATFORM: if not empty used to force the platform type for correct key mapping. Possible values are A780, E680, A1200, etc.

ZMPLAYER_SILENCE: specificies the location of silence.ogg, an audio only track to play when the zmplayer is called without arguments.

Download

The resulting package for:

Video encoding parameters

As an indication here are the video encoding parameters used in the mkvideo-ezx.sh encoding linux script based on mencoder for the ezx phone included in zmplayer package:

  • 16:9 aspect ratio, mpeg4 video bitrate 200kbps, mp3 audio bitrate 64kbps dual channel ABR 22050Hz sampling rate, 320:176 image size resolution (scaling)
  • 4:3 aspect ratio, mpeg4 video bitrate 200kbps, mp3 audio bitrate 64kbps dual channel ABR 22050Hz sampling rate, 320:240 image size resolution (scaling)

Here are the mencoder options used for various quality profiles that I use:

  • VHQ: very high quality (very slow) vcodec=mpeg4:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:vmax_b_frames=2:vb_strategy=1:precmp=2:cmp=2:subcmp=2:preme=2:qns=2
  • HQ: high quality vcodec=mpeg4:mbd=2:trell:v4mv:last_pred=2:dia=-1:vmax_b_frames=2:vb_strategy=1:cmp=3:subcmp=3:precmp=0:vqcomp=0.6:turbo:vbitrate
  • FAST: fast profile vcodec=mpeg4:mbd=2:trell:v4mv:turbo
  • RT: realtime vcodec=mpeg4:mbd=2:turbo

Note: it is always faster to perform rotation of the movie so that it spares mplayer to perform the software rotation in the encoding: i.e. use -vf scale=$scale,rotate=1 video filter.

Make /etc editable & change root passwd (more secure telnet)

The idea is to mount on /etc a rw directory

  • put in /ezxlocal/etc a copy of /etc
cp -dprf /etc /ezxlocal/etc
  • replace current /etc with writeable copy of it
mount -o bind /ezxlocal/etc /etc
  • amoung other things edit the /etc/passwd at least for changing root and ezx passwords (you can even create your own users!). In order to get a fresh new password you can use on any linux host the apache htpasswd command. For example to generate a password for root copy the result of the following command into /etc/passwd file.
htpasswd -n root

In my /etc/passwd file I even changed the home directories for the users...

Mount in loopback a rw partition file image

Motivation: have a rw mkezx image instead of rw cramfs. Here is the procedure:

  • create the partition
dd if=/dev/zero of=mkezx.img bs=1024 count=200
  • setup the loopback device
losetup /dev/loop0 mkezx.img
mke2fs /dev/loop0
insmod -f ./ext2.o
  • mount the device
mount /dev/loop0 /ezxlocal/mmc

Icons generation for applications

If you use square icons on the a1200 they will be stretched horizontally. In order to avoid this undesirable effect I use the following command to reshape them correctly and automatically:

convert original-icon.png -resize 43x43 -resize 64x43\> -size 64x43 xc:none +swap -gravity center -composite new-icon.png
convert original-icon-sm.png -resize 22x22 -resize 32x22\> -size 32x22 xc:none +swap -gravity center -composite new-icon-sm.png

Note that default icon resolution for the other phones that I use are 43x43 and 22x22 for the smaller version.

Synchronization of PIM between ezx and linux

It is explained here: http://www.ohli.de/?J2MESync

Authors

Marc de Courville <marc@courville.org> and David Bateman <dbateman@free.fr>

Comments