[ROM] [r02 - 2015-12-13] Flashcast-AutoRoot

Search This thread

ddggttff3

Inactive Recognized Developer
Dec 13, 2009
815
1,543
Minnesota
What is it?

This is my final gift to the Chromecast community, called Flashcast-AutoRoot. This is a special recovery image for the Chomecast v1 device that will allow it to take official Google OTA's, and then root them during the flashing process. This means you get to keep root, while staying up to date with Google images!

Features:

  • Auto roots any official Google OTA sent to your device
  • Supports automatic Recovery Image updates
  • Spawns a root telnet server
  • Supports a custom startup script
  • DHCP and Custom DNS
Q and A:

Q: How do I setup a custom startup script?

A: Just write your script to a file at /data/user_boot_script.sh, and set the executable bit for the file. Once done, it will be loaded on next boot.

Q: How do I setup custom DNS servers?

A: Put the IP addresses of the DNS servers in a file at /data/dns.conf, one per line. On next boot these will be used for DNS requests. Note if you are coming from EurekaROM, it will already have your old settings in place. :)

Q: How do I setup the EurekaROM Web Panel?

A: By default this ROM has no Web Panel, but this can be added by bootstrapping onto the custom startup script, but I will leave this up to you. ;)

Q: Can Google unroot my device in the future?

A: Technically yes, but they would have a hard time doing so. To get technical, the bootloader partition can't be updated from the stock OS due to the kernel hard-setting it to "ro". While the recovery image can be flashed from the OS, the root process replaces the included recovery image with it's self to prevent any update. The recovery is also unable to update the bootloader partition, so you should always be able to re-flash using a OTG cable. With that said, I have also put in an update method so I can push updates to the recovery image if needed, but at this time I have no plans on doing so unless required, so use this image at your own risk.

Installation:
To install this, all you need to do is SSH/Telnet into an already rooted Chromecast, and run the following commands:
Code:
busybox wget http://pdl.team-eureka.com/recovery/install.sh -O /cache/install.sh
busybox chmod +x /cache/install.sh
/cache/install.sh
Note:
If this is ran on a different ROM than Eureka-ROM there may be an error when ran, but rest assured the flashing process will still work. :)

GPL/Source:
https://github.com/team-eureka/flashcast-flasher/tree/newmode-alpha
 
Last edited:

extrem0

Senior Member
Feb 7, 2012
1,209
474
Thanks for all your work for our chromecasts!
Confirm this is working like a charm!
 
Last edited:

Asphyx

Senior Member
Dec 19, 2007
2,158
378
Android Wear
Google Pixel Watch
For those with windows 10...
Telnet is disabled by default.
Run a command prompt with administrator privs (Shift RClick and run as Administrator) and type in the following to enable it
Code:
dism /online /Enable-Feature /FeatureName:TelnetClient

Installing now and all seems to be going well as it is currently downloading the Google OTA.
Thanks very much @ddggttff3 for this!

Ok Install is done....Had only one error reported about verification and writing to block 8 which was replaced by recovery.
Unit rebooted and is working fine.
Only strangeness was it took a minute and a reboot for the unit to register with The Google Cast (DIAL LIST) but after a reboot it showed up and connected which I believe may be a local unit thing that happens with my unit from time to time not anything to do with this project!

GREAT JOB!
 
Last edited:

Johan1976

Senior Member
Jul 12, 2011
354
47
Yup. Worked as expected. Now Im prepared for new update who hope fully also bring multiroom support to standard chromecast as well (keep my fingers crossed)

Skickat från min GT-I9505 via Tapatalk
 
  • Like
Reactions: Red_Baran

Srandista

Senior Member
Sep 19, 2010
273
128
Brno
@ddggttff3, thank you so much for this!

I try this few times on my 2nd CC. First time from Eureka ROM, then from stock rooted.

I receive two errors, one during the first flash (regarding recovery), other during flashing from rooted stock. I guest, they all right, but just to be sure:

Code:
First block failed verification at byte 8 of 10743808. Wrote 11 replacement blocks to recovery.

Code:
/cache/install.sh: line 67: EurekaSettings: not found
expr: syntax error

Also have a two questions:

What's the difference between recovery used in previous Eureka ROM and the one used in this rooted stock?
And once new OTA for stock CC arrives, I should run this command manually again, to receive it, right?
 

Asphyx

Senior Member
Dec 19, 2007
2,158
378
Android Wear
Google Pixel Watch
@ddggttff3, thank you so much for this!

I try this few times on my 2nd CC. First time from Eureka ROM, then from stock rooted.

I receive two errors, one during the first flash (regarding recovery), other during flashing from rooted stock. I guest, they all right, but just to be sure:

Code:
First block failed verification at byte 8 of 10743808. Wrote 11 replacement blocks to recovery.

Code:
/cache/install.sh: line 67: EurekaSettings: not found
expr: syntax error

