独孤良 发表于 2014-1-13 17:44

天猫魔盒上配置ssh服务和samba服务

本帖最后由 独孤良 于 2014-1-13 18:25 编辑

[注意,以下操作可能导致无法恢复的故障,请确认你清楚自己的操作]


1.天猫魔盒必须先ROOT            传送门:https://www.znds.com/tv-37670-1-1.html

2.安装Samba Filesharing                  

3.安装Quicksshd                               

4.运行Samba Filesharing,退出后修改/data/data/com.funkyfresh.samba/files/smb.conf 如下


复制代码
# Auto-generated by com.funkyfresh.samba
#
#
# smb.conf last written on 2013-12-05_09-35-43app build 111107m
#
#
# Manual edits of smb.conf are not supported.
#
#
# Sharing of non FAT based filesystems is unsupported. Do so at your own peril.
#
#

interfaces = wlan0 eth0
bind interfaces only = no
workgroup = WORKGROUP
server string = Samba on Android
netbios name = MYBOX
remote announce = 255.255.255.255
encrypt passwords = yes
security = USER
restrict anonymous = 1
load printers = no
printcap name = /dev/null
disable spoolss = yes
deadtime = 5
delete readonly = yes
nt acl support = no
inherit permissions = yes
socket options = SO_SNDBUF=16384 SO_RCVBUF=16384
local master = no
unix extensions = yes

comment = root file system
path = /
force user = root
read only = no
writable = yes
guest ok = no
#
#vfs objects = fake_perms
#comment = Android /storage/emulated/0
#path = /storage/emulated/0
#force user = root
#read only = no
#writable = yes
#guest ok = no

comment = mobile disk
path = /storage/
force user = root
read only = no
writable = yes
guest ok = no

5.添加启动脚本/data/sysme/startsamba
复制代码
#!/system/bin/sh
killall smbd
/data/data/com.funkyfresh.samba/files/smbd -D &


6.用/data/data/com.funkyfresh.samba/files/smbpasswdbin 添加samba用户密码
7.运行quicksshd
8.移动/data/data/com.......quciksshd/的核心文件到/data/dropbear,因为软件已经卸载掉了,不记得具体文件名,这个简单,看一下就知道了
9.进入/data/dropbear文件夹,重命名 dropbear_dss_key,dropbear_rsa_key分别为dropbear_dss_host_key,dropbear_rsa_host_key
10.创建sshd启动文件/data/dropbear/startssh
复制代码
#!/system/bin/sh
killall dropbear
/data/dropbear/dropbear -p 22 -Y -H /data/sysme &

11.创建自启动脚本/data/rc.me,用来启动samba和sshd,也方便以后添加别的服务
复制代码
#!/system/bin/sh
#/data/sysme/killtask
/data/dropbear/startssh &
/data/sysme/startsamba &

12.adb重新mount /system为rw模式,具体自己百度
修改 /system/etc/yunos_sensor_init.sh,在/system/bin/input_boost_helper&上面一行添加/data/rc.me &,修改好之后最后几行应该是如下
复制代码
............................
/data/rc.me &
/system/bin/input_boost_helper&
echo "start input_boost"
/data/yunos/bin/input_boost

13.至此,重启后因该可以ssh到22端口了,samba也应该可以访问

卸载掉quicksshd




小雨 发表于 2014-1-13 18:27

{znds1} 好牛B啊。。。顶起来

w2324 发表于 2014-1-13 18:57

很给力,ZNDS有你更精彩!

vov 发表于 2014-1-13 19:26

SSH,给力!

iceof001 发表于 2014-1-13 20:57

楼主威武啊,ZNDS有你更给力!

pyromania 发表于 2014-1-13 21:06

SSH,给力!

eddys188 发表于 2014-1-13 21:09

这个帖子很眼熟啊,嘻嘻

eddys188 发表于 2014-1-13 21:09

这个帖子很眼熟啊,嘻嘻

newxcb 发表于 2014-1-13 21:36

samba可以用就好了。。。SSH已经有了

酷乐 发表于 2014-1-14 11:29

支持啊
页: [1] 2
查看完整版本: 天猫魔盒上配置ssh服务和samba服务