Changing the template source directory

I think you can achieve this by directly manipulating app.options.trees.app instead of app.options.trees.templates.

Assuming you are trying to replace everything in app/templates with everything in app/templates/mobile, it would be something like this:

const mergeTrees = require("broccoli-merge-trees");
const Funnel = require("broccoli-funnel");
const EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function(defaults) {
  let app = new EmberApp(defaults, {
  });

  let appTree = app.options.trees.app;
  app.options.trees.app = mergeTrees([
    new Funnel(appTree, { exclude: ["templates"] }),
    new Funnel(appTree, { srcDir: 'templates/mobile', destDir: 'templates' })
  ]);

  return app.toTree();
};

I think the reason that separately manipulating the templates tree doesn’t work is that templates and components don’t really live in separate places anymore in modern Ember, and changes were made in the build pipeline to bring them all together.