Bug 900522 - Part 2: Use ANDROID_RESFILES in mobile/android/base/moz.build. r=gps
authorNick Alexander <nalexander@mozilla.com>
Wed, 09 Oct 2013 16:19:00 -0700
changeset 164861 b63f1891d3e94d18f057dfd9bee58d69af3969b6
parent 164860 7bbd04f256988298d56eb5e6b549d79bb16fa2f2
child 164862 e85fb9e5291a5726c432d7afd50ed5ff4c030228
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs900522
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 900522 - Part 2: Use ANDROID_RESFILES in mobile/android/base/moz.build. r=gps This defines ANDROID_RESFILES in mobile/android/base/moz.build but does not use the default processing from java-build.mk. * * * Bug 900522 - Part 1: Make ANDROID_RESFILES a moz.build-only variable. r=gps
config/makefiles/java-build.mk
js/src/config/makefiles/java-build.mk
mobile/android/base/Makefile.in
mobile/android/base/android-services-files.mk
mobile/android/base/android-services.mozbuild
mobile/android/base/moz.build
mobile/android/tests/background/junit3/Makefile.in
mobile/android/tests/background/junit3/android-services-files.mk
mobile/android/tests/background/junit3/android-services.mozbuild
mobile/android/tests/background/junit3/moz.build
--- a/config/makefiles/java-build.mk
+++ b/config/makefiles/java-build.mk
@@ -3,16 +3,17 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 ifndef INCLUDED_JAVA_BUILD_MK #{
 
 ifdef ANDROID_RESFILES #{
+ifndef IGNORE_ANDROID_RESFILES #{
 res-dep := .deps-copy-java-res
 
 GENERATED_DIRS += res
 GARBAGE        += $(res-dep)
 
 export:: $(res-dep)
 
 res-dep-preqs := \
@@ -20,16 +21,17 @@ res-dep-preqs := \
   $(call mkdir_deps,res) \
   $(if $(IS_LANGUAGE_REPACK),FORCE) \
   $(NULL)
 
 # nop-build: only copy res/ files when needed
 $(res-dep): $(res-dep-preqs)
 	$(call copy_dir,$(srcdir)/res,$(CURDIR)/res)
 	@$(TOUCH) $@
+endif #} IGNORE_ANDROID_RESFILES
 endif #} ANDROID_RESFILES
 
 
 ifdef JAVAFILES #{
 GENERATED_DIRS += classes
 
 export:: classes
 classes: $(call mkdir_deps,classes)
--- a/js/src/config/makefiles/java-build.mk
+++ b/js/src/config/makefiles/java-build.mk
@@ -3,16 +3,17 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 ifndef INCLUDED_JAVA_BUILD_MK #{
 
 ifdef ANDROID_RESFILES #{
+ifndef IGNORE_ANDROID_RESFILES #{
 res-dep := .deps-copy-java-res
 
 GENERATED_DIRS += res
 GARBAGE        += $(res-dep)
 
 export:: $(res-dep)
 
 res-dep-preqs := \
@@ -20,16 +21,17 @@ res-dep-preqs := \
   $(call mkdir_deps,res) \
   $(if $(IS_LANGUAGE_REPACK),FORCE) \
   $(NULL)
 
 # nop-build: only copy res/ files when needed
 $(res-dep): $(res-dep-preqs)
 	$(call copy_dir,$(srcdir)/res,$(CURDIR)/res)
 	@$(TOUCH) $@
