CM12 / Android TV ROM Development

Search This thread

TechVendetta

Senior Member
Nov 1, 2010
60
112
TechVendetta.com
This thread is for development updates, and an eventual release of testing candidates for the future of dual booting CM12 android roms on the Amazon Fire TV. At this time I am not planing on supporting the Fire TV stick since my development platform is based off USB3 booting.

There currently isn't even a stable branch in CM12 upstream so things are quite tricky right now.
I may eventually setup public nightlies once the core is stable.
IN PROGRESS FORM HERE: https://t.co/TXp9z7htDx

The goals for development are in this order:
  1. Wifi [working]
  2. Bluetooth [crashing]
  3. Stable core [random resets possibly storage related]
  4. Audio [possibly needs hacking to default to hdmi]
  5. Recovery system [rom boots using the recovery partition currently]
  6. Hardware Acceleration [untested]
  7. Android TV addons [require stable core]
  8. USB Formating and install app [apparently not everyone knows what gparted is]
  9. Modified version of Rbox's bootloader [I'd like to add recovery to the loader then have stock and custom boot options]

Also, if you want to be ready for possible nightly testing, I highly recommend going to walmart and buying one of the playstation USB3 hubs. It's about $20 but allows you to plug in a USB3 drive and keyboard and mouse until bluetooth is working.

SETTING UP USB BOOTING:
Code:
#include <std_disclaimer.h> 
/* * Your warranty is now void. * 
* I am not responsible for bricked devices, dead USB drives, 
* thermonuclear war, or you getting fired because the alarm app failed. Please 
* do some research if you have any concerns about features included in these files 
* before flashing them! YOU are choosing to make these modifications, and if 
* you point the finger at me for messing up your device, I will laugh at you. */

PART ONE [Preparing the drive]:
This process will eventually be streamlined but for now I'll explain the process and how it relates to testing builds during development. Since the Fire TV only has an 8gb flash chip and has no hardware recovery trigger, it is quite the unforgiving device to develop on. The current boot method for my CM12 builds involves flashing over the recovery partition and using it as a sort of dualboot partition. The modified recovery partition then searches for ext4 partitions on and external (USB3 preferred) flash drive. Currently each build generates its own boot image to be flashed over recovery, but I'm currently in the process of exploring the possibility of following Rbox's method of loading a boot image from a system folder instead making only one flash to the actual device necessary going forward.

For USB3 booting during the development process I highly recommend using a USB3 hub for a keyboard and mouse while bluetooth pairing and control mapping is being worked on. I also recommend a USB3 drive.

1) Turn on a Linux machine or boot a Live CD
2) Open Gparted
3) Delete any partitions on the usb drive
4) Create three ext4 partitions, the first partion is system and should be about 1GB, the THIRD partition is cache, and should be about 768mb with 0mb following, you should then have the middle portion empty in the display, in this SECOND partition make your data partition fill the rest of the space.

PART TWO [Preparing the bootloader]:
WARNING this process currently involves replacing your recovery partition, remember kids dd and root is like holding a grenade, make sure you don't throw it at something you care about.

Also, if you are testing a build and it does not load using the previous bootloader, try flashing the latest one from the nightlies (and vise versa) as I am still in the process of stream lining the boot process as far as what should take place before system bring up on our device. If a different boot image loads the system with noticeably more stability let me know asap so I can track the causes of my current issues.

Code:
adb connect <STOCK FIRE TV IP>
adb push boot-<DATE>.img /sdcard
adb shell
cd /sdcard
su
dd if=boot-<DATE>.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery

Next I recommend side loading this apk to make rebooting into USB boot easier.

The three most recent "boot" images have been added to the downloads section, remember these should be flashed to recovery. Although they would work in boot, that would disable Rbox's loader and prevent you from loading stock OS.

PART THREE [Playing with instability]:
Great so now you have a USB3 booting image flashed to your recovery partition and you have an empty flash drive. This is where the tinkering begins. In the download section you will find a .tar.gz archive with a somewhat booting system with the aforementioned issues. Inside this archive is a system.img file which you will use dd to flash to the first partition of the flash drive you formated. After the system image is flashed you can plug your flash drive into your hub and reboot into recovery. Things will be great, wifi will show up and if you're quick enough you can complete setup and make it to the launcher. (the issue I'm currently working on is an odd timed reset that may be kernel or storage related oddly if you make it to the launcher and don't touch anything, it takes longer to reset)

If you made it this far, welcome to development. You can help by "kanging" (replacing system apk's and files with other versions to find more stable matches, or remove apks until things don't die then report back to me) Also if you make it to this point go ahead and fill out the form I mentioned earlier. Eventually any hotfix builds I do between nightly builds will be accessible to those users to play with.

