Chromecast, how to run ftp, samba, httpd, symlink new busybox, usb

Search This thread

Mape0661

Member
Aug 28, 2014
19
13
Gothenburg
Some usefull comands to chromecast

You need to download the latest busybox (v1.21.1)

search for busybox binary, it's the first hit on google. Download busybox-armv71

cd /data
busybox wget <adress to file>
mv /data/busybox-arm71 /data/busybox
chmod 777 /data/busybox

always good to run /data/busybox ash first so we can use tab again =)

FTP:
/data/busybox tcpsvd -vE 0.0.0.0 21 /data/busybox ftpd / -w & > /dev/null

Samba:
mkdir /data/samba
/data/busybox mount -t cifs //<server ip>/<share> /data/samba/ -o username=<username>,password=<password>

httpd:
mkdir /data/www
echo "A:*" > /data/httpd.conf
echo "Hello World" > /data/www/index.html
chmod -R 755 /data/httpd.conf /data/www
/data/busybox httpd -p 8000 -h /data/www -c /data/httpd.conf

Symlink to new busybox commands:
mkdir /data/bin
busybox cp /data/busybox /data/busybox/bin

create the file "/data/create" with:

#!/bin/sh
for b in $(/data/bin/busybox --list); do
ln -s /data/bin/busybox "/data/bin/${b}"
done

chmod 755 /data/create
sh /data/create

Add path:
export PATH=$PATH:/data/bin

no need to run /data/busybox vi anymore =)

USB:
I have not figured this out yet. But if you connect a usb with ota cable and run

mkdir /data/usb

/data/busybox lsusb - shows a usb but there is no device file in /dev to mount.
Bus 001 Device 002: ID 090c:1000
Bus 001 Device 001: ID 1d6b:0002

Then I run:
/data/busybox makedevs -d /deb/block/sda1 /data/usb

I get this
/data# /data/busybox makedevs -d /dev/block/sda1 /data/usb/
rootdir=/data/usb/
table='/dev/block/sda1'
makedevs: invalid line 26: 'lost+found'
makedevs: invalid line 27: '▒X'
makedevs: invalid line 28: 'Ap▒N|B▒▒^

[...] and about 40 simular lines. It's a newly formated 8 gig usb (ex4) so it's only a lost+found dir on it, as it shows above.

then I run /data/busybox fdisk -lu /dev/block/sda - I get this

Disk /dev/block/sda: 8019 MB, 8019509248 bytes
246 heads, 40 sectors/track, 1591 cylinders, total 15663104 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/block/sda1 2048 15646719 7822336 83 Linux


Anyone got a clue whats wrong and how to fix this?


Have anyone found out how to autostart scripts on boot?

/mape
 
Last edited:

bobcat987

Senior Member
Mar 31, 2011
70
40
USB worked for me. Here's what I did:

1) Inserted USB drive (fat formated). /dev/block/sda and /dev/block/sda1 were auto created and the following lines were generated in dmesg:
Code:
<6>[  211.880372] usb 1-1: new high-speed USB device number 2 using berlin-ehci
<6>[  212.033411] usb 1-1: New USB device found, idVendor=13fe, idProduct=3100
<6>[  212.033427] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
<6>[  212.033436] usb 1-1: Product: Patriot Memory
<6>[  212.033444] usb 1-1: Manufacturer:
<6>[  212.033451] usb 1-1: SerialNumber: 079B09013A4D52A8
<6>[  212.035169] scsi0 : usb-storage 1-1:1.0
<5>[  213.055504] scsi 0:0:0:0: Direct-Access              Patriot Memory   PMAP PQ: 0 ANSI: 0 CCS
<5>[  213.058011] sd 0:0:0:0: Attached scsi generic sg0 type 0
<5>[  213.760828] sd 0:0:0:0: [sda] 15646720 512-byte logical blocks: (8.01 GB/7.46 GiB)
<5>[  213.761302] sd 0:0:0:0: [sda] Write Protect is off
<7>[  213.761317] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
<3>[  213.761799] sd 0:0:0:0: [sda] No Caching mode page present
<3>[  213.767645] sd 0:0:0:0: [sda] Assuming drive cache: write through
<3>[  213.778932] sd 0:0:0:0: [sda] No Caching mode page present
<3>[  213.784735] sd 0:0:0:0: [sda] Assuming drive cache: write through
<6>[  213.811683]  sda: sda1
<3>[  213.814553] sd 0:0:0:0: [sda] No Caching mode page present
<3>[  213.820769] sd 0:0:0:0: [sda] Assuming drive cache: write through
<5>[  213.827234] sd 0:0:0:0: [sda] Attached SCSI removable disk
2) I was able to mount the drive with the following:
Code:
mkdir /data/mnt/
mount -t vfat /dev/block/sda1 /data/mnt/

I can't imagine that and ext4 formatted drive would prevent the block device from being created, but you can try to manually create it with:
Code:
mknod /dev/block/sda b 8 0
mknod /dev/block/sda1 b 8 1
and then try to mount. It may be worth trying a fat formatted drive if you have one.

---------- Post added at 08:57 PM ---------- Previous post was at 08:55 PM ----------

I'll toss out a useful command of my own. If you want to transfer files to and from the chromecast without enabling additional services, this can be done by pipelining data through the ssh command (since dropbear is minimized to exclude scp and sftp, this is the only way).

To send the local file tmp/bashrc to the chromecast's /data directory, run the following command:
Code:
cat tmp/bashrc | ssh root@chromopylae 'cat > /data/bashrc'

To download the /build.prop file from the chromecast to the local system, run the following command:
Code:
ssh root@chromopylae 'cat /build.prop' > build.prop
Permissions may need to be fixed on the transferred file.
 

Mape0661

Member
Aug 28, 2014
19
13
Gothenburg
Got it working, with both fat and fat32, Strange it did't work with any of the ext systems. Learnt many things, like not post late at night :p

Nice command there, handy to always have the abiliy to send files.
 

fs1023

Senior Member
Hi all

How woud I execute the following command in ssh.........@ /usr/share/eureka-apps/configs/apps.conf
I am trying to locate the Team Eureka whitelist. As well what is the root password for the rom, Is it my WiFi pass phrase/password?

Regards
fs1023
 

bobcat987

Senior Member
Mar 31, 2011
70
40
Hi all

How woud I execute the following command in ssh.........@ /usr/share/eureka-apps/configs/apps.conf
I am trying to locate the Team Eureka whitelist. As well what is the root password for the rom, Is it my WiFi pass phrase/password?

Regards
fs1023

If you just want to view the file, you can establish an ssh connection to execute a single command:
Code:
ssh root@chromopylae cat /usr/share/eureka-apps/configs/apps.conf
Otherwise you can view the file from an already established interactive session by running:
Code:
cat /usr/share/eureka-apps/configs/apps.conf

The root password is blank as there is no passwd file. I doesn't look like google built this with user management in mind.
 

fs1023

Senior Member
If you just want to view the file, you can establish an ssh connection to execute a single command:
Code:
ssh root@chromopylae cat /usr/share/eureka-apps/configs/apps.conf
Otherwise you can view the file from an already established interactive session by running:
Code:
cat /usr/share/eureka-apps/configs/apps.conf

The root password is blank as there is no passwd file. I doesn't look like google built this with user management in mind.

Thanks for the reply bobcat987. I am struggling. Tried to ssh connection with commands you gave me but putty is asking for a password.
Can you please help once again?

Regards
fs1023