Create an Ubuntu Scope in minutes

Ever wanted to write a scope, but don’t know C++ or how to create a click chroot?  Now you can create a scope from a twitter account, youtube channels/playlists, or RSS feed in a matter of minutes, no code required!  

Scope-creator is a command line (for now..) tool that can be used to get a scope running on your phone in minutes, with no C++ knowledge  or tedious source compiling required.

Installing scopecreator

Creating a new scope

Scopecreator can create a new scope based on three templates: twitter (using a list of accounts or twitter lists for content), RSS (using a list of RSS feeds for content), or Youtube (using a list of channels or playlists for content).  Creating a new scope is easy, just run

Template is one of:

  • twitter
  • youtube
  • rss

package_name is your package namespace (from developer.ubuntu.com), and scope_name is the name of the scope you wish to create.  This will create a new directory with the name of the newly created scope.  Next, you must edit the configuration file for the new scope.  To do this, simply cd into the newly created directory, and run

This will launch the manifest.json file in your selected editor.  Here you can edit the description of the scope, the maintainer (put in your email that is registered with developer.ubuntu.com), title and version of the scope.

Next, edit the visuals of your scope (the name, logos, colors, etc).  To do this, run

 To change the icon, move your desired icon to the scope’s images/ dir, and make sure that the Icon field is pointing to the correct file.

Finally, it’s time to edit the content of the scope.  To do this, run

Here you will be prompted with a list of content sources (which will vary slightly based on the chosen template).  Once editing is complete, save and exit, and then all that’s left is to build/install your scope to test it out.  To do this, plug in your phone via usb, make sure developer mode is enabled, and simply run scopecreator build.  That’s it!

Posted in Ubuntu Tagged , .