Overhauling the boot system next and working on the reset debugging.

XDA:DevDB Information
TechVendetta ROM Development, ROM for the Amazon Fire TV

Contributors
TechVendetta, rbox
Source Code: https://github.com/TechV/android_device_amazon_bueller

ROM OS Version: 5.0.x Lollipop
Based On: CyanogenMod

Version Information
Status: Testing

Created 2015-01-29
Last Updated 2015-01-29
 

Attachments

  • Screenshot_2015-02-19-08-31-46.jpg
    Screenshot_2015-02-19-08-31-46.jpg
    168.3 KB · Views: 25,504
  • Screenshot_2015-02-19-08-17-41.png
    Screenshot_2015-02-19-08-17-41.png
    71.8 KB · Views: 25,079
  • Screenshot_2015-02-19-08-16-32.png
    Screenshot_2015-02-19-08-16-32.png
    180.2 KB · Views: 24,969
Last edited:

TechVendetta

Senior Member
Nov 1, 2010
60
112
TechVendetta.com
Reserved

UPDATE: I'm pretty much settled in to my new job/home now so I'm going to resume this project shortly. The first order of business is to see what sort of driver improvements we got from Amazon and whether their modifications help resolve the issues I was having. I only have the original FireTV so I'll be only testing on that. Not sure if the new one has an unlocked bootloader or recovery system so that will be up to whichever brave soul wants to test that. Hopefully tomorrow I can resync my repos and get a look at whats changed.
 
Last edited:

TechVendetta

Senior Member
Nov 1, 2010
60
112
TechVendetta.com
So far the main system seems promising, I feel like the reset issue, which is the primary major roadblock is either in the kernel, or in the storage management/selinux services. Selinux should be disabled in this build so I'm looking into the other two options right now.
 

TechVendetta

Senior Member
Nov 1, 2010
60
112
TechVendetta.com
Thank you for keeping us updated!

I'll link this here for now, while I finish looking into the logs for bluetooth/wifi/audio before uploading a rough copy here. I think I'm going to use the individuals who filled out the form to test the installer and recovery apps I'll be doing after fixing the above three things.

:victory:| TEASERS |:victory:
 

aHcVolle

Senior Member
Nov 3, 2010
430
247
Stuttgart
I'll link this here for now, while I finish looking into the logs for bluetooth/wifi/audio before uploading a rough copy here. I think I'm going to use the individuals who filled out the form to test the installer and recovery apps I'll be doing after fixing the above three things.

:victory:| TEASERS |:victory:

Hey,

i've got one question for the installation:
you use the recovery as boot partition (because you dont want to mess with the actual boot partition where the bootmenu is).
is there a reason we cant use rbox's bootmenu, add another entry "usb boot" which will boot from /system/boot/usbboot.img ?
Or is the only reason that this just hasnt been added by rbox so we have to use another way?

I think this would be the most brick safe version and shouldnt be a big problem for rbox to implement....

Chris

[edit]
i'm really looking forward to this :p
 

TechVendetta

Senior Member
Nov 1, 2010
60
112
TechVendetta.com
Hey,

i've got one question for the installation:
you use the recovery as boot partition (because you dont want to mess with the actual boot partition where the bootmenu is).
is there a reason we cant use rbox's bootmenu, add another entry "usb boot" which will boot from /system/boot/usbboot.img ?
Or is the only reason that this just hasnt been added by rbox so we have to use another way?

I think this would be the most brick safe version and shouldnt be a big problem for rbox to implement....

Chris

[edit]
i'm really looking forward to this :p

Thats one of the goals I put up there, just unlike rboxs current loader I know a way to make it remote controlled. ;D I started a bit on it. The "friendly user release" will have a root installer app that will handle multiboot, formating flash drives, recovery options, updates etc.
 

mjbxx

Senior Member
Jun 18, 2014
242
44
NC
Really looking forward to a CM12 Android TV ROM. It would be nice to know that Amazon would not be able to kill a rooted Fire TV when this becomes reality. Peace of Mind regarding the Fire TV would be Priceless!
 
  • Like
Reactions: rquiles

TechVendetta

Senior Member
Nov 1, 2010
60
112
TechVendetta.com

Jugstah

Senior Member
Mar 19, 2010
96
23
I'll link this here for now, while I finish looking into the logs for bluetooth/wifi/audio before uploading a rough copy here. I think I'm going to use the individuals who filled out the form to test the installer and recovery apps I'll be doing after fixing the above three things.

