Running QQ on Ubuntu Phone

Courtesy to an open source project called uqq on Github, it is now possible to not only run QQ on Linux, but also on Ubuntu Phone! As Ubuntu phone is still under heavy development, and the current SDK is limited for QML-only apps, it is not an easy task to deploy uqq onto the phone, as it uses C++ for its backend. If you are adventurous, you can follow my steps below.

1. Get uqq

git clone https://github.com/ginuerzh/uqq

2. Cross-compile uqq C++ plugin

  1. Create an armhf build environment:
    # pbuilder-dist raring armhf create
  2. Login to the armhf environment:
    # pbuilder-dist raring armhf login
  3. You are now in a chroot in /var/cache/pbuilder/build/<PID>, where <PID> is the process ID of the command in the last step.
  4. Copy uqq source code to /tmp in the chroot, something like
    sudo cp -a uqq /var/cache/pbuilder/build/<PID> /tmp
  5. Add QT5 and Ubuntu SDK apt sources:

    # cat << EOF > /etc/apt/sources.list.d/qt5-and-ubuntu-sdk.list
    deb http://ppa.launchpad.net/canonical-qt5-edgers/qt5-proper/ubuntu precise main
    deb http://ppa.launchpad.net/ubuntu-sdk-team/ppa/ubuntu precise main
    EOF
    

    (apt-add-repository core dumped for me so I had to add the sources manually.)

  6. Install Ubuntu SDK:
    # apt-get update && apt-get install ubuntu-sdk
  7. Compile the uqq backend plugin:
    # cd /tmp/uqq/plugin && qmake && make
  8. libuqq.so will be compiled in /tmp/uqq/plugin/UQQ if everything works well.
  9. Copy libuqq.so back to your uqq directory, e.g.
    # cp /var/cache/pbuilder/build/&lt;PID&gt;/tmp/uqq/plugin/UQQ/libuqq.so uqq/plugin/UQQ/

3. Copy the app to the phone

  1. Connect your phone to the computer via USB.
  2. # adb root
  3. Copy the uqq source code and our compiled plugin to the phone:
    # adb push uqq /data/ubuntu/home/phablet/uqq
  4. Login to the phone:
    # adb shell
  5. Type “ubuntu_chroot“.
  6. Type “su - phablet” to change to the phablet user.
  7. Now we are ready to run QQ, type /usr/bin/qmlscene -I plugin /home/phablet/uqq/uqq.qml –desktop_file_hint=/home/phablet/uqq/uqq.desktop[/code>]
  8. uqq window should now appear on your phone!
  9. Since ubuntu phone does not ship with any Chinese font, all Chinese characters will be shown as squares. It can be easily fixed by copying /usr/share/fonts/truetype/droid/DroidSansFallback.ttf from any Ubuntu system to the phone’s /usr/share/fonts/truetype.

    I still haven’t figured out how to add an icon to the launcher for the app, I tried modifying /usr/share/qml-phone-shell/Applications/applications.js, but no luck.

    Hope you find this useful!

Leave a Reply

Your email address will not be published.


4 + = twelve

This site uses Akismet to reduce spam. Learn how your comment data is processed.