Video Tutorial on How to Compile Android and Modify Kernels

video

For those interested, I have just posted a video tutorial series on XDA for building Android Oreo, Nougat, Marshmallow, and Lollipop on 5 different phones, the emulator, and 5 different ROMs. Also included are custom kernel editing, adding apps, changing source code, backgrounds, and more. Here’s what I posted:

From XDA: https://forum.xda-developers.com/android/general/guide-how-to-build-custom-roms-kernel-t3814251

===========================================================================

Praise God! Finally a video tutorial of how to build Android and modify kernels!

I have created a video tutorial and guide for how to compile Android, from Lollipop through Marshmallow, Nougat, and Oreo. The video series covers several different phones, the emulator, kernel and rom editing, app source code editing, and much more!

Who is this video series for?
Well, this video tutorial is a step by step guide built primarily for the beginner. This is written for those who already know how to flash TWRP, CWM, or the like, and who have installed a custom rom before. This is designed to help those who are ready to move up from flashing and installing other peoples custom rom to actually start making their own custom roms. I recommend that a beginner watch the entire series in numerical/alphabetical order (the videos are marked).

That said, I believe that an intermediate developer may find a useful trick here and there, and they should just skip ahead to videos of interest. Perhaps kernel development, or something along those lines.

An advanced rom/kernel developer will probably far exceed my feeble abilities, and will not likely find much useful information here. Perhaps if you are an advanced developer, you would consider continuing the tutorial or making an advanced video series! (See further posts for recommendations on contributing videos.)

Why did you put this together?
Well, after building roms for several different devices, I started receiving requests from users who wanted to start building their own roms, but didn’t know how. I didn’t have enough time to answer everyones questions, so I wrote a few guides, pointed others to guides that were available, but there are some things that you just need to see to understand. Hence, the video tutorial. I just hope that someone finds it useful.

This course was written in order! While Lollipop and Marshmallow are old by today’s standards, there is still good learning value in building them, and there are topics covered there that really make them worth watching.

What’s in the videos?
During the series, we will be building for the emulator, as well as 5 different phones of various brands, and 5 different roms. I hope that this will give the viewer a good idea of how to build for their own specific phone as they see the differences and similarities across the phones and custom roms.

[CODE]
+ Ubuntu installation
+ Java installations
+ Using Git, GitHub, GitKraken, and the command line
+ Fastboot and ADB
+ Heimdall/Odin
+ QFIL, QPST, SALT, and other tools
+ AOSP, SlimRoms, PACrom, AOKP, AOSCP
+ Lollipop, Marshmallow, Nougat, Oreo
+ Errors
+ Overclocking CPU/GPU
+ Adding Governors and I/O Schedulers
+ Sound modifications
+ Changing app colors, text, and icons
+ Adding prebuilt apps
+ Adding source code
+ Converting device from one rom to another
+ AND MORE!
[/CODE]

**** This is an UNOFFICIAL TUTORIAL. Use at your own risk! ****
Download links:
Ogg Vorbis Video GitLab:
[url]https://gitlab.com/alaskalinuxuser/course_android_developer_guide[/url]
Clicking on a video in GitLab will allow you to watch it online.

Ogg Vorbis Video Downloads:
[url]https://gitlab.com/alaskalinuxuser/course_android_developer_guide/-/archive/master/course_android_developer_guide-master.zip[/url]
This download is rather large due to the multiple videos.

MP4 Video GitLab:
[url]https://gitlab.com/alaskalinuxuser/course_android_developer_guide_mp4[/url]
Clicking on a video in GitLab will allow you to watch it online.

MP4 Video Downloads:
[url]https://gitlab.com/alaskalinuxuser/course_android_developer_guide_mp4/-/archive/master/course_android_developer_guide_mp4-master.zip[/url]
This download is rather large due to the multiple videos.

I also have several written guides available on XDA, here are a few:

Building ROMs for the Galaxy Note Edge: [url]https://forum.xda-developers.com/note-edge/general/guide-build-aosp-roms-kernels-note-edge-t3488840[/url]
Building ROMs for the Galaxy S4: [url]https://forum.xda-developers.com/galaxy-s4-tmobile/general/guide-step-step-instructions-building-t3402637[/url]

===========================================================================

Be sure to check out the videos or the XDA thread! I hope that these will help some of the aspiring Android developers out there!

Linux – keep it simple.

SlimRoms 7.1.2 on the H811 LG G4!

Praise God! My SlimRoms Nougat ROM for the LG G4 H811 is finally working!

It’s always fun to try building for a new device, but this one was particularly interesting, as it was my first non-Samsung build! Not to mention the 64 bit arch, which just makes the learning process all that much more fun! Be sure to give it a try, you can find it on XDA, or here on my site under “Homemade Roms” from the title bar menu.

Linux – keep it simple.

Fixing the blank developer settings on SlimRoms Nougat

After building SlimRoms Nougat for the H811 (LG G4 T-Mobile), I ran into an odd artifact: when you enabled and opened the developer settings, it would be blank, or crash. I had absolutely no idea why that would be, nor where to begin looking into a fix.

So, I hopped over to SlimRoms’ gerrit: https://review.slimroms.org/#/q/status:merged

Once there, I looked at merged (accepted or fixed) labels, and typed “developer” in the search box. A lot of things came up, but there was a noticeable trend among the contenders, a crash or ANR report when opening the developer settings.

In every case they used the same fix, so I decided to give it a try. It looks like the common factor in every case was the FRP, or factory reset protection in the system.prop files for the devices. I took a look at mine:

# Factory Reset Protection
PRODUCT_PROPERTY_OVERRIDES += \
ro.frp.pst=/dev/block/bootdevice/by-name/persistent

and edited them as such (just commented out) :

# Factory Reset Protection
# PRODUCT_PROPERTY_OVERRIDES += \
# ro.frp.pst=/dev/block/bootdevice/by-name/persistent
# WJH commented out as this prevents the developer options from opening.

And it was fixed! It’s great when the fix is so easy!

Linux – keep it simple!

SlimRoms Nougat on the Samsung Galaxy S4!

c774d6876b42e5a01b482e16834b62e5
To God be the glory, my Slim7 Nougat project finally works!

This is a very slimmed down version of Android Nougat, almost a “vanilla” experience with a few tasteful perks! By design, this ROM comes without root for those who wish to have a “pure” version without the entanglements that come with root, but it can also be easily rooted by using chainfire’s SuperSU (see below). In it’s default form, it is perfect for those banking apps, workplaces, and games that require you to have a phone without root. No need for tricks or hacks, all while having the latest and greatest Android on your Samsung Galaxy S4.

If you do decide to use root, then you will be pleasently surprised to know that Substratum and layering works with this ROM. While not every part gets updated, for the most part it functions quite well in my initial testing.

**** This is an UNOFFICIAL ROM. Install at your own risk! ****

Main Features:

-Merged with android-7.1.1_r13
-SlimDim, now with 100% more dimming
-SlimAction, Splits screen action
-SlimRecents, an alternative recents
-Notification log (longpress statusbar header)
-Kill app from notification (long pres app notification)
-Substratum support (if rooted)
-OmniSwitcher built in so the kill function works with or without root.

Be sure to grab it from my Homemade roms page, or jump on XDA here:
https://forum.xda-developers.com/galaxy-s4-tmobile/development/rom-slimroms-n-t3540474

You will also need SuperSU if you want it rooted.
SuperSU:
https://download.chainfire.eu/1001/S%E2%80%A6perSU-v2.78-20
OR
http://www.mediafire.com/file/xzqu7dgmk7ob5e7/UPDATE-SuperSU-v2.78-20160905010000.zip

And you can download my kernel from the Homemade Kernel page, or grab it off of XDA:
https://forum.xda-developers.com/galaxy-s4-tmobile/development/kernel-nougat-kernels-t3492592

!!!FIRST BOOT TAKES LONGER THAN 5 EARTH MINUTES TO COMPLETE!!!
!!!IF YOU FLASH SUPERSU, IT WILL REBOOT SEVERAL TIMES DURING INSTALL, THAT IS OKAY!!!

Installation instructions:

-Download ROM, and if desired, SuperSU, AKLU kernel, and gapps, and put them on your phone’s external storage.
-Reboot into recovery mode – TWRP (I personally installed this using 3.0.2-0).
-Backup what you had. (Just to be safe.)
-Wipe. (I personally wipe everything prior to flashing new roms, but at least do the basic wipe.)
-Install Rom.
-Install Gapps. – Optional
–> OPTIONAL – If you want to install SuperSU, let the ROM boot up once first, then go back to TWRP and flash SuperSU zip. If it is stuck in a boot loop continually (it boot loops 1 to 4 times normally) then go back to TWRP and wipe cache and try again.
-Reboot to system and enjoy!

-OPTIONAL – After first boot, then go back to recovery and install the AKLU kernel.

Here are some pictures:

Linux – keep it simple.

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.

Compile SlimRoms 6.0 for the Samsung Galaxy S4 T-mobile variant (JFLTETMO SGH-M919)

The continuing saga of compiling SlimRoms 6.0 for the T-mobile Samsung Galaxy S4….

To God be the glory! Today there was some good progress! As you can see, the rom compiled, as usual:

[CODE]
/home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/slim_jfltetmo-ota-a37a47bb2a.zip
done.
_______________________________________________
/ http://www.slimroms.org |
/ _____________________________________________|
/ /
/ / _ _ ______
/ / | |(_) (_____ \
/ / | | _ _____ _____) )___ _____ ___
_____________________/ / | || | | __ // _ \| |/___)
| / | || | | | | | \ \ |_| | | | |___ |
|_______________________/ \_)_|_|_|_|_| |_\___/|_|_|_(___/

Package Complete: /home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/Slim-jfltetmo-6.0.1.alpha.0.1-UNOFFICIAL-20160601-0744.zip
make: Leaving directory `/home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6′

#### make completed successfully (46:39 (mm:ss)) ####
[/CODE]

The bonus, however, was that it actually booted! Well, mostly. At first, I thought that the phone was stuck in a continuous boot loop, so I took a logcat over adb through the usb. The log is really long, but here are some of the error excerpts:

[CODE]
…..
06-01 17:34:23.070 235 235 E mm-camera: qcamsvr_load_gesture_lib Error opening gesture library
…..
06-01 17:34:23.233 257 257 D QC-time-services: Daemon:genoff_pre_init::Base = 13
06-01 17:34:23.233 257 257 D QC-time-services: Daemon: Storage Name: ats_13
06-01 17:34:23.233 257 257 D QC-time-services: Daemon:Opening File: /data/time/ats_13
06-01 17:34:23.233 257 257 D QC-time-services: Daemon:time_persistent_memory_opr:Genoff Read operation
06-01 17:34:23.233 257 257 D QC-time-services: Daemon:Unable to open filefor read
06-01 17:34:23.233 257 257 D QC-time-services: Daemon:genoff_post_init:Error in accessing storage
…..
06-01 17:34:24.228 251 251 W JniInvocation: Falling back from libart to libart.so after dlopen error: dlopen failed: library “libart” not found
…..
06-01 17:34:25.352 239 239 E kickstart-qcks: ERROR: ks return code was 11, something failed
…..
06-01 17:34:30.021 244 244 E ACDB-LOADER: Error: ACDB AudProc vol returned = -8
…..
06-01 17:35:08.232 761 761 D idmap : error: no read access to /vendor/overlay: No such file or directory
….. etc…..
[/CODE]

Here is the kicker, though: while I was taking and reviewing the logs, the bootloop ended and the phone started optimizing apps! Unfortunately, it only made it through the first 5 of 19 apps. Then it rebooted and started the bootloop again. Since it did something before, I decided to wait and see what happens. Obviously this is not right, but it is working through the errors on it’s own. After about 5 minutes, the bootloop ended and it worked from 6 of 19 all the way to 11 of 19. I figure that I probably whould let it finish. At this rate, it should be done within 30 minutes total. Sure enough, the next run optimized apps 12 through 19, and then it started the bootloop again.

With bated breath I anxiously awaited the “final countdown” of what I figured must be the last bootloop. Granted, it may crash now that it is done optimizing apps, but I could hardly wait to see the outcome! Unfortunately, every 4 minutes and 40 seconds, the phone will exit the bootloop, optimize apps 12 through 19, and then re-enter the bootloop. But it is still exciting because by God’s enabling there was progress! Now to fix the next set of issues….

Linux – Keep it simple.

Adding stlport to my SlimRoms 6 build

One of the problems that I have pulled from the logcat of my SlimRoms 6.0.1 build for the Samsung Galaxy S4, T-Mobile (JFLTETMO, SGH-M919) ( https://thealaskalinuxuser.wordpress.com/2016/05/24/pulling-a-logcat/ ) was this error:

05-24 20:40:15.036 228 228 E libEGL : load_driver(/vendor/lib/egl/libEGL_adreno.so): dlopen failed: cannot locate symbol “RSA_verify_PKCS1_PSS” referenced by “/system/vendor/lib/egl/libEGL_adreno.so”…

After doing some research, I stumbled accross this post on XDA: http://forum.xda-developers.com/showpost.php?p=63579207&postcount=465 and decided that I should check if it was in my SlimRoms 6 build. Sure enough, it was missing. So I downloaded the files off of github and put them into the appropriate folders in my source. I decided before doing a full build, I should test that module to make sure it builds properly. One great thing about make, and the use of it in Android build environments, is that you simply change directory to that folder, and tell it to make a module. See it in action here:

[CODE]
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/compile/slimroms6$ cd external/stlport/
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/compile/slimroms6/external/stlport$ mm
|==========================================|
| ___________________________|
| / ________________ad8888ba, |
| / / 8P’ “Y8 |
| / / _ _ d8 |
| / / | (_) 88,dd888bb, |
| / / | |_ _ __ ___ 88P’ `8b |
| / / | | | ‘_ ` _ \ 88 d8 |
|________/ / | | | | | | | |88a a8P |
|_________/ |_|_|_| |_| |_| “Y88888P” |
|==========================================|
PLATFORM_VERSION_CODENAME=UNOFFICIAL
PLATFORM_VERSION=6.0.1
SLIM_VERSION=Slim-6.0.1.alpha.0.1-UNOFFICIAL-20160526-1013
TARGET_PRODUCT=slim_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-30-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=MOB30J
OUT_DIR=/home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out
============================================
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/lib/libidl.so:system/lib/libidl.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/lib/libqcci_legacy.so:system/lib/libqcci_legacy.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/vendor/lib/libqmi_cci.so:system/vendor/lib/libqmi_cci.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/lib/libqmi_client_qmux.so:system/lib/libqmi_client_qmux.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/vendor/lib/libqmi_common_so.so:system/vendor/lib/libqmi_common_so.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/vendor/lib/libqmi_csi.so:system/vendor/lib/libqmi_csi.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/vendor/lib/libqmi_encdec.so:system/vendor/lib/libqmi_encdec.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/lib/libqmiservices.so:system/lib/libqmiservices.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/lib/libqmi.so:system/lib/libqmi.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/bin/efsks:system/bin/efsks ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/bin/ks:system/bin/ks ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/bin/qcks:system/bin/qcks ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/bin/qmuxd:system/bin/qmuxd ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/bin/rild:system/bin/rild ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/bin/rmt_storage:system/bin/rmt_storage ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/lib/libatparser.so:system/lib/libatparser.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/lib/libfactoryutil.so:system/lib/libfactoryutil.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/lib/libomission_avoidance.so:system/lib/libomission_avoidance.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/lib/libreference-ril.so:system/lib/libreference-ril.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/lib/libsecril-client.so:system/lib/libsecril-client.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/vendor/lib/libdiag.so:system/vendor/lib/libdiag.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/lib/libdsutils.so:system/lib/libdsutils.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/lib/libnetmgr.so:system/lib/libnetmgr.so ignored.
PRODUCT_COPY_FILES vendor/samsung/jf-common/proprietary/lib/libril-qcril-hook-oem.so:system/lib/libril-qcril-hook-oem.so ignored.
No private recovery resources for TARGET_DEVICE jfltetmo
make: Entering directory `/home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6’
Import includes file: /home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libstlport_intermediates/import_includes
target thumb C++: libstlport <= external/stlport/src/dll_main.cpp
In file included from external/stlport/src/dll_main.cpp:46:
In file included from external/stlport/stlport/deque:36:
external/stlport/stlport/stl/_deque.h:492:32: warning: unused parameter ‘__n’ [-Wunused-parameter]
void _M_initialize(size_type __n, const value_type& __val = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
^
external/stlport/stlport/stl/_deque.h:859:45: warning: unused parameter ‘__val’ [-Wunused-parameter]
void _M_fill_initialize(const value_type& __val, const __true_type& /*_TrivialInit*/)
^
2 warnings generated.
target thumb C++: libstlport <= external/stlport/src/fstream.cpp
target thumb C++: libstlport <= external/stlport/src/strstream.cpp
target thumb C++: libstlport <= external/stlport/src/sstream.cpp
target thumb C++: libstlport <= external/stlport/src/ios.cpp
target thumb C++: libstlport <= external/stlport/src/stdio_streambuf.cpp
target thumb C++: libstlport <= external/stlport/src/istream.cpp
target thumb C++: libstlport <= external/stlport/src/ostream.cpp
target thumb C++: libstlport <= external/stlport/src/iostream.cpp
target thumb C++: libstlport <= external/stlport/src/codecvt.cpp
target thumb C++: libstlport <= external/stlport/src/collate.cpp
target thumb C++: libstlport <= external/stlport/src/ctype.cpp
external/stlport/src/ctype.cpp:284:14: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
return c >= 0 && size_t(c) < upperBound;
~ ^ ~
1 warning generated.
target thumb C++: libstlport <= external/stlport/src/monetary.cpp
target thumb C++: libstlport <= external/stlport/src/num_get.cpp
target thumb C++: libstlport <= external/stlport/src/num_put.cpp
target thumb C++: libstlport <= external/stlport/src/num_get_float.cpp
external/stlport/src/num_get_float.cpp:699:5: warning: ‘register’ storage class specifier is deprecated [-Wdeprecated-register]
register unsigned negate_exp = 0;
^~~~~~~~~
external/stlport/src/num_get_float.cpp:700:5: warning: ‘register’ storage class specifier is deprecated [-Wdeprecated-register]
register int e = 0;
^~~~~~~~~
external/stlport/src/num_get_float.cpp:805:5: warning: ‘register’ storage class specifier is deprecated [-Wdeprecated-register]
register int e = 0;
^~~~~~~~~
3 warnings generated.
target thumb C++: libstlport <= external/stlport/src/num_put_float.cpp
target thumb C++: libstlport <= external/stlport/src/numpunct.cpp
target thumb C++: libstlport <= external/stlport/src/time_facets.cpp
target thumb C++: libstlport <= external/stlport/src/messages.cpp
target thumb C++: libstlport <= external/stlport/src/locale.cpp
target thumb C++: libstlport <= external/stlport/src/locale_impl.cpp
target thumb C++: libstlport <= external/stlport/src/locale_catalog.cpp
target thumb C++: libstlport <= external/stlport/src/facets_byname.cpp
target thumb C++: libstlport <= external/stlport/src/complex.cpp
target thumb C++: libstlport <= external/stlport/src/complex_io.cpp
target thumb C++: libstlport <= external/stlport/src/complex_trig.cpp
target thumb C++: libstlport <= external/stlport/src/string.cpp
target thumb C++: libstlport <= external/stlport/src/bitset.cpp
target thumb C++: libstlport <= external/stlport/src/allocators.cpp
In file included from external/stlport/src/allocators.cpp:32:
In file included from external/stlport/stlport/pthread_alloc:38:
external/stlport/stlport/stl/_pthread_alloc.h:115:51: warning: unused parameter ‘a’ [-Wunused-parameter]
pthread_allocator(const pthread_allocator<_Tp>& a) _STLP_NOTHROW {}
^
external/stlport/stlport/stl/_pthread_alloc.h:206:54: warning: unused parameter ‘a2’ [-Wunused-parameter]
const pthread_allocator<_T2>& a2)
^
2 warnings generated.
target thumb C: libstlport <= external/stlport/src/c_locale.c
target thumb C: libstlport <= external/stlport/src/cxa.c
target SharedLib: libstlport (/home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libstlport_intermediates/LINKED/libstlport.so)
target Pack Relocations: libstlport (/home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libstlport_intermediates/PACKED/libstlport.so)
INFO: Compaction : 0 bytes
INFO: Too few relocations to pack after alignment
target Symbolic: libstlport (/home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/symbols/system/lib/libstlport.so)
Export includes file: external/stlport/Android.mk — /home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libstlport_intermediates/export_includes
target Strip: libstlport (/home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/obj/lib/libstlport.so)
Notice file: external/stlport/NOTICE — /home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/obj/NOTICE_FILES/src//system/lib/libstlport.so.txt
Install: /home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/system/lib/libstlport.so
Import includes file: /home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libstlport_static_intermediates/import_includes
target thumb C++: libstlport_static <= external/stlport/src/dll_main.cpp
In file included from external/stlport/src/dll_main.cpp:46:
In file included from external/stlport/stlport/deque:36:
external/stlport/stlport/stl/_deque.h:492:32: warning: unused parameter ‘__n’ [-Wunused-parameter]
void _M_initialize(size_type __n, const value_type& __val = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
^
external/stlport/stlport/stl/_deque.h:859:45: warning: unused parameter ‘__val’ [-Wunused-parameter]
void _M_fill_initialize(const value_type& __val, const __true_type& /*_TrivialInit*/)
^
2 warnings generated.
target thumb C++: libstlport_static <= external/stlport/src/fstream.cpp
target thumb C++: libstlport_static <= external/stlport/src/strstream.cpp
target thumb C++: libstlport_static <= external/stlport/src/sstream.cpp
target thumb C++: libstlport_static <= external/stlport/src/ios.cpp
target thumb C++: libstlport_static <= external/stlport/src/stdio_streambuf.cpp
target thumb C++: libstlport_static <= external/stlport/src/istream.cpp
target thumb C++: libstlport_static <= external/stlport/src/ostream.cpp
target thumb C++: libstlport_static <= external/stlport/src/iostream.cpp
target thumb C++: libstlport_static <= external/stlport/src/codecvt.cpp
target thumb C++: libstlport_static <= external/stlport/src/collate.cpp
target thumb C++: libstlport_static <= external/stlport/src/ctype.cpp
external/stlport/src/ctype.cpp:284:14: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
return c >= 0 && size_t(c) < upperBound;
~ ^ ~
1 warning generated.
target thumb C++: libstlport_static <= external/stlport/src/monetary.cpp
target thumb C++: libstlport_static <= external/stlport/src/num_get.cpp
target thumb C++: libstlport_static <= external/stlport/src/num_put.cpp
target thumb C++: libstlport_static <= external/stlport/src/num_get_float.cpp
external/stlport/src/num_get_float.cpp:699:5: warning: ‘register’ storage class specifier is deprecated [-Wdeprecated-register]
register unsigned negate_exp = 0;
^~~~~~~~~
external/stlport/src/num_get_float.cpp:700:5: warning: ‘register’ storage class specifier is deprecated [-Wdeprecated-register]
register int e = 0;
^~~~~~~~~
external/stlport/src/num_get_float.cpp:805:5: warning: ‘register’ storage class specifier is deprecated [-Wdeprecated-register]
register int e = 0;
^~~~~~~~~
3 warnings generated.
target thumb C++: libstlport_static <= external/stlport/src/num_put_float.cpp
target thumb C++: libstlport_static <= external/stlport/src/numpunct.cpp
target thumb C++: libstlport_static <= external/stlport/src/time_facets.cpp
target thumb C++: libstlport_static <= external/stlport/src/messages.cpp
target thumb C++: libstlport_static <= external/stlport/src/locale.cpp
target thumb C++: libstlport_static <= external/stlport/src/locale_impl.cpp
target thumb C++: libstlport_static <= external/stlport/src/locale_catalog.cpp
target thumb C++: libstlport_static <= external/stlport/src/facets_byname.cpp
target thumb C++: libstlport_static <= external/stlport/src/complex.cpp
target thumb C++: libstlport_static <= external/stlport/src/complex_io.cpp
target thumb C++: libstlport_static <= external/stlport/src/complex_trig.cpp
target thumb C++: libstlport_static <= external/stlport/src/string.cpp
target thumb C++: libstlport_static <= external/stlport/src/bitset.cpp
target thumb C++: libstlport_static <= external/stlport/src/allocators.cpp
In file included from external/stlport/src/allocators.cpp:32:
In file included from external/stlport/stlport/pthread_alloc:38:
external/stlport/stlport/stl/_pthread_alloc.h:115:51: warning: unused parameter ‘a’ [-Wunused-parameter]
pthread_allocator(const pthread_allocator<_Tp>& a) _STLP_NOTHROW {}
^
external/stlport/stlport/stl/_pthread_alloc.h:206:54: warning: unused parameter ‘a2′ [-Wunused-parameter]
const pthread_allocator<_T2>& a2)
^
2 warnings generated.
target thumb C: libstlport_static <= external/stlport/src/c_locale.c
target thumb C: libstlport_static <= external/stlport/src/cxa.c
Export includes file: external/stlport/Android.mk — /home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libstlport_static_intermediates/export_includes
target StaticLib: libstlport_static (/home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libstlport_static_intermediates/libstlport_static.a)
make: Leaving directory `/home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6’

#### make completed successfully (01:10 (mm:ss)) ####
[/CODE]

That’s a lot of mumbo-jumbo, but the cool part was that in 70 seconds I knew that it could properly build that module. So, I switched to the root folder and started another compilation:

[CODE]
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/compile/slimroms6/external/stlport$ croot
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/compile/slimroms6$ brunch jfltetmo
[/CODE]

Let’s see what that does for us.

Linux – Keep it simple.

Pulling a logcat

I have never been accused of being the sharpest tool in the shed, but boy, have I been missing the biggest, most obvious way of figuring out my 6.0 problems. In fact, I am embarrassed. However, I hope that by posting it here, I will accomplish two things:

  1. Prove to myself that I can publicaly own up to my own mistakes, and hopefully learn from them.
  2. Help others who may also be experiencing this issue.

So, to re-iterate the problem in question. I have made several successful builds of various 6.0+ roms, such as SlimRoms, AOKP, and CM. However, only CM13 worked when I put the rom on the device. All of the others simply hang at the “Samsung Galaxy S4” logo.

The problem was that there was no further error in the build process to give me a clue as to what needs fixing. How can I fix something that is not broken? If only I could get some sort of status or log to see what was happening under the hood!

“DUH” The moment I said it out loud was the moment that the proverbial lights came on.

So, I sat down at the terminal, phone plugged into the USB port and in TWRP. After installing the new SlimRoms 6.0 rom, I then rebooted the phone, leaving it plugged into the USB port of my computer. From the terminal:

alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~$ sudo adb devices
List of devices attached
d363c746 device

alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~$ sudo adb logcat >logcat.txt

^c

Which of course put all of my phones logs into a handy text file. Note that I eventually had to stop it with CTRL-c, as the log was continuously scrolling. Now I could just open the file and find all of my phones new problems. Like this one:

05-24 20:40:15.036 228 228 E libEGL : load_driver(/vendor/lib/egl/libEGL_adreno.so): dlopen failed: cannot locate symbol “RSA_verify_PKCS1_PSS” referenced by “/system/vendor/lib/egl/libEGL_adreno.so”…

How quaint. A log that tells you exactly what is wrong so you can try to figure out how to fix it… imagine that! Praise God that he brought it to mind so I didn’t have to wander around in the dark forever!

Linux – Keep it simple.

Compile SlimRoms 6.0 for the Samsung Galaxy S4 T-mobile variant (JFLTETMO SGH-M919)

By all acounts it was a happy sight to see the below in my terminal:

[CODE]
using prebuilt boot.img from BOOTABLE_IMAGES…
boot size (6862848) is 65.45% of limit (10485760)
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -Xmx2048m -jar /home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmp2XWker /home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/slim_jfltetmo-ota-96a735f156.zip
done.
_______________________________________________
/ http://www.slimroms.org |
/ _____________________________________________|
/ /
/ / _ _ ______
/ / | |(_) (_____ \
/ / | | _ _____ _____) )___ _____ ___
_____________________/ / | || | | __ // _ \| |/___)
| / | || | | | | | \ \ |_| | | | |___ |
|_______________________/ \_)_|_|_|_|_| |_\___/|_|_|_(___/

Package Complete: /home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/Slim-jfltetmo-6.0.1.alpha.0.1-UNOFFICIAL-20160516-0840.zip
make: Leaving directory `/home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6′

#### make completed successfully (08:20:24 (hh:mm:ss)) ####
[/CODE]

Unfortunately, a test of the rom proved it to fail. This is not the first time that I have built “successfully” and yet had a failure to run properly. There are several possible reasons, which I plan to look into, and hopefully take action on.

1. One of the items that I commented out or changed during the failures to compile was not the proper course of action.
Most definately, I lack in knowledge about such things as programming and code, and have incorrectly solved one of the compiling problems by ultimately making a “dud” build.

2. There is some problem with the vendor blobs, or the copying/loading/linking to them.
It is possible that there is some issue with the vendor blobs or the use thereof, as in the past I have frequented this problem with “successful” builds that did not successfully run.

3. There is something wrong with SlimRoms 6.0 source when building for this or all devices.
Since SlimRoms is calling SlimMM (SlimRoms 6.0) an alpha stage, it is quite possible that some needed files, dependencies, or otherwise useful items are not yet fully functional. There would be little to no way to test this, but the idea has merrit.

The three options above are listed by what I feel is thier likely-hood of being true. While #1 should be my first look, #2, the vendor blobs, is really easy to swap out with others, so I am going to tackle that first. I orriginally put SlimLP’s vendor blobs in there, but this time, put in CM13’s vendor blobs from my previously successful build. Let’s see if that helps.

Linux – Keep it simple.

New SlimRoms Boot Animation

Just another simple SlimRoms boot animation. I use Gimp to make each frame, and then zip them together like so:

$ zip -r -0 ./SlimHD.zip ./part0
$ zip -r -0 ./SlimHD.zip ./part1
$ zip -r -0 ./SlimHD.zip ./desc.txt

Where -r means recursive, and -0 means no compression.

Download the Zip file:
http://www.mediafire.com/download/5kq2rn7ny1epmi7/SlimHD.zip

Animated GIF:

The desc.txt file is very straightforward, it simply says:

[CODE]
1080 1920 30
p 1 0 part0
p 0 0 part1

[/CODE]

1080 1920 – The screen resolution.

30 – Frames per second.

p 1 0 – Play this section, and stop after once.

p 0 0 – Play this section, and stop after none, which causes a loop of this folder.

If you unzip the file, you will see two folders, part0 and part1, with each frame in it, sequentially numbered 1000.jpg, 1001.jpg, etc. You will also see the desc.txt file. These boot animation files are really simple. It is the artwork that is the hard part. Personally, I don’t think art is my God given talent, but as long as he gives me the time to do it, I’m still learning how to make things that are fun and look good.

The ascii art was made by someone in the SlimRoms team, I didn’t make that one. I simply used Gimp to edit it, swirl it, pinch it, and color it.

Linux – Keep it simple.