:victory:| TEASERS |:victory:

Any luck with the video acceleration, eg for Kodi or others such as Netflix, etc? How about hdmi audio?

Thanks for the update!
 

KLit75

Senior Member
Jun 29, 2014
2,057
313
I recently installed CM 12 on a 2012 kfhd and wow!--it really brought that device to life! Performance/OC options are built right into the OS and another Dev made a custom kernel to oc to 1.7 ghz. But I have limited experience with CM and Android TV. Can we expect a similar UI and performance options with this? Or is it different for the set top boxes?
BTW--I think it's really great you're doing this. Lots of people are excited and it's very appreciated!!!
 

TechVendetta

Senior Member
Nov 1, 2010
60
112
TechVendetta.com
I recently installed CM 12 on a 2012 kfhd and wow!--it really brought that device to life! Performance/OC options are built right into the OS and another Dev made a custom kernel to oc to 1.7 ghz. But I have limited experience with CM and Android TV. Can we expect a similar UI and performance options with this? Or is it different for the set top boxes?
BTW--I think it's really great you're doing this. Lots of people are excited and it's very appreciated!!!

I can overclock the kernel but I'm not sure if it will be necessary yet. As for the features, CM12 doesn't even have a "stable" build yet. (they call them M builds now) They are still porting customizations like that in. That rom may use some stuff pulled in by the dev from other projects like paranoid, aokp etc. I'm listening to what people are asking for and I'll be taking it into consideration once I get to tweaking release candidates.
 
  • Like
Reactions: KLit75 and kr338r

KLit75

Senior Member
Jun 29, 2014
2,057
313
I can overclock the kernel but I'm not sure if it will be necessary yet. As for the features, CM12 doesn't even have a "stable" build yet. (they call them M builds now) They are still porting customizations like that in. That rom may use some stuff pulled in by the dev from other projects like paranoid, aokp etc. I'm listening to what people are asking for and I'll be taking it into consideration once I get to tweaking release candidates.

