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.

When LiquidSmooth gets rough!

Among the many roms that I am currently working on, one of them is Liquid-Marshmallow (LiquidSmooth 6.0.1) for the Samsung Galaxy S4, T-Mobile variant (SGH-M919, JFLTETMO). There are a couple of problems with this endevour, not the least of which is that official development of LiquidSmooth has stopped. That’s right, LS as a group has decided to call it quits. That being said, any further development of LS roms requires a bit more finess, as the repository is no longer being updated with the current Android repository changes.

However, to God be the glory, I was able to compile a booting Liquid-Marshmallow for my phone. Unfortunately, it is a bit buggy. Here is my change log:

20160628
-Added Texting app
-changed background to liquidsmooth
-Added AKLU-Lionheart kernel

20160627
-Fixed Audio
-Fixed Root
-Added homemade liquidsmooth boot animation (not great, but it will do)

20160623
-First successful boot
-No GPS
-No Audio
-No root
-No text message app
-No default ringtone/notification tone
-Browser fail
-Layers fail
-Google boot animation

As you can see, it has been a grand adventure, one which I was hoping would come to a very grand end! Unfortunately, there are still several issues that I am working on, and that may cause the project to get scrapped altogether. For instance, you can make phone calls, play games, and the like, but you cannot open up a web browser. Actually, to be more specific, it appears that you cannot use data, either cellular nor WiFi. Look at this logcat:

