AudioPolicyManager.cpp:2240:65: error: member reference type ‘android::AudioMix *’ is a pointer

Well, that was a new one to me! I had just build LineageOS and Resurrection Remix for the XA2 Ultra, and now I got this error in the first minute of trying to build AOKP. Here’s the full error:

vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2240:65: error: member reference type ‘android::AudioMix *’ is a pointer; did you mean to use ‘->’?
sp<AudioPolicyMix> policyMix = inputDesc->mPolicyMix.promote();
~~~~~~~~~~~~~~~~~~~~~^
->
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2240:66: error: no member named ‘promote’ in ‘android::AudioMix’
sp<AudioPolicyMix> policyMix = inputDesc->mPolicyMix.promote();
~~~~~~~~~~~~~~~~~~~~~ ^
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2243:37: error: no member named ‘mCbFlags’ in ‘android::AudioPolicyMix’
&& ((policyMix->mCbFlags & AudioMix::kCbFlagNotifyActivity) != 0)) {
~~~~~~~~~ ^
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2244:77: error: no member named ‘mDeviceAddress’ in ‘android::AudioPolicyMix’
mpClientInterface->onDynamicPolicyMixStateUpdate(policyMix->mDeviceAddress,
~~~~~~~~~ ^
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2265:39: error: no member named ‘mMixType’ in ‘android::AudioPolicyMix’
} else if (policyMix->mMixType == MIX_TYPE_PLAYERS) {
~~~~~~~~~ ^
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2266:42: error: no member named ‘mDeviceAddress’ in ‘android::AudioPolicyMix’
address = policyMix->mDeviceAddress;
~~~~~~~~~ ^
6 errors generated.

Ironically, the vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp file is common to all three ROMs, Lineage, RR, and AOKP. So how is it that it fails on AOKP, but gives me no errors on Lineage or RR? As it turns out, there was a commit to /frameworks/av in Lineage and RR that was not performed on AOKP. You can take a look at the commit yourself if you’d like.

Essentially, you have a situation where the target ROM (AOKP) has dependencies mixed from the source ROM (LineageOS). Some of these dependencies were updated with the new code, and some were not, making a half done product that didn’t build. This is one of the problems when you are working on the latest versions of custom ROMs, is that there may be a few errors that are due to dependencies being changed.

So, there were two options for fixing this:

  1. Update /frameworks/av to match LineageOS.
  2. Rollback the changes in qcom’s audio policy.

The first is the most progressive, as the changes will probably come to that anyways, but it may require making other changes to more and more files. Just perusing the files looked like changing 10 files on about 80 different lines, but these may affect other files or lines as well.

That said, the simpler answer was to go with the second option and roll back the changes in the qcom audio policy. This only required changing about 6 or 7 lines in one file, which was much easier to accomplish.

If you look at the commit that made the changes, you can see the few lines that are edited to make this work properly. Fortunately the quick rollback fixed the issue and allows the build to continue.

audio

Linux – keep it simple.

E Zygote : java.lang.IllegalStateException: Signature|privileged permissions not in privapp-permissions whitelist

whitelist

More dreaded whitelist errors! Essentially, an app is trying to do something it should not be allowed to do. You can see the logs here:

E Zygote : java.lang.IllegalStateException: Signature|privileged permissions not in privapp-permissions whitelist: {com.android.systemui: android.permission.NAVIGATION_EDITOR, org.omnirom.omnistyle: android.permission.CHANGE_OVERLAY_PACKAGES, com.android.systemui: android.permission.PACKAGE_USAGE_STATS, com.android.settings: android.permission.ACCESS_FONT_MANAGER, com.android.settings: android.permission.NAVIGATION_EDITOR, com.android.systemui: android.permission.FORCE_STOP_PACKAGES, com.android.launcher3: android.permission.STATUS_BAR}

The funny part is, these apps are system apps, built in Resurrection Remix itself. That means that these errors are caused by the people who put RR together. Most likely, since it draws from LineageOS at it’s base, changes were made to LineageOS, and RR has not caught on yet. Either way, this is an easy fix, but will become a recurring problem.

In this RR rom, go to:

/frameworks/base/data/etc/privapp-permissions-platform.xml

and open it up. If you search in this file for com.android.launcher3, you will find it listed there, with a few “whitelisted” or pre-approved, permissions.

<privapp-permissions package=”com.android.launcher3″>
<permission name=”android.permission.BIND_APPWIDGET”/>
<permission name=”android.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS”/>
<permission name=”android.permission.GET_ACCOUNTS_PRIVILEGED”/>
</privapp-permissions>

Notice that the error said that the launcher needs “android.permission.STATUS_BAR” and it’s not on the list. So, you need to add it to the list, like so:

<privapp-permissions package=”com.android.launcher3″>
<permission name=”android.permission.BIND_APPWIDGET”/>
<permission name=”android.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS”/>
<permission name=”android.permission.GET_ACCOUNTS_PRIVILEGED”/><permission name=”android.permission.STATUS_BAR”/>
</privapp-permissions>

Now you will have solved your problem. However, this might not be the best place to fix this. Another place that is more likely to be useful is in this file:

/vendor/rr/config/permissions/privapp-permissions-lineage.xml

Or to make a privapp-permissions-rr.xml file.

In either case, the only issue with doing it this way is that every time you sync the repo, you will need to solve this issue again, and again, and again. So, you could take two alternative routes:

  1. Make an overlay file in your device tree and overlay these permissions.
  2. Make a pull request on the RR repo to fix the actual issue.

The second method is the best, because this helps everyone. It also clears up problems with overlay files when the original file does get fixed later. Either way, this will solve your problem.

Linux – keep it simple.

Finding the real errors in your Android logcat…

So, you built a rom, and something went wrong. It’s stuck at the boot logo, or it does boot up, but doesn’t do “xyz” action, or it crashes right after you get to the home screen. You’ve played this game before, you pull logs, and all you can see is line after line of errors. Where do you start?

This happens to me all the time. It can be really tough trying to figure out which error is the one that brought the system down, but there are a few key tips to help you unlock the real problem.

  • Look for the key phrases, like “beginning of crash”

Typically, this phrase is when things are going downhill fast. Oft, when things are at this point, the following data will repeat itself and may or may not be helpful, as it may or may not be able to finish writing down the issue. Typically, the lines just before and after this phrase are your biggest clue. Here’s an example:

08-14 15:55:22.357 1468 1468 E System : ******************************************
08-14 15:55:22.358 1468 1468 E System : ************ Failure starting system services
08-14 15:55:22.358 1468 1468 E System : java.lang.IllegalStateException: Signature|privileged permissions not in privapp-permissions whitelist: {com.android.systemui: android.permission.NAVIGATION_EDITOR, org.omnirom.omnistyle: android.permission.CHANGE_OVERLAY_PACKAGES, com.android.systemui: android.permission.PACKAGE_USAGE_STATS, com.android.settings: android.permission.ACCESS_FONT_MANAGER, com.android.settings: android.permission.NAVIGATION_EDITOR, com.android.systemui: android.permission.FORCE_STOP_PACKAGES, com.android.launcher3: android.permission.STATUS_BAR}
08-14 15:55:22.358 1468 1468 E System : at com.android.server.pm.permission.PermissionManagerService.systemReady(PermissionManagerService.java:2005)
08-14 15:55:22.358 1468 1468 E System : at com.android.server.pm.permission.PermissionManagerService.access$100(PermissionManagerService.java:89)
08-14 15:55:22.358 1468 1468 E System : at com.android.server.pm.permission.PermissionManagerService$PermissionManagerInternalImpl.systemReady(PermissionManagerService.java:2052)
08-14 15:55:22.358 1468 1468 E System : at com.android.server.pm.PackageManagerService.systemReady(PackageManagerService.java:21423)
08-14 15:55:22.358 1468 1468 E System : at com.android.server.SystemServer.startOtherServices(SystemServer.java:1791)
08-14 15:55:22.358 1468 1468 E System : at com.android.server.SystemServer.run(SystemServer.java:464)
08-14 15:55:22.358 1468 1468 E System : at com.android.server.SystemServer.main(SystemServer.java:309)
08-14 15:55:22.358 1468 1468 E System : at java.lang.reflect.Method.invoke(Native Method)
08-14 15:55:22.358 1468 1468 E System : at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
08-14 15:55:22.358 1468 1468 E System : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:838)
08-14 15:55:22.359 1468 1468 D SystemServerTiming: MakePackageManagerServiceReady took to complete: 514ms
08-14 15:55:22.359 1468 1468 E Zygote : System zygote died with exception
08-14 15:55:22.359 1468 1468 E Zygote : java.lang.IllegalStateException: Signature|privileged permissions not in privapp-permissions whitelist: {com.android.systemui: android.permission.NAVIGATION_EDITOR, org.omnirom.omnistyle: android.permission.CHANGE_OVERLAY_PACKAGES, com.android.systemui: android.permission.PACKAGE_USAGE_STATS, com.android.settings: android.permission.ACCESS_FONT_MANAGER, com.android.settings: android.permission.NAVIGATION_EDITOR, com.android.systemui: android.permission.FORCE_STOP_PACKAGES, com.android.launcher3: android.permission.STATUS_BAR}
08-14 15:55:22.359 1468 1468 E Zygote : at com.android.server.pm.permission.PermissionManagerService.systemReady(PermissionManagerService.java:2005)
08-14 15:55:22.359 1468 1468 E Zygote : at com.android.server.pm.permission.PermissionManagerService.access$100(PermissionManagerService.java:89)
08-14 15:55:22.359 1468 1468 E Zygote : at com.android.server.pm.permission.PermissionManagerService$PermissionManagerInternalImpl.systemReady(PermissionManagerService.java:2052)
08-14 15:55:22.359 1468 1468 E Zygote : at com.android.server.pm.PackageManagerService.systemReady(PackageManagerService.java:21423)
08-14 15:55:22.359 1468 1468 E Zygote : at com.android.server.SystemServer.startOtherServices(SystemServer.java:1791)
08-14 15:55:22.359 1468 1468 E Zygote : at com.android.server.SystemServer.run(SystemServer.java:464)
08-14 15:55:22.359 1468 1468 E Zygote : at com.android.server.SystemServer.main(SystemServer.java:309)
08-14 15:55:22.359 1468 1468 E Zygote : at java.lang.reflect.Method.invoke(Native Method)
08-14 15:55:22.359 1468 1468 E Zygote : at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
08-14 15:55:22.359 1468 1468 E Zygote : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:838)
08-14 15:55:22.360 1468 1468 D AndroidRuntime: Shutting down VM
——— beginning of crash
08-14 15:55:22.361 1468 1468 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main
08-14 15:55:22.361 1468 1468 E AndroidRuntime: java.lang.IllegalStateException: Signature|privileged permissions not in privapp-permissions whitelist: {com.android.systemui: android.permission.NAVIGATION_EDITOR, org.omnirom.omnistyle: android.permission.CHANGE_OVERLAY_PACKAGES, com.android.systemui: android.permission.PACKAGE_USAGE_STATS, com.android.settings: android.permission.ACCESS_FONT_MANAGER, com.android.settings: android.permission.NAVIGATION_EDITOR, com.android.systemui: android.permission.FORCE_STOP_PACKAGES, com.android.launcher3: android.permission.STATUS_BAR}
08-14 15:55:22.361 1468 1468 E AndroidRuntime: at com.android.server.pm.permission.PermissionManagerService.systemReady(PermissionManagerService.java:2005)
08-14 15:55:22.361 1468 1468 E AndroidRuntime: at com.android.server.pm.permission.PermissionManagerService.access$100(PermissionManagerService.java:89)
08-14 15:55:22.361 1468 1468 E AndroidRuntime: at com.android.server.pm.permission.PermissionManagerService$PermissionManagerInternalImpl.systemReady(PermissionManagerService.java:2052)
08-14 15:55:22.361 1468 1468 E AndroidRuntime: at com.android.server.pm.PackageManagerService.systemReady(PackageManagerService.java:21423)
08-14 15:55:22.361 1468 1468 E AndroidRuntime: at com.android.server.SystemServer.startOtherServices(SystemServer.java:1791)
08-14 15:55:22.361 1468 1468 E AndroidRuntime: at com.android.server.SystemServer.run(SystemServer.java:464)
08-14 15:55:22.361 1468 1468 E AndroidRuntime: at com.android.server.SystemServer.main(SystemServer.java:309)
08-14 15:55:22.361 1468 1468 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
08-14 15:55:22.361 1468 1468 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
08-14 15:55:22.361 1468 1468 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:838)
08-14 15:55:22.368 1468 1856 V FontService: CurrentFontPreviewDir absolute path = /data/system/theme/font_previews/com.custom.fonts/Inconsolata
08-14 15:55:22.369 1468 1468 I Process : Sending signal. PID: 1468 SIG: 9

