Post Reply

[Q] Chromecast command line primer

OP bobcat987

5th September 2014, 04:46 AM   |  #1  
OP Member
Thanks Meter: 33
 
57 posts
Join Date:Joined: Mar 2011
Apologies if this has already been covered but a quick search turned up nothing. I recently rooted and was wondering if there was any resource to describe the ins and outs of the chromecast shell. Specifically I wanted to know if there is a way to define a custom start up script. For the moment I would just like to auto update the PATH env variable to include my own bin directory on /data with some of the more useful busybox commands symlinked and maybe add some cooler stuff later. I've done something similar in dd-wrt with a special nvram variable to point to a script, but I don't know if there is an equivalent here. Thanks.
5th September 2014, 10:32 AM   |  #2  
Junior Member
Flag Gothenburg
Thanks Meter: 1
 
13 posts
Join Date:Joined: Aug 2014
Prompt
Quote:
Originally Posted by bobcat987

Apologies if this has already been covered but a quick search turned up nothing. I recently rooted and was wondering if there was any resource to describe the ins and outs of the chromecast shell. Specifically I wanted to know if there is a way to define a custom start up script. For the moment I would just like to auto update the PATH env variable to include my own bin directory on /data with some of the more useful busybox commands symlinked and maybe add some cooler stuff later. I've done something similar in dd-wrt with a special nvram variable to point to a script, but I don't know if there is an equivalent here. Thanks.

I think we need to edit /init.rc

but it's write protected =/
The Following User Says Thank You to Mape0661 For This Useful Post: [ View ]
5th September 2014, 12:30 PM   |  #3  
ddggttff3's Avatar
Recognized Contributor / Recognized Developer
Flag Twin Cities, MN
Thanks Meter: 1,046
 
720 posts
Join Date:Joined: Dec 2009
Donate to Me
More
Quote:
Originally Posted by bobcat987

Apologies if this has already been covered but a quick search turned up nothing. I recently rooted and was wondering if there was any resource to describe the ins and outs of the chromecast shell. Specifically I wanted to know if there is a way to define a custom start up script. For the moment I would just like to auto update the PATH env variable to include my own bin directory on /data with some of the more useful busybox commands symlinked and maybe add some cooler stuff later. I've done something similar in dd-wrt with a special nvram variable to point to a script, but I don't know if there is an equivalent here. Thanks.

Quote:
Originally Posted by Mape0661

I think we need to edit /init.rc

but it's write protected =/

You can, but you would have to do the modifications with an extracted system image, re-squashfs it back up, and then flash it back to the device.
The Following User Says Thank You to ddggttff3 For This Useful Post: [ View ]
5th September 2014, 12:39 PM   |  #4  
OP Member
Thanks Meter: 33
 
57 posts
Join Date:Joined: Mar 2011
Thanks for the replies. If I'm feeling bold this weekend I'll take a look at creating a one-off /system for this.
5th September 2014, 03:41 PM   |  #5  
Junior Member
Flag Gothenburg
Thanks Meter: 1
 
13 posts
Join Date:Joined: Aug 2014
Quote:
Originally Posted by bobcat987

Thanks for the replies. If I'm feeling bold this weekend I'll take a look at creating a one-off /system for this.

I've been writing some, gonna post it later on git if you want to see it.

mostly stuff to make it easy to start ftp, samba etc.

/mape
5th September 2014, 09:40 PM   |  #6  
Senior Member
Thanks Meter: 313
 
1,829 posts
Join Date:Joined: Dec 2007
Quote:
Originally Posted by ddggttff3

You can, but you would have to do the modifications with an extracted system image, re-squashfs it back up, and then flash it back to the device.

Seeing this you guys are making me think (always dangerous!)
Is it possible to code and inject an on device player app that could be inserted into the system (similar to Netflix) that could be triggered by another app for local playback without the need for an Internet connection?

Something like that would really increase the streaming capability for areas where Internet connection is not available.
And if the right code is found could even give local streams DHT capability if we had the ability to add those codecs to the player system.
22nd September 2014, 01:47 PM   |  #7  
Junior Member
Flag Gothenburg
Thanks Meter: 1
 
13 posts
Join Date:Joined: Aug 2014
Quote:
Originally Posted by ddggttff3

You can, but you would have to do the modifications with an extracted system image, re-squashfs it back up, and then flash it back to the device.

I've been looking at system.img from 19084.001.zip

it seems it only got this then I unsquashfs it

root@debian:~/squashfs-root# ls
bin boot chrome etc lib netflix res usr

I'm I looking in the wrong file?
22nd September 2014, 11:37 PM   |  #8  
ddggttff3's Avatar
Recognized Contributor / Recognized Developer
Flag Twin Cities, MN
Thanks Meter: 1,046
 
720 posts
Join Date:Joined: Dec 2009
Donate to Me
More
Quote:
Originally Posted by Mape0661

I've been looking at system.img from 19084.001.zip

it seems it only got this then I unsquashfs it

root@debian:~/squashfs-root# ls
bin boot chrome etc lib netflix res usr

I'm I looking in the wrong file?

if you want to modify init.rc, then you need to extract the initramfs from the kernel, modify it, repackage the initramfs, compile the kernel from src (as the default one is signed, and can't be merged with a modified initramfs), and then merge the compiled kernel with the initramfs you modified.
23rd September 2014, 07:47 AM   |  #9  
Junior Member
Flag Gothenburg
Thanks Meter: 1
 
13 posts
Join Date:Joined: Aug 2014
Quote:
Originally Posted by ddggttff3

if you want to modify init.rc, then you need to extract the initramfs from the kernel, modify it, repackage the initramfs, compile the kernel from src (as the default one is signed, and can't be merged with a modified initramfs), and then merge the compiled kernel with the initramfs you modified.

Looks like this gonna be my "children are sleeping" project for some time .-)

Well I extracted initramfs from boot.img and mounted it with cpio. At least I'm looking at the right files. I have never compiled a kernel for this kind of devices before (only for my computer) and I having trubble to cross compile, my arm compiled programs wont run on CC.

Do you got some good pages I can read and learn this stuff from?

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Google Chromecast by ThreadRank