[CODE]
06-30 19:59:33.643 585 1932 I Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 09/02/15, 76f806e, Ibddc658e36
06-30 19:59:33.643 585 1932 I OpenGLRenderer: Initialized EGL, version 1.4
06-30 19:59:33.665 231 296 E BufferQueueProducer: [Application Error: com.android.browser] allocateBuffers: slot 0 without buffer is not FREE
06-30 19:59:34.098 585 607 W ActivityManager: Activity pause timeout for ActivityRecord{1fd54da u0 com.android.browser/.BrowserActivity t11 f}
06-30 19:59:34.733 1242 1388 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer…
06-30 19:59:34.735 1242 1388 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer…
06-30 19:59:35.021 2795 2795 I Process : Sending signal. PID: 2795 SIG: 9
06-30 19:59:35.035 246 684 D ALSAStreamOps: setParameters(): keyRouting with device 0x2
06-30 19:59:35.035 246 684 D ALSAStreamOps: setParameters(): keyRouting with device 0x2
06-30 19:59:35.035 246 684 D ALSADevice: route: devices 0x2 in mode 0
06-30 19:59:35.035 246 684 D ALSADevice: No valid input device: 0
06-30 19:59:35.036 246 684 D alsa_ucm: snd_use_case_set(): uc_mgr 0xb3198540 identifier _enadev value Speaker
06-30 19:59:35.036 246 684 D alsa_ucm: Set mixer controls for HiFi enable 1
06-30 19:59:35.036 246 684 D alsa_ucm: Setting mixer control: SLIMBUS_0_RX Audio Mixer MultiMedia1, value: 1
06-30 19:59:35.036 246 684 D ALSADevice: switchDevice: mCurTxUCMDevivce None mCurRxDevDevice Speaker
06-30 19:59:35.039 585 1420 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@de9bee2 attribute=null, token = android.os.BinderProxy@f0abec7
06-30 19:59:35.068 246 684 D AudioFlinger: mixer(0xb2480000) throttle end: throttle time(10)
06-30 19:59:35.161 585 1259 I ActivityManager: Process com.android.browser (pid 2795) has died
06-30 19:59:35.200 585 619 W AppOps : Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0
06-30 19:59:35.991 585 880 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.android.browser cmp=com.android.browser/.BrowserActivity bnds=[849,1676][1050,1928] (has extras)} from uid 10015 on display 0
06-30 19:59:35.994 246 684 D ALSAStreamOps: setParameters(): keyRouting with device 0x2
06-30 19:59:35.994 246 684 D ALSAStreamOps: setParameters(): keyRouting with device 0x2
06-30 19:59:35.994 246 684 D ALSADevice: route: devices 0x2 in mode 0
06-30 19:59:35.995 246 684 D ALSADevice: No valid input device: 0
06-30 19:59:35.995 246 684 D alsa_ucm: snd_use_case_set(): uc_mgr 0xb3198540 identifier _enadev value Speaker
06-30 19:59:35.995 246 684 D alsa_ucm: Set mixer controls for HiFi enable 1
06-30 19:59:35.995 246 684 D alsa_ucm: Setting mixer control: SLIMBUS_0_RX Audio Mixer MultiMedia1, value: 1
06-30 19:59:35.996 246 684 D ALSADevice: switchDevice: mCurTxUCMDevivce None mCurRxDevDevice Speaker
06-30 19:59:36.052 585 1277 I ActivityManager: Start proc 2870:com.android.browser/u0a24 for activity com.android.browser/.BrowserActivity
06-30 19:59:36.135 2870 2870 W System : ClassLoader referenced unknown path: /system/app/Browser/lib/arm
06-30 19:59:36.174 2870 2891 E ActivityThread: Failed to find provider info for com.google.settings
06-30 19:59:36.175 2870 2891 E ActivityThread: Failed to find provider info for com.google.settings
06-30 19:59:36.182 2870 2870 E WebViewFactory: Chromium WebView package does not exist
06-30 19:59:36.182 2870 2870 E WebViewFactory: android.webkit.WebViewFactory$MissingWebViewPackageException: android.content.pm.PackageManager$NameNotFoundException: com.android.webview
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.webkit.WebViewFactory.fetchPackageInfo(WebViewFactory.java:116)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:190)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:165)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.webkit.CookieManager.getInstance(CookieManager.java:39)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at com.android.browser.BrowserSettings.syncSharedSettings(BrowserSettings.java:312)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at com.android.browser.BrowserSettings.setController(BrowserSettings.java:148)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at com.android.browser.Controller.<init>(Controller.java:235)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at com.android.browser.BrowserActivity.createController(BrowserActivity.java:84)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at com.android.browser.BrowserActivity.onCreate(BrowserActivity.java:73)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.app.Activity.performCreate(Activity.java:6251)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.app.ActivityThread.-wrap11(ActivityThread.java)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.os.Handler.dispatchMessage(Handler.java:102)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.os.Looper.loop(Looper.java:148)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.app.ActivityThread.main(ActivityThread.java:5422)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at java.lang.reflect.Method.invoke(Native Method)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
06-30 19:59:36.182 2870 2870 E WebViewFactory: Caused by: android.content.pm.PackageManager$NameNotFoundException: com.android.webview
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:137)
06-30 19:59:36.182 2870 2870 E WebViewFactory: at android.webkit.WebViewFactory.fetchPackageInfo(WebViewFactory.java:114)
06-30 19:59:36.182 2870 2870 E WebViewFactory: … 20 more
06-30 19:59:36.183 2870 2870 D AndroidRuntime: Shutting down VM
06-30 19:59:36.184 2870 2870 E AndroidRuntime: FATAL EXCEPTION: main
06-30 19:59:36.184 2870 2870 E AndroidRuntime: Process: com.android.browser, PID: 2870
06-30 19:59:36.184 2870 2870 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.browser/com.android.browser.BrowserActivity}: android.util.AndroidRuntimeException: android.webkit.WebViewFactory$MissingWebViewPackageException: android.content.pm.PackageManager$NameNotFoundException: com.android.webview
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5422)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: Caused by: android.util.AndroidRuntimeException: android.webkit.WebViewFactory$MissingWebViewPackageException: android.content.pm.PackageManager$NameNotFoundException: com.android.webview
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:218)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:165)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.webkit.CookieManager.getInstance(CookieManager.java:39)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at com.android.browser.BrowserSettings.syncSharedSettings(BrowserSettings.java:312)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at com.android.browser.BrowserSettings.setController(BrowserSettings.java:148)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at com.android.browser.Controller.<init>(Controller.java:235)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at com.android.browser.BrowserActivity.createController(BrowserActivity.java:84)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at com.android.browser.BrowserActivity.onCreate(BrowserActivity.java:73)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6251)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: … 9 more
06-30 19:59:36.184 2870 2870 E AndroidRuntime: Caused by: android.webkit.WebViewFactory$MissingWebViewPackageException: android.content.pm.PackageManager$NameNotFoundException: com.android.webview
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.webkit.WebViewFactory.fetchPackageInfo(WebViewFactory.java:116)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:190)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: … 19 more
06-30 19:59:36.184 2870 2870 E AndroidRuntime: Caused by: android.content.pm.PackageManager$NameNotFoundException: com.android.webview
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:137)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: at android.webkit.WebViewFactory.fetchPackageInfo(WebViewFactory.java:114)
06-30 19:59:36.184 2870 2870 E AndroidRuntime: … 20 more
06-30 19:59:36.186 585 600 W ActivityManager: Force finishing activity com.android.browser/.BrowserActivity
[/CODE]

