summaryrefslogtreecommitdiff
path: root/README
blob: e2418f30928fcc1c04ea78e4585d1da34258719a (plain)
    1 -=TOC=-
    2 -CYGWIN
    3 -WINDOWS SHELL
    4 -BASH
    5 -TODO BUGS
    6 
    7 CYGWIN doesn't echo things properly.  Like when you hit up arrow instead of showing the last command it travels up in the window.  But it still will execute the last command upon hitting <enter>.  <tab> autocomplete also doesn't render but still executes.
    8 
    9 Here's sample output of how bad it is on cygwin:
   10 ---
   11 root@htc_himaul:/sdcard2/bk/andbackup # ./and   .
   12 ./and
   13 andbackup.sh andbackup/
   14 /andbackup.sh                                                                 <
   15 sush: ./andbackup.sh: can't execute: Permission denied
   16 126|root@htc_himaul:/sdcard2/bk/andbackup # bash and    .
   17 bash and
   18 andbackup.sh andbackup/
   19 ash andbackup.sh                                                              <
   20 shell-init: error retrieving current directory: getcwd: cannot access parent directories: Success
   21 andbackup.sh: line 269: @: unbound variable
   22 1|root@htc_himaul:/sdcard2/bk/andbackup #
   23 ---
   24 
   25 
   26 WINDOWS SHELL doesn't have this problem, so autocomplete and last command are clean.  But the "unbound variable" happens also, this is fixed by passing the correct parameter count. (bash bug?)  
   27 
   28 
   29 BASH
   30 To my surprise BASH doesn't come with busybox.  To install bash do this:
   31 Go to this site and follow its directions (http://www.blogzamana.com/getting-bash-on-android/)
   32 Or just copy what I did here:
   33 $ wget http://pub.mzet.net/bash
   34 $ adb push bash /sdcard2/Download
   35 -
   36 root@htc_himaul:/ # mount -o remount,rw /system
   37 mount -o remount,rw /system
   38 root@htc_himaul:/ # cd /system/bin
   39 root@htc_himaul:/system/bin # cp /sdcard2/Download/bash .
   40 root@htc_himaul:/system/bin # chmod 0755 bash
   41 root@htc_himaul:/storage/034A-1326/bk/andbackup # mount -o ro,remount,ro /system
   42 -
   43 Thanks (http://android.stackexchange.com/questions/110927/how-to-mount-system-rewritable-or-read-only-rw-ro) for mount tips.
   44 
   45 TODO BUGS
   46 1)
   47 ---
   48 22:30:17 2017-03-18   info    Backing up com.nianticlabs.pokemongo
   49 cp: /storage/ext_sd/bk/andbackup/andbackupBK/com.nianticlabs.pokemongo/data//lib: Function not implemented
   50 deleting cache for com.nianticlabs.pokemongo
   51 22:30:49 2017-03-18   info    Compressing userdata for com.nianticlabs.pokemongo
   52 chdir: error retrieving current directory: getcwd: cannot access parent directories: Success
   53 This app com.google.android.apps.maps-preserveDignity has passed in options
   54 22:30:51 2017-03-18   info    Backing up com.google.android.apps.maps
   55 deleting cache for com.google.android.apps.maps
   56 22:33:19 2017-03-18   info    Compressing userdata for com.google.android.apps.maps
   57 root@htc_himaul:/sdcard2/bk/andbackup #
   58 ---
   59 The "Function not implemented" error output above might be because andbackup can't handle symlinks
   60 
   61 2)
   62 Most shells and even BASH has this bug:
   63 ---
   64 shell-init: error retrieving current directory: getcwd: cannot access parent directories: Success
   65 ---
   66 but it appears to run...
   67 
   68 3)
   69 "sh" doesn't work:
   70 ---
   71 1|root@htc_himaul:/sdcard2/bk/andbackup # sh andbackup.sh
   72 127|root@htc_himaul:/sdcard2/bk/andbackup #
   73 ---
   74 sh AKA ash doesn't work (with -x):
   75 ---
   76 1|root@htc_himaul:/storage/ext_sd/bk/andbackup # sh -x andbackup.sh
   77 127|root@htc_himaul:/storage/ext_sd/bk/andbackup #
   78 -even with full correct params you get the same "nothing" output
   79 127|root@htc_himaul:/storage/ext_sd/bk/andbackup # sh -x andbackup.sh listback>
   80 127|root@htc_himaul:/storage/ext_sd/bk/andbackup #
   81 ---

Generated by cgit