Other great phrases to watch for are:

  1. crash
  2. fail
  3. not found
  4. error
  5. fatal

Usually these phrases will be what you are looking for.

I highlighted the “beginning of crash” line in bold and underlined it to make it easier for you to read. Here we see that the preceding 20-ish lines and following 20-ish lines are all about how the system is struggling with a fatal error, because there are permission issues. (I’ll talk more about solving this next post.)

That’s fine and dandy if you have an actual crash, but doesn’t help if you just have errors in the log and something isn’t functioning correctly. Or sometimes you can have a crash, but there is no “tattle-tale” information that shows you what the problem is. You just start going back through all the “E” errors in the log trying to find one that is the culprit.

  • Compare your log to another to sort out minor errors.

This is not always a viable option, but it has been helpful for me in the past. For instance, recently I purchased an Xperia XA2 Ultra. It had a LineageOS Pie build, but no Resurrection Remix Pie, so I decided to make one. RR didn’t finish booting, but there were a lot of errors in the file, and it was difficult to pinpoint which one was the main culprit.

Take for example, this line:

E Sensors : sns_reg_conf_la.c(766):cei_project_id = BY25

Is it a big deal, or not?

So, I took a logcat of the good, booting, functional LineageOS Pie rom, and a logcat of the bad, not booting RR rom, and compared them with diffuse. Turns out that the above line is in both files, so it’s not too big of a concern right now (but I should fix it later).