Loading any other browser (via adb or otherwise) causes the same problems. Likewise, if you install Google Apps, you can’t get past the first start screen when it tries to hook to Google’s servers. Obviously that is not going to fly. So, I will do my best and keep plugging away at it in between other builds, but since LS has stopped development, I don’t think this one is going to make the cut of fully functional roms, due to my lack of experience with these sort of issues.

If you happen to know the answer to this problem, feel free to chime in, I could use the help!

For the brave, however, here is the download link, just remember, it is pretty buggy:
http://www.mediafire.com/download/9dxfzfn3wcsu3oj/LS-MM-v6.0-jfltetmo-20160628-lionheart-aklu.zip

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.

RWE: Step by step instructions for building AOKP 6.0 for the T-Mobile variant of the Samsung Galaxy S4

I have noticed that the build instructions on the AOKP website are a bit outdated. They date back to JellyBean. I would like to encourage other users to build more custom roms, and I thought that it would help if I show how to build one of the roms wich compiled successfully for me (Praise God!). It is my hope that these instructions are clear and easy to follow. Hey, if I can do it, anybody can do it!

<<<<< Step 1: Setup your system. >>>>>

To be honest, this can be the most daunting part, because if you do not set this up properly, it just will not work. I use Ubuntu 14.04 on a HP Compaq 6715b laptop. I know, not a very ideal compiler, but it is what I’ve got. Here are the suggested packages, just open a terminal and paste this in:

