How to manually update your custom rom source code with security updates

For those of you who compile your own custom roms directly using AOSP source, the latest security updates are always added in as soon as they occure. For those of us using custom roms, such as SlimRoms, AOKP, PAC roms, and others, this is not always the case.

Because the custom rom community downloads AOSP source, and then manipulates it to their needs/tastes, they cannot always directly integrate AOSP security updates. Some of these updates may not apply. Others, if unedited, may cause some features not to function.

For this reason, custom roms can sometimes fall behind, because one of the developers on that team needs to manually apply a lot of the fixes. This can be quite tedious. For instance, the libvpx security issue found in March of 2016 changed over 800 files. For the most part, the custom rom teams do a great job updating the security patches for the current version of their rom. The question is, what do you do to update the security patches of older versions of the roms?

This is actually a problem that I ran into with my build of SlimLP for the SGH-M919, T-Mobile Galaxy S4. I am mainting a current build of SlimLP for that phone, because the Marshmallow builds have some Bluetooth issues on these phones. Thus, users who still want to use Lollipop roms still need up to date security. But how do I fix this problem? The SlimRom’s team has moved on to work on Slim6, and there is almost no activity on SlimLP. Well, by God’s grace, I figured it out, and I thought I would share that here with you, in case you face a similar problem.

First, you could apply these same methods to all levels of security, however, since there are so many security updates, I have decided to only manually update my SlimLP source code with Critical security updates. Yes, that does mean that I am skipping the High, Moderate, and Low security threats. As I mentioned before, some of the updates are over 800 files, and that would be a new full time job for me, which I don’t have time for. So, hopefully, these Critical updates will strike the balance between keeping my rom users safe, and allowing me to still have time for important things like family, work, and sleeping!

The first thing I noticed as I started building SlimLP in May was that the security updates had stopped in February. After syncing in August, I found that the security updates had still not changed. You can verify in your source (if it is Lollipop or later) by looking at /build/core/version_defaults.mk, where you should see this line:

[CODE]
ifeq “” “$(PLATFORM_SECURITY_PATCH)”
# Used to indicate the security patch that has been applied to the device.
# Can be an arbitrary string, but must be a single word.
#
# If there is no $PLATFORM_SECURITY_PATCH set, keep it empty.
PLATFORM_SECURITY_PATCH := 2016-02-01
endif
[/CODE]

Obviously, if it is now August, then the security patches are 6 months out of date. That is pretty old, and there were a lot of big security threats found since then, some of which are specific to Qualcomm phones. This prompted me to start the process of updating my source by hand.

Granted, you could also join the team of your favorite rom and help others by updating thier security patches too, but as I pointed out, I am only updating the Critical security updates, not all of them, so it would not meet all of the official requirements to push my source upstream. If that is something you are interested in doing, that is great!

The next thing I did was look at the current security updates by going here:
https://source.android.com/security/bulletin/index.html

I decided to work on one month at a time, and compile inbetween to make sure that each update did not break anything that is in my SlimLP rom. So, I clicked on March, 2016. There were 19 CVE’s, or Common Vulnerability and Exposures ID’s for that month, 7 of which were marked Critical. Those are the ones I decided to work on.

There are many different ways to go about this, but here is what worked best for me. I copied the CVE number, in this case, CVE-2016-0818, and punched it into Google. Google brought up several options, but I found a good one to click on is the NVD detail, which is teh National Vulnerability Database. In this case, it took me here:
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-0818

The website has a poor color scheme, but is very informative. It tells you what type of threat this is, how it can be used, and other great information. There is also a section called “References to Advisories, Solutions, and Tools”, below which I found several hyperlinks, including this one, which contains the fixes:
https://android.googlesource.com/platform/external/conscrypt/+/4c9f9c2201116acf790fca25af43995d29980ee0

This Google Git page shows us where the file is located, and how many, and exactly which file(s) have been changed. For this particular CVE, it is a really small change of just one file:

src/platform/java/org/conscrypt/TrustedCertificateIndex.java [diff]

By clicking on the word [diff], you are brought to the next page, that shows you exactly which lines of code need to change, like so:

[CODE]
@@ -68,6 +68,15 @@
if (anchors == null) {
anchors = new ArrayList<TrustAnchor>(1);
subjectToTrustAnchors.put(subject, anchors);
+ } else {
+ // Avoid indexing the same certificate multiple times
+ if (cert != null) {
+ for (TrustAnchor entry : anchors) {
+ if (cert.equals(entry.getTrustedCert())) {
+ return;
+ }
+ }
+ }
}
anchors.add(anchor);
}
[/CODE]

If you have never read these before, the + signs tell you to add these lines. Any – signs tell you to delete those lines. At the top, the @@ -68,6 +68,15 @@ is used to tell you which line numbers to look for, such as the case here, of line 68. Pretty straightforward. So, in this case, I found that file, and made these changes of adding these new lines. Note, in some of the files I changed, the line numbers were not correct for where to find this portion of code. The easy thing to do is copy a snipit of the code and do a search in the file, corrolating that with the surounding code and approximate line numbers for guidance. This is especially true if that file has been hacked to add some function or feature to your rom.

The next step is to go back to where we started. If you recall, we looked in /build/core/version_defaults.mk, where we saw this line:

[CODE]
PLATFORM_SECURITY_PATCH := 2016-02-01
[/CODE]

Now we can update it if we desire. Granted, if you are not doing all of the updates, you may not wish to change this, as you do not want to intentionally mislead anyone. In my case, I did update it, but was very sure to write in my rom’s long description that the security updates are only the Critical updates that I applied by hand, as of 2016-02-01. How you handle this is up to you.

Obviously, the last step is to go ahead and compile your new code, and see if it still works right! Hopefully, you now have a more secure rom for your phones.

Linux – keep it simple.

Setting up your compile environment for OmniRom 6.0.1

I’ve talked about how to compile Android variants before, and for the most part, it works the same no matter what variant you build. One caveat to that, however, is OmniRom. When I setup to build OmniRom 6.0.1, I have to set it up differently than the other builds that I do. It took me a while to figure it out (probably because I’m not very smart), so I thought I would share my findings with others, in the event that they couldn’t figure it out either.

