AOKP Nougat on my Verizon Samsung Galaxy S5!

To God be the glory! My AOKP Nougat project for the Verizon Samsung Galaxy S5 finally works! Be sure to check it out under my home made ROMs link in the menu bar!

The super cool background is supplied by the Quiet Learner, you can find more of his great work here:

https://qlfiles.net
Linux – keep it simple.

fatal error: ‘liblights/samsung_lights_helper.h’ file not found

Moving on from the S4, I began work on the Note Edge, only to be greeted with this error:

[CODE]
target thumb C: lights.APQ8084 <= hardware/samsung/liblights/lights.c
hardware/samsung/liblights/lights.c:34:10: fatal error: ‘liblights/samsung_lights_helper.h’ file not found
#include <liblights/samsung_lights_helper.h>
^
1 error generated.
[/CODE]

The fix was easy enough, I checked the folder, and sure enough, it was not there. So, I downloaded it from here:

https://github.com/LineageOS/android_hardware_samsung/tree/310d1999e5478a28b73eacbc5b4db62174431ee9/liblights

I like simple problems!

Linux – keep it simple.

Yet again, error: package com.android.okhttp does not exist

By now, I think I would remember this one by heart, yet every time, this error throws me for a loop….

[CODE]
external/apache-http/../../frameworks/base/core/java/android/net/http/SslCertificate.java:19: error: cannot find symbol
import com.android.internal.util.HexDump;
^
symbol: class HexDump
location: package com.android.internal.util
external/apache-http/../../frameworks/base/core/java/android/net/http/SslCertificate.java:42: error: package com.android.org.bouncycastle.asn1.x509 does not exist
import com.android.org.bouncycastle.asn1.x509.X509Name;
^
external/apache-http/../../frameworks/base/core/java/android/net/http/HttpResponseCache.java:19: error: package com.android.okhttp does not exist
import com.android.okhttp.Cache;
^
external/apache-http/../../frameworks/base/core/java/android/net/http/HttpResponseCache.java:20: error: package com.android.okhttp does not exist
import com.android.okhttp.AndroidShimResponseCache;
^
external/apache-http/../../frameworks/base/core/java/android/net/http/HttpResponseCache.java:21: error: package com.android.okhttp does not exist
import com.android.okhttp.OkCacheContainer;
^
external/apache-http/../../frameworks/base/core/java/android/net/http/HttpResponseCache.java:152: error: cannot find symbol
public final class HttpResponseCache extends ResponseCache implements Closeable, OkCacheContainer {/home/alaskalinuxuser/compile/20170314_AOKP7/prebuilts/tools/common/m2/repository/com/squareup/okhttp/okhttp/2.5.0
^
symbol: class OkCacheContainer
external/apache-http/../../frameworks/base/core/java/android/net/http/HttpResponseCache.java:154: error: cannot find symbol
private final AndroidShimResponseCache delegate;
^
symbol: class AndroidShimResponseCache
location: class HttpResponseCache
external/apache-http/../../frameworks/base/core/java/android/net/http/HttpResponseCache.java:156: error: cannot find symbol
private HttpResponseCache(AndroidShimResponseCache delegate) {
^
symbol: class AndroidShimResponseCache
location: class HttpResponseCache
external/apache-http/../../frameworks/base/core/java/android/net/http/HttpResponseCache.java:296: error: cannot find symbol
public Cache getCache() {
^
symbol: class Cache
location: class HttpResponseCache
[/CODE]

And, from the same website that I fail to bookmark every time:

https://issuetracker.google.com/issues/37130763

These are caused by missing some package dependency. Following patch is used to fix it (for external/apache-http/Android.mk):

— a/Android.mk
+++ b/Android.mk
@@ -95,7 +95,7 @@ LOCAL_SRC_FILES += \
../../frameworks/base/core/java/android/net/http/SslError.java \

-LOCAL_JAVA_LIBRARIES := $(apache_http_java_libs)
+LOCAL_JAVA_LIBRARIES := $(apache_http_java_libs) okhttp bouncycastle framework
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/src \
$(LOCAL_PATH)/android \

That’s it. Those few ines make the whole thing work. Hopefully, I’m saving someone else from scouring the internet for this problem. Again.

Linux – keep it simple.

SyntaxError: invalid syntax

As I was wrapping up my work on the upgrade to 7.1.2 on the S4, I ran into this error, which prevented the compiler from building the userdata.img file. Here’s the output:

[CODE]
get/product/jfltetmo/userdata.img
File “./build/tools/releasetools/build_image.py”, line 157
print cmd
^
SyntaxError: invalid syntax
[/CODE]

The fix was actually quite easy. I needed to encapsulate the cmd in parenthesis, like this:

./build/tools/releasetools/build_image.py

[CODE]
cmd = “fec -e -p %d %s %s %s” % (padding_size, sparse_image_path,
verity_path, verity_fec_path)
print (cmd) # WJH
status, output = commands.getstatusoutput(cmd)
[/CODE]

The proof is in the pudding, but what help was how the cmd is defined, then notice that the “status, output” line also puts cmd in parenthesis. So, I did the same for the print cmd line, and it worked!

Linux – keep it simple.

Healthd problems with pointers to fonts….

In the continuing saga of updating to 7.1.2, I’ve run into an interesting error about gr_text and gr_measure that are used to set the fonts properly when you are charging your phone while it is off. In 7.1.1, this worked just fine:

AOKP711/system/core/healthd/healthd_mode_charger.cpp

[CODE]
static int draw_text(const char *str, int x, int y)
{
int str_len_px = gr_measure(str);

if (x < 0)
x = (gr_fb_width() – str_len_px) / 2;
if (y < 0)
y = (gr_fb_height() – char_height) / 2;
gr_text(x, y, str, 0);

return y + char_height;
———- Abreviated for space ——————–
gr_init();
gr_font_size(&char_width, &char_height);

#ifndef CHARGER_DISABLE_INIT_BLANK
[/CODE]

But that didn’t work in 7.1.2. I found this github commit for a sony phone: https://github.com/sonyxperiadev/device-sony-common/pull/247 and was able to modify it enough to fix the S4, like so:

AOKP712/system/core/healthd/healthd_mode_charger.cpp

[CODE]
static int draw_text(const char *str, int x, int y)
{
int str_len_px = gr_measure(gr_sys_font(), str); // WJH

if (x < 0)
x = (gr_fb_width() – str_len_px) / 2;
if (y < 0)
y = (gr_fb_height() – char_height) / 2;
gr_text(gr_sys_font(), x, y, str, 0); // WJH

return y + char_height;
———- Abreviated for space ——————–
gr_init();
gr_font_size(gr_sys_font(), &char_width, &char_height); //WJH

#ifndef CHARGER_DISABLE_INIT_BLANK
[/CODE]

It even worked! Hopefully that can help someone else out as well.

Linux – keep it simple.

 

CID_PATH not defined!

In an attempt to update the AOKP 7.1.1 rom for the Samsung Galaxy S4 to 7.1.2, I received an error about AOKP712/hardware/libhardware_legacy/wifi/wifi.c:179.18. The error complained that the CID_PATH was not defined, declared, or was not known.

Obviously, it was supposed to be declared somewhere, and I had two choices, declare it, or replace it with the actual path. I did the latter. Here is the old file:

[CODE]
#ifdef SAMSUNG_WIFI
char* get_samsung_wifi_type()
{
char buf[10];
int fd = open(CID_PATH, O_RDONLY);
if (fd < 0)
return NULL;
[/CODE]

And here is the new file changes:

[CODE]
#ifdef SAMSUNG_WIFI
char* get_samsung_wifi_type()
{
char buf[10];
int fd = open(“/data/.cid.info”, O_RDONLY); // WJH
if (fd < 0)
return NULL;
[/CODE]

And, to God be the glory, it works! One error down, only dozens to go!

Linux – keep it simple.

AOKP 7.1.1 for the Galaxy Note Edge!

To God be the glory, my AOKP NOUGAT project finally works!

My fellow T-Mobile-ians, (N915T) you have been left out of AOSP development long enough! By God’s grace I was able to use mickey387’s great tbltexx work, and completely adapt it to our tbltetmo after extracting all of the needed firmware from our 6.0.1 stock roms! No data zips are required here! It is all built in!

I also have made an international version (N915G/F/FY) as well!
This is not a dirty unicorn. This is the original unicorn, the AOKP. Now made out of Nougat! That’s right, all of the AOKP stuff you love, plus LineageOS, plus a built in side bar, and more! All wrapped up into one! With tons of settings from status bar tweaks to button remaps, it’s all here and ready to rumble!

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

Features and Screenshots!

– Advanced Reboot
– Omni-Switcher
– Kernel Adiutor

+ Rom Control:

+ App Launchers
– App Circle Bar
– App Side Bar
– Gesture Anywhere

+ General
– cLock settings
– Recents settings
– Wakelock Blocker

+ Hardware Keys
– Backlight control
– Power button options
– Launch vibration control
– Home button controls
– Recents button controls
– Long press options, double tap options
– Kill app back button option
– Volume buttons wake
– Volume button playback controls
– Keyboard cursor controls
– Volume button reorientation
– IME features

+ Lockscreen
– Media Cover art
– Display music visualizer
– Show weather
– Blur background
– Fingerprint auth vibration
– Double tap to sleep (DT2S)
– Disable quick settings
– Show lockscreen clock and date
– Lockscreen notification count

+ Notification Drawer
– Brightness slider
– Brightness icon
– Rows in portrait and landscape modes
– Columns
– Tile Animations
– Advanced data tile
– Smart pulldown
– Quick pulldown

+ Power Menu
– Animation choices
– Screenshots
– Screenrecord
– Airplane mode
– Sound Panel

+ Sound
– Various sound settings
– Volumn step control

+ Status Bar tweaks
– Network traffic
– Clock style
– Double tap to sleep (DT2S)
– Superuser indicator
– Icon controls
– AOKP logo

+ User interface
– Toast controls
– AOKP animations
– Transparency controls

AND MORE!!!

Background image:
https://qlfiles.net/2017/01/07/upload-fractal-images/
The background images that I used in this ROM came from the Quiet Learner. You should check out his mathematical artwork, including 3D mandelbox images!

Ready to download? Check it out under my menu –> Homemade Roms –> Galaxy Note Edge!

Linux – keep it simple.

AOKP N 7.1.1 for the JFLTETMO and JFLTEXX

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

If you are interested in a *mostly* working AOKP 7.1.1 rom for the JFLTETMO or JFLTEXX, head over to XDA or look under my Homemade Roms page for a download link!

http://forum.xda-developers.com/galaxy-s4-tmobile/development/rom-aokp-n-t3519280

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

 

!!!FIRST BOOT TAKES ABOUT 5 EARTH MINUTES TO COMPLETE!!!

Installation instructions:
-Download ROM and gapps, and put them on your phone or external storage.
-Reboot into recovery mode – TWRP (I personally installed this using 3.0.2-0).
-Backup what you had. (Just to be safe.)
-Wipe. (I personally wipe everything prior to flashing new roms, but at least do the basic wipe.)
-Install Rom.
-Install Gapps. – Optional
-Reboot to system and enjoy!

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

What works:
So far everything that I have tried works, such as
- Camera for pictures only!
- Phone calls/receiving
- Data 2g/3g/LTE
- Bluetooth* - Music and File transfer.
- WiFi
- PTP
- GPS
- Multi-Window, just long press the "recents" button.
etc....

What doesn't:
- Video recording with the camera doesn't work, pictures work, but not video.
- MTP sometimes works, but is finicky, but PTP is also an option and works every time.
- Bluetooth works, but sometimes the Bluetooth share app crashes.
- Browser works, but sometimes doesn't display typing letters until you press enter/search. (I recommend you download a different browser.)
- Choosing to reboot the phone sometimes takes a loooong time. It may be better to Power off and then start the phone, which is faster for some reason.
-Let me know in the forums if you find other issues so I can work on fixing them.

 

 

Here are some screenshots:

Linux – keep it simple.

Gello and Maven errors while compiling AOKP MM!

Let’s take a look at the problem code:

[CODE]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.10:get (default-cli) on project standalone-pom: Couldn’t download artifact: Could not transfer artifact org.cyanogenmod:gello:apk:40 from/to central (https://maven.cyanogenmod.org/artifactory/gello_prebuilds): peer not authenticated
[ERROR] org.cyanogenmod:gello:apk:40
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true, snapshots=false),
[ERROR] central (https://maven.cyanogenmod.org/artifactory/gello_prebuilds, releases=true, snapshots=true)
[ERROR] -&gt; [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Export includes file: art/compiler/Android.mk — /home/alaskalinuxuser/compile/build_aokp6/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libart-compiler_intermediates/export_includes
Export includes file: art/runtime/Android.mk — /home/alaskalinuxuser/compile/build_aokp6/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libart_intermediates/export_includes
make: *** [/home/alaskalinuxuser/compile/build_aokp6/out/target/common/obj/APPS/Gello_intermediates/org.cyanogenmod.gello-40.apk] Error 1
make: *** Waiting for unfinished jobs….
[/CODE]

Here was a problem that stumped me for quite some time. Mainly because the solutions offered online were the wrong ones. Every Google search I did led me to the same two answers: install maven and update my keys for openJDK-7. The problem with those solutions is that neither one of them were the real problem. At least, not that I know of. I did find a workaround for this issue, but never actually solved it.

The problem: apparently, to save time while compiling, Gello, CM’s new browser, is downloaded via maven rather than actually built on your machine. I am sure that cuts down on the compile time by a minute or two, but probably doesn’t actually save much time. Especially on my slow internet connection.

For some reason, when contacting the maven.cyanogenmod.org repo and trying to download the prebuilt Gello, something goes wrong. The only way to see what went wrong would be to re-run maven with the -e switch to get all of the details.

The workaround:
While working on this, I decided to attack this from a different angle, I decided, rather than solving the problem, to find a workaround. How can I get Gello without using the prebuilts? Well, you can:

export WITH_GELLO_SOURCE=true

And then when you compile, make will attempt to build Gello from the source you have. Except that you probably don’t have the source in your tree, like I found out by trying this. Yes, since you are expected to download the prebuilt, you then don’t download the source. So that would work, if you go and download all of the source.

Or you can just ditch Gello by deleting the Gello folder from the vendor/aokp folder. Then you will not build Gello, or so I though. This does work, provided that your device tree does not specifically call for Gello to be made in your boardconfig file or your device.mk file. Provided those are both true, then you will not get this error.

But, what if you want Gello? Well, you can always download the prebuilt version yourself and add it to your prebuilt folder. Which is the easy way around this mess.

Linux – keep it simple.

CONGRATS YOU EARNED A STINKEYE FROM CID!

Well, this certainly is an original code error if I ever saw one.

[CODE]prebuilts/cmsdk/api/6.txt:745: error 8: Removed public class cyanogenmod.platform.R.color
prebuilts/cmsdk/api/6.txt:749: error 8: Removed public class cyanogenmod.platform.R.dimen
prebuilts/cmsdk/api/6.txt:765: error 8: Removed public class cyanogenmod.platform.R.layout

******************************
You have tried to change the API from what has been previously approved.

STOP.
Read this:
https://github.com/CyanogenMod/cm_platform_sdk/wiki/Creating-an-API-for-the-SDK#updating–verifying-the-api

To make these errors go away, you have two choices:
1) You can add “@hide” javadoc comments to the methods, etc. listed in the
errors above.

2) You can update current.txt (locally) by executing the following command:
make update-cm-api

^^^^^^^^^^^^^^^^^^
CONGRATS YOU EARNED A STINKEYE FROM CID!
[/CODE]

It even comes with it’s very own ASCII art, which I did not post here. The above implies that I need to make some changes to my api files. Option #2 sounded really easy, so I gave it a try, here was the output:

[CODE]
$ make update-cm-api
…..edited for space…….
nes/compile/build_aokp7/out/target/common/docs/cm-api-stubs
35 warnings
[100% 5/5] build update-cm-public-api
Copying cm_current.txt
Copying cm_removed.txt

#### make completed successfully (02:47 (mm:ss)) ####
[/CODE]

However, it didn’t solve the problem. Then I tried option #1 by editing the build_aokp7/prebuilts/cmsdk/api/6.txt file. I simply added @hide to the beginning of lines that were flagged, in this case, lines 745, 749, and 769. Once that was done, I stopped getting the stinkeye error. Hopefully that will be useful for you to know as well.

Linux – keep it simple.