[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.

<<<<< Step 2: Download the source. >>>>>

Here is a very short project for you that takes the computer a long time to complete. Open a terminal and start typing:

[CODE]
$ cd ~
$ mkdir aokp6
$ cd aokp6
$ repo init -u https://github.com/AOKP/platform_manifest.git -b mm
$ repo sync
[/CODE]

You can now go outside, play with the kids, phone a friend, and then go to bed. When you awake the next morning, this might be done, depending on your internet connection!

<<<<< Step 3: Adding the device, kernel, and vendor trees. >>>>>

In some cases, you can simply type the command

[CODE]$ breakfast[/CODE]

and just choose your device, but at this time, the AOKP repository did not include a current device tree for the JFLTETMO phone, so we need to download one. I chose to test out the Dirty Unicorn JFLTETMO devices trees, by going here and choosing to download the zips. Later, perhaps we can learn about adding them as dependencies, but here are the links, be sure to choose the 6.0 branches and click the download button to download the zips:

https://github.com/DirtyUnicorns/android_device_samsung_jfltetmo
https://github.com/DirtyUnicorns/android_kernel_samsung_jf
https://github.com/DirtyUnicorns/android_device_samsung_jf-common
https://github.com/DirtyUnicorns/android_device_samsung_jflte
https://github.com/DirtyUnicorns/android_device_samsung_msm8960-common
https://github.com/DirtyUnicorns/android_device_samsung_qcom-common
https://github.com/TheMuppets/proprietary_vendor_samsung/tree/cm-13.0

Once you have downloaded them, unzip each one and rename them:

android_device_samsung_jfltetmo – jfltetmo
android_device_samsung_jf-common – jf-common
android_device_samsung_jflte – jflte
android_device_samsung_msm8960-common – msm8960-common
android_device_samsung_qcom-common – qcom-common

Go to you aokp6/device folder and create a folder called “samsung”. Now put the above folders into it.

Then unzip the kernel_samsung_jf folder and rename it “jf”. Go to the aokp6 folder and create a folder called “kernel”, go into the kernel folder and make a new folder called “samsung”, enter that folder, and put your “jf” folder here. Don’t worry, we are almost done.

Now go to your aokp6/vendor folder. Create a new folder called “samsung”. Enter the samsung folder and copy the contents of your unzipped proprietary_vendor_samsung folder. This should be a bunch of folders like jf-gsm-common, jf-common, etc. You actually don’t need all of these folders right now, but it will not hurt to have them, and there are two folders in there that you need.

Now you should probably take a break before going on to the next step!

<<<<< Step 4: Editing the device, kernel, and vendor trees. >>>>>

Now, go to the device/samsung/jfltetmo folder and rename du.mk to aokp.mk and edit it as follows:

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

# Enhanced NFC
$(call inherit-product, vendor/aokp/configs/nfc_enhanced.mk)

# Inherit some common DU stuff.
$(call inherit-product, vendor/aokp/configs/common_full_phone.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 := aokp_jfltetmo
PRODUCT_DEVICE := jfltetmo
[/CODE]

NOTE: the original file said “vendor/du/config/*” you must change it to “configs” or there will be an error!

Then, in the jfltetmo folder, delete the cm.dependencies file. Do the same deletion in all of the device/samsung/* directories. You don’t want to download CM dependencies, because you already have them here.

Note: Because repositories are constantly updated, I can only garuntee that this will work based on the files as they were the day of this writing. However, with all of this in place, if you follow this guide, it should work realatively the same as what happened for me.

You can actually just run the compiler right now, however, you will have several stop errors that we plan to address here before you do that. All of these edits are due to errors that cropped up when running the compiler.

The first error was relating to libhealthd. Android and AOKP source already has a built in libhealthd for the qcom motherboards, and it is a duplication of efforts (which causes an error) to have both the device tree libhealthd and the source libhealthd. So here is how we fix it. Now, go to the device/samsung/qcom-common/libhealthd folder, and make the following changes to the Android.mk file:

[CODE]
# WJH LOCAL_PATH := $(call my-dir)

# WJH include $(CLEAR_VARS)
# WJH LOCAL_SRC_FILES := healthd_board_default.cpp
# WJH LOCAL_MODULE := libhealthd.qcom
# WJH LOCAL_C_INCLUDES := system/core/healthd bootable/recovery
# WJH include $(BUILD_STATIC_LIBRARY)
[/CODE]

Another error that will crop up if you run the compiler now, is that your multi-media video will have a problem setting the picture order, and the compiler will get confused and stop with an error. So we can fix that here before we begin. We need to edit one of the hardware files. Go to hardware/qcom/media-caf/msm8960/mm-video/vidc/venc/src, and edit the video_encoder_device.cpp file as follows (this is the last few lines of the file):

[CODE]
bool venc_dev::venc_set_picture_order_count_type(OMX_U32 type)
{
// WJH venc_poctype temp;
// WJH venc_ioctl_msg ioctl_msg = {&temp, NULL};

// WJH temp.poc_type = type;
// WJH DEBUG_PRINT_HIGH(“Setting poc type: %d”, type);
// WJH if(ioctl(m_nDriver_fd, VEN_IOCTL_SET_PIC_ORDER_CNT_TYPE, (void *)&ioctl_msg) < 0)
// WJH {
// WJH DEBUG_PRINT_ERROR(“Request for setting poc type failed”);
// WJH return false;
// WJH }
return true;
}
[/CODE]

And finaly, there is an error that will pop up and stop your compiler because of a conflict over the “ambientIsAvailable” portion of this file: packages/apps/InCallUI/src/com/android/incallui/ModButtonPresenter.java at line 404. So we will just go ahead and edit it here before we begin.

[CODE]
final boolean showNote = isProvisioned &&
// WJH DeepLinkIntegrationManager.getInstance().ambientIsAvailable(getUi().getContext()) &&
mNoteDeepLink != null;
[/CODE]

Now that all of the hard work is done, it is time to actually build something!

<<<<< Step 5: Start your build! >>>>>

Phew! You have invested a lot of hours into this project, now it is time to actually put those files and time to use! Open up a terminal in your aokp6 folder and start typing:

[CODE]
aokp6$ . build/envsetup.sh
[/CODE]

Which will output something like this:

[CODE]
including vendor/aokp/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/aokp/bash_completion/git.bash
including vendor/aokp/bash_completion/repo.bash
[/CODE]

Now type:

[CODE]
aokp6$ brunch jfltetmo
[/CODE]

Which will start the long build process, it will output this:

[CODE]
including vendor/aokp/vendorsetup.sh
Got local manifest
Got local manifest
Checked dependency tree over :
NO_DEPS: device/*/jfltetmo

============================================
PLATFORM_VERSION_CODENAME = REL
PLATFORM_VERSION = 6.0.1
AOKP_VERSION = aokp_jfltetmo_mm_unofficial_2016-06-20_1015
TARGET_PRODUCT = aokp_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 = MOB30J
OUT_DIR = /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out
============================================
[/CODE]

And this:

[CODE]
…..edited for space…..

Import includes file: /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/import_includes
host C: libhost <= build/libs/host/CopyFile.c
build/libs/host/CopyFile.c:86:43: warning: unused parameter ‘pSrcStat’ [-Wunused-parameter]
static bool isSameFile(const struct stat* pSrcStat, const struct stat* pDstStat)
^
build/libs/host/CopyFile.c:86:72: warning: unused parameter ‘pDstStat’ [-Wunused-parameter]
static bool isSameFile(const struct stat* pSrcStat, const struct stat* pDstStat)
^
build/libs/host/CopyFile.c:104:42: warning: unused parameter ‘src’ [-Wunused-parameter]
static void printNotNewerMsg(const char* src, const char* dst, unsigned int options)
^
build/libs/host/CopyFile.c:531:69: warning: unused parameter ‘isCmdLine’ [-Wunused-parameter]
static int copyFileRecursive(const char* src, const char* dst, bool isCmdLine, unsigned int options)

…..edited for space….. Stuff like this will scroll by …..

Copy: /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libext4_intermediates/libipt_LOG.c
Copy: /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libext4_intermediates/libipt_MASQUERADE.c
Copy: /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libext4_intermediates/libipt_MIRROR.c
Copy: /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libext4_intermediates/libipt_NETMAP.c
target StaticLib: libip4tc (/home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libip4tc_intermediates/libip4tc.a)
target thumb C++: keystore <= system/security/keystore/keystore.cpp
target thumb C++: keystore <= system/security/keystore/keyblob_utils.cpp
target thumb C++: keystore <= system/security/keystore/operation.cpp

…..edited for space…..

[/CODE]

Notice that there were some “warning” flags in there. Warnings are not all bad, but they can be. In this case it works out okay. Hopefully, after many hours, you should see this:

[CODE]
______ _____ __ __ _____
/\ _ \/\ __`\/\ \/\ \ /\ _ `\
\ \ \L\ \ \ \/\ \ \ \/’/’\ \ \L\ \
\ \ __ \ \ \ \ \ \ , < \ \ ,__/
\ \ \/\ \ \ \_\ \ \ \\`\ \ \ \/
\ \_\ \_\ \_____\ \_\ \_\\ \_\
\/_/\/_/\/_____/\/_/\/_/ \/_/

===========-Package complete-===========
zip: /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/aokp_jfltetmo_mm_unofficial_2016-06-19_0149.zip
md5: 46bc18249c61988e75aba813464692a3
size: 320M
========================================
[/CODE]

Success! Praise God! Now you can put this on your phone and test it out! Hopefully everything will be working! For future use, now you can start making changes or edits, from backgrounds to kernels! Have fun and make lots of backups. Remember, sometimes it is really hard to undo a change that you make.

Hopefully we learned how to set up our system, get the source, add devices and kernels that are not in the source, make proper edits, and run the compiler. Like I said, this works on my machine, as of this writing. You may notice, that if you make this build, it will not be identical to the one that I have posted on XDA. That is because I have made a few edits, additions, and/or subtractions here and there. That is the great thing about Android and open source! It is now up to you to make it better, to make it unique, or to make it you. Good luck with those builds, and be sure to share and help the next guy or gal with thier projects too!

Linux – keep it simple.

 

Changing the default wallpaper in an Android build

The other day, God graciously allowed me to compile PAC-ROM MM for the T-Mobile Samsung Galaxy S4 (JFLTETMO SGH-M919). So there are a lot of great things about this rom, but there were also a few things that I thought were lacking in creativity. Simple things really. Like the background. It comes standard with the CyanogenMod background. Well, that just doesn’t seem very PacRomish. So, I downloaded a custom background and edited the jpg until it was the right shape and size. I typically use Gimp for that, and today was no exception. After making the jpg into a 1920×1280 jpg file, I then used my home built script to make all of the “default_wallpaper.jpg” files. Here is the script:

[CODE]
#!/bin/bash

echo “Changing name of jpg file.”
mv *.jpg 1920×1280.jpg

echo “Converting to 1080×960”
convert -resize 1080×960 1920×1280.jpg 1080×960.jpg
echo “Converting to 960×800”
convert -resize 960×800 1920×1280.jpg 960×800.jpg
echo “Converting to 1440×1280”
convert -resize 1440×1280 1920×1280.jpg 1440×1280.jpg
echo “Converting to 2160×1920”
convert -resize 2160×1920 1920×1280.jpg 2160×1920.jpg
echo “Converting to 2880×2560”
convert -resize 2880×2560 1920×1280.jpg 2880×2560.jpg

echo “making folders”
mkdir ./drawable-hdpi
mkdir ./drawable-nodpi
mkdir ./drawable-sw600dp-nodpi
mkdir ./drawable-sw720dp-nodpi
mkdir ./drawable-xhdpi
mkdir ./drawable-xxhdpi
mkdir ./drawable-xxxhdpi

echo “copying and renaming pictures”
cp ./1080×960.jpg ./drawable-hdpi/default_wallpaper.jpg
cp ./960×800.jpg ./drawable-nodpi/default_wallpaper.jpg
cp ./1920×1280.jpg ./drawable-sw600dp-nodpi/default_wallpaper.jpg
cp ./1920×1280.jpg ./drawable-sw720dp-nodpi/default_wallpaper.jpg
cp ./1440×1280.jpg ./drawable-xhdpi/default_wallpaper.jpg
cp ./2160×1920.jpg ./drawable-xxhdpi/default_wallpaper.jpg
cp ./2880×2560.jpg ./drawable-xxxhdpi/default_wallpaper.jpg

echo “Complete.”
echo “Move the drawable* folders to ‘vendor/pac/overlay/common/frameworks/base/core/res/res’ folder.”
[/CODE]

You have to have imagemagic installed on your machine to use this script. Then, simply place your jpg file in a folder by itself, add this script to the folder, and run it! Here is the output:

[CODE]
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/wallpapers/pacman/images$ ls
pacman.jpg picscriptphones.sh
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/wallpapers/pacman/images$ ./picscriptphones.sh
Changing name of jpg file.
Converting to 1080×960
Converting to 960×800
Converting to 1440×1280
Converting to 2160×1920
Converting to 2880×2560
making folders
copying and renaming pictures
Complete.
Move the drawable* folders to ‘vendor/pac/overlay/common/frameworks/base/core/res/res’ folder.
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/wallpapers/pacman/images$ ls
1080×960.jpg 2160×1920.jpg drawable-hdpi drawable-sw720dp-nodpi drawable-xxxhdpi
1440×1280.jpg 2880×2560.jpg drawable-nodpi drawable-xhdpi picscriptphones.sh
1920×1280.jpg 960×800.jpg drawable-sw600dp-nodpi drawable-xxhdpi
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/wallpapers/pacman/images$ ls drawable-hdpi/
default_wallpaper.jpg
alaskalinuxuser@alaskalinuxuser-HP-Compaq-6715b-FY288UC-ABA:~/Documents/projects/phones/wallpapers/pacman/images$
[/CODE]

Once I moved the drawable folders to the folder mentioned above, I simply re-ran the compiler:

[CODE]
$ brunch jfltetmo
…..Edited for space…..
===============================-Package complete-===============================
Zip: /home/alaskalinuxuser/Documents/projects/phones/compile/pac6/out/target/product/jfltetmo/pac_jfltetmo__20160616-055233.zip
MD5: 61321450dfd6eed47ac7702cb7da7b1a
Size: 294M
OTA Link: http://pac-rom.com/ota/?device=jfltetmo&version=pac_jfltetmo__20160616-055233&md5=61321450dfd6eed47ac7702cb7da7b1a
================================================================================
…..Edited for space…..
[/CODE]

Now even a simple change like the backgrounds takes a good bit of time. It took my slow computer 2 hours just to make this one change. So don’t be alarmed if it takes a while for you too!

Linux – keep it simple.

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.

Dirty Unicorns don’t play nice.

Dirty Unicorns don’t play nice. Well, at least this one doesn’t. A fellow XDA member made a request for a T-Mobile specific Dirty Unicorn 6.0.1 rom for their phone. I told them that I was working on some other projects, but I thought that I could squeeze it in somewhere. So here is the results of that labor.

To be honest, I have never used DU before, and I didn’t know much about it. It took a while to build it and I had to tweak a few things here and there, but God graciously allowed me to build it. I don’t think that it is something that I would use myself, it just doesn’t seem to be my “style”. It seems to have more of a “gansta” feel, but that’s just my opinion….

A quick test revealed a couple problems though:

  • Failed:
    -Camera app fails to show up. If it does, it took one pic and died.
    -other camera apps can’t use the camera and on reboot disappear.
    -GPS tracked satellites, but I didn’t get a lock in 10 minutes. May need more time.
    -MTP worked.
    -No sound from the speaker, but sound works during phone call.
  • Worked:
    -Phone calls, making and receiving.
    -Texting
    -Data/2g/3g/lte
    -WiFi
    -Bluetooth (tested with file transfer)
  • Notes: Seemed slow, unresponsive.
    -Without Gapps, system took 359 MB of ram to run.
    -With Banks Gapps, system took over 1200 MB of ram to run.

It was almost impressive in the lack of responsiveness with the Banks Gapps installed. Although, it was using over 60% of the phones ram just to run with those Gapps installed. This rom already has a GSM build that can be used on the T-Mobile variant, but according to the users, it is a bit buggy on our phone. Hence the request for a T-mobile specific build.You can find that here: http://forum.xda-developers.com/galaxy-s4/i9505-develop/rom-dirty-unicorns-10-0-t3292806 .Since there is already a better build for it, and I already have numerous builds to work on, I think I will let this one go. At least for now.

Some screenshots:

For the daring, here is a download link:

http://www.mediafire.com/download/9j9clvt4pi2ldjj/DU_jfltetmo_6.0.1_20160608-1313.v10.2-DIRTY-DEEDS.zip

Linux – keep it simple.

Error: recovery.img is too large!

Since I was having a spot of trouble with the SlimRoms 6.0 rom, I decided to give AOKP 6.0 a quick and dirty try. After syncing the source and adding the vendor/device trees, I gave it a whirl. Here was the first failure output to my terminal.

[CODE]
CUTABLES/surfaceflinger_intermediates/PACKED/surfaceflinger)
target Pack Relocations: camera.msm8960 (/home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/camera.msm8960_intermediates/PACKED/camera.msm8960.so)
INFO: Compaction : 0 bytes
INFO: Too few relocations to pack after alignment
target Symbolic: libexternal (/home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/symbols/system/lib/libexternal.so)
target Symbolic: libvirtual (/home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/symbols/system/lib/libvirtual.so)
target Symbolic: libRSCpuRef (/home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/symbols/system/lib/libRSCpuRef.so)
—– Making recovery image ——
+/home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/recovery.img maxsize=10543104 blocksize=135168 total=10633216 reserve=270336
error: +/home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/recovery.img too large (10633216 > [10813440 – 270336])
make: *** [/home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/recovery.img] Error 1
make: *** Deleting file `/home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/recovery.img’
make: *** Waiting for unfinished jobs….
make: Leaving directory `/home/alaskalinuxuser/Documents/projects/phones/compile/aokp6′

#### make failed to build some targets (09:11:54 (hh:mm:ss)) ####
[/CODE]

This was actually strange and encouraging. The entire build ran up to the point of making the recovery image. The issue was that the recovery image was bigger than the recovery space available. Seems odd to me, but I am not overly concerned with it. The main reason that this issue does not cause me concern is that none of the builds I am making actually include the recovery image in the zip file that is built. So, I edited device/samsung/jf-common/BoardConfig.mk to have a “larger” recovery drive, since the recovery image would not actually be loaded in the rom. Another option is to comment out the recovery size altogether, giving the compiler permission to make a recover image as large as it would like to.

Linux – Keep it simple.