So I want to compile OmniRom 6.0.1 for my Samsung Galaxy S4 T-Mobile phone (SGH-M919, JFLTETMO). God has graciously enabled me to build other roms for this phone, and I thought that it would be pretty straightforward to build the ol’ trusty OmniRom. Was I ever wrong! The setup was not intuitive and was unlike the setup for LiquidSmooth, AOKP, CM, PAC, and so forth. So here is what I did, and perhaps by looking at that, if you have the same problem you can fix it too.

Of course, you need to set up your compile environment by getting all the right programs and tools to run the compiler. I have already done this on my machine, but here is how you can do that too:

[CODE]
$ sudo apt-get install bison build-essential bzip2 curl dpkg-dev flex g++-multilib git git-review gnupg gperf lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev openjdk-7-jdk libbz2-1.0 libbz2-dev libc6-dev libghc-bzlib-dev libgl1-mesa-dev libgl1-mesa-glx:i386 libncurses5-dev libreadline6-dev libreadline6-dev:i386 libx11-dev:i386 libxml2-utils lzop maven pngcrush pngquant python-markdown schedtool squashfs-tools tofrodos x11proto-core-dev xsltproc zip zlib1g-dev zlib1g-dev:i386
[/CODE]

This will take a while. Once it is done, do this:

[CODE]
$ mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo

$ gedit ~/.bashrc
[/CODE]

Now you should see gedit open up your .bashrc file, to which you should add this at the very end, and save it:

[CODE]
export PATH=~/bin:$PATH
[/CODE]

Now you need to close your terminal and open a new one to get the PATH variables to stick. Actually, it wouldn’t hurt to reboot your system after installing all of those programs we just installed. Your computer should now be primed and ready to go.

So once that is done, you can now get started. First things first, I downloaded the source:

[CODE]
$ cd ~
$ mkdir omni6
$ cd omni6
$ repo init -u git://github.com/omnirom/android.git -b android-6.0
$ repo sync
[/CODE]

As I have pointed out before, this sync takes a long time to download the files. We are talking about 10+ GB of files, so it will depend on your internet connection, but that is a lot of source code!

Next, I download the device trees, kernel source, and vendor blobs. You could choose any source for these that you want, CyanogenMod’s source is usually pretty good. AOKP, Slimroms, and others have trees available also. One group that has been less of a hassle to borrow trees from is DU, and here is how you can do that:

[CODE]
$ cd ~/omni6/
$ cd device
$ mkdir samsung
$ cd samsung
$ git clone https://github.com/DirtyUnicorns/android_device_samsung_jfltetmo -b m-caf jfltetmo
$ git clone https://github.com/DirtyUnicorns/android_device_samsung_jf-common -b m-caf jf-common
$ git clone https://github.com/DirtyUnicorns/android_device_samsung_msm8960-common -b m-caf msm8960-common
$ git clone https://github.com/DirtyUnicorns/android_device_samsung_qcom-common -b m-caf qcom-common
$ cd ..
$ git clone https://github.com/DirtyUnicorns/android_device_qcom_common -b m-caf qcom-common
$ mkdir qcom
$ cd qcom
$ git clone https://github.com/DirtyUnicorns/android_device_qcom_sepolicy -b m-caf sepolicy
$ cd ~/omni6/
$ mkdir -p kernel/samsung
$ cd kernel/samsung
$ git clone https://github.com/DirtyUnicorns/android_kernel_samsung_jf -b m-caf jf
$ cd ~/omni6/vendor/
$ git clone https://github.com/TheMuppets/proprietary_vendor_samsung -b cm-13.0 samsung
[/CODE]

Now you have all of the kernel source for the JFLTETMO/JF cell phones, and you have the device trees and vendor blobs to match! But if you run the build commands now, it will simply error out stating that it cannot find “omni_jfltetmo” and ask you if you have the right repo manifest. So here is what we need to do to make the Dirty Unicorn trees buildable in OmniRom: go to the omni6/device/samsung/jfltetmo folder and rename du.dependencies to omni.dependencies. Now open the file and edit it to say this:

[CODE]
[
]
[/CODE]

Yes, I realize that says nothing. But the file is needed and must be a valid file with those brackets in it. Now rename du.mk to omni_jfltetmo.mk and edit it like so:

[CODE]
$(call inherit-product, device/samsung/jfltetmo/full_jfltetmo.mk)

# Enhanced NFC
# WJH not present in omni $(call inherit-product, vendor/omni/config/nfc_enhanced.mk)

# Inherit some common DU stuff.
$(call inherit-product, vendor/omni/config/common.mk)

PRODUCT_BUILD_PROP_OVERRIDES += \
PRODUCT_NAME=jfltetmo \
TARGET_DEVICE=jfltetmo \
BUILD_FINGERPRINT=”samsung/jfltetmo/jfltetmo:4.4.4/KTU84P/M919UVUFNK2:user/release-keys” \
PRIVATE_BUILD_DESC=”jfltetmo-user 4.4.4 KTU84P M919UVUFNK2 release-keys”

PRODUCT_NAME := omni_jfltetmo
PRODUCT_DEVICE := jfltetmo
[/CODE]

Now make a new file called AndroidProducts.mk and put this in it:

[CODE]
#
# Copyright (C) 2011 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the “License”);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an “AS IS” BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/omni_jfltetmo.mk
[/CODE]

Now your trees are “pruned” and ready for a build! Let’s give it a try:

First Run:

[CODE]
omni6$ . build/envsetup.sh
including sdk/bash_completion/adb.bash
omni6$ brunch jfltetmo
WARNING: Trying to fetch a device that’s already there
found the jfltetmo device repo

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
TARGET_PRODUCT=omni_jfltetmo
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.16.0-73-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=MOB30M
OUT_DIR=/home/alaskalinuxuser/Documents/projects/phones/compile/omni6/out
============================================

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
TARGET_PRODUCT=omni_jfltetmo
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.16.0-73-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=MOB30M
OUT_DIR=/home/alaskalinuxuser/Documents/projects/phones/compile/omni6/out
============================================
including ./abi/cpp/Android.mk …
<<<<<<<<<<EDITED FOR SPACE>>>>>>>>>>>>>
build/core/base_rules.mk:157: *** hardware/qcom/display/msm8960/liblight: MODULE.TARGET.SHARED_LIBRARIES.lights.msm8960 already defined by device/samsung/jf-common/liblights. Stop.

