yashsingh1/xdaforums huggingface dataset:
[Nook Color Android Development] steven676:
Patches for the latest local root hole

I've landed a patch in our kernel for a security bug in the core kernel. The bug in question (CVE-2014-0196) allows users to overflow a buffer via exploiting a race condition in the tty code, allowing privilege escalation (root) by a local attacker.

Proof-of-concept code exploiting this bug has been available since last week, so you should take this fix as soon as possible if you build your own kernels. CM11 nightly releases should be patched starting May 14, and I've posted fixed kernels for CM10.1 and CM10.2 stable releases.

This bug is believed to have existed upstream since 2.6.31-rc3 in code that's required for adb shell to work, so it's likely that just about every Android device kernel is vulnerable until fixed. I think (based on looking at source history) my backported patch above applies to kernels older than 3.8; 3.8 and newer kernels should apply upstream's fix instead. If you're not sure your other devices are fixed, check the kernel source (or bug your friendly local device kernel maintainer to do so).
[Nook Color Android Development] steven676:
This was (finally) merged into CM11 and should be part of nightlies starting May 16. Note that a new recovery is required to install or upgrade to these nightlies (the install script now references the new /dev/block/by-name/* block device symlinks, so you need a recovery that creates them in order to successfully install). I've posted an updated CWM 6.0.4.8 with the required changes on the CM11 nightly thread.

Next steps: making it possible to ship an SD card image with recovery + scripts to make the recovery do something automatically (I'm kicking around patches to do just that), and writing scripts to make the recovery install the ROM.
[Nook Color Android Development] polymath257:
If we build from source, is the apprpriate recovery built?
[Nook Color Android Development] steven676:
Yes, it is (out/target/product/encore/{kernel,ramdisk-recovery.ub}). I'll also be posting an updated CWM recovery shortly.
[Nook Color Android Development] steven676:
Some changes to the recovery to do just that: https://github.com/steven676/android_device_bn_encore/compare/7ffcc27...7492fff You'll also want http://review.cyanogenmod.org/64694 (against BusyBox) and http://review.cyanogenmod.org/64705 (against the recovery code).

Strictly, these changes aren't necessary -- we could accomplish all of these things by modifying the recovery initramfs. I've never been terribly fond of doing that, though, and allowing the recovery's behavior to be controlled by additional files under /boot makes automating all sorts of tasks with the recovery simple. For example, it's now possible to make a bootable SD card that installs Android to eMMC by just doing the following:

Partition the SD card, making sure the bootable flag is set on the first partition;

Format the partition with a FAT filesystem;

Copy the bootloaders (MLO and u-boot.bin) to the filesystem;

Copy the recovery kernel to uImage and the initramfs to uRamdisk;

Create a new empty file recovery-rescue-mode;

Copy an Android OTA package to the filesystem;

Create a new file recovery-commands with the following contents:

--update_package=/sdcard/otapackage.zip

(replacing "otapackage.zip" with the actual name of the OTA package).

Meanwhile, for creating new SD card installs, I've posted a first-run script to https://github.com/steven676/encore-sdcard-setup. The idea is that the user downloads a 1 GB SD card image, with /boot and /system already populated, and flashes that to a microSD card (4 GB or larger). Then, on first boot, the recovery starts and "installs" an OTA package containing the first-run script, which creates and formats /data and /sdcard; if a Google apps package is present, the first-run script will install that too. When complete, the device automatically reboots into the new Android installation.

I'm hoping to get test SD card images up soon-ish, but in the meantime, please play with this stuff and report any problems you find.
[Nook Color Android Development] Arbelzapf:
Now that CM11 development has calmed down a bit and we have nightlies and everything, could it be time for a humble request?

Is there any harm in setting the minimum brightness as low as possible by setting

<!-- Minimum screen brightness allowed by the power manager. -->
<integer name="config_screenBrightnessSettingMinimum">3</integer>
<integer name="config_screenBrightnessDim">3</integer>

in device/bn/encore/overlay/frameworks/base/core/res/res/values/config.xml ?

A few months/weeks ago, before there were nightlies and private building was the only way to test, I used to do this myself. Nowadays, I greatly prefer the official nightlies, for obvious reasons.

The reason I am doing this is because it's the only way to make reading at night comfortable. At the default minimum, the screen is still way too bright to read comfortably at night. And yes, I am using an additional screen filter app.

So the only way I found to achieve the same result is by using an Xposed module, which I think is a little excessive. If this was built in, I could get rid of Xposed, and thus be able to test ART.

The downside of this change -and I presume the reason this restriction was put in place - is that it allows you to set the brightness so low that you cannot see the screen in bright daylight any more, making resetting the brightness to something visible a bit adventurous at times. So I could understand if there's opposition.

I just think we might not need this kind of handholding, since we're all adults and unlikely to "call support because the screen is broken and stuff".

What do you guys think?

PS: I wrote "3" as the lowest possible value. This is a guess, because I forgot which value I used to set myself. But if it's too low (or 0), the screen will shut off entirely. So it can't even be seen if you crawl under a blanket. We do not want that.
[Nook Color Android Development] steven676:
Kernel bug-of-the-month club release!

I've landed patches for two security bugs in the core kernel:

CVE-2014-3153: allows users of futexes (kernel-provided locking primitives) to execute code in ring 0 on the processor, allowing privilege escalation (root) by a local attacker. Backports by Canonical's John Johansen of the bugfix patches as far back as 2.6.32 were posted to oss-security, so I assume all kernels are vulnerable at least as far back as that. (Patches: 1, 2, 3, 4, 5, 6)

CVE-2014-2851: allows users of the ping socket to overflow a reference count in the kernel, potentially allowing privilege escalation (root) by a local attacker. This bug appears to be present in all kernels since the introduction of the ping socket in 3.0. (patch)

I'm not aware of publicly available code exploiting these bugs, but they have received wide publicity and you should assume that exploits will exist soon (if they don't already); you should take these fixes as soon as possible if you build your own kernels. CM11 nightly releases should be patched starting June 6, and I've posted fixed kernels for CM10.1 and CM10.2 stable releases.

Because these are bugs in core code that have existed for many years, it's likely that just about every Android device kernel is vulnerable until fixed. If you're not sure your other devices are fixed, check the kernel source (or bug your friendly local device kernel maintainer to do so).
[Nook Color Android Development] frankusb:
Starting after June 6th? The change log does not show any kernel changes in June 6th.

Frank
[Nook Color Android Development] steven676:
The build log (warning: 6MB text file, could give your browser a fit) shows the correct source being built. On a running device, the kernel version shown in "About tablet" includes the Git commit ID corresponding to the source; for the June 6 release, it should read "3.0.101-g0099c6a", which corresponds to https://github.com/CyanogenMod/andr...mits/0099c6a9ea68910e79084f4600f72e0fe2018e92.
[Nook Color Android Development] Zippy Dufus:
Broken build

Hello,

I've been building standard CM11 for the devices in my signature from scratch but the Encore 20140607 and 20140608 builds result in the dead android with the red explanation mark icon.

Did anything change in the build procedures during the last month?

Just wondering before I start investigating.

In advance, thanks.
[Nook Color Android Development] steven676:
Is your recovery up to date? Builds after https://github.com/CyanogenMod/andr...mmit/c9095b5274423100a4d43255b40ee06b8b441d2c landed require an updated recovery to install (prebuilt CWM 6.0.4.8 or higher, or you can use the one that was created as part of your regular build process).
[Nook Color Android Development] Zippy Dufus:
Working now!

That was the issue, thanks!

It was in this thread where you guys showed me how to build a recovery zip so I did it again. This recovery is 6.0.4.9.

If this ROM works as well as my last 20140524 build, I be ecstatic. So far so good.

Thanks for all the great work!
[Nook Color Android Development] echoedge:
Awesome work Devs. CM11 is revitalizing the Nook Color for me and i'm sure many others!

Super smooth and stable from my tests.

Can't wait for the Stable build!

Would be amazing to get USB host mode on an updated system, from the talk I hear of it's possibility.

External storage/flash drive, mouse, keyboard support would be stellar.

Thanks for all the hard work. The Nook Color maybe getting older but it's a classic Android Tablet of it's kind and just wanted to show my support and kudo's to all involved. Keep it up :good::victory:
[Nook Color Android Development] dhiru1602:
http://review.cyanogenmod.org/#/c/66017/

This is a good news for OMAP3 devices. The 720P decoders and encoders can now be built from the source. :good:
[Nook Color Android Development] frankusb:
But not by Cyanogenmod..

Last comment:

Abandoned

Licensing issues.

Frank
[Nook Color Android Development] snives:
But it might be good enough reason to put my build box back together [emoji1]
[Nook Color Android Development] runningslow:
I have no luck getting Speaker Boost to work. It seems to have no effect. I've even tried converting it to a system app.

The app description on the Play Store clearly states that it will not work on 4.2.1 or higher, so I'm confused.

Did you have to do anything special to make this work? Am I perhaps using the wrong Speaker Boost app? I'm trying to use this with the headphone jack.

I'd really like to get this to work since I've started using my NC in the car as a media device, but I'm just not able to get enough volume from it to overcome the road noise at highway speeds with the NC volume and car stereo's volume maxed. I found that if I use my BT headphone receiver that I can turn it up to a good volume, but that would be because the BT receiver has its own internal amp. Unfortunately, the NC's usable BT range makes that an impractical option.
[Nook Color Android Development] pastordl:
To be sure it should be the Omega Centauri Software speaker boost.

Yes if you have over 4.2.1 android you need to disable / freeze the DSP manager. See Volume / sound to low.

The DSP manager is the problem since as it notes in speaker boost note 1; it is the "equalizer" that throttles back the sound.

This is the link to my help post listed in my signature:

http://xdaforums.com/showthread.php?p=50438687#post50438687

And Check out Post # 6 for ways to keep it disabled thru updates. The third option is quick and easy.

Post 6 link: http://xdaforums.com/showpost.php?p=50795653&postcount=6

I have had DSP renamed since CM10 (4.1)
[Nook Color Android Development] runningslow:
Yep. Right app.

I had already followed your instructions to rename DSPManager.apk (as well as many others... Thanks!), but it didn't appear to work.

I'll try just freezing the DSPManager.apk with Titanium Backup to see if that makes a difference and report back.
[Nook Color Android Development] pastordl:
Mr

Did you reboot after renaming the App. A remnant of the app stays in memory after the rename. rebooting it gets rid of the remnant.
[Nook Color Android Development] frankusb:
Installed M8 last night and it seems to work just like M7.
[Nook Color Android Development] runningslow:
Yep. Rebooted after change. I tried again this morning, first freezing the app and then using your script to rename DSPManager.apk on boot (I checked to make sure it was renamed afterwards). No discernible difference. I've tried dragging the Boost slider up and down while playing and I can't tell a difference. Perhaps I'm expecting too much?

Is this supposed to be a global setting or will it only work with certain apps? I'm assuming anything coming from the media channel should be boosted.
[Nook Color Android Development] pastordl:
It works globally on anything with audio output. Have you tried with headphones or ear buds. I'm wondering if you have a bad speaker. I set up another nook with 7.2 in the past. It had Nook Color Tweaks which had a volume booster included. The owner had played with the tweak sound level and had damaged the speaker. I had some spares from salvaged Nooks. Replaced his and the sound was back in business. If you get volume increase thru the jack you might have the same problem. My vehicle, a truck, is a little noisy and the radio has an aux input jack. I use a 1/8" stereo cable and it works great. Another possibility would be an external speaker with a powered amp. Other than that I'm out of ideas on why the app isn't boosting sound for you.
[Nook Color Android Development] runningslow:
I've only tested it with an aux cable to my car stereo. I haven't even tried using the built-in speaker.

I'll do some more testing on my side, since by all accounts it should be working. Thanks for the help.
[Nook Color Android Development] -somebody-:
i cant get M8 or the last nightly to install on my nook color, ive tried both twrp 2.6.3.0 and cwm 6.0.4.7 and both error out. is there something im missing here? i gave my last nc away so ive been out of the loop for a while, just had another given to me and id like to get this dinosaur up to date.

edit: im gonna keep hammering on this beast, i will not be beat
[Nook Color Android Development] leapinlar:
You need v6048 to install the newest nightlies and M8. Get it here:

http://xdaforums.com/showthread.php?p=52672292
[Nook Color Android Development] -somebody-:
thank you good sir, got M8 and cwm 6048 both installed and running smoothly now.

thanks for the quick reply/help.
[Nook Color Android Development] runningslow:
Well, after a little more experimentation.... I've concluded that it is in fact working. I guess I was expecting more from it. The audio gets a slight boost, but its still not enough to overcome the road noise in my car. If I turn the boost up much passed 40% the audio starts to distort, too.

I'm using it for podcasts mostly and nearly all of the ones I listen to are just fine volume wise. There's just one podcast in particular that I've noticed is a little quieter than the others and it can be a little hard to hear at times. I guess I'll have to figure out another long term solution. Thanks for the help.

PS. I know part of the issue is the head unit in my car. I'm just not able to turn it up loud enough. Even listening to the radio I always seem to have to have it close to maxed out. Its about 10 years old and has now been mounted in at least 4 cars and has always had a few quirks, but it has two rear aux inputs and so I've held onto it for that alone. I'm planning to replace it in the relatively near future with something that has native bluetooth capabilities.
[Nook Color Android Development] dweaton:
installing cm11 7/20/2014, gapps 06/06/2014 - no google account, no google play store

I've been trying to get cm11 7/20/2014 and gapps 06/06/2014 installed to my Nook BNRV200. I don't get anything to set up a Google account and I don't get the Google Play Store. In reading in the thread I posted in, it appears this has something to do with some sort of memory being too small. I asked there if there was some sort of repartitioning I needed to do to make what ever it is larger, and was directed to this thread.

Can someone describe to me the memory (I assume the emmc) that is affected and what I would need to do. I haven't found anything yet that really describes to me what all the partitions are and are for. Since this seems to be a problem that might fit in with the development things, I was hoping you wouldn't mind if I posted here.

I did try going through this entire thread to find where it might be mentioned, but I've either missed it or didn't understand what I was reading.

Thanks in advance!

Dave ;)
[Nook Color Android Development] leapinlar:
If you want to understand the Nook Color partition structure, go to my NC partition repair thread linked in my signature. In particular read the last paragraph. It is p5 (system) that is too small and should be made bigger. If you study the zips and know how to use fdisk, you can repartition it yourself.
[Nook Color Android Development] dweaton:
Okay, sorry about that.

what it looks like I want to do is decrease the size of data to 3gb (p6) and ad 1gb to system (p5) EDIT: leaving 1gb for media (p8). BTW - I'll be using a 16gb microSD when the Nook is running normally. Is there anyway to redirect things like media to somewhere on that SD card?

I can see I need to use fdisk to remove partions 5-8 first, then redefine them. What I don't know, and I didn't see in the link or the script (since it's only formatting, not allocating) is the "normal" size of each, the blksize of each (running blkid under root shows the filesystem types), or what the device name is if booted. The /dev/block/xxxxx refers to the partitions, but what is the device id? May be i'll just create a quick update.zip to show the existing ones via fdisk first, then go back and work on one to make the changes.

If this doesn't sound right please let me know..

EDIT-EDIT: Not knowing what exactly I can actually post here, let me just say that I found the device and know how to partition it now. I need to build a script, build the appropriate update shell, then build the zip file. I think I have a little work in front of me right now, so it may be a while before I'm able to update this post with progress.

EDIT-EDIT-EDIT: For those following along later, I misspoke about the data partition. I was keeping the data partition and the cache partition the same sizes, but enlarged the system partition and as a result the media partition was shrunk.
[Nook Color Android Development] dweaton:
OK - I *thought* I had this figured out. I thought I could have this in an fdisk command file:

d

8

d

7

d

6

d

5

n

+141

n

+255

n

+44

n

t

8

c

w

But this kicks out as errors in the zip file - I suspect it has something to do with the offsets - but this all has me confused now.

I'm also not sure if I'm going to the correct device to point to the internal memory:

#!/sbin/sh

# Repartition

tmp/busybox fdisk /dev/block/mmcblk0 </tmp/repartition.fdisk

I tried to take one of the scripts mentioned in this thread and modify it for what I wanted to change.

I have the feeling I don't understand any of this.......
[Nook Color Android Development] leapinlar:
Are you using an old CWM to flash the zip? It needs to be older than 6036.

---------- Post added at 08:01 AM ---------- Previous post was at 07:42 AM ----------

Also tell me the error message you get from the zip.
[Nook Color Android Development] leapinlar:
Don't forget, you need to format the new partitions too. The other thing, don't make a new zip. Use archive software to modify the existing zip without totally unzipping it.

And I think CM11 already defaults to use the external sd for media. Not sure though since I don't run it.
[Nook Color Android Development] dweaton:
I'm using Linux on my laptop to do this, however - the cwm on the device is still at 6.0.4.8 - so I guess I need to downgrade it?

I've never modified a file in an existing zip before - how would I do that in Linux?

i guess I did boo-boo somehow as I did unzip the file I downloaded, modifed the sh file and the update file to reflect only what I was using, then re-zipped it. It there something special about those zip files that I need to know?

Thanks again - your fantastic help is greatly appreciated!

Dave
[Nook Color Android Development] leapinlar:
You may get by with unzipping and rezipping, but my experience with Windows is that causes the zip to fail.

I've never done it with Linux, but you can just remove a file from the zip, modify the contents and put it back with Windows software, all without unzipping the whole zip.

I'm not sure you need to downgrade the 6048 on internal as long as you do the flashing with an SD based older CWM. However if you replace the update-binary in the zip with the update-binary from a CM11 zip, 6048 can be used.
[Nook Color Android Development] dweaton:
Turns out the problem was just using to new a version of cwm. I made a bootable TWRP SD, copied the zip I made to it and it worked.

And........SUCCESS!! All it did take was making the system partition larger!!

I can't thank you enough!! I'm currently running the 7/20/14 cm11 with the google store!

Thank you!!

Dave ;)

EDIT: I bought one of these cheap on Ebay to give to my sister for her birthday next month and just got it all loaded there as well. Running great so far!

EDIT-EDIT: If anyone is interested or is having the same problem installing cm11 and not getting a google account prompt or the google play store, I could try to post what I did, but I'm not sure if the dev forum is the correct place or not. EVERYTHING I did was based on somebody else's work - there is nothing original.
[Nook Color Android Development] pastordl:
Yes, I would like to see what you did. Trying to learn more and find looking at how things work helps.

Also in settings, about tablet, what size is listed for memory?
[Nook Color Android Development] leapinlar:
He just modified my partition repair zip to make the /system larger and /data or /media smaller. I think it is appropriate to post that modified zip here. Go ahead and attach that new zip you made to a post here. Then refer them to my emmc partition repair thread for how to install it, including a warning that they need to use an older recovery to install it.