lin_rr

This can be very tedious, though, as 28 thousand lines is a lot to sort through. Fortunately, Linux has some handy commands to help you with that. First, I cut the time out of the files:

$ cut -c31- linfirstbootedit.txt |tee linNoTime.txt
$ cut -c31- rrFirstBootedit.txt |tee rrNoTime.txt

Now I had the files without the time at the beginning, which makes them easier to sort. Then, I sorted them and compared them, pulling only the different lines.

comm -23 <(sort rrNoTime.txt) <(sort linNoTime.txt) > Just_rr_Uniq.txt

The sort function puts them in alphanumeric order. Once the two files are sorted, they are compared, and I only take the output of the RR log file that is unique. Now I have eliminated all errors that were in both files. Thus, any errors that were in LineageOS were okay for booting (not okay totally, but didn’t prevent function).

Now I have a list of just the unique lines. Now I can just grab the errors:

cat Just_rr_Uniq.txt |grep ^” E”

And viola! Now I am only looking at the errors that are unique to the RR rom. That cut my file from 28000 lines to a simple 1280! Whatever these errors are, they would be a good place to start looking, since they only happen on the rom that doesn’t work properly.

It’s also good to keep your original logcat untouched, so you can reference it later. Note that the grep’d, sorted, and cut file will be missing key information around the error you are looking at. Hopefully that helps you get pointed in the right direction.