real 2m42.540s
user 0m54.729s
sys 0m24.030s
[/CODE]

Not an uncommon problem, I have run into this before. You cannot have something defined twice, or make will not know who is right or wrong when they differ. So the easy fix here was to edit device/samsung/jf-common/liblights/Android.mk like so:

[CODE]
# WJH LOCAL_PATH:= $(call my-dir)
# HAL module implemenation stored in
# hw/<COPYPIX_HARDWARE_MODULE_ID>.<ro.board.platform>.so
# WJH include $(CLEAR_VARS)

# WJH LOCAL_SRC_FILES := lights.c

# WJH LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw

# WJH LOCAL_SHARED_LIBRARIES := liblog

# WJH LOCAL_MODULE := lights.msm8960

# WJH LOCAL_MODULE_TAGS := optional

# WJH include $(BUILD_SHARED_LIBRARY)
[/CODE]

So, now you are off and running! I included this first error, which showed up only 2 minutes into the build to show you that just having all the “right stuff” doesn’t mean that you will have a successfull build. Hopefully this will get you pointed in the right direction though!

Linux – Keep it simple.

 

Error: ‘memcmp’ was not declared in this scope!

Here is a problem that I occasionally come across while compiling. Since it is so common for me to see this, I would like to re-iterate an earlier post I made about this problem. Before I only mentioned it in brief, and here I would like to break it down just a little bit more. I thought I had previously gone over this in detail, but I couldn’t find it in my posts, so I decided to talk about it here.

There are ways that this problem can manifest himself, but the overall problem is that the header file “strings.h” was not included in the build. It may be something that was supposed to be declared elsewhere, or added in later, but in either event, it is not present and cannot perform the actions required. Let’s take a look at the error itself:

