[KERNEL][FireTV Stick 4K] Custom Kernel For AFTV 4k - 6.2.7.7

Search This thread

Pretoriano80

Senior Member
Jun 9, 2010
3,246
2,921
thanks so much for all your work, i will try to load it on the next few days. I only had loaded the selinux module before, ill also try loading the other kernel module with it as well. sory to be a pain, any chance you cAN upload a copy of the magisk i can flash with twrp as well that you used? theres different versions around. thanks!
Latest Magisk should work just fine.
You don't need the kernel modules for WireGuard because it's built-in.
 

Pretoriano80

Senior Member
Jun 9, 2010
3,246
2,921
I am on version 6.2.7.7 and need USB with large file support. I was using "USB StickMount" but it seems somewhat flaky (or maybe it's my MX Player?).

I am interested in your kernel and Magisk module to make a bit more painless.

Anyway, is your 6.2.7.7 kernel rock solid? I have 4k stick plugged into a UPS, so it is never is rebooted. It could run for days without issues.
The kernel itself should be stable and there were no complaints, but i guess that you will have to test it and see if it suits you.
If you are planning to use an external hard-disk, then you should use one with external power or a powered USB hub, otherwise you will have troubles with FireTV not being able to provide enough power.
 

Pretoriano80

Senior Member
Jun 9, 2010
3,246
2,921
Just tried , firestick won’t get bast boot screen anymore. So I switched over to android box. Thanks for your work and time on this project.
What have you tried, the latest 6.2.7.7 R3 kernel or latest Magisk?
If it doesn't boot, just flash the stock 6.2.7.7 kernel and you will be fine.
 

Languor

Member
Jan 26, 2014
32
11
What have you tried, the latest 6.2.7.7 R3 kernel or latest Magisk?
If it doesn't boot, just flash the stock 6.2.7.7 kernel and you will be fine.
Yes the new one, the previous version was on it earlier. How can I get the stock one? Thanks

Edit: I tried with magisk 20.4, I also tried just reflashing kernel without magisk as well
 

Pretoriano80

Senior Member
Jun 9, 2010
3,246
2,921
Yes the new one, the previous version was on it earlier. How can I get the stock one? Thanks

Edit: I tried with magisk 20.4, I also tried just reflashing kernel without magisk as well
Download the stock 6.2.7.7 firmware and extract the boot.img from it. Then install it with TWRP (you need to select 'image" from the install menu, not the normal "zip package".
Otherwise you can install the previous 6.2.7.7 R2 version if you have it at hand.

Edit: I' ve re-upload 6.2.7.7 R2 to OP, so you can use it to restore.
 
Last edited:

yan2xme

Senior Member
Jun 8, 2018
104
16
Will 6.2.7.7 R3 kernel will work on 6.2.7.7 R2? or does the patched 6.2.7.7 R2 still supports UVC video? thanks
 

Languor

Member
Jan 26, 2014
32
11
Download the stock 6.2.7.7 firmware and extract the boot.img from it. Then install it with TWRP (you need to select 'image" from the install menu, not the normal "zip package".
Otherwise you can install the previous 6.2.7.7 R2 version if you have it at hand.

Edit: I' ve re-upload 6.2.7.7 R2 to OP, so you can use it to restore.
thanks for the re upload, i did find the kernel i use to use on my laptop, (R1) , cant flash them until i get a usb hub, all i been using in the past was a otg cable and a mouse, but where it wont boot to the os i cant put the file on the firestick to flash.
 

Pretoriano80

Senior Member
Jun 9, 2010
3,246
2,921
Will 6.2.7.7 R3 kernel will work on 6.2.7.7 R2? or does the patched 6.2.7.7 R2 still supports UVC video? thanks
Yes it should work, but R3 wasn't tested by me because i'm on 6.2.7.6.
UVC support is provided by the the Magisk Kernel Modules, is not built-in.
If you test 6.2.7.7, please let me know if it works or not.
 

Pretoriano80

Senior Member
Jun 9, 2010
3,246
2,921
thanks for the re upload, i did find the kernel i use to use on my laptop, (R1) , cant flash them until i get a usb hub, all i been using in the past was a otg cable and a mouse, but where it wont boot to the os i cant put the file on the firestick to flash.
Hmm, if i remember correctly, there were 3 versions of 6.2.7.7 FireOS,do you remember which version you had?
 

yan2xme

Senior Member
Jun 8, 2018
104
16
Yes it should work, but R3 wasn't tested by me because i'm on 6.2.7.6.
UVC support is provided by the the Magisk Kernel Modules, is not built-in.
If you test 6.2.7.7, please let me know if it works or not.
I just tested the 6.2.8.0 R2 (i installed patched 6.2.7.7 R2 to 8.0 R2 so it won’t prompt for OTA’s which is hard to block on fresh install) kernel cause I can’t find any stable stock on 6.2.7.7 cause ur kernel seem wont work on @rbox or @Skel40 debloated roms unfortunately…. and I installed the patch and alas…. still it is not built in how much I try. OpenCamera, Zoom or Messenger still would not work… My faith on this FS has plummeted and I hate this thing yall hahaha, its all about FrustrationS. I wish they couldve just made it straightforward, plug and play to uvc’s and dacs too…
I'm might be selling this device soon and substitute our entertainment system with Chromecast with Google TV, its got a better performance and a lot of support to peripherals too without rooting it. It has bugless GAPPs too, obviously and less app compatibility issues. Type C and a lot more goodies
Still thanks for the hardwork of fellow devs and you for investing much time in this device.
 
Last edited:

yan2xme

Senior Member
Jun 8, 2018
104
16
i forgot to add, seems @tsynik 's GAPPs module (in 6.2.7.7 R2 and 8.0 R2) does interfere with ur Selinux fix module... that's why I just switched to the MM version only
 

bibikalka

Senior Member
May 14, 2015
1,408
1,100
Download the stock 6.2.7.7 firmware and extract the boot.img from it. Then install it with TWRP (you need to select 'image" from the install menu, not the normal "zip package".
Otherwise you can install the previous 6.2.7.7 R2 version if you have it at hand.

Edit: I' ve re-upload 6.2.7.7 R2 to OP, so you can use it to restore.
Yes it should work, but R3 wasn't tested by me because i'm on 6.2.7.6.
UVC support is provided by the the Magisk Kernel Modules, is not built-in.
If you test 6.2.7.7, please let me know if it works or not.

Alright, so was 6.2.7.7 R2 properly tested before? is that a safe choice to use then? What's the conclusion on 6.2.7.7 R3?
 

Pretoriano80

Senior Member
Jun 9, 2010
3,246
2,921
Alright, so was 6.2.7.7 R2 properly tested before? is that a safe choice to use then? What's the conclusion on 6.2.7.7 R3?
6.2.7.7 R2 was tested and worked fine with stock 6.2.7.7 FireOS.
But keep in mind that my kernel was always designed and tested on stock FireOS and other custom or debloated roms were never supported.
The "tricky" part on FireTV4k has never been the kernel itself, but the Magisk modules, however my FireTV is always running with my custom kernel and my Magisk modules and never had issues.

But it's up to you (as an user) to install it and test it on your configuration, nobody can guarantee that it's working properly with every FireTV4k out there.
And usually, an XDA user should be able to return to the stock kernel in case there's an issue, otherwise he/she shouldn't mess with this sruff at all.
 
  • Like
Reactions: bibikalka

Pretoriano80

Senior Member
Jun 9, 2010
3,246
2,921
i forgot to add, seems @tsynik 's GAPPs module (in 6.2.7.7 R2 and 8.0 R2) does interfere with ur Selinux fix module... that's why I just switched to the MM version only
Testing my kernels in such environments it's inconclusive, i only support stock FireOS because that's what i always used.
I know that it's nice to have all the stuff from Google and other hacks, but most of the times is just too much for a FireTV to handle (Amazon wants its services only).
 

bibikalka

Senior Member
May 14, 2015
1,408
1,100
What have you tried, the latest 6.2.7.7 R3 kernel or latest Magisk?
If it doesn't boot, just flash the stock 6.2.7.7 kernel and you will be fine.

Yes the new one, the previous version was on it earlier. How can I get the stock one? Thanks

Edit: I tried with magisk 20.4, I also tried just reflashing kernel without magisk as well

Yes it should work, but R3 wasn't tested by me because i'm on 6.2.7.6.
UVC support is provided by the the Magisk Kernel Modules, is not built-in.
If you test 6.2.7.7, please let me know if it works or not.

I flashed 6.2.7.7 R3 on full stock - it did not boot at all. Re-flashed with R2, things seem good! I am using Magisk 20.4

At first, the NTFS module would not work - I flashed it in the same session with the kernel (+SE Linux fix). Then I disabled NTFS in Magisk, rebooted, enabled it, rebooted again. Now it seemed to work.

NTFS seems to be OK, ES File explorer sees the USB. Total Commander seems to have issues. Occasionally the stick would ask I want to format the unsupported drive, but then it goes away. Overall, less cumbersome than StickMount by Chainfire, so thanks for the option!
 
  • Like
Reactions: Pretoriano80

Pretoriano80

Senior Member
Jun 9, 2010
3,246
2,921
I flashed 6.2.7.7 R3 on full stock - it did not boot at all. Re-flashed with R2, things seem good! I am using Magisk 20.4

At first, the NTFS module would not work - I flashed it in the same session with the kernel (+SE Linux fix). Then I disabled NTFS in Magisk, rebooted, enabled it, rebooted again. Now it seemed to work.

NTFS seems to be OK, ES File explorer sees the USB. Total Commander seems to have issues. Occasionally the stick would ask I want to format the unsupported drive, but then it goes away. Overall, less cumbersome than StickMount by Chainfire, so thanks for the option!
Ok, so there's definitely something wrong with R3.
I only tested NTFS while developing the Magisk module, but i'm using exFAT and F2FS on my external drives/microSD and it's all good.
Maybe i will find a way to port the new NTFS3 to FireTV4k, that would handle NTFS much better.
 

bibikalka

Senior Member
May 14, 2015
1,408
1,100
Ok, so there's definitely something wrong with R3.
I only tested NTFS while developing the Magisk module, but i'm using exFAT and F2FS on my external drives/microSD and it's all good.
Maybe i will find a way to port the new NTFS3 to FireTV4k, that would handle NTFS much better.

So I found NTFS in R2 to be a bit flaky. At least, in my use case with MX Player, I get these hang ups. This is happening for the files that seemed OK with stock+StickMount. I guess I could switch to exFAT, and see how that one performs.

Do you find exFAT to be rock solid? No issues?
 

Pretoriano80

Senior Member
Jun 9, 2010
3,246
2,921
So I found NTFS in R2 to be a bit flaky. At least, in my use case with MX Player, I get these hang ups. This is happening for the files that seemed OK with stock+StickMount. I guess I could switch to exFAT, and see how that one performs.

Do you find exFAT to be rock solid? No issues?
My favorite is F2FS, that's what i use on SSD and MicroSD.
You are using an external HDD/SSD or MicroSD/USB Stick?
exFAT should be more stable than NTFS, but like i said, if you use an external drive, then you should also use an external power for it, otherwise there will be trouble.
 

bibikalka

Senior Member
May 14, 2015
1,408
1,100
My favorite is F2FS, that's what i use on SSD and MicroSD.
You are using an external HDD/SSD or MicroSD/USB Stick?
exFAT should be more stable than NTFS, but like i said, if you use an external drive, then you should also use an external power for it, otherwise there will be trouble.

F2FS appears to be too limiting in terms of portability. So I guess I shall try exFAT and see how that works.

Not sure what you mean about external power. The Fire 4K stick needs an OTG cable with external power port to attach a USB drive, so then this USB port will be getting power from the same power supply as the 4k stick. I have 2 amps coming from a UPS, that should hopefully be enough for an SSD.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    Warning !!! Use this kernel on your own risk !!! I can't be held responsible for any kind of damage or data loss !!!
    Features:
    • SDCARDFS
    • exFAT and F2FS support
    • Wireguard
    • Advanced TCP options
    • CIFS and NFS support
    • Insecure ADB

    v1 -6.2.6.8-Changelog
    v1 -6.2.6.8-Changelog
    • defconfig: Enable SDCARDFS
    • sdcardfs: Fix sdcardfs to stop creating cases-sensitive duplicate entries.
    • ANDROID: sdcardfs: Make WARN_RATELIMIT to pr_debug
    • ANDROID: sdcardfs: Add missing break
    • ANDROID: Sdcardfs: Move gid derivation under flag
    • ANDROID: mnt: Fix freeing of mount data
    • config: Add full mantis config
    • defconfig: Enable Wireguard
    • net: Add Wireguard importer
    • defconfig: Disable Amazon Metrics
    • defconfig: Enable Advanced TCP Congestion
    • defconfig: Enabled IKCONFIG_PROC
    • defconfig: Enable Network Filesystems
    • defconfig: Enable CIFS support
    • fs:Enable NFS support
    • fs: Enable exFAT Filesystem
    • fs: Add exFAT support
    • defconfig: Enable F2FS

    v1 -6.2.7.1-Changelog
    v1 -6.2.7.1-Changelog
    • defconfig: Enable SDCARDFS
    • sdcardfs: Fix sdcardfs to stop creating cases-sensitive duplicate entries.
    • ANDROID: sdcardfs: Make WARN_RATELIMIT to pr_debug
    • ANDROID: sdcardfs: Add missing break
    • ANDROID: Sdcardfs: Move gid derivation under flag
    • ANDROID: mnt: Fix freeing of mount data
    • config: Add full mantis config
    • defconfig: Enable Wireguard
    • net: Add Wireguard importer
    • defconfig: Disable Amazon Metrics
    • defconfig: Enable Advanced TCP Congestion
    • defconfig: Enabled IKCONFIG_PROC
    • defconfig: Enable Network Filesystems
    • defconfig: Enable CIFS support
    • fs:Enable NFS support
    • fs: Enable exFAT Filesystem
    • fs: Add exFAT support
    • defconfig: Enable F2FS


    v2 -6.2.7.1-Changelog
    v2 -6.2.7.1-Changelog
    Enabled XPAD driver (this will enable support for Microsoft XBOX gamepads)


    v3 -6.2.7.1-Changelog
    v3 -6.2.7.1-Changelog
    Wireguard not working issue is now fixed (please install the AFTV4k_Selinux_Magisk_Module.zip after installing the kernel)


    v1 -6.2.7.3-Changelog
    v1 -6.2.7.3-Changelog
    • defconfig: Enable SDCARDFS
    • sdcardfs: Fix sdcardfs to stop creating cases-sensitive duplicate entries.
    • ANDROID: sdcardfs: Make WARN_RATELIMIT to pr_debug
    • ANDROID: sdcardfs: Add missing break
    • ANDROID: Sdcardfs: Move gid derivation under flag
    • ANDROID: mnt: Fix freeing of mount data
    • config: Add full mantis config
    • defconfig: Enable Wireguard
    • net: Add Wireguard importer
    • defconfig: Disable Amazon Metrics
    • defconfig: Enable Advanced TCP Congestion
    • defconfig: Enabled IKCONFIG_PROC
    • defconfig: Enable Network Filesystems
    • defconfig: Enable CIFS support
    • fs:Enable NFS support
    • fs: Enable exFAT Filesystem
    • fs: Add exFAT support
    • defconfig: Enable F2FS
    • Enabled XPAD driver (this will enable support for Microsoft XBOX gamepads)
    • Wireguard fix (please install the AFTV4k_Selinux_Magisk_Module.zip after installing the kernel)


    R1 -6.2.7.6-Changelog
    R1 -6.2.7.6-Changelog
    • defconfig: Enable SDCARDFS
    • sdcardfs: Fix sdcardfs to stop creating cases-sensitive duplicate entries.
    • ANDROID: sdcardfs: Make WARN_RATELIMIT to pr_debug
    • ANDROID: sdcardfs: Add missing break
    • ANDROID: Sdcardfs: Move gid derivation under flag
    • ANDROID: mnt: Fix freeing of mount data
    • config: Add full mantis config
    • defconfig: Enable Wireguard
    • net: Add Wireguard importer
    • defconfig: Disable Amazon Metrics
    • defconfig: Enable Advanced TCP Congestion
    • defconfig: Enabled IKCONFIG_PROC
    • defconfig: Enable Network Filesystems
    • defconfig: Enable CIFS support
    • fs:Enable NFS support
    • fs: Enable exFAT Filesystem
    • fs: Add exFAT support
    • defconfig: Enable F2FS
    • Enabled XPAD driver (this will enable support for Microsoft XBOX gamepads)
    • Wireguard fix (please install the AFTV4k_Selinux_Magisk_Module.zip after installing the kernel)


    R3 -6.2.7.7-Changelog
    R3 -6.2.7.7-Changelog
    • 2f447f82b defconfig: Enable USB Serial FTDi-SIO
    • 8b84c88e9 defconfig: Enable XPAD driver
    • ec89c3cc8 defconfig: Enable UVCVIDEO
    • 67ca709a6 defconfig: Enable SDCARDFS
    • f4f1b3fa0 sdcardfs: Fix sdcardfs to stop creating cases-sensitive duplicate entries.
    • b1eeb0fef ANDROID: sdcardfs: Make WARN_RATELIMIT to pr_debug
    • b6a76bbb2 ANDROID: sdcardfs: Add missing break
    • 962bd1f78 ANDROID: Sdcardfs: Move gid derivation under flag
    • 705999951 ANDROID: mnt: Fix freeing of mount data
    • 9f15be5ad defconfig: Enable Wireguard
    • 883a014a9 net: Add Wireguard importer
    • 68b1bb60b defconfig: Disable Amazon Metrics
    • efd514f93 defconfig: Enable Advanced TCP Congestion
    • ae7306d2d defconfig: Enabled IKCONFIG_PROC
    • 73017ed8e defconfig: Enable Network Filesystems
    • 149dc468c defconfig: Enable CIFS support
    • f0d5ceb5a fs:Enable NFS support
    • 485fce697 fs: Enable exFAT Filesystem
    • a61103c71 fs: Add exFAT support
    • 5a43a9876 defconfig: Enable F2FS
    • 99f0df6ac Initial commit - Amazon FireTV 4K - 6.2.7.7


    Installation:
    • Download and install with TWRP
    • If you are rooted,flash Magisk after flashing the kernel (installing Magisk is mandatory if you want to avoid issues and use all kernel features or my Magisk modules )
    • Install the kernel modules with Magisk (optional - only required if you need uvcvideo and advanced TCP)
    • Install AFTV4k_Selinux_Magisk_Module.zip ( this is mandatory if you want to avoid issues and use all kernel features or my Magisk modules )
    • Reboot
    Kernel Modules and AFTV4K_CIFS_MOUNTING_MODULE :
    • Download and install with Magisk Manager
    • Reboot

    AFTV4K_CIFS_MOUNTING_MODULE:
    • Download AFTV4K_CIFS_MOUNTING_MODULE.zip
    • Unpack the module
    • Open service.sh with a text editor (on Windows i recommend Notepad ++) replace user, pass and path with your own values
    • Repack the module and install with Magisk Manager
    • Reboot
    Source Code -> Github
    3
    Thx! Next step would be to switch the internal storage to F2FS. xD
    3
    New version (6.2.7.7) it's up!!
    This time some extra work was required, thx to Amazon devs, because they "trimmed" the kernel sources, basically removing most of the code required for this custom kernel.
    3
    I flashed this new 6.2.7.7 R3 + Magisk (2 files) on top of R2, and everything works so far. Did not reflash Magisk modules which were already there.

    exFAT access seems fluid, thanks for the feature again!!!
    Great! Yeah, it should be much more stable than NTFS.
    Paragon"s new NTFS driver should work much better, but i don't see an easy way to port it to FireTV4k.
    However, if this it's working stable (exFAT + F2FS) then we don't have to worry about it. :D
    3
    Here are two 6.2.8.0 kernel builds :

    1) 6.2.8.0_r1
    This build is in sync with Amazon's source + all the features from the previous version

    2)6.2.8.0_no_efuse
    This is experimental and it's the same as R1 but on this one i also disabled the efuse_check script from running on boot. Probably it's useful only for those who didn't updated to 6.2.8.0 yet and it must be installed right after you install 6.2.8.0 with TWRP (so you won't let the new OS to boot and launch the script)
    There are not enough infos about this efuse stuff, so this is a version i made for myself, just to test if there are any issues after disabling efuse_check on boot.

    BTW, i noticed that on 6.2.8.0 it takes longer for FireOS to boot, nut i don't know if it's related to my kernel or not because i never used 6.2.8.0 with the stock kernel.