17 Comments

  1. Alan Bell February 9, 2015 at 10:52 am #

    so it puts an elf binary which is a copy of /usr/share/scopecreator/templates/rss-template/scopename/packagename_scopename into the new scope package it creates. What does that do and where is the source for it? I am really confused by what it creates compared to the scopes I have written in the past, there is no .scope file or .lens file, no .service file, no visible dbus stuff, how does it work?

    • cwayne February 9, 2015 at 1:33 pm #

      Scopes have changed a lot in the past year or so, there’s no more .service file, no more dbus stuff, there’s essentially just a C++/Go binary, and a .ini. We wanted to have the binary pre-compiled to remove barriers to entry for people that just want to turn a youtube channel/twitter list/rss feed into a scope, so that they don’t have to get an armhf chroot setup, learn CMake, and learn C++.

  2. Aury88 February 25, 2015 at 8:25 pm #

    do you plan to extend this amazing tool to other types of scopes?
    I don’t understand if the Rss scope only read .xml pages or also others like:
    http://www.esa.int/rssfeed/Our_Activities/Space_News

    however great tool! I’ve already used it twice and it’s perfect for non-cooders like me. Thank you very much! ;)

    • Johan March 23, 2015 at 7:48 pm #

      Wow mad my own news scope in minutes thanks.

      One question how do I remove the scope from my phone?

      • mattirn March 24, 2015 at 9:18 pm #

        failed to install scopecreator…

        ~$ sudo apt-get install scopecreator
        Reading package lists… Done
        Building dependency tree
        Reading state information… Done
        E: Unable to locate package scopecreator

        • cwayne March 24, 2015 at 9:37 pm #

          Which version of Ubuntu? Did you add the PPA first?

          • mattirn March 24, 2015 at 9:42 pm #

            yes, i added the PPA… my ubuntu version:

            ~$ lsb_release -a
            LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch
            Distributor ID: Ubuntu
            Description: Ubuntu 12.04.5 LTS
            Release: 12.04
            Codename: precise

  3. leopenausa March 25, 2015 at 9:30 am #

    Im trying to build a scope following your tutorial. When I try to get it into my Bq phone for testing this is what i get:

    leo@Galago:~/Ubuntu/Ubuntu_touch/dofus-news$ scopecreator build
    /usr/bin/scopecreator: line 73: click: command not found
    ls: cannot access *.click: No such file or directory

    Any idea?
    Thanks

    • Markcortbass March 30, 2015 at 11:31 am #

      I have the same error! Is there are solution for this problem?

      /usr/bin/scopecreator: line 73: click: command not found
      ls: cannot access *.click: No such file or directory

  4. Johan April 6, 2015 at 10:33 am #

    How do I remove a build from my phone after testing it

  5. Sergi April 15, 2015 at 6:07 pm #

    Hi, everytime i build the click file and install it on my phone the icon and logo seem to be missing.
    the only thing i can see in the terminal that goes “wrong” is this:
    WARNING:root:Ignoring missing framework “ubuntu-sdk-14.10″

  6. Markcortbass April 22, 2015 at 12:47 pm #

    Thanks for your guide! But.. It’s not working for me at all.
    I followed your guide, and I created my scope. But there is no content in the scope:
    https://copy.com/cqGhYOpecxAldeYM

    • Guest May 7, 2015 at 9:52 am #

      Same problem here… ;(

  7. Frank Gores August 10, 2015 at 6:15 pm #

    Same here, I changed a bit in config and branding files and now it seems to be a mess as I build everytime again to see what happends on my phone. A simple directive to clear everything from the phone would be nice as well. I am “afraid” I mess up my phone like this. btw, this is the terminal output after several tries
    xxx@xxx-homepc:~/avianews$ scopecreator build
    WARNING:root:Ignoring missing framework “ubuntu-sdk-14.10″
    Now executing: click-review ./avianews.bfwfgores_0.3_armhf.click
    ./avianews.bfwfgores_0.3_armhf.click: pass
    Successfully built package in ‘./avianews.bfwfgores_0.3_armhf.click’.
    Android Debug Bridge version 1.0.31

    -a – directs adb to listen on all interfaces for a connection
    -d – directs command to the only connected USB device
    returns an error if more than one USB device is present.
    -e – directs command to the only running emulator.
    returns an error if more than one emulator is running.
    -s – directs command to the device or emulator with the given
    serial number or qualifier. Overrides ANDROID_SERIAL
    environment variable.
    -p – simple product name like ‘sooner’, or
    a relative/absolute path to a product
    out directory like ‘out/target/product/sooner’.
    If -p is not specified, the ANDROID_PRODUCT_OUT
    environment variable is used, which must
    be an absolute path.
    -H – Name of adb server host (default: localhost)
    -P – Port of adb server (default: 5037)
    devices [-l] – list all connected devices
    (‘-l’ will also list device qualifiers)
    connect [:] – connect to a device via TCP/IP
    Port 5555 is used by default if no port number is specified.
    disconnect [[:]] – disconnect from a TCP/IP device.
    Port 5555 is used by default if no port number is specified.
    Using this command with no additional arguments
    will disconnect from all connected TCP/IP devices.

    device commands:
    adb push – copy file/dir to device
    adb pull [] – copy file/dir from device
    adb sync [ ] – copy host->device only if changed
    (-l means list but don’t copy)
    (see ‘adb help all’)
    adb shell – run remote shell interactively
    adb shell – run remote shell command
    adb emu – run emulator console command
    adb logcat [ ] – View device log
    adb forward –list – list all forward socket connections.
    the format is a list of lines with the following format:
    ” ” ” ” “\n”
    adb forward – forward socket connections
    forward specs are one of:
    tcp:
    localabstract:
    localreserved:
    localfilesystem:
    dev:
    jdwp: (remote only)
    adb forward –no-rebind
    – same as ‘adb forward ‘ but fails
    if is already forwarded
    adb forward –remove – remove a specific forward socket connection
    adb forward –remove-all – remove all forward socket connections
    adb jdwp – list PIDs of processes hosting a JDWP transport
    adb install [-l] [-r] [-s] [--algo --key --iv ]
    – push this package file to the device and install it
    (‘-l’ means forward-lock the app)
    (‘-r’ means reinstall the app, keeping its data)
    (‘-s’ means install on SD card instead of internal storage)
    (‘–algo’, ‘–key’, and ‘–iv’ mean the file is encrypted already)
    adb uninstall [-k] – remove this app package from the device
    (‘-k’ means keep the data and cache directories)
    adb bugreport – return all information from the device
    that should be included in a bug report.

    adb backup [-f ] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosystem] []
    – write an archive of the device’s data to .
    If no -f option is supplied then the data is written
    to “backup.ab” in the current directory.
    (-apk|-noapk enable/disable backup of the .apks themselves
    in the archive; the default is noapk.)
    (-shared|-noshared enable/disable backup of the device’s
    shared storage / SD card contents; the default is noshared.)
    (-all means to back up all installed applications)
    (-system|-nosystem toggles whether -all automatically includes
    system applications; the default is to include system apps)
    ( is the list of applications to be backed up. If
    the -all or -shared flags are passed, then the package
    list is optional. Applications explicitly given on the
    command line will be included even if -nosystem would
    ordinarily cause them to be omitted.)

    adb restore – restore device contents from the backup archive

    adb help – show this help message
    adb version – show version num

    scripting:
    adb wait-for-device – block until device is online
    adb start-server – ensure that there is a server running
    adb kill-server – kill the server if it is running
    adb get-state – prints: offline | bootloader | device
    adb get-serialno – prints:
    adb get-devpath – prints:
    adb status-window – continuously print device status for a specified device
    adb remount – remounts the /system partition on the device read-write
    adb reboot [bootloader|recovery] – reboots the device, optionally into the bootloader or recovery program
    adb reboot-bootloader – reboots the device into the bootloader
    adb root – restarts the adbd daemon with root permissions
    adb usb – restarts the adbd daemon listening on USB
    adb tcpip – restarts the adbd daemon listening on TCP on the specified port
    networking:
    adb ppp [parameters] – Run PPP over USB.
    Note: you should not automatically start a PPP connection.
    refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
    [parameters] – Eg. defaultroute debug dump local notty usepeerdns

    adb sync notes: adb sync [ ]
    can be interpreted in several ways:

    – If is not specified, both /system and /data partitions will be updated.

    – If it is “system” or “data”, only the corresponding partition
    is updated.

    environmental variables:
    ADB_TRACE – Print debug information. A comma separated list of the following values
    1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
    ANDROID_SERIAL – The serial number to connect to. -s takes priority over this if given.
    ANDROID_LOG_TAGS – When used with the logcat option, only these debug tags are printed.
    Installing files [=========================]
    Finished [=========================]
    Fatal error: could not resolve: /tmp/*.click
    rm: cannot remove ‘/tmp/avianews.bfwfgores_0.1_armhf.click’: No such file or directory
    rm: cannot remove ‘avianews.bfwfgores_0.2_armhf.click’: No such file or directory
    rm: cannot remove ‘avianews.bfwfgores_0.3_armhf.click’: No such file or directory
    Done..

10 Trackbacks

Post a Reply to Alan Bell Cancel reply

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">