[CODE]
device/samsung/jf-common/gps/utils/loc_target.cpp: In function ‘unsigned int loc_get_target()’:
device/samsung/jf-common/gps/utils/loc_target.cpp:208:53: error: ‘memcmp’ was not declared in this scope
if( !memcmp(baseband, STR_AUTO, LENGTH(STR_AUTO)) )
^
device/samsung/jf-common/gps/utils/loc_target.cpp:214:51: error: ‘memcmp’ was not declared in this scope
if( !memcmp(baseband, STR_APQ, LENGTH(STR_APQ)) ){
^
make: *** [/home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libgps.utils_intermediates/loc_target.o] Error 1
make: *** Waiting for unfinished jobs….
make: Leaving directory `/home/alaskalinuxuser/Documents/projects/phones/compile/aokp6′

#### make failed to build some targets (28:01 (mm:ss)) ####
[/CODE]

What memcmp is supposed to do is compare memory areas. So the code is asking the compiler to make a memory comparison, and the compiler says it doesn’t know how! To fix this problem, you need to add this line to device/samsung/jf-common/gps/utils/loc_target.cpp:

[CODE]
#include <string.h>
[/CODE]

And then put the file string.h in the device/samsung/jf-common/gps/utils/ directory. Simple, you say, but where do I get the string.h file? That part is actually pretty simple. You can download it here: http://linux.die.net/include/string.h and save it where you need it to be. This file will also solve errors about:

strerror, strerror_r – return string describing error number
strlen – calculate the length of a string
strcpy, strncpy – copy a string
strcmp, strncmp – compare two strings
and others!

The main takeaway from this is that any “not declared in this scope” errors should be run through the http://www.die.net/search/ website to see what code pieces are missing. It will show you what header files are needed to perform that function, which is really handy!

Linux – keep it simple.

Stop: Recovery theme is not valid!

While compiling OmniRom 6.0.1 for the Samsung Galaxy S4, T-Mobile variant (JFLTETMO, SGH-M919), I ran into this problem, which halted the compiling process:

[CODE]
bootable/recovery/gui/Android.mk:127: ****************************************************************************
bootable/recovery/gui/Android.mk:128: * TW_THEME is not valid: ”
bootable/recovery/gui/Android.mk:129: * Please choose an appropriate TW_THEME or create a new one for your device.
bootable/recovery/gui/Android.mk:130: * Available themes:
bootable/recovery/gui/Android.mk:131: * landscape_hdpi landscape_mdpi portrait_hdpi portrait_mdpi watch_mdpi
bootable/recovery/gui/Android.mk:132: ****************************************************************************
bootable/recovery/gui/Android.mk:133: *** stopping. Stop.
[/CODE]

The problem appears to be that the bootable/recovery/gui/Android.mk file is expecting someone to tell it the default theme to set the recovery to. Fortunately it was kind enough to tell us the available options and the name of the variable it was expecting: TW_THEME. So, I added these two lines to the JFLTETMO BoardConfig.mk file:

[CODE]
# WJH TWRP theme options = landscape_hdpi landscape_mdpi portrait_hdpi portrait_mdpi watch_mdpi
TW_THEME := portrait_hdpi
[/CODE]

The best part was that this actually solved the problem! I really like it when the problem actually gets fixed, rather than just putting in a workaround, or removing a feature.

Linux – Keep it simple.

Error: That is already defined!

After a quick re-run of compiling OmniRom for my Samsung Galaxy S4, T-Mobile variant (JFLTETMO SGH-M919), I ran into another issue:

[CODE]
including ./hardware/qcom/display/Android.mk …
build/core/copy_headers.mk:15: warning: overriding commands for target `/home/alaskalinuxuser/Documents/projects/phones/compile/omni5/out/target/product/jfltetmo/obj/include/qcom/display/copybit.h’
build/core/copy_headers.mk:15: warning: ignoring old commands for target `/home/alaskalinuxuser/Documents/projects/phones/compile/omni5/out/target/product/jfltetmo/obj/include/qcom/display/copybit.h’
build/core/copy_headers.mk:15: warning: overriding commands for target `/home/alaskalinuxuser/Documents/projects/phones/compile/omni5/out/target/product/jfltetmo/obj/include/qcom/display/copybit_priv.h’
build/core/copy_headers.mk:15: warning: ignoring old commands for target `/home/alaskalinuxuser/Documents/projects/phones/compile/omni5/out/target/product/jfltetmo/obj/include/qcom/display/copybit_priv.h’
build/core/copy_headers.mk:15: warning: overriding commands for target `/home/alaskalinuxuser/Documents/projects/phones/compile/omni5/out/target/product/jfltetmo/obj/include/qcom/display/c2d2.h’
build/core/copy_headers.mk:15: warning: ignoring old commands for target `/home/alaskalinuxuser/Documents/projects/phones/compile/omni5/out/target/product/jfltetmo/obj/include/qcom/display/c2d2.h’
build/core/base_rules.mk:156: *** hardware/qcom/display/msm8960/liblight: MODULE.TARGET.SHARED_LIBRARIES.lights.msm8960 already defined by device/samsung/jf-common/liblights. Stop.

real 5m41.413s
user 1m59.811s
sys 0m29.481s
[/CODE]

Here the problem is that liblight is already defined in the hardware settings for qcom (which is what is at the heart of the SGH-M919), and it conflicts with the device liblights definition. The compiler is confused because there can only be one definition or object. So, to make ammends, I edited device/samsung/jf-common/liblights/Android.mk and commented out all of the lines, like so:

[CODE]
#WJH LOCAL_PATH:= $(call my-dir)
# HAL module implemenation stored in
# hw/<COPYPIX_HARDWARE_MODULE_ID>.<ro.board.platform>.so
#WJH include $(CLEAR_VARS)

#WJH LOCAL_SRC_FILES := lights.c

#WJH LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw

#WJH LOCAL_SHARED_LIBRARIES := liblog

#WJH LOCAL_MODULE := lights.msm8960

#WJH LOCAL_MODULE_TAGS := optional

#WJH include $(BUILD_SHARED_LIBRARY)
[/CODE]

I try to always insert my initials when I do an edit, so I can easily find my personal edits later. A quick word search for my own initials makes finding my changes an easy task. In this case it is important, because I may need to comment out the hardware liblights and keep the device liblights definition if that function doesn’t work in the rom. I typically try to edit or comment out the device tree changes first, before messing with the source code, to keep the source code “clean”. This way, if those code changes work, I can copy this tree to another source to build it as well, provided they work. Let’s give it another run and see what happens.

Linux – Keep it simple.

Error: No resource found that matches the given name

Well, as I continue to attempt to build OmniRom 5 for the Samsung Galaxy S4, T-Mobile Variant (JFLTETMO SGH-M919), I encountered this error:

[CODE]
frameworks/base/packages/SystemUI/AndroidManifest.xml:328: error: Error: No resource found that matches the given name (at ‘icon’ with value ‘@*android:drawable/ic_shortcut_action_theme_switch’).

frameworks/base/packages/SystemUI/AndroidManifest.xml:340: error: Error: No resource found that matches the given name (at ‘icon’ with value ‘@*android:drawable/ic_shortcut_action_theme_switch’).

make: *** [/home/alaskalinuxuser/Documents/projects/phones/compile/omni5/out/target/common/obj/APPS/SystemUI_intermediates/src/R.stamp] Error 1
make: *** Waiting for unfinished jobs….
[/CODE]

After some review, I realized that the icon called for in frameworks/base/packages/SystemUI/AndroidManifest.xml:328 and 340 was not in the res/drawable folder. So I chose a different icon in that folder and edited both of those lines to say:

android:icon=”@*android:drawable/ic_sysbar_theme_switch”

That will allow it to continue, but it may look funny in real life, depending on the icon missing and the replacement that was chosen. We will have to wait and see on that once it builds! You could also look around online or in other source to find an appropriate icon to put in it’s place, but that could turn into a really time consuming task, depending on what you are looking for.

Linux – Keep it simple.

Error: No rule to make target export_includes….

While I was compiling OmniRom for my T-mobile Samsung Galaxy S4 (JFLTETMO SGH-M919), I ran into this common error:

[CODE]
/obj/SHARED_LIBRARIES/libinputflinger_intermediates/export_includes
make: *** No rule to make target `/home/alaskalinuxuser/Documents/projects/phones/compile/omni5/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libmedia_intermediates/export_includes’, needed by `/home/alaskalinuxuser/Documents/projects/phones/compile/omni5/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/import_includes’. Stop.
mkdir /home/alaskalinuxuser/Documents/projects/phones/compile/omni5/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libmedia_intermediates
touch /home/alaskalinuxuser/Documents/projects/phones/compile/omni5/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libmedia_intermediates/export_includes
[/CODE]

Often during the compiling process, some file making process is supposed to output a file (export_icludes) that needs to be imported somewhere else (import_includes). The idea behind these files, as far as I can tell, is a sort of baton pass of information. If you take a look at these files, most of them are empty, because they don’t actually need to pass on any information. Sometimes, however, they do have a piece of code or other pertinant information that is used by the next make process to build something.

There are four ways that I know of to fix this problem. The BEST way to fix this problem would be to review the code (.cpp, header files, etc.) and tell the offending party to output a proper export_includes file. The CLEAN way to fix this problem is to edit the code of the import_includes file to quit asking for that export_includes file. A QUICK way to fix this problem is to copy the needed file from some other build of the same device, so it will hopefully include the right information. The DIRTY FIX is to simply create the folder needed, and put an empty file in there named export_includes.

So, I used the ‘dirty fix’ of simply creating an empty file at that location by that name. Esentially I am saying to the next part of the compilation that there was no information from the previous part to pass on. If that is true, then it should work. If that is not true, but the information is irrelevant, then it still should work. If it is not true and the information is relevant, then there will be problems, to be sure!

$ mkdir /home/alaskalinuxuser/Documents/projects/phones/compile/omni5/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libmedia_intermediates

$ touch /home/alaskalinuxuser/Documents/projects/phones/compile/omni5/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libmedia_intermediates/export_includes

Provided that no information actually did need to get passed on, then this is acceptable. It would be better, however, to fix the code to add the needed lines to create the said file automatically during the compiler process with all the proper information. In keeping with my “keep it simple” motto, I am opting not to do that.

Linux – Keep it simple.

OmniRom boot animation

Boot animations are the logo, picture, or movie that plays as your Android phone boots up.

Here is a simple boot animation that I made for OmniRom. It has an old school 1985 feel to it.

It is 1080×1920 resolution.

Be sure to rename it bootanimation.zip and put it in /system/media in place of the original file. You can rename the original to bootanimation.bak, if you want to save it for later.

External download link:
http://www.mediafire.com/download/17…/omniamped.zip

And a link to the animated gif, if you want to preview it on your computer:
http://www.mediafire.com/view/36kgdr…/omniamped.gif

Linux – Keep it simple.

Add cool Omni ascii graphics to your updater-script, the easy way!

NOTE: THE FONT CHOICES IN YOUR BROWSER MAY NOT PRESENT THE ASCII TEXT PROPERLY. IF YOU COPY AND PASTE THE ASCII TEXT TO NOTEPAD, MOUSEPAD, OR GEDIT, THEY WILL SHOW UP PROPERLY. THESE ASCII GRAPHICS WILL LOOK RIGHT ON YOUR PHONE IF ADDED TO YOUR UPDATER-SCRIPT.

I’ve noticed that most rom updater scripts (the script that handles installation during TWRP install) usually don’t have much by way of appeal. Actually, most of the time, the script is not even informative to what is truly happening on the phone at the moment, but that is a subject for another time.

One of the great things about the updater-script, is you can add notes for it to print on the screen. This would be a useful way to keep people up to date about what is going on. Another way to use this, however, is to add some class to your rom install script by adding some ascii text that resembles a picture.

Now before you get flustered at the thought of trying to draw your own ascii art, keep in mind that there are some really great programs to do that for you. A really simple program for Ubuntu/Debian computers is a program called jp2a.

To get it, use

$sudo apt-get install jp2a

After installing, then you can create your graphics by simple command line options. Find a picture that you want to use, and then ascii it!

$jp2a nameofyourpicture.jpg

The terminal window will convert your picture into ascii text. You may have to play with the window size of your terminal in order to get the correct size of your outputted image. There are a lot of options, which you can see with:

$jp2a –help

I used jp2a on several OmniRom logos to make these examples.
Here are some examples that I added the taglines to, so you can just drop them into your updater-script:

OmniRom

Code:
ui_print("      ':oddddddddddddddddddddddddo;.      ");
ui_print("    ;dkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkd,    ");
ui_print("  .dkkkkkd:;;;;;;;;;;;;;;;;;;;;:dkkkkko.  ");
ui_print("  dkkkko.                        .dkkkko  ");
ui_print(" .kkkkk.                          .kkkkk. ");
ui_print(" .kkkkk.                          .kkkkk. ");
ui_print(" .kkkkk.                          .kkkkk. ");
ui_print(" .kkkkk.   .                  .   .kkkkk. ");
ui_print(" .kkkkk.  'xl                lx'  .kkkkk. ");
ui_print(" .kkkkk.   .do. ..';;;;'.. .od.   .kkkkk. ");
ui_print(" .kkkkk.   .:kxkkkkkkkkkkkkxk:.   .kkkkk. ");
ui_print(" .kkkkk. .lkkkkkkkkkkkkkkkkkkkkl. .kkkkk. ");
ui_print(" .kkkkk,lkkkklokkkkkkkkkkkkolkkkkl,kkkkk. ");
ui_print(" .kkkkkkkkkkk[]kkkkkkkkkkkk[]kkkkkkkkkkk. ");
ui_print("  dkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkko  ");
ui_print("  .okkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkl.  ");
ui_print("    'okkkkkkkkkkkkkkkkkkkkkkkkkkkkkko'    ");
ui_print("      .;lllllllllllllllllllllllllll.      ");

OmniRom Inverted

Code:
ui_print("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");
ui_print("MMMMMMMMMWNNNNNNNNNNNNNNNNNNNNNNWMMMMMMMMM");
ui_print("MMMMMMKdc;,,,,,,,,,,,,,,,,,,,,,,;ldKMMMMMM");
ui_print("MMMM0c,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,l0MMMM");
ui_print("MMWd,,,,,cx0KKKKKKKKKKKKKKKKKK0xc,,,,;kMMM");
ui_print("MM0,,,,,kWMMMMMMMMMMMMMMMMMMMMMMWx,,,,;0MM");
ui_print("MMO,,,,cWMMMMMMMMMMMMMMMMMMMMMMMMMc,,,,OMM");
ui_print("MMO,,,,lMMMMMMMMMMMMMMMMMMMMMMMMMMl,,,,OMM");
ui_print("MMO,,,,lMMMMMMMMMMMMMMMMMMMMMMMMMMl,,,,OMM");
ui_print("MMO,,,,lMMWxkWMMMMMMMMMMMMMMWkxWMMl,,,,OMM");
ui_print("MMO,,,,lMMMk,dWMMMMNNNNMMMMWd,xMMMl,,,,OMM");
ui_print("MMO,,,,lMMMM0;cdoc:,,,,:codc;0MMMMl,,,,OMM");
ui_print("MMO,,,,lMMXd:,,,,,,,,,,,,,,,,:dXMMl,,,,OMM");
ui_print("MMO,,,,lKo,,,,;,,,,,,,,,,,,;,,,,oKl,,,,OMM");
ui_print("MMO,,,,;;,,,,o0:,,,,,,,,,,:0o,,,,;;,,,,OMM");
ui_print("MM0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;0MM");
ui_print("MMMk;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;OMMM");
ui_print("MMMMKl,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,lKMMMM");
ui_print("MMMMMMXxc:::::::::::::::::::::::::dXMMMMMM");
ui_print("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");
ui_print("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");

OmniRom black and white and then inverted

Code:
ui_print("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");
ui_print("MMMMMMMMMWNNNNNNNNNNNNNNNNNNNNNNWMMMMMMMMM");
ui_print("MMMMMM0l.                        'lKMMMMMM");
ui_print("MMMMO'                              ,OMMMM");
ui_print("MMWl     'oO000000000000000000Oo.     dMMM");
ui_print("MMk     dWMMMMMMMMMMMMMMMMMMMMMMWd     0MM");
ui_print("MMx    'WMMMMMMMMMMMMMMMMMMMMMMMMM,    kMM");
ui_print("MMk    ,MMMMMMMMMMMMMMMMMMMMMMMMMM,    kMM");
ui_print("MMk    ,MMMMMMMMMMMMMMMMMMMMMMMMMM,    kMM");
ui_print("MMk    ,MMWddWMMMMMMMMMMMMMMWxoWMM,    kMM");
ui_print("MMk    ,MMMd cWMMMMNNNNMMMMWc oMMM,    kMM");
ui_print("MMk    ,MMMMO.'c;..    ..;c'.0MMMM,    kMM");
ui_print("MMk    ,MMKc.                .cKMM,    kMM");
ui_print("MMk    ,K:                      ;0,    kMM");
ui_print("MMk          :0:.          .0:          kMM");
ui_print("MMO                                    OMM");
ui_print("MMMd                                  xMMM");
ui_print("MMMM0;                              ;KMMMM");
ui_print("MMMMMMKo'.........................lXMMMMMM");
ui_print("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");
ui_print("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");

So, as you can see in this example, here is an updater script that has the ascii art as an image that shows up at the start of loading the rom. You really could put it anywhere.

Code:
show_progress(1.34, 65);
ui_print("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");
ui_print("MMMMMMMMMWNNNNNNNNNNNNNNNNNNNNNNWMMMMMMMMM");
ui_print("MMMMMM0l.                        'lKMMMMMM");
ui_print("MMMMO'                              ,OMMMM");
ui_print("MMWl     'oO000000000000000000Oo.     dMMM");
ui_print("MMk     dWMMMMMMMMMMMMMMMMMMMMMMWd     0MM");
ui_print("MMx    'WMMMMMMMMMMMMMMMMMMMMMMMMM,    kMM");
ui_print("MMk    ,MMMMMMMMMMMMMMMMMMMMMMMMMM,    kMM");
ui_print("MMk    ,MMMMMMMMMMMMMMMMMMMMMMMMMM,    kMM");
ui_print("MMk    ,MMWddWMMMMMMMMMMMMMMWxoWMM,    kMM");
ui_print("MMk    ,MMMd cWMMMMNNNNMMMMWc oMMM,    kMM");
ui_print("MMk    ,MMMMO.'c;..    ..;c'.0MMMM,    kMM");
ui_print("MMk    ,MMKc.                .cKMM,    kMM");
ui_print("MMk    ,K:                      ;0,    kMM");
ui_print("MMk          :0:.          .0:          kMM");
ui_print("MMO                                    OMM");
ui_print("MMMd                                  xMMM");
ui_print("MMMM0;                              ;KMMMM");
ui_print("MMMMMMKo'.........................lXMMMMMM");
ui_print("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");
ui_print("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");
ui_print("Formatting /system");
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
ui_print("Mounting /system");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
ui_print("Extracting /system");
package_extract_dir("system", "/system");
ui_print("Creating symbolic links");
symlink("../xbin/su", "/system/bin/su");
symlink("/firmware-mdm/image/acdb.mbn", "/system/etc/firmware/acdb.mbn");
symlink("/firmware-mdm/image/apps.mbn", "/system/etc/firmware/apps.mbn");
symlink("/firmware-mdm/image/dsp1.mbn", "/system/etc/firmware/dsp1.mbn");
********************etc*********************************************************
set_metadata("/system/xbin/su", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
ui_print("Unmounting /system");
unmount("/system");
ui_print("Installation complete.");

I’d like to take it one step further: Rather than a progress bar, or along with a progress bar, you could create a line by line fill in picture. Here is an example of an updater-script with this concept:

 

Code:
ui_print("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");
show_progress(1.34, 65);
ui_print("MMMMMMMMMWNNNNNNNNNNNNNNNNNNNNNNWMMMMMMMMM");
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
ui_print("MMMMMM0l.                        'lKMMMMMM");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
ui_print("MMMMO'                              ,OMMMM");
package_extract_dir("system", "/system");
ui_print("MMWl     'oO000000000000000000Oo.     dMMM");
symlink("../xbin/su", "/system/bin/su");
symlink("/firmware-mdm/image/acdb.mbn", "/system/etc/firmware/acdb.mbn");
symlink("/firmware-mdm/image/apps.mbn", "/system/etc/firmware/apps.mbn");
symlink("/firmware-mdm/image/dsp1.mbn", "/system/etc/firmware/dsp1.mbn");
symlink("/firmware-mdm/image/dsp2.mbn", "/system/etc/firmware/dsp2.mbn");
symlink("/firmware-mdm/image/dsp3.mbn", "/system/etc/firmware/dsp3.mbn");
symlink("/firmware-mdm/image/efs1.mbn", "/system/etc/firmware/efs1.mbn");
symlink("/firmware-mdm/image/efs2.mbn", "/system/etc/firmware/efs2.mbn");
symlink("/firmware-mdm/image/efs3.mbn", "/system/etc/firmware/efs3.mbn");
symlink("/firmware-mdm/image/mdm_acdb.img", "/system/etc/firmware/mdm_acdb.img");
symlink("/firmware-mdm/image/rpm.mbn", "/system/etc/firmware/rpm.mbn");
symlink("/firmware-mdm/image/sbl1.mbn", "/system/etc/firmware/sbl1.mbn");
symlink("/firmware-mdm/image/sbl2.mbn", "/system/etc/firmware/sbl2.mbn");
symlink("/firmware/image/q6.b00", "/system/etc/firmware/q6.b00");
symlink("/firmware/image/q6.b01", "/system/etc/firmware/q6.b01");
symlink("/firmware/image/q6.b03", "/system/etc/firmware/q6.b03");
symlink("/firmware/image/q6.b04", "/system/etc/firmware/q6.b04");
symlink("/firmware/image/q6.b05", "/system/etc/firmware/q6.b05");
symlink("/firmware/image/q6.b06", "/system/etc/firmware/q6.b06");
symlink("/firmware/image/q6.mdt", "/system/etc/firmware/q6.mdt");
ui_print("MMk     dWMMMMMMMMMMMMMMMMMMMMMMWd     0MM");
symlink("/firmware/image/tzapps.b00", "/system/etc/firmware/tzapps.b00");
symlink("/firmware/image/tzapps.b01", "/system/etc/firmware/tzapps.b01");
symlink("/firmware/image/tzapps.b02", "/system/etc/firmware/tzapps.b02");
symlink("/firmware/image/tzapps.b03", "/system/etc/firmware/tzapps.b03");
symlink("/firmware/image/tzapps.mdt", "/system/etc/firmware/tzapps.mdt");
symlink("/firmware/image/vidc.b00", "/system/etc/firmware/vidc.b00");
symlink("/firmware/image/vidc.b01", "/system/etc/firmware/vidc.b01");
symlink("/firmware/image/vidc.b02", "/system/etc/firmware/vidc.b02");
symlink("/firmware/image/vidc.b03", "/system/etc/firmware/vidc.b03");
symlink("/firmware/image/vidc.mdt", "/system/etc/firmware/vidc.mdt");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
ui_print("MMx    'WMMMMMMMMMMMMMMMMMMMMMMMMM,    kMM");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
        "/system/xbin/adjtimex", "/system/xbin/arp", "/system/xbin/ash",
        "/system/xbin/awk", "/system/xbin/base64", "/system/xbin/basename",
        "/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
        "/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat",
        "/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat",
        "/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chgrp",
        "/system/xbin/chmod", "/system/xbin/chown", "/system/xbin/chroot",
        "/system/xbin/clear", "/system/xbin/cmp", "/system/xbin/comm",
        "/system/xbin/cp", "/system/xbin/cpio", "/system/xbin/crond",
        "/system/xbin/crontab", "/system/xbin/cut", "/system/xbin/date",
        "/system/xbin/dc", "/system/xbin/dd", "/system/xbin/depmod",
        "/system/xbin/devmem", "/system/xbin/df", "/system/xbin/diff",
        "/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd",
        "/system/xbin/dos2unix", "/system/xbin/du", "/system/xbin/echo",
        "/system/xbin/ed", "/system/xbin/egrep", "/system/xbin/env",
        "/system/xbin/expand", "/system/xbin/expr", "/system/xbin/false",
        "/system/xbin/fbsplash", "/system/xbin/fdisk", "/system/xbin/fgrep",
        "/system/xbin/find", "/system/xbin/flash_lock",
        "/system/xbin/flash_unlock", "/system/xbin/flashcp",
        "/system/xbin/flock", "/system/xbin/fold", "/system/xbin/free",
        "/system/xbin/freeramdisk", "/system/xbin/fstrim", "/system/xbin/fsync",
        "/system/xbin/ftpget", "/system/xbin/ftpput", "/system/xbin/fuser",
        "/system/xbin/getopt", "/system/xbin/grep", "/system/xbin/groups",
        "/system/xbin/gunzip", "/system/xbin/gzip", "/system/xbin/halt",
        "/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
        "/system/xbin/ifconfig", "/system/xbin/inetd", "/system/xbin/insmod",
        "/system/xbin/install", "/system/xbin/ionice", "/system/xbin/iostat",
        "/system/xbin/ip", "/system/xbin/kill", "/system/xbin/killall",
        "/system/xbin/killall5", "/system/xbin/less", "/system/xbin/ln",
        "/system/xbin/losetup", "/system/xbin/ls", "/system/xbin/lsattr",
        "/system/xbin/lsmod", "/system/xbin/lsusb", "/system/xbin/lzcat",
        "/system/xbin/lzma", "/system/xbin/lzop", "/system/xbin/lzopcat",
        "/system/xbin/man", "/system/xbin/md5sum", "/system/xbin/mesg",
        "/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
        "/system/xbin/mkfs.ext2", "/system/xbin/mkfs.vfat",
        "/system/xbin/mknod", "/system/xbin/mkswap", "/system/xbin/mktemp",
        "/system/xbin/modinfo", "/system/xbin/modprobe", "/system/xbin/more",
        "/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mpstat",
        "/system/xbin/mv", "/system/xbin/nanddump", "/system/xbin/nandwrite",
        "/system/xbin/nbd-client", "/system/xbin/netstat", "/system/xbin/nice",
        "/system/xbin/nohup", "/system/xbin/nslookup", "/system/xbin/ntpd",
        "/system/xbin/od", "/system/xbin/patch", "/system/xbin/pgrep",
        "/system/xbin/pidof", "/system/xbin/ping", "/system/xbin/pipe_progress",
        "/system/xbin/pkill", "/system/xbin/pmap", "/system/xbin/poweroff",
        "/system/xbin/printenv", "/system/xbin/printf", "/system/xbin/ps",
        "/system/xbin/pstree", "/system/xbin/pwd", "/system/xbin/pwdx",
        "/system/xbin/rdev", "/system/xbin/readlink", "/system/xbin/realpath",
        "/system/xbin/renice", "/system/xbin/reset", "/system/xbin/resize",
        "/system/xbin/rev", "/system/xbin/rm", "/system/xbin/rmdir",
        "/system/xbin/rmmod", "/system/xbin/route", "/system/xbin/run-parts",
        "/system/xbin/rx", "/system/xbin/sed", "/system/xbin/seq",
        "/system/xbin/setconsole", "/system/xbin/setserial",
        "/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
        "/system/xbin/sha256sum", "/system/xbin/sha3sum",
        "/system/xbin/sha512sum", "/system/xbin/sleep", "/system/xbin/sort",
        "/system/xbin/split", "/system/xbin/stat", "/system/xbin/strings",
        "/system/xbin/stty", "/system/xbin/sum", "/system/xbin/swapoff",
        "/system/xbin/swapon", "/system/xbin/sync", "/system/xbin/sysctl",
        "/system/xbin/tac", "/system/xbin/tail", "/system/xbin/tar",
        "/system/xbin/taskset", "/system/xbin/tee", "/system/xbin/telnet",
        "/system/xbin/telnetd", "/system/xbin/test", "/system/xbin/tftp",
        "/system/xbin/tftpd", "/system/xbin/time", "/system/xbin/timeout",
        "/system/xbin/top", "/system/xbin/touch", "/system/xbin/tr",
        "/system/xbin/traceroute", "/system/xbin/true", "/system/xbin/ttysize",
        "/system/xbin/tune2fs", "/system/xbin/umount", "/system/xbin/uname",
        "/system/xbin/uncompress", "/system/xbin/unexpand", "/system/xbin/uniq",
        "/system/xbin/unix2dos", "/system/xbin/unlzma", "/system/xbin/unlzop",
        "/system/xbin/unxz", "/system/xbin/unzip", "/system/xbin/uptime",
        "/system/xbin/usleep", "/system/xbin/uudecode", "/system/xbin/uuencode",
        "/system/xbin/vi", "/system/xbin/watch", "/system/xbin/wc",
        "/system/xbin/wget", "/system/xbin/which", "/system/xbin/whoami",
        "/system/xbin/xargs", "/system/xbin/xz", "/system/xbin/xzcat",
        "/system/xbin/yes",
        "/system/xbin/zcat");
ui_print("MMk    ,MMMMMMMMMMMMMMMMMMMMMMMMMM,    kMM");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("logcat", "/system/bin/logdog", "/system/bin/lolcat",
        "/system/bin/loldog");
ui_print("MMk    ,MMMMMMMMMMMMMMMMMMMMMMMMMM,    kMM");
symlink("mksh", "/system/bin/sh");
symlink("mount.exfat", "/system/bin/fsck.exfat",
        "/system/bin/mkfs.exfat");
symlink("pigz", "/system/xbin/unpigz");
ui_print("MMk    ,MMWddWMMMMMMMMMMMMMMWxoWMM,    kMM");
symlink("toolbox", "/system/bin/cat", "/system/bin/chcon",
        "/system/bin/chmod", "/system/bin/chown", "/system/bin/clear",
        "/system/bin/cmp", "/system/bin/cp", "/system/bin/date",
        "/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
        "/system/bin/du", "/system/bin/getenforce", "/system/bin/getevent",
        "/system/bin/getprop", "/system/bin/getsebool", "/system/bin/grep",
        "/system/bin/hd", "/system/bin/id", "/system/bin/ifconfig",
        "/system/bin/iftop", "/system/bin/insmod", "/system/bin/ioctl",
        "/system/bin/ionice", "/system/bin/kill", "/system/bin/ln",
        "/system/bin/load_policy", "/system/bin/log", "/system/bin/ls",
        "/system/bin/lsmod", "/system/bin/lsof", "/system/bin/md5",
        "/system/bin/mkdir", "/system/bin/mkswap", "/system/bin/mount",
        "/system/bin/mv", "/system/bin/nandread", "/system/bin/netstat",
        "/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
        "/system/bin/ps", "/system/bin/r", "/system/bin/readlink",
        "/system/bin/renice", "/system/bin/restart", "/system/bin/restorecon",
        "/system/bin/rm", "/system/bin/rmdir", "/system/bin/rmmod",
        "/system/bin/route", "/system/bin/runcon", "/system/bin/schedtop",
        "/system/bin/sendevent", "/system/bin/setconsole",
        "/system/bin/setenforce", "/system/bin/setfattr", "/system/bin/setprop",
        "/system/bin/setsebool", "/system/bin/sleep", "/system/bin/smd",
        "/system/bin/start", "/system/bin/stop", "/system/bin/swapoff",
        "/system/bin/swapon", "/system/bin/sync", "/system/bin/top",
        "/system/bin/touch", "/system/bin/umount", "/system/bin/uptime",
        "/system/bin/vmstat", "/system/bin/watchprops",
        "/system/bin/wipe");
ui_print("MMk    ,MMMd cWMMMMNNNNMMMMWc oMMM,    kMM");
set_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
ui_print("MMk    ,MMMMO.'c;..    ..;c'.0MMMM,    kMM");
set_metadata("/system/bin/app_process", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
set_metadata("/system/bin/efsks", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:kickstart_exec:s0");
set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
set_metadata("/system/bin/ks", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:kickstart_exec:s0");
set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
ui_print("MMk    ,MMKc.                .cKMM,    kMM");
set_metadata("/system/bin/mksh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
set_metadata("/system/bin/ping", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ping_exec:s0");
set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
set_metadata("/system/bin/qcks", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:kickstart_exec:s0");
set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
set_metadata("/system/bin/rild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rild_exec:s0");
set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0xc0, "selabel", "u:object_r:runas_exec:s0");
set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
ui_print("MMk    ,K:                      ;0,    kMM");
set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
set_metadata_recursive("/system/etc/dhcpcd", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
ui_print("MMk          :eek:.          .O:          kMM");
set_metadata_recursive("/system/etc/init.d", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/init.d", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/install-recovery.sh", "uid", 0, "gid", 0, "mode", 0544, "capabilities", 0x0);
set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", 0x0, "selabel", "u:object_r:ppp_system_file:s0");
set_metadata("/system/recovery-from-boot.p", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0);
set_metadata("/system/vendor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/firmware", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/lib/drm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
ui_print("MMO                                    OMM");
set_metadata("/system/vendor/lib/drm/libdrmwvmplugin.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/egl", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/lib/hw", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/hw/power.msm8960.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
ui_print("MMMd                                  xMMM");
set_metadata_recursive("/system/vendor/lib/mediadrm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/mediadrm/libwvdrmengine.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
ui_print("MMMM0;                              ;KMMMM");
set_metadata("/system/xbin/librank", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/procmem", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/procrank", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/su", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
ui_print("MMMMMMKo'.........................lXMMMMMM");
unmount("/system");
ui_print("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");
ui_print("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");

So, as it performs the loading actions, it also draws your picture!

Either way, I hope you are inspired to add some flare to your rom updater-script. Adding these little touches to your rom shows others that you are into the details. Enjoy!

Linux – Keep it simple.