yashsingh1/xdaforums huggingface dataset:
[Nook Color Android Development] drmarble:
I got cm-12.1 working. Or, at least booting.

It works with no sound, no hw acceleration and unfortunately, no browser. Chromium crashes with a ERROR :GL_OUT_OF_MEMORY : glBufferData: . It works in cm-12.0. I have uploaded changes for 12.1 on github. Building directions are the same. Just find the correct directories. I renamed some of the 12.0 ones to include 12.0 in the branch names.

I left out an important change to frameworks_base. This is from the README.md file. To deal with data/media and sdcard installs a change to frameworks/base is required. It was written by steven676. I have incorporated it here:

https://github.com/drmarble/android_frameworks_base/tree/storage-config-12.0

I have found that building as userdebug instead of eng makes the builds much faster. Quadrant scores doubled to ~1300.

Sorry about the difficulties with the local manifest. When I am modifying an existing tree I use git commands, eg:

git remote add drmarble https://github.com/drmarble/android_frameworks_base.git

then

git fetch drmarble

This gets all my branches.

Finally git checkout drmarble/storage-config-cm12.1

This will get reset to the default repo branch when you repo sync (unless you have made uncommitted changes). Just checkout again.

This method is handy when you build for multiple devices on the same source tree. You can just checkout any changed directories for a specific device. I think that there are even better ways involving repo and repo branches. I have enough trouble understanding git. I use shell scripts for my builds and just put the checkout code in there. eg:

pushd kernel/bn/encore
git checkout sluo/encore-omap3-3.0.y-l-backports
popd

or for local branches

pushd frameworks/base
git checkout storage-config-cm-12.1
popd

pushd hardware/ti/omap3
git checkout no-omx
popd

Sorry about forgetting about frameworks/base.

---------- Post added at 12:15 AM ---------- Previous post was at 12:03 AM ----------

Just a warning. I disabled boot animation because we can't both optimize for art and animate a boot at the same time. It will just sit on a black screen for several minutes before informing you that it is optimizing apps. Plugging in a usb cable and running adb logcat will encourage you that it isn't frozen. I know that eng builds automatically allow adb as root on first boot. I think I managed to set it up for userdebug builds too so you don't have to authenticate on a blank screen.
[Nook Color Android Development] bowguy:
CM-12.0 build

OK I have a clean build using drmarble's directions in a local_manifest. I will try to boot it on a SD install later tonight. If I can I will also test steven676's recovery.

Edit: Boot looping. Seems to be trying as there is no boot animation but I will keep trying.. might be running out of memory or space.

New edit: Seems to be working now. I flashed the zip using Leapinlar's script which apparently fought with it. I snuck the zip onto the card via an emmc installation of 10.2 then booted into steven676's new recovery and flashed it that way.
[Nook Color Android Development] drmarble:
I am not certain about the SD installs working. I used steven676's commits from his github that are supposed to enable it but I haven't tried. His tree was for cm-11.0 and I used that as the basis for my changes. I haven't tested it on either cm-11.0 or cm-12.x. I expect you need his recovery.

I don't get any boot looping on emmc installations. Maybe your system partition is too small. I set it to require at least 600MB or some such size. I have 1GB. It does taks a long time to dexopt with no applications installed, so be patient. You should look at the logcat or /proc/last_kmsg.

I hope you can get it working. It would be nice to have an sd card to switch to cm-12.x. I admit that I don't really use this tablet for anything except developing so having a mostly useless cm-12.1 install doesn't bother me.

I tried side loading dolphin browser. It works. It is a bit slower than cm-11.0 but it does run. I don't know what is causing the GL out of memory error with chromium. I don't know why there is no sound. I am looking at the Acclaim code to see if there is stuff we can use. I need to get better at building and pushing individual libraries. It takes 15 minutes to get it booting after sideloading a rom. And that is with the apps already optimized. That is a long and boring development cycle. Compiling from clean only takes 16 minutes.
[Nook Color Android Development] bowguy:
SD Install

Similar issues to what drmarble is having. Developer options is crashing settings every time but I got adb enabled.

Installing Open GAPPS nano now...
[Nook Color Android Development] drmarble:
Great news and good job. Were there any tricks to get the sd build working? Or did you just need the new recovery?

I got developer settings working on cm-12.1. I thought they worked on cm-12.0 with a user-debug build but apparently I was mistaken.

