yashsingh1/xdaforums huggingface dataset:
[Nook Touch Android Development] kfazz:
1. on my TODO list

2. press top left button and power to take a screenshot.

this is due to the way surfaceflinger tells omap3epfb about which regions to draw. currently only the 'dirty' region is updated.

performance wise dirty region rendering is better, but i may switch back to doing only full updates.

there also seems to be an off-by one error, where the 'current' frame might not be the one displayed.

These issues are most visible with dialogs.

Bootanimation is currently disabled until i can patch it to work nicely with our nooks.

looks like it isn't mounting /system/ or /boot/ during the flash.

they should both be unmounted before you flash the zip.

can you connect to recovery with adb and see if the partition symlinks are pointing to the right place?

~ # ls -l /dev/block/by-name/
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
lrwxrwxrwx 1 root root 20 Apr 27 20:45 boot -> /dev/block/mmcblk1p1
lrwxrwxrwx 1 root root 20 Apr 27 20:45 cache -> /dev/block/mmcblk1p3
lrwxrwxrwx 1 root root 20 Apr 27 20:45 system -> /dev/block/mmcblk1p2
lrwxrwxrwx 1 root root 20 Apr 27 20:45 userdata -> /dev/block/mmcblk1p4
~ # mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /d type debugfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
/dev/block/mmcblk0p2 on /rom type vfat (rw,noatime,nodiratime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /dev/block/mmcblk0p1 type tmpfs (rw,nosuid,relatime,mode=755)
tmpfs on /dev/block/mmcblk0p5 type tmpfs (rw,nosuid,relatime,mode=755)
tmpfs on /dev/block/mmcblk0p7 type tmpfs (rw,nosuid,relatime,mode=755)
tmpfs on /dev/block/mmcblk0p8 type tmpfs (rw,nosuid,relatime,mode=755)
/dev/block/mmcblk1p3 on /cache type ext3 (rw,relatime,user_xattr,barrier=1,nodelalloc,data=ordered)
/dev/block/mmcblk1p4 on /data type ext3 (rw,relatime,user_xattr,barrier=1,nodelalloc,data=ordered)
/dev/block/mmcblk1p4 on /sdcard type ext3 (rw,relatime,user_xattr,barrier=1,nodelalloc,data=ordered)
~ # fdisk -l /dev/block/mmcblk1
Disk /dev/block/mmcblk1: 7948 MB, 7948206080 bytes
4 heads, 16 sectors/track, 242560 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk1p1 * 1 8193 262144 c Win95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk1p2 8193 24577 524288 83 Linux
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk1p3 24577 32769 262144 83 Linux
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk1p4 32769 51200 589823+ 83 Linux
Partition 4 does not end on cylinder boundary

does the screen light up?

try it with and without usb inserted.

also try booting stock OS, inserting the sd, you should see the checkmark, then power off and power back on.
[Nook Touch Android Development] dkuku:
had the same problem - booted when I restarted my nook connected with a cable to ma pc. I don't know if it makes any difference but tried a couple of times before with no luck

[MENTION=2685019]kfazz[/MENTION]

In the test build it would be a good idea to mount the /data partition from the device - so we can then install apks that we already have installed in the device memory.

and a stupid idea - maybe we could use something like a cron job for redraw the screen to get rid of ghosting, until someone sorts it out the proper way
[Nook Touch Android Development] Kralik:
I have been turning it completely off, inserting the SD card, and then turning it on.

The screen does in fact light up for a time (maybe 20-30 seconds), and then it goes off. After sitting for a while it's frozen and requires holding the power button for a while before I can get it to turn off and start up again. Just tried booting from the stock OS, waiting for checkmark, etc. Same response.

EDIT: Also, SD card seems to be showing filesystems correctly in Linux. Pretty sure the flash was fine both times.
[Nook Touch Android Development] kfazz:
twrp issues:

sometimes omap-edpd.elf hangs when booting recovery.

adb access in recovery:

recovery boot: Bus 001 Device 030: ID 18d1:d002 Google Inc. (no permissions on ubuntu)

recovery boot post mtp disable/mtp enable:

Bus 001 Device 032: ID 18d1:4ee2 Google Inc. Nexus 4 (debug) (permissions ok)

if you get a no permissions error restart adb server as root or toggle mtp on/off through mounts:

ken@bigIron:~$ adb shell

error: insufficient permissions for device

ken@bigIron:~$ sudo `which adb` kill-server

ken@bigIron:~$ sudo `which adb` start-server

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

restarting omap-edpd:

ken@bigIron:~$ adb shell

~ # stop omap-edpd

~ # stop recovery

~ # stop baseimage

~ # start baseimage

~ # start omap-edpd

~ # start recovery

~ #
[Nook Touch Android Development] kfazz:
see post #42. looks like you're in twrp, but the epd daemon isn't initializing right. i'll try editing the init scripts to make it more reliable later.
[Nook Touch Android Development] Kralik:
Hmm, thought it might be the SD card but I'm having the same issue with a different one. Do you suggest trying it repeatedly in case it eventually works or just waiting for an update?
[Nook Touch Android Development] kfazz:
If you have adb on your PC try running adb shell and entering the commands in post #42, otherwise try with and without USB connected. I'll try to post an updated recovery image in a few days.
[Nook Touch Android Development] dorfd1:
Is there a gapps package that has the absolute minimum? Preferably one that has only Google play store and play services.
[Nook Touch Android Development] dombeef:
The first post suggests a gapps package. Id suggest against it though, we only have so much limited ram, you are better off downloading the apps manually, this website is really useful: http://apps.evozi.com/apk-downloader/ as suggested earlier by someone
[Nook Touch Android Development] dorfd1:
I might try modifying a gapps zip and remove everything that is not required. All that is needed is login service, play store and play services.
[Nook Touch Android Development] dombeef:
No need, heres a link to where you can download one, I havent tried it yet(been busy/ cant get back into recovery): http://www.androidrootz.com/2015/03/download-android-44x-kitkat-pa-gapps.html
[Nook Touch Android Development] aiamuzz:
hey great !!!

lots of people testing !!!

thanks [MENTION=2685019]kfazz[/MENTION] appreciate your active involvement.

ThankGod ... my flashing was rather simple and straightforward.

FYI ... not that its important at this stage ... Battery Spend overnight(6-7hrs) with wifi ON has been about 21% ... down from 64% to 43%)

