The other day, God graciously allowed me to compile PAC-ROM MM for the T-Mobile Samsung Galaxy S4 (JFLTETMO SGH-M919). So there are a lot of great things about this rom, but there were also a few things that I thought were lacking in creativity. Simple things really. Like the background. It comes standard with the CyanogenMod background. Well, that just doesn't seem very PacRomish. So, I downloaded a custom background and edited the jpg until it was the right shape and size. I typically use Gimp for that, and today was no exception. After making the jpg into a 1920x1280 jpg file, I then used my home built script to make all of the "default_wallpaper.jpg" files. Here is the script:
[CODE]
#!/bin/bash
echo "Changing name of jpg file."
mv *.jpg 1920x1280.jpg
echo "Converting to 1080x960"
convert -resize 1080x960 1920x1280.jpg 1080x960.jpg
echo "Converting to 960x800"
convert -resize 960x800 1920x1280.jpg 960x800.jpg
echo "Converting to 1440x1280"
convert -resize 1440x1280 1920x1280.jpg 1440x1280.jpg
echo "Converting to 2160x1920"
convert -resize 2160x1920 1920x1280.jpg 2160x1920.jpg
echo "Converting to 2880x2560"
convert -resize 2880x2560 1920x1280.jpg 2880x2560.jpg
echo "making folders"
mkdir ./drawable-hdpi
mkdir ./drawable-nodpi
mkdir ./drawable-sw600dp-nodpi
mkdir ./drawable-sw720dp-nodpi
mkdir ./drawable-xhdpi
mkdir ./drawable-xxhdpi
mkdir ./drawable-xxxhdpi
echo "copying and renaming pictures"
cp ./1080x960.jpg ./drawable-hdpi/default_wallpaper.jpg
cp ./960x800.jpg ./drawable-nodpi/default_wallpaper.jpg
cp ./1920x1280.jpg ./drawable-sw600dp-nodpi/default_wallpaper.jpg
cp ./1920x1280.jpg ./drawable-sw720dp-nodpi/default_wallpaper.jpg
cp ./1440x1280.jpg ./drawable-xhdpi/default_wallpaper.jpg
cp ./2160x1920.jpg ./drawable-xxhdpi/default_wallpaper.jpg
cp ./2880x2560.jpg ./drawable-xxxhdpi/default_wallpaper.jpg
echo "Complete."
echo "Move the drawable* folders to 'vendor/pac/overlay/common/frameworks/base/core/res/res' folder."
[/CODE]
You have to have imagemagic installed on your machine to use this script. Then, simply place your jpg file in a folder by itself, add this script to the folder, and run it! Here is the output:
[CODE]
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/wallpapers/pacman/images\$ ls
pacman.jpg picscriptphones.sh
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/wallpapers/pacman/images\$ ./picscriptphones.sh
Changing name of jpg file.
Converting to 1080x960
Converting to 960x800
Converting to 1440x1280
Converting to 2160x1920
Converting to 2880x2560
making folders
copying and renaming pictures
Complete.
Move the drawable* folders to 'vendor/pac/overlay/common/frameworks/base/core/res/res' folder.
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/wallpapers/pacman/images\$ ls
1080x960.jpg 2160x1920.jpg drawable-hdpi drawable-sw720dp-nodpi drawable-xxxhdpi
1440x1280.jpg 2880x2560.jpg drawable-nodpi drawable-xhdpi picscriptphones.sh
1920x1280.jpg 960x800.jpg drawable-sw600dp-nodpi drawable-xxhdpi
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/wallpapers/pacman/images\$ ls drawable-hdpi/
default_wallpaper.jpg
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/wallpapers/pacman/images\$
[/CODE]
Once I moved the drawable folders to the folder mentioned above, I simply re-ran the compiler:
[CODE]
\$ brunch jfltetmo
.....Edited for space.....
===============================-Package complete-===============================
Zip: /home/alaskalinuxuser/Documents/projects/phones/compile/pac6/out/target/product/jfltetmo/pac_jfltetmo__20160616-055233.zip
MD5: 61321450dfd6eed47ac7702cb7da7b1a
Size: 294M
OTA Link: http://pac-rom.com/ota/?device=jfltetmo&version=pac_jfltetmo__20160616-055233&md5=61321450dfd6eed47ac7702cb7da7b1a
================================================================================
.....Edited for space.....
[/CODE]
Now even a simple change like the backgrounds takes a good bit of time. It took my slow computer 2 hours just to make this one change. So don't be alarmed if it takes a while for you too!
Linux - keep it simple.