It is always nice to see someone else building with your code. It makes it feel less like you are coding into a void. If I can get anything else running I will let you know here and upload the changes to github.
[Nook Color Android Development] bowguy:
For the build I did an init to 12.0 and this is the roomservice.xml:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="drmarble/android_device_bn_encore" path="device/bn/encore" remote="github" revision="cm-12.0-wip1" />
<project name="steven676/ti-omap-encore-kernel3" path="kernel/bn/encore" remote="github" revision="encore-omap3-3.0.y-l-backports" />
<project name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" remote="aosp" revision="refs/tags/android-4.4.4_r2" />
<project name="drmarble/proprietary_vendor_bn" path="vendor/bn" remote="github" revision="cm-12.0-wip" />
<remove-project name="CyanogenMod/android_build" />
<project name="drmarble/android_build" path="build" remote="github" revision="encore-12.0" />
<project name="drmarble/android_hardware_ti_omap3" path="hardware/ti/omap3" remote="github" revision="no-omx" />
<remove-project name="CyanogenMod/android_frameworks_base" />
<project name="drmarble/android_frameworks_base" path="frameworks/base" remote="github" revision="storage-config-12.0" />
</manifest>

Build was just brunch encore after a clobber.

Initial install is a pain. First get a 16 GB SD card (I don't think an 8GB will work). Burn Leapinlar's image onto it.

http://xdaforums.com/attachment.php?attachmentid=2787369&d=1402239353

See:

http://xdaforums.com/showthread.php?p=32921666#post32921666

for directions. Now you need to copy cm-11-20141008-SNAPSHOT-M11-encore.zip located here:

http://download.cyanogenmod.org/?device=encore&type=snapshot

onto the root of the SD card. Do not use anything later than that as it will not work. Insert the card into the Nook and boot it up. This will partition the card and install cm-11. Nothing different here that isn't described on LeapinLar's page. Next is the issue that had me stumped. If you copy the new CM-12 ROM in the boot directory, LeapinLar's script will install it but not correctly. It will boot loop. In addition, the new recovery can't see the zip on the root of the SD. My Nook has CM-10 installed on EMMC so I booted to EMMC, connected via USB as media device and copied the CM-12 zip to the nook. You then need to copy the zip to somewhere on /storage/sdcard0. File manager can do this.

Shut down the Nook and pull the SD card. Copy steven676's new recovery onto the root directory, reinsert the card and boot into SD recovery. This gives us a recovery that can see the sdcard0 partition and the zip.

Install the zip as usual and then boot up. That is how I got the thing working. However, installing GAPPS really is giving me fits at this point.

Thanks for all your great work!

Let me know if you want me to try a 12.1 build. I can get to that next week.
[Nook Color Android Development] bowguy:
Your recovery seems to work fine on an SD. Two questions. When you install a zip it replaces everything in system? The reason I ask is before on the CM11 recovery when you install a ROM it does not remove your apps. With this recovery when I reflashed the CM12 ROM it removed the Gapps as well. This might be because of all the other issues involved.

Second - on an SD install does the wipe/factory default option just affect the card? Does it keep the partitions and directories? That would be handy for testing new ROMs

Thanks!

---------- Post added at 07:38 AM ---------- Previous post was at 07:35 AM ----------

I haven't had time to really look into this (dmesg and logcat) but Gapps is really having issues with this build. Standard install boots up OK and works just fine with a few bugs. WiFi works, browser works. When I flash Gapps (both Open GAPPS and 20150404-minimal) the thing just dies. Very laggy and can't create a Google account.
[Nook Color Android Development] drmarble:
I have similar problems with Gapps in cm-12.1. It seems to work ok except for no sound and the chromium browser crashing. With gapps, other things still work the same but PlayStore just freezes on the sign in screen and then crashes. It produces a chromium error.

I can get into devoloper settings. No IBackupPassword errors. Quadrant is over 1600. Dolphin browser runs but agonizingly slowly.

I am going to switch back to cm-12.0 and see if it will make things easier to fix. I know that some other devices have had trouble with chromium.I suspect that the GL errors stem from not having any omx drivers. I believe they are important. I get the GL errors from the browser and from PlayStore. There are new omx drivers from the wearable branch but it isn't a simple plug and play. That uses a very different kernel (3.10?).

I will work once again on getting the ti/omx drivers to compile.

Thanks for doing the testing. Maybe we can figure out what to do next. Right now, isn't it fun to see Android 5.0 showing on the about tablet screen? Pretty good for a 5 year old e-reader.
[Nook Color Android Development] drmarble:
I am making progress on this. Gapps still crashes both cm-12.0 and 12.1. Sound is still broken. Browser crashes on cm-12.1. This doesn't sound like much but we can now compile the omx branch and try to get accelerated graphics. These changes are here: https://github.com/drmarble/android_hardware_ti_omap3/tree/cm-12.0-wip1 (identical branch on cm-12.1-wip1) and the referenced device/bn/encore *.omx1 branches referenced below.

I also better understand dexpreopt (see: https://source.android.com/devices/tech/dalvik/configure.html ) and booting is now much faster. These changes are here: https://github.com/drmarble/android_hardware_ti_omap3/tree/cm-12.0-wip1 and https://github.com/drmarble/android_device_bn_encore/tree/cm-12.0-omx1 . Just change 12.0 to 12.1 for cm-12.1. My modified vendor/cm has encore1 for cm-12.0 and encore-cm-12.1 for cm-12.1.

You can get into developer settings without crashing. I backported a change to packages/apps/Settings from cm-12.1. I submited this change to gerrit http://review.cyanogenmod.org/#/c/110370/ but for now you can either apply the patch after you repo sync or use my version at https://github.com/drmarble/android_packages_apps_Settings/tree/encore-cm-12.0 . No changes are required for cm-12.1.

For some reason, cm-12.0 isn't building today like it did yesterday. CM-12.1 builds. I will figure this out and push fixed trees to github.
[Nook Color Android Development] fattire:
excellent job drmarble!! Think about this-- the Nook Color originally shipped with a crippled eclair.

...btw I am hearing Marshmallow source drops one week from tomorrow...
[Nook Color Android Development] bowguy:
Just please don't ask for posted zips OK fattire?
[Nook Color Android Development] bowguy:
It can't find system/autosuspend.h in frameworks/base/services/core/jni:

com_android_server_am_BatteryStatsService.cpp:#include <suspend/autosuspend.h>

com_android_server_power_PowerManagerService.cpp:#include <suspend/autosuspend.h

Also missing SkBitmap.h, SkColor.h and SkRegion.h in frameworks/base/core/jni/android/graphics. Found those in external/chromium_org/third_party/skia/include/core

Somehow the entire skia library is not included.

giving up - trying to compile 12.1 now
[Nook Color Android Development] drmarble:
My settings patch to cm-12.0 was merged so you don't have to do anything with packages/apps/Settings to get into developer settings. I will take down my fork of the repository once I remember how to do so.

I have made a few other changes which haven't improved functionality. I will push those. I changed the ion.h files for the device. We still crash with GL errors when trying to open the browser or log into our google accounts. There are still big problems with graphics/ion/GL. We still need more work on hardware/ti/omap3.

I hae started getting an error about ion_user_handle_t or some such thing. I have changed the Android.mk file in system/core/libion to have Werror changed to Wno-error. This keeps the warnings from being turned into errors so the build finishes.

Please not that there are constant changes to the cm-12.1 build tree. Folks keep adding functionality and bug fixes. These include updates to the directories that I forked. I have to keep running " git pull github cm-12.1 " in these directories to avoid build errors. This isn't a problem with cm-12.0 since nobody is really doing much with it anymore. The git pull command takes all the recent changes from the cm-12.1 tree and puts it on top of my changes. This keeps these branches up to date. I upload my updated branches to github but I don't work on this every day. Maybe I will make a separate patch for each directory that can just get added to the current tree. This works u ntil the tree is so different than what I made the patch from that the patch no longer works. Having the git pull command is a strong argument for using git remote add for my changed branches rather than removing the cm branches and putting mine into roomservice.xml. It also gives you a clean cm directory tree if you want to build for multiple devices.
[Nook Color Android Development] drmarble:
I have made a bit more progress. I am only working on cm-12.1 now even though its browser is broken and cm-12.0 has a working browser.

We now can log into Google. Play Store works. Sound has fewer errors but still fails.

I updated the directories on github. You should use a new device/bn/encore branch: ion-user_handle . That name was chosen based on the build error I was working on. I also use the iinclude/linux/ion.h file in the kernel directory but I don't think it is needed there. I really don't understand how these hardware abstraction layers work with ion and proprietary blobs and modules and hardware/ti and all that. I am working on it.

You need a patch for the system/core directory. I haven't pushed it as a branch. Just cd to system/core and run: git apply the_patch_name_you_chose

Here is the patch:

diff --git a/libion/Android.mk b/libion/Android.mk
index 6562cd3..01dd04b 100644
--- a/libion/Android.mk
+++ b/libion/Android.mk
@@ -7,7 +7,7 @@ LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/kernel-headers
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include $(LOCAL_PATH)/kernel-headers
-LOCAL_CFLAGS := -Werror
+LOCAL_CFLAGS := -Wno-error
include $(BUILD_SHARED_LIBRARY)

include $(CLEAR_VARS)
@@ -16,7 +16,7 @@ LOCAL_MODULE := iontest
LOCAL_MODULE_TAGS := optional tests
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/kernel-headers
LOCAL_SHARED_LIBRARIES := liblog
-LOCAL_CFLAGS := -Werror
+LOCAL_CFLAGS := -Wno-error
include $(BUILD_EXECUTABLE)

include $(call first-makefiles-under,$(LOCAL_PATH))

I installed youTube from the play store. It won't play any videos but it does run.
[Nook Color Android Development] bowguy:
CM 12.1 build errors

Did this ever make it into 12.1 ?

http://review.cyanogenmod.org/#/c/69804/4

I am running into the following error:

device/bn/encore/overlay/frameworks/base/core/res/res/xml/storage_list.xml:37: error: No resource identifier found for attribute 'runtimeConfigLabel' in package 'android'

Edit: Obviously not as a quick inspection shows. Adding it to see if it continues the build.

Edit2: Much closer to a build. Need this command to get by an error that a lot of devices are running into to:

touch out/target/product/encore/system/framework/org.cyanogenmod.platform-res.apk

Edit3: Trying again on 12.0. For now can't use drmarble's bionic repo as I run into this:

No rule to make target `bionic/libc/arch-arm/cortex-a15/cortex-a15.mk

sticking with stock for now...

Edit4: We have a zip. Details to follow
[Nook Color Android Development] drmarble:
bowguy. I am glad that you are still trying to build cm-12.x for our lowly Encores. I have some updates. Still works about the same. Browser (chromium) crashes with a GL error and a kernel error. Other browsers work. No sound. Videos play in mx player but not youtube. I am still working on the video/GL errors and sound. I get fewer sound errors now but it is still silent. Video is tough. Our libraries are ancient (ICS). I am not sure I have the skills to get them working on Lollipop. I reenabled dexopt. It takes a while to boot but not much longer. You still have to reflash gapps after every rom. I don't know why this is happening. I also have to reboot once after flashing gapps (open nano) to get the boot to finish. The screen just freezes with "finishing boot".

Anyway, here are my updated repositories:

device/bn/encore: acclaim

bionic: non-PIE-12.1

frameworks/base: storage-config-cm-12.1

hardware/ti/omap3: hwc.acclaim

vendor/cm: encore-cm-12.1

You need the kernel from steven676: sluo	https://github.com/steven676/ti-omap-encore-kernel3.git

branch: encore-omap3-3.0.y-l-gcc4.8

This allows us to use the gcc4.8 compiler and I backed out the changes to compile with gcc4.7. Steven676 (a.k.a. sluo) is a master of the omap3 kernel. We wouldn't be anywhere without him.

One advantage to building for cm-12.0 is it doesn't update much. My repos stay much more current. I run "git pull github cm-12.1" on each directory after I repo sync. I wouldn't have to do this in cm-12.0.

Next step, cm-13.0. I guess I should wait for the professional cm developers (they do exist) to get some devices building. I can't even build for flo (nexus7 2013) now.

Good luck. I will keep everyone posted. Especially if I succeed at getting anything to work better. Right now all it does is run quadrant fast (1840). Not much to do with a slow tablet if it can't play any sounds and browses very slowly.
[Nook Color Android Development] bowguy:
I'm stuck till next week. Thanks for all your work.

BTW the target for quadrant should be about 2000. I can get that on cm11 with art enabled. Too much lag though.

As for sound, logcat/dmesg always threw lots of errors on cm11 with the pre-builts. Sluo said to ignore them but maybe we are having deeper issues
[Nook Color Android Development] bowguy:
CM-12.0 build

I am playing with 12.0 to see how that is working.

I have the appropriate entries in a roomservice.xml except the bionic as it gives me a minor compile error. I will try to track that down. Is the vendor/cm: encore-cm12.1 a typo? I can't find that - only your propritary_vendor_bn ones.

I also couldn't use the encore-omap3-3.0.y-l-gcc4.8 kernel. I had to use encore-omap3-3.0.y-l-backports one because of a complaint about the toolchain.

I get a clean build and install but no joy on boot. It starts to boot on SD then reboots directly to EMMC. I never saw that before. Several reflashes and retries gives same result.

Let me know if anyone wants my roomservice.xml so they can join in the fun...
[Nook Color Android Development] drmarble:
You are right about vendor-cm-12.1. That only exists locally, I never uploaded it. I just get rid of a couple apps to shrink the zip file (cmupdater and thememanager?). I am enjoying playing with cm-13.0 now but will keep trying to get the sound working. I think I lack the kernel skills for the video GL issues.

It looks like some of the build changes are merged into cm-12.1. I noticed these while trying to merge my build changes into cm-13.0. They were already there. It may put us closer to building without major changes to the cm build system.
[Nook Color Android Development] bowguy:
I have a clean zip on 12.1 but after it updates the apps it reboots. It never starts up after optimizing apps. I can connect to it but i haven't run a logcat or dmesg to figure out what is crashing it. Do you have a 13.0 build going?
[Nook Color Android Development] pmgnet:
Check this out... dorimanx incorporated ram compression into his kernel and the results are nothing short of spectacular. Maybe our old nooks can get some more ram! http://xdaforums.com/showthread.php?p=63383796
[Nook Color Android Development] drmarble:
I have the same problem with current 12.1 builds. I am looking at what changed to cause this. It booted fine last week.

I still haven't got a build to finish with cm-13.0.

I have been working on getting the alsa sound from hardware/alsa_sound to build. It worked fine in cm-11.0 but has c++ errors in cm-12.1. I hope that will help the sound. I guess I should get it to boot first.

So many challenges. This is more fun than crossword puzzles.
[Nook Color Android Development] bowguy:
I took a look but i can't find where he applied his changes to a 3-3.0kernel. The stuff I found doesn't map to anything in my build directory.
[Nook Color Android Development] drmarble:
I have sound.

I couldn't figure out what problem had cropped up with cm-12.1 so I switched back to the 12.0 tree. After testing that it does compile and run with the current cm-12.0 tree I started in on the sound. I managed to get steven676's alsa source to compile by modifying his external/alsa_sound and the current libhardware_legacy. Much to my suprise, I have sound. At least, when I go into settings/sound and change the notification tone I hear the new tune. It's late and I will test more tomorrow. I will also push my changes to github. These changes were difficult since they were in c++ files. I don't know c++. Luckily, I know about a dozen other computer languages and googling about pure virtual functions and such gave me enough information to fix the errors. Why can't they program these in something sensible like FORTRAN.

I don't know what broke in cm-12.1. I think I will just keep working on cm-12.0 and try to get accelerated video to work. And, of course, cm-13.0.
[Nook Color Android Development] bowguy:
http://danilogiulianelli.blogspot.com/2013/02/how-to-build-gcc-fortran-cross-compiler.html

There you go. I can help you code in FORTRAN. Think of the unlimited GOTO possibilities!
[Nook Color Android Development] pmgnet:
The kernel is numbered 3.4.109 and the os is 5.0.2, if that helps.

---------- Post added at 03:04 AM ---------- Previous post was at 03:02 AM ----------

Congrats on the sound, drmarble!
[Nook Color Android Development] drmarble:
We are on a 3.0.y kernel. Since TI has abandoned the mobile market it is unlikely we will ever get any higher.

While the sound works, it broke video playback. The alsa sound works but it also makes alsa video which doesn't work. Trying to the the sound to compile in 12.1 caused me to notice this and look for it in the logcats. This whole sound/video/media hal is starting to make some sense. I will get back to working on cm-12.0 and try to get video working with sound. The same tricks I learned to get sound on cm-12.0 are working on cm-12.1. I just have to apply more debugging steps.

I can't figure out why it doesn't finish booting up in cm-12.1. It makes lots of complaints about packageManager. I wonder if it is an SELinux problem. Even though we disable it in the kernel command line it still has some effect. It was what was preventing booting when I was first bringing up cm-12.0. It easily could be the kludgy .te files I copied over that are causing the problems. Definitely no progress on cm-13.0.

I will keep folks posted. I really should push my changes to github.