Sounds great. Thinking now...an OC kernel probably isn't necessary since it's already real fast. But this rom I have works well on a relatively low end/older device. So I'm super excited about your project. Thanks again!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 27
    This thread is for development updates, and an eventual release of testing candidates for the future of dual booting CM12 android roms on the Amazon Fire TV. At this time I am not planing on supporting the Fire TV stick since my development platform is based off USB3 booting.

    There currently isn't even a stable branch in CM12 upstream so things are quite tricky right now.
    I may eventually setup public nightlies once the core is stable.
    IN PROGRESS FORM HERE: https://t.co/TXp9z7htDx

    The goals for development are in this order:
    1. Wifi [working]
    2. Bluetooth [crashing]
    3. Stable core [random resets possibly storage related]
    4. Audio [possibly needs hacking to default to hdmi]
    5. Recovery system [rom boots using the recovery partition currently]
    6. Hardware Acceleration [untested]
    7. Android TV addons [require stable core]
    8. USB Formating and install app [apparently not everyone knows what gparted is]
    9. Modified version of Rbox's bootloader [I'd like to add recovery to the loader then have stock and custom boot options]

    Also, if you want to be ready for possible nightly testing, I highly recommend going to walmart and buying one of the playstation USB3 hubs. It's about $20 but allows you to plug in a USB3 drive and keyboard and mouse until bluetooth is working.

    SETTING UP USB BOOTING:
    Code:
    #include <std_disclaimer.h> 
    /* * Your warranty is now void. * 
    * I am not responsible for bricked devices, dead USB drives, 
    * thermonuclear war, or you getting fired because the alarm app failed. Please 
    * do some research if you have any concerns about features included in these files 
    * before flashing them! YOU are choosing to make these modifications, and if 
    * you point the finger at me for messing up your device, I will laugh at you. */

    PART ONE [Preparing the drive]:
    This process will eventually be streamlined but for now I'll explain the process and how it relates to testing builds during development. Since the Fire TV only has an 8gb flash chip and has no hardware recovery trigger, it is quite the unforgiving device to develop on. The current boot method for my CM12 builds involves flashing over the recovery partition and using it as a sort of dualboot partition. The modified recovery partition then searches for ext4 partitions on and external (USB3 preferred) flash drive. Currently each build generates its own boot image to be flashed over recovery, but I'm currently in the process of exploring the possibility of following Rbox's method of loading a boot image from a system folder instead making only one flash to the actual device necessary going forward.

    For USB3 booting during the development process I highly recommend using a USB3 hub for a keyboard and mouse while bluetooth pairing and control mapping is being worked on. I also recommend a USB3 drive.

    1) Turn on a Linux machine or boot a Live CD
    2) Open Gparted
    3) Delete any partitions on the usb drive
    4) Create three ext4 partitions, the first partion is system and should be about 1GB, the THIRD partition is cache, and should be about 768mb with 0mb following, you should then have the middle portion empty in the display, in this SECOND partition make your data partition fill the rest of the space.

    PART TWO [Preparing the bootloader]:
    WARNING this process currently involves replacing your recovery partition, remember kids dd and root is like holding a grenade, make sure you don't throw it at something you care about.

    Also, if you are testing a build and it does not load using the previous bootloader, try flashing the latest one from the nightlies (and vise versa) as I am still in the process of stream lining the boot process as far as what should take place before system bring up on our device. If a different boot image loads the system with noticeably more stability let me know asap so I can track the causes of my current issues.

    Code:
    adb connect <STOCK FIRE TV IP>
    adb push boot-<DATE>.img /sdcard
    adb shell
    cd /sdcard
    su
    dd if=boot-<DATE>.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery

    Next I recommend side loading this apk to make rebooting into USB boot easier.

    The three most recent "boot" images have been added to the downloads section, remember these should be flashed to recovery. Although they would work in boot, that would disable Rbox's loader and prevent you from loading stock OS.

    PART THREE [Playing with instability]:
    Great so now you have a USB3 booting image flashed to your recovery partition and you have an empty flash drive. This is where the tinkering begins. In the download section you will find a .tar.gz archive with a somewhat booting system with the aforementioned issues. Inside this archive is a system.img file which you will use dd to flash to the first partition of the flash drive you formated. After the system image is flashed you can plug your flash drive into your hub and reboot into recovery. Things will be great, wifi will show up and if you're quick enough you can complete setup and make it to the launcher. (the issue I'm currently working on is an odd timed reset that may be kernel or storage related oddly if you make it to the launcher and don't touch anything, it takes longer to reset)

    If you made it this far, welcome to development. You can help by "kanging" (replacing system apk's and files with other versions to find more stable matches, or remove apks until things don't die then report back to me) Also if you make it to this point go ahead and fill out the form I mentioned earlier. Eventually any hotfix builds I do between nightly builds will be accessible to those users to play with.

    Overhauling the boot system next and working on the reset debugging.

    XDA:DevDB Information
    TechVendetta ROM Development, ROM for the Amazon Fire TV

    Contributors
    TechVendetta, rbox
    Source Code: https://github.com/TechV/android_device_amazon_bueller

    ROM OS Version: 5.0.x Lollipop
    Based On: CyanogenMod

    Version Information
    Status: Testing

    Created 2015-01-29
    Last Updated 2015-01-29
    9
    Hey,

    i've got one question for the installation:
    you use the recovery as boot partition (because you dont want to mess with the actual boot partition where the bootmenu is).
    is there a reason we cant use rbox's bootmenu, add another entry "usb boot" which will boot from /system/boot/usbboot.img ?
    Or is the only reason that this just hasnt been added by rbox so we have to use another way?

    I think this would be the most brick safe version and shouldnt be a big problem for rbox to implement....

    Chris

    [edit]
    i'm really looking forward to this :p

    Thats one of the goals I put up there, just unlike rboxs current loader I know a way to make it remote controlled. ;D I started a bit on it. The "friendly user release" will have a root installer app that will handle multiboot, formating flash drives, recovery options, updates etc.
    7
    Someone got fired at my job so I've been picking up their hours on top of my freelance work which is why things have been slow lately.

    Sent from my LG-VM670 using XDA Free mobile app
    7
    Is this project binned? Is there any work still happening on this? Thanks!

    Still working on setting up my build servers. Need to reinstall a CPU tonight to get it back up. Tldr, I moved and started a new job and have been a bit busy but am still pursuing CM on the original fire TV and hopefully it will support the second gen as well.

    Sent from my SM-G900P using XDA Free mobile app
    6
    Thank you TechVendetta =) can't wait
    I've been up for entirely too long. But I'm almost done with a very basic installer application. After a bit of testing on my end, I'll send links out to the survey takers for testing. The initial version will be a giant apk with what ever the latest nightly is, fully included in the app. It will overwrite your recovery partition which you can always reflash until I get to the multiboot manager I'm also working on.

    The second version of the installer will include flavor selection (Pure CM12 or Android TV) and rom downloading, updating and installer auto update checking. Again everything is very unstable and very little is tested right now since my days off have been scarce lately.

    Those links will probably go out in the next day and a half or so since I need to make certain everything functions in it before I send it out.