[Q] [R&D] NST future CM11 &TWRP

Search This thread

kfazz

Senior Member
Jun 24, 2010
299
625
Anyone with UART or USB access to u-boot willing to help with a dev project?
Devs only ATM, too many serious bugs
And there is the possibility of screen damage
If it hardlocks with papyrus ic on
test build #1 pulled due to poweroff/screen burnin bug

Test build #1: http://forum.xda-developers.com/showpost.php?p=60336716&postcount=14

Test build #2: http://forum.xda-developers.com/showpost.php?p=60453540&postcount=74
Test build #3: http://forum.xda-developers.com/showpost.php?p=60677266&postcount=136
Kernel Tree: https://github.com/kfazz/android_kernel_bn_zoom2/tree/nook_nst_3.0
zoom2 device tree: https://github.com/kfazz/android_device_bn_zoom2
vendor tree: https://github.com/kfazz/propietary_vendor_bn.git
Local manifest:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remove-project name="CyanogenMod/android_build" />
  <remove-project name="CyanogenMod/android_frameworks_base" />
  <remove-project name="CyanogenMod/android_frameworks_native" />
  <remove-project name="CyanogenMod/android_bootable_recovery" />

  <project path="frameworks/base" name="kfazz/android_frameworks_base" revision="nook"/>
  <project path="frameworks/native" name="kfazz/android_frameworks_native"  revision="nook"/>
  <project path="bootable/recovery" name="TeamWin/Team-Win-Recovery-Project" revision="android-5.1"/>

  <project path="build" name="kfazz/android_build" revision="nook"/>
  <project path="device/bn/zoom2" name="kfazz/android_device_bn_zoom2" revision="master"/>
  <project path="kernel/bn/zoom2" name="kfazz/android_kernel_bn_zoom2" revision="nook_nst_3.0"/>
  <project path="vendor/bn" name="kfazz/propietary_vendor_bn" revision="master"/>
</manifest>
Done:
Kernel 3.0.8 boots
Zoom2 devicetree
Cm11 boots
Twrp boots and installs ROM
Wip:
Ghosting
Ram usage
Suspend

To do:
WiFi sleep of death,
USB(works, but kinda slow) fixed adb gets ~4mb sec mtp gets ~2.8
Integrate epdcontroller in framework (partially done)
Pngcrush grayscale all images done, by adding back custom squisher to android/build
Fastmode,
multitouch, done, using 1.3.1 zforce driver + changes based on http://lwn.net/Articles/572311/
USB host not sure what the limit is but a 100mA usb mouse works without a powered hub, and a 200mA usb stick doesn't

Themeing
Gapps don't work (but too much lowram lag to be practical)
 

Attachments

  • IMG_20150327_160538.jpg
    IMG_20150327_160538.jpg
    249.7 KB · Views: 8,858
  • IMG_20150328_171211.jpg
    IMG_20150328_171211.jpg
    260.3 KB · Views: 8,610
Last edited:
N

NOOK!E

Guest
Anyone with UART or USB access to u-boot willing to help with a dev project?
Devs only ATM, too many serious bugs
And there is the possibility of screen damage
If it hardlocks with papyrus ic on

Done:
Kernel 3.0.8 boots
Zoom2 devicetree
Cm11 boots
Twrp boots and installs ROM
Wip:
Ghosting
Ram usage
Suspend

To do:
WiFi sleep of death, USB, fastmode
Integrate epdcontroller in framework
Pngcrush grayscale all images
Fastmode, multitouch, USB host, etc
Themeing
Gapps don't work

Woah, this looks sick! :cowboy: I'd be glad to help you in any way I can. I've got a Nook Touch Glow running a customized version of the 1337 ROM, a modded framework-res.apk, and a modded Settings.apk (see my sig for full specifications). Let me know how I can assist!

By the way, I'm inviting you to my Nook Touch Devs group now, so we can talk in there. :)
 

