Android Material 2 Messages (Rooted Devices)

The following assumes you have a rooted device, ADB configured, sqlite database knowledge, and basic command line skills. If you don't know what any of those mean or are uncertain about something, turn back now. Not promising this will work for everyone. Just sharing what worked for me.

Connect via ADB & run commands:

bashsu
cp /data/data/com.google.android.gms/databases/phenotype.db /sdcard/phenotype_m2.db
cp /data/data/com.google.android.apps.messaging/shared_prefs/PhenotypePrefs.xml /sdcard/PhenotypePrefs_m2.xml
exit
exit

Terminal

bashadb pull /sdcard/phenotype_m2.db
adb pull /sdcard/PehnotypePrefs_m2.xml

Highly recommend backing up these files and copying to a new directory or something.

Open phenotype_m2.db with a sqlite editor and run the following queries:

SELECT DISTINCT version
FROM flags
WHERE packageName = 'com.google.android.apps.messaging'
ORDER BY version DESC
LIMIT 1

For me the result was "33044249" but may differ for others. Then replace your version in the "AND version = " part of the following query & run.

UPDATE flags
SET boolVal = 1
WHERE packageName = 'com.google.android.apps.messaging'
AND version = 33044249
AND (
name = 'bugle_phenotype__enable_phenotype_override' or
name = 'bugle_phenotype__enable_m2' or
name = '__data_rollout__PhenotypeOverride.PhenotypeOverrideRollout__launched__' or
name = 'bugle_phenotype__enable_multi_device' or
LOWER(name) LIKE '%material%'
)

Next edit the PhenotypePrefs_m2.xml file with an editor of your choice. Find "bugle_phenotype__enable_phenotype_override" & "bugle_phenotype__enable_m2" attributes and set the values equal to "true" and save the file.

Push both of these files back to your android device with ADB using the same file names.

Force stop Messages app and then adb shell back in.

su
cat /sdcard/phenotype_m2.db > /data/data/com.google.android.gms/databases/phenotype.db

I am choosing to use "cat" instead of "cp" in order to preserve permissions & ownership of the files easier.

Open up Messages App. It shouldn't look any different yet. After this step I rebooted my device so the database would set in. Once booted back up I ADB shelled in again and ran:

su
cat /sdcard/PhenotypePrefs_m2.xml > /data/data/com.google.android.apps.messaging/shared_prefs/PhenotypePrefs.xml

Then once I opened the Messages app the new style set in. Unlike other guides out there, once you close the app and reopen (or reboot), the M2 theme will still hold up.

Comments

More by Aaron

Lisa Posts By Lisa
Aaron Posts By Aaron