Guest User

Untitled

a guest
Jul 21st, 2014
187
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [~]$ telnet 192.168.2.15 23
  2. Trying 192.168.2.15...
  3. Connected to 192.168.2.15.
  4. Escape character is '^]'.
  5.  
  6. Welcome to the Mer/SailfishOS Boat loader debug init system.
  7.  
  8. Log so far is in /init.log
  9.  
  10. You may inject commands into init shell process (PID 1):
  11.  
  12. To see output of commands as they're injected:
  13. tail -f /init.log &
  14. To run a command:
  15. echo "ls -l /" >/init-ctl/stdin
  16.  
  17. (Be careful if you experiment with exec as you need to terminate
  18. daemons and disable busybox hotplug handling)
  19.  
  20. To allow init to continue:
  21. echo "continue" >/init-ctl/stdin
  22.  
  23. The init script also functions as a post-switch_root debugger too:
  24. cp /init /target/init-debug
  25. (When run post-switch_root, telnet is on port 2323, not 23)
  26.  
  27. In order to work safely with the device's mmc you should
  28. echo "umount_stowaways" >/init-ctl/stdin
  29.  
  30. Then you can mount and modify exported mass storage on host. When done
  31. echo "mount_stowaways" >/init-ctl/stdin
  32.  
  33.  
  34. ~ # cat /init.log
  35. + echo Running Mer Boat Loader
  36. Running Mer Boat Loader
  37. + BOOTLOGO=
  38. + ALWAYSDEBUG=1
  39. + DATA_PARTITION=/dev/mmcblk0p13
  40. + DEFAULT_OS=sailfishos
  41. + export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
  42. + USB_FUNCTIONS=rndis
  43. + ANDROID_USB=/sys/class/android_usb/android0
  44. + LOCAL_IP=192.168.2.15
  45. + DONE_SWITCH=no
  46. + [ /init = /init-debug ]
  47. + [ no = no ]
  48. + EXPLICIT_BUSYBOX=
  49. + TELNET_DEBUG_PORT=23
  50. + /bin/busybox --install -s
  51. + date
  52. Mon Jul 21 14:12:45 GMT 2014
  53. + do_mount_devprocsys
  54. + echo ########################## mounting devprocsys
  55. ########################## mounting devprocsys
  56. + mkdir /dev
  57. mkdir: can't create directory '/dev': File exists
  58. + mount -t devtmpfs devtmpfs /dev
  59. + mkdir /dev/pts
  60. + mount -t devpts devpts /dev/pts
  61. + mkdir /proc
  62. + mkdir /sys
  63. + mount -t sysfs sysfs /sys
  64. + mount -t proc proc /proc
  65. + do_hotplug_scan
  66. + echo /sbin/mdev
  67. + mdev -s
  68. + sleep 2
  69. + ln -s . /dev/block
  70. + ln -s /proc/mounts /etc/mtab
  71. + check_kernel_config
  72. + echo Checking kernel config
  73. Checking kernel config
  74. + [ ! -e /proc/config.gz ]
  75. + zcat /proc/config.gz
  76. + grep -E ^CONFIG_CGROUPS=y$
  77. CONFIG_CGROUPS=y
  78. + grep -E ^CONFIG_AUTOFS4_FS=y$
  79. + zcat /proc/config.gz
  80. CONFIG_AUTOFS4_FS=y
  81. + grep -E ^CONFIG_DEVTMPFS_MOUNT=y$
  82. + zcat /proc/config.gz
  83. CONFIG_DEVTMPFS_MOUNT=y
  84. + grep -E ^CONFIG_DEVTMPFS=y$
  85. + zcat /proc/config.gz
  86. CONFIG_DEVTMPFS=y
  87. + grep -E ^CONFIG_UNIX=y$
  88. + zcat /proc/config.gz
  89. CONFIG_UNIX=y
  90. + grep -E ^CONFIG_HOTPLUG=y$
  91. + zcat /proc/config.gz
  92. CONFIG_HOTPLUG=y
  93. + grep -E ^CONFIG_INOTIFY_USER=y$
  94. + zcat /proc/config.gz
  95. CONFIG_INOTIFY_USER=y
  96. + grep -E ^CONFIG_SYSVIPC=y$
  97. + zcat /proc/config.gz
  98. CONFIG_SYSVIPC=y
  99. + grep -E ^CONFIG_NET=y$
  100. + zcat /proc/config.gz
  101. CONFIG_NET=y
  102. + grep -E ^CONFIG_PROC_FS=y$
  103. + zcat /proc/config.gz
  104. CONFIG_PROC_FS=y
  105. + grep -E ^CONFIG_SIGNALFD=y$
  106. + zcat /proc/config.gz
  107. CONFIG_SIGNALFD=y
  108. + grep -E ^CONFIG_SYSFS=y$
  109. + zcat /proc/config.gz
  110. CONFIG_SYSFS=y
  111. + grep -E ^CONFIG_TMPFS_POSIX_ACL=y$
  112. + zcat /proc/config.gz
  113. CONFIG_TMPFS_POSIX_ACL=y
  114. + grep -E ^CONFIG_VT=y$
  115. + zcat /proc/config.gz
  116. CONFIG_VT=y
  117. + grep -E ^CONFIG_ANDROID_LOW_MEMORY_KILLER=y$
  118. + zcat /proc/config.gz
  119. + grep -E ^CONFIG_ANDROID_PARANOID_NETWORK=y$
  120. + zcat /proc/config.gz
  121. + grep -E ^CONFIG_DUMMY=y$
  122. + zcat /proc/config.gz
  123. + grep -E ^CONFIG_SYSFS_DEPRECATED=y$
  124. + zcat /proc/config.gz
  125. + bootsplash
  126. + [ x = x1 ]
  127. + mount_stowaways
  128. + echo ########################## mounting stowaways
  129. ########################## mounting stowaways
  130. + [ ! -z /dev/mmcblk0p13 ]
  131. + mkdir /data
  132. + mkdir /target
  133. + mount /dev/mmcblk0p13 /data
  134. + mount --bind /data/.stowaways/sailfishos /target
  135. + mkdir /target/data
  136. + mount --bind /data /target/data
  137. + mount
  138. rootfs on / type rootfs (rw)
  139. devtmpfs on /dev type devtmpfs (rw,relatime,size=195212k,nr_inodes=48803,mode=755)
  140. devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
  141. sysfs on /sys type sysfs (rw,relatime)
  142. proc on /proc type proc (rw,relatime)
  143. /dev/mmcblk0p13 on /data type ext4 (rw,relatime,data=ordered)
  144. /dev/mmcblk0p13 on /target type ext4 (rw,relatime,data=ordered)
  145. /dev/mmcblk0p13 on /target/data type ext4 (rw,relatime,data=ordered)
  146. + DBG_REASON=
  147. + [ -e /diagnosis.log ]
  148. + get_opt bootmode
  149. + cat /proc/cmdline
  150. + cut -d= -f2
  151. + echo androidboot.hardware=huawei
  152. + grep ^bootmode=*
  153. + cut -d= -f2
  154. + grep ^bootmode=*
  155. + echo bootmode=debug
  156. + cut -d= -f2
  157. + grep ^bootmode=*
  158. + echo androidboot.mode=boot
  159. + cut -d= -f2
  160. + grep ^bootmode=*
  161. + echo androidboot.localproppath=channel/europe
  162. + cut -d= -f2
  163. + grep ^bootmode=*
  164. + echo usb.pid.index=25
  165. + cut -d= -f2
  166. + grep ^bootmode=*
  167. + echo usb.serial=F83DFFB84715
  168. + cut -d= -f2
  169. + grep ^bootmode=*
  170. + echo androidboot.serialno=F83DFFB84715
  171. + cut -d= -f2
  172. + grep ^bootmode=*
  173. + echo androidboot.network=umts
  174. + cut -d= -f2
  175. + grep ^bootmode=*
  176. + echo androidboot.swtype=normal
  177. + cut -d= -f2
  178. + grep ^bootmode=*
  179. + echo androidboot.platform=msm7627a
  180. + cut -d= -f2
  181. + grep ^bootmode=*
  182. + echo androidboot.emmc=true
  183. + cut -d= -f2
  184. + grep ^bootmode=*
  185. + echo androidboot.baseband=msm
  186. + [ debug = debug ]
  187. + DBG_REASON=bootmode=debug on kernel command line
  188. + [ x1 = x1 ]
  189. + DBG_REASON=Always debug: rndis + mass_storage
  190. + [ -f /target/init_enter_debug ]
  191. + [ Always debug: rndis + mass_storage = ]
  192. + lun=/sys/class/android_usb/f_mass_storage/lun/file
  193. + [ -f /sys/class/android_usb/f_mass_storage/lun/file ]
  194. + lun=/sys/class/android_usb/f_mass_storage/lun0/file
  195. + [ -f /sys/class/android_usb/f_mass_storage/lun0/file ]
  196. + echo /dev/mmcblk0
  197. + USB_FUNCTIONS=rndis,mass_storage
  198. + run_debug_session Always debug: rndis + mass_storage
  199. + CUSTOMPRODUCT=Always
  200. + echo ########################## Debug session : Always
  201. ########################## Debug session : Always
  202. + usb_setup Mer Debug setting up (DONE_SWITCH=no)
  203. + write /sys/class/android_usb/android0/enable 0
  204. + echo -n 0
  205. + write /sys/class/android_usb/android0/functions
  206. + echo -n
  207. + write /sys/class/android_usb/android0/enable 1
  208. + echo -n 1
  209. + usleep 500000
  210. + write /sys/class/android_usb/android0/enable 0
  211. + echo -n 0
  212. + write /sys/class/android_usb/android0/idVendor 18D1
  213. + echo -n 18D1
  214. + write /sys/class/android_usb/android0/idProduct D001
  215. + echo -n D001
  216. + write /sys/class/android_usb/android0/iManufacturer Mer Boat Loader
  217. + echo -n Mer Boat Loader
  218. + write /sys/class/android_usb/android0/iProduct Always
  219. + echo -n Always
  220. + write /sys/class/android_usb/android0/iSerial Mer Debug setting up (DONE_SWITCH=no)
  221. + echo -n Mer Debug setting up (DONE_SWITCH=no)
  222. + write /sys/class/android_usb/android0/functions rndis,mass_storage
  223. + echo -n rndis,mass_storage
  224. + write /sys/class/android_usb/android0/enable 1
  225. + echo -n 1
  226. + USB_IFACE=notfound
  227. + /sbin/ifconfig usb0 192.168.2.15
  228. ifconfig: SIOCSIFADDR: No such device
  229. + /sbin/ifconfig rndis0 192.168.2.15
  230. + USB_IFACE=rndis0
  231. + /sbin/ifconfig
  232. rndis0 Link encap:Ethernet HWaddr 1E:6A:7D:0B:A1:F0
  233. inet addr:192.168.2.15 Bcast:192.168.2.255 Mask:255.255.255.0
  234. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  235. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  236. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  237. collisions:0 txqueuelen:1000
  238. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
  239.  
  240. + [ xrndis0 = xnotfound ]
  241. + echo start 192.168.2.20
  242. + echo end 192.168.2.90
  243. + echo lease_file /var/udhcpd.leases
  244. + echo interface rndis0
  245. + echo ########################## starting dhcpd
  246. ########################## starting dhcpd
  247. + udhcpd
  248. + set_welcome_msg
  249. + cat
  250. + echo ########################## starting telnetd
  251. ########################## starting telnetd
  252. + telnetd -p 23 -l /bin/sh
  253. + usb_info Mer Debug telnet on port 23 on rndis0 192.168.2.15 - also running udhcpd
  254. + echo ########################## usb_info: Mer Debug telnet on port 23 on rndis0 192.168.2.15 - also running udhcpd
  255. ########################## usb_info: Mer Debug telnet on port 23 on rndis0 192.168.2.15 - also running udhcpd
  256. + sleep 1
  257. + write /sys/class/android_usb/android0/iSerial Mer Debug telnet on port 23 on rndis0 192.168.2.15 - also running udhcpd
  258. + echo -n Mer Debug telnet on port 23 on rndis0 192.168.2.15 - also running udhcpd
  259. + ps -wlT
  260. S UID PID PPID VSZ RSS TTY STIME TIME CMD
  261. S 0 1 0 884 288 0:0 14:12 00:00:01 {init} /bin/sh /init
  262. S 0 2 0 0 0 0:0 14:12 00:00:00 [kthreadd]
  263. S 0 3 2 0 0 0:0 14:12 00:00:00 [ksoftirqd/0]
  264. S 0 4 2 0 0 0:0 14:12 00:00:00 [kworker/0:0]
  265. D 0 5 2 0 0 0:0 14:12 00:00:00 [kworker/u:0]
  266. S 0 6 2 0 0 0:0 14:12 00:00:00 [kDevCheckd]
  267. S 0 7 2 0 0 0:0 14:12 00:00:00 [khelper]
  268. S 0 8 2 0 0 0:0 14:12 00:00:00 [kdevtmpfs]
  269. S 0 9 2 0 0 0:0 14:12 00:00:00 [suspend_sys_syn]
  270. S 0 10 2 0 0 0:0 14:12 00:00:00 [suspend]
  271. S 0 11 2 0 0 0:0 14:12 00:00:00 [irq/21-msmdatam]
  272. S 0 12 2 0 0 0:0 14:12 00:00:00 [sync_supers]
  273. S 0 13 2 0 0 0:0 14:12 00:00:00 [bdi-default]
  274. S 0 14 2 0 0 0:0 14:12 00:00:00 [kblockd]
  275. S 0 15 2 0 0 0:0 14:12 00:00:00 [khubd]
  276. S 0 16 2 0 0 0:0 14:12 00:00:00 [l2cap]
  277. S 0 17 2 0 0 0:0 14:12 00:00:00 [a2mp]
  278. S 0 18 2 0 0 0:0 14:12 00:00:00 [iewq]
  279. S 0 19 2 0 0 0:0 14:12 00:00:00 [modem_notifier]
  280. S 0 20 2 0 0 0:0 14:12 00:00:00 [smd_channel_clo]
  281. S 0 21 2 0 0 0:0 14:12 00:00:00 [smsm_cb_wq]
  282. S 0 22 2 0 0 0:0 14:12 00:00:00 [kworker/0:1]
  283. S 0 23 2 0 0 0:0 14:12 00:00:00 [kworker/u:1]
  284. S 0 24 2 0 0 0:0 14:12 00:00:00 [rpcrouter]
  285. S 0 25 2 0 0 0:0 14:12 00:00:00 [rpcrotuer_smd_x]
  286. S 0 26 2 0 0 0:0 14:12 00:00:00 [kworker/u:2]
  287. S 0 27 2 0 0 0:0 14:12 00:00:00 [krpcserversd]
  288. S 0 28 2 0 0 0:0 14:12 00:00:00 [msm_adsp_probe]
  289. D 0 29 2 0 0 0:0 14:12 00:00:00 [voicememo_rpc]
  290. S 0 30 2 0 0 0:0 14:12 00:00:00 [kadspd]
  291. D 0 31 2 0 0 0:0 14:12 00:00:00 [krmt_storagecln]
  292. D 0 32 2 0 0 0:0 14:12 00:00:00 [krmt_storagecln]
  293. S 0 33 2 0 0 0:0 14:12 00:00:00 [rmt_storage]
  294. S 0 34 2 0 0 0:0 14:12 00:00:00 [khungtaskd]
  295. S 0 35 2 0 0 0:0 14:12 00:00:00 [kswapd0]
  296. S 0 36 2 0 0 0:0 14:12 00:00:00 [ksmd]
  297. S 0 37 2 0 0 0:0 14:12 00:00:00 [fsnotify_mark]
  298. S 0 38 2 0 0 0:0 14:12 00:00:00 [crypto]
  299. S 0 51 2 0 0 0:0 14:12 00:00:00 [mdp_dma_wq]
  300. S 0 52 2 0 0 0:0 14:12 00:00:00 [mdp_vsync_wq]
  301. S 0 53 2 0 0 0:0 14:12 00:00:00 [mdp_pipe_ctrl_w]
  302. S 0 54 2 0 0 0:0 14:12 00:00:00 [k_hsuart]
  303. S 0 55 2 0 0 0:0 14:12 00:00:00 [diag_wq]
  304. S 0 56 2 0 0 0:0 14:12 00:00:00 [diag_cntl_wq]
  305. S 0 58 2 0 0 0:0 14:12 00:00:00 [kgsl-3d0]
  306. S 0 65 2 0 0 0:0 14:12 00:00:00 [k_rmnet_mux_wor]
  307. S 0 66 2 0 0 0:0 14:12 00:00:00 [f_mtp]
  308. S 0 67 2 0 0 0:0 14:12 00:00:00 [file-storage]
  309. S 0 68 2 0 0 0:0 14:12 00:00:00 [kworker/0:2]
  310. S 0 69 2 0 0 0:0 14:12 00:00:00 [uether]
  311. S 0 70 2 0 0 0:0 14:12 00:00:00 [synaptics_wq]
  312. S 0 71 2 0 0 0:0 14:12 00:00:00 [goodix_wq]
  313. S 0 72 2 0 0 0:0 14:12 00:00:00 [gs_wq]
  314. D 0 73 2 0 0 0:0 14:12 00:00:00 [krtcclntd]
  315. D 0 74 2 0 0 0:0 14:12 00:00:00 [krtcclntcbd]
  316. D 0 75 2 0 0 0:0 14:12 00:00:00 [kbatteryclntd]
  317. D 0 76 2 0 0 0:0 14:12 00:00:00 [kbatteryclntcbd]
  318. S 0 77 2 0 0 0:0 14:12 00:00:00 [msm_adc]
  319. S 0 78 2 0 0 0:0 14:12 00:00:00 [dalrpc_rcv_DAL0]
  320. D 0 79 2 0 0 0:0 14:12 00:00:00 [kinteractiveup]
  321. S 0 80 2 0 0 0:0 14:12 00:00:00 [irq/341-msm-sdc]
  322. S 0 81 2 0 0 0:0 14:12 00:00:00 [binder]
  323. D 0 82 2 0 0 0:0 14:12 00:00:00 [koemrapiclientc]
  324. S 0 83 2 0 0 0:0 14:12 00:00:00 [kworker/u:3]
  325. S 0 84 2 0 0 0:0 14:12 00:00:00 [krfcommd]
  326. S 0 85 2 0 0 0:0 14:12 00:00:00 [aps_wq]
  327. D 0 87 2 0 0 0:0 14:12 00:00:00 [khsclntd]
  328. S 0 88 2 0 0 0:0 14:12 00:00:00 [key_test_wq]
  329. S 0 89 2 0 0 0:0 14:12 00:00:00 [deferwq]
  330. D 0 90 2 0 0 0:0 14:12 00:00:00 [kdev_dctclntd]
  331. S 0 103 2 0 0 0:0 14:12 00:00:00 [row_idle_work]
  332. S 0 104 2 0 0 0:0 14:12 00:00:00 [mmcqd/0]
  333. S 0 129 2 0 0 0:0 14:12 00:00:00 [row_idle_work]
  334. S 0 130 2 0 0 0:0 14:12 00:00:00 [mmcqd/1]
  335. S 0 175 2 0 0 0:0 14:12 00:00:00 [jbd2/mmcblk0p13]
  336. S 0 176 2 0 0 0:0 14:12 00:00:00 [ext4-dio-unwrit]
  337. S 0 232 1 864 204 0:0 14:12 00:00:00 udhcpd
  338. S 0 236 1 860 128 0:0 14:12 00:00:00 telnetd -p 23 -l /bin/sh
  339. S 0 239 2 0 0 0:0 14:12 00:00:00 [kworker/0:3]
  340. R 0 242 1 872 220 0:0 14:12 00:00:00 ps -wlT
  341. + ps -ef
  342. unknown option -- e
  343. BusyBox v1.21.1-jb static (2014-01-28 17:46 +0000) multi-call binary.
  344.  
  345. Usage: ps
  346.  
  347. Show list of processes
  348.  
  349. w Wide output
  350. l Long output
  351. T Show threads
  352.  
  353. + netstat -lnp
  354. Active Internet connections (only servers)
  355. Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
  356. tcp 0 0 :::23 :::* LISTEN 236/telnetd
  357. udp 0 0 0.0.0.0:67 0.0.0.0:* 232/udhcpd
  358. Active UNIX domain sockets (only servers)
  359. Proto RefCnt Flags Type State I-Node PID/Program name Path
  360. + cat /proc/mounts
  361. rootfs / rootfs rw 0 0
  362. devtmpfs /dev devtmpfs rw,relatime,size=195212k,nr_inodes=48803,mode=755 0 0
  363. devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0
  364. sysfs /sys sysfs rw,relatime 0 0
  365. proc /proc proc rw,relatime 0 0
  366. /dev/mmcblk0p13 /data ext4 rw,relatime,data=ordered 0 0
  367. /dev/mmcblk0p13 /target ext4 rw,relatime,data=ordered 0 0
  368. /dev/mmcblk0p13 /target/data ext4 rw,relatime,data=ordered 0 0
  369. + sync
  370. + inject_loop
  371. + INJ_DIR=/init-ctl
  372. + INJ_STDIN=/init-ctl/stdin
  373. + mkdir /init-ctl
  374. + mkfifo /init-ctl/stdin
  375. + echo This entire directory is for debugging init - it can safely be removed
  376. + echo ########################## Beginning inject loop
  377. ########################## Beginning inject loop
  378. + :
RAW Paste Data