Compiling CyanogenMod 13 for the Samsung Galaxy S4 T-Mobile (JFLTETMO SGH-M919)

In the continuing adventures of attempting to compile CyanogenMod 13 for the Samsung Galaxy S4 T-Mobile (JFLTETMO SGH-M919), on my second build attempt, I have run into another road-block. Yesterday I had an error due to a command not found, but today we have a new error:

[CODE]
Import includes file: /home/alaskalinuxuser/Documents/projects/phones/compile/cm13/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libvterm_intermediates/import_includes
Export includes file: packages/apps/Terminal/jni/Android.mk — /home/alaskalinuxuser/Documents/projects/phones/compile/cm13/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libjni_terminal_intermediates/export_includes
Notice file: external/libvterm/NOTICE — /home/alaskalinuxuser/Documents/projects/phones/compile/cm13/out/target/product/jfltetmo/obj/NOTICE_FILES/src//system/lib/libvterm.a.txt
make: *** No rule to make target `vendor/samsung/jf-common/proprietary/app/TimeService/TimeService.apk’, needed by `/home/alaskalinuxuser/Documents/projects/phones/compile/cm13/out/target/product/jfltetmo/obj/APPS/TimeService_intermediates/package.apk’. Stop.
make: *** Waiting for unfinished jobs….
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
make: Leaving directory `/home/alaskalinuxuser/Documents/projects/phones/compile/cm13′

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

Once again, you can always spot the problems in your compiling logs by looking for 4 key words: Failed, Error, Warning, and Stop. In this case, the key word was Stop. This time, the fault is on the same line as the stop command.

[CODE]
make: *** No rule to make target `vendor/samsung/jf-common/proprietary/app/TimeService/TimeService.apk’, needed by `/home/alaskalinuxuser/Documents/projects/phones/compile/cm13/out/target/product/jfltetmo/obj/APPS/TimeService_intermediates/package.apk’. Stop.
make: *** Waiting for unfinished jobs….
[/CODE]

What we see here is a failure to create something that is needed by something else. Essentially, the compiler does not know how to make the TimeService.apk, which is needed by package.apk. Note that we are not clueless as to it’s location. It should be in the “vendor/samsung/jf-common/proprietary/app/TimeService/” directory. Upon going to that directory, which does exist, the directory is empty. There should be some sore of Android.mk file there with instructions for the compiler to follow.

Here is where we come to a crossroad. We have two choices:

1. Find the files that are needed for this apk, and put them where they need to be.

OR

2. Find the file that references building this apk and comment it out.

The first option is technically the best option. There is a reason this apk is called for. However, this may require lots of time, searching, and downloading of material. A quick search of the TimeService.apk revealed several sites that believe it to be in cahoots with the MonkeyService.apk, and the two of them automatically download and install apps on your phone. Or, as most would call it, bloat-ware.

Not being too thrilled with it’s supposed function, I decided to take the lazy route of step 2 and simply comment out the reference to build it. Here is where a little bit of Android compiling know how has to come into play. Or, if your like me, and don’t know anything, just look through all the basic files until you find what you are looking for.

The heirarchy of build seems to go somthing like this: in the device/samsung/jfltetmo folder, it has a boardconfig.mk file. That file calls the device/samsung/jf-common/boardconfig.mk file and the vendor/samsung/jf-gsm-common/BoardConfigVendor.mk file. Since our problem is in the vendor directory, I went to the vendor/samsung/jf-gsm-common/BoardConfigVendor.mk file. Well, that didn’t help. There were 3 files there, and none of them referenced the issue.

However, our error told us that the issue was in the `vendor/samsung/jf-common/proprietary/app/TimeService/TimeService.apk’, so I went to the vendor/samsung/jf-common/ directory and found that there was an Android.mk file that said (among other things):

[CODE]
include $(CLEAR_VARS)
LOCAL_MODULE := TimeService
LOCAL_MODULE_OWNER := samsung
LOCAL_SRC_FILES := proprietary/app/TimeService/TimeService.apk
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := platform
include $(BUILD_PREBUILT)
[/CODE]

Which I changed to:

[CODE]
#include $(CLEAR_VARS)
#LOCAL_MODULE := TimeService
#LOCAL_MODULE_OWNER := samsung
#LOCAL_SRC_FILES := proprietary/app/TimeService/TimeService.apk
#LOCAL_MODULE_TAGS := optional
#LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
#LOCAL_MODULE_CLASS := APPS
#LOCAL_CERTIFICATE := platform
#WJHinclude $(BUILD_PREBUILT)
[/CODE]

Now, when I re-run the build, it will not attempt to build this package. So, let’s give it a try! I’ll let you know how it goes.

Linux – Keep it simple.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s