+endif #} IGNORE_ANDROID_RESFILES
 endif #} ANDROID_RESFILES
 
 
 ifdef JAVAFILES #{
 GENERATED_DIRS += classes
 
 export:: classes
 classes: $(call mkdir_deps,classes)
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -411,799 +411,22 @@ ICON_PATH = $(topsrcdir)/$(MOZ_BRANDING_
 ICON_PATH_HDPI = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/fennec_72x72.png
 ICON_PATH_XHDPI = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/fennec_96x96.png
 ICON_PATH_XXHDPI = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/fennec_144x144.png
 else
 ICON_PATH = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/icon48.png
 ICON_PATH_HDPI = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/icon64.png
 endif
 
-RES_LAYOUT = \
-  $(SYNC_RES_LAYOUT) \
-  res/layout/arrow_popup.xml \
-  res/layout/autocomplete_list.xml \
-  res/layout/autocomplete_list_item.xml \
-  res/layout/bookmark_edit.xml \
-  res/layout/bookmark_folder_row.xml \
-  res/layout/bookmark_item_row.xml \
-  res/layout/browser_search.xml \
-  res/layout/browser_toolbar.xml \
-  res/layout/datetime_picker.xml \
-  res/layout/doorhanger.xml \
-  res/layout/doorhanger_button.xml \
-  res/layout/find_in_page_content.xml \
-  res/layout/font_size_preference.xml \
-  res/layout/gecko_app.xml \
-  res/layout/home_bookmarks_page.xml \
-  res/layout/home_empty_page.xml \
-  res/layout/home_empty_reading_page.xml \
-  res/layout/home_item_row.xml \
-  res/layout/home_header_row.xml \
-  res/layout/home_history_page.xml \
-  res/layout/home_history_tabs_indicator.xml \
-  res/layout/home_last_tabs_page.xml \
-  res/layout/home_history_list.xml \
-  res/layout/home_most_recent_page.xml \
-  res/layout/home_pager.xml \
-  res/layout/home_reading_list_page.xml \
-  res/layout/home_search_item_row.xml \
-  res/layout/home_banner.xml \
-  res/layout/home_suggestion_prompt.xml \
-  res/layout/home_top_sites_page.xml \
-  res/layout/icon_grid.xml \
-  res/layout/icon_grid_item.xml \
-  res/layout/web_app.xml \
-  res/layout/launch_app_list.xml \
-  res/layout/launch_app_listitem.xml \
-  res/layout/menu_action_bar.xml \
-  res/layout/menu_item_action_view.xml \
-  res/layout/menu_popup.xml \
-  res/layout/notification_icon_text.xml \
-  res/layout/notification_progress.xml \
-  res/layout/notification_progress_text.xml \
-  res/layout/pin_site_dialog.xml \
-  res/layout/preference_rightalign_icon.xml \
-  res/layout/preference_search_engine.xml \
-  res/layout/preference_search_tip.xml \
-  res/layout/site_setting_item.xml \
-  res/layout/site_setting_title.xml \
-  res/layout/shared_ui_components.xml \
-  res/layout/site_identity.xml \
-  res/layout/remote_tabs_child.xml \
-  res/layout/remote_tabs_group.xml \
-  res/layout/search_engine_row.xml \
-  res/layout/tab_menu_strip.xml \
-  res/layout/tabs_panel.xml \
-  res/layout/tabs_counter.xml \
-  res/layout/tabs_panel_header.xml \
-  res/layout/tabs_panel_indicator.xml \
-  res/layout/tabs_item_cell.xml \
-  res/layout/tabs_item_row.xml \
-  res/layout/text_selection_handles.xml \
-  res/layout/top_sites_grid_item_view.xml \
-  res/layout/two_line_page_row.xml \
-  res/layout/list_item_header.xml \
-  res/layout/select_dialog_list.xml \
-  res/layout/select_dialog_multichoice.xml \
-  res/layout/select_dialog_singlechoice.xml \
-  res/layout/simple_dropdown_item_1line.xml \
-  res/layout/suggestion_item.xml \
-  res/layout/validation_message.xml \
-  res/layout/videoplayer.xml \
-  $(NULL)
-
-RES_LAYOUT_LARGE_V11 = \
-  res/layout-large-v11/browser_toolbar.xml \
-  res/layout-large-v11/home_pager.xml \
-  $(NULL)
-
-RES_LAYOUT_LARGE_LAND_V11 = \
-  res/layout-large-land-v11/home_history_page.xml \
-  res/layout-large-land-v11/home_history_tabs_indicator.xml \
-  res/layout-large-land-v11/home_history_list.xml \
-  res/layout-large-land-v11/tabs_panel.xml \
-  res/layout-large-land-v11/tabs_panel_header.xml \
-  res/layout-large-land-v11/tabs_panel_footer.xml \
-  $(NULL)
-
-RES_LAYOUT_XLARGE_V11 = \
-  res/layout-xlarge-v11/font_size_preference.xml \
-  res/layout-xlarge-v11/home_history_page.xml \
-  res/layout-xlarge-v11/home_history_tabs_indicator.xml \
-  res/layout-xlarge-v11/home_history_list.xml \
-  res/layout-xlarge-v11/remote_tabs_child.xml \
-  res/layout-xlarge-v11/remote_tabs_group.xml \
-  $(NULL)
-
-RES_VALUES = \
-  $(SYNC_RES_VALUES) \
-  res/values/attrs.xml \
-  res/values/arrays.xml \
-  res/values/colors.xml \
-  res/values/dimens.xml \
-  res/values/integers.xml \
-  res/values/layout.xml \
-  res/values/styles.xml \
-  res/values/themes.xml \
-  $(NULL)
-
-RES_VALUES_LAND = \
-  res/values-land/integers.xml \
-  res/values-land/layout.xml \
-  res/values-land/styles.xml \
-  $(NULL)
-
-RES_VALUES_V11 = \
-  $(SYNC_RES_VALUES_V11) \
-  res/values-v11/colors.xml \
-  res/values-v11/dimens.xml \
-  res/values-v11/styles.xml \
-  res/values-v11/themes.xml \
-  $(NULL)
-
-RES_VALUES_LARGE_V11 = \
-  $(SYNC_RES_VALUES_LARGE_V11) \
-  res/values-large-v11/dimens.xml \
-  res/values-large-v11/layout.xml \
-  res/values-large-v11/styles.xml \
-  res/values-large-v11/themes.xml \
-  $(NULL)
-
-RES_VALUES_LARGE_LAND_V11 = \
-  res/values-large-land-v11/dimens.xml \
-  res/values-large-land-v11/styles.xml \
-  $(NULL)
-
-RES_VALUES_XLARGE_V11 = \
-  res/values-xlarge-v11/dimens.xml \
-  res/values-xlarge-v11/integers.xml \
-  res/values-xlarge-v11/styles.xml \
-  $(NULL)
-
-RES_VALUES_XLARGE_LAND_V11 = \
-  res/values-xlarge-land-v11/dimens.xml \
-  res/values-xlarge-land-v11/styles.xml \
-  $(NULL)
-
-RES_VALUES_V14 = \
-  res/values-v14/styles.xml \
-  $(NULL)
-
-RES_VALUES_V16 = \
-  res/values-v16/styles.xml \
-  $(NULL)
-
-RES_XML = \
-  res/xml/preferences.xml \
-  res/xml/preferences_customize.xml \
-  res/xml/preferences_display.xml \
-  res/xml/preferences_search.xml \
-  res/xml/preferences_privacy.xml \
-  res/xml/preferences_vendor.xml \
-  res/xml/preferences_devtools.xml \
-  res/xml/searchable.xml \
-  $(SYNC_RES_XML) \
-  $(NULL)
-
-RES_XML_V11 = \
-  res/xml-v11/preferences_customize.xml \
-  res/xml-v11/preference_headers.xml \
-  res/xml-v11/preferences_customize_tablet.xml \
-  res/xml-v11/preferences.xml \
-  $(NULL)
-
-RES_ANIM = \
-  res/anim/popup_show.xml \
-  res/anim/popup_hide.xml \
-  res/anim/grow_fade_in.xml \
-  res/anim/grow_fade_in_center.xml \
-  res/anim/progress_spinner.xml \
-  res/anim/shrink_fade_out.xml \
-  $(NULL)
-
-RES_DRAWABLE_MDPI = \
-  $(SYNC_RES_DRAWABLE_MDPI) \
-  res/drawable-mdpi/blank.png \
-  res/drawable-mdpi/favicon.png \
-  res/drawable-mdpi/folder.png \
-  res/drawable-mdpi/abouthome_thumbnail.png \
-  res/drawable-mdpi/alert_addon.png \
-  res/drawable-mdpi/alert_app.png \
-  res/drawable-mdpi/alert_download.png \
-  res/drawable-mdpi/alert_camera.png \
-  res/drawable-mdpi/alert_mic.png \
-  res/drawable-mdpi/alert_mic_camera.png \
-  res/drawable-mdpi/arrow_popup_bg.9.png \
-  res/drawable-mdpi/autocomplete_list_bg.9.png \
-  res/drawable-mdpi/bookmark_folder_closed.png \
-  res/drawable-mdpi/bookmark_folder_opened.png \
-  res/drawable-mdpi/desktop_notification.png \
-  res/drawable-mdpi/grid_icon_bg_activated.9.png \
-  res/drawable-mdpi/grid_icon_bg_focused.9.png \
-  res/drawable-mdpi/home_tab_menu_strip.9.png \
-  res/drawable-mdpi/ic_menu_addons_filler.png \
-  res/drawable-mdpi/ic_menu_bookmark_add.png \
-  res/drawable-mdpi/ic_menu_bookmark_remove.png \
-  res/drawable-mdpi/ic_menu_character_encoding.png \
-  res/drawable-mdpi/close.png \
-  res/drawable-mdpi/ic_menu_forward.png \
-  res/drawable-mdpi/ic_menu_guest.png \
-  res/drawable-mdpi/ic_menu_new_private_tab.png \
-  res/drawable-mdpi/ic_menu_new_tab.png \
-  res/drawable-mdpi/ic_menu_reload.png \
-  res/drawable-mdpi/ic_status_logo.png \
-  res/drawable-mdpi/ic_url_bar_go.png \
-  res/drawable-mdpi/ic_url_bar_reader.png \
-  res/drawable-mdpi/ic_url_bar_search.png \
-  res/drawable-mdpi/ic_url_bar_star.png \
-  res/drawable-mdpi/ic_url_bar_tab.png \
-  res/drawable-mdpi/icon_bookmarks_empty.png \
-  res/drawable-mdpi/icon_last_tabs.png \
-  res/drawable-mdpi/icon_last_tabs_empty.png \
-  res/drawable-mdpi/icon_most_recent.png \
-  res/drawable-mdpi/icon_most_recent_empty.png \
-  res/drawable-mdpi/icon_most_visited.png \
-  res/drawable-mdpi/icon_openinapp.png \
-  res/drawable-mdpi/icon_pageaction.png \
-  res/drawable-mdpi/icon_reading_list_empty.png \
-  res/drawable-mdpi/progress_spinner.png \
-  res/drawable-mdpi/play.png \
-  res/drawable-mdpi/pause.png \
-  res/drawable-mdpi/tab_indicator_divider.9.png \
-  res/drawable-mdpi/tab_indicator_selected.9.png \
-  res/drawable-mdpi/tab_indicator_selected_focused.9.png \
-  res/drawable-mdpi/spinner_default.9.png \
-  res/drawable-mdpi/spinner_focused.9.png \
-  res/drawable-mdpi/spinner_pressed.9.png \
-  res/drawable-mdpi/tab_new.png \
-  res/drawable-mdpi/tab_new_pb.png \
-  res/drawable-mdpi/tab_close.png \
-  res/drawable-mdpi/tab_thumbnail_default.png \
-  res/drawable-mdpi/tab_thumbnail_shadow.png \
-  res/drawable-mdpi/tabs_count.png \
-  res/drawable-mdpi/tabs_count_foreground.png \
-  res/drawable-mdpi/url_bar_entry_default.9.png \
-  res/drawable-mdpi/url_bar_entry_default_pb.9.png \
-  res/drawable-mdpi/url_bar_entry_pressed.9.png \
-  res/drawable-mdpi/url_bar_entry_pressed_pb.9.png \
-  res/drawable-mdpi/tip_addsearch.png \
-  res/drawable-mdpi/toast.9.png \
-  res/drawable-mdpi/toast_button_focused.9.png \
-  res/drawable-mdpi/toast_button_pressed.9.png \
-  res/drawable-mdpi/toast_divider.9.png \
-  res/drawable-mdpi/find_close.png \
-  res/drawable-mdpi/find_next.png \
-  res/drawable-mdpi/find_prev.png \
-  res/drawable-mdpi/larry.png \
-  res/drawable-mdpi/lock_identified.png \
-  res/drawable-mdpi/lock_verified.png \
-  res/drawable-mdpi/menu.png \
-  res/drawable-mdpi/menu_pb.png \
-  res/drawable-mdpi/menu_panel_bg.9.png \
-  res/drawable-mdpi/menu_popup_bg.9.png \
-  res/drawable-mdpi/menu_popup_arrow_bottom.png \
-  res/drawable-mdpi/menu_popup_arrow_top.png \
-  res/drawable-mdpi/menu_item_check.png \
-  res/drawable-mdpi/menu_item_more.png \
-  res/drawable-mdpi/menu_item_uncheck.png \
-  res/drawable-mdpi/pin.png \
-  res/drawable-mdpi/shield.png \
-  res/drawable-mdpi/shield_doorhanger.png \
-  res/drawable-mdpi/tabs_normal.png \
-  res/drawable-mdpi/tabs_private.png \
-  res/drawable-mdpi/tabs_synced.png \
-  res/drawable-mdpi/top_site_add.png \
-  res/drawable-mdpi/urlbar_stop.png \
-  res/drawable-mdpi/reader.png \
-  res/drawable-mdpi/reader_cropped.png \
-  res/drawable-mdpi/reader_active.png \
-  res/drawable-mdpi/reading_list.png \
-  res/drawable-mdpi/validation_arrow.png \
-  res/drawable-mdpi/validation_arrow_inverted.png \
-  res/drawable-mdpi/validation_bg.9.png \
-  res/drawable-mdpi/bookmarkdefaults_favicon_support.png \
-  res/drawable-mdpi/bookmarkdefaults_favicon_addons.png \
-  res/drawable-mdpi/handle_end.png \
-  res/drawable-mdpi/handle_middle.png \
-  res/drawable-mdpi/handle_start.png \
-  res/drawable-mdpi/scrollbar.png \
-  res/drawable-mdpi/shadow.png \
-  res/drawable-mdpi/start.png \
-  res/drawable-mdpi/marketplace.png \
-  res/drawable-mdpi/history_tabs_indicator_selected.9.png \
-  res/drawable-mdpi/warning.png \
-  res/drawable-mdpi/warning_doorhanger.png \
-  $(NULL)
-
-RES_DRAWABLE_LDPI = \
-  $(SYNC_RES_DRAWABLE_LDPI) \
-  $(NULL)
-
-RES_DRAWABLE_HDPI = \
-  $(SYNC_RES_DRAWABLE_HDPI) \
-  res/drawable-hdpi/blank.png \
-  res/drawable-hdpi/favicon.png \
-  res/drawable-hdpi/folder.png \
-  res/drawable-hdpi/home_bg.png \
-  res/drawable-hdpi/home_star.png \
-  res/drawable-hdpi/grid_icon_bg_activated.9.png \
-  res/drawable-hdpi/grid_icon_bg_focused.9.png \
-  res/drawable-hdpi/abouthome_thumbnail.png \
-  res/drawable-hdpi/alert_addon.png \
-  res/drawable-hdpi/alert_app.png \
-  res/drawable-hdpi/alert_download.png \
-  res/drawable-hdpi/bookmark_folder_closed.png \
-  res/drawable-hdpi/bookmark_folder_opened.png \
-  res/drawable-hdpi/alert_camera.png \
-  res/drawable-hdpi/alert_mic.png \
-  res/drawable-hdpi/alert_mic_camera.png \
-  res/drawable-hdpi/arrow_popup_bg.9.png \
-  res/drawable-hdpi/home_tab_menu_strip.9.png \
-  res/drawable-hdpi/ic_menu_addons_filler.png \
-  res/drawable-hdpi/ic_menu_bookmark_add.png \
-  res/drawable-hdpi/ic_menu_bookmark_remove.png \
-  res/drawable-hdpi/ic_menu_character_encoding.png \
-  res/drawable-hdpi/close.png \
-  res/drawable-hdpi/ic_menu_forward.png \
-  res/drawable-hdpi/ic_menu_guest.png \
-  res/drawable-hdpi/ic_menu_new_private_tab.png \
-  res/drawable-hdpi/ic_menu_new_tab.png \
-  res/drawable-hdpi/ic_menu_reload.png \
-  res/drawable-hdpi/ic_status_logo.png \
-  res/drawable-hdpi/ic_url_bar_go.png \
-  res/drawable-hdpi/ic_url_bar_reader.png \
-  res/drawable-hdpi/ic_url_bar_search.png \
-  res/drawable-hdpi/ic_url_bar_star.png \
-  res/drawable-hdpi/ic_url_bar_tab.png \
-  res/drawable-hdpi/icon_bookmarks_empty.png \
-  res/drawable-hdpi/icon_last_tabs.png \
-  res/drawable-hdpi/icon_last_tabs_empty.png \
-  res/drawable-hdpi/icon_most_recent.png \
-  res/drawable-hdpi/icon_most_recent_empty.png \
-  res/drawable-hdpi/icon_most_visited.png \
-  res/drawable-hdpi/icon_openinapp.png \
-  res/drawable-hdpi/icon_pageaction.png \
-  res/drawable-hdpi/icon_reading_list_empty.png \
-  res/drawable-hdpi/tab_indicator_divider.9.png \
-  res/drawable-hdpi/tab_indicator_selected.9.png \
-  res/drawable-hdpi/tab_indicator_selected_focused.9.png \
-  res/drawable-hdpi/spinner_default.9.png \
-  res/drawable-hdpi/spinner_focused.9.png \
-  res/drawable-hdpi/spinner_pressed.9.png \
-  res/drawable-hdpi/tab_new.png \
-  res/drawable-hdpi/tab_new_pb.png \
-  res/drawable-hdpi/tab_close.png \
-  res/drawable-hdpi/tab_thumbnail_default.png \
-  res/drawable-hdpi/tab_thumbnail_shadow.png \
-  res/drawable-hdpi/tabs_count.png \
-  res/drawable-hdpi/tabs_count_foreground.png \
-  res/drawable-hdpi/url_bar_entry_default.9.png \
-  res/drawable-hdpi/url_bar_entry_default_pb.9.png \
-  res/drawable-hdpi/url_bar_entry_pressed.9.png \
-  res/drawable-hdpi/url_bar_entry_pressed_pb.9.png \
-  res/drawable-hdpi/tip_addsearch.png \
-  res/drawable-hdpi/find_close.png \
-  res/drawable-hdpi/find_next.png \
-  res/drawable-hdpi/find_prev.png \
-  res/drawable-hdpi/larry.png \
-  res/drawable-hdpi/lock_identified.png \
-  res/drawable-hdpi/lock_verified.png \
-  res/drawable-hdpi/menu.png \
-  res/drawable-hdpi/menu_pb.png \
-  res/drawable-hdpi/menu_panel_bg.9.png \
-  res/drawable-hdpi/menu_popup_bg.9.png \
-  res/drawable-hdpi/menu_popup_arrow_bottom.png \
-  res/drawable-hdpi/menu_popup_arrow_top.png \
-  res/drawable-hdpi/menu_item_check.png \
-  res/drawable-hdpi/menu_item_more.png \
-  res/drawable-hdpi/menu_item_uncheck.png \
-  res/drawable-hdpi/pin.png \
-  res/drawable-hdpi/play.png \
-  res/drawable-hdpi/pause.png \
-  res/drawable-hdpi/shield.png \
-  res/drawable-hdpi/shield_doorhanger.png \
-  res/drawable-hdpi/tabs_normal.png \
-  res/drawable-hdpi/tabs_private.png \
-  res/drawable-hdpi/tabs_synced.png \
-  res/drawable-hdpi/top_site_add.png \
-  res/drawable-hdpi/urlbar_stop.png \
-  res/drawable-hdpi/reader.png \
-  res/drawable-hdpi/reader_cropped.png \
-  res/drawable-hdpi/reader_active.png \
-  res/drawable-hdpi/reading_list.png \
-  res/drawable-hdpi/validation_arrow.png \
-  res/drawable-hdpi/validation_arrow_inverted.png \
-  res/drawable-hdpi/validation_bg.9.png \
-  res/drawable-hdpi/handle_end.png \
-  res/drawable-hdpi/handle_middle.png \
-  res/drawable-hdpi/handle_start.png \
-  res/drawable-hdpi/history_tabs_indicator_selected.9.png \
-  res/drawable-hdpi/warning.png \
-  res/drawable-hdpi/warning_doorhanger.png \
-  $(NULL)
-
-RES_DRAWABLE_XHDPI = \
-  res/drawable-xhdpi/blank.png \
-  res/drawable-xhdpi/favicon.png \
-  res/drawable-xhdpi/folder.png \
-  res/drawable-xhdpi/abouthome_thumbnail.png \
-  res/drawable-xhdpi/url_bar_entry_default.9.png \
-  res/drawable-xhdpi/url_bar_entry_default_pb.9.png \
-  res/drawable-xhdpi/url_bar_entry_pressed.9.png \
-  res/drawable-xhdpi/url_bar_entry_pressed_pb.9.png \
-  res/drawable-xhdpi/alert_addon.png \
-  res/drawable-xhdpi/alert_app.png \
-  res/drawable-xhdpi/alert_download.png \
-  res/drawable-xhdpi/bookmark_folder_closed.png \
-  res/drawable-xhdpi/bookmark_folder_opened.png \
-  res/drawable-xhdpi/alert_camera.png \
-  res/drawable-xhdpi/alert_mic.png \
-  res/drawable-xhdpi/alert_mic_camera.png \
-  res/drawable-xhdpi/arrow_popup_bg.9.png \
-  res/drawable-xhdpi/home_tab_menu_strip.9.png \
-  res/drawable-xhdpi/grid_icon_bg_activated.9.png \
-  res/drawable-xhdpi/grid_icon_bg_focused.9.png \
-  res/drawable-xhdpi/ic_menu_addons_filler.png \
-  res/drawable-xhdpi/ic_menu_bookmark_add.png \
-  res/drawable-xhdpi/ic_menu_bookmark_remove.png \
-  res/drawable-xhdpi/close.png \
-  res/drawable-xhdpi/ic_menu_character_encoding.png \
-  res/drawable-xhdpi/ic_menu_forward.png \
-  res/drawable-xhdpi/ic_menu_guest.png \
-  res/drawable-xhdpi/ic_menu_new_private_tab.png \
-  res/drawable-xhdpi/ic_menu_new_tab.png \
-  res/drawable-xhdpi/ic_menu_reload.png \
-  res/drawable-xhdpi/ic_status_logo.png \
-  res/drawable-xhdpi/ic_url_bar_go.png \
-  res/drawable-xhdpi/ic_url_bar_reader.png \
-  res/drawable-xhdpi/ic_url_bar_search.png \
-  res/drawable-xhdpi/ic_url_bar_star.png \
-  res/drawable-xhdpi/ic_url_bar_tab.png \
-  res/drawable-xhdpi/icon_bookmarks_empty.png \
-  res/drawable-xhdpi/icon_last_tabs.png \
-  res/drawable-xhdpi/icon_last_tabs_empty.png \
-  res/drawable-xhdpi/icon_most_recent.png \
-  res/drawable-xhdpi/icon_most_recent_empty.png \
-  res/drawable-xhdpi/icon_most_visited.png \
-  res/drawable-xhdpi/icon_openinapp.png \
-  res/drawable-xhdpi/icon_pageaction.png \
-  res/drawable-xhdpi/icon_reading_list_empty.png \
-  res/drawable-xhdpi/spinner_default.9.png \
-  res/drawable-xhdpi/spinner_focused.9.png \
-  res/drawable-xhdpi/spinner_pressed.9.png \
-  res/drawable-xhdpi/tab_new.png \
-  res/drawable-xhdpi/tab_new_pb.png \
-  res/drawable-xhdpi/tab_close.png \
-  res/drawable-xhdpi/tab_thumbnail_default.png \
-  res/drawable-xhdpi/tab_thumbnail_shadow.png \
-  res/drawable-xhdpi/tabs_count.png \
-  res/drawable-xhdpi/tabs_count_foreground.png \
-  res/drawable-xhdpi/tip_addsearch.png \
-  res/drawable-xhdpi/find_close.png \
-  res/drawable-xhdpi/find_next.png \
-  res/drawable-xhdpi/find_prev.png \
-  res/drawable-xhdpi/top_site_add.png \
-  res/drawable-xhdpi/urlbar_stop.png \
-  res/drawable-xhdpi/reader.png \
-  res/drawable-xhdpi/reader_cropped.png \
-  res/drawable-xhdpi/reader_active.png \
-  res/drawable-xhdpi/reading_list.png \
-  res/drawable-xhdpi/larry.png \
-  res/drawable-xhdpi/lock_identified.png \
-  res/drawable-xhdpi/lock_verified.png \
-  res/drawable-xhdpi/menu.png \
-  res/drawable-xhdpi/menu_pb.png \
-  res/drawable-xhdpi/menu_panel_bg.9.png \
-  res/drawable-xhdpi/menu_popup_bg.9.png \
-  res/drawable-xhdpi/menu_popup_arrow_bottom.png \
-  res/drawable-xhdpi/menu_popup_arrow_top.png \
-  res/drawable-xhdpi/menu_item_check.png \
-  res/drawable-xhdpi/menu_item_more.png \
-  res/drawable-xhdpi/menu_item_uncheck.png \
-  res/drawable-xhdpi/pin.png \
-  res/drawable-xhdpi/play.png \
-  res/drawable-xhdpi/pause.png \
-  res/drawable-xhdpi/shield.png \
-  res/drawable-xhdpi/shield_doorhanger.png \
-  res/drawable-xhdpi/tab_indicator_divider.9.png \
-  res/drawable-xhdpi/tab_indicator_selected.9.png \
-  res/drawable-xhdpi/tab_indicator_selected_focused.9.png \
-  res/drawable-xhdpi/tabs_normal.png \
-  res/drawable-xhdpi/tabs_private.png \
-  res/drawable-xhdpi/tabs_synced.png \
-  res/drawable-xhdpi/validation_arrow.png \
-  res/drawable-xhdpi/validation_arrow_inverted.png \
-  res/drawable-xhdpi/validation_bg.9.png \
-  res/drawable-xhdpi/handle_end.png \
-  res/drawable-xhdpi/handle_middle.png \
-  res/drawable-xhdpi/handle_start.png \
-  res/drawable-xhdpi/history_tabs_indicator_selected.9.png \
-  res/drawable-xhdpi/warning.png \
-  res/drawable-xhdpi/warning_doorhanger.png \
-  $(NULL)
-
-RES_DRAWABLE_MDPI_V11 = \
-  res/drawable-mdpi-v11/alert_addon.png \
-  res/drawable-mdpi-v11/alert_app.png \
-  res/drawable-mdpi-v11/alert_download.png \
-  res/drawable-mdpi-v11/alert_camera.png \
-  res/drawable-mdpi-v11/alert_mic.png \
-  res/drawable-mdpi-v11/alert_mic_camera.png \
-  res/drawable-mdpi-v11/firefox_settings_alert.png \
-  res/drawable-mdpi-v11/ic_menu_addons.png \
-  res/drawable-mdpi-v11/ic_menu_apps.png \
-  res/drawable-mdpi-v11/ic_menu_back.png \
-  res/drawable-mdpi-v11/ic_menu_bookmark_add.png \
-  res/drawable-mdpi-v11/ic_menu_bookmark_remove.png \
-  res/drawable-mdpi-v11/ic_menu_desktop_mode_off.png \
-  res/drawable-mdpi-v11/ic_menu_desktop_mode_on.png \
-  res/drawable-mdpi-v11/ic_menu_downloads.png \
-  res/drawable-mdpi-v11/ic_menu_find_in_page.png \
-  res/drawable-mdpi-v11/ic_menu_forward.png \
-  res/drawable-mdpi-v11/ic_menu_new_private_tab.png \
-  res/drawable-mdpi-v11/ic_menu_new_tab.png \
-  res/drawable-mdpi-v11/ic_menu_reload.png \
-  res/drawable-mdpi-v11/ic_menu_save_as_pdf.png \
-  res/drawable-mdpi-v11/ic_menu_settings.png \
-  res/drawable-mdpi-v11/ic_menu_share.png \
-  res/drawable-mdpi-v11/ic_menu_tools.png \
-  res/drawable-mdpi-v11/ic_menu_quit.png \
-  res/drawable-mdpi-v11/ic_status_logo.png \
-  $(NULL)
-
-RES_DRAWABLE_HDPI_V11 = \
-  res/drawable-hdpi-v11/alert_addon.png \
-  res/drawable-hdpi-v11/alert_app.png \
-  res/drawable-hdpi-v11/alert_download.png \
-  res/drawable-hdpi-v11/alert_camera.png \
-  res/drawable-hdpi-v11/alert_mic.png \
-  res/drawable-hdpi-v11/alert_mic_camera.png \
-  res/drawable-hdpi-v11/firefox_settings_alert.png \
-  res/drawable-hdpi-v11/ic_menu_addons.png \
-  res/drawable-hdpi-v11/ic_menu_apps.png \
-  res/drawable-hdpi-v11/ic_menu_back.png \
-  res/drawable-hdpi-v11/ic_menu_bookmark_add.png \
-  res/drawable-hdpi-v11/ic_menu_bookmark_remove.png \
-  res/drawable-hdpi-v11/ic_menu_desktop_mode_off.png \
-  res/drawable-hdpi-v11/ic_menu_desktop_mode_on.png \
-  res/drawable-hdpi-v11/ic_menu_downloads.png \
-  res/drawable-hdpi-v11/ic_menu_find_in_page.png \
-  res/drawable-hdpi-v11/ic_menu_forward.png \
-  res/drawable-hdpi-v11/ic_menu_new_private_tab.png \
-  res/drawable-hdpi-v11/ic_menu_new_tab.png \
-  res/drawable-hdpi-v11/ic_menu_reload.png \
-  res/drawable-hdpi-v11/ic_menu_save_as_pdf.png \
-  res/drawable-hdpi-v11/ic_menu_settings.png \
-  res/drawable-hdpi-v11/ic_menu_share.png \
-  res/drawable-hdpi-v11/ic_menu_tools.png \
-  res/drawable-hdpi-v11/ic_menu_quit.png \
-  res/drawable-hdpi-v11/ic_status_logo.png \
-  $(NULL)
-
-RES_DRAWABLE_XHDPI_V11 = \
-  res/drawable-xhdpi-v11/alert_addon.png \
-  res/drawable-xhdpi-v11/alert_app.png \
-  res/drawable-xhdpi-v11/alert_download.png \
-  res/drawable-xhdpi-v11/alert_camera.png \
-  res/drawable-xhdpi-v11/alert_mic.png \
-  res/drawable-xhdpi-v11/alert_mic_camera.png \
-  res/drawable-xhdpi-v11/firefox_settings_alert.png \
-  res/drawable-xhdpi-v11/ic_menu_addons.png \
-  res/drawable-xhdpi-v11/ic_menu_apps.png \
-  res/drawable-xhdpi-v11/ic_menu_back.png \
-  res/drawable-xhdpi-v11/ic_menu_bookmark_add.png \
-  res/drawable-xhdpi-v11/ic_menu_bookmark_remove.png \
-  res/drawable-xhdpi-v11/ic_menu_desktop_mode_off.png \
-  res/drawable-xhdpi-v11/ic_menu_desktop_mode_on.png \
-  res/drawable-xhdpi-v11/ic_menu_downloads.png \
-  res/drawable-xhdpi-v11/ic_menu_find_in_page.png \
-  res/drawable-xhdpi-v11/ic_menu_forward.png \
-  res/drawable-xhdpi-v11/ic_menu_new_private_tab.png \
-  res/drawable-xhdpi-v11/ic_menu_new_tab.png \
-  res/drawable-xhdpi-v11/ic_menu_reload.png \
-  res/drawable-xhdpi-v11/ic_menu_save_as_pdf.png \
-  res/drawable-xhdpi-v11/ic_menu_settings.png \
-  res/drawable-xhdpi-v11/ic_menu_share.png \
-  res/drawable-xhdpi-v11/ic_menu_tools.png \
-  res/drawable-xhdpi-v11/ic_menu_quit.png \
-  res/drawable-xhdpi-v11/ic_status_logo.png \
-  $(NULL)
-
-RES_DRAWABLE_LARGE_LAND_V11 = \
-  res/drawable-large-land-v11/home_history_tabs_indicator.xml \
-  $(NULL)
-
-RES_DRAWABLE_LARGE_MDPI_V11 = \
-  res/drawable-large-mdpi-v11/arrow_popup_bg.9.png \
-  res/drawable-large-mdpi-v11/ic_menu_reload.png \
-  res/drawable-large-mdpi-v11/ic_menu_forward.png \
-  res/drawable-large-mdpi-v11/menu.png \
-  $(NULL)
-
-RES_DRAWABLE_LARGE_HDPI_V11 = \
-  res/drawable-large-hdpi-v11/arrow_popup_bg.9.png \
-  res/drawable-large-hdpi-v11/ic_menu_reload.png \
-  res/drawable-large-hdpi-v11/ic_menu_forward.png \
-  res/drawable-large-hdpi-v11/menu.png \
-  $(NULL)
-
-RES_DRAWABLE_LARGE_XHDPI_V11 = \
-  res/drawable-large-xhdpi-v11/arrow_popup_bg.9.png \
-  res/drawable-large-xhdpi-v11/ic_menu_reload.png \
-  res/drawable-large-xhdpi-v11/ic_menu_forward.png \
-  res/drawable-large-xhdpi-v11/menu.png \
-  $(NULL)
-
-RES_DRAWABLE_XLARGE_V11 = \
-  res/drawable-xlarge-v11/home_history_tabs_indicator.xml \
-  $(NULL)
-
-RES_DRAWABLE_XLARGE_MDPI_V11 = \
-  res/drawable-xlarge-mdpi-v11/ic_menu_bookmark_add.png \
-  res/drawable-xlarge-mdpi-v11/ic_menu_bookmark_remove.png \
-  $(NULL)
-
-RES_DRAWABLE_XLARGE_HDPI_V11 = \
-  res/drawable-xlarge-hdpi-v11/ic_menu_bookmark_add.png \
-  res/drawable-xlarge-hdpi-v11/ic_menu_bookmark_remove.png \
-  $(NULL)
-
-RES_DRAWABLE_XLARGE_XHDPI_V11 = \
-  res/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_add.png \
-  res/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_remove.png \
-  $(NULL)
-
-RES_COLOR = \
-  res/color/primary_text.xml \
-  res/color/primary_text_inverse.xml \
-  res/color/secondary_text.xml \
-  res/color/secondary_text_inverse.xml \
-  res/color/select_item_multichoice.xml \
-  res/color/tertiary_text.xml \
-  res/color/tertiary_text_inverse.xml \
-  res/color/top_sites_grid_item_title.xml \
-  res/color/url_bar_title.xml \
-  res/color/url_bar_title_hint.xml \
-  $(NULL)
-
-RES_MENU = \
-  res/menu/browser_app_menu.xml \
-  res/menu/gecko_app_menu.xml \
-  res/menu/home_contextmenu.xml \
-  res/menu/titlebar_contextmenu.xml \
-  res/menu/top_sites_contextmenu.xml \
-  res/menu-large-v11/browser_app_menu.xml \
-  res/menu-v11/browser_app_menu.xml \
-  res/menu-xlarge-v11/browser_app_menu.xml \
-  $(NULL)
-
 JAVA_CLASSPATH = $(ANDROID_SDK)/android.jar
 
 ifdef MOZ_CRASHREPORTER
 FENNEC_JAVA_FILES += CrashReporter.java
-RES_DRAWABLE_MDPI += res/drawable-mdpi/crash_reporter.png
-RES_LAYOUT += res/layout/crash_reporter.xml
 endif
 
-RES_DRAWABLE += \
-  $(SYNC_RES_DRAWABLE)                                \
-  res/drawable/action_bar_button.xml                  \
-  res/drawable/action_bar_button_inverse.xml          \
-  res/drawable/top_sites_thumbnail_bg.xml             \
-  res/drawable/url_bar_bg.xml                         \
-  res/drawable/url_bar_entry.xml                      \
-  res/drawable/url_bar_nav_button.xml                 \
-  res/drawable/icon_grid_item_bg.xml                  \
-  res/drawable/url_bar_right_edge.xml                 \
-  res/drawable/bookmark_folder.xml                    \
-  res/drawable/divider_horizontal.xml                 \
-  res/drawable/divider_vertical.xml                   \
-  res/drawable/favicon_bg.xml                         \
-  res/drawable/handle_end_level.xml                   \
-  res/drawable/handle_start_level.xml                 \
-  res/drawable/home_history_tabs_indicator.xml        \
-  res/drawable/home_page_title_background.xml         \
-  res/drawable/home_banner.xml                        \
-  res/drawable/ic_menu_back.xml                       \
-  res/drawable/ic_menu_desktop_mode_off.xml           \
-  res/drawable/ic_menu_desktop_mode_on.xml            \
-  res/drawable/ic_menu_quit.xml                       \
-  res/drawable/menu_item_state.xml                    \
-  res/drawable/menu_level.xml                         \
-  res/drawable/remote_tabs_child_divider.xml          \
-  res/drawable/shaped_button.xml                      \
-  res/drawable/site_security_level.xml                \
-  res/drawable/spinner.xml                            \
-  res/drawable/suggestion_selector.xml                \
-  res/drawable/tab_new_level.xml                      \
-  res/drawable/tab_row.xml                            \
-  res/drawable/tab_thumbnail.xml                      \
-  res/drawable/tabs_panel_indicator.xml               \
-  res/drawable/textbox_bg.xml                         \
-  res/drawable/toast_button.xml                       \
-  res/drawable/webapp_titlebar_bg.xml                 \
-  $(NULL)
-
-RESOURCES = \
-  $(RES_ANIM) \
-  $(RES_COLOR) \
-  $(RES_DRAWABLE) \
-  $(RES_DRAWABLE_HDPI) \
-  $(RES_DRAWABLE_HDPI_V11) \
-  $(RES_DRAWABLE_LARGE_LAND_V11) \
-  $(RES_DRAWABLE_LARGE_HDPI_V11) \
-  $(RES_DRAWABLE_LARGE_MDPI_V11) \
-  $(RES_DRAWABLE_LARGE_XHDPI_V11) \
-  $(RES_DRAWABLE_LDPI) \
-  $(RES_DRAWABLE_MDPI) \
-  $(RES_DRAWABLE_MDPI_V11) \
-  $(RES_DRAWABLE_XHDPI) \
-  $(RES_DRAWABLE_XHDPI_V11) \
-  $(RES_DRAWABLE_XLARGE_V11) \
-  $(RES_DRAWABLE_XLARGE_HDPI_V11) \
-  $(RES_DRAWABLE_XLARGE_MDPI_V11) \
-  $(RES_DRAWABLE_XLARGE_XHDPI_V11) \
-  $(RES_LAYOUT) \
-  $(RES_LAYOUT_LARGE_LAND_V11) \
-  $(RES_LAYOUT_LARGE_V11) \
-  $(RES_LAYOUT_XLARGE_LAND_V11) \
-  $(RES_LAYOUT_XLARGE_V11) \
-  $(RES_MENU) \
-  $(RES_VALUES) \
-  $(RES_VALUES_LAND) \
-  $(RES_VALUES_LAND_V14) \
-  $(RES_VALUES_LARGE_LAND_V11) \
-  $(RES_VALUES_LARGE_V11) \
-  $(RES_VALUES_V11) \
-  $(RES_VALUES_V14) \
-  $(RES_VALUES_V16) \
-  $(RES_VALUES_XLARGE_LAND_V11) \
-  $(RES_VALUES_XLARGE_V11) \
-  $(RES_XML) \
-  $(RES_XML_V11) \
-  $(NULL)
-
-RES_DIRS= \
-  res/layout                    \
-  res/layout-large-v11          \
-  res/layout-large-land-v11     \
-  res/layout-xlarge-v11         \
-  res/values                    \
-  res/values-v11                \
-  res/values-large-v11          \
-  res/values-xlarge-land-v11    \
-  res/values-xlarge-v11         \
-  res/values-v14                \
-  res/values-v16                \
-  res/xml                       \
-  res/xml-v11                   \
-  res/anim                      \
-  res/drawable-ldpi             \
-  res/drawable-mdpi             \
-  res/drawable-hdpi             \
-  res/drawable-xhdpi            \
-  res/drawable                  \
-  res/drawable-mdpi-v11         \
-  res/drawable-hdpi-v11         \
-  res/drawable-xhdpi-v11        \
-  res/drawable-large-land-v11   \
-  res/drawable-large-mdpi-v11   \
-  res/drawable-large-hdpi-v11   \
-  res/drawable-large-xhdpi-v11  \
-  res/drawable-xlarge-v11       \
-  res/drawable-xlarge-mdpi-v11  \
-  res/drawable-xlarge-hdpi-v11  \
-  res/drawable-xlarge-xhdpi-v11 \
-  res/color                     \
-  res/menu                      \
-  res/menu-v11                  \
-  res/menu-large-v11            \
-  res/menu-xlarge-v11           \
-  $(NULL)
-
 ALL_JARS = \
   jars/gecko-browser.jar \
   jars/gecko-mozglue.jar \
   jars/gecko-util.jar \
   jars/sync-thirdparty.jar \
   jars/websockets.jar \
   $(NULL)
 
@@ -1275,16 +498,20 @@ webrtc_EXTRA_JARS := \
   jars/gecko-util.jar \
   jars/gecko-mozglue.jar \
   $(NULL)
 webrtc_JAVAC_FLAGS := -Xlint:all,-deprecation,-cast
 endif
 
 include $(topsrcdir)/config/makefiles/java-build.mk
 
+# We process ANDROID_RESFILES specially for now; the following flag
+# disables the default processing.
+IGNORE_ANDROID_RESFILES=1
+
 include $(topsrcdir)/config/rules.mk
 
 # Override the Java settings with some specific android settings
 include $(topsrcdir)/config/android-common.mk
 
 # Note that we're going to set up a dependency directly between embed_android.dex and the java files
 # Instead of on the .class files, since more than one .class file might be produced per .java file
 # Sync dependencies are provided in a single jar. Sync classes themselves are delivered as source,
@@ -1355,22 +582,24 @@ res/drawable-hdpi/icon.png: $(ICON_PATH_
 res/drawable-xhdpi/icon.png: $(ICON_PATH_XHDPI)
 	$(NSINSTALL) -D res/drawable-xhdpi
 	cp $(ICON_PATH_XHDPI) $@
 
 res/drawable-xxhdpi/icon.png: $(ICON_PATH_XXHDPI)
 	$(NSINSTALL) -D res/drawable-xxhdpi
 	cp $(ICON_PATH_XXHDPI) $@
 
-$(call mkdir_deps,$(RES_DIRS)): $(subst res/,$(srcdir)/resources/,$(RESOURCES)) Makefile
+ANDROID_RESDIRS := $(subst resources/,res/,$(sort $(dir $(ANDROID_RESFILES))))
+
+$(call mkdir_deps,$(ANDROID_RESDIRS)): $(ANDROID_RESFILES) Makefile
 	$(RM) -r $(@D)
 	$(NSINSTALL) -D $(@D)
 	$(TOUCH) $@
 
-$(RESOURCES): $(call mkdir_deps,$(RES_DIRS)) $(subst res/,$(srcdir)/resources/,$(RESOURCES))
+$(subst resources/,res/,$(ANDROID_RESFILES)): $(call mkdir_deps,$(ANDROID_RESDIRS)) $(ANDROID_RESFILES)
 	@echo "creating $@"
 	$(NSINSTALL) $(subst res/,$(srcdir)/resources/,$@) $(dir $@)
 
 res/values/strings.xml: $(call mkdir_deps,res/values)
 	$(MAKE) -C locales
 
 # With multilocale builds, there will be multiple strings.xml files. We need to
 # rebuild gecko.ap_ if any of them change.
@@ -1378,17 +607,17 @@ MULTILOCALE_STRINGS_XML_FILES := $(wildc
 all_resources = \
   res/drawable-mdpi/icon.png \
   res/drawable-hdpi/icon.png \
   res/drawable-xhdpi/icon.png \
   res/drawable-xxhdpi/icon.png \
   res/values/strings.xml \
   $(MULTILOCALE_STRINGS_XML_FILES) \
   AndroidManifest.xml \
-  $(RESOURCES) \
+  $(subst resources/,res/,$(ANDROID_RESFILES)) \
   $(NULL)
 
 R.java: $(all_resources)
 	$(AAPT) package -f -M AndroidManifest.xml -I $(ANDROID_SDK)/android.jar -S res -J . --custom-package org.mozilla.gecko --non-constant-id
 
 gecko.ap_: $(all_resources)
 	$(AAPT) package -f -M AndroidManifest.xml -I $(ANDROID_SDK)/android.jar  -S res -F $@
 
--- a/mobile/android/base/android-services-files.mk
+++ b/mobile/android/base/android-services-files.mk
@@ -296,63 +296,16 @@ SYNC_JAVA_FILES := \
   sync/synchronizer/UnexpectedSessionException.java \
   sync/SynchronizerConfiguration.java \
   sync/ThreadPool.java \
   sync/UnexpectedJSONException.java \
   sync/UnknownSynchronizerConfigurationVersionException.java \
   sync/Utils.java \
   $(NULL)
 
-SYNC_RES_DRAWABLE := \
-  res/drawable/pin_background.xml \
-  $(NULL)
-
-SYNC_RES_DRAWABLE_LDPI := \
-  $(NULL)
-
-SYNC_RES_DRAWABLE_MDPI := \
-  res/drawable-mdpi/desktop.png \
-  res/drawable-mdpi/mobile.png \
-  $(NULL)
-
-SYNC_RES_DRAWABLE_HDPI := \
-  $(NULL)
-
-SYNC_RES_LAYOUT := \
-  res/layout/sync_account.xml \
-  res/layout/sync_list_item.xml \
-  res/layout/sync_redirect_to_setup.xml \
-  res/layout/sync_send_tab.xml \
-  res/layout/sync_setup.xml \
-  res/layout/sync_setup_failure.xml \
-  res/layout/sync_setup_jpake_waiting.xml \
-  res/layout/sync_setup_nointernet.xml \
-  res/layout/sync_setup_pair.xml \
-  res/layout/sync_setup_success.xml \
-  res/layout/sync_setup_webview.xml \
-  $(NULL)
-
-SYNC_RES_VALUES := \
-  res/values/sync_styles.xml \
-  $(NULL)
-
-SYNC_RES_VALUES_V11 := \
-  res/values-v11/sync_styles.xml \
-  $(NULL)
-
-SYNC_RES_VALUES_LARGE_V11 := \
-  res/values-large-v11/sync_styles.xml \
-  $(NULL)
-
-SYNC_RES_XML := \
-  res/xml/sync_authenticator.xml \
-  res/xml/sync_syncadapter.xml \
-  res/xml/sync_options.xml \
-  $(NULL)
-
 SYNC_THIRDPARTY_JAVA_FILES := \
   httpclientandroidlib/androidextra/HttpClientAndroidLog.java \
   httpclientandroidlib/annotation/GuardedBy.java \
   httpclientandroidlib/annotation/Immutable.java \
   httpclientandroidlib/annotation/NotThreadSafe.java \
   httpclientandroidlib/annotation/ThreadSafe.java \
   httpclientandroidlib/auth/AUTH.java \
   httpclientandroidlib/auth/AuthenticationException.java \
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/android-services.mozbuild
@@ -0,0 +1,28 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ANDROID_RESFILES += [
+    'resources/drawable-mdpi/desktop.png',
+    'resources/drawable-mdpi/mobile.png',
+    'resources/drawable/pin_background.xml',
+    'resources/layout/sync_account.xml',
+    'resources/layout/sync_list_item.xml',
+    'resources/layout/sync_redirect_to_setup.xml',
+    'resources/layout/sync_send_tab.xml',
+    'resources/layout/sync_setup.xml',
+    'resources/layout/sync_setup_failure.xml',
+    'resources/layout/sync_setup_jpake_waiting.xml',
+    'resources/layout/sync_setup_nointernet.xml',
+    'resources/layout/sync_setup_pair.xml',
+    'resources/layout/sync_setup_success.xml',
+    'resources/layout/sync_setup_webview.xml',
+    'resources/values-large-v11/sync_styles.xml',
+    'resources/values-v11/sync_styles.xml',
+    'resources/values/sync_styles.xml',
+    'resources/xml/sync_authenticator.xml',
+    'resources/xml/sync_options.xml',
+    'resources/xml/sync_syncadapter.xml',
+]
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -1,7 +1,605 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['locales']
+
+include('android-services.mozbuild')
+
+ANDROID_RESFILES += [
+    'resources/anim/grow_fade_in.xml',
+    'resources/anim/grow_fade_in_center.xml',
+    'resources/anim/popup_hide.xml',
+    'resources/anim/popup_show.xml',
+    'resources/anim/progress_spinner.xml',
+    'resources/anim/shrink_fade_out.xml',
+    'resources/color/primary_text.xml',
+    'resources/color/primary_text_inverse.xml',
+    'resources/color/secondary_text.xml',
+    'resources/color/secondary_text_inverse.xml',
+    'resources/color/select_item_multichoice.xml',
+    'resources/color/tertiary_text.xml',
+    'resources/color/tertiary_text_inverse.xml',
+    'resources/color/top_sites_grid_item_title.xml',
+    'resources/color/url_bar_title.xml',
+    'resources/color/url_bar_title_hint.xml',
+    'resources/drawable-hdpi-v11/alert_addon.png',
+    'resources/drawable-hdpi-v11/alert_app.png',
+    'resources/drawable-hdpi-v11/alert_camera.png',
+    'resources/drawable-hdpi-v11/alert_download.png',
+    'resources/drawable-hdpi-v11/alert_mic.png',
+    'resources/drawable-hdpi-v11/alert_mic_camera.png',
+    'resources/drawable-hdpi-v11/firefox_settings_alert.png',
+    'resources/drawable-hdpi-v11/ic_menu_addons.png',
+    'resources/drawable-hdpi-v11/ic_menu_apps.png',
+    'resources/drawable-hdpi-v11/ic_menu_back.png',
+    'resources/drawable-hdpi-v11/ic_menu_bookmark_add.png',
+    'resources/drawable-hdpi-v11/ic_menu_bookmark_remove.png',
+    'resources/drawable-hdpi-v11/ic_menu_desktop_mode_off.png',
+    'resources/drawable-hdpi-v11/ic_menu_desktop_mode_on.png',
+    'resources/drawable-hdpi-v11/ic_menu_downloads.png',
+    'resources/drawable-hdpi-v11/ic_menu_find_in_page.png',
+    'resources/drawable-hdpi-v11/ic_menu_forward.png',
+    'resources/drawable-hdpi-v11/ic_menu_new_private_tab.png',
+    'resources/drawable-hdpi-v11/ic_menu_new_tab.png',
+    'resources/drawable-hdpi-v11/ic_menu_quit.png',
+    'resources/drawable-hdpi-v11/ic_menu_reload.png',
+    'resources/drawable-hdpi-v11/ic_menu_save_as_pdf.png',
+    'resources/drawable-hdpi-v11/ic_menu_settings.png',
+    'resources/drawable-hdpi-v11/ic_menu_share.png',
+    'resources/drawable-hdpi-v11/ic_menu_tools.png',
+    'resources/drawable-hdpi-v11/ic_status_logo.png',
+    'resources/drawable-hdpi/abouthome_thumbnail.png',
+    'resources/drawable-hdpi/alert_addon.png',
+    'resources/drawable-hdpi/alert_app.png',
+    'resources/drawable-hdpi/alert_camera.png',
+    'resources/drawable-hdpi/alert_download.png',
+    'resources/drawable-hdpi/alert_mic.png',
+    'resources/drawable-hdpi/alert_mic_camera.png',
+    'resources/drawable-hdpi/arrow_popup_bg.9.png',
+    'resources/drawable-hdpi/blank.png',
+    'resources/drawable-hdpi/bookmark_folder_closed.png',
+    'resources/drawable-hdpi/bookmark_folder_opened.png',
+    'resources/drawable-hdpi/close.png',
+    'resources/drawable-hdpi/favicon.png',
+    'resources/drawable-hdpi/find_close.png',
+    'resources/drawable-hdpi/find_next.png',
+    'resources/drawable-hdpi/find_prev.png',
+    'resources/drawable-hdpi/folder.png',
+    'resources/drawable-hdpi/grid_icon_bg_activated.9.png',
+    'resources/drawable-hdpi/grid_icon_bg_focused.9.png',
+    'resources/drawable-hdpi/handle_end.png',
+    'resources/drawable-hdpi/handle_middle.png',
+    'resources/drawable-hdpi/handle_start.png',
+    'resources/drawable-hdpi/history_tabs_indicator_selected.9.png',
+    'resources/drawable-hdpi/home_bg.png',
+    'resources/drawable-hdpi/home_star.png',
+    'resources/drawable-hdpi/home_tab_menu_strip.9.png',
+    'resources/drawable-hdpi/ic_menu_addons_filler.png',
+    'resources/drawable-hdpi/ic_menu_bookmark_add.png',
+    'resources/drawable-hdpi/ic_menu_bookmark_remove.png',
+    'resources/drawable-hdpi/ic_menu_character_encoding.png',
+    'resources/drawable-hdpi/ic_menu_forward.png',
+    'resources/drawable-hdpi/ic_menu_guest.png',
+    'resources/drawable-hdpi/ic_menu_new_private_tab.png',
+    'resources/drawable-hdpi/ic_menu_new_tab.png',
+    'resources/drawable-hdpi/ic_menu_reload.png',
+    'resources/drawable-hdpi/ic_status_logo.png',
+    'resources/drawable-hdpi/ic_url_bar_go.png',
+    'resources/drawable-hdpi/ic_url_bar_reader.png',
+    'resources/drawable-hdpi/ic_url_bar_search.png',
+    'resources/drawable-hdpi/ic_url_bar_star.png',
+    'resources/drawable-hdpi/ic_url_bar_tab.png',
+    'resources/drawable-hdpi/icon_bookmarks_empty.png',
+    'resources/drawable-hdpi/icon_last_tabs.png',
+    'resources/drawable-hdpi/icon_last_tabs_empty.png',
+    'resources/drawable-hdpi/icon_most_recent.png',
+    'resources/drawable-hdpi/icon_most_recent_empty.png',
+    'resources/drawable-hdpi/icon_most_visited.png',
+    'resources/drawable-hdpi/icon_openinapp.png',
+    'resources/drawable-hdpi/icon_pageaction.png',
+    'resources/drawable-hdpi/icon_reading_list_empty.png',
+    'resources/drawable-hdpi/larry.png',
+    'resources/drawable-hdpi/lock_identified.png',
+    'resources/drawable-hdpi/lock_verified.png',
+    'resources/drawable-hdpi/menu.png',
+    'resources/drawable-hdpi/menu_item_check.png',
+    'resources/drawable-hdpi/menu_item_more.png',
+    'resources/drawable-hdpi/menu_item_uncheck.png',
+    'resources/drawable-hdpi/menu_panel_bg.9.png',
+    'resources/drawable-hdpi/menu_pb.png',
+    'resources/drawable-hdpi/menu_popup_arrow_bottom.png',
+    'resources/drawable-hdpi/menu_popup_arrow_top.png',
+    'resources/drawable-hdpi/menu_popup_bg.9.png',
+    'resources/drawable-hdpi/pause.png',
+    'resources/drawable-hdpi/pin.png',
+    'resources/drawable-hdpi/play.png',
+    'resources/drawable-hdpi/reader.png',
+    'resources/drawable-hdpi/reader_active.png',
+    'resources/drawable-hdpi/reader_cropped.png',
+    'resources/drawable-hdpi/reading_list.png',
+    'resources/drawable-hdpi/shield.png',
+    'resources/drawable-hdpi/shield_doorhanger.png',
+    'resources/drawable-hdpi/spinner_default.9.png',
+    'resources/drawable-hdpi/spinner_focused.9.png',
+    'resources/drawable-hdpi/spinner_pressed.9.png',
+    'resources/drawable-hdpi/tab_close.png',
+    'resources/drawable-hdpi/tab_indicator_divider.9.png',
+    'resources/drawable-hdpi/tab_indicator_selected.9.png',
+    'resources/drawable-hdpi/tab_indicator_selected_focused.9.png',
+    'resources/drawable-hdpi/tab_new.png',
+    'resources/drawable-hdpi/tab_new_pb.png',
+    'resources/drawable-hdpi/tab_thumbnail_default.png',
+    'resources/drawable-hdpi/tab_thumbnail_shadow.png',
+    'resources/drawable-hdpi/tabs_count.png',
+    'resources/drawable-hdpi/tabs_count_foreground.png',
+    'resources/drawable-hdpi/tabs_normal.png',
+    'resources/drawable-hdpi/tabs_private.png',
+    'resources/drawable-hdpi/tabs_synced.png',
+    'resources/drawable-hdpi/tip_addsearch.png',
+    'resources/drawable-hdpi/top_site_add.png',
+    'resources/drawable-hdpi/url_bar_entry_default.9.png',
+    'resources/drawable-hdpi/url_bar_entry_default_pb.9.png',
+    'resources/drawable-hdpi/url_bar_entry_pressed.9.png',
+    'resources/drawable-hdpi/url_bar_entry_pressed_pb.9.png',
+    'resources/drawable-hdpi/urlbar_stop.png',
+    'resources/drawable-hdpi/validation_arrow.png',
+    'resources/drawable-hdpi/validation_arrow_inverted.png',
+    'resources/drawable-hdpi/validation_bg.9.png',
+    'resources/drawable-hdpi/warning.png',
+    'resources/drawable-hdpi/warning_doorhanger.png',
+    'resources/drawable-large-hdpi-v11/arrow_popup_bg.9.png',
+    'resources/drawable-large-hdpi-v11/ic_menu_forward.png',
+    'resources/drawable-large-hdpi-v11/ic_menu_reload.png',
+    'resources/drawable-large-hdpi-v11/menu.png',
+    'resources/drawable-large-land-v11/home_history_tabs_indicator.xml',
+    'resources/drawable-large-mdpi-v11/arrow_popup_bg.9.png',
+    'resources/drawable-large-mdpi-v11/ic_menu_forward.png',
+    'resources/drawable-large-mdpi-v11/ic_menu_reload.png',
+    'resources/drawable-large-mdpi-v11/menu.png',
+    'resources/drawable-large-xhdpi-v11/arrow_popup_bg.9.png',
+    'resources/drawable-large-xhdpi-v11/ic_menu_forward.png',
+    'resources/drawable-large-xhdpi-v11/ic_menu_reload.png',
+    'resources/drawable-large-xhdpi-v11/menu.png',
+    'resources/drawable-mdpi-v11/alert_addon.png',
+    'resources/drawable-mdpi-v11/alert_app.png',
+    'resources/drawable-mdpi-v11/alert_camera.png',
+    'resources/drawable-mdpi-v11/alert_download.png',
+    'resources/drawable-mdpi-v11/alert_mic.png',
+    'resources/drawable-mdpi-v11/alert_mic_camera.png',
+    'resources/drawable-mdpi-v11/firefox_settings_alert.png',
+    'resources/drawable-mdpi-v11/ic_menu_addons.png',
+    'resources/drawable-mdpi-v11/ic_menu_apps.png',
+    'resources/drawable-mdpi-v11/ic_menu_back.png',
+    'resources/drawable-mdpi-v11/ic_menu_bookmark_add.png',
+    'resources/drawable-mdpi-v11/ic_menu_bookmark_remove.png',
+    'resources/drawable-mdpi-v11/ic_menu_desktop_mode_off.png',
+    'resources/drawable-mdpi-v11/ic_menu_desktop_mode_on.png',
+    'resources/drawable-mdpi-v11/ic_menu_downloads.png',
+    'resources/drawable-mdpi-v11/ic_menu_find_in_page.png',
+    'resources/drawable-mdpi-v11/ic_menu_forward.png',
+    'resources/drawable-mdpi-v11/ic_menu_new_private_tab.png',
+    'resources/drawable-mdpi-v11/ic_menu_new_tab.png',
+    'resources/drawable-mdpi-v11/ic_menu_quit.png',
+    'resources/drawable-mdpi-v11/ic_menu_reload.png',
+    'resources/drawable-mdpi-v11/ic_menu_save_as_pdf.png',
+    'resources/drawable-mdpi-v11/ic_menu_settings.png',
+    'resources/drawable-mdpi-v11/ic_menu_share.png',
+    'resources/drawable-mdpi-v11/ic_menu_tools.png',
+    'resources/drawable-mdpi-v11/ic_status_logo.png',
+    'resources/drawable-mdpi/abouthome_thumbnail.png',
+    'resources/drawable-mdpi/alert_addon.png',
+    'resources/drawable-mdpi/alert_app.png',
+    'resources/drawable-mdpi/alert_camera.png',
+    'resources/drawable-mdpi/alert_download.png',
+    'resources/drawable-mdpi/alert_mic.png',
+    'resources/drawable-mdpi/alert_mic_camera.png',
+    'resources/drawable-mdpi/arrow_popup_bg.9.png',
+    'resources/drawable-mdpi/autocomplete_list_bg.9.png',
+    'resources/drawable-mdpi/blank.png',
+    'resources/drawable-mdpi/bookmark_folder_closed.png',
+    'resources/drawable-mdpi/bookmark_folder_opened.png',
+    'resources/drawable-mdpi/bookmarkdefaults_favicon_addons.png',
+    'resources/drawable-mdpi/bookmarkdefaults_favicon_support.png',
+    'resources/drawable-mdpi/close.png',
+    'resources/drawable-mdpi/desktop_notification.png',
+    'resources/drawable-mdpi/favicon.png',
+    'resources/drawable-mdpi/find_close.png',
+    'resources/drawable-mdpi/find_next.png',
+    'resources/drawable-mdpi/find_prev.png',
+    'resources/drawable-mdpi/folder.png',
+    'resources/drawable-mdpi/grid_icon_bg_activated.9.png',
+    'resources/drawable-mdpi/grid_icon_bg_focused.9.png',
+    'resources/drawable-mdpi/handle_end.png',
+    'resources/drawable-mdpi/handle_middle.png',
+    'resources/drawable-mdpi/handle_start.png',
+    'resources/drawable-mdpi/history_tabs_indicator_selected.9.png',
+    'resources/drawable-mdpi/home_tab_menu_strip.9.png',
+    'resources/drawable-mdpi/ic_menu_addons_filler.png',
+    'resources/drawable-mdpi/ic_menu_bookmark_add.png',
+    'resources/drawable-mdpi/ic_menu_bookmark_remove.png',
+    'resources/drawable-mdpi/ic_menu_character_encoding.png',
+    'resources/drawable-mdpi/ic_menu_forward.png',
+    'resources/drawable-mdpi/ic_menu_guest.png',
+    'resources/drawable-mdpi/ic_menu_new_private_tab.png',
+    'resources/drawable-mdpi/ic_menu_new_tab.png',
+    'resources/drawable-mdpi/ic_menu_reload.png',
+    'resources/drawable-mdpi/ic_status_logo.png',
+    'resources/drawable-mdpi/ic_url_bar_go.png',
+    'resources/drawable-mdpi/ic_url_bar_reader.png',
+    'resources/drawable-mdpi/ic_url_bar_search.png',
+    'resources/drawable-mdpi/ic_url_bar_star.png',
+    'resources/drawable-mdpi/ic_url_bar_tab.png',
+    'resources/drawable-mdpi/icon_bookmarks_empty.png',
+    'resources/drawable-mdpi/icon_last_tabs.png',
+    'resources/drawable-mdpi/icon_last_tabs_empty.png',
+    'resources/drawable-mdpi/icon_most_recent.png',
+    'resources/drawable-mdpi/icon_most_recent_empty.png',
+    'resources/drawable-mdpi/icon_most_visited.png',
+    'resources/drawable-mdpi/icon_openinapp.png',
+    'resources/drawable-mdpi/icon_pageaction.png',
+    'resources/drawable-mdpi/icon_reading_list_empty.png',
+    'resources/drawable-mdpi/larry.png',
+    'resources/drawable-mdpi/lock_identified.png',
+    'resources/drawable-mdpi/lock_verified.png',
+    'resources/drawable-mdpi/marketplace.png',
+    'resources/drawable-mdpi/menu.png',
+    'resources/drawable-mdpi/menu_item_check.png',
+    'resources/drawable-mdpi/menu_item_more.png',
+    'resources/drawable-mdpi/menu_item_uncheck.png',
+    'resources/drawable-mdpi/menu_panel_bg.9.png',
+    'resources/drawable-mdpi/menu_pb.png',
+    'resources/drawable-mdpi/menu_popup_arrow_bottom.png',
+    'resources/drawable-mdpi/menu_popup_arrow_top.png',
+    'resources/drawable-mdpi/menu_popup_bg.9.png',
+    'resources/drawable-mdpi/pause.png',
+    'resources/drawable-mdpi/pin.png',
+    'resources/drawable-mdpi/play.png',
+    'resources/drawable-mdpi/progress_spinner.png',
+    'resources/drawable-mdpi/reader.png',
+    'resources/drawable-mdpi/reader_active.png',
+    'resources/drawable-mdpi/reader_cropped.png',
+    'resources/drawable-mdpi/reading_list.png',
+    'resources/drawable-mdpi/scrollbar.png',
+    'resources/drawable-mdpi/shadow.png',
+    'resources/drawable-mdpi/shield.png',
+    'resources/drawable-mdpi/shield_doorhanger.png',
+    'resources/drawable-mdpi/spinner_default.9.png',
+    'resources/drawable-mdpi/spinner_focused.9.png',
+    'resources/drawable-mdpi/spinner_pressed.9.png',
+    'resources/drawable-mdpi/start.png',
+    'resources/drawable-mdpi/tab_close.png',
+    'resources/drawable-mdpi/tab_indicator_divider.9.png',
+    'resources/drawable-mdpi/tab_indicator_selected.9.png',
+    'resources/drawable-mdpi/tab_indicator_selected_focused.9.png',
+    'resources/drawable-mdpi/tab_new.png',
+    'resources/drawable-mdpi/tab_new_pb.png',
+    'resources/drawable-mdpi/tab_thumbnail_default.png',
+    'resources/drawable-mdpi/tab_thumbnail_shadow.png',
+    'resources/drawable-mdpi/tabs_count.png',
+    'resources/drawable-mdpi/tabs_count_foreground.png',
+    'resources/drawable-mdpi/tabs_normal.png',
+    'resources/drawable-mdpi/tabs_private.png',
+    'resources/drawable-mdpi/tabs_synced.png',
+    'resources/drawable-mdpi/tip_addsearch.png',
+    'resources/drawable-mdpi/toast.9.png',
+    'resources/drawable-mdpi/toast_button_focused.9.png',
+    'resources/drawable-mdpi/toast_button_pressed.9.png',
+    'resources/drawable-mdpi/toast_divider.9.png',
+    'resources/drawable-mdpi/top_site_add.png',
+    'resources/drawable-mdpi/url_bar_entry_default.9.png',
+    'resources/drawable-mdpi/url_bar_entry_default_pb.9.png',
+    'resources/drawable-mdpi/url_bar_entry_pressed.9.png',
+    'resources/drawable-mdpi/url_bar_entry_pressed_pb.9.png',
+    'resources/drawable-mdpi/urlbar_stop.png',
+    'resources/drawable-mdpi/validation_arrow.png',
+    'resources/drawable-mdpi/validation_arrow_inverted.png',
+    'resources/drawable-mdpi/validation_bg.9.png',
+    'resources/drawable-mdpi/warning.png',
+    'resources/drawable-mdpi/warning_doorhanger.png',
+    'resources/drawable-xhdpi-v11/alert_addon.png',
+    'resources/drawable-xhdpi-v11/alert_app.png',
+    'resources/drawable-xhdpi-v11/alert_camera.png',
+    'resources/drawable-xhdpi-v11/alert_download.png',
+    'resources/drawable-xhdpi-v11/alert_mic.png',
+    'resources/drawable-xhdpi-v11/alert_mic_camera.png',
+    'resources/drawable-xhdpi-v11/firefox_settings_alert.png',
+    'resources/drawable-xhdpi-v11/ic_menu_addons.png',
+    'resources/drawable-xhdpi-v11/ic_menu_apps.png',
+    'resources/drawable-xhdpi-v11/ic_menu_back.png',
+    'resources/drawable-xhdpi-v11/ic_menu_bookmark_add.png',
+    'resources/drawable-xhdpi-v11/ic_menu_bookmark_remove.png',
+    'resources/drawable-xhdpi-v11/ic_menu_desktop_mode_off.png',
+    'resources/drawable-xhdpi-v11/ic_menu_desktop_mode_on.png',
+    'resources/drawable-xhdpi-v11/ic_menu_downloads.png',
+    'resources/drawable-xhdpi-v11/ic_menu_find_in_page.png',
+    'resources/drawable-xhdpi-v11/ic_menu_forward.png',
+    'resources/drawable-xhdpi-v11/ic_menu_new_private_tab.png',
+    'resources/drawable-xhdpi-v11/ic_menu_new_tab.png',
+    'resources/drawable-xhdpi-v11/ic_menu_quit.png',
+    'resources/drawable-xhdpi-v11/ic_menu_reload.png',
+    'resources/drawable-xhdpi-v11/ic_menu_save_as_pdf.png',
+    'resources/drawable-xhdpi-v11/ic_menu_settings.png',
+    'resources/drawable-xhdpi-v11/ic_menu_share.png',
+    'resources/drawable-xhdpi-v11/ic_menu_tools.png',
+    'resources/drawable-xhdpi-v11/ic_status_logo.png',
+    'resources/drawable-xhdpi/abouthome_thumbnail.png',
+    'resources/drawable-xhdpi/alert_addon.png',
+    'resources/drawable-xhdpi/alert_app.png',
+    'resources/drawable-xhdpi/alert_camera.png',
+    'resources/drawable-xhdpi/alert_download.png',
+    'resources/drawable-xhdpi/alert_mic.png',
+    'resources/drawable-xhdpi/alert_mic_camera.png',
+    'resources/drawable-xhdpi/arrow_popup_bg.9.png',
+    'resources/drawable-xhdpi/blank.png',
+    'resources/drawable-xhdpi/bookmark_folder_closed.png',
+    'resources/drawable-xhdpi/bookmark_folder_opened.png',
+    'resources/drawable-xhdpi/close.png',
+    'resources/drawable-xhdpi/favicon.png',
+    'resources/drawable-xhdpi/find_close.png',
+    'resources/drawable-xhdpi/find_next.png',
+    'resources/drawable-xhdpi/find_prev.png',
+    'resources/drawable-xhdpi/folder.png',
+    'resources/drawable-xhdpi/grid_icon_bg_activated.9.png',
+    'resources/drawable-xhdpi/grid_icon_bg_focused.9.png',
+    'resources/drawable-xhdpi/handle_end.png',
+    'resources/drawable-xhdpi/handle_middle.png',
+    'resources/drawable-xhdpi/handle_start.png',
+    'resources/drawable-xhdpi/history_tabs_indicator_selected.9.png',
+    'resources/drawable-xhdpi/home_tab_menu_strip.9.png',
+    'resources/drawable-xhdpi/ic_menu_addons_filler.png',
+    'resources/drawable-xhdpi/ic_menu_bookmark_add.png',
+    'resources/drawable-xhdpi/ic_menu_bookmark_remove.png',
+    'resources/drawable-xhdpi/ic_menu_character_encoding.png',
+    'resources/drawable-xhdpi/ic_menu_forward.png',
+    'resources/drawable-xhdpi/ic_menu_guest.png',
+    'resources/drawable-xhdpi/ic_menu_new_private_tab.png',
+    'resources/drawable-xhdpi/ic_menu_new_tab.png',
+    'resources/drawable-xhdpi/ic_menu_reload.png',
+    'resources/drawable-xhdpi/ic_status_logo.png',
+    'resources/drawable-xhdpi/ic_url_bar_go.png',
+    'resources/drawable-xhdpi/ic_url_bar_reader.png',
+    'resources/drawable-xhdpi/ic_url_bar_search.png',
+    'resources/drawable-xhdpi/ic_url_bar_star.png',
+    'resources/drawable-xhdpi/ic_url_bar_tab.png',
+    'resources/drawable-xhdpi/icon_bookmarks_empty.png',
+    'resources/drawable-xhdpi/icon_last_tabs.png',
+    'resources/drawable-xhdpi/icon_last_tabs_empty.png',
+    'resources/drawable-xhdpi/icon_most_recent.png',
+    'resources/drawable-xhdpi/icon_most_recent_empty.png',
+    'resources/drawable-xhdpi/icon_most_visited.png',
+    'resources/drawable-xhdpi/icon_openinapp.png',
+    'resources/drawable-xhdpi/icon_pageaction.png',
+    'resources/drawable-xhdpi/icon_reading_list_empty.png',
+    'resources/drawable-xhdpi/larry.png',
+    'resources/drawable-xhdpi/lock_identified.png',
+    'resources/drawable-xhdpi/lock_verified.png',
+    'resources/drawable-xhdpi/menu.png',
+    'resources/drawable-xhdpi/menu_item_check.png',
+    'resources/drawable-xhdpi/menu_item_more.png',
+    'resources/drawable-xhdpi/menu_item_uncheck.png',
+    'resources/drawable-xhdpi/menu_panel_bg.9.png',
+    'resources/drawable-xhdpi/menu_pb.png',
+    'resources/drawable-xhdpi/menu_popup_arrow_bottom.png',
+    'resources/drawable-xhdpi/menu_popup_arrow_top.png',
+    'resources/drawable-xhdpi/menu_popup_bg.9.png',
+    'resources/drawable-xhdpi/pause.png',
+    'resources/drawable-xhdpi/pin.png',
+    'resources/drawable-xhdpi/play.png',
+    'resources/drawable-xhdpi/reader.png',
+    'resources/drawable-xhdpi/reader_active.png',
+    'resources/drawable-xhdpi/reader_cropped.png',
+    'resources/drawable-xhdpi/reading_list.png',
+    'resources/drawable-xhdpi/shield.png',
+    'resources/drawable-xhdpi/shield_doorhanger.png',
+    'resources/drawable-xhdpi/spinner_default.9.png',
+    'resources/drawable-xhdpi/spinner_focused.9.png',
+    'resources/drawable-xhdpi/spinner_pressed.9.png',
+    'resources/drawable-xhdpi/tab_close.png',
+    'resources/drawable-xhdpi/tab_indicator_divider.9.png',
+    'resources/drawable-xhdpi/tab_indicator_selected.9.png',
+    'resources/drawable-xhdpi/tab_indicator_selected_focused.9.png',
+    'resources/drawable-xhdpi/tab_new.png',
+    'resources/drawable-xhdpi/tab_new_pb.png',
+    'resources/drawable-xhdpi/tab_thumbnail_default.png',
+    'resources/drawable-xhdpi/tab_thumbnail_shadow.png',
+    'resources/drawable-xhdpi/tabs_count.png',
+    'resources/drawable-xhdpi/tabs_count_foreground.png',
+    'resources/drawable-xhdpi/tabs_normal.png',
+    'resources/drawable-xhdpi/tabs_private.png',
+    'resources/drawable-xhdpi/tabs_synced.png',
+    'resources/drawable-xhdpi/tip_addsearch.png',
+    'resources/drawable-xhdpi/top_site_add.png',
+    'resources/drawable-xhdpi/url_bar_entry_default.9.png',
+    'resources/drawable-xhdpi/url_bar_entry_default_pb.9.png',
+    'resources/drawable-xhdpi/url_bar_entry_pressed.9.png',
+    'resources/drawable-xhdpi/url_bar_entry_pressed_pb.9.png',
+    'resources/drawable-xhdpi/urlbar_stop.png',
+    'resources/drawable-xhdpi/validation_arrow.png',
+    'resources/drawable-xhdpi/validation_arrow_inverted.png',
+    'resources/drawable-xhdpi/validation_bg.9.png',
+    'resources/drawable-xhdpi/warning.png',
+    'resources/drawable-xhdpi/warning_doorhanger.png',
+    'resources/drawable-xlarge-hdpi-v11/ic_menu_bookmark_add.png',
+    'resources/drawable-xlarge-hdpi-v11/ic_menu_bookmark_remove.png',
+    'resources/drawable-xlarge-mdpi-v11/ic_menu_bookmark_add.png',
+    'resources/drawable-xlarge-mdpi-v11/ic_menu_bookmark_remove.png',
+    'resources/drawable-xlarge-v11/home_history_tabs_indicator.xml',
+    'resources/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_add.png',
+    'resources/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_remove.png',
+    'resources/drawable/action_bar_button.xml',
+    'resources/drawable/action_bar_button_inverse.xml',
+    'resources/drawable/bookmark_folder.xml',
+    'resources/drawable/divider_horizontal.xml',
+    'resources/drawable/divider_vertical.xml',
+    'resources/drawable/favicon_bg.xml',
+    'resources/drawable/handle_end_level.xml',
+    'resources/drawable/handle_start_level.xml',
+    'resources/drawable/home_banner.xml',
+    'resources/drawable/home_history_tabs_indicator.xml',
+    'resources/drawable/home_page_title_background.xml',
+    'resources/drawable/ic_menu_back.xml',
+    'resources/drawable/ic_menu_desktop_mode_off.xml',
+    'resources/drawable/ic_menu_desktop_mode_on.xml',
+    'resources/drawable/ic_menu_quit.xml',
+    'resources/drawable/icon_grid_item_bg.xml',
+    'resources/drawable/menu_item_state.xml',
+    'resources/drawable/menu_level.xml',
+    'resources/drawable/remote_tabs_child_divider.xml',
+    'resources/drawable/shaped_button.xml',
+    'resources/drawable/site_security_level.xml',
+    'resources/drawable/spinner.xml',
+    'resources/drawable/suggestion_selector.xml',
+    'resources/drawable/tab_new_level.xml',
+    'resources/drawable/tab_row.xml',
+    'resources/drawable/tab_thumbnail.xml',
+    'resources/drawable/tabs_panel_indicator.xml',
+    'resources/drawable/textbox_bg.xml',
+    'resources/drawable/toast_button.xml',
+    'resources/drawable/top_sites_thumbnail_bg.xml',
+    'resources/drawable/url_bar_bg.xml',
+    'resources/drawable/url_bar_entry.xml',
+    'resources/drawable/url_bar_nav_button.xml',
+    'resources/drawable/url_bar_right_edge.xml',
+    'resources/drawable/webapp_titlebar_bg.xml',
+    'resources/layout-large-land-v11/home_history_list.xml',
+    'resources/layout-large-land-v11/home_history_page.xml',
+    'resources/layout-large-land-v11/home_history_tabs_indicator.xml',
+    'resources/layout-large-land-v11/tabs_panel.xml',
+    'resources/layout-large-land-v11/tabs_panel_footer.xml',
+    'resources/layout-large-land-v11/tabs_panel_header.xml',
+    'resources/layout-large-v11/browser_toolbar.xml',
+    'resources/layout-large-v11/home_pager.xml',
+    'resources/layout-xlarge-v11/font_size_preference.xml',
+    'resources/layout-xlarge-v11/home_history_list.xml',
+    'resources/layout-xlarge-v11/home_history_page.xml',
+    'resources/layout-xlarge-v11/home_history_tabs_indicator.xml',
+    'resources/layout-xlarge-v11/remote_tabs_child.xml',
+    'resources/layout-xlarge-v11/remote_tabs_group.xml',
+    'resources/layout/arrow_popup.xml',
+    'resources/layout/autocomplete_list.xml',
+    'resources/layout/autocomplete_list_item.xml',
+    'resources/layout/bookmark_edit.xml',
+    'resources/layout/bookmark_folder_row.xml',
+    'resources/layout/bookmark_item_row.xml',
+    'resources/layout/browser_search.xml',
+    'resources/layout/browser_toolbar.xml',
+    'resources/layout/datetime_picker.xml',
+    'resources/layout/doorhanger.xml',
+    'resources/layout/doorhanger_button.xml',
+    'resources/layout/find_in_page_content.xml',
+    'resources/layout/font_size_preference.xml',
+    'resources/layout/gecko_app.xml',
+    'resources/layout/home_banner.xml',
+    'resources/layout/home_bookmarks_page.xml',
+    'resources/layout/home_empty_page.xml',
+    'resources/layout/home_empty_reading_page.xml',
+    'resources/layout/home_header_row.xml',
+    'resources/layout/home_history_list.xml',
+    'resources/layout/home_history_page.xml',
+    'resources/layout/home_history_tabs_indicator.xml',
+    'resources/layout/home_item_row.xml',
+    'resources/layout/home_last_tabs_page.xml',
+    'resources/layout/home_most_recent_page.xml',
+    'resources/layout/home_pager.xml',
+    'resources/layout/home_reading_list_page.xml',
+    'resources/layout/home_search_item_row.xml',
+    'resources/layout/home_suggestion_prompt.xml',
+    'resources/layout/home_top_sites_page.xml',
+    'resources/layout/icon_grid.xml',
+    'resources/layout/icon_grid_item.xml',
+    'resources/layout/launch_app_list.xml',
+    'resources/layout/launch_app_listitem.xml',
+    'resources/layout/list_item_header.xml',
+    'resources/layout/menu_action_bar.xml',
+    'resources/layout/menu_item_action_view.xml',
+    'resources/layout/menu_popup.xml',
+    'resources/layout/notification_icon_text.xml',
+    'resources/layout/notification_progress.xml',
+    'resources/layout/notification_progress_text.xml',
+    'resources/layout/pin_site_dialog.xml',
+    'resources/layout/preference_rightalign_icon.xml',
+    'resources/layout/preference_search_engine.xml',
+    'resources/layout/preference_search_tip.xml',
+    'resources/layout/remote_tabs_child.xml',
+    'resources/layout/remote_tabs_group.xml',
+    'resources/layout/search_engine_row.xml',
+    'resources/layout/select_dialog_list.xml',
+    'resources/layout/select_dialog_multichoice.xml',
+    'resources/layout/select_dialog_singlechoice.xml',
+    'resources/layout/shared_ui_components.xml',
+    'resources/layout/simple_dropdown_item_1line.xml',
+    'resources/layout/site_identity.xml',
+    'resources/layout/site_setting_item.xml',
+    'resources/layout/site_setting_title.xml',
+    'resources/layout/suggestion_item.xml',
+    'resources/layout/tab_menu_strip.xml',
+    'resources/layout/tabs_counter.xml',
+    'resources/layout/tabs_item_cell.xml',
+    'resources/layout/tabs_item_row.xml',
+    'resources/layout/tabs_panel.xml',
+    'resources/layout/tabs_panel_header.xml',
+    'resources/layout/tabs_panel_indicator.xml',
+    'resources/layout/text_selection_handles.xml',
+    'resources/layout/top_sites_grid_item_view.xml',
+    'resources/layout/two_line_page_row.xml',
+    'resources/layout/validation_message.xml',
+    'resources/layout/videoplayer.xml',
+    'resources/layout/web_app.xml',
+    'resources/menu-large-v11/browser_app_menu.xml',
+    'resources/menu-v11/browser_app_menu.xml',
+    'resources/menu-xlarge-v11/browser_app_menu.xml',
+    'resources/menu/browser_app_menu.xml',
+    'resources/menu/gecko_app_menu.xml',
+    'resources/menu/home_contextmenu.xml',
+    'resources/menu/titlebar_contextmenu.xml',
+    'resources/menu/top_sites_contextmenu.xml',
+    'resources/values-land/integers.xml',
+    'resources/values-land/layout.xml',
+    'resources/values-land/styles.xml',
+    'resources/values-large-land-v11/dimens.xml',
+    'resources/values-large-land-v11/styles.xml',
+    'resources/values-large-v11/dimens.xml',
+    'resources/values-large-v11/layout.xml',
+    'resources/values-large-v11/styles.xml',
+    'resources/values-large-v11/themes.xml',
+    'resources/values-v11/colors.xml',
+    'resources/values-v11/dimens.xml',
+    'resources/values-v11/styles.xml',
+    'resources/values-v11/themes.xml',
+    'resources/values-v14/styles.xml',
+    'resources/values-v16/styles.xml',
+    'resources/values-xlarge-land-v11/dimens.xml',
+    'resources/values-xlarge-land-v11/styles.xml',
+    'resources/values-xlarge-v11/dimens.xml',
+    'resources/values-xlarge-v11/integers.xml',
+    'resources/values-xlarge-v11/styles.xml',
+    'resources/values/arrays.xml',
+    'resources/values/attrs.xml',
+    'resources/values/colors.xml',
+    'resources/values/dimens.xml',
+    'resources/values/integers.xml',
+    'resources/values/layout.xml',
+    'resources/values/styles.xml',
+    'resources/values/themes.xml',
+    'resources/xml-v11/preference_headers.xml',
+    'resources/xml-v11/preferences.xml',
+    'resources/xml-v11/preferences_customize.xml',
+    'resources/xml-v11/preferences_customize_tablet.xml',
+    'resources/xml/preferences.xml',
+    'resources/xml/preferences_customize.xml',
+    'resources/xml/preferences_devtools.xml',
+    'resources/xml/preferences_display.xml',
+    'resources/xml/preferences_privacy.xml',
+    'resources/xml/preferences_search.xml',
+    'resources/xml/preferences_vendor.xml',
+    'resources/xml/searchable.xml',
+]
+
+if CONFIG['MOZ_CRASHREPORTER']:
+    ANDROID_RESFILES += [
+        'resources/drawable-mdpi/crash_reporter.png',
+        'resources/layout/crash_reporter.xml',
+    ]
--- a/mobile/android/tests/background/junit3/Makefile.in
+++ b/mobile/android/tests/background/junit3/Makefile.in
@@ -16,17 +16,16 @@ manifest_FLAGS    += \
   $(NULL)
 
 GARBAGE += AndroidManifest.xml
 
 include $(srcdir)/android-services-files.mk
 
 # BACKGROUND_TESTS_{JAVA,RES}_FILES are defined in android-services-files.mk.
 JAVAFILES := $(BACKGROUND_TESTS_JAVA_FILES)
-ANDROID_RESFILES := $(BACKGROUND_TESTS_RES_FILES)
 
 # The test APK needs to know the contents of the target APK while not
 # being linked against them.  This is a best effort to avoid getting
 # out of sync with base's build config.
 JARS_DIR := $(DEPTH)/mobile/android/base/jars
 JAVA_BOOTCLASSPATH := $(JAVA_BOOTCLASSPATH):$(subst $(NULL) ,:,$(wildcard $(JARS_DIR)/*.jar))
 # We also want to re-compile classes.dex when the associated base
 # content changes.
--- a/mobile/android/tests/background/junit3/android-services-files.mk
+++ b/mobile/android/tests/background/junit3/android-services-files.mk
@@ -95,16 +95,8 @@ BACKGROUND_TESTS_JAVA_FILES := \
   src/testhelpers/MockPrefsGlobalSession.java \
   src/testhelpers/MockRecord.java \
   src/testhelpers/MockServerSyncStage.java \
   src/testhelpers/MockSharedPreferences.java \
   src/testhelpers/WaitHelper.java \
   src/testhelpers/WBORepository.java \
   $(NULL)
 
-BACKGROUND_TESTS_RES_FILES := \
-  res/drawable-hdpi/icon.png \
-  res/drawable-ldpi/icon.png \
-  res/drawable-mdpi/icon.png \
-  res/layout/main.xml \
-  res/values/strings.xml \
-  $(NULL)
-
new file mode 100644
--- /dev/null
+++ b/mobile/android/tests/background/junit3/android-services.mozbuild
@@ -0,0 +1,7 @@
+ANDROID_RESFILES += [
+    'res/drawable-hdpi/icon.png',
+    'res/drawable-ldpi/icon.png',
+    'res/drawable-mdpi/icon.png',
+    'res/layout/main.xml',
+    'res/values/strings.xml',
+]
--- a/mobile/android/tests/background/junit3/moz.build
+++ b/mobile/android/tests/background/junit3/moz.build
@@ -1,5 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+include('android-services.mozbuild')