the screenshot combo didn't work it powered down my device instead. So a fairly easy access through the power-off menu ... which is already on your todo list is preferable.

about the ghosting, the fact that only the dirty region is updated is good isn't ? i am assuming the power consumed to update the dirty region as compared to a full update should be less, if so then the dirty region update is better kept. to combat ghosting (it is a lot when we scroll the settings especially, if you have noticed) a refresh button should be the way out instead of updating the whole screen, which directly affects the battery drain.

Also better management of Glowlight which you have already pushed, should squeeze out some more power savings out of our device.

I have a EnergySistem Ereader pro device(friends) for one more day ... [MENTION=2685019]kfazz[/MENTION] ... it runs Android 4.2.2 ... i am shipping it back tomorrow ... do you want me to save any (files/folders/kernels/ how it handles screensavers, i have dumped a few screensavers in a folder and it randomly selects one in standby mode which is neat and can be replicated if possible onto our ROM as well) to dig into, to see how it handles refreshes, which are similar to how it was in stock nook, especially the settings, no excessive flashing at all. dirty region refresh with the least of ghosting is spread all over the apps, kindle, nook reader page draws, only the text is replaced and resulting in next to none ghosting.

Let me know the files and folder dump you want me to take ... with the complete path(i am not savy enough to find my way through those files)

or