Linux – keep it simple.

Resurrection Remix Pie for the XA2 Ultra!

To God be the glory, I finally finished a XA2 Ultra build of Resurrection Remix! It’s Resurrection Remix, Pie flavored! You can check it out on XDA if you would like, but here is my post from there:

Here’s a quote from RR:

We work to make your android experience elegant. Handpicked features beautifully packed into one ROM.

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

A huge thanks to the Resurrection Remix team! Another huge thanks goes out to XDA developer LuK1337 for all of the great development that he did on the Sony Xperia XA2 Ultra! He did most of the heavy lifting by making a great LineageOS build, upon which this RR is based. Please note, this is an UNOFFICIAL ROM.

Disclaimer: Resurrection Remix is not responsible for any damages to your device.
All of my work is completely available for any who wish to use or modify it. I didn’t make Resurrection Remix, the device trees, or vendor blobs. I simply used and edited existing material. A huge thanks should go to those who actually created this stuff.

This Unofficial Resurrection Remix Pie ROM was built for H3223 (discovery), but may work on some of the other variants, please try at your own risk. However, if you do try it on another variant, please be sure to let me know in the comments how it worked.

Downloads:
Rom Download link:
WARNING: This is only for those on firmware versions 50.1.xxxxxx, not for those who are on firmware versions 50.2.xxxx and up. I plan on working on updated firmware versions later.
http://www.mediafire.com/folder/6ni8bw8ansajf/pie
There is an ENGINEERING and USERDEBUG build. The ENG build is marked “ENG” for testing purposes only. You can install anything you want, but I recommend not installing the ENG build.

