FORUMS
Remove All Ads from XDA

[projekt.] substratum theme engine {rro // oms} [rootless:600] (07/03/2017)

5,648 posts
Thanks Meter: 11,903
 
Post Reply Email Thread


welcome all current and prospective Layers themers!

Recently our team's efforts have been announced on XDA Portal regarding the official deprecation of Layers, in progress to be overridden by our new project, Substratum.

Read more here: http://www.xda-developers.com/layers...of-substratum/

Today, I have started this thread to get our project organized and officially recorded down on a publicly visible location, with all our changes and feature set to clarify what our project is about.

What is Substratum?
Substratum is an application, downloadable from the Play Store, that utilizes all of Sony's Overlay Manager Service (OMS), found on the official AOSP code review. This is similar to Layers in terms of stability and customization as it runs off an upgraded version of the Resource Runtime Overlay system, with the added benefit of running up-to-date Sony code on a customized ROM.

What is Masquerade?
Masquerade is, simply, a helper app, that gets prebuilt by Substratum supported ROMs, allowing Substratum to alleviate OMS tasks in the background without refreshing any assets. In technical terms, Masquerade is a service that loads OMS commands into the system directly, and while OMS itself refreshes resources and assets on runtime, it will refresh the caller's window, asking it to refresh resources and assets each time an overlay is loaded/unloaded from the system.

What about CMTE?
I would like to say here, that we aren't trying to compete with the CyanogenMod Theme Engine at all. Think of the Substratum project as a community-driven project where a chunk of the open-source community coming together to create something we wanted in the start.

We want to start from ground zero, without basing any code off of a huge chunk of code made by a corporation, but creating what we call "tweaks" as a built-in within our system (such as prebuilt accent choosing, theme customization based on user selection, infinite possibilities based on themers, etc.).

Substratum was built by and with themers in mind. OMS was created by Sony and is planned to be merged into the source, meaning that we are running what Android should be running, rather than completely modifying a framework from the base with many changes that can't be understood by the average ROM developer.

CMTE runs on the RRO2 system, which is the base of what Layers was running on. RRO2 is deprecated, and superseded by the OverlayManagerService (OMS) within Sony's code in the AOSP code review.

Final thing, instead of competing against CMTE, we sincerely thank them for providing CMTE as an open sourced project. We were able to filter out everything needed by understanding the Theme Engine completely from a low level standpoint.

Why is this better than Layers?
  • No longer require soft or hard reboots when applying themes
  • We can apply fonts without rebooting
  • We can apply System sounds from a theme, such as lock/unlock/effect_tick sounds, to make your unlock sounds match your theme
  • Does not use the vendor/overlays partition/folder anymore, to limit down possible security vulnerabilities and reflashing vendors constantly
  • Active and consistent development based on upstream Sony code, as well as team code. Relying on the old system meant bringing up legacy code to newer versions of Android, even when we know the RRO2 system is being superseded already.

How is this different from Layers?
  • Overlays are loaded at runtime (truly) when you launch an application. You may briefly see an original resources screen flicker when you open an app, and that is being worked on by the team. However, due to the nature of how OMS works, it truly brings runtime theming when you start applications, rather that bloating the system down trying to extend resources of applications you aren't currently using.

Would you like to contribute to the project?
If you would like to contribute to the project, you are free to do so by pushing commits directly to our Gerrit Code Server at http://review.projektsubstratum.com/. Please do not push to our GitHub organizations directly as a pull request, as those will be ignored due to having all code run through a code reviewing system.

Download: https://play.google.com/store/apps/d...ekt.substratum


Team Substratum Developers:
@nicholaschum: App + Platform Developer
@sykopompos: Platform Developer
@KreAch3R: Platform Developer
@camcory: Platform Developer

Team Substratum Themers:
@BrandenM
@daveyannihilation
@jerbeck24
@setiawanjimmy

Team Substratum Contributors
@nathanchance: Creating and maintaining the FAQ, including everything else on the backend of the team!
@Char_G: the best cat in the world....aaaaaand the moderator of our communities!
Idan Shulman: Animated splashscreen
Mihir Mistry: Animated theme information drawables
Sajid Shaik: Substratum App Icons
Travis Hall: All of Substratum's App Intro drawables

Special thanks to:
MÃ¥rten Kongstad (Sony Mobile)
Zoran Jovanovic (Sony Mobile)
Alan Viverette (Google)
Clark Scheff (CyanogenMod)
Andy Mast (CyanogenMod)

XDA:DevDB Information
[projekt.] substratum // interfacer, Tool/Utility for all devices (see above for details)

Contributors
nicholaschum, Sykopompos, KreAch3R, camcory, ivaniskandar
Source Code: https://github.com/TeamSubstratum


Version Information
Status: Stable
Current Stable Version: v600
Stable Release Date: 2017-03-07

Created 2016-07-22
Last Updated 2017-03-17
The Following 288 Users Say Thank You to nicholaschum For This Useful Post: [ View ]
 
 
22nd July 2016, 09:16 AM |#2  
nicholaschum's Avatar
OP Recognized Developer / Recognized Themer
Flag University of Toronto St. George (Hometown: Hong Kong)
Thanks Meter: 11,903
 
Donate to Me
More
Substratum Changelog
Extensive Substratum Changelog
Code:
SubstratumUI: Handle crashes when activities not found
Revert "Revert "SubstratumUI: AAPT -> AOPT (TESTING)""
OverlaysList: When null selected, disable is_active on toast prompt
ZTZip: Revert precompiled binary due to force closes
MaterialSheetFab: Precompiled causes too many issues, revert!
SettingsFragment: Subs/Masq option can now open GitHub
Let's keep the libraries all organized in one centralized folder!
218 update
Refactor and optimize after cherry-pick
AdvanceManager: Add progress bar
ManageFragment: Remove pointer key after removal
Gradle plugin update
Substratum: Pre-compile 80% of all dependencies for NDK
Speed up all fragments by reducing duplicate code
FirebaseNotifications: Get ready for open source
Refactor and optimize after cherry pick
SoundsAdapter: Don't include file extensions
Change my picture :P
SoundPackager: Fix weird behavior of sounds preview
AntiPiracy: Hide behind your mask, milady!
AntiPiracy: Officially divorce AYS and ITAM filters
TroubleshootingFragment: Cards should have proper margins
TeamFragment: Initialize @RajaMu and @iskandar1023
Refactor and optimize cherry pick
Remove bootanimation, fonts and sounds after uninstall theme
SubstratumUI: Re-add theme_mode filters after cherry pick
Reformat and Refactor after cherry pick
Launch theme after updating resource cache
Remove projectFilesBackup from work area
Remove .idea folder from the work area
OverlaysList: Add filter for QS Tiles and Settings icons
SubstratumBuilder: Add layout-land for compile dialog
Update build to 212
SubstratumUI: Add Root checker with Blur effects
Notification: Remove buttonIntent "dismiss" icon
Partial revert of efficiency to commit to re-add profiling
Revert "SubstratumUI: Remove all traces of LayoutLoader and load direct!"
SubstratumUI: Remove all traces of LayoutLoader and load direct!
Merge pull request #8 from nicholaschum/RajaMu
Always acquire su access globally through manifest instead of Root class calls
AYS/ITAM: Cut down processing time per class to roughly 0.47ms
AdvancedManagerFragment: Remove the duplicate uninstall (RRO)
Let's just keep the DEBUG tag enabled for a while...
IsThisAMasquerade: Fix class issue with Biohazard
InformationActivity: Take account for window config changes
AdvancedManagerFragment: Do not bound to OMS only!
Build 200: Public Release
Notifications: On new theme install, also reload fragments
SubstratumUI: Revive functionality to refresh overlays on demand
InformationActivity: Introduce a less memory intensive hero load
InformationActivity: Remove elevation on toolbar when collapsed
IsThisAMasquerade: Add Outline specific exempted classes
AreYouSure: Add Outline to the verified list of exempted classes
InformationActivity: Change up the loading toasts
AdvancedManagerFragment: Add preventative null measures
OverlaysList: Do not allow user to multi-click on fab sheet options
ReadOverlaysFile: Rewrite for efficient overlay state checks
Priorities: Do not log down when fromPos == toPos
AdvancedManagerFragment: Add toggle to select all overlays
InformationActivity: Re-enable landscape UI
InformationActivity: Adjust some view bounds and strings
InformationActivity: Re-enable Compile+Enable and retain integrity
Notification: Double vibrate the device on a quicker period instead
AdvancedManagerFragment: Remove disabled when pref is false
AdvancedManagerFragment: Fix array check clause for empty list
Settings: Allow user to activate vibrate-on-compiled on notification
SubstratumUI: Legacy and OMS should share options in InfoA
SubstratumUI: Theme card titles should not reach the end of card
Remove the "commend" toast and replace with a systematic one
SubstratumUI: All intents have no need for callbacks
SubstratumUI: Increase overlay speeds by 4x
AntiPiracy: Remove toast when purging/pre-purging/post-purge
Toybox Integration: SystemUI kills on Toybox have specific cmds
BootAnimationHandler: Allow encrypted devices to get some love!
AntiPiracy: Marry the IsThisAMasquerade and AreYouSure libraries
IsThisAMasquerade: Add support for M Dullahan's Graphite
AdvancedManagerFragment: Reintroduce uninstalls
AdvancedManagerFragment: Introduce new functionalities
Remove om no-refresh until the commit is amended and merged
Notifications: Remove redundant code and change algorithm
Recreate: Allow users on recreate ROMs to have it on by default
When filter is increased, be sure to increase the filter count too!
IsThisAMasquerade: Add support for AIDE on @xwasabi's Mint
Expose nav drawer header background for themers
Revert "SubstratumUI: AAPT -> AOPT (TESTING)"
SubstratumUI: AAPT -> AOPT (TESTING)
Merge pull request #7 from nicholaschum/RajaMu
Fix for string comparison and few warnings
SoundsHandler: Make changes for Effect_Tick to be themed
AAPTCheck: Fix possible FC when copying AAPT file without root
Masquerade: Launcher icon is hidden, no need to ensure hidden
SubstratumThemeUpdater: Fix notification intent launches
SoundsHandler: Clean up the setting of Ringtones/Notifs/Alarms
IsThisAMasquerade: More possibilities for SubstratumLauncher
Resources: DEBUG mode should display more errored classes
IsThisAMasquerade: Update filter for OrangeKitten
IsThisAMasquerade: Update filter for Spectrum
AntiPiracy: Use a more inconspicuous name for checker class
IsThisAMasquerade: Addition of the whitelist file for antipiracy
AntiPiracy: Introduce whitelist filter to verify applications
AntiPiracy: Integration to crawl theme's DEX package for verity
Refactor + Optimize Pull Request #6
Merge pull request #6 from nicholaschum/RajaMu
SubstratumBuilder: Destory process properly after completing its lifecycle
Memory: Fix for streams and process to be destroyed after it completes
Remove incorrect naming scheme for masquerade intent
Masquerade: When cleaning, send a boolExtra to restart SystemUI
ManageFragment: Shift to OM-Refresh instead of helper apk
Priorities: SystemUI should restart on non-recreate ROMs
MainActivity: Add Refresh Windows to the overflow menu
OM-Refresh: Add no-refresh and refresh to pm install
OM-Refresh: Prepare FontHandler.java with the newest om refresh
SubstratumUI: Add advanced theme information on card UI
Merge pull request #5 from nicholaschum/RajaMu
Merge branch 'master' of https://github.com/nicholaschum/substratum
Memory: Bug fix to close all streams properly for better memory management
Merge pull request #4 from nicholaschum/RajaMu
Memory: Fix for Process to be destory and enhanced buffer closure
Merge pull request #3 from nicholaschum/RajaMu
Memory: handle stream object for closure after bitmap data completed
SubstratumUI: Cards can now display Substratum_Plugin as a tag
Legacy: Remove legacy check for overlay list
SubstratumThemeUpdater: Notifications shouldn't launch activities
References: Move theme filter to References and change for 170
SubstratumUI: Take account for template default activity location
Revert "Add SharedUserId into Substratum Manifest for Template"
Update all dependencies as of 29/07/16
SubstratumUI: Move all calls for is_updating to private SharedPrefs
QuickApply: Remove file extensions and fix failed to apply toasts
Remove bounds on ComponentInfo when launching theme activity
ThemeTemplate: Share UID with Substratum to share SharedPrefs
Revert "Move SharedPref Restorer to a separate class"
Move SharedPref Restorer to a separate class
SubstratumThemeUpdater: Fix copy pasta for SharedPref setting
Context: Ensure Android N doesn't crash with WORLD_READABLE
Bump up to Android Studio 2.2 Canary database
ThemeTemplate: Adapt the template to use with Substratum
Deprecate API22 testing
ManageFragment: Fix Disable All Overlays Function
SplashScreenActivity: App Intro updated to 0.7.2 to remove "FC"
HomeFragment: Reload SharedPreference list when list loads up
ThemeDetection: Clean up functions
ThemeDetection: Move detector to it's own BroadcastReceiver
Themes: Move preferences to WORLD_READABLE for is_updating
AntiPiracy: Legacy Antipiracy was not functioning, fix it!
TeamFragment: Reorganize layout
First public release!
WindowRefreshes + Specific Exceptions == Utter Madness
References: Open up non-specific exception handling
Remove debugging lines
LegacyMode: Do not allow OMS themes without metadata to install
Fix up a few commands sent to masquerade
The majority wins, one version lag only!
SubstratumUI: Update a few strings
Add pretty readme!
Let's see how far Substratum Legacy could take us...
SubstratumUI: Fix app FCs when fragments swapping
MainActivity: Should always print FCM registration token
Update all dependencies to 24.1.1
Firebase: Integrate the Firebase Messaging System
AdvancedManagerFragment: Handle non-existent folder
HomeFragment: Fix incorrect path checking for legacy
InformationActivity: Properly fix the missing overlays tab
Revert "Revert "InformationActivity: Do not always add an overlays list""
Revert "InformationActivity: Do not always add an overlays list"
InformationActivity: Do not always add an overlays list
QuickApply: Apply SystemUI filter to quick apply
OverlaysList: Move SystemUI filter to an earlier stage
OverlaysList: Permit duplicate package names when buffering list
OverlaysList: Fix updating enabled overlays not updating
Themes: Expose BootAnimation tab background
LegacyMode: Precedence listing for Legacy folder was not applied
Update FAQ @nathanchance
OverlaysList: Split out SystemUI StatusBar to be overlayable
Expose priorities drag handle color
MainActivity: Handle configuration changes while rotating device
SettingsFragment: Hide SystemUI recreate unless ROM supports it
References: Move default config method to Reference class
SettingsFragment: Fix app icon switch logic
LegacyMode: Change to Hard Reboot + Add filter for IA
InformationTabsAdapter: Reorganize the tab sorting filters
OverlaysAdapter: Restore functionality for custom types on legacy
SoundPackager: Remove proper directory when clearing
InformationTabsAdapter: Add checks for package to return tabs
SubstratumBuilder: Fix clause for detection of overlays_legacy
SubstratumBuilder: Check if overlays_legacy exists, have fallback
SubstratumUI: Consolidate a few functions + update documents
References: Move grabAppIcon to Reference class
SubstratumUI: Do a bit more clean up + remove RestoreActivity
References: Move isPackageInstalled to Reference class
References: Update ProjectWideClasses to a more universal name
SubstratumUI: Do some clean up and exposing of static variables
OverlaysList: Reinforce integrity of directory dividers
SoundsHandler: Expose String Array of allowed Sounds
SoundsHandler: Remove warning dialog if theme has no ringtone
SoundsHandler: Enforce permissions on folder /data/system/theme
SettingsFragment: Invert toast for hiding app
LegacyMode: Finalize features
LegacyMode: Allow trigger to reset substratum folder
TroubleshootingFragment: Update from @nathanchance
LegacyMode: Revive Layers functionality based on API v24
SoundsHandler: Properly fix Sounds reset card
ReadOverlays: Shift root commands to util class
Legacy: Initial commit for Substratum Legacy (Non Functional)
Prepare for v100 release!
OverlaysList: Clean up commands sent to Masquerade
OverlaysList: Re-activate MixAndMatch mode
OverlaysList: Fix logic when the app mixes up the current mode
OverlaysList: Add progress bar and refine enable/disable logic
ProfilesFragment: Upgrade the Profiles fragment to current state
SettingsFragment: Add versions for substratum & masquerade
PrioritiesAdapter: Adjust the priority cards to show full pkg name
SystemUI: Add Headers and NavBars to overlay filter selection
Notification: Allow persistent notification to be cleared + restarted
AdvancedManagerFragment: Fix SystemUI not restarting
SettingsFragment: Update several strings
Masquerade: Introduce Settings callback option
Masquerade: ThemeInformation should also be independent
Masquerade: Allow Substratum to be independent of Masquerade
Remove unnecessary boolean for debugging mode
Fix Window not attached to activity on Manage and OverlaysList
Masquerade: Allow debugging for interaction between Masquerade
ManageFragment: Restart SystemUI when uninstalling overlays
Masquerade: Update Intent calls
UninstallDetector: Remove the uninstall detector for now
FontsHandler: Do not remove the /data/system/theme contents
SubstratumBuilder: Allow OverlaysList to handle type3 moving
TroubleshootingFragment: Add FAQ and @nathanchance
InformationActivity: Introduce light mode on themes with light hero
AAPTCheck: Check AAPT's integrity before determining it works
Clean up unused contexts and methods from previous commit
Substratum UI: Preload the overlay images to reduce stutters
ThemeInfo: Cache the hero images beforehand
Substratum UI: Get prepared for the new Masquerade system
TeamFragment: Add Jeremy into the themer list
SettingsFragment: Add Advanced Manager overlay hiding option
SettingsFragment: Upgrade to v14 and add nav and action bar cb's
AntiPiracy: Activate the service when any app is uninstalled
Notification UI: Add intents for each notification and a refresh value
Masquerade: From now on, new theme installs extracts assets
InformationActivity (Tabs): Add possible NPE catching
Masquerade: Update InformationActivity popup menu options
AntiPiracy (Masquerade): Helper can handle removal of packages
Masquerade: Always refresh current_overlays.xml when called for
Masquerade: Rewrite uninstall broadcast receiver
OverlayManagerFragment: Fix buffer of list of overlays
OverlaysList: Handle possible NPEs while handling fileArray
OverlayManager: Add toasts when disabling/enabling
AdvancedManager: Add a UI to enable/disable any overlay
Start targeting Android N API
AppIntro: Upgrade to the Welcome library by @stephentuso
InformationActivity: Request Root on Helper at start of activity
OverlaysList: Do not move type variant, copy instead
Masquerade: Converge InformationActivity to use broadcaster
SubstratumUI: Allow all OM commands to be run by the handler
Expose bool for themers to turn off or turn on dynamic nav bar
QuickApply: Adapt to new Substratum format
InformationActivity: Uninstalling theme should remove cache too
ThemeDetector: Notification should now open MainActivity
ThemeDetector: Ignore first boot of app and new themes
Fix incorrect default spinner options for Fonts and Sounds
InformationActivity: Adjust navigationBarColor based on ActionBar
OverlaysList: Restore type naming functionality
OverlaysList: Restore functionality to type modifications
ThemeCacher: Handle new installs better through SharedPref
SubstratumUI: v70
BootAnimation: Handle BootAnimation Previews Dynamically
ManageFragment: (Restore) Remove title and set dialog dismiss
OverlaysList: If theme has a few overlays, ensure toggle text shown
OverlaysList: Reconfigure Spinner, Switch and MaterialProgressBar
Internal build v66
ThemeInformation: Update tab to be scrollable
QuickApply: Fix base3 filtering when re-enabling
AntiPiracy: Remove excessive logging
AntiPiracy: Move function out of the fragment and call it separately
OverlaysList: Remove debugging log for exiting fragment early
QuickApply: Add a noneView for themes that doesn't support QA
QuickApply: Simplify ThemeInformation Quick Apply UI
QuickApply: Enable System and Third Party Cards
OverlaysList: Proper logic when dealing with the SharedPreference
OverlaysList: When switching base, change the toggle state
Revert "ThemeDetector: Allow ThemeDetection service to periodically run"
ThemeDetector: Allow ThemeDetection service to periodically run
Update build tools and dependencies to 24.0.0
OverlaysList: Notification should depict whether overlays errorred
HomeFragment: Temporarily add toast on non-OMS devices
SettingsFragment: Update Strings for Settings options
LauncherActivity: Fix shortcut FC when hiding app
SettingsFragment: Fix Settings preferences
ManageFragment: Do not crash SystemUI while disabling/uninstall
ManageFragment: Remove toast while initiating disable-all
SoundsHandler: Clean up allowed sounds for UI
ManageFragment: Make the dialog non cancellable
Prepare for first dev/themer beta!
SplashScreenIntroActivity: Clean up the animated splash screen
SubstratumUI: SystemUI toggle should be default at false
SettingsFragment: Build should have preferences as default false
SubstratumBuilder: Update dialog string
SplashScreenActivity: Take account for OutOfMemory Exception
Remove Sounds directory after process is complete
SubstratumUI: Grant WRITE_SETTINGS permission from user
ManageFragment: Fix up fonts restore and clean up overlay cleaner
ManageFragment: Add Substratum Management UI
Add @USA-RedDragon to the contributor list
SubstratumUI: Load all fragment contents before user click
FontsHandler: Check if pre-existing fonts.xml exists before copying
SoundsHandler: Kill SystemUI at the end for sounds recreation
SubstratumUI: Cut down the amount of calls to listing assets folder
Add boot animation scrolling image background drawable
OverlaysAdapter: Cache the app icons so it won't keep rechecking
OverlaysList: Add placeholder text for toggle all
SettingsFragment: Add Auto SystemUI Restart Settings Option
BootAnimation: Hide VM Blown Text when switching to 0th index
OverlaysList: Introduce new UI for overlays list row with app icon
OverlaysList: Toggle should be visible to themes with no spinner
SubstratumUI: Bring out BootAnimation, Sounds and Fonts Classes
OverlaysList: Fix a few FCs while enabling/disabling and uncheck
OverlaysList: Untick all ticked options after compiling
OverlaysInfo: Revamp logic for evaluating overlay versioning
Fix potential FC when wakelock is dismissed without creating
When compiling, the fab material sheet should hide automatically
SubstratumBuilder: Re-display pretty dialog while compiling
OverlaysList: Fix logic for enabling/disabling/compiling no overlays
OverlaysList: Adjust margins to match variant spinner arrows
OverlaysList: Swipe down to refresh overlays list
OverlaysList: Move package checker into it's own scope
OverlaysList: Refresh installed packages after compiled
SubstratumUI: Clean up unneeded methods in duplicate fragments
SubstratumUI: Nav Drawer should contain separate style items
InformationActivity: Tabs should reflect their true content instead
InformationActivity: Deprecate old InformationActivity for new one
Partial revert of reload commit for themes with no spinner
OverlaysList: Instead of reloading, just notifyDataSetChanged()
OverlaysList: Add Toggle All switch in Overlay Manager
InformationActivityTabs: New algorithm to calculate dominant color
OverlaysList: CardView options should now check the boxes
SoundPackager: Add initial Sounds UI commit
OMS3: Update OM batch commands thanks to @USA-RedDragon
FontInstaller: Set prop for refreshing the font on device
Revert "Temporarily disable Quick Apply UI"
OverlaysList: Fix list not refreshing after compiling
AAPT: --auto-add-overlay should be added to append resources
ThemeInformationTabs: If dominant color is white, invert it to black
InformationActivityTabs: Add Root request if launched from notif
SubstratumUI: Rebase Root commands to Kernel Auditor's version
BootAnimation + FontInstaller: Have a placeholder option
BootAnimation + FontInstaller: These views shouldn't load at start
OverlaysList: Create only one instance of Package checker
OverlaysList: Allow themes with no variants to LoadOverlays too
OverlaysList: Remove duplicate call to LoadOverlays()
OverlaysInfo: Do not repeatedly call ReadOverlaysFile
OverlaysList: Fix Type1b an Type1c not copying over
BootAnimation + FontInstaller: Dialogs shouldn't be dismissible
OverlaysList: Update Available string should reflect new update
OverlaysList: Hide spinner when the theme does not have bases
OverlaysList: Compile with the proper Type1 file on a Type3 base
OverlaysAdapter: Need to check if themes are enabled or not (ALT)
Deprecate Substratum_Mode metadata completely
FontInstaller: Configure correct permissions and do clean up
Temporarily disable Quick Apply UI
BootAnimation + FontInstaller: Finalize code
OverlaysList+Adapter: Clean up the layout a bit more
OverlaysInfo: Clean up some package names to be parsed
OverlaysInfo: Make sure base variant is chosen before parsing
OverlaysAdapter: Huge clean up of adapter and revamp logic
Beautify the placeholder text for VM explosions
BootAnimation: Handle VM explosions with placeholder text
ThemeInformation: Fix build for themes with no options
OverlaysAdapter: Run isOverlayEnabled() on other spinners too!
SubstratumUI: Update a few strings and layout margins
MainScreenTab: Add Boot Animations Card
Fonts: Add Fonts UI for dynamically swapping system fonts
OverlaysList: Handle NPE when window is unexpectedly dropped
ThemeInformation: Handle NPEs when Activity closed during load
BootAnimation: Allow spaces in boot animation to be parsed proper
SubstratumBuilder: Fix logic for handling variants in OverlayList
TeamFragment: Add Mihir M to contributors list
AboutLibraries: Update licenses
SubstratumBuilder: When using Type3 folders, have a fallback /res
OverlaysAdapter: Update colouring scheme for visibility
ThemeInformation: Overlay list should show states through colors
ThemeInformation: Adjust offscreenPageLimit to prevent redraws
SubstratumUI: Add Functional OverlaysList
SubstratumUI: OMS3 UI revamp revision 2
SubstratumUI: Revamp for OMS3 (Initial commit)
SettingsFragment: Update textView subtext on supported ROM
HomeFragment: Relax the AntiPiracy function
RestoreActivity: Deprecate Restore Theme Function
SubstratumUI: Re-add black nav bar, configure default overlay icon
PriorityFragment: Suppress the error in log for skipping layout
PriorityFragment: Move main functions to AsyncTask for speed
ProfileFragment: Make fab speed dial label background themed
HomeFragment: Move AntiPiracy code integration to AsyncTask
PriorityFragment: Set emptyView to be Visibility.GONE by default
PriorityFragment: Fix emptyView layout
PriorityFragment: Add no prioritizable overlays view
Revert "MainActivity: Reload list every time the user comes back to it"
SettingsFragment: Revamp Icon detection based on @KreAch3R
Replace Divider with a SectionHeader for Nav Drawer
SettingsFragment: Add Hide Launcher Icon for Main App Icon
Clean up the PriorityFragment commit
Add Gesture RecyclerView to Licenses
PriorityFragment: Implement working code and finalize fragment
InformationActivity: Remove all traces of SystemUI Restart
DynamicPrioritySystem: Fix apps not appearing and duplications
PriorityFragment: Initial Implementation of Priority Support
ProfileFragment: Handle Activity Loss when Restoring/Uninstalling
ProfileFragment: Add dialog for delete and restore
Revert "First attempt to use modified AAPT with -x extension"
Revert "Second attempt to use modified AAPT with -x extension"
Second attempt to use modified AAPT with -x extension
First attempt to use modified AAPT with -x extension
ProfileFragment: Remove extra padding for FAB Speed Dial
ProfileFragment: Implement Profiles into the App
Expose windowLightStatusBar attribute to a bool
Add a few usernames into the Layers contributors
TeamFragment: Add Layers Contributors
TeamFragment: Add contributor list into the end of the list
Add AboutLibrary to list all open source licenses
Add animated Substratum to Layers icon for use later
Change from About to Team
TeamFragment: Add Team to the App
Move all Play Store URLs to strings.xml
InformationActivity: Fix up some logic with M&M and Notification
LaunchActivity: Add a brand new app intro screen by Travis Hall!
MainActivity: Reload list every time the user comes back to it
SubstratumBuilder: Let signing be done by a simple boolean
ThemeInformation: If window refreshed multiple times, fix NPE
MainActivity: Add Restart SystemUI to overflow menu
Remove excessive logging for uninstall detector
ThemeInformation: If theme uninstalled, refresh HomeFragment
Make sure that notification only displays once on new theme install
Notification: Make onClick open the theme's information page
Change notification icon to use animated resources from Android
ThemeInformation: Move super.onBackPressed() before Async
ThemeInformation: Completely deprecate dialog with notification
Handle the notification the same way when an overlay fails
ThemeInformation: Do not process notification on Enable/Disable
HomeFragment: Move AntiPiracy to AsyncTask
ThemeDetector: Make notification open up the InformationActivity
Introduce the ThemeDetect Service
Set Max Priority for Notification
ThemeInformation: Use alphabetical overlay listing
ThemeInformation: Revamp OnPause Logic
Remove excessive logging for OnResume()
ThemeInformation: Add persistent notification while compiling
SplashScreenActivity: Add new splash screen for app launch
MainActivity: Change it so that the overflow loads Substratum
Substratum: Rebase code and refactor unused elements
Use largeHeap for Application
HomeFragment: Add a bit of padding at the bottom of the RV
ThemeInformation: Make cache clear run in a separate thread
MainActivity: Fix runtime permissions and fragments
AntiPiracy: Fix unauthorized package uninstall if name has spaces
SubstratumUI: Migrate from Activity base to Fragment base
Push up to v15!
MainActivity: Do clean up if needed on target APKs that don't exist
AntiPiracy: Remove theme overlays when main theme uninstalled
Introduce Anti-piracy Security Mechanism
ThemeInformation: Fix already enabled overlay not recompiling
ThemeInformation: Fix Mix & Match for Compile+Enable
Add logging for each OM call
ThemeInformation: Disable for loop for onBackPressed()
ThemeInformation: Improve overlay list buffer access speed
ThemeInformation: Disable ListView On Long Click
ThemeInformation: Fix possible NPE and re-enable swap e/d
ThemeInformation: Change up some logic for handling swap mode
ThemeInformation: Enforce sensorPortrait orientation
ThemeInformation: Implement FabMenu for extra options
ThemeInformation: Fix compile fab action not enabling
Revert "Temporarily disable Toggle All Overlays (because it takes a while)"
ThemeInformation: Add filter for unapproved overlays
Temporarily disable AppIntro until we get it finished
ThemeInformation: Handle NPE on current view
LaunchActivity: Add initial test of AppIntroduction
ThemeInformation: Fix overlays not applying and overlays.xml
ThemeInformation: Add clean, disable and enable menu items
RestoreActivity: No more white activity flickers when launching!
Push another tester build!
ThemeInformation: Make it so that the fab does not cover last item
ThemeInformation: Revamp Uninstall Option to remove Overlays
Make internal storage work directory hidden by default
SettingsActivity: Add Disable All Overlays Function
RestoreActivity: Add a launcher button to restore overlays
Add SystemUI restart after purge
Temporarily disable Toggle All Overlays (because it takes a while)
Enable SystemUI restart when enabling/disabling SystemUI Overlay
If a SystemUI overlay was enabled, restart SystemUI automatically
ThemeInformation: Re-add custom dialog loader
Move Enabling of OMS overlays to onPostExecute
ThemeInformation: Toggle allow clickable once listView is loaded
LayersBuilder: Organize the log better to show package creation
SettingsActivity: Allow for packages not installed to be hidden
MainActivity: Add no_theme_installed card and clean up some logic
Fix toggle all overlays creation by moving OMS enable to the end
Fix on first boot cache clear without folder created
Prepare for initial beta testing phase!
Fix up copypasta from Dashboard CreativeMode
Fix up some strings to make them more meaningful
ThemeInformation: Introduce onHold enabling/disabling of overlay
ThemeInformation: Add ProgressBar while building
ThemeInformation: Add install state within ListView and refresh
Revert "LayersBuilder: Set minSdkVersion to 21 on Manifest Creation"
MainActivity: Implement SwipeRefreshLayout and handle uninstalls
Shrink progress bar size and expose a string
Remove all traces of CircularFillableLoader for now
Expose all colors from layouts for theming
ThemeInformation: Use AsyncTask to buffer ListView for Overlays
SettingsActivity: Add Settings and Purge Function
LayersBuilder: Update AAPT with x86 and ARM architectures
LayersBuilder: Set minSdkVersion to 21 on Manifest Creation
LayersBuilder: Add Failed to Compile Logging and Toasts
ThemeInformation: Switch from button to fab instead
Shift over to AppCompat design library
Let's get everything up and working!
Add new icons by @adityaakadynamo
MainActivity: Quiet down logcat at start of app
ThemeInformation: Parse list of overlay folders inside assets
ThemeInformation: Add Uninstall to the overflow menu
MainActivity: Add Overflow Menu
Remove all of Domination's assets because we are done with code
Plugin/InformationActivity: Complete UI and code for detection
MainActivity: Allow for packages to be picked up with Layers' Meta
Make the file names more meaningful
ThemeInformation: Make overflow menu function properly
Create a basic GUI for the app to function
Initial commit
The Following 68 Users Say Thank You to nicholaschum For This Useful Post: [ View ]
22nd July 2016, 09:16 AM |#3  
nicholaschum's Avatar
OP Recognized Developer / Recognized Themer
Flag University of Toronto St. George (Hometown: Hong Kong)
Thanks Meter: 11,903
 
Donate to Me
More
Theme Template Guide
OFFICIAL THEME TEMPLATE


https://github.com/TeamSubstratum/Su...mThemeTemplate

There are two types of Substratum as of this date (27/7/16)
  • Substratum OMS
  • Substratum Legacy (RRO)

To get started, first of all, FORK this project on GitHub and open it up with Android Studio (I use Android Studio 2.1.2 and Android Studio 2.2 Preview Canary, although these versions don't matter, you should keep yourself up to date with the latest Google has to offer)

Step 1: Package Naming
The FIRST thing you need to change is the package identifier (the name the app identifies as) to something more meaningful to you:

https://github.com/TeamSubstratum/Su...p/build.gradle
Code:
applicationId "substratum.theme.template"
Change this to:
Code:
applicationId "com.yourname.themename"
Change Package Name in the project structure: (optional)
Code:
  * Look at the "project panel" in android studio (the one on the left). 
  * In the top right corner you will see a little "gear icon". 
  * Click on it.
  * in the dialog which opens click on "Compact Empty Middle Packages".
  * Select the "substratum folder" (in JAVA/com/ and rightclick it. 
  * Choose "refactor" and then "rename".
  * A warning window will pop up. Just click on "Rename package".
  * Enter the desired first part of your package name(should be same as that in applicationId of bild.gradle) and click refactor.
  * At the bottom of the screen a refactoring preview will appear. Just click on "DO REFACTOR" at the left corner. <br/> <br/>
  * Do the same with the theme and template folders, name it same as the name in applicationId of build.gradle.
Step 2: AndroidManifest Metadatas
Now you have to pick whether your theme supports OMS or RRO, or both.

Open this file: https://github.com/TeamSubstratum/Su...idManifest.xml

Now configure it to your liking:
Code:
<meta-data
    android:name="Substratum_Legacy"
    android:value="true"/>
<meta-data
    android:name="Substratum_Theme"
    android:value="@string/ThemeName"/>
<meta-data
    android:name="Substratum_Author"
    android:value="@string/ThemeAuthor"/>
These files link back to the strings.xml inside the res/values folder, here:
https://github.com/TeamSubstratum/Su...es/strings.xml
Code:
<string name="ThemeName">My New Theme</string>
<string name="ThemeAuthor">Nicholas Chum</string>
If you want to keep the Play Store shortcut turned off (to disable the launcher icon by default), open this file: https://github.com/TeamSubstratum/Su...idManifest.xml
and delete line 15.
Code:
<category android:name="android.intent.category.LAUNCHER"/>
Step 3: Start theming!

Audio
To install system sound effects, you will need to have an audio folder, just like it's listed here: https://github.com/TeamSubstratum/Su...n/assets/audio

You are allowed to add multiple bootanimations and name them differently so they show up differently on the spinner dropdown in the app.

Example:
Code:
assets/audio/StarWarsLockUnlock.zip
Audio ZIP root structure:
Code:
StarWarsLockUnlock.zip/ui/Lock.ogg(or mp3)
StarWarsLockUnlock.zip/ui/Unlock.ogg(or mp3)
StarWarsLockUnlock.zip/ui/effect_tick.ogg(or mp3)
StarWarsLockUnlock.zip/alarms/alarm.ogg(or mp3)
StarWarsLockUnlock.zip/ringtones/ringtone.ogg(or mp3)
StarWarsLockUnlock.zip/notifications/notification.ogg(or mp3)
Boot Animations
To install boot animations, you will need to have a bootanimations folder, just like it's listed here: https://github.com/TeamSubstratum/Su.../bootanimation

You are allowed to add multiple bootanimations and name them differently so they show up differently on the spinner dropdown in the app.

Example:
Code:
assets/bootanimation/Sakura.zip
assets/bootanimation/MarvelDC.zip
Fonts
To install fonts, you will need to have a fonts folder, just like it's listed here: https://github.com/TeamSubstratum/Su...n/assets/fonts

You are allowed to add multiple fonts and name them differently so they show up differently on the spinner dropdown in the app.

If you are looking to load up DOWNLOADED fonts from the internet, then download the ZIP from your source, extract it and navigate INTO the folder, until you find the folder "fonts" in "/system/fonts", and ZIP the whole contents of the folder up to form your new fonts pack.

This also supports fonts.xml within the font's ZIP file, so if you have any knowledge of this, you can add it in.

Example:
Code:
assets/fonts/SegoeUIWP8.zip
assets/fonts/ohds5.zip
Font ZIP root structure:
Code:
SegoeUIWP8.zip/font1.ttf
SegoeUIWP8.zip/font2.ttf
SegoeUIWP8.zip/font3.ttf
Overlays
If you had any experience with overlays on CMTE, it is rather the same format, except we added our own twists for enhanced theming capabilities for Substratum users.

If you would like to theme an application, first you need their package identifier. Let's say you wanted to theme Substratum (projekt.substratum), you will create a folder within "assets/overlays" and name it the package name and start following the app's resource structure, e.g.
Code:
assets/overlays/projekt.substratum/res/values/colors.xml


Type 1 Overlays
type1 can be a/b/c, as type1(a/b/c).xml at the ROOT of your overlay, and it does the Arcus way of moving it to res/values/type1(a/b/c).xml to replace Colors, Styles, Dimensions, Bools, Integers, Strings, etc...

An example of how to set up a Type 1 overlay:
https://github.com/TeamSubstratum/Su...ype1a_PINK.xml

Type 2 Overlays
type2 is a FOLDER, and they must start with /assets/overlays/overlay_name/type2_FOLDERNAME/ and this is a base extension (means it is NOT dependent on framework). You can have nav bars here, headers, special icons, etc. Type2's show up as the FOURTH SPINNER, if all type1 spinners have been used.

An example of how to set up a Type 2 overlay:
https://github.com/TeamSubstratum/Su...pe2_Gryffindor

Type 3 Overlays
type3 is also a FOLDER, but these only show up BASED ON FRAMEWORK. So if you wanted to have a clear theme bundled in with your dark theme, just create a assets/overlays/android/type3_FOLDERNAME which houses ANYTHING a type2 can house, except you can add special files like ^attrs_private.xml. If done correctly, a base spinner will show up at the top of the overlay manager (in theme information and compiling it will cause ANY overlay with a type3_FOLDERNAME spinner inside the overlay to be built automatically.

An example of how to set up a Type 3 overlay from Framework, then another app
https://github.com/TeamSubstratum/Su...lucent%20Theme
https://github.com/TeamSubstratum/Su...anslucentTheme

Renaming Type Spinners
If you would like to rename the spinner names, you just need to create a file with NO EXTENSION on the root of the overlay folder:

For example, if I wanted to change the type1a spinner's name for a specific overlay, I would put it like this:
https://github.com/TeamSubstratum/Su...android/type1a

Step 4: Finalize your theme!
To get your theme to show up on Substratum, all you need to ensure that your hero image relates to your theme. The hero image DETERMINES the color of the automatic actionbar and nav bar colors based on the (0,0)'th pixel on your image.

https://github.com/TeamSubstratum/Su.../heroimage.png

If you have a completely white image, your actionbar and nav bar will change to that color, and the text colors will determine whether the black text is more visible on that color, or a white color.

Step 5: Safeguard your theme! Don't let the pirates win!

DURING THEME DEBUGGING ON YOUR OWN PHONE
While debugging your application, you should be setting this to false so that it doesn't keep triggering antipiracy when you are working: https://github.com/TeamSubstratum/Su...ncher.java#L34

If you don't want to activate AntiPiracy
Set this value to false and the antipiracy check will report back true to Substratum every time:
https://github.com/TeamSubstratum/Su...ncher.java#L34

Getting started with AntiPiracy

If you are ready to get AntiPiracy set up, you must first compile your theme as a SIGNED production APK from Android Studio (Build -> Compile Signed APK). Then launch the signed apk on your device and your log will spit out an error log under the name "SubstratumAntiPiracyLog", and you want to copy and paste that into Line 76: https://github.com/TeamSubstratum/Su...ncher.java#L76

Then you would need to go to Play Developer Console. Then access to your app -> Services and APIs, generate a new API key for your app and then paste it in BASE_64_LICENSE_KEY on line 77: https://github.com/TeamSubstratum/Su...ncher.java#L77

Finally, if you would like to change where it checks for piracy, you should just comment out the .enable lines such as if you would not like to have Amazon App Store piracy checking, just disable it below this line: https://github.com/TeamSubstratum/Su...ncher.java#L76

DO NOT SHARE YOUR SUBSTRATUMLAUNCHER.JAVA FILE IF YOU OPEN SOURCE YOUR THEME AND WANT TO KEEP PIRACY!

For more information regarding type overlays and how to use them, please contact @setiawanjimmy and @jerbeck24 from the Substratum theme team!
The Following 72 Users Say Thank You to nicholaschum For This Useful Post: [ View ]
22nd July 2016, 10:08 AM |#4  
The Flash's Avatar
Forum Moderator
Flag Mesa, AZ
Thanks Meter: 26,022
 
More
ALL LOCATED IN OUR OFFICIAL DOCUMENTATION REPO
The Following 65 Users Say Thank You to The Flash For This Useful Post: [ View ] Gift The Flash Ad-Free
22nd July 2016, 10:10 AM |#5  
sykopompos's Avatar
Developer Relations/Recognized Developer
Flag flithydelphia
Thanks Meter: 29,101
 
Donate to Me
More
@sykopompos
The Following 19 Users Say Thank You to sykopompos For This Useful Post: [ View ]
22nd July 2016, 10:10 AM |#6  
KreAch3R's Avatar
Recognized Developer
Flag Trikala
Thanks Meter: 1,930
 
Donate to Me
More
@KreAch3R
The Following 17 Users Say Thank You to KreAch3R For This Useful Post: [ View ]
22nd July 2016, 10:10 AM |#7  
camcory's Avatar
Recognized Developer
Flag Spring Hill, Fl
Thanks Meter: 4,585
 
Donate to Me
More
@camcory
The Following 15 Users Say Thank You to camcory For This Useful Post: [ View ]
22nd July 2016, 10:16 AM |#8  
The Flash's Avatar
Forum Moderator
Flag Mesa, AZ
Thanks Meter: 26,022
 
More
Substratum boys, let's get to it!
The Following 21 Users Say Thank You to The Flash For This Useful Post: [ View ] Gift The Flash Ad-Free
22nd July 2016, 10:39 AM |#9  
Char_G's Avatar
Senior Member
Thanks Meter: 578
 
More
Here we go

---------- Post added at 10:39 AM ---------- Previous post was at 10:30 AM ----------

Quote:
Originally Posted by nathanchance

Substratum boys, let's get to it!

Girls too tyvm
The Following 19 Users Say Thank You to Char_G For This Useful Post: [ View ] Gift Char_G Ad-Free
22nd July 2016, 10:43 AM |#10  
Member
Flag Hať
Thanks Meter: 9
 
More
here we go! let the fun begin, oh we have the fun for months now but shh *inserts nsfw gif
The Following 3 Users Say Thank You to aabuk For This Useful Post: [ View ] Gift aabuk Ad-Free
22nd July 2016, 10:44 AM |#11  
nicholaschum's Avatar
OP Recognized Developer / Recognized Themer
Flag University of Toronto St. George (Hometown: Hong Kong)
Thanks Meter: 11,903
 
Donate to Me
More
Quote:
Originally Posted by HereAgain

Girls too tyvm

huh
Attached Thumbnails
Click image for larger version

Name:	25788148899858aae0f1d2cb82a8183276c9377468bd0be6db02b32f27608852.jpg
Views:	13602
Size:	29.2 KB
ID:	3820287  
The Following 5 Users Say Thank You to nicholaschum For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes