ERROR: A build property cannot exceed 91 bytes

While compiling Dirty Unicorns 6.0.1 for the Samsung Galaxy S4 T-Mobile variant (JFLTETMO SGH-M919) I ran into an interesting error, as you can see below.

[CODE]
target StaticLib: libhealthd.qcom (/home/alaskalinuxuser/Documents/projects/phones/compile/dirtyunicorns_m-caf/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libhealthd.qcom_intermediates/libhealthd.qcom.a)
Target buildinfo: /home/alaskalinuxuser/Documents/projects/phones/compile/dirtyunicorns_m-caf/out/target/product/jfltetmo/root/default.prop
host Executable: checkseapp (/home/alaskalinuxuser/Documents/projects/phones/compile/dirtyunicorns_m-caf/out/host/linux-x86/obj/EXECUTABLES/checkseapp_intermediates/checkseapp)
error: ro.bootimage.build.fingerprint cannot exceed 91 bytes: samsung/du_jfltetmo/jfltetmo:6.0.1/MOB30J/eng.alaskalinuxuser.20160603.060623:userdebug/test-keys (97)
make: *** [/home/alaskalinuxuser/Documents/projects/phones/compile/dirtyunicorns_m-caf/out/target/product/jfltetmo/root/default.prop] Error 1
make: *** Deleting file `/home/alaskalinuxuser/Documents/projects/phones/compile/dirtyunicorns_m-caf/out/target/product/jfltetmo/root/default.prop’
make: *** Waiting for unfinished jobs….

real 182m45.274s
user 122m19.018s
sys 16m49.866s
[/CODE]

So I edited /home/alaskalinuxuser/Documents/projects/phones/compile/dirtyunicorns_m-caf/build/tools/post_process_props.py like this:

[CODE]
# See PROP_NAME_MAX and PROP_VALUE_MAX system_properties.h.
# The constants in system_properties.h includes the termination NUL,
# so we decrease the values by 1 here.
PROP_NAME_MAX = 31
# WJH PROP_VALUE_MAX = 91
PROP_VALUE_MAX = 99
[/CODE]

While editing this, it also pointed out that I needed to edit system_properties, which is in the bionic/libc/include/sys/ folder, so I did this:

[CODE]
#define PROP_NAME_MAX 32
// WJH #define PROP_VALUE_MAX 92
#define PROP_VALUE_MAX 100
[/CODE]

I only needed 97 characters, but I set it for 100 in the system_properties, in case something was longer then that. I then set the post_process_props.py one lower, as the notes above it said. Then I ran the brunch command again. Now, I hope that none of you are thinking, “Man, this guy is smart!” Because, well, I’m not that bright, and I want to give the credit where it is due. So I ran the error through Google a couple of times, and finaly found this:

http://stackoverflow.com/questions/28776970/android-build-error-ro-build-fingerprint-cannot-exceed-91-bytes

And if I had a stackoverflow account, I would slap the upvote button, because that was really helpful.

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.

Compile AOKP 5.0.2 for the Samsung Galaxy S4 T-mobile variant (JFLTETMO SGH-M919)

  • Edit – I just realized that in my posts for having “fixed” many of the issues with the AOKP 5.0.2 build, that I only drafted, and didn’t actually post what I did to fix them. So I thought I better toss this in, even though it is out of order with the other article. So the below is written in present tense, even though it is now actually past tense.

Well, since by God’s enabiling the overall build was successful, I wanted to go back through and more accurately correct my “dirty fixes”. These are still not perfect, but I think that they are on the right track.

Problem #1:
“device/samsung/qcom-common/overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml:38: error: Resource does not already exist in overlay at ‘config_tether_apndata’; use <add-resource> to add.”

So, I edited the file to take out the tether apn data. I don’t know for sure if this will cause tethering to fail or not, but as it is, it would not work.

[CODE]
<!– String containing the apn value for tethering. May be overriden by secure settings
TETHER_DUN_APN. Value is a comma separated series of strings:
“name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type”
note that empty fields can be ommitted: “name,apn,,,,,,,,,310,260,,DUN”
<string-array translatable=”false” name=”config_tether_apndata”>
<item>T-Mobile Tethering,pcweb.tmobile.com,,,,,,,,,310,260,,DUN</item>
</string-array>WJH–>
[/CODE]

Problem #2:
“device/samsung/qcom-common/overlay/frameworks/base/core/res/res/values/arrays.xml:26: error: Error: No resource found that matches the given name (at ‘^index_2’ with value ‘@string/reboot_download’).”

Here is the classic problem of adding reboot options (like into download or recovery mode) when I don’t have those modes actually enabled. So, as they are, it would be a “dead” button, and doesn’t like to compile that way. So for the present, I took it out.

[CODE]
<!– Defines the shutdown options shown in the reboot dialog. –>
<array name=”shutdown_reboot_options” translatable=”false”>
<item>@string/reboot_reboot</item>
<item>@string/reboot_recovery</item>
<!– <item>@string/reboot_download</item> WJH –>
</array>
[/CODE]

Problem #3:
“device/samsung/jf-common/overlay/frameworks/base/core/res/res/values/config.xml:175: error: Resource at config_intrusiveBatteryLed appears in overlay but not in the base package; use <add-resource> to add.
device/samsung/jf-common/overlay/frameworks/base/core/res/res/values/config.xml:178: error: Resource at config_multiColorBatteryLed appears in overlay but not in the base package; use <add-resource> to add.”

What we see here is LED values that are not appropriatly added to the base packages. I really need to read up on adding resources. For now, I would just like to see it successfully build, so I eddited these two options out.

[CODE]
<!– Is the battery LED intrusive? Used to decide if there should be a disable option
<bool name=”config_intrusiveBatteryLed”>true</bool>WJH–>

<!– Does the battery LED support multiple colors? Used to decide if the user can change the colors
<bool name=”config_multiColorBatteryLed”>true</bool> WJH–>
[/CODE]

Problem #4:
There is no installed launcher for the home screen. It is not that it was missing, it simply never was comiled because it did not exist. So, I added Turbo Launcher, which falls under Apache License 2.0, and has all of it’s source available on Github. The author does sell paid versions with extra features, but the base version is free. It is lightweight and fast, because there is not much to it. It is very simple, yet custimizable, which makes it a good fit for AOKP. Here’s how I added it:

First, I added TurboLauncher.apk to the /home/alaskalinuxuser/Documents/projects/phones/compile/aokp5-working/vendor/aokp/prebuilt/common/app folder. Then I edited /home/alaskalinuxuser/Documents/projects/phones/compile/aokp5-working/vendor/aokp/prebuilt/Android.mk by adding:

[CODE]
include $(CLEAR_VARS)
LOCAL_MODULE := TurboLauncher
LOCAL_MODULE_OWNER := aokp
LOCAL_SRC_FILES := common/app/$(LOCAL_MODULE).apk
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_SUFFIX := .apk
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)
[/CODE]

And I edited /home/alaskalinuxuser/Documents/projects/phones/compile/aokp5-working/device/samsung/jf-common/jf-common.mk by adding:

[CODE]
# WJH Launcher
PRODUCT_PACKAGES += \
TurboLauncher
[/CODE]

Problem #5:
There is no installed file manager. It simply doesn’t exist in the source.

So, I went to http://forum.xda-developers.com/showthread.php?p=39772628#post39772628 and downloaded Ultra Explorer v1.1, an open source file manager for Android. Kshark27 has done a lot of good work here, and I feel that it is a good file manager, as well as the fact that I like supporting open source projects. So, I moved the apk to the /home/alaskalinuxuser/Documents/projects/phones/compile/aokp5-working/vendor/aokp/prebuilt/common/app folder. Then I edited /home/alaskalinuxuser/Documents/projects/phones/compile/aokp5-working/vendor/aokp/prebuilt/Android.mk by adding:

[CODE]
include $(CLEAR_VARS)
LOCAL_MODULE := TurboLauncher
LOCAL_MODULE_OWNER := aokp
LOCAL_SRC_FILES := common/app/$(LOCAL_MODULE).apk
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_SUFFIX := .apk
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)
[/CODE]

And I edited /home/alaskalinuxuser/Documents/projects/phones/compile/aokp5-working/device/samsung/jf-common/jf-common.mk by adding:

[CODE]
# WJH file manager
PRODUCT_PACKAGES += \
ultraexplorer
[/CODE]

This should ensure that the apps would be installed with the next build. Let’s see how well that works for us!

Linux – Keep it simple.

Testing my recompiled AOKP5 on the Samsung Galaxy S4, T-Mobile (JFLTETMO SGH-M919)

So after making those changes shown in my previous posts, I recompiled AOKP5 for my S4. It still built successfully, so then the fixes must have been appropriate. After downloading it to my phone, I took the time to do a full test run, and here were the results:

System items that are working:
MTP, ADB, GPS, Bluetooth, WiFi, lock screen, and things like the volume keys/home key/power button all work as expected when tested.

System items that are not working:
Camera, there are Random reboots, there is no sound (even though the volume can be adjusted), Cellular data/calls/apn – it detects the sim card, and says I am on an AT&T network, but I cannot edit the APN, and cannot get connectivity or make a phone call.

Apps that are Working:
gallery, launcher, calculator, calendar, clock, contacts, phone app, downloads, email, messages (app opens, but I could not send or receive due to cell issue), mGerrit, settings, supersu, turbo launcher, and ultra explorer.

Apps that are not working:
Music app – opens but cannot play music, and causes a reboot.
camera app – Cannot connect to camera.

The rom also has a very vanilla AOSP flavor. It lacks anything AOKP, in fact, if the boot animation was not AOKP, I would not even know that it was supposed to be AOKP, and would think that it was AOSP. By God’s grace two things were fixed since my last compile, but obviously it still needs some major work. Here is my to-do list in an order of priority:

1. Fix cellular. If you can’t make a phone call, it really serves little to no purpose, unless you want to use it as a “tablet”.
2. Fix the sound. It really is important to be able to hear the alarm, telephone, or other sounds when using a phone.
3. Add in the usual AOKP tweeks, such as menu options for settings, etc.
4. Fix SuperUser permission. Currently, I am using the SuperSU zip to add root permission and handling by installing it in TWRP. This is acceptable, but shouldn’t have to be done that way.

If you want to try it out, here are the links:

For the AOKP5 rom – http://www.mediafire.com/download/a72k2fl556cd21p/aokp_jfltetmo_lollipop_unofficial_2016-05-24.zip
For the SuperSu zip – http://www.mediafire.com/download/75sm6ayb3obnai2/UPDATE-SuperSU-v2.46.zip

Instructions:
In TWRP, wipe, then install AOKP5 zip. Wipe the Cache and Dalvik, and then install the SuperSu zip. Reboot and have fun!
NOTE: the cellular and data are not currently working!

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.

Compiling SlimRoms 6.0 for the Samsung Galaxy S4, T-Mobile (JFLTETMO SGH-M919)

I’ve noticed a pattern. Other than CM13, all of my 6.0+ roms compile successfully (eventually) but fail to actually run on the device. I am really not sure why this is, so I’ve been doing some research. One of the things that seems ambiguous to me, is which version of Java to use. According to the AOSP “setting up the build environment” page, MM and LP will/should build with OpenJDK7. However, it also states that the current branch, which is still 6.0, or MM, requires OpenJDK8. So, I downloaded and installed OpenJDK8. Then I re-compiled SlimRoms 6.0. As you can see, it was still successful when building:

[CODE]
using prebuilt boot.img from BOOTABLE_IMAGES…
boot size (6846464) is 65.29% 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/tmpOefJAw /home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6/out/target/product/jfltetmo/slim_jfltetmo-ota-3e88c0e4c2.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-20160524-1009.zip
make: Leaving directory `/home/alaskalinuxuser/Documents/projects/phones/compile/slimroms6′

#### make completed successfully (58:16 (mm:ss)) ####

[/CODE]

However, it didn’t have any affect on functionality. The build was successful, but the operational test was a fail. I am not quite sure where to go with this just yet, since there are not any build errors, but I’ll keep plugging away at it. Next on my list is changing the tool chain for the kernel from arm-eabi to linaro, but I somehow doubt that is it. Then again, I am in personally uncharted waters right now.

Linux – Keep it simple.

Compile AOKP 5.0.2 for the Samsung Galaxy S4 T-mobile variant (JFLTETMO SGH-M919)

Success!

Let’s take a look:

[CODE]
Finding vertex sequence…
Removing backward edges…
0/0 dependencies (0.00%) were violated; 0 source blocks removed.
Reticulating splines…
using prebuilt boot.img from IMAGES…
boot size (6305792) is 60.14% 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/aokp5/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpyilNzr /home/alaskalinuxuser/Documents/projects/phones/compile/aokp5/out/target/product/jfltetmo/aokp_jfltetmo-ota-eng.alaskalinuxuser.zip
done.

______ _____ __ __ _____
/\ _ \/\ __`\/\ \/\ \ /\ _ `\
\ \ \L\ \ \ \/\ \ \ \/’/’\ \ \L\ \
\ \ __ \ \ \ \ \ \ , < \ \ ,__/
\ \ \/\ \ \ \_\ \ \ \\`\ \ \ \/
\ \_\ \_\ \_____\ \_\ \_\\ \_\
\/_/\/_/\/_____/\/_/\/_/ \/_/

===========-Package complete-===========
zip: /home/alaskalinuxuser/Documents/projects/phones/compile/aokp5/out/target/product/jfltetmo/aokp_jfltetmo_lollipop_unofficial_2016-05-18.zip
md5: 46bc18249c61988e75aba813464692a3
size: 227M
========================================
[/CODE]

Well it looks good here! At least it compiled successfully. All told, this was probably the easiest compiling I have done yet. Four runs and success, provided it works. So I set about to test it, and to God be the glory, it loaded! However, it was somewhat lacking in function. I was greeted by the boot animation, which AOKP did an excellent job on.

After the animation, it moved on to the lock screen. Once I swipped the screen to unlock it, I was greeted by blackness with a status bar at the top. I could swipe down from the status bar and bring up the menu, which looked fine. Just the home screen was somehow absent. No launchers, no icons, nothing on the home screen. I quickly realized that there was an error or missing launcher program. So, I jumped into adb on my computer terminal and installed a few items, as seen below:

[CODE]
root@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:/home/alaskalinuxuser/Downloads# adb install Nova\ Launcher_4.3.1.apk
3334 KB/s (6461014 bytes in 1.892s)
pkg: /data/local/tmp/Nova Launcher_4.3.1.apk
Success
/projects/phones/apk# adb install GPS\ Status_3.8.1.apk
2806 KB/s (465902 bytes in 0.162s)
pkg: /data/local/tmp/GPS Status_3.8.1.apk
Success
root@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:/home/alaskalinuxuser/Documents/projects/phones/apk# adb install jackpal.androidterm-1.0.70-APK4Fun.com.apk
4405 KB/s (564672 bytes in 0.125s)
pkg: /data/local/tmp/jackpal.androidterm-1.0.70-APK4Fun.com.apk
Success
root@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:/home/alaskalinuxuser/Documents/projects/phones/apk# adb install Speed\ Test_2.0.9.apk
3651 KB/s (3191423 bytes in 0.853s)
pkg: /data/local/tmp/Speed Test_2.0.9.apk
Success
[/CODE]

Now, when I hit the home button, the normal nova launcher home screen appeared. I now had icons, a launcher, etc. Back in business! Well, mostly. I then started my standard tests, and here are my findings:

Success
-Bluetooth
-WiFi
-GPS
-All apps not listed in Failure cateragory below.

Failure
-I could not add an APN, as “this user is not allowed to add APN settings” so I could not test the cellular data, phone calls, etc., but I did have cell signal bars.
-Music app did open, but could not play any song, no sound was heard at any time, actually.
-No root support.
-Camera app did not work, and after installing open camera app , I tested that, and it also did not work. “Cannot connect to Camera” error.

Another odd thing was that there seemed to be no AOKP options or features. In fact, it seemed more like a vanilla AOSP rom. I think I’m going to have to revamp this thing from the ground up. On the plus side, it is running, so I can either add/edit items in the Rom zip file, or recompile the needed portions.

Linux – Keep it simple.

Compile AOKP 5.0.2 for the Samsung Galaxy S4 T-mobile variant (JFLTETMO SGH-M919)

Just like we saw the other day, compiling is not always a simple task. At least, not for a simpleton like myself. A knowledgeable or intelligent person would simply go through everything and set everything up proper prior to the first run. I do try to do that, but evidently I am still learning and miss things. Here is another snippet from my terminal, for the third compiling run:

[CODE]
warning: string ‘transient_navigation_confirmation_long’ has no default translation.
warning: string ‘use_physical_keyboard’ has no default translation.
warning: string ‘wifi_display_notification_disconnect’ has no default translation.
warning: string ‘wifi_display_notification_message’ has no default translation.
warning: string ‘wifi_display_notification_title’ has no default translation.
Note: external/jsilver/src/org/clearsilver/FactoryLoader.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Failed to generate resource table for split ”
device/samsung/qcom-common/overlay/frameworks/base/core/res/res/values/arrays.xml:26: error: Error: No resource found that matches the given name (at ‘^index_2’ with value ‘@string/reboot_download’).

make: *** [/home/alaskalinuxuser/Documents/projects/phones/compile/aokp5/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk] Error 1
make: *** Deleting file `/home/alaskalinuxuser/Documents/projects/phones/compile/aokp5/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk’
make: *** Waiting for unfinished jobs….
[/CODE]

Again, it is an overlay problem with values. So, after some research, and not being knowledgeable enough to fix the error, I ended up removing the arrays.xml file, hoping to edit it back in later.

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.