Gapps link:
[url]http://opengapps.org/[/url]
If desired. Personally, I’ve gone Gapp-less.

Installation instructions:
-Download ROM and gapps, and put them on your removable sdcard storage. (Or leave on your computer and flash with adb sideload.)
-Reboot into the bootloader.
-Fastboot boot your TWRP.
-Backup what you had. (Just to be safe.)
-Wipe everything and format data.
-Install Rom. (Either from adb sideload or from your removable sdcard storage.)
-Reboot to system and enjoy!
If you also want Gapps:
-Reboot again into the bootloader.
-Fastboot boot your TWRP.
-Install Gapps. – Optional
If you plan to install magisk (good idea), then let the rom boot the first time, then go back to TWRP and flash magisk. This is optional, of course.

What works:

So far everything that I have tried works, such as

Camera for pictures and video, Phone calls, Data 3g/LTE, Bluetooth, WiFi, MTP, etc….

What doesn’t: Nothing that I know of, but if you find something, please let me know so we can try to fix it!

Source Code:
https://github.com/ResurrectionRemix
Official website:
http://www.resurrectionremix.com/
My device trees, vendor blobs, and kernel source:
https://gitlab.com/alaskalinuxuser

ROM OS Version: 9.0 Pie
RR version: 7.0.2
ROM Kernel: Linux 4.4.153
Based On: The best of every ROM, but particularly based on LineageOS.

Created 2019-08-16

Linux – keep it simple

 

Engineering Pie Build for the Sony Xperia XA2 Ultra!

So it’s been a rough start for me, stepping into the modern world with a modern phone that has a/b partitioning and was Android 8.0+. I’ve built dozens of roms for dozens of phones, some that were even unsupported, and to God be the glory, I was moderately successful, but these modern phones have been a different story. My first attempt with the Xperia XA2 Ultra ended up hard bricked. Then, I built a pie version of AOKP, which did boot, but would immediately crash after getting to the home screen.

Today, however, was off to a much better start. I successfully tested my engineering build of LineageOS 16.0 (pie) for my XA2 Ultra (discovery). Everything seems to work well, and you are welcome to try it out. Keep in mind, though, it is an engineering build as opposed to a user build. Also note that this is for the 50.1.x firmware variants.

Granted, a lineage build is already available, and most of the work was done by Luke. I like to compile a build on my own, though, to make sure my system is set up properly and that the source material does work before I get started on my own roms.

Now to get back to that AOKP build…. Or should I start on a Resurrection Remix build instead?

Linux – keep it simple.

TWRP on the Urbane!

One of the side projects I have been working on is playing around with my new to me smart watch, an LG Urbane (W150). Among the different projects, I built TWRP for it. It had already been built before, but I like to build my own as well. You can download it here if you want:

http://www.mediafire.com/folder/2xfs23b79kfzo/Urbane

One of the little highlights I did to make it more fun was to add a custom slider to the build. Now when you unlock or use the slider, you will see my icon on the slider!

slider_touch

Your welcome to use it if you like. Or you can head over to the TWRP homepage and download the official versions.

Linux – keep it simple.

YouTube milestone, 1000 subscribers want to know how to build Android!

Hey everyone! Praise God! Great news! I just passed 1000 subscribers on YouTube and I just wanted to take a minute to thank all of you for taking this journey with me.

It’s a bit funny, since I thought that posting the original videos about building Android was a one time deal, and after that I would be done making them. Through your encouragement and questions, I’ve now got over 240 videos all about building android and apps.

I have a new link for my channel:
http://www.youtube.com/c/AlaskaLinuxUserAKLU