kfazz

Senior Member
Jun 24, 2010
299
625
Woah, this looks sick! :cowboy: I'd be glad to help you in any way I can. I've got a Nook Touch Glow running a customized version of the 1337 ROM, a modded framework-res.apk, and a modded Settings.apk (see my sig for full specifications). Let me know how I can assist!

By the way, I'm inviting you to my Nook Touch Devs group now, so we can talk in there. :)

if you'd be willing to try compiling it, javifo has a u-boot tree that looks like it supports ttyUSB.
https://github.com/javifo/NST/tree/master/u-boot
I'm not sure if my kernel supports usb because my usb port is broken, but if you can get u-boot access over usb
i'll try to build a kernel and bootscript that will be debuggable over usb.
My current setup is completely self contained on the sdcard and doesn't touch stock partitions except reading device specific data from /rom
 
  • Like
Reactions: aiamuzz
N

NOOK!E

Guest
if you'd be willing to try compiling it, javifo has a u-boot tree that looks like it supports ttyUSB.
https://github.com/javifo/NST/tree/master/u-boot
I'm not sure if my kernel supports usb because my usb port is broken, but if you can get u-boot access over usb
i'll try to build a kernel and bootscript that will be debuggable over usb.
My current setup is completely self contained on the sdcard and doesn't touch stock partitions except reading device specific data from /rom

I'll give it a go on the weekend when I have some free time.
 

kfazz

Senior Member
Jun 24, 2010
299
625
rendering from userspace

omap3pfb drawing modes:
pageflip mode: (non deferred)
turned on by writing a 1 to
/sys/devices/platform/omap3epfb.0/graphics/fb0/pgflip_refresh

apps that are unaware of bn's eink setup work fine.
this is how stock recovery uses the display, and also bootanimation on stock rom (i think).
Downside: ghosting, no control over waveform used to draw ( that i know of )
'command' mode.
display update is controlled by various private ioctl commands to the /dev/graphics/fb0 file.
ioctl -> * -> EpdService function -> EpdController function
OMAP3EPFB_IO_SET_REGION <- * <- configureRegion <- setRegion
OMAP3EPFB_IO_GET_REGION -> * -> UNUSED
OMAP3EPFB_IO_RESET_REGION <- * <- resetRegion <- resetRegion
OMAP3EPFB_IO_FILL_REGION < * <- fillRegion <- fillRegion
* is jni function calls in libandroidruntime.so
EpdController.epdRefresh writes to /sys/devices/platform/omap3epfb.0/graphics/fb0/epd_refresh
1 = Gray Clear
0 = update
epdDisable writes to /sys/class/graphics/fb0/epd_disable
value is timeout period in milliseconds
by themselves these writes and ioctls do nothing. the magic is in libui.so
stock rom calls OMAP3EPFB_IO_REQ_AREA_UPDATE in FramebufferNativeWindow::queueBuffer()
to update the display. No idea what logic the is used to decide when or whether to update.

Deferred Rendering:
this is turned off in kernel config for stock rom, and theres a typo in one of the ifdefed clauses which
leads me to believe this code path was abandoned early in development of the driver
i got it to work, but it doesn't seem to have many advantages over regular pageflip mode, and it's slow.
more info on deferred io: http://elinux.org/images/2/25/E_paper_Displays.pdf

anyone see any errors or have any insights as to how to implement this on Kitkat's graphics stack?
 
  • Like
Reactions: aiamuzz and bisbal

aiamuzz

Senior Member
Dec 24, 2011
427
45
Oh Wow !!!
is that really a cm11(KITKAT) lock screen on a NST G ???
thanks for trying @kfazz following this thread, look forward to what will materialize out of this GREAT effort. kitkat is known to support low ram devices, hopefully it will accommodate our Nook Simple Touch activity which is only static read centric operations.
thanks for attempting
 

dorfd1

Senior Member
Jan 13, 2012
662
105
Any chance of a video? I'm scared that this is just a late April fool's joke! Been waiting for this for so long! :)

I to can't believe it. but this is cool. I hope it will be usefull since I thought the cm7 would have the highest version of cyanogenmod to work well on our devices.
 

dombeef

Senior Member
Jun 5, 2012
95
26
Any chance of a video? I'm scared that this is just a late April fool's joke! Been waiting for this for so long! :)

I to can't believe it. but this is cool. I hope it will be usefull since I thought the cm7 would have the highest version of cyanogenmod to work well on our devices.

I mean, the source to compile is right there, and he last updated it about an hour ago... Id compile a version to test for myself, but my server that I've used in the past for compiling android has yet to be set up again(new install :p)

Im honestly amazing that kfazz got it working, major props to him and hopefully this would allow more funtionality to come out of my old nook(s)

Edit: Oh, and this would also open up a wider range of usb devices to plug into the nook, as well as better compatibility for any new apps

---------- Post added at 10:54 PM ---------- Previous post was at 10:46 PM ----------

Also, to kfazz, Ive got an extra nook that doesnt matter if the screen gets damages(a new one is fairly cheap anyways), Id love to help you test out this project. I can also get access to the uart if needed, ill just have to pop open the case and solder on a few points(right? I last read about the access to the uart on the nook many months/year ago and I may be mistaken)
 
  • Like
Reactions: kfazz

kfazz

Senior Member
Jun 24, 2010
299
625
Yes, yes, and yes. UART access isn't strictly necessary, but there are a few issues I want to resolve before release. Mainly the circle animation android draws on loading screens, and auto partitioning sdcard. PS delete system/core/ uncrypt/android.mk and it should build. (Twrp conflict)
 

aiamuzz

Senior Member
Dec 24, 2011
427
45
Wow, unbelievable we have WIP and moreover kitkat of all, Can't wait to try it out.
switching off all possible animation is best don't want to lose out on valuable battery time.
thanks Guys.
 

aiamuzz

Senior Member
Dec 24, 2011
427
45
Trying to be optimistic ...
A LG optimus Pro C660 with 256 RAM and less than 200MB internal storage for apps.
Came across this Lollipop
I believe Kitkat was also attemtpted for this device. but the ROM file is purged and no longer available.

If this device can operate as a full fledged phone, Will our device hold any promise for static reading purposes only ?
 

kfazz

Senior Member
Jun 24, 2010
299
625
super buggy test build #1

super buggy test build #1:
update: pulled due to serious bugs. poweroff may fail with the screen on, buring in an image.
First up, to the best of my knowledge this rom won't melt your eink screen, wipe your sd, or cause your nook to spontaneously combust, but NO WARRANTIES.
With that out of the way, here is a test build. I'm not publishing it because it's done, but rather to encourage others to sync the source and try bulding it.
backup contents of sdcard first
write sd.img to a sdcard in the usual way. (sd_img.zip is attached to this post)
nook_nst_3.0 kernel: (this still has wifi sleep of death bug)

Same thing built with encore_merge kernel:(no wifi sleep bug, may have other problems, probably usb)

copy rom zip and md5 to nook's media partition
boot from sdcard, mount media
install rom (make sure signature verification is on)
reboot
if it doesn't boot hard reboot by pressing power and home for 9 seconds
"Where's the source?"
See the first post.,
Specifically the kernel in this rom was built from commit 7c944768270ec14736c7977b876a107e0a30b87f (current tip of nook_nst_3.0 branch)
except arch/arm/mach-omap2/board-3621-gossamer.c which was checked out from commit fbd1b8ccbebcb483eed158c5b6d51a4f44bbd2c4 (current tip of encore_merge branch)
"How can I help?"
sync my code and send me patches
sync my code and build it yourself
make a cm11 theme and test it
patch apps to use EpdController