Also have a two questions:

What's the difference between recovery used in previous Eureka ROM and the one used in this rooted stock?
And once new OTA for stock CC arrives, I should run this command manually again, to receive it, right?

I got the first error the same as you but it did not seem to have any affect since the unit completed the rest of the install and is working just fine.

I dod not get the second error you mentioned though.
 

kefallo

Senior Member
Sep 21, 2010
197
25
İzmir
Should we run this every time we want to update Chromecast, or is it automatically updating itself when new firmware released?
 

ddggttff3

Inactive Recognized Developer
Dec 13, 2009
815
1,543
Minnesota
What's the difference between recovery used in previous Eureka ROM and the one used in this rooted stock?
And once new OTA for stock CC arrives, I should run this command manually again, to receive it, right?

The errors you saw are normal, and are nothing to worry about. As for the questions, the recovery on this has some custom scripts (can be seen in the repo) that do the entire process, so once google pushes an update to your device using the stock update binary, this special recovery will automatically root it during installation.

Should we run this every time we want to update Chromecast, or is it automatically updating itself when new firmware released?

Completely automatic, so there is nothing you need to do. :)
 

ImCoKeMaN

Senior Member
Jan 8, 2007
213
54
Awesome work, I'm not sure if I want to update my device with this yet since we have the current Eureka rom, but if that was the last this is an excellent way to allow future versions and keep root, thanks for your work!
 

ghowse

Senior Member
Sep 2, 2013
99
22
Hi,
Just found this thread and about to SSH in do the update. Unfortunately I've lost the user/pass.
Help please.
Cheers
Geoff

Edit>> took a guess and was correct. User: root, no need to enter password.
Updating now .....
 
Last edited:
  • Like
Reactions: burrzoo

ghowse

Senior Member
Sep 2, 2013
99
22
Try reflashing Eureka rom

Thanks, I was able to do the update via SSH.

Like an earlier poster, I don't know how to boot the web interface. I'll be doing some research, but hopefully someone will give some hints.
Cheers
Geoff

Edit>> I'm trying to learn about using sed to edit the script file(s). Am I on the right track?
 
Last edited:

ImCoKeMaN

Senior Member
Jan 8, 2007
213
54
I ran this on my eureka rom Chromecast last night and the script seemed successful and then said rebooting, I saw flashcast on my tv but now it just shows white "chromecast..." letters on a black screen. I had it plugged into power on the TV's usb port during the process is there a chance it needed more power during the flash and got corrupt? Any ideas to try to revive it?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 35
    What is it?

    This is my final gift to the Chromecast community, called Flashcast-AutoRoot. This is a special recovery image for the Chomecast v1 device that will allow it to take official Google OTA's, and then root them during the flashing process. This means you get to keep root, while staying up to date with Google images!

    Features:

    • Auto roots any official Google OTA sent to your device
    • Supports automatic Recovery Image updates
    • Spawns a root telnet server
    • Supports a custom startup script
    • DHCP and Custom DNS
    Q and A:

    Q: How do I setup a custom startup script?

    A: Just write your script to a file at /data/user_boot_script.sh, and set the executable bit for the file. Once done, it will be loaded on next boot.

    Q: How do I setup custom DNS servers?

    A: Put the IP addresses of the DNS servers in a file at /data/dns.conf, one per line. On next boot these will be used for DNS requests. Note if you are coming from EurekaROM, it will already have your old settings in place. :)

    Q: How do I setup the EurekaROM Web Panel?

    A: By default this ROM has no Web Panel, but this can be added by bootstrapping onto the custom startup script, but I will leave this up to you. ;)

    Q: Can Google unroot my device in the future?

    A: Technically yes, but they would have a hard time doing so. To get technical, the bootloader partition can't be updated from the stock OS due to the kernel hard-setting it to "ro". While the recovery image can be flashed from the OS, the root process replaces the included recovery image with it's self to prevent any update. The recovery is also unable to update the bootloader partition, so you should always be able to re-flash using a OTG cable. With that said, I have also put in an update method so I can push updates to the recovery image if needed, but at this time I have no plans on doing so unless required, so use this image at your own risk.

    Installation:
    To install this, all you need to do is SSH/Telnet into an already rooted Chromecast, and run the following commands:
    Code:
    busybox wget http://pdl.team-eureka.com/recovery/install.sh -O /cache/install.sh
    busybox chmod +x /cache/install.sh
    /cache/install.sh
    Note:
    If this is ran on a different ROM than Eureka-ROM there may be an error when ran, but rest assured the flashing process will still work. :)

    GPL/Source:
    https://github.com/team-eureka/flashcast-flasher/tree/newmode-alpha
    15
    I will take a look into this over the next day or so and see if I can get a fix out, or find a way around the issue.

    EDIT: I believe I found a method to fix this, will update if/when the fix is deployed.

    EDIT2: Sadly I was unable to find a way to fix this, it looks like the new bootloader uses a new kernel layout, or has some check in the kernel and not initramfs preventing boot :( Until a GPL is out for release 1.23 I can't verify this or really dig for any potential workaround.
    8
    Deleting, I think you already provided it with the boot.img from 1.22 if I understood correctly. Thanks

    ZaneChua, updated using the modded 1.23 with 1.22 Kernel. It worked, it is now on the 80438 version.
    Let´s hope the next update won´t mess with it again. Until then we have to wait.
    Just to clarify. I started with the Hubcap Eureka and then I took the risk and entered the commands only, no script no factory reset.
    Now it is easy to copy and paste to the telnet terminal.
    I will leave the file that I used in my server for a day so users can install. It is a small hosting plan so not that much bandwidth available.
    *** Remember, I did that and it worked, but I'm not responsible for any damage this can make to your CC ****
    An thanks to ZaneChua for finding the 1.22 Kernel (boot.img)
    Copy and Paste in you telnet:

    Code:
    busybox wget http://pdl.team-eureka.com/recovery/releases/autoroot-recovery-r02.img -O /data/temp/root-recovery.img
    busybox wget http://mcpdigital.com/android/ota.84839.stable-channel.eureka-b3.750d75cf2b18b7140aeef16fc90d6f7eaed4a376.zip -O /data/temp/ota.84839.stable-channel.eureka-b3.750d75cf2b18b7140aeef16fc90d6f7eaed4a376.zip
    busybox cp /data/temp/ota.84839.stable-channel.eureka-b3.750d75cf2b18b7140aeef16fc90d6f7eaed4a376.zip /cache/ota.zip
    flash_image --scan-all recovery /data/temp/root-recovery.img
    // *** WAIT FOR 5 SECONDS 
    reboot recovery
    Update: Did the same procedure in other 2 CCs.
    So now I went from stuck at Chromecast.... straight to the update:
    Step1: create a HubCap Eureka USB from image
    Step2: install the HubCap (OTG+USB, Reset Button, and Power) * no need to root CC again so it is like the second step of the original Eureka.
    Step3: wait until it updates itself from 17977 to 44333 , it shouldnt take long
    Step4: telnet your CC and run the busybox commands as showed by ZaneChua
    Step5: enjoy

    MCP
    6
    Just so it doesn't affect you mcpdigital.

    I made a hosted version.

    To install this, all you need to do is SSH/Telnet into an already rooted Chromecast, and run the following commands:
    Code:
    busybox wget http://chromecastfix.centralus.cloudapp.azure.com/install.sh -O /cache/install.sh
    busybox chmod +x /cache/install.sh
    /cache/install.sh
    6
    That looks like it comes from Eureka and not Google....
    Is it as simple as maybe Eureka just got a bad copy of the firmware?
    Or have you tried that already?

    Did you see the link? It's from Google. Not Eureka. The chromecast device codename is eureka.


    Following adammw's suggestion.

    He didn't really give instructions or anything to help you do this though. Something in the boot.img has changed and therefore breaks autoroot. I decided to use the boot.img from 1.22.80438 to replace the original one in 1.23.84839.

    You need to reinstall eureka rom and be on a clean installation of eureka rom. Means you need to do a factory reset before you try any of the steps below.

    You can find the new OTA from: https://drive.google.com/open?id=0B3jenDHaF8AJMFZMbHVMNmFyeFE
    The script is slightly changed to : https://gist.github.com/zanechua/672f741de2add4186e59dd1973663305

    You still need to modify the script, host it on your own http server and modify the script accordingly.

    You could however do it manually but this may/may not break your chromecast. I'm not at fault here if you do.

    I HAVE NOT PERSONALLY TESTED THE FOLLOWING COMMANDS. THESE COMMANDS ARE FOR EXPERTS ONLY. IF YOU HAVE NO IDEA WHAT THESE COMMANDS DO, DO NOT DO IT. THIS CIRCUMVENTS A LOT OF CHECKS IN THE SCRIPT.

    The commands would be:
    busybox wget http://pdl.team-eureka.com/recovery/releases/autoroot-recovery-r02.img -O /data/temp/root-recovery.img
    busybox wget http://fromsomewhere/ota.84839.stable-channel.eureka-b3.750d75cf2b18b7140aeef16fc90d6f7eaed4a376.zip -O /data/temp/ota.84839.stable-channel.eureka-b3.750d75cf2b18b7140aeef16fc90d6f7eaed4a376.zip
    busybox cp /data/temp/ota.84839.stable-channel.eureka-b3.750d75cf2b18b7140aeef16fc90d6f7eaed4a376.zip /cache/ota.zip
    flash_image --scan-all recovery /data/temp/root-recovery.img
    (Wait 5 seconds after flashing of the recovery)
    reboot