better still, if there is a way i can take a backup of all the partition without root needed(i can't root my friends device) i'll be happy to save it for use here !!!

thanks.
[Nook Touch Android Development] dombeef:
I believe in the developer settings, it allows you to enable screenshots through the power off menu. I have it working just fine on my nook
[Nook Touch Android Development] aiamuzz:
Oh is it ? Sorry ... I searched and couldn't locate the option ... if i could enable it i could post screenshots of apps that work.

[MENTION=2685019]kfazz[/MENTION] ... i have uploaded boot and power off images ... if you like to use it ... please feel free to request changes if any.

I have replaced mine already in boot partition(and it works)

FYI ...

I rooted my friends EnergySistem Ereader Pro and made a nandroid backup through Onandroid scripts (boot, kernel, recovery images along with system and data have been backed up) should you like to dig into it Let me know if you want any or whole of that.
[Nook Touch Android Development] :
I would, if I could get ADB connected while TWRP is booted!

Can you help me with that? I can't get the thing to work.

And yes, ADB over USB works great for me when the regular OS is booted and when CWM is booted.
[Nook Touch Android Development] kfazz:
Are you using Linux?
[Nook Touch Android Development] :
No, I'm using Windows 7 Home Premium.
[Nook Touch Android Development] :
[MENTION=2685019]kfazz[/MENTION], okay, I got ADB working for TWRP. Here's my log after executing the commands in the shell you recommended (commands are in bold and underlined for easier reading):

~ # ←[6n[B][u]ls -l /dev/block/by-name/[/u][/B]
ls -l /dev/block/by-name/
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
lrwxrwxrwx 1 root root 20 Apr 28 17:24 boot -> /dev/block/mmcb
lk1p1
lrwxrwxrwx 1 root root 20 Apr 28 17:24 cache -> /dev/block/mmc
blk1p3
lrwxrwxrwx 1 root root 20 Apr 28 17:24 system -> /dev/block/mm
cblk1p2
lrwxrwxrwx 1 root root 20 Apr 28 17:24 userdata -> /dev/block/
mmcblk1p4
~ # ←[6n[B][u]mount[/u][/B]
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /d type debugfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
/dev/block/mmcblk0p2 on /rom type vfat (rw,noatime,nodiratime,fmask=0000,dmask=0
000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=r
emount-ro)
/dev/block/mmcblk0p6 on /media type vfat (rw,relatime,fmask=0000,dmask=0000,allo
w_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-r
o)
~ # ←[6n[B][u]fdisk -l /dev/block/mmcblk1[/u][/B]
fdisk -l /dev/block/mmcblk1

Disk /dev/block/mmcblk1: 2002 MB, 2002780160 bytes
1 heads, 16 sectors/track, 244480 cylinders
Units = cylinders of 16 * 512 = 8192 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk1p1 * 9 244480 1955775+ 6 FAT16
Partition 1 does not end on cylinder boundary

What does this mean, exactly?
[Nook Touch Android Development] kfazz:
You only have one partition on your SD. There should be four. How did you write the image?
[Nook Touch Android Development] :
Using WinImage. :confused:

I'll try a format and a re-write.
[Nook Touch Android Development] kfazz:
On windows I use win32diskimager. Dd on Linux.
[Nook Touch Android Development] :
I also have Roadkil's DiskImage, so I'm using that now. Hope it works this time around!

---------- Post added at 16:39 ---------- Previous post was at 15:53 ----------

IT WORKS! After using win32diskimager and doing the process again, I booted into CyanogenMod 11! Amazing! :D

Thank you so much, [MENTION=2685019]kfazz[/MENTION]!
[Nook Touch Android Development] :
Try [Settings > Buttons > Power menu].
[Nook Touch Android Development] dombeef:
Hey, just as a little note to anyone trying out the rom, it appears to have "burned in" an image of the homescreen into my nook's eink screen. It seems that whenever you try to shut it down, the device doesnt fully shut down, causing it to be fully drained in the morning. Perhaps this could have caused the burn in(not properly refreshing the device before removing all power to it?)

Anyways... Anyone know of any solution to fix burn in on eink devices? luckily this isnt my primary nook, but it'd be nice to not have that annoying image fully stuck on the screen.(Ill try to upload an image later tomorrow)
[Nook Touch Android Development] aiamuzz:
Oh ... sorry to hear that, does that even happen ?

I thought the e'ink devices were by design capable of handling an image as background forever(as in when you shutdown, there's alwasy some image as a place holder)

Yes even i confirm(not the screen burn) but the ROM crashes and then never comes back up, it stays in the booting image, i guess its not shutdown either, bcos if it was, restarting would have booted up, but that doesn't happen, instead i should press and hold the power button for 10-20 secs, leave it for sometime, try switching on again, press and hold, if it blinks to boot, release else, leave for sometime and try again, the 3rd time, more or less it boots up.

I have noticed that when the device boots up and is left without browsing, it goes back into this suspend state, if we are using it it stays in play, If we press power to put it to sleep chances are it goes back again to this strange suspended state!

[MENTION=5981373]ИΘΘK¡€[/MENTION] ... what are you first impressions ???

waiting for your tweaks !!!
[Nook Touch Android Development] kfazz:
****. i thought this bug was fixed. kernel crashes just as it's turing off. probably because the dsp failed to shut down. it leaves the pmic on, powering the screen until the battery runs flat.

both of my test nooks hit this bug and had some images burned in, they eventually faded away after repeated cycling of the screen.

I'm pulling the builds until i can get this solved, there are some hacks in the original BN source that address this.

i'll try to whip up a prog to repeatedly cycle the screen white to black and back, that should clear it quickly. won't have time til friday tho.
[Nook Touch Android Development] aiamuzz:
Oh !!! so its a possibility, never imagined that, but glad there is a fix, from what i gather the repeated refreshing of the same image until the battery lasts, causes this.

I thought that wasn't possible as the eink devices had some image or the other displayed even in a shutdown state only here the screen is not getting power. I get it.

Ok, even i'll not keep the SD card loaded with the device ON, I think i better test for as long as i want and switch back to the default device when idle. don't wan to end up with an affected screen.

Thanks for all the support, hopefully the short app(you are about to come up) to cure dombeef's screen will save his day and others as well.

Waiting for your next build, with the bugs/improvizations reported so far.

Until then i'll check what all apps work and what don't.
[Nook Touch Android Development] :
Sounds good. I'll probably hold off on booting my CM card until you get this utility out (I only have one Nook, so I need it to not have a burned-in screen). Thanks again!
[Nook Touch Android Development] dorfd1:
I did not think an eink screen could burn in.
[Nook Touch Android Development] :
Apparently it can. See here.

---------- Post added at 18:07 ---------- Previous post was at 17:46 ----------

Okay, here's a list of the things I've gotten working in CM11 on my NSTG so far ([MENTION=4399146]aiamuzz[/MENTION]):

- ES File Explorer 3 with root access

- Opera Mini

- transparent status bar and soft keys background

- re-assigned top- and bottom-left hard keys to back and menu like my 2.1 ROM

- all lockscreen security types

- other Settings tweaks

So far, so good!
[Nook Touch Android Development] dombeef:
Hey everyone, im back, and good news. Since yesterday, the appearance of the burn in has gotten MUCH better, it is much less prominent compared to when I first noticed it. I am currently flashing a black and white gif to the screen, hopefully thatll help.

Image to burn in: http://i.imgur.com/IjcaJYY.png It was a lot more darker yesterday before I tried to fix it, like I could still see the text of the apps on the homescreen and the time, and the soft buttons.

And I wasnt sure that a eink screen could get burn in, everywhere online suggests against it being possible, but I guess since its not really a permanent burn in, it doesnt count. And also kfazz, dont fret, luckily i found it out with an extra nook, not someone else who only has one nook. And no need to develop a program that flashes the screen, since its only a single instance(I suggest anyone else trying the rom out to cease in doing so, or else you may risk getting what happened to me ? ) and it already appears to be disappearing, itd be better to spend your time not wasting on that and trying to fix the problem XD

Once again, this proves the fact that this is still an alpha(maybe not even that) build, not usable in daily use, but hopefully the issues would be fixed.

Ill be flashing the screen black and white for an hour or two, Ill respond back with any progress.
[Nook Touch Android Development] kfazz:
right pre-alpha quality atm. i'm glad it's disappearing for you. when i had "burn in" on my first nook it stayed for about 2 days. until it was completely invisible. the nook board files reference a debug led on the board. (led90 doesn't exist / or isn't populated on retail boards) "led90" i have one of my nooks cracked open right now, and i'm going to try debugging with this a bit. led on -> power off -> is led on? etc. which kernel were you running btw?
[Nook Touch Android Development] dombeef:
I was running the original kernel, I believe the one that still had the sleep of death for wifi. And thank goodness your nook got the issues fixed out kinda quick, although mine could just be disappearing quicker due to me trying to fix it more(constant screen refreshes)

Also as a little note, I accidentally left it twice unplugged and off, and wondered why the battery would become drained in the morning(even though it was supposedly "off"), And every time I left it to go to sleep it would keep the last thing I was viewing, which is the homescreen.

In the future(way future, after we get the breaking bugs outa here), itll be helpful to have the screen flash black(or even like a sleep image like the old OS) whenever the device goes to sleep, or shuts down.

If you need any help, my nook is currently off the cm11 rom until any better news.