But don’t worry, the old one still works if you have it bookmarked.

I’ve got a few more adventures in android building coming up, including upgrading the BLU phone to Oreo ( I was able to boot Oreo the other day, it doesn’t work very well, but it is pretty good progress for a lollipop phone ), including marshmallow and nougat along the way.

Please keep the questions and suggestions coming in, as these help me understand what videos I should focus on next. Down the road I hope to make some videos on building without ninja and jack, as well as building generic system images ( gsi ). Thanks again everyone!

-Alaskalinuxuser

Video Tutorial for Building Android: Advanced Topics

twrp
Praise God! Another video series featuring more advanced material!
Previously, I had created a video tutorial and guide for how to compile Android, from Lollipop through Marshmallow, Nougat, and Oreo. If you need help learning the basics or intermediate material, please see my other video tutorial thread on XDA, Or here on my website through the navigation bar at the top.

Who is this video series for?
Well, this video tutorial is a guide built primarily for the intermediate Android developer. This is written for those who already know how to compile custom roms for a phone that they own using device trees and vendor files that are already available. Things like using git, GitHub, GitLab, ADB, fastboot, and repo sync should already be something familiar to them.

That said, I believe that an intermediate developer will find this set of videos to be most helpful. The goal of this video series is to push the intermediate developer up to a rudimentary advanced level.

Advanced developer?
An advanced rom/kernel developer will probably far exceed my feeble abilities, and will not likely find much useful information here. Perhaps if you are an advanced developer, you would consider making another tutorial or adding to this advanced video series! (See further posts for recommendations on contributing videos.) Please! I’d really like to add links to your YouTube channel, or your git repository full of advanced topics for developers! Help up the quality of devices and builds of Android by showing others what you know how to do best!

Why did you put this together?
Well, after releasing the previous tutorial, explaining to beginners how to use things like git, repo sync, compile roms, and do small kernel modification, it was brought to my attention that a more advanced course was needed for intermediate users who already know how to build roms, but may (like myself) struggle with more complicated tasks. I don’t know how to do everything, and we all have to take the next step sometime, so why not take that next step together?

What’s in the videos?
During the series, we will be attempting several more advanced tasks. At present, there is not a lot in the series, but below are some of the highlights from what is available.

  • A: Building a device tree from scratch
  • B: Upgrading a device from Marshmallow to Nougat
  • C: Creating your very own custom rom!

Section A: Building a device tree from scratch:

+ Research
+ Finding similar devices
+ Pulling vendor files
+ Setting up a device tree
+ Getting block device information
+ Pulling kernel information
+ Breaking down boot images
+ Build errors
+ Target Assets
+ Tombstones AND MORE!

Download links: The video quality is now HD!
MP4 Video GitLab:
https://gitlab.com/alaskalinuxuser/advanced_course_android_developer_guide_mp4

MP4 Video Downloads:
https://gitlab.com/alaskalinuxuser/advanced_course_android_developer_guide_mp4/-/archive/master/advanced_course_android_developer_guide_mp4-master.zip

YouTube links: The YouTube quality is now HD!
https://www.youtube.com/watch?v=5c66tBsiVVM&list=PLRJ9-cX1yE1nnhWBrZtuVz5YC2OPfQVVp

Section B: Upgrading a device from Marshmallow to Nougat (Work in progress) :

+ Research
+ Finding similar devices
+ Comparing changes
+ Editing a device tree
+ Build errors
+ AND MORE!

Download links: The video quality is now HD!
MP4 Video GitLab:
https://gitlab.com/alaskalinuxuser/HD_Android_Compile_Upgrade_MN_Videos

MP4 Video Downloads:
https://gitlab.com/alaskalinuxuser/HD_Android_Compile_Upgrade_MN_Videos/-/archive/master/HD_Android_Compile_Upgrade_MN_Videos-master.zip

YouTube links: The YouTube quality is now HD!
https://www.youtube.com/playlist?list=PLRJ9-cX1yE1lm9qFpVkOBO1oFJVFFK-fk

Section C: Creating your very own custom rom! (Work in progress) :

+ Research
+ Forking a base rom
+ Adding to the manifest
+ Editing which apps are built
+ Editing settings/files/display
+ AND MORE!

