推荐当贝市场

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 128806|回复: 69

[教程] 在魔盒上配置ssh服务和samba服务教程

 火.. [复制链接]
发表于 2015-2-28 19:58 | 显示全部楼层 |阅读模式
本帖最后由 jhddxb 于 2015-2-28 19:59 编辑

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


1.ROOT设备
2.安装Samba Filesharing(com.funkyfresh.samba)
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-43  app build 111107m
  • #
  • #
  • # Manual edits of smb.conf are not supported.
  • #
  • #
  • # Sharing of non FAT based filesystems is unsupported. Do so at your own peril.
  • #
  • #
  • [global]
  • 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
  • [system]
  • comment = root file system
  • path = /
  • force user = root
  • read only = no
  • writable = yes
  • guest ok = no
  • #[sdcard]
  • #vfs objects = fake_perms
  • #comment = Android /storage/emulated/0
  • #path = /storage/emulated/0
  • #force user = root
  • #read only = no
  • #writable = yes
  • #guest ok = no
  • [mobile]
  • 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 [password] -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模式,具体google
修改 /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也应该可以访问
14.以下可选:卸载掉quicksshd

我这是第一次用android类系统,不了解系统运行的流程的,摸索着进行的,肯定不是最合理的方法,希望有熟悉android系统的提出更好的方案。
发表于 2015-3-1 15:57 | 显示全部楼层
t8xa
回复 顶一个 踩

使用道具 举报

发表于 2015-3-1 18:31 | 显示全部楼层
看看能用不
强烈支持楼主ing……
回复 顶一个 踩

使用道具 举报

发表于 2015-3-1 19:29 | 显示全部楼层
精华内容,楼主V5!
回复 顶一个 踩

使用道具 举报

发表于 2015-3-1 21:02 | 显示全部楼层
感谢楼主,果断mark!攒点人品再说
回复 顶一个 踩

使用道具 举报

发表于 2015-3-1 22:31 | 显示全部楼层
精华内容,楼主V5!
回复 顶一个 踩

使用道具 举报

发表于 2015-3-2 17:40 | 显示全部楼层
很给力,ZNDS有你更精彩!
回复 顶一个 踩

使用道具 举报

发表于 2015-3-16 18:20 | 显示全部楼层
看看是什么
回复 顶一个 踩

使用道具 举报

发表于 2015-5-20 00:13 | 显示全部楼层
强烈支持楼主ing……
回复 顶一个 踩

使用道具 举报

发表于 2015-5-20 06:21 来自ZNDS手机版 | 显示全部楼层
咯欧漏她啊来啦啊咯
回复 顶一个 踩

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐上一条 /2 下一条

Archiver|小黑屋|新帖|标签|软件|Sitemap|ZNDS智能电视网 ( 苏ICP备2023012627号 )

GMT+8, 2026-11-8 07:12 , Processed in 0.038256 second(s), 7 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表