yashsingh1/xdaforums huggingface dataset:
[Kindle Fire Android Development] pfederighi:
Cm-12.1 2015-10-15

I made a public viewable folder on my Google Drive for Android stuff here https://drive.google.com/folderview?id=0B7BjC3Ky49TVcjdZQlpHYV9JWXc&usp=sharing

I uploaded a build of CM-12.1. The file name is weird so I will explain (in case you care):

cm-12.1-20151015-UNOFFICIAL-kad-rsm-O3-mo3-wifi-otterx.zip:

kad = kernel compiled with ArchiDroid toolchain

rsm = ROM compiled with SaberMod toolchain

O3 = almost all compiled with -O3

mo3 = more optimization, specifically as much of JustArchi's compiler flags as would work. The '3' is my third attempt to add more optimizations.

wifi = hack to make wifi work without doing a clean install, that is, there is a script, fix-mac.sh, which I think only gets run with a clean install. My hack was simply to copy the file that the wifi driver wants to the name that it wants. This should allow either dirty or clean flashing.

Suggestions:

* Change the animation duration levels in Developer Options to 0.3x or less.

* Use the Noop I/O scheduler for regular things like reading a book (that's why you bought a kindle, right) or browsing the web.

* Use the Deadline I/O scheduler for interactive things like playing a game.

* If you like Gapps, I suggest OpenGapps or TK Gapps. I have not tried this ROM with Gapps.

* You will need to get a third party program to change kernel settings. I like Kernel Adiutor.

The issues:

* Don't use the brightness slider in quicksettings. If you do use it, the status bar goes away and leaves the top part of the quicksettings panel in its place. I suggest disabling the slider and using the brightness control in the status bar settings. I'm not sure if this is a new bug or the result of too much optimization.

* There are no app snapshots in the recents switcher. This may be internal to Android as a way to save memory for low RAM devices, or it may be a bug in CM.

* The Kindle Fire just doesn't have enough RAM (or rather Android is just too freakishly bloated). Attempting to run memory intensive apps will likely result in them crashing or running slowly because the RAM they are using is being swapped to ZRAM. You may be able to adjust the ZRAM size and get better results.

There you have it. I hope you find it useful.
[Kindle Fire Android Development] dokie80:
Ah. I just realize this thread. Going to try the 12.1 now
[Kindle Fire Android Development] dokie80:
[MENTION=4968340]pfederighi[/MENTION]. Running fine and fast on the first boot. I clean flashed it without gapps.

After I flash Pico opengapps, it's rather slow now, but probably adjusting things. I'm going to use this for a while and see.

I M using privacy guard to block wake up and keep wake permission for (almost) all apps, since I don't use app that need to do that. Been set it up like that since ur cm11. Gave me very good battery life.

Will post some screenshot later

Thanks for this
[Kindle Fire Android Development] dokie80:
Here you go. It's getting faster now.

Is there any downside of using higher zram? Default it 60mb, I change it to 1gb. Using noop as suggested. Low memory killer should be okay I think, but previous cm11 use much lower than this (120mb). Although I changed it to around 100mb too.

View attachment 3514625View attachment 3514626View attachment 3514627

Edit. Oh one more thing. I try out the brightness slider, working just fine on mine. Ur issue probably because of dirty flash?
[Kindle Fire Android Development] dokie80:
Battery life looks good.

View attachment 3514928View attachment 3514929
[Kindle Fire Android Development] pfederighi:
I tried increasing ZRAM to 100 MB, I think, and found some things crashed, like the Amazon Underground and Monument Valley apps. I think there wasn't enough real RAM to allocate that much for ZRAM. I changed it back to 60 MB and both of those apps worked again, though slowly.

I'm not sure if I had KSM (kernel samepage merging) enabled. If I didn't, I probably should have. KSM can free up quite a bit of RAM, at the cost of CPU. Though, one can change the parameters for KSM and perhaps find a nice compromise.
[Kindle Fire Android Development] kev716:
Hello,

I'm following your instructions but when I start Kernel Adiutor I get the message No root available. I tried installing SuperSU but it fails when trying to update its binary. Any suggestions?
[Kindle Fire Android Development] dokie80:
U don't need supersu. There's su app built in. Try installing Adiutor again, I remember I had that issue too, but I re open it, and it ask superuser request.

Su setting is on developer options. It's enabled by default.

Did u open kernel Adiutor and supersu from notification panel? (the one that tell us that xxx app is installed). I did, and it give that error. starting the app from home screen and app drawer works fine. Dunno if it's related to notification panel one, or u just need to open it twice.

---------- Post added at 07:47 AM ---------- Previous post was at 07:44 AM ----------

I don't use that many app, so dunno have experience with crashing. I use 1gb zram since ur cm11, although I don't see any benefit. No crashes though.

I'll try 256mb later then.

I thought swap is remmended at 2x ram on Linux?
[Kindle Fire Android Development] pfederighi:
Indeed, but that is swap to disk. ZRAM is the method of allocating an area of RAM that is treated as a compressed disk and using it as a swap file system. It is a way of using limited RAM more efficiently, at the expense of CPU time, but it is still using RAM. So, on our device, 100 MB is eaten up by graphics buffers and proprietary firmware. Another ~300 MB is eaten up by Lollipop itself. This leaves us with ~100 MB for user programs, which is not a lot. If you allocate ZRAM at 60 MB, that leaves 40 MB of regular RAM + ~120 MB compressed on the ZRAM drive for programs. This gives us more memory to work with, but effectively 75% of it is compressed, which means every time it's read, it needs to be decompressed, and every time it's written, it needs to be compressed. The memory manager of linux does a great job of making it efficient, but it still slows down the system.

If Android were to actually swap to disk, which it can do, it would wear out the solid state media very quickly because there are a limited number of writes before the media no longer works. There have been great advances in the field of solid state technology such as Intel's and Micron's new 3D XPoint (it's awesome, check it out). So, in the near future this may no longer be an issue, but it doesn't help our old devices.

If you really do need the memory, you can make a swap file on an externally powered USB hard disk, mount the drive, and then issue a `swapon path_to_your_swap_file` from the terminal. I've done it before. It's painfully slow, but it works.
[Kindle Fire Android Development] dokie80:
Thanks for the explanation.

Cmiiw, so zram is on the ram itself?

So if I'm not using many apps at the same time, probably better to use zero zram? Assuming the free RAM is enough for the app.

about KSM, does it mean that with KSM enable, ram that is used for the system can be put on zram (compressed)? And by that, does it mean that zram is used only for user apps?
[Kindle Fire Android Development] pfederighi:
Regarding not using ZRAM:

From what I understand, yes, if you have enough RAM without using ZRAM, then it's generally better to not use it.

Regarding KSM:

KSM compares the specified number (default 100) of RAM pages per check. If it finds that any RAM pages are identical, it merges them to a single copy-on-write page (that is, they will remain merged until a process attempts to write to it, at which point it'll be copied back to separate pages). Since there are often many read-only pages that happen to be identical, it tends to be very effective.

It runs at the specified interval (default 500ms). I've found that increasing the interval to 750ms or even 1000ms significantly reduces system load with no appreciable difference in the amount of RAM freed.

Because for some CPU & RAM intensive programs I've noticed slightly worse performance with KSM running, I have sometimes run KSM for a few seconds to free up the RAM, disabled it, and then run said program. It seems to work rather well. I suppose I could also have left it running and just increased the sleep interval to a higher amount, say 10000ms.

In general, KSM will free up about 10% of the total RAM, which in my experience is true.
[Kindle Fire Android Development] pfederighi:
CM-11.0

I've uploaded another CM-11 build. The kernel is compiled with ArchiDroid, the ROM with Uber. I think it is slightly faster than the previously posted all SaberMod build. It still suffers from all the regular CM-11 quirks on our device. The direct link: https://drive.google.com/open?id=0B7BjC3Ky49TVVGF3TFJ0ckJzYjA

Try as I might, I have failed to find a solution for the annoying wpa_supplicant error. That is, about every 2 seconds, `logcat` will spit out the following: "E/wpa_supplicant( 490): recvfrom(ctrl_iface): Try again". The 490 is the process ID number, yes?. I've found various references online, but no solutions. Does anyone know what the issue is or how to fix it?

And now for something completely different:

Is there anyone who would be interested in a CM-10.2 OtterX build? Since the general consensus is that CM-10.2 was noticeably faster than CM-11 (I remember it being so), I thought it'd be a good challenge to convert it, but only if there's a desire for it. Please let me know.
[Kindle Fire Android Development] dokie80:
Cm10.x is better in performance, but imo, the sound is better/louder on cm11-12.

But no privacy guard on JB, right? I can't get similar battery life on JB, even using deep sleep apps. Unless you can bring privacy guard to cm10, I'll stick on 11+

What cm-11 quirks are you talking about?

Thanks for this.
[Kindle Fire Android Development] pfederighi:
CM-11 quirks include things like (it's possible some of these are specific to using a different kernel than the original or using optimizing toolchains):

* Sometimes when you press the Recents button on the navbar it'll come up saying there are no open apps, even when there are apps open.

* Sometimes the clock/weather/upcoming alarms/upcoming events part of the lock screen doesn't appear when waking up the KF.

* Sometimes you have to press the power button more than once to get the KF to wake up.

* Sometimes pressing the power button doesn't work and you may have to plug the KF in to get it to wake up.

* Certain apps, like any Netflix version after 3.0, just don't like the ROM.

I always had good battery life with CM-10.x, even with gapps installed. As for privacy guard, I'll look into it. All of this is as time permits. Edit: It looks like privacy guard is a part of CM-10.2. At least there are a lot of references to it being in 10.2.
[Kindle Fire Android Development] ghagiel:
I would be interested in a 10.2 build.

And of course thx for all your interest in keeping this device alive. Great little tablet.
[Kindle Fire Android Development] dokie80:
I don't remember facing those issues. About have to press button several time to wake up, sometimes it just need 1-3 secs for the screen to wake, probably because of low cpu clock too.

I remember using 10.x that has privacy guard, but it's different from 11.x. As long I can block wake up and keep wake, I'm sold.

As the sound,

Anyway, since you re offering otterx version, I definitely will test it out, since it's easy and won't require a pc.

Thanks
[Kindle Fire Android Development] VTCruzer:
I thought CM11 had more free ram than CM10?
[Kindle Fire Android Development] dokie80:
10 is faster, much more responsive than 11. For free RAM I'm not sure, but AFAIK, free RAM can be set using minfree. More free RAM doesn't mean it will run faster, it just mean less crash on apps and more capable on running apps that need high ram.

[MENTION=4968340]pfederighi[/MENTION] already explain about the zram. Using that, we can get more free RAM, but will use More cpu to decompress the zram when accessed. So, probably not faster than without using zram.

If we really want to compare the ram, I suggest to compare the usage (system), not the free one.
[Kindle Fire Android Development] Guitarman:
I too would be very interested in a 10.2 build for otterx :)
[Kindle Fire Android Development] dokie80:
My recommendation:

https://xdaforums.com/kindle-fire/development/random-builds-development-t3228941/post64730596
[Kindle Fire Android Development] nxb:
Thanks for this. I'm using a KFv1 as an actual reader. Rom is CM11 w/battery fix and TWRP 3.0 (which still won't let you use MTP).

After I installed the rom ADB didn't work in recovery but after toggling sideload in the menus, windows installed another ADB driver and it works every time.

The ADB driver under "Kindle Fire" doesn't work just like the MTP didn't, they are tied together. Might be why people are claiming ADB didn't work on newer recoveries.

I had to remove the phone and mobile data APK, cyanogen account/home and freeze some stuff like SMS, location, bluetooth and exchange services that I'll never use.

App stuff is handled by LP, MicroG and yalp store. I of course have xposed.

Overall its an OK reader and can also be a remote or remote streamer. Battery is probably original, might have to replace it eventually. Can't complain for $20 shipped. If I get tired of it I can buy one of the newer hack-able kindles.
[Kindle Fire Android Development] t3chwizard:
I use my KFv1 as a remote for my home media center and tv guide to look up channels pretty much nowadays.

I was lucky enough to get an Amazon Fire 5th Gen (KFFOWI) a few years back when it was still hackable and they had a bootloader on it that let you boot TWRP via fastboot even though the bootloader was still locked. Maybe with the recent vulnerabilities everyone is buzzing about they will find some exploits for devices that have locked bootloaders but this is easier said than done.
[Kindle Fire Android Development] just_magikkal:
heya, i know i'm probably the last person to jump on this bandwagon but I'm looking for some ROMs that still have available download links for this very old tablet XD my sister came to me with an old Kindle Fire and I was like "can i mess around with it and try to put another OS on it" and she was like "sure it barely works anyway" so my goal is to find a working ROM that's based on KitKat or even Lolipop if that's a thing. If those don't happen to exist anymore, I'd like to find a ROM that runs at a pretty high speed. Stock is just slow and I've always found that to be the case with Kindle Fires.
[Kindle Fire Android Development] KittenSauce:
Here is a Nougat ROM for OtterX: https://androidfilehost.com/?fid=312968873555011561

My Kindle Fire has been broken for a while (I sliced the digitizer cable by accident), but I can't imagine this ROM runs too well.

Here is the final CyanogenMod 11 [KitKat] build for OtterX: https://archive.org/download/cmarchive_nighlies/cm-11-20160815-NIGHTLY-otterx.zip

This is the ROM I am technically still running on my Kindle. It worked fine, for the time I used it.

There were also unofficial Lollipop builds, I think. I would assume they could be found with a simple Google search. Also, I wouldn't run GApps on any of the ROMs I linked to. It reduces the speed of the device quite a bit.
[Kindle Fire Android Development] nxb:
Word of warning tho... some of the roms have a battery drain issue in standby mode. I wouldn't put gapps on anything at this point since we have microG. The tiny amounts of ram and space on the KF1 is a problem. I only have like 100mb free.

If it wasn't for pfederighi we'd have a bunch of unusable newer roms and dead links.
[Kindle Fire Android Development] t3chwizard:
I couldn't manage to get microG to work. Would you be able to show some steps on how to get it to work with this device?
[Kindle Fire Android Development] nxb:
This is what I did:

1. Install CM11 with battery fix (fs version but feel free to try ext4)

2. Install Xposed framework (direct install) http://dl-xda.xposed.info/modules/de.robv.android.xposed.installer_v32_de4f0d.apk

3. Install Framework Proxy, Services Core and FakeStore from https://microg.org/download.html

4. Install http://repo.xposed.info/module/com.thermatk.android.xf.fakegapps and enable it

5. Install *ucky *atcher and enable the xposed module if you want to verify purchased apps and don't access the internet.

That's all it took. If you're online through the wifi you might want the NLP backend for location or perhaps a firewall like afwall. I use yalp store instead of the play store but truthfully you can just install APKs manually. I do this across all my devices.

If its not working you can do the self-check on microg. Usually any problems have been related to signature spoofing not working or the fakestore being missing. Its needed for the apps to believe there is some kind of "store" on the device. I never even add a google account anymore, its only necessary if you need GCM working on google apps.
[Kindle Fire Android Development] t3chwizard:
Few questions:

1. Are you using OtterX?

2. What do you mean when you say fs version?

3. Also what battery fix?
[Kindle Fire Android Development] nxb:
Yes I'm using otterx for the extra space. I'm using the new FS version of "OTTERX : pfederighi'c cm11, best battery." He also made an identical EXT4 build which I didn't try.

On some roms the battery drains in standby and there are problems waking the kindle up, on the ones in this thread that was fixed.
[Kindle Fire Android Development] t3chwizard:
Would you mind linking this thread?, I seem to have missed this ROM you speak of. But I hear you on the battery drain and wakeup thing it usually drains itself dead just in standby.
[Kindle Fire Android Development] nxb:
http://xdaforums.com/showthread.php?p=62173645#post62173645
[Kindle Fire Android Development] orangematter:
Thank you for these step by step instructions. My kindle got a new lease on life after being disappointed with the performance of 5-6 other roms.

It's running Youtube, News Apps, and Netflix with solid performance and battery.
[Kindle Fire Android Development] t3chwizard:
could anyone potentially make an updated TWRP build for otterx?
[Kindle Fire Android Development] t3chwizard:
finally got around to trying this and it appears to work. thanks for the instructions
[Kindle Fire Android Development] dokie80:
Why not 10.3? Any particular reason?
[Kindle Fire Android Development] Guitarman:
I'd try 10.3
[Kindle Fire Android Development] pfederighi:
Hey everyone. I thought I'd let you know that I just got CM-10.2 OtterX to boot. So far it looks to be working, but there may be some issue with resetting the first boot scripts when rebooting. I'll do some more testing. Currently I'm trying the kernel used at the time. I haven't tried any optimizations yet. I'll keep you posted.

Update 1: WiFi doesn't work. Grrr!

Update 2: Gesture typing doesn't work. It draws the trail, but never inserts any words. Did it work before? I never used it at the time.

Update 3: All settings get reset to first boot settings when rebooting. Grrr!

* Making progress

Update 4: "sdcard" doesn't get mounted. Grrr!
[Kindle Fire Android Development] dokie80:
Lol. Don't give up.

BTW otterx's cm11 that you post on otter thread is better than last cm11 with Uber. At least battery consumption is much better before, with similar setting.

With Uber one, I can only get around 2-3 days with only light use for reading at night.

Cm12 obviously not good for normal use, probably should leave it?

I M back on ur previous cm11 :)
[Kindle Fire Android Development] pfederighi:
Thanks for the info. Maybe it's the ArchiDroid tool chain. I did an ArchiDroid/Sabermod build as well and it performed about the same as the one I posted. The one I posted seemed to be ever so slightly more responsive, which is why I posted it. I also did an all Uber build, but never got around to testing it. It's been hard for me to judge battery life since my son is enthralled with Monument Valley, so I've been charging it a lot. Again, thank you for the feedback.

I noticed that the CM-11 tree was recently updated. It doesn't look like anything has really changed, in the core, but several of the external packages have been updated, so perhaps the overall ROM will be improved. I've downloaded the source and I'll try some builds with it.

BTW: What is this CM-10.3 that you and [MENTION=4683648]Guitarman[/MENTION] speak of?
[Kindle Fire Android Development] dokie80:
My mistake. I remember it wrong. I thought that latest snapshot is 10.3

Just checked, it's 10.2
[Kindle Fire Android Development] Italico:
Thumbs up for a 10.2 version!

Sure outdated, but faster, more responsive.

BTW, a little questione. At the time I didn't install WhatsApp or Google Drive apps... do they may have some sort of malfunctioning if used with such old ROM version?

Thank you very much to everybody, I am so happy to see 'movement' around our OtterXs
[Kindle Fire Android Development] pfederighi:
CM-10.2 OtterX updates:

* I've changed something in the device tree and got WiFi to work. Yay! I'm not exactly sure what it was. Not very scientific of me not keeping notes, but it works.

* I found out why the settings would get reset. I had attempted to add f2fs to kernel that came with CM-10.2, and while it compiled, it apparently didn't work so Android just mounted a tmpfs in place of the actual data partition. I've been using the kernel from CM-11 and f2fs works fine. I'll see what the battery life is like, though I suspect the lollipop kernel will be needed.

* I've managed to get sdcard to work, but I have to start the sdcard fuse system manually from the terminal app. I'm still trying to figure out why it's not automatic. One also has to leave the Terminal open otherwise the fuse process gets terminated and sdcard goes away.

* I am reminded that weird things happen with superuser. The shell doesn't work correctly in Terminal. Files copied from one place to another may or may not actually be copied. If they are copied, they may not be able to be edited or have their permissions changed, even by root. I guess we'll need to investigate to find out if we need a newer busybox, a newer superuser, or something else entirely.

All this to say: Progress.

Update: "... changes aren't permanent, but change is." That is to say, the root folder is a rootfs, which is an unmountable tmpfs, which is why I could never get any changes to stick. Lesson learned. And :

* I have /sdcard working automatically now (there's more to that story than just tmpfs, but I won't bore you with it unless you're genuinely interested).

* I figured out what I changed to get wifi working, and found that bash is included in CM.

* There is still su weirdness with Terminal, but how often do we really need it.

* Battery life sucks; it's time to try a different kernel tree.

I'll keep you posted.
[Kindle Fire Android Development] t3chwizard:
Cannot wait until this works. 10.2 on otterx would be amazing.
[Kindle Fire Android Development] pfederighi:
CM-10.2 OtterX Customizations?

Since I'm now in the process of optimizing CM-10.2 OttterX, are there any customizations that folks would like? For example: newer Trebuchet? Different launcher entirely? Removal of apps or frameworks like bluetooth, cell broadcasts, whisperpush, and live wallpaper?

Thoughts and suggestions welcome.
[Kindle Fire Android Development] t3chwizard:
Please remove the stuff that is useless like those frameworks you mentioned. But please keep the customization down to a minimum because we want it optimized for speed here.

---------- Post added at 04:25 PM ---------- Previous post was at 04:18 PM ----------

What GAPPS should I use with the CM11 build at that link?
[Kindle Fire Android Development] kvestas:
Newer Trebuchet may require extra resources. It might impact on overall performance. Only a guess though.

Different launcher? Why not, but preferable as an option only.

Removal of absolutely useless apps - thats for sure would be a benefit.

And thanks a lot for your time and knowledge trying to make our otterX better.