Also an update, I have been flashing the screen since I posted my last message, and the burn in is somehow almost completely gone(except for a tiny bit, but its barely noticeable.
[Nook Touch Android Development] kfazz:
i did add code to show a white screen before android shuts down, but most of the time android redraws the homescreen afterwards. especially with 'fence sync' enabled.
[Nook Touch Android Development] kfazz:
oh man, i've found a fix for the lack of shutdown and it appears to be a one-liner.

diff --git a/arch/arm/mach-omap2/board-3621_gossamer.c b/arch/arm/mach-omap2/board-3621_gossamer.c
index 1dfa137..b17ccc9 100644
--- a/arch/arm/mach-omap2/board-3621_gossamer.c
+++ b/arch/arm/mach-omap2/board-3621_gossamer.c
@@ -611,7 +611,7 @@ static struct twl4030_power_data gossamer_t2scripts_data __initdata = {
.scripts = twl4030_scripts,
.num = ARRAY_SIZE(twl4030_scripts),
.resource_config = twl4030_rconfig,
- //.use_poweroff = true,
+ .use_poweroff = true,
};

i'm going to do some extensive testing. i'm also planning to add a reboot notifier to the pmic driver so it shuts down safely/sanely.

currently i see this:

<7>papyrus: i2c pwr req: 1
<7>hwst: tmst_val=1, ist1=af, ist2=ff, pg=00
<7>hwst: tmst_val=10, ist1=00, ist2=00, pg=fa
<7>hwst: tmst_val=10, ist1=00, ist2=00, pg=fa
<7>papyrus: i2c pwr req: 0
<6>SysRq : Emergency Remount R/O
<6>EXT4-fs (mmcblk1p4): re-mounted. Opts: (null)
<6>EXT4-fs (mmcblk1p3): re-mounted. Opts: (null)
<4>Emergency Remount complete
<6>as3676 2-0040: Shutting down AS3676
<6>zforce-ts 2-0050: ZforceDrvrShtdwn

theres a pmic poweroff request, immediately followed by shutdown, pretty sure the request isn't getting fulfilled.

simetimes, maybe less than 50% of the time android draws another frame and the pmic gets left on during shutdown.

i've added a reboot notifier to the pmic hal, so it should always shutdown safely now.

theoretically, even without the twl4030 fix above, the nook would hang and drain the battery, but not burn the screen.

so that's the other half of the bug.
[Nook Touch Android Development] kfazz:
Test build #2: with a few less bugs

Edit: this one still had wifi sleep bug, i've reuploaded it with a different kernel.

Edit2: updated recovery files for more reliable twrp.

https://drive.google.com/folderview...d5dEN6YldMSEdfSEd2SXRnYzVSLVkzdDA&usp=sharing

Changes:

kernel:

twl4030: use poweroff, don't crash on shutdown

omap3epfb: add reboot notifier to pmic hal to turn off safely during shutdown

twrp:

reworked init.rc so services start in the right order

fixed usb ids

android:

built without sync framework again,

also changed from dirty region updating to whole screen to try reducing the tearing/ side to side flashing.

updating:

overwrite uImage-recovery and ramdisk-recovery.img on sdcard

flash zip

fresh install:

write sd.img from sd2.zip to sdcard (try win32diskimager if you're on windows)

copy zip and md5 to /media, reboot with sdcard in, install rom using twrp,

reboot into android.
[Nook Touch Android Development] :
[MENTION=2685019]kfazz[/MENTION], here is a modded build.prop and twl403-keypad.kl for you to perhaps use in future updates. Changes are as follows: build.prop is modded to allow a transparent status bar and soft keys, twl4030-keypad.kl is modded for:

- top left key is BACK

- bottom left key is MENU

- top right key is PAGE_UP

- bottom right key is PAGE_DOWN

Use them if you like.
[Nook Touch Android Development] kfazz:
if you've already downloaded build #2 please redownload it.

i switched back to encore_merge kernel, because nook_nst_3.0 branch crashes

with pmic on when wifi is turned off -> on after a suspend/resume cycle.

nook_nst_3.0 branch has correct suspend, usb, host, charger, etc.

encore merge branch has some issues related to suspend.

if you power on the nook with usb connected, it won't suspend with the screen off, so battery usage will be bad. also, sometimes usb detection is messed up.

however, it shouldn't crash.

i'm trying to bisect the 2 branches to figure out what commit actually fixes wifi.
[Nook Touch Android Development] :
Overwriting uImage-recovery and ramdisk-recovery.ub on the sdcard with the ones provided doesn't boot me into TWRP; it just boots me right back into the regular CM11 ROM.

Help?

EDIT - Also, soon as we get a good stable version, we're going to need to get FastMode/NoRefresh working. I tried to install NoRefresh, and it installed, but when I tried to launch it, I just get a "NoRefresh has stopped" message.
[Nook Touch Android Development] kfazz:
Reboot from android and hold bottom 2 page buttons for 10 seconds as soon as the boot pic flashes
[Nook Touch Android Development] :
Oh, of course. Working now.

UPDATE - second build working famously! The only changes I'd made that didn't stay through the update were, of course, build.prop and twl4030-keypad.kl, but everything else is good! :good: