Skip to content

Instantly share code, notes, and snippets.

@jlai
Last active October 12, 2015 07:08
Show Gist options
  • Save jlai/3989716 to your computer and use it in GitHub Desktop.
Save jlai/3989716 to your computer and use it in GitHub Desktop.
Threaded email setup notes

Running the threaded email app on 3.0.5

Risks

  • Do not install this app if you have a large number of emails (several accounts set to sync "all" mail) or have had problems with "database full" errors in the past. The threaded email app uses more db space than the stock one and may aggravate db space problems.
  • Do not install unless you are prepared to doctor your device if something goes terribly wrong.

Package system notes

There are two com.palm.app.email packages installed on the Touchpad:

  • The rootfs package system has a com.palm.app.email pacakge which just contains another com.palm.app.email ipkg under /usr/palm/ipkgs/
  • The cryptofs package system (used for apps installed from the app catalog, plus some stock apps) has a package containing the actual com.palm.app.email source code. If the app package is deleted from cryptofs, it'll be reinstalled from the version in /usr/palm/ipkgs

Note that openWebOS, unlike 3.0.5, installs core apps to rootfs and should follow different directions.

Installation (replace email app)

  • Make sure to remove any Preware patches before overwriting the email app.
  • Use palm-package to install/overwrite the stock email app. This installs the package to cryptofs and ensures that the db configuration is up-to-date.

Commands:

git clone -b unstable https://github.com/openwebos/core-apps.git
palm-package core-apps/com.palm.app.email
palm-install com.palm.app.email_3.99.13600_all.ipk 

Uninstall

  • Tap and hold on the launcher icon to remove. This will delete the threaded com.palm.app.email package from cryptofs. On LunaSysMgr reset, it'll reinstall from the stock package.
  • Recommended that you turn off threading before removing the threaded email app.

Notes about changing the app id

  • Not fully supported yet (mostly untested, probably buggy)
  • Database permission configs need to be updated to add new app id, otherwise no emails will show up.
  • After adding permissions, may need to go into Preferences -> menu -> Rebuild thread index.
  • New app id will not have permission to run in background after closing cards.
    • Launch times will be longer.
    • No notifications while new app is closed.
    • When first opening the app, need to give it time to finish indexing emails.

Running the threaded email app on openWebOS OpenEmbedded builds

  • git clone -b unstable https://github.com/openwebos/core-apps.git

  • Create a file build-webos/webos-local.conf containing:

    S_pn-core-apps = "/path/to/your/core-apps"

  • make clean-core-apps if necessary

  • make webos-image

Running the threaded email app on webOS 2.x

  • Emulator only. Running on device is strongly discouraged due to non-hardware-accelerated css transform performance.
  • Requires updated version of enyo from Preware. The app must be modified to point at /media/cryptofs/apps/usr/palm/applications/org.webosinternals.enyo/framework/ instead of /usr/palm/frameworks/enyo/0.10/framework/
  • Images will be blurry due to 1.5x pixel scaling.

Using the threaded email app

  • After initial setup, it may take a couple minutes or longer depending on the size of the account to index all of the emails.
  • If you don't see at least some emails within 30-60 seconds, there's probably an issue with the database kinds/permissions.
  • You can rebuild the thread index by either toggling threading on/off, or in the Preferences screen, open the app menu and select "Rebuild thread index".
  • Hold your finger on the thread header (subject) to collapse/expand all emails in the thread.
  • Tap on the unread count in the thread header to jump to the next unread email.

Database config

  • Use palm-package to install to configure the database on 3.0.5.

For development/testing, you can manually reconfigure the database kinds/permissions from the command line:

APPDIR=/media/cryptofs/apps/usr/palm/applications/com.palm.app.email/
for f in $APPDIR/configuration/db/kinds/*; do
   luna-send -n 1 -a com.palm.configurator palm://com.palm.db/putKind "`cat $f`"
done
for f in $APPDIR/configuration/db/permissions/*; do
   luna-send -n 1 -a com.palm.configurator palm://com.palm.db/putPermissions '{"permissions":'"`cat $f`"'}'
done

On OpenWebOS, use the following instead for APPDIR:

APPDIR=/usr/palm/applications/com.palm.app.email/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment