SHARE
TWEET

Pogoplug Mobile v4 Notes

metalx1000 Feb 25th, 2017 (edited) 2,098 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #pogo files http://pogoplug.com/opensource
  2. #http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html
  3. #https://wiki.openwrt.org/toh/cloudengines/pogo-v4
  4. #Serial connection is at J11, left of SD as you face SD opening.
  5. #Pins are 0V, Rx, Tx (moving right to left from SD).
  6. #Do not connect +V pin. Make sure your serial device is 3.3V, not 5V. Baud rate is 115200.
  7.  
  8. #connect
  9. screen /dev/ttyUSB0 115200,cs8,-parenb,-cstopb,-hupcl
  10. #or
  11. stty raw -echo < /dev/ttyUSB0
  12. cat /dev/ttyUSB0
  13. #press a key to enter uboot or wait for Linux to boot
  14.  
  15. #list partition
  16. cat /proc/partitions
  17. cat /proc/mtd
  18.  
  19. #remount / as read/write
  20. mount -o remount,rw /
  21.  
  22. #change root password
  23. passwd root
  24.  
  25. #start telnetd or ssh server (both are already there)
  26. #startup script can be found here
  27. #(might want to enable dropbear and telnet and disable pogo services 'hbmgr.sh'):
  28. vi /etc/init.d/rcS
  29.  
  30.  
  31. #mount sdcard
  32. mkdir /mnt/sdcard
  33. mknod /dev/mmcblk0 b 179 0
  34. mknod /dev/mmcblk0p1 b 179 1
  35. mount /dev/mmcblk0p1 /mnt/sdcard
  36.  
  37. #mount USB drive
  38. mkdir /mnt/usb
  39. mknod /dev/sda b 8 0
  40. mknod /dev/sda1 b 8 1
  41. mount /dev/sda1 /mnt/usb
  42.  
  43. #add these lines to /etc/fstab
  44. /dev/sda1 /mnt/usb vfat defaults 0 0
  45. /dev/mmcblk0p1 /mnt/sdcard vfat defaults 0 0
  46.  
  47. #now that we have storage, you might want to back things up
  48. #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!I have not tried restoring flash from dd !!!!!!!!!!!
  49. #I suggest reading this http://forum.doozan.com/read.php?3,16789,16800
  50. cd /mnt/usb
  51. for i in 0 1 2 3 4;do echo "Backing up mtd$i";dd if=/dev/mtd$i of=mtd$i.img;done
  52. #other tools 'nanddump', 'nandwrite', 'flash_erase', and 'flash_eraseall'
  53. #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  54. #install busybox
  55. #root fs is 100MB, so plenty of room
  56. df -h
  57. #busybox wit a lot of tools is already installed
  58. #but there are more tools in busybox we can get
  59.  
  60. #check architecture
  61. uname -a  #armv5tel
  62.  
  63. #get busybox binaries
  64. #note that busybox wget doesn't support ssl
  65. #so you won't be able to download directly to the device
  66. https://busybox.net/downloads/binaries/
  67. #once on device make executable and move to /bin
  68. chmod +x busybox
  69. mv busybox /bin/
  70. #link all commands
  71. busybox --list|while read c;do echo $c;ln -s /bin/busybox $c;done
  72.  
  73. #download a very basic directory indexer I designed
  74. cd /mnt/usb #cd /mnt/sdcard
  75. #again, no ssl at this point
  76. wget "https://github.com/metalx1000/Directory-Index-for-httpd/archive/master.zip"
  77. unzip master.zip
  78. mv Directory-Index-for-httpd-master www
  79. cd www
  80. #start web service in forground
  81. httpd -fvvvh /mnt/usb/www
  82. #or as background process
  83. httpd -h /mnt/usb/www
  84. #might want to add this to the startup script
  85.  
  86.  
  87. #add to bottom startup script (/etc/init.d/rcS)
  88. #for automounting
  89. #5 second delay is for a slow usb drive (there are better ways for doing this)
  90. mount /dev/mmcblk0p1
  91. #httpd -h /mnt/usb/www
  92. httpd -h /mnt/sdcard/www
  93. sleep 5;mount /dev/sda1
  94.  
  95. #Controlling LED
  96. #http://aaronrandall.com/blog/playing-with-pogoplugs-led/
  97. #many sites will show how to control the LED if you have installed Debian or Arch
  98. #here is how you control it from the default OS
  99. #activate it
  100. insmod /usr/local/cloudengines/bin/xce.ko
  101. #Set the LED to green:
  102. echo "led=con" > /dev/xce
  103. #Set the LED to red:
  104. echo "led=dis" > /dev/xce
  105. #Set the LED to orange:
  106. echo "led=err" > /dev/xce
  107. #Set the LED to flash:
  108. echo "led=msg" > /dev/xce
  109.  
  110. #############SSH DropBear###########
  111. #The version of Dropbear on this device is old
  112. #it uses an old/less secure encryption that your client might not like
  113. #you can override this on your client side like this
  114. ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 root@192.168.1.104
  115. #there is no sftp server, but you can scp like this
  116. scp -oKexAlgorithms=+diffie-hellman-group1-sha1 <file> root@192.168.1.104:
  117.  
  118. #############upgrade to newer DropBear##########
  119. #cross compile on desktop
  120. sudo apt-get install gcc-arm-linux-gnueabi
  121. wget "https://matt.ucc.asn.au/dropbear/releases/dropbear-2016.74.tar.bz2"
  122. tar -xjf dropbear-2016.74.tar.bz2
  123. cd dropbear-2016.74
  124. ./configure --host=arm-linux-gnueabi --prefix=/ --disable-zlib CC=arm-linux-gnueabi-gcc LD=arm-linux-gnueabi-ld
  125. make
  126. #copy to device
  127. scp -oKexAlgorithms=+diffie-hellman-group1-sha1 dropbear root@192.168.1.104:
  128. #test it, backup old version, and replace
  129. killall dropbear #you'll lose your connection so reconnect with telnet or serial
  130. ./dropbear #once you make sure it works kill it and move it
  131. killall dropbear
  132. mv /usr/sbin/dropbear /usr/sbin/dropbear.old
  133. mv dropbear /usr/sbin/dropbear
  134. /usr/sbin/dropbear
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top