Download links: The video quality is now HD!
MP4 Video GitLab:
https://gitlab.com/alaskalinuxuser/hd_makinganewcustomrom

MP4 Video Downloads:
https://gitlab.com/alaskalinuxuser/hd_makinganewcustomrom/-/archive/master/hd_makinganewcustomrom-master.zip

YouTube links: The YouTube quality is now HD!
https://www.youtube.com/playlist?list=PLRJ9-cX1yE1nTAc0uM17HL9KuN__GDexh

My device and kernel trees:

  1. (GitHub) : https://github.com/alaskalinuxuser/
  2. (GitLab) : https://gitlab.com/alaskalinuxuser/

Linux – keep it simple.

enum class is not a class unless it’s -std=c++11

treestuff

As I progress through the C++ course at Udemy, I’ve just completed section 4. However, I ran into a few snags along the way. Some of them are due to differences between the instructor using Windows, and me using Linux. Most notably, I ran into a complete showstopper that took me a while to figure out, so I’ll share it here.

g++ -Wall -c “Timber.cpp”
Timber.cpp:17:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
enum class side { LEFT, RIGHT, NONE };
^
Timber.cpp: In function ‘int main()’:
Timber.cpp:169:20: error: ‘side’ is not a class or namespace
side playerSide = side::LEFT;
^
Timber.cpp:264:26: error: ‘side’ is not a class or namespace
branchPositions[i] = side::NONE;
^
Timber.cpp:287:18: error: ‘side’ is not a class or namespace
playerSide = side::RIGHT;
^
Timber.cpp:321:18: error: ‘side’ is not a class or namespace
playerSide = side::LEFT;
^
Timber.cpp:534:31: error: ‘side’ is not a class or namespace
if (branchPositions[i] == side::LEFT)
^
Timber.cpp:542:36: error: ‘side’ is not a class or namespace
else if (branchPositions[i] == side::RIGHT)
^
Timber.cpp: In function ‘void updateBranches(int)’:
Timber.cpp:688:24: error: ‘side’ is not a class or namespace
branchPositions[0] = side::LEFT;
^
Timber.cpp:692:24: error: ‘side’ is not a class or namespace
branchPositions[0] = side::RIGHT;
^
Timber.cpp:696:24: error: ‘side’ is not a class or namespace
branchPositions[0] = side::NONE;
^
Compilation failed.

Per the instructor, I typed out the branches (literally, tree branches) and I get this odd error about the enum class side not being a class or namespace. The key was this portion:

warning: scoped enums only available with -std=c++11 or -std=gnu++11

A Google search and a bit of perusing lead me to change my build script to this:

#!/bin/bash

# You need libsfml installed on your system!

g++ -c -std=c++11 Timber.cpp
g++ Timber.o -o timber-app -lsfml-graphics -lsfml-window -lsfml-system

./timber-app

echo “type ./timber-app to launch”
exit

In order to get it to compile, I had to declare the -std=c++11 during the build. I added it to my Geany program as well, under the settings.

geany11

Now it compiles without issue! So far, I’ve only added some bushy branches to my game, but it is coming along nicely! You can check it out at my GitLab if you’d like.

Linux – keep it simple.

Update to Rom/Kernel/TWRP building guide!

Hey everyone!

Just wanted to let you know that I was able to finish and upload another hour worth of videos! That’s right, currently there is more than 9 hours of video tutorial available. As promised, this was added to the series:

* Installing/using VirtualBox
* Fixing a VB Ubuntu problem with screen resolution
* Syncing minimal LineageOS or Omni for building TWRP
* Converting an Omni TWRP device to LineageOS/CM and building it.
* Custom TWRP mods with fonts/icons/splash screens/etc….

twrp

Hope that you are enjoying the series, but mostly, I hope that it is informative and gets you building!
I did try to up the video quality, but I had to tone it back down a bit, as the files became a bit large for uploading and handling. The quality is a little better than the first videos, but not exactly 1080p! 

Thanks again for all of the thanks button slaps and YouTube subscriptions. That lets me know that you guys really appreciate the videos. Be sure to check out my Video Tutorial section in the menu for links to the videos!

Linux – keep it simple.