• XDA Forums have been migrated to XenForo. We are aware of several issues including missing threads, logins not working, and more. To discuss, use this thread.

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

Pretoriano80

Senior Member
Jun 9, 2010
3,155
2,840
113
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)



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
 

Attachments

Last edited:

cristimnt

New member
Apr 19, 2013
23
0
0
Flashed [6.2.6.8_r1] by rbox -> booted fine. Flashed this custom kernel and it is not booting, stuck at first fire tv logo, on black screen. I flash again the ROM and it is fine.
Are the problems with the ROM by rbox?
 

tsynik

New member
Dec 14, 2010
194
155
0
can you add uvcvideo to this kernel or as a module to the stock kernel? it will be nice to try USB webcams on the stick ;)
 
Last edited:
  • Like
Reactions: DeR4t

Pretoriano80

Senior Member
Jun 9, 2010
3,155
2,840
113
Flashed [6.2.6.8_r1] by rbox -> booted fine. Flashed this custom kernel and it is not booting, stuck at first fire tv logo, on black screen. I flash again the ROM and it is fine.
Are the problems with the ROM by rbox?
I don't know, i'm not using rbox's rom here.
 

tsynik

New member
Dec 14, 2010
194
155
0
No promises, but i will look into it and eventually i will send you a test build.
Btw, have you flashed the kernel?
I was on magisk patched stock because I use stickmount for USB drives ;) but flashed your kernel and magisk 20.1 after just for test right now and stick boots fine. So in general looks like it works ;)
 
  • Like
Reactions: Pretoriano80

Pretoriano80

Senior Member
Jun 9, 2010
3,155
2,840
113
I was on magisk patched stock because I use stickmount for USB drives ;) but flashed your kernel and magisk 20.1 after and stick boots fine. So in general looks like it works ;)
Great, than something is not right on rbox's rom.
Personally i use my own zip to flash OTAs and i tested the kernel for quite some time.
Hmm,i've tried Stickmount months ago but i wasn't satisfied, that's why i started to work on the OTG module.
Best would be to find a way to make the OTG storage to show in Settings, so people could mount/unmount from there.
 
  • Like
Reactions: puppinoo

Pretoriano80

Senior Member
Jun 9, 2010
3,155
2,840
113
Last edited:

tsynik

New member
Dec 14, 2010
194
155
0
Hmm,i've tried Stickmount months ago but i wasn't satisfied, that's why i started to work on the OTG module.
Best would be to find a way to make the OTG storage to show in Settings, so people could mount/unmount from there.
StickMount just do it's work: mount and unmount exFAT, NTFS drives to /sdcard/USB. Fuse performance isn't great but acceptable for any Blurays with high bitrates. According to dd it have about 22-25 MB/s on reads and writes via fuse. You can find little bit improved version on my GDrive in app folder ;)
 

Pretoriano80

Senior Member
Jun 9, 2010
3,155
2,840
113
StickMount just do it's work: mount and unmount exFAT, NTFS drives to /sdcard/USB. Fuse performance isn't great but acceptable for any Blurays with high bitrates. According to dd it have about 22-25 MB/s on reads and writes via fuse. You can find little bit improved version on my GDrive in app folder ;)
Yes, but it has a big limitation, at least that was the case when i tested, it can't write files bigger than the available space of the internal storage.

I added UVC to the kernel, but i didn't found an app that works (or my webcams are not supported, idk). Wanna test? I packed the modules into a Magisk module, so it's all systemless

If you are using Telegram, drop me a line there, same nick as XDA.
 
  • Like
Reactions: puppinoo

gb160

New member
Oct 20, 2019
40
10
0
Nice job. Any hope/idea to fix this?
github.com/amzn/exoplayer-amazon-port/issues/94
That's the dream right there.
Its the only downside of this stick for me right now...I have to use my vero 4k+ for live TV which is a pain.
A fix would be unbelievable, I think Amazon have basically washed their hands with the issue now, which is really disappointing.
 
  • Like
Reactions: DeR4t

tymoxa

New member
Jun 6, 2008
2
1
0
[*]CIFS and NFS support
Hi.
Thanks for your work.
Could you give a hint how to properly use this kernel to mount nfs/cifs share to let's say /sdcard/share with access of installed apps to this folder.
I can sort of mount what i need via shell but folder remain accessible only for apps with root. I need it for Kodi as i can't get rid of buffering when i mount share in Kodi itself.
 

Yom

New member
May 4, 2006
1,336
161
0
Cancun
Hi Pretoriano!

Awesome work, mate! LOVE your kernel!

I tried flashing it under 6.2.7.1, but got bootloop. How can I make this kernel work in the latest OS?

Thanks again!