What isn't helpful:
it's buggy. it's slow.
feature x is broken / app x doesn't work.
it's ugly. etc.
"Where're the gapps? I really want gapps, even though i know they will run all the time stealing my precious ram"
try the pico ones, or pico(uni). you probably won't be able to run browser after they're installed
http://www.androidrootz.com/2015/03/download-android-44x-kitkat-pa-gapps.html
Alternative: https://f-droid.org/ has a market app for free/foss software, and lost of reading apps
 

Attachments

  • sd_img.zip
    9.2 MB · Views: 500
Last edited:

Kralik

Senior Member
Nov 12, 2011
128
12
I'm very excited to see where this is going. I have an app that requires 2.3+ and would love to get it working. I can put up with no Gapps, slow system, etc. Just wondering about a few things:

Ghosting: Does the e-ink screen not properly refresh?
Wifi Sleep of Death: What does this mean?

Cheers!
 

dombeef

Senior Member
Jun 5, 2012
95
26
I'm very excited to see where this is going. I have an app that requires 2.3+ and would love to get it working. I can put up with no Gapps, slow system, etc. Just wondering about a few things:

Ghosting: Does the e-ink screen not properly refresh?
Wifi Sleep of Death: What does this mean?

Cheers!

For Ghosting, its basically the same as the regular OS, theres issues after a while of use, but I havent seen much from a few hours of trying out the build.

And also to kfazz, this build is awesome! Ive been trying to compile the OS, but have been having issues compiling(last time I compiled an android zip was like 2 years ago for my Nook Color), Although I am not done trying yet ;)

Also: I found a small bug(no idea where to go to fix it, but I remember it being like a bug a while back for the CM10 or 11 development build for the Nook Color) where if you you try to go into landscape(by an app forcing it), the x and y values for the touchscreen are flipped, it shouldnt be too hard to change.
 
  • Like
Reactions: kfazz

aiamuzz

Senior Member
Dec 24, 2011
427
45
super buggy test build #1:
First up, to the best of my knowledge this rom won't melt your eink screen, wipe your sd, or cause your nook to spontaneously combust, but NO WARRANTIES.
With that out of the way, here is a test build. I'm not publishing it because it's done, but rather to encourage others to sync the source and try bulding it.
backup contents of sdcard first
;
;
;

Hey this is really great !!!
but too early for me to try ... not a techie who understands all this stuff.

We have CWM recovery installed and using yattaro&nookie's ROM
Can't this be flashed from CWM ?
Twrp Recovery a must ?



For Ghosting, its basically the same as the regular OS, theres issues after a while of use, but I havent seen much from a few hours of trying out the build.

And also to kfazz, this build is awesome! Ive been trying to compile the OS, but have been having issues compiling(last time I compiled an android zip was like 2 years ago for my Nook Color), Although I am not done trying yet ;)

Also: I found a small bug(no idea where to go to fix it, but I remember it being like a bug a while back for the CM10 or 11 development build for the Nook Color) where if you you try to go into landscape(by an app forcing it), the x and y values for the touchscreen are flipped, it shouldnt be too hard to change.

Hey dombeef, great to hear you complied it and have flashed it on your device.
Looking forward to your feedback on its performance.

Excited !!!
 
Last edited:

Kralik

Senior Member
Nov 12, 2011
128
12
Just remembered -- I have the Glowlight model. Is turning the light on/off and adjusting the level supported? Is it possible to customize the left/right side buttons?
 

kfazz

Senior Member
Jun 24, 2010
299
625
...
Also: I found a small bug(no idea where to go to fix it, but I remember it being like a bug a while back for the CM10 or 11 development build for the Nook Color) where if you you try to go into landscape(by an app forcing it), the x and y values for the touchscreen are flipped, it shouldnt be too hard to change.
change touch.orientationAware = 0 to touch.orientationAware = 1 in /system/usr/idc/zForce_Touchscreen.idc (device/bn/zoom2/prebuilt/usr/idc/zforce_ts.idc)
Fix tested and pushed

I'm very excited to see where this is going. I have an app that requires 2.3+ and would love to get it working. I can put up with no Gapps, slow system, etc. Just wondering about a few things:

Ghosting: Does the e-ink screen not properly refresh?
Wifi Sleep of Death: What does this mean?

Cheers!
Ghosting: Screen updates in GU mode most of the time, so previous contents of screen are faintly visible.
Wifi Sleep of Death: sometimes after the nook is in suspend for a while, the wifi chip doesn't power back on and toggling wifi from the android settings will cause the nook to lockup in a bad state.
 
  • Like
Reactions: dombeef

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    Anyone with UART or USB access to u-boot willing to help with a dev project?
    Devs only ATM, too many serious bugs
    And there is the possibility of screen damage
    If it hardlocks with papyrus ic on
    test build #1 pulled due to poweroff/screen burnin bug

    Test build #1: http://forum.xda-developers.com/showpost.php?p=60336716&postcount=14

    Test build #2: http://forum.xda-developers.com/showpost.php?p=60453540&postcount=74
    Test build #3: http://forum.xda-developers.com/showpost.php?p=60677266&postcount=136
    Kernel Tree: https://github.com/kfazz/android_kernel_bn_zoom2/tree/nook_nst_3.0
    zoom2 device tree: https://github.com/kfazz/android_device_bn_zoom2
    vendor tree: https://github.com/kfazz/propietary_vendor_bn.git
    Local manifest:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <manifest>
      <remove-project name="CyanogenMod/android_build" />
      <remove-project name="CyanogenMod/android_frameworks_base" />
      <remove-project name="CyanogenMod/android_frameworks_native" />
      <remove-project name="CyanogenMod/android_bootable_recovery" />
    
      <project path="frameworks/base" name="kfazz/android_frameworks_base" revision="nook"/>
      <project path="frameworks/native" name="kfazz/android_frameworks_native"  revision="nook"/>
      <project path="bootable/recovery" name="TeamWin/Team-Win-Recovery-Project" revision="android-5.1"/>
    
      <project path="build" name="kfazz/android_build" revision="nook"/>
      <project path="device/bn/zoom2" name="kfazz/android_device_bn_zoom2" revision="master"/>
      <project path="kernel/bn/zoom2" name="kfazz/android_kernel_bn_zoom2" revision="nook_nst_3.0"/>
      <project path="vendor/bn" name="kfazz/propietary_vendor_bn" revision="master"/>
    </manifest>
    Done:
    Kernel 3.0.8 boots
    Zoom2 devicetree
    Cm11 boots
    Twrp boots and installs ROM
    Wip:
    Ghosting
    Ram usage
    Suspend

    To do:
    WiFi sleep of death,
    USB(works, but kinda slow) fixed adb gets ~4mb sec mtp gets ~2.8
    Integrate epdcontroller in framework (partially done)
    Pngcrush grayscale all images done, by adding back custom squisher to android/build
    Fastmode,
    multitouch, done, using 1.3.1 zforce driver + changes based on http://lwn.net/Articles/572311/
    USB host not sure what the limit is but a 100mA usb mouse works without a powered hub, and a 200mA usb stick doesn't

    Themeing
    Gapps don't work (but too much lowram lag to be practical)
    6
    super buggy test build #1

    super buggy test build #1:
    update: pulled due to serious bugs. poweroff may fail with the screen on, buring in an image.
    First up, to the best of my knowledge this rom won't melt your eink screen, wipe your sd, or cause your nook to spontaneously combust, but NO WARRANTIES.
    With that out of the way, here is a test build. I'm not publishing it because it's done, but rather to encourage others to sync the source and try bulding it.
    backup contents of sdcard first
    write sd.img to a sdcard in the usual way. (sd_img.zip is attached to this post)
    nook_nst_3.0 kernel: (this still has wifi sleep of death bug)

    Same thing built with encore_merge kernel:(no wifi sleep bug, may have other problems, probably usb)

    copy rom zip and md5 to nook's media partition
    boot from sdcard, mount media
    install rom (make sure signature verification is on)
    reboot
    if it doesn't boot hard reboot by pressing power and home for 9 seconds
    "Where's the source?"
    See the first post.,
    Specifically the kernel in this rom was built from commit 7c944768270ec14736c7977b876a107e0a30b87f (current tip of nook_nst_3.0 branch)
    except arch/arm/mach-omap2/board-3621-gossamer.c which was checked out from commit fbd1b8ccbebcb483eed158c5b6d51a4f44bbd2c4 (current tip of encore_merge branch)
    "How can I help?"
    sync my code and send me patches
    sync my code and build it yourself
    make a cm11 theme and test it
    patch apps to use EpdController

    What isn't helpful:
    it's buggy. it's slow.
    feature x is broken / app x doesn't work.
    it's ugly. etc.
    "Where're the gapps? I really want gapps, even though i know they will run all the time stealing my precious ram"
    try the pico ones, or pico(uni). you probably won't be able to run browser after they're installed
    http://www.androidrootz.com/2015/03/download-android-44x-kitkat-pa-gapps.html
    Alternative: https://f-droid.org/ has a market app for free/foss software, and lost of reading apps
    3
    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.
    3
    i don't have time for a lengthy post, but i'm been hacking on the kernel a bit.
    i've pulled a few patches from encore branch that help a bit.
    i also have a test build running with IMG DDK 1.12 pulled from moto360.
    fixed area update in surface flinger. (forgot to add top and bottom to width and height to get rectangle end coords.)
    and i have a crazy idea for compressing apks at install time, the same way the rom is compressed, but not sure if it's feasible.
    2
    rendering from userspace

    omap3pfb drawing modes:
    pageflip mode: (non deferred)
    turned on by writing a 1 to
    /sys/devices/platform/omap3epfb.0/graphics/fb0/pgflip_refresh

    apps that are unaware of bn's eink setup work fine.
    this is how stock recovery uses the display, and also bootanimation on stock rom (i think).
    Downside: ghosting, no control over waveform used to draw ( that i know of )
    'command' mode.
    display update is controlled by various private ioctl commands to the /dev/graphics/fb0 file.
    ioctl -> * -> EpdService function -> EpdController function
    OMAP3EPFB_IO_SET_REGION <- * <- configureRegion <- setRegion
    OMAP3EPFB_IO_GET_REGION -> * -> UNUSED
    OMAP3EPFB_IO_RESET_REGION <- * <- resetRegion <- resetRegion
    OMAP3EPFB_IO_FILL_REGION < * <- fillRegion <- fillRegion
    * is jni function calls in libandroidruntime.so
    EpdController.epdRefresh writes to /sys/devices/platform/omap3epfb.0/graphics/fb0/epd_refresh
    1 = Gray Clear
    0 = update
    epdDisable writes to /sys/class/graphics/fb0/epd_disable
    value is timeout period in milliseconds
    by themselves these writes and ioctls do nothing. the magic is in libui.so
    stock rom calls OMAP3EPFB_IO_REQ_AREA_UPDATE in FramebufferNativeWindow::queueBuffer()
    to update the display. No idea what logic the is used to decide when or whether to update.

    Deferred Rendering:
    this is turned off in kernel config for stock rom, and theres a typo in one of the ifdefed clauses which
    leads me to believe this code path was abandoned early in development of the driver
    i got it to work, but it doesn't seem to have many advantages over regular pageflip mode, and it's slow.
    more info on deferred io: http://elinux.org/images/2/25/E_paper_Displays.pdf

    anyone see any errors or have any insights as to how to implement this on Kitkat's graphics stack?
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone