How to Root and Unlock the Google Nexus 6 on a Mac – XDA TV

In the past, XDA Developer TV Producer droidmodd3rx has shown you how to … more

Set Up Your MediaTek Device with Comprehensive Beginner’s Guide

As can be seen with the use of MediaTek chips in Android One devices … more

Sony Updates AOSP Sources to Android 5.0.1

Just a few days ago, Sony did an utterly fantastic job by pushing out numerous device trees for … more

Stop Your Screen From Turning Off with KeepItOn

We all know the feeling of reading a news article orrather longdocument, when our screen … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP Mape0661

5th September 2014, 11:25 AM   |  #1  
OP Junior Member
Flag Gothenburg
Thanks Meter: 1
 
13 posts
Join Date:Joined: Aug 2014
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 by Mape0661; 5th September 2014 at 11:47 AM. Reason: added a line
5th September 2014, 09:57 PM   |  #2  
Member
Thanks Meter: 40
 
69 posts
Join Date:Joined: Mar 2011
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.
6th September 2014, 07:29 AM   |  #3  
OP Junior Member
Flag Gothenburg
Thanks Meter: 1
 
13 posts
Join Date:Joined: Aug 2014
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

Nice command there, handy to always have the abiliy to send files.
8th September 2014, 10:20 AM   |  #4  
Senior Member
Thanks Meter: 9
 
157 posts
Join Date:Joined: Jul 2010
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
8th September 2014, 01:34 PM   |  #5  
Member
Thanks Meter: 40
 
69 posts
Join Date:Joined: Mar 2011
Quote:
Originally Posted by fs1023

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.
8th September 2014, 08:38 PM   |  #6  
Senior Member
Thanks Meter: 9
 
157 posts
Join Date:Joined: Jul 2010
Quote:
Originally Posted by bobcat987

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
9th September 2014, 12:36 AM   |  #7  
Member
Thanks Meter: 40
 
69 posts
Join Date:Joined: Mar 2011
Quote:
Originally Posted by fs1023

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

Just push enter and you should be good.

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

Advanced Search
Display Modes