[Q] [R&D] NST future CM11 &TWRP - Nook Touch Android Development

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)

kfazz said:
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
Click to expand...
Click to collapse
Woah, this looks sick! 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.

ИΘΘK¡€ said:
Woah, this looks sick! 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.
Click to expand...
Click to collapse
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

kfazz said:
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
Click to expand...
Click to collapse
I'll give it a go on the weekend when I have some free time.

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?

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

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!

coolius said:
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!
Click to expand...
Click to collapse
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.

coolius said:
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!
Click to expand...
Click to collapse
dorfd1 said:
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.
Click to expand...
Click to collapse
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 )
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)

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)

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 said:
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.
Click to expand...
Click to collapse
I think the boot animation would have to be disabled.

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 ?

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 kernelno 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

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!

Kralik said:
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!
Click to expand...
Click to collapse
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.

kfazz said:
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
;
;
;
Click to expand...
Click to collapse
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 ?
dombeef said:
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.
Click to expand...
Click to collapse
Hey dombeef, great to hear you complied it and have flashed it on your device.
Looking forward to your feedback on its performance.
Excited !!!

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?

Kralik said:
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?
Click to expand...
Click to collapse
Well @Kralik as you can see its a little too early for that ... i believe this is not even a beta build !!!
am i right @kfazz ?

dombeef said:
...
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.
Click to expand...
Click to collapse
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
Kralik said:
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!
Click to expand...
Click to collapse
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.

Related

[Gen9] ICS build Alpha 1, now works for A80 and A101.

Hi Guys,
*edit*
Teaser time is over, here is the build.
Version alpha 1 is here, nothing new for A101, it just adds touchscreen for A80 owners.
Preliminary warning: this is buggy as hell, don't expect a functional build. This is only if you want to get an early taste of ICS. And as usual, I'm not responsible if you blow your tablet.
What works:
- Framebuffer with 3D driver enabled.
- Touchscreen (A101 only)
- Wifi
What doesn't work:
- Everything else
- Internal storage is not mounted.
- Most notably, audio/video/power management/charging.
Instructions:
- You need sde menu enabled, see instructions here if you didn't do it already.
- Copy sysroot_ice.img to internal storage root:
Code:
adb push sysroot_ice.img /data/media
- In developer menu, flash kernel and initrd from zip file:
On boot menu, select "Recovery system"
Select "developer edition menu"/"flash kernel and initramfs"
A drive should appear on your PC, copy zImage and initramfs.cpio.gz to it.
Select OK, the kernel should flash.
Select OK to reboot.
- Choose developer edition in boot menu
You should see two menus coming before boot, just wait for timeout. Other options won't work for your device.
Informations/Tips:
- Wifi AP scan doesn't work at first. Just add a dummy network, it doesn't matter if it doesn't exist really, scan will work after that (on wifi panel, click on "Add Network" button, top right of the screen then type "dummy" as network SSID, then OK).
- As I didn't want to interfere with regular build, data partition is the same as system image file, so there is only about 90M for apps.
I don't need feedback on bugs and problem running it as there is too many in current state. But let me know if you were able to run it though.
Updates
12/12/2011 - version alpha1, should support A80 now. Thanks to a1Pha for the test!
Thanks,
LeTama
* reserved *
for the buzz
http://www.jbmm.fr/?p=24451
Archos 70?
If this can be done on an Archos 101, could it be done on an Archos 70 as well? [The 8GB version without the hard drive.] My old Archos 70 needs a new lease of life!
pstjmack said:
If this can be done on an Archos 101, could it be done on an Archos 70 as well? [The 8GB version without the hard drive.] My old Archos 70 needs a new lease of life!
Click to expand...
Click to collapse
This a 101 G9, not G8... I believe it could be done on G8, even though ram will probably an issue. I'll try probably someday.
Build released, see first post.
how use the 2 anothers files ?
Hi Cajl,
The zImage and initramfs.cpio.gz ? These are the one that must be flashed through sde. I added the instructions in first post, this is the same thing as previous rooted firmware.
As it is, the initrd is not compatible with previous rooted firmware, you'll loose the possibility to run it after flashing ice kernel+initrd. You can reflash it again afterwards though.
Alpha 1 released, touchscreen should now work for 80 G9. Let me know if it doesn't work for you, there is two touchscreen drivers and only one is confirmed to work.
Market Working
Good news, after digging with it and deleting all Archos's craps. I finally make Market to work + Wifi, so this will be a great news now.
First google and download Market_v3.4.4.apk
then adb push Market_v3.4.4.apk /system/app
then adb shell
#cd /system/app
#rm Phonesky.apk
#cp Market_v3.4.4.apk Phonesky.apk
#rm Market_v3.4.4.apk
#chmod 777 Phonesky.apk
there we go!
letama said:
This a 101 G9, not G8... I believe it could be done on G8, even though ram will probably an issue. I'll try probably someday.
Click to expand...
Click to collapse
Please try for A70 when you have time as there is a large audience of us.
wozhere said:
Please try for A70 when you have time as there is a large audience of us.
Click to expand...
Click to collapse
I did this weekend, results are not very good so far... It's quite slow, few seconds to go from apps to widgets for instance. I didn't play much with it, touchscreen driver need more work and I couldn't make it work properly yet.
We'll see. Much work needed and slowness could come for a hidden problem somewhere, but I couldn't see anything obvious.
letama said:
I did this weekend, results are not very good so far... It's quite slow, few seconds to go from apps to widgets for instance. I didn't play much with it, touchscreen driver need more work and I couldn't make it work properly yet.
We'll see. Much work needed and slowness could come for a hidden problem somewhere, but I couldn't see anything obvious.
Click to expand...
Click to collapse
Sounds a challenge, thanks for working on it whenever you have spare time and keep us posted from time to time. If pulled off, even in a limited version, it will be a great coup.
+1+1+1+1+1+1+1
Yeah... everyones leaching for ICS these days
The limited RAM on Gen8 will be definitely a blocker...
On the other hand people even made efforts to run ICS on the good old Dream device. But this of course is a technical challenge, it's far from daily use.
Anyway i like reading your threads, letama...
Regards,
scholbert
Just saw this, ICS on the old HTC G1 (528MHz CPU & 256MB of RAM):
http://forum.xda-developers.com/showthread.php?p=19648827
Works so far on my G9 80, no problems with the touchscreen driver. Good work
you are the man, keep on the good work
link is down
i want to help with developing (I have a AOSP ICS rom for the play so i know how ics works)
I re-uploaded on uploading.com, first post updated.

[ROM/KERNEL] OFFICIAL CM11.0 + 3.0.72 Kernel for Kindle Fire [NIGHTLIES]

STEP 1: DOWNLOAD TWRP 2.7.x.x and UPDATE (REQUIRED FOR 4.4):
EDIT: @Dees_Troy has an official 2.7.x.x w/ SElinux support here:
http://techerrata.com/file/twrp2/blaze/openrecovery-twrp-2.7.0.1-otter.img
Flash with the following adb commands:
Code:
adb shell
su
idme bootmode 4002
reboot
# back in your PC shell
fastboot -i 0x1949 flash recovery openrecovery-twrp-2.7.0.1-otter.img
If you have problems with that file and/or don't want to use adb/fastboot flash method, you can download a flashable .zip from the following locations. Use your existing recovery to flash the update:
Mirror 1: Download (Goo.im)
BEFORE FLASHING ANDROID 4.4: PERFORM A WIPE + ADVANCED->FORMAT SYSTEM TWRP.
STEP 2: DOWNLOAD A BUILD OF CM11.0:
DO NOT USE ART YET. BUGGY AND WILL PROBABLY NEED A DATA WIPE TO RECOVER FROM
NIGHTLIES:
http://download.cyanogenmod.org/?device=otter
GAPPS (Use Version "CM 11" row):
http://wiki.cyanogenmod.org/w/Gapps
Older builds are found here:
http://goo.im/devs/Hashcode/otter/cm10/
http://goo.im/devs/Hashcode/otter/cm10.1/
http://goo.im/devs/Hashcode/otter/cm10.2/
GAPPS (For Android 4.3/CM10.2 builds):
http://goo.im/gapps/gapps-jb-20130813-signed.zip
CHANGES:
[05/15] More audio updates to fix low-power states (screen off / background music)
[11/25] Released updated build for cm11.0
[08/12] Kernel updated to 3.0.72 (on par w/ Google/common kernel)
[07/30] Updated to CM10.2 build
[05/26] Backlight driver update to help w/ SODs
[05/24] Sensor updates (includes light sensor now usable in Android OS
[05/24] Reverted 2 sound driver commits in the kernel to help w/ headset function -- testing needed.
[05/14] New audio driver (WIP)
[03/27] Reboot Recovery mode is now fixed
[01/17] Updated SGX/PowerVR driver to latest binaries from omapzoom (still showing [email protected])
[01/15] CM10.1 updates + reverted some USB changes in the kernel for sleep testing
[01/07] Battery life / sleep improvements
[01/06] Update to 3.0.50 kernel
[01/06] Update wifi firmware to R5.SP3.06
[12/16] Fixed Deep Sleep
[12/15] Added multi-profile fix
CURRENT KNOWN ISSUES:
The headphone MIC input is not functioning correctly yet. Work in progress.
KERNEL FEATURES:
[08/12] Mainline version updates to 3.0.72 updated to current with Google's kernel/common
[01/06] WLAN Firmware R5.SP3.06
[11/07] Updated to SGX/IMG DDK [email protected] for Android (via omapzoom)
[11/07] WLAN Firmware R5.SP3.03
[09/05] Updated to SGX/IMG DDK [email protected] for Android
Based on TI kernel 4AI.1.7 (3.0.31 mainline) which supports 512M memory mapping needed by the Kindle Fire
Uses ducati binary from TI based on rpmsg 1.20.5.11 (replaced Archos ducati binary from ICS 4.0.3)
Kernel audio: Added a switch device "h2w" which allows the OS to recognize headset plug events and adjust audio capture routes accordingly. Translation: OS can recognize we have a MIC input via headset now. (NOTE: that audio recording is still not working at this time. Tho it is very close).
MUCH better standby / sleep function. The device will go inactive for much longer periods of time (80-100 seconds) while still waking up appropriately for wifi events, power button triggers, etc. And this is still going to get even better when I re-implement DPLL cascading and the charger fixes coming later.
Many bugfixes pulled down from TI's omapzoom sources.
RESERVED FOR NOTES
XDA:DevDB Information
Official CyanogenMod 11.0 for Kindle Fire 1st Edition, ROM for the Amazon Kindle Fire
Contributors
Hashcode
ROM OS Version: 4.4.x KitKat
Version Information
Status: Stable
Created 2014-05-01
Last Updated 2014-05-21
UPDATED 2013-11-25 for CM11.0/CM10.2/CM10.1
DEVELOPER BUILDING:
Several patches are outstanding in CM's review so building this from source is currently not an option w/o some Cherry Picks:
Patch 1: http://review.cyanogenmod.org/#/c/53917/
Patch 2: http://review.cyanogenmod.org/#/c/54562/
And I'll be updating more of the cm11.0 gits tonight w/ changes to the build / extract files processes.
Won't get a decent build till that's all done.
KNOWN BUGS:
1. EHCI USB 2.0 isn't able to be add to the kernel w/o it crashing. Need to fix for higher speed USB transfers.
6. Headset recording via the MIC input jack doesn't work
DEVS
BUILDING THIS ROM:
First, read through Google's Android website about "how to setup a build environment":
http://source.android.com/source/initializing.html
Then you can setup the Kindle Fire by doing the following:
mkdir android
cd android
(Use main repo for CyanogenMod 10.2)
repo init -u https://github.com/CyanogenMod/android -b cm-10.2
repo sync
vendor/cm/get-prebuilts
. build/envsetup.sh && brunch otter
FINALLY!
I'll see if I can help with power button LEDs.
*out-of-topic note: 3rd post!
1. The backlight doesn't sync up well with the screen. Meaning that sometimes when you bootup you won't see anything but a black screen. Once the boot is done, you can hit the power button a few times and eventually the screen and backlight will sync up and you'll get a picture.
Click to expand...
Click to collapse
I can't even get a picture.
animefun135 said:
I can't even get a picture.
Click to expand...
Click to collapse
Power button four or five times, and it'll pop up.
Edit: not having the sync issue in HC, hash, do you have the log posted on your site regarding the back light issue? I know its kernel related but 3.2 is a lil more cumbersome, so it could just be OS lag. Are we using 4.0.3 or 4.0.4?
Sent from my MB860 using XDA
Power button four or five times, and it'll pop up.
Click to expand...
Click to collapse
I tried 30+ times.
Nice job Hashcode.
Sent from my PG86100 using Tapatalk
I don't have time at the moment to pull down the sources and poke around for myself, but it sounds like #4 is a script issue of some sort.
Either one of the scripts that needs to fire for shutdown is hanging up, or the output isn't returning properly so that the master script can continue and finish pulling it all down.
If I get a chance tonight, I'll grab the sources and poke around a bit.
I deal with hanging/incorrectly-terminating script **** at work all the time, so now I might even be able to contribute, yay!
Reserving this for a complete description of the backlight driver/issue and related sources for research.
Sent from my DROID4 using XDA
Hey Hash I wanted to let you know that the charger does work for me. I don't have to boot back into twrp. Don't know if its just me or what but it works.
Edit: Didn't see that you had put its not working well instead off not at all, I'll do some more testing to see if it will give me problems. So far plugged it in about 20 times and its registering the charge.
Sent from my Amazon Kindle Fire using XDA
Let me be the first to say "Does Netflix work with this?"
Just kidding, things are coming along it appears, wish I knew more about hacking kernels, last time I did anything with a kernel I ran "make xconfig"
i just get a lit up black screen 0.0??
symbiiote said:
i just get a lit up black screen 0.0??
Click to expand...
Click to collapse
This issue is popping up with random people (myself included) and Hashcode has been made aware of it on the other thread, http://forum.xda-developers.com/showthread.php?t=1591869&page=5
The user who posted about it as well as another person as far as I know posted logs from their Kindle Fire's that depict the issue at hand. On a side note, and I know i'll get flamed for this, lets cut the arguing and just keep this thread as Hashcode requested it be, a development thread. If someone bashes you just ignore it and move on, the less clutter here the better Hashcode will be able to scan through it and pick out problems we're having and fix them.
To throw my two cents in on the issue itself:
I've noticed that when attempting to apply the suggested fix and sync up the graphics driver and the backlight I sometimes see quick glimpses of what I think are items on the screen, i'm wondering if this suggests an intermittent issue caused by the initial flash of the rom (could this explain why some are able to use the rom and some aren't). If this isn't possible please excuse my ignorance, it just made sense to me based on the limited amount of knowledge I have on this situation.
isaiahhhhh said:
I've noticed that when attempting to apply the suggested fix and sync up the graphics driver and the backlight I sometimes see quick glimpses of what I think are items on the screen, i'm wondering if this suggests an intermittent issue caused by the initial flash of the rom (could this explain why some are able to use the rom and some aren't). If this isn't possible please excuse my ignorance, it just made sense to me based on the limited amount of knowledge I have on this situation.
Click to expand...
Click to collapse
Wait, are you talking about things like large grey rows of pixels appearing on the screen? Sometimes I see gradients of monochromatic tones in addition to this. They only appear as the backlight is shutting off.
isaiahhhhh said:
This issue is popping up with random people (myself included) and Hashcode has been made aware of it on the other thread, http://forum.xda-developers.com/showthread.php?t=1591869&page=5
The user who posted about it as well as another person as far as I know posted logs from their Kindle Fire's that depict the issue at hand. On a side note, and I know i'll get flamed for this, lets cut the arguing and just keep this thread as Hashcode requested it be, a development thread. If someone bashes you just ignore it and move on, the less clutter here the better Hashcode will be able to scan through it and pick out problems we're having and fix them.
To throw my two cents in on the issue itself:
I've noticed that when attempting to apply the suggested fix and sync up the graphics driver and the backlight I sometimes see quick glimpses of what I think are items on the screen, i'm wondering if this suggests an intermittent issue caused by the initial flash of the rom (could this explain why some are able to use the rom and some aren't). If this isn't possible please excuse my ignorance, it just made sense to me based on the limited amount of knowledge I have on this situation.
Click to expand...
Click to collapse
your right, sorry, as for the rom, i noticed when i flashed hashcode's rom then reloaded rom over it youtube worked in HD, and that got me thinking, you think we can get a Flashable ZIP of the kernel?
is this the kernel that everyone was waiting for? 3.0?
@shahabk818
YES!
But it's still in development, so not for daily use!
TuikS2 said:
@shahabk818
YES!
But it's still in development, so not for daily use!
Click to expand...
Click to collapse
so this will fix the hardware acceleration problem, right?
shahabk818 said:
so this will fix the hardware acceleration problem, right?
Click to expand...
Click to collapse
So you can't read the title, right? [WIP][KERNEL][DEV-ONLY] 3.0 Kernel Development for Kindle Fire [04-10]
DEV ONLY!
OK, so compiled an aosp last night from the CM9 tree... I'm still not having a back light issue? Can't adjust brightness, but no sync issues. Could it be the ROM?
Sent from my MB860 using XDA

[ROM][WIP][kexec] Ubuntu with Freedreno!

I've been working on getting Ubuntu running on my Sprint Galaxy S3 using the same method I used on my Epic 4G - kexec from recovery loading the root filesystem off a partition on an SD card.
What I've done so far:
* Found a kexec loader to boot into a custom kernel, which is required for booting off an SD card, among other things;
* Compiled a custom kernel with KGSL DRM support enabled for Freedreno;
* Built a minimal Ubuntu 13.10 armhf rootfs and compiled the Freedreno DRM/DDX/Mesa Gallium driver with changes to support the Adreno 225 and stub occlusion query (possibility of full dekstop OpenGL 2.1 support!);
* Got X11 working with USB keyboard, touchscreen, and fbdev. Still working on getting the Freedreno DDX to load.
I still get a kernel oops with the camera driver (http://pastebin.com/egZbxsED), but it apparently doesn't affect stability or cause reboots anymore.
Working so far:
* USB Host - only tested with a keyboard, but other input/storage/audio/video devices should also work.
* Framebuffer console - thanks castrwilliam!
* Touchscreen works with X.org fbdev driver and the following added to /usr/share/X11/xorg.conf.d/11-evdev-quirks.conf:
Code:
Section InputClass
Identifier "Touchscreen"
Driver "evdev"
MatchProduct "sec_touchscreen"
EndSection
* Power and volume buttons
Untested:
* Bluetooth - might need firmware
* Sensors - should work just fine
* Home, menu and back buttons should work but probably need mapping
Unlikely to work due to proprietary Android-only blobs:
* Camera
Kernel config changes:
# IMPORTANT: remove the line that says "depends on !MSM_KGSL_DRM" from drivers/gpu/msm/Kconfig:70
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_VT_CONSOLE=y
CONFIG_DRM=y
CONFIG_MSM_KGSL_DRM=y
I may eventually post a pre-built kernel, but if you don't know how to compile a kernel from source, this guide is not for you.
Likewise, if you don't know how to prepare an armhf Ubuntu root filesystem, this guide won't help much.
After building the kernel, copy arch/arm/boot/zImage to your SD card along with the attached zImage.zip (CWM-flashable kexec loader).
It might need modifications (META-INF/com/google/android/updater-script) depending on how you have your card set up.
UPDATE: Unfortunately, this phone hasn't been a good fit for me. I never got very far booting Ubuntu or Freedreno, so I decided to sell it.
For anyone still interested in this project, I believe castrwilliam has the required patches.
When I get my next Snapdragon device (either the new Nexus 7, a Nexus 4, a Galaxy S4, or another phone with Adreno 320 graphics), I will post the Mesa patches for occlusion query support. Sorry I wasn't more helpful with this device.
Added to favourites, I'll see what I can do with it over the weekend
Sent from my SPH-L710 using Tapatalk 4 Beta
Great work. Good luck debugging.
Sent from my SPH-L710 using xda app-developers app
Maybe taking a look at how Motorola worked Ubuntu, in a way, with Webtop that came on the Photon. The Photon has the integrated Ubuntu-based 'Webtop' application from Motorola. The Webtop application is launched when the phone is connnected to the external display through Laptop dock or HD multimedia dock. In Webtop mode, offering similar user interface of typical Ubuntu desktop, the phone can run several applications on external display such as Firefox web browser, SNS clients and 'mobile view' application enabling total access of the Photon and its screen. In September 2011, Motorola released the source code of Webtop application at SourceForge.
I know it's not an app you're trying to use but it may help in finding how to work some of the kinks you have. I hope that helps
Hi, I'm the person maintaining Ubuntu currently for HP Touchpad (http://forum.xda-developers.com/showthread.php?t=2225462) (which also uses an MSM SOC.) It's starting to show its age... I'm trying to get this to where you have it currently on a Verizon S3 / d2vzw (obviously, kexec'ing into a Verizon kernel instead.) Maybe we could collaborate?
Currently I have the KT747 kernel (kexec host support as well as guest) (compiled as a zImage. If you can provide me with access to the patches you have for freedreno and hopefully also an initramfs image (I'm going to mod the HPTP rootfs, so no need there)... I'd love it.
My only modifications to the kernel so far are the ones I mentioned in the OP and three of Rob Clark's Freedreno commits from the mako-kernel branch of kernel-msm on his GitHub - namely, "kgsl: drm: remove checking on 'active'", "video/msm: add true ARGB", and "kgsl: fix null ptr on cache flush".
At one point I had X11 working with freedreno displaying the GNOME background, but the screen blanked after 10 seconds and I couldn't recover from that. Unfortunately, after experimenting with different kernel config options, I lost that semi-working configuration and the GPU started to page fault, sometimes displaying a corrupted screen and sometimes rebooting before displaying anything.
Believe me, I've been working on this for weeks, and it's very frustrating that it doesn't even sort of work. My minimal modifications to Mesa to get it to recognize the Adreno 225 are highly unlikely to be the cause of the problems, and I highly doubt the differences between the 220 and 225 are to blame since it was working at one point. It's a one liner, figured out from from freedreno/mesa issue #2.
Castrwilliam, the initramfs is the least of your worries. I don't use one, since its only function is to display the Plymouth splash, which doesn't work anyway.
gTan64 said:
...
Castrwilliam, the initramfs is the least of your worries. I don't use one, since its only function is to display the Plymouth splash, which doesn't work anyway.
Click to expand...
Click to collapse
Yeah, I realized how you were doing this after looking at the kexec script. I was trying to boot from Android, not recovery, and was under the impression you had put a disk image on external SD, and then made the initramfs loop-mount that and boot from it... but now I see you partitioned it.
It's a shame you don't have your original config, I'll try to get it booting again on my end. I remember doing something like this a while back, where I made like 10 differently configured kernels at once, and tested them each in turn. I imagine the ramconsole would help a good bit so that I could look a how far we're getting. (The touchpad has its own version of that, which you can read directly from the bootloader (bootie.) Then again, it also has LVM volumes for storage instead of actual partitions (except for boot) - which makes it uber easy to boot lots of OSes.)
Currently I'm not doing too well. I remember that kexec did work at one point on d2vzw hardware but I'm assuming that it still does now (new bootloaders, 3.4 kernels, ...) I do kexec -e, the reboot happens, I see the Samsung bootloader screen, then the screen blanks for like 5 seconds and it reboots again - back into android.
castrwilliam said:
I imagine the ramconsole would help a good bit so that I could look a how far we're getting...
the screen blanks for like 5 seconds and it reboots again - back into android.
Click to expand...
Click to collapse
The RAM console should be enabled by default, so check /proc/last_kmsg once Android boots back up.
It could be something simple like the root filesystem not mounting, either due to how you partitioned the card or not having time to settle, hence rootwait. Or it could be something else. I haven't gotten any useful output in /proc/last_kmsg with the framebuffer console enabled, so make sure that's disabled unless you want a headache and a psychiatrist visit.
Unfortunately, I've spent way too much energy trying to debug the GPU page fault, and I probably won't have much time to work on it after next month. I want this bug dead and forgotten, so more eyes would be great!
X11 works (shows something on screen) with the X.org "fbdev" driver. I can't reproduce anything with "freedreno" (or "modesetting", which I accidentally loaded at one point...)
The touch screen doesn't respond, but the power key works and brings up a shutdown dialog.
Screenshot attached. I used the 13.04 Touchpad rootfs with some modifications...
Okay, you can get the fbcon working by either loading it as a module during boot OR changing its "module_init" macro in drivers/video/console/fbcon.c to "late_initcall".
Picture attached. Sorry for blurriness, I don't have an actual digital camera, only what's on my sig. This should make debugging a bit easier.
Nice to see some more freedreno development on android phones
I'm using freedreno with a slightly different approach, starting it directly from android on a chrooted shell, which is a lot more easier to debug.
The kernel needs some fixes from the mako branch and the following configs:
Code:
CONFIG_DEVTMPFS=y
CONFIG_VT=y
CONFIG_DRM=y
CONFIG_MSM_KGSL_2D=y
CONFIG_MSM_KGSL_DRM=y
Rob Clark (the maintainer of freedreno) has been working on his own kernel driver for adreno gpu:
https://github.com/freedreno/kernel-msm/commits/ifc6410-drm
This would be a nice addition/replacement for the current qualcomm gpu driver.
Wootever said:
Nice to see some more freedreno development on android phones
I'm using freedreno with a slightly different approach, starting it directly from android on a chrooted shell, which is a lot more easier to debug.
The kernel needs some fixes from the mako branch and the following configs:
Code:
CONFIG_DEVTMPFS=y
CONFIG_VT=y
CONFIG_DRM=y
CONFIG_MSM_KGSL_2D=y
CONFIG_MSM_KGSL_DRM=y
Rob Clark (the maintainer of freedreno) has been working on his own kernel driver for adreno gpu:
https://github.com/freedreno/kernel-msm/commits/ifc6410-drm
This would be a nice addition/replacement for the current qualcomm gpu driver.
Click to expand...
Click to collapse
How do you stop the SurfaceFlinger (I think that's proper terminology) from hogging the framebuffer?
Semi Working Freedreno/X11
castrwilliam said:
How do you stop the SurfaceFlinger (I think that's proper terminology) from hogging the framebuffer?
Click to expand...
Click to collapse
HEY, look what I did?!
(There are a lot of patches req'd to get this far. Even at this point, there's a weird bug where the cursor loops across the edge of the screen and windows overlap themselves. If you want to know, I'll elaborate in a further post, otherwise, let's get that touchscreen working for release!)
Thanks to Rob Clark (again, the author of freedreno) who helped me get this far on his IRC channel at Freenode.
castrwilliam said:
HEY, look what I did?!
(There are a lot of patches req'd to get this far. Even at this point, there's a weird bug where the cursor loops across the edge of the screen and windows overlap themselves. If you want to know, I'll elaborate in a further post, otherwise, let's get that touchscreen working for release!)
Thanks to Rob Clark (again, the author of freedreno) who helped me get this far on his IRC channel at Freenode.
Click to expand...
Click to collapse
Are we keeping track of all the necessary patches? I'm on https://github.com/CyanogenMod/android_kernel_samsung_d2, branch cm-10.2_kgsl, with the per-process pagetable hack, the "active" kgsl_drm fix, Adreno 225 case in Mesa (freedreno_screen.c), and my stub occlusion query hack. I wasn't on #freedreno when Rob Clark pointed out the libdrm bug I heard about from the Wiki - did you fix that? I'm still getting the assert crashes.
I'll be on #freedreno at some point tomorrow.
gTan64 said:
Are we keeping track of all the necessary patches? I'm on https://github.com/CyanogenMod/android_kernel_samsung_d2, branch cm-10.2_kgsl, with the per-process pagetable hack, the "active" kgsl_drm fix, Adreno 225 case in Mesa (freedreno_screen.c), and my stub occlusion query hack. I wasn't on #freedreno when Rob Clark pointed out the libdrm bug I heard about from the Wiki - did you fix that? I'm still getting the assert crashes.
I'll be on #freedreno at some point tomorrow.
Click to expand...
Click to collapse
I got this to work by using a fairly old libdrm, but a new DDX (xf86-video-freedreno). I haven't fixed the assert bug on the newer ones.
You need to patch the DDX's msm-device.c to set the width to 736 (has to be a multiple of 32), and then disable/comment out/delete where it calls the mode-set function (there's a comment about making xrandr happy in the right place.) I can make a patch soon, but I have a feeling that this is what made the other bug happen with the looping cursor.
edit -- I fixed the looping cursor. A patch is attached...
Youtube video of it working: http://www.youtube.com/watch?v=rh9wmmYuKxY
Tips:
Set the firnware path for the dhd (wi-fi) driver to /system/etc/wifi/bcmdhd_sta.bin (WITHOUT the _b2 buffix, it will be added by the module). Set the nvram file to /system/etc/wifi/nvram_net.txt. Then, add the Android partitions to the /etc/fstab (mmcblk0p14 is system.)
apt-get install xserver-xorg-input-multitouch and then add a config file under /usr/share/X11/xorg.conf.d/ to get the touchscreen working. It will act like a laptop trackpad. You MUST use the multitouch driver. "evdev" will segfault the server on any touch. Note that you can match the TS in an InputClass with its udev name, "sec_touchscreen".
The date that I compiled the working Freedreno libdrm was the date that Ubuntu 13.04 was released. I'm working on narrowing it down to a Git SHA1 revision. I used Rob Clark's repository, not the freedesktop one.
Use the master branch of the DDX, sorry for the earlier confusion.
For battery savings, you might want to cherry pick the DPMS commit from the a3xx branch of the DDX.
castrwilliam said:
How do you stop the SurfaceFlinger (I think that's proper terminology) from hogging the framebuffer?
Click to expand...
Click to collapse
There are two binaries you can execute with adb shell stop/start that kills and restart the android proccesses, allowing access to the framebuffer.
Okay, so 2-D does work with my mods, but I just tried 3-D last night (ran es2gears with the Adreno 225 mod in place on mesa) and the pagefaults returned.
I did notice something about your pagefault reboots, though: they shouldn't necessarily be happening, it's a NULL pointer dereference that can be fixed in the handler by doing this in drivers/gpu/msm/kgsl_iommu.c (function is kgsl_iommu_fault_handler):
Change
Code:
curr_context->pagefault = 1;
curr_context->pagefault_ts = curr_global_ts;
To:
Code:
if (curr_context) {
curr_context->pagefault = 1;
curr_context->pagefault_ts = curr_global_ts;
}
So anyone got any updates for this if not i will start building upon what is there if it is ok
Sent from my SCH-S960L using xda premium
allenjthomsen said:
So anyone got any updates for this if not i will start building upon what is there if it is ok
Sent from my SCH-S960L using xda premium
Click to expand...
Click to collapse
I guess it is OK. Hopefully you can make a dent in this development. Keeping my eye on this thread.
No longer developing for this phone
Unfortunately, this phone hasn't been a good fit for me. I never got very far booting Ubuntu or Freedreno, so I decided to sell it.
For anyone still interested in this project, I believe castrwilliam has the required patches.
When I get my next Snapdragon device (either the new Nexus 7, a Nexus 4, a Galaxy S4, or another phone with Adreno 320 graphics), I will post the Mesa patches for occlusion query support.

[KERNEL] TonoKrnl for Nexus 7 (2013)

EDIT: I want to remind everyone DO NOT FILE AN UBUNTU BUG REPORT WITH THIS KERNEL INSTALLED, ALWAYS REVERT BACK TO THE STOCK KERNEL IF YOU HAVE AN ISSUE BEFORE FILING
This is my first actual Kernel project, so please be gentle.
This kernel is ONLY for the Nexus 7 (2013) flo. I do not know if it boots on the deb, theoretically it should as I don't have any flo specific options and there are config options for Deb in the Kernel configuration. It should work for those on stable, rc or rc-proposed and may possibly work on devel (not sure) as long as devel has not released a new kernel package (3.4.0-5-flo+)
I have cherry-picked some battery optimizations from bricked-flo, elementalx-flo (4.4 branch) and some additional commits elsewhere in an attempt to not only improve battery-life but also to bring some Android features (DoubleTap2Wake) to Ubuntu Touch.
Currently it has the following:
- ROW I/O scheduler
- Beginnings of OCing (pulled from ElementalX, I think I'm missing some commits to make this relevant though)
- ElementalX's kernel thermal control
- binfmt_misc support
- CD/DVD Filesystem Support for external optical drives (ISO9660/UDF)
- Some Slimbus enhancements
- Battery life optimizations (changing default MHz, etc.)
- Default CPU governor changed from Performance to Interactive (yes, they had it set to Performance, not sure why.)
- Direct Rendering Interface/Direct Rendering Manager (XFree86 + msm_kgsl_drm)
- and more!
You can check my github for the items cherrypicked into it and there is even a current release which has seen my battery drop 4% in the last 30 minutes with the screen fully on (no autolock), WiFi on and Bluetooth.
The name of the kernel is still up for change, TonoKrnl is not going to be it's final name unless everyone likes it.
Repository is at: http://github.com/ShadowEO/TonoKrnl
Releases can be found: https://github.com/ShadowEO/TonoKrnl/releases
Status of Github Repo: It builds. It boots and it runs. I am trying my hardest not to push changes that break building.
Reserved for future use. Currently the status of the kernel's updates can be found on the issue tracker: https://github.com/ShadowEO/TonoKrnl/issues/5
Be patient, if you don't see new releases right away, it's because I'm still in the process of generating them, check back later.
-- Release 1.0.3-UBports (11/19/2017): A lot was done to bring this kernel back into usable state, see below:
Added OTG Charging
Added initscripts for turning on features (Requires the rootfs to be mounted read/write for manual installation, see my latest post #16 I think...)
Created patches to be applied against a clean UBports kernel tree for certain features (right now, only DT2W and USB Charging)
(USB Host Charging was pulled from flar2's ElementalX source code, it is not turned on by default and can be turned on with
Code:
echo 1 > /sys/module/msm_otg/parameters/usbhost_charge_mode
Feature is tested and does work.
Developers:
1.0.3 brought the kernel tree back into a buildable state and also cleaned up some problems with the previous releases. I am in the process of generating a kernel patchset which will be able to be applied to a clean kernel to bring those features to the stock UBports kernel source. After I complete generating the kernel patchset, I will be rebasing the entire kernel project onto a clean tree (As I am absolutely certain that I have problems like unfinished cherry-picks [missing commits] etc.). Be patient regarding these patches, as I am re-adding the features I pulled in originally by hand rather than cherry-picking them as I appear to have fuxxed up somewhere cherry-picking previously.
If you have any random reboots, try:
Code:
echo 1 >/sys/module/msm_watchdog/parameters/runtime_disable
If you still receive random reboots afterwards or if you received them previously but the above command fixes them, please open an issue on my project tracker with a copy of /proc/last_kmsg attached.
Kernel TODO:
Generate kernel patchset and then rebase onto clean kernel tree
Finish Kernel Feature Documentation and publish (these docs will give information on tweaking the changes to the kernel, such as readahead buffer, turning on/off DT2W, turning on/off usbhost charging, etc.)
Move TonoKrnl initscripts into ramdisk, should make them more robust and reliable.
Create ZIP installer for TWRP recoveries (this is needed for automatic installation of kernel modules, since /lib/modules is a read-only, bound mountpoint for the Android LXC container. To fix this, we just have to move /lib/modules out of the Android container.
Allow me two questions:
Which kernel repository is this branched off? Apologies if that is dumb question, my git and kernel knowledge is cursory at best, but I can't seem to figure this out looking through your github repo.
ShadowEO said:
- Direct Rendering Interface/Direct Rendering Manager (XFree86 + msm_kgsl_drm)
Click to expand...
Click to collapse
What's the intention behind this? Does this have anything to do with enabling the freedreno driver for the GPU and would that pave a way to a setup without Mir, but with wayland or X?
doniks said:
Allow me two questions:
Which kernel repository is this branched off? Apologies if that is dumb question, my git and kernel knowledge is cursory at best, but I can't seem to figure this out looking through your github repo.
What's the intention behind this? Does this have anything to do with enabling the freedreno driver for the GPU and would that pave a way to a setup without Mir, but with wayland or X?
Click to expand...
Click to collapse
This started off with the debian source package for linux-image-flo in the Ubuntu archives which is the kernel for our device. The reason you are having trouble with figuring it out is because I started with the base (Ubuntu's 3.4.0-5-flo+), pulled it into an empty git repo and then started cherry-picking features. It was originally going to be for my own personal consumption as I didn't know how well a custom kernel would be received by the touch community (so far, in all the communities I've posted it, you were the only one to ask any questions ), but since I already had a git repo up, figured that I may as well share it. So here I am, an amateur working on the Linux kernel, and learning a lot.
My full intent was to improve the experience (even marginally) on Ubuntu Touch for the Nexus 7 2013, I wanted to bring the mobile kernel features previously found on the desktop that myself or others may find useful (hence binfmt support for qemu-user), there really is no reason for me to turn on DRI/DRM except to allow playing with Wayland and X, yes, that part is correct, and I have tested the freedreno driver with it (Freedreno does get the KGSL DRI device and does start X)
In addition I found some interesting choices in the kernel in terms of battery life, it would seem that the CPU governor used by the default Ubuntu Kernel is Performance, which would explain why the battery dies so fast, I tried to pull in some battery optimizations from a couple other kernels around the Android scene for the device. So far I'm pleased with the results, and recently found that both the original cherry-picking done for DT2W worked along with the code to add fast charging.
I've had to put the project on hold due to work issues, but once I'm able to work on it again, I'm reverting the last 100 changes pulled in that broke my tree and going from there since my original targets in terms of features actually worked. (I'm pretty sure it was some recent changes to the CPU hotplug driver that killed it, I can no longer compile the kernel without mpdecision on, so that's my likely suspect.)
Thanks for your explanations!
ShadowEO said:
This started off with the debian source package for linux-image-flo in the Ubuntu archives which is the kernel for our device.
Click to expand...
Click to collapse
So something like apt source linux-image-flo? And then to build you use the instructions in the package also?
there really is no reason for me to turn on DRI/DRM except to allow playing with Wayland and X, yes, that part is correct, and I have tested the freedreno driver with it (Freedreno does get the KGSL DRI device and does start X)
Click to expand...
Click to collapse
Exciting!
In addition I found some interesting choices in the kernel in terms of battery life, it would seem that the CPU governor used by the default Ubuntu Kernel is Performance, which would explain why the battery dies so fast
Click to expand...
Click to collapse
I'm really only speculating, but my conjecture to previous mentions of odd govenor choices in android kernels was that the actual android power management magic is happening behind the backs of the governors. But, I'm really just babbling. I don't know much of anything about this. You seem to be getting impressive improvements!
I'm reverting the last 100 changes pulled in that broke my tree and going from there since my original targets in terms of features actually worked.
Click to expand...
Click to collapse
So, that means: "If you want to try it now, don't use v1.0.2, but use v1.0.2-alpha for now." Is that about correct?
doniks said:
Thanks for your explanations!
So something like apt source linux-image-flo? And then to build you use the instructions in the package also?
there really is no reason for me to turn on DRI/DRM except to allow playing with Wayland and X, yes, that part is correct, and I have tested the freedreno driver with it (Freedreno does get the KGSL DRI device and does start X) Exciting!
In addition I found some interesting choices in the kernel in terms of battery life, it would seem that the CPU governor used by the default Ubuntu Kernel is Performance, which would explain why the battery dies so fast
I'm really only speculating, but my conjecture to previous mentions of odd govenor choices in android kernels was that the actual android power management magic is happening behind the backs of the governors. But, I'm really just babbling. I don't know much of anything about this. You seem to be getting impressive improvements!
I'm reverting the last 100 changes pulled in that broke my tree and going from there since my original targets in terms of features actually worked. So, that means: "If you want to try it now, don't use v1.0.2, but use v1.0.2-alpha for now." Is that about correct?
Click to expand...
Click to collapse
I removed the problem download, the only ones available are the source tree downloads and the last known good build I had, I have also tested to ensure that the last build up there works as well as it's the one I'm running on my device until I have time to go through the tree again.
As for building, essentially yes, but you have to build the image separately. Due to how Ubuntu currently has the filesystem set up and with Android's boot images, its not feasible to really package it in a traditional sense. Essentially what I did was create a chroot, apt-get source linux-image-flo and then to get a working defconfig I used the config.* files found in Debian.flo and Debian.master, from there was the tree that I used as my base.
Then run make with the following to customize:
Code:
ARCH=arm make menuconfig
ARCH=arm make -j <number of processors>
To build the image, you'll need to grab the boot image from your device and tear it apart using a abootimg them rebuild it with the Ubuntu ramdisk. If you are using MultiROM, you can just drop it in the folder for your ROM.
Edit: As for the weird choice of governors, I noticed during my investigations (via the cpufreq-info package) that while Android is managing the CPUs that are online (I found it's running it's own version of mpdecision behind the scenes inside the LXC container), it's not doing anything to the CPU governor. That's all managed in the kernel right now through CPUFreq it appears and in the stock kernel it's set to performance, as for the reason for it, I'm not sure myself.. The other governors ARE there though, just unused right now.
ShadowEO said:
This kernel is ONLY for the Nexus 7 (2013) flo. I do not know if it boots on the deb, theoretically it should as I don't have any flo specific options and there are config options for Deb in the Kernel configuration.
Click to expand...
Click to collapse
Jup, it does boot on my deb! I've downloaded the .img, put the tablet in bootloader mode and did
fastboot boot TonoKrnl-1.0.2-flo.img
It booted without problems, and so far it's running for about half an hour or so without any problems. Wifi, sound, video, usb mouse, all work fine.
doniks said:
Jup, it does boot on my deb! I've downloaded the .img, put the tablet in bootloader mode and did
fastboot boot TonoKrnl-1.0.2-flo.img
It booted without problems, and so far it's running for about half an hour or so without any problems. Wifi, sound, video, usb mouse, all work fine.
Click to expand...
Click to collapse
Wow, that's great to hear, I wasn't sure but I was definitely curious since I had seen options for both Deb and Flo in the makeconfig page.
If you can script it in (or edit sysfs.conf) to have it write a 1 to /sys/android_touch/doubletap2wake while it's booting, you can have working DT2W and there's quite some others to mess around with under /sys :3 CPU governors are somewhere there too, just don't have it offhand.
Since you are testing it out, have you noticed any changes in the device's normal battery life? The stock kernel seems to drain 1% every 1 1/2 minutes on my Flo, not doubting that the power optimizations ARE working (I know I'm getting much better life), I'm just wanting to ensure that it's not a placebo effect that I'm experiencing.
ShadowEO said:
If you can script it in (or edit sysfs.conf) to have it write a 1 to /sys/android_touch/doubletap2wake while it's booting, you can have working DT2W
Click to expand...
Click to collapse
After
Code:
echo 1 | sudo tee /sys/android_touch/doubletap2wake
I can indeed (sometimes) wake it with double tapping. I have since quite a while (with the standard kernel) the situation that its really hard to wake up. I have to press the powerbutton many many times. Feels like it is sleeping really deeply.
Since you are testing it out, have you noticed any changes in the device's normal battery life? The stock kernel seems to drain 1% every 1 1/2 minutes on my Flo, not doubting that the power optimizations ARE working (I know I'm getting much better life), I'm just wanting to ensure that it's not a placebo effect that I'm experiencing.
Click to expand...
Click to collapse
Well, I haven't noticed anything. I might just not be in the best position to judge. I rarely have it unplugged for more than a couple of hours at a time and I don't generally monitor the battery status closely. That being said though, I have very definitely never experienced anything remotely close to 1% per 1.5 min!
If you have a particular test/measurement you'd like to see - let me know.
doniks said:
After
Code:
echo 1 | sudo tee /sys/android_touch/doubletap2wake
I can indeed (sometimes) wake it with double tapping. I have since quite a while (with the standard kernel) the situation that its really hard to wake up. I have to press the powerbutton many many times. Feels like it is sleeping really deeply.
Well, I haven't noticed anything. I might just not be in the best position to judge. I rarely have it unplugged for more than a couple of hours at a time and I don't generally monitor the battery status closely. That being said though, I have very definitely never experienced anything remotely close to 1% per 1.5 min!
If you have a particular test/measurement you'd like to see - let me know.
Click to expand...
Click to collapse
I may be exaggerating slightly, but normally my tablet goes from 100% to 95% in about 5 minutes while I'm using it after taking it off the charger (in Ubuntu only, may be an rc-proposed thing too). I haven't seen that behavior since changing kernels. I'm gonna see if I can go ahead and start reverting commits today or possibly reset back to the last known good commit.
As for the screen problems, I think there is a bug in the current doubletap2wake driver, if you look at dmesg after using DT2W for a while, you'll see it being spammed with error messages from the touchscreen driver.
That could possibly be related. Additionally, I think the minimum processor speed defaulted to 384MHz (I didn't touch any processor clock speeds in here) which the Performance governor would never had let the processor hit. So it's likely that the minimum processor speed will need bumped up at least one step there, I get some stuttery behavior on the command line when the screen is off which I hadn't received on the stock kernel.
Edit (07/01/16): I'm not sure what else I can really bring to the table here, mpdecision running in the android LXC container defeats any meaningful changes to the clock speed. I also noticed mention that you shouldn't have two hotplugging daemons running at the same time, effectively that is what the new developments would've brought in. I think my best option to continue this would be to wait until the Xenial transition and see if they make any changes for me to update on.
I'm also quite a novice, so besides cherry picking commits, I'm not sure what else I can do.
ShadowEO, is bluetooth working on your device? With your kernel or with the one from Canonical?
I can't seem to get anything at all to show up on my deb.
I am so embarrassed that I didn't check this thread in so long. Ya, Bluetooth still works on my device with either kernel. Sometimes it doesn't seem to like to power on, so if you are having trouble, try this.
Open Terminal,
do sudo bluetoothctl and see if Nexus 7 (2013) shows up in there. If it does, type power on and hit enter. You should see the bluetooth indicator show up in the status bar. If it doesn't, exit bluetoothctl and do these from a root prompt:
start bluetooth-touch
start bluetooth-touch-flo
Sometimes the commands may take a little bit of time (no idea why honestly), but after those, you should see bluetooth start. At that point, if you still don't, fully power the device down and try again.
For whatever reason, the bluetooth scripts fail every so often, haven't been able to look into it much due to personal things IRL taking up all my time the last few months.
It's been a long while since I touched this project, but I have finally cleaned up the kernel source tree and ensured that it builds properly!
Two features that must remain disabled however are GOVERNOR_ELEMENTALX and MSM_SLEEPER as they are currently broken and do not function as of right now. The defconfig for flo also has sane defaults for the UBports Ubuntu Touch distribution (installable via the UBports installer application) and has DT2W enabled (but not turned on, that requires some extra work) by default.
You should also no longer need to disable the MSM watchdog using the instructions in the OP, running the kernel now and haven't experienced near as many random reboots I used to with the previous version! (I wonder if that was a UTouch problem, because I DO get random reboots sometimes using certain apps, but they're very rare... Then again, I'm not sure if UBports made any initramfs changes for the Flo when they added it to their system-image server, which they may have, since it's in the ubports-touch/15.04 distribution instead of their ubuntu-touch mirror for older, no-longer supported devices)
To turn on DT2W, you must follow the instructions on the github page for the 1.0.2 release.
NOTE: I highly recommend building the kernel from source rather than downloading a release! I have yet to add the current stable release to the github releases page! I also have a zip file with some helper scripts and configuration that can be installed into the UBports rootfs to turn DT2W and Kernel Samepage Merging on at startup. In case that's useful, I'm adding the zip to this post. To install, simply remount your root as read/write, extract the ZIP to / and then "chmod +x /sbin/tonokrnl-init" and reboot. Upon reaching the lightdm greeter, you should be able to shut the screen off, then double tap it to wake.
The files contained in the zip are:
/sbin/tonokrnl-init - Helper Script to start DT2W and KSM
/etc/sudoers/tonokrnl - Allows the user-session upstart config to run the helper script, which requires root.
/home/phablet/.config/upstart/tonokrnl.conf - Upstart configuration to run /sbin/tonokrnl-init using sudo (requires the sudoers file)
Off-topic slightly: The reason this project got set aside, was due to my IRL work, and because I had stopped using Ubuntu Touch and was testing out other ways of getting Linux onto the N7 'flo'. I messed with the Sailfish distribution found in the Nexus 7 2013 forum, then went to postmarketOS and messed with that (it's cool, but rather bare, not enough desktop packages to make it useful [no osk, etc]), then attempted to boot a debian distribution with the Linaro mainline kernel from John Stultz (couldn't even get X11 to start, the system did boot though! Perhaps mesa/libdrm needed recompiling with freedreno support...) and then finally came back to Ubuntu Touch via UBports!
Back on Topic, if you decide to use this kernel (either by building it yourself, or using the new UBports-1.0.3 release that will go up soon!) and install the attached helper scripts (or even find your own solution to on-boot DT2W, KSM, and the Interactive governor) please let me know your experiences! I noticed after turning KSM on that the web browser didn't crash as much, but I'm not sure if it's a placebo effect or not.
(I wonder if @flar2 has a 3.4.0 patchset I can apply rather than attempting to cherry-pick ElementalX into the kernel... That would be amazing to have ElementalX's additions to the kernel under Ubuntu Touch. [Please don't be angry I used a mention flar, I just wanted to ask if you had a patchset for the flo's kernel [version 3.4.0])

OmniROM Android R (11) for Pi 4

OmniROM
Download
Images taged with MICROG contain a pre-installed ready to use
microG setup https://microg.org/
Images tagged with WEEKLY can be used to setup
official Google gapps
64bit build
Tablet mode configuration (not Android TV)
At least 4GB model recommened
No HW accelerated video playback
Mesa support for V3D is WIP so expect some graphic issues (especially on higher resolutions - HD 1920x1080 in general should be fine)
Support of booting from SD or USB by just changing config.txt (check README below)
GPIO support - monitor and set README.gpio
chrome (ium) is broken use alternative browser (firefox, edge)
for screen issues check https://www.raspberrypi.org/documentation/configuration/cmdline-txt.md
if you experience black bars connect to HDM1 or add disable_fw_kms_setup=1 to config.txt files
how to do updates? - check README.update
Adjust screen resolution:
To force a different screen resolution edit in /system/build.prop the line
#debug.drm.mode.force=1280x800
Remove the leading # comment and adjust to the screen resolution you want e.g.
debug.drm.mode.force=1280x720
Make sure to also check the README.txt in there
For questions please also use our official Telegram channel
https://t.me/OmniROM_Community
For current progress and how to build yourself check
README.build
XDA:DevDB Information
OmniROM, ROM for the Raspberry Pi 4
Contributors
maxwen, maxwen
Source Code: https://github.com/omnirom/android_kernel_brcm_arpi/
ROM OS Version: Android 11
ROM Firmware Required: 64bit
Based On: AOSP
Version Information
Status: Stable
Created 2020-10-28
Last Updated 2020-10-28
Builds
https://dl.omnirom.org/tmp/rpi4/
The plan is to have about weekly builds - at some point it will be part of all the other OmniROM devices with regular weekly builds
once the Android 11 cycle starts
20201016
Just a snapshot of the current state
Non microG builds will come later
20201028
WEEKLY and MICROG build
20201105
TWRP included
IMPORTANT
Check new recovery section in README for all the details
EVEN MORE IMPORTANT as posted before to get a working TWRP I had to disable userdata encryption for the moment
that means IF you try to boot this with your old userdata you will get an unpleasent surprise. You must start with
a fresh userdata partition (mkfs + tune2fs). You CAN (if you know what you do) create an backup BEFORE
updating by using adb shell and e.g. create a copy of userdata on an external USB device and copy that back afterwards.
But after all of that hassle from now on updating will be much easier since with TWRP you can create
userdata backups on an external USB device very easy
So going from this release an update could work like this.
1) boot your current install into TWRP
2) create an userdata backup on an external USB device
3) flash the new build - you dont need to care about userdata
just do whatever you always do with it e.g. resize
4) boot new build
5) go into Advanced settings and switch boot mode to recovery and restart
6) in TWRP restore the backup you created before from external USB device
7) flash switch_boot_rom.zip and reboot system
8) enjoy
add boot mode switch in Advanced settings
add audio output switch in Advanced settings
whatever has been done since the last build
20201115
fixed 5GHz WiFi AP
fixed Fondar USB touch screen
actual development
20201122
switch to new kernel base - big thanks to Konsta - with update to 5.4.77
update mesa to v20.2
initial work to support pi camera - not yet working but close
initial work to support gpio - IF you want to use gpio please contact me on tg cause I was too lazy to create a README for this yet
all core system updates and fixes
20201128
performance tuning
November security update
gpio support update
all core system updates and fixes
20201206
added gpioi-fan
cpufreq config in advancded settings
all core system updates and fixes
20201214
property persist.debug.drm.mode.force to adjust screen resolution
all core system updates and fixes
20201224
added disable_fw_kms_setup=1 to config.txt files. This should remove unneeded black bars for some screen when connected on HDM1. I did not see any problems on screens that have no issue with that anyway so I enabled by default. If you face issues remove line and report back please
enabled showing BT device battery level if applicable
all core system updates and fixes
Best Xmas wishes for those who care about it and looking forward to 2021
20201231
add WiFi firmware for p400
kernel update 5.4.85
add userdata resize and project quota enable script in TWRP
reduce dB of max media volume
all core system updates and fixes
Does this build support the original RPI 7" touch screen?
elhennig said:
Does this build support the original RPI 7" touch screen?
Click to expand...
Click to collapse
Not out of the box since I dont have one of those to test myself
BUT it should contain the needed overlays so if you know your way around
give it a try and report back if there is something missing.
Regarding "No HW accelerated video playback", is there a chance this is coming anytime soon?
Thinking about using this for MS xCloud gaming.
maxwen said:
Not out of the box since I dont have one of those to test myself
BUT it should contain the needed overlays so if you know your way around
give it a try and report back if there is something missing.
Click to expand...
Click to collapse
I am afraid I have no idea how to build my own ROM or configure overlays respectively. I guess you just notice from my answer that this is the sad truth
ich_mind said:
Regarding "No HW accelerated video playback", is there a chance this is coming anytime soon?
Thinking about using this for MS xCloud gaming.
Click to expand...
Click to collapse
Depends mostly on mesa development - but nothing I would hold my breath for
elhennig said:
I am afraid I have no idea how to build my own ROM or configure overlays respectively. I guess you just notice from my answer that this is the sad truth
Click to expand...
Click to collapse
well - the thing is that this does not have anything to do with building ROMs
should all be possible by modifying config.txt
Looking at the LOST OS builds might give some hints since I think he supports it
Just one word of wisdom here from me since I saw in some reports as something negative
"It’s stuck in “tablet mode” instead of Android TV mode"
I really dont think a raspi is a well equipped device to be used for ATV when you get
a ATV USB stick from e.g. Xiaomi for about 40E that simply works without issues and
has official google support.
So while everyone feel free to use our repostories to create an ATV build dont ask me for it cause I wont do it.
please help after propper flash to my sd card all i get is the no input screen as if nothing is connected to my tvs hdmi port
Thanks a lot for the work you put into this.
I'm really looking forward to how this project will develop.
If I may I have a stupid question - is there a way foreseen to safely shutdown the pi? I mean I know how to setup a safe shutdown in e.g. raspbian but I doubt it's the same in android.
Growking99 said:
please help after propper flash to my sd card all i get is the no input screen as if nothing is connected to my tvs hdmi port
Click to expand...
Click to collapse
I think you hit me already in TG - but just to reiterate here again - as it is in also the README
Using latest firmware is MANDATORY - 64bit support has been added a few months ago
without you will get the described no boot
Best is to flash latest firmware (which also includes USB boot even if you dont need it)
There are a long list of pages describing how to update. Just linking one here for reference
https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb
You MUST do that in e.g. Raspberry OS so best do it before even starting with Android
lernfaehig said:
Thanks a lot for the work you put into this.
I'm really looking forward to how this project will develop.
If I may I have a stupid question - is there a way foreseen to safely shutdown the pi? I mean I know how to setup a safe shutdown in e.g. raspbian but I doubt it's the same in android.
Click to expand...
Click to collapse
Long press the power button in the navigation bar -> shut down
That's pretty cool, thanks for hard work.
But it's still not usable for daily use as a media center since there is no HW accelerated video playback.
All Android builds on raspberry pi have the same issue .. :/
I think that these builds are just proof that you can have Android on raspberry pi than anything else.
flyl0 said:
That's pretty cool, thanks for hard work.
But it's still not usable for daily use as a media center since there is no HW accelerated video playback.
All Android builds on raspberry pi have the same issue .. :/
I think that these builds are just proof that you can have Android on raspberry pi than anything else.
Click to expand...
Click to collapse
Welcome captain obvious - tell us something new...
maxwen said:
Welcome captain obvious - tell us something new...
Click to expand...
Click to collapse
It's just an observation lol what I don't understand is that there are almost no differences between Android 9, 10 or 11 for pi, they are all the same.
I wonder what's the real point to make all these builds which all lack the same features.. No disrespect, I'm just wondering.
Captain obvious
flyl0 said:
It's just an observation lol what I don't understand is that there are almost no differences between Android 9, 10 or 11 for pi, they are all the same.
I wonder what's the real point to make all these builds which all lack the same features.. No disrespect, I'm just wondering.
Captain obvious
Click to expand...
Click to collapse
You are just too focused on what you want to do with the device
does it have google apps out of the box
vedforeal said:
does it have google apps out of the box
Click to expand...
Click to collapse
of course not - this would be illegal
We are not in China here ...
PS: I did not find any android-11 gapps out there that would work currently
So the only way is anyway microG for now - which is enough for most people
i tried to boot off 32gb usb and it wont work
and first thing before you say anything about my bootloader being out of date its not here is the bootloader output BCM2711 detected
Dedicated VL805 EEPROM detected
BOOTFS /boot
BOOTLOADER: up-to-date
CURRENT: chu 03 set 2020 12:11:43 UTC (1599135103)
LATEST: chu 16 abr 2020 17:11:26 UTC (1587057086)
FW DIR: /lib/firmware/raspberrypi/bootloader/critical
VL805: up-to-date
CURRENT: 000138a1
LATEST: 000137ad
when i try to boot the build (from the website i didnt compile it) with either the microg or the weekly build after flashing the pi just simply wont start and the green and red light just keeps flashing and nothing happens i was able boot twisterOS just fine off this same usb so its this build i dont know if i did something wrong but the file system was present in gparted and i tried booting it without expanding the partition and with doing so. also i tried to "fix" all the partitions using gparted and that did nothing also i noticed that the /boot directory in this build seems a bit empty compared to my manjaro build i know your working hard on this but this might be a bug in your build and id be willing to help you fix it

Categories

Resources