Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toybox vs Busybox #116

Open
DocSniper opened this issue Jan 9, 2016 · 42 comments
Open

Toybox vs Busybox #116

DocSniper opened this issue Jan 9, 2016 · 42 comments

Comments

@DocSniper
Copy link

AOSP switched from busybox over to toybox, so it would be great if you could check for busybox and/or toybox.
Because on newer ROMs like CM13 busybox is no more detected and a workaround for this is to set toybox as busybox in the options menu. But auto detection would be a good feature ;-)

http://review.cyanogenmod.org/#/c/119819/

@jensstein
Copy link
Owner

thanks for notifying me :)
can you check if auto-detecting works with this: https://drive.google.com/file/d/0B0bNUNWd2wPPaF9POVhaZXY5eHM/view?usp=sharing

@DocSniper
Copy link
Author

Your test APK is working well, toybox is detected. Thanks :-)

@jensstein
Copy link
Owner

great :) can you confirm that everything works as it should?
just from reading the android source code it doesn't seem to have chown for example. chown is present in the normal toybox (http://www.landley.net/toybox/status.html) so maybe i'm just not looking the right places. but in android 6 it seems to be provided by bionic.
the programs used with busybox now are:

cp -r
chmod -R
chown -R
stat
sed -nre
[[
basename
mkdir
rm -r
touch
pkill
grep

(the flags are important too)

so it's actually only if all of those are available natively on android 6 that setting toybox as oab's busybox would make sense.
some of them are also normally present on older android versions in the toolbox implementations but used in the busybox implementations in oab for example because of lacking features in toolbox.

@DocSniper
Copy link
Author

You are right, there seems to be a problem with restoring the data even if logcat reports success.

01-09 21:34:15.762 I/oandbackup(30441): restoring: GigaGet
01-09 21:34:17.141 I/oandbackup(30441): getOwnership return: 0
01-09 21:34:17.352 I/oandbackup(30441): setPermissions return: 0
01-09 21:34:17.352 I/oandbackup(30441): return: 0 / success
01-09 21:34:20.870 E/oandbackup(30441): com.appmindlab.nano: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject
01-09 21:34:20.871 E/oandbackup(30441): oandbackup.apk: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject

@DocSniper
Copy link
Author

The commands seem to be there, maybe this helps:

cd /system/bin

ls -l

-rwxr-xr-x 1 root shell 389648 2009-01-01 09:00 aapt lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 acpi -> toybox -rwxr-xr-x 1 root shell 5568 2009-01-01 09:00 adsprpcd -rwxr-xr-x 1 root shell 210 2009-01-01 09:00 am lrwxr-xr-x 1 root shell 13 2009-01-01 09:00 app_process -> app_process32 -rwxr-xr-x 1 root shell 22144 2009-01-01 09:00 app_process32 -rwxr-xr-x 1 root shell 66220 2009-01-01 09:00 applypatch -rwxr-xr-x 1 root shell 213 2009-01-01 09:00 appops -rwxr-xr-x 1 root shell 215 2009-01-01 09:00 appwidget
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 arp -> toybox
-rwxr-xr-x 1 root shell 34564 2009-01-01 09:00 atrace
-rwxr-xr-x 1 root shell 22136 2009-01-01 09:00 audiod
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 base64 -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 basename -> toybox
-rwxr-xr-x 1 root shell 42612 2009-01-01 09:00 bcc
-rwxr-xr-x 1 root shell 22284 2009-01-01 09:00 bdt
-rwxr-xr-x 1 root shell 18056 2009-01-01 09:00 blkid
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 blockdev -> toybox
-rwxr-xr-x 1 root shell 199 2009-01-01 09:00 bmgr
-rwxr-xr-x 1 root shell 46720 2009-01-01 09:00 bootanimation
-rwxr-xr-x 1 root shell 34420 2009-01-01 09:00 brctl
-rwxr-xr-x 1 root shell 18036 2009-01-01 09:00 btsnoop
-rwxr-xr-x 1 root shell 156 2009-01-01 09:00 bu
-rwxr-xr-x 1 root shell 13892 2009-01-01 09:00 bugreport
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 bzcat -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 cal -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 cat -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 chattr -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 chcon -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 chgrp -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 chmod -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 chown -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 chroot -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 cksum -> toybox
-rwxr-xr-x 1 root shell 46872 2009-01-01 09:00 clatd
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 clear -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 cmp -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 comm -> toybox
-rwxr-xr-x 1 root shell 207 2009-01-01 09:00 content
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 cp -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 cpio -> toybox
-rwxr-xr-x 1 root shell 321268 2009-01-01 09:00 curl
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 cut -> toybox
lrwxr-xr-x 1 root shell 10 2009-01-01 09:00 dalvikvm -> dalvikvm32
-rwxr-xr-x 1 root shell 17988 2009-01-01 09:00 dalvikvm32
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 date -> toybox
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 dd -> toolbox
-rwxr-xr-x 1 root shell 42564 2009-01-01 09:00 debuggerd
-rwxr-xr-x 1 root shell 112248 2009-01-01 09:00 dex2oat
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 df -> toybox
-rwxr-xr-x 1 root shell 83584 2009-01-01 09:00 dhcpcd
-rwxr-xr-x 1 root shell 13892 2009-01-01 09:00 dhcptool
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 diff -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 dirname -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 dmesg -> toybox
-rwxr-xr-x 1 root shell 138812 2009-01-01 09:00 dnsmasq
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 dos2unix -> toybox
-rwxr-xr-x 1 root shell 156 2009-01-01 09:00 dpm
-rwxr-xr-x 1 root shell 67196 2009-01-01 09:00 drmserver
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 du -> toybox
-rwxr-xr-x 1 root shell 59000 2009-01-01 09:00 dumpstate
-rwxr-xr-x 1 root shell 18040 2009-01-01 09:00 dumpsys
-rwxr-xr-x 1 root shell 167084 2009-01-01 09:00 e2fsck
-rwxr-xr-x 1 root shell 13892 2009-01-01 09:00 ebtables
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 echo -> toybox
lrwxr-xr-x 1 root shell 4 2009-01-01 09:00 egrep -> grep
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 env -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 expand -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 expr -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 fallocate -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 false -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 fdisk -> toybox
lrwxr-xr-x 1 root shell 4 2009-01-01 09:00 fgrep -> grep
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 find -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 flock -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 free -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 freeramdisk -> toybox
-rwxr-xr-x 1 root shell 17988 2009-01-01 09:00 fsck.exfat
-rwxr-xr-x 1 root shell 59044 2009-01-01 09:00 fsck.f2fs
-rwxr-xr-x 1 root shell 34428 2009-01-01 09:00 fsck.ntfs
-rwxr-xr-x 1 root shell 50824 2009-01-01 09:00 fsck_msdos
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 fsfreeze -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 fstype -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 ftpget -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 ftpput -> toybox
-rwxr-xr-x 1 root shell 46716 2009-01-01 09:00 gatekeeperd
-rwxr-xr-x 1 root shell 43076 2009-01-01 09:00 gatt_testtool
-rwxr-xr-x 1 root shell 397672 2009-01-01 09:00 gdbserver
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 getenforce -> toybox
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 getevent -> toolbox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 getprop -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 grep -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 groups -> toybox
-rwxr-xr-x 1 root shell 17984 2009-01-01 09:00 gzip
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 head -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 help -> toybox
-rwxr-xr-x 1 root shell 213 2009-01-01 09:00 hid
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 host -> toybox
-rwxr-xr-x 1 root shell 461956 2009-01-01 09:00 hostapd
-rwxr-xr-x 1 root shell 42628 2009-01-01 09:00 hostapd_cli
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 hostname -> toybox
-rwxr-xr-x 1 root shell 13888 2009-01-01 09:00 hwaddrs
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 hwclock -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 id -> toybox
-rwxr-xr-x 1 root shell 34368 2009-01-01 09:00 idmap
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 ifconfig -> toybox
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 iftop -> toolbox
-rwxr-xr-x 1 root shell 194 2009-01-01 09:00 ime
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 inotifyd -> toybox
-rwxr-xr-x 1 root shell 203 2009-01-01 09:00 input
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 insmod -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 install -> toybox
-rwxr-x--- 1 root root 845 2009-01-01 09:00 install-recovery.sh
-rwxr-xr-x 1 root shell 63416 2009-01-01 09:00 installd
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 ioctl -> toolbox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 ionice -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 iorenice -> toybox
-rwxr-xr-x 1 root shell 178044 2009-01-01 09:00 ip
-rwxr-xr-x 1 root shell 266096 2009-01-01 09:00 ip6tables
-rwxr-xr-x 1 root shell 257740 2009-01-01 09:00 iptables
-rwxr-xr-x 1 root shell 9388 2009-01-01 09:00 irsc_util
-rwxr-xr-x 1 root shell 79608 2009-01-01 09:00 keystore
-rwxr-xr-x 1 root shell 18048 2009-01-01 09:00 keystore_cli
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 kill -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 killall -> toybox
-rwxr-xr-x 1 root shell 26440 2009-01-01 09:00 l2test_ertm
-rwxr-xr-x 1 root shell 526244 2009-01-01 09:00 ld.mc
-rwxr-xr-x 1 root shell 215424 2009-01-01 09:00 linker
-rwxr-xr-x 1 root shell 22136 2009-01-01 09:00 lmkd
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 ln -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 load_policy -> toybox
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 log -> toolbox
-rwxr-xr-x 1 root shell 30328 2009-01-01 09:00 logcat
-rwxr-xr-x 1 root shell 59060 2009-01-01 09:00 logd
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 logname -> toybox
lrwxr-xr-x 1 root shell 16 2009-01-01 09:00 logpersist.cat -> logpersist.start
-rwxr-xr-x 1 root shell 898 2009-01-01 09:00 logpersist.start
lrwxr-xr-x 1 root shell 16 2009-01-01 09:00 logpersist.stop -> logpersist.start
-rwxr-xr-x 1 root shell 22156 2009-01-01 09:00 logwrapper
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 losetup -> toybox
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 ls -> toolbox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 lsattr -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 lsmod -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 lsof -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 lsusb -> toybox
-rwxr-xr-x 1 root shell 17988 2009-01-01 09:00 make_ext4fs
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 makedevs -> toybox
-rwxr-xr-x 1 root shell 26408 2009-01-01 09:00 mcap_tool
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 md5sum -> toybox
-rwxr-xr-x 1 root shell 583604 2009-01-01 09:00 mdnsd
-rwxr-xr-x 1 root shell 210 2009-01-01 09:00 media
-rwxr-xr-x 1 root shell 22140 2009-01-01 09:00 mediaserver
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 mkdir -> toybox
-rwxr-xr-x 1 root shell 59040 2009-01-01 09:00 mke2fs
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 mkfifo -> toybox
-rwxr-xr-x 1 root shell 27996 2009-01-01 09:00 mkfs.exfat
-rwxr-xr-x 1 root shell 30432 2009-01-01 09:00 mkfs.f2fs
-rwxr-xr-x 1 root shell 71292 2009-01-01 09:00 mkfs.ntfs
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 mknod -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 mkswap -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 mktemp -> toybox
-rwxr-xr-x 1 root shell 13540 2009-01-01 09:00 mm-qcamera-daemon
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 modinfo -> toybox
-rwxr-xr-x 1 root shell 217 2009-01-01 09:00 monkey
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 more -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 mount -> toybox
-rwxr-xr-x 1 root shell 22316 2009-01-01 09:00 mount.exfat
-rwxr-xr-x 1 root shell 50988 2009-01-01 09:00 mount.ntfs
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 mountpoint -> toybox
-rwxr-xr-x 1 root shell 47480 2009-01-01 09:00 mpdecision
-rwxr-xr-x 1 root shell 26336 2009-01-01 09:00 mtpd
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 mv -> toybox
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 nandread -> toolbox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 nbd-client -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 nc -> toybox
-rwxr-xr-x 1 root shell 17980 2009-01-01 09:00 ndc
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 netcat -> toybox
-rwxr-xr-x 1 root shell 137100 2009-01-01 09:00 netd
-rwxr-xr-x 1 root shell 246404 2009-01-01 09:00 netmgrd
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 netstat -> toybox
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 newfs_msdos -> toolbox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 nice -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 nl -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 nohup -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 nproc -> toybox
-rwxr-xr-x 1 root shell 145092 2009-01-01 09:00 oatdump
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 od -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 partprobe -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 paste -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 patch -> toybox
-rwxr-xr-x 1 root shell 67140 2009-01-01 09:00 patchoat
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 pgrep -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 pidof -> toybox
-rwxr-xr-x 1 root shell 42804 2009-01-01 09:00 ping
-rwxr-xr-x 1 root shell 43068 2009-01-01 09:00 ping6
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 pivot_root -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 pkill -> toybox
-rwxr-xr-x 1 root shell 208 2009-01-01 09:00 pm
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 pmap -> toybox
-rwxr-xr-x 1 root shell 26264 2009-01-01 09:00 pngtest
-rwxr-xr-x 1 root shell 188700 2009-01-01 09:00 pppd
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 printenv -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 printf -> toybox
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 prlimit -> toolbox
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 ps -> toolbox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 pwd -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 pwdx -> toybox
-rwxr-xr-x 1 root shell 96848 2009-01-01 09:00 qmuxd
-rwxr-xr-x 1 root shell 9576 2009-01-01 09:00 qseecomd
-rwxr-xr-x 1 root shell 13884 2009-01-01 09:00 r
-rwxr-xr-x 1 root shell 187576 2009-01-01 09:00 racoon
-rwxr-xr-x 1 root shell 13896 2009-01-01 09:00 radiooptions
-rwxr-xr-x 1 root shell 25936 2009-01-01 09:00 radish
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 readahead -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 readlink -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 realpath -> toybox
-rwxr-xr-x 1 root shell 13888 2009-01-01 09:00 reboot
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 renice -> toybox
-rwxr-xr-x 1 root shell 188 2009-01-01 09:00 requestsync
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 reset -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 resize -> toybox
-rwxr-xr-x 1 root shell 50756 2009-01-01 09:00 resize2fs
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 restart -> toolbox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 restorecon -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 rev -> toybox
-rwxr-xr-x 1 root shell 22284 2009-01-01 09:00 rfc
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 rfkill -> toybox
-rwxr-xr-x 1 root shell 18044 2009-01-01 09:00 rild
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 rm -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 rmdir -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 rmmod -> toybox
-rwxr-xr-x 1 root shell 19344 2009-01-01 09:00 rmt_storage
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 route -> toybox
-rwxr-x--- 1 root shell 17984 2009-01-01 09:00 run-as
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 runcon -> toybox
-rwxr-xr-x 1 root shell 13892 2009-01-01 09:00 schedtest
-rwxr-xr-x 1 root shell 34424 2009-01-01 09:00 scp
-rwxr-xr-x 1 root shell 22140 2009-01-01 09:00 screencap
-rwxr-xr-x 1 root shell 104148 2009-01-01 09:00 screenrecord
-rwxr-xr-x 1 root shell 26176 2009-01-01 09:00 sdcard
-rwxr-xr-x 1 root shell 17988 2009-01-01 09:00 secdiscard
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 sed -> toybox
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 sendevent -> toolbox
-rwxr-xr-x 1 root shell 398076 2009-01-01 09:00 sensors.qcom
-rwxr-xr-x 1 root shell 13896 2009-01-01 09:00 sensorservice
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 seq -> toybox
-rwxr-xr-x 1 root shell 22136 2009-01-01 09:00 service
-rwxr-xr-x 1 root shell 22188 2009-01-01 09:00 servicemanager
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 setenforce -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 setprop -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 setsid -> toybox
-rwxr-xr-x 1 root shell 178 2009-01-01 09:00 settings
-rwxr-xr-x 1 root shell 63096 2009-01-01 09:00 sftp
-rwxr-xr-x 1 root shell 124596 2009-01-01 09:00 sgdisk
-rwxr-xr-x 1 root shell 194564 2009-01-01 09:00 sh
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 sha1sum -> toybox
-rwxr-xr-x 1 root shell 17988 2009-01-01 09:00 showlease
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 sleep -> toybox
-rwxr-xr-x 1 root shell 190 2009-01-01 09:00 sm
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 sort -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 split -> toybox
-rwxr-xr-x 1 root shell 157428 2009-01-01 09:00 ssh
-rwxr-xr-x 1 root shell 54928 2009-01-01 09:00 ssh-keygen
-rwxr-xr-x 1 root shell 199068 2009-01-01 09:00 sshd
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 start -> toolbox
-rwxr-xr-x 1 root shell 998 2009-01-01 09:00 start-ssh
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 stat -> toybox
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 stop -> toolbox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 strings -> toybox
lrwxr-xr-x 1 root shell 10 2009-01-01 09:00 su -> ../xbin/su
-rwxr-xr-x 1 root shell 17992 2009-01-01 09:00 surfaceflinger
-rwxr-xr-x 1 root shell 192 2009-01-01 09:00 svc
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 swapoff -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 swapon -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 switch_root -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 sync -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 sysctl -> toybox
-rwxr-xr-x 1 root shell 200 2009-01-01 09:00 sysinit
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 tac -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 tail -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 tar -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 taskset -> toybox
-rwxr-xr-x 1 root shell 83960 2009-01-01 09:00 tc
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 tee -> toybox
-rwxr-xr-x 1 root shell 172 2009-01-01 09:00 telecom
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 telnet -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 test -> toybox
-rwxr-xr-x 1 root shell 307320 2009-01-01 09:00 thermal-engine
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 time -> toybox
-rwxr-xr-x 1 root shell 17744 2009-01-01 09:00 time_daemon
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 timeout -> toybox
-rwxr-xr-x 1 root shell 190 2009-01-01 09:00 tm
-rwxr-xr-x 1 root shell 97332 2009-01-01 09:00 toolbox
lrwxr-xr-x 1 root shell 7 2009-01-01 09:00 top -> toolbox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 touch -> toybox
-rwxr-xr-x 1 root shell 342228 2009-01-01 09:00 toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 tr -> toybox
-rwxr-xr-x 1 root shell 18052 2009-01-01 09:00 tracepath
-rwxr-xr-x 1 root shell 18052 2009-01-01 09:00 tracepath6
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 traceroute -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 traceroute6 -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 true -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 truncate -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 tty -> toybox
-rwxr-xr-x 1 root shell 46736 2009-01-01 09:00 tune2fs
-rwxr-xr-x 1 root shell 22084 2009-01-01 09:00 tzdatacheck
-rwxr-xr-x 1 root shell 3814 2009-01-01 09:00 uiautomator
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 umount -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 uname -> toybox
-rwxr-x--- 1 root root 38808 2009-01-01 09:00 uncrypt
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 uniq -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 unix2dos -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 uptime -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 usleep -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 vconfig -> toybox
-rwxr-xr-x 1 root shell 17980 2009-01-01 09:00 vdc
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 vmstat -> toybox
-rwxr-xr-x 1 root shell 475552 2009-01-01 09:00 vold
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 watch -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 wc -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 which -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 whoami -> toybox
-rwxr-xr-x 1 root shell 190 2009-01-01 09:00 wm
-rwxr-xr-x 1 root shell 87728 2009-01-01 09:00 wpa_cli
-rwxr-xr-x 1 root shell 1125552 2009-01-01 09:00 wpa_supplicant
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 xargs -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 xxd -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 xzcat -> toybox
lrwxr-xr-x 1 root shell 6 2009-01-01 09:00 yes -> toybox

cd /system/xbin

ls -l

-rwxr-xr-x 1 root shell 448176 2009-01-01 09:00 7z
-rwxr-xr-x 1 root shell 231304 2009-01-01 09:00 add-property-tag
-rwxr-xr-x 1 root shell 570296 2009-01-01 09:00 bash
-rwxr-xr-x 1 root shell 98960 2009-01-01 09:00 bzip2
-rwxr-xr-x 1 root shell 247700 2009-01-01 09:00 check-lost+found
-rwxr-xr-x 1 root shell 17988 2009-01-01 09:00 cpustats
-rwxr-xr-x 1 root shell 76432 2009-01-01 09:00 dexdump
-rwxr-xr-x 1 root shell 48516 2009-01-01 09:00 dhdutil
-rwxr-xr-x 1 root shell 773928 2009-01-01 09:00 fio
lrwxr-xr-x 1 root shell 4 2009-01-01 09:00 gunzip -> pigz
lrwxr-xr-x 1 root shell 4 2009-01-01 09:00 gzip -> pigz
-rwxr-xr-x 1 root shell 103112 2009-01-01 09:00 htop
-rwxr-xr-x 1 root shell 17984 2009-01-01 09:00 ksminfo
-rwxr-xr-x 1 root shell 18052 2009-01-01 09:00 latencytop
-rwsr-sr-x 1 root root 22144 2009-01-01 09:00 librank
lrwxr-xr-x 1 root shell 18 2009-01-01 09:00 ls -> /system/bin/toybox
-rwxr-xr-x 1 root shell 138984 2009-01-01 09:00 ltrace
-rwxr-xr-x 1 root shell 34624 2009-01-01 09:00 micro_bench
-rwxr-xr-x 1 root shell 247868 2009-01-01 09:00 micro_bench_static
-rwxr-xr-x 1 root shell 95952 2009-01-01 09:00 nano
-rwxr-xr-x 1 root shell 108220 2009-01-01 09:00 perfprofd
-rwxr-xr-x 1 root shell 79484 2009-01-01 09:00 pigz
-rwxr-xr-x 1 root shell 43244 2009-01-01 09:00 powertop
-rwsr-sr-x 1 root root 17984 2009-01-01 09:00 procmem
-rwsr-sr-x 1 root root 22084 2009-01-01 09:00 procrank
lrwxr-xr-x 1 root shell 18 2009-01-01 09:00 ps -> /system/bin/toybox
-rwxr-xr-x 1 root shell 17988 2009-01-01 09:00 puncture_fs
-rwxr-xr-x 1 root shell 26176 2009-01-01 09:00 rawbu
-rwxr-xr-x 1 root shell 362536 2009-01-01 09:00 rsync
-rwxr-xr-x 1 root shell 17992 2009-01-01 09:00 sane_schedstat
-rwxr-xr-x 1 root shell 17984 2009-01-01 09:00 showmap
-rwxr-xr-x 1 root shell 17988 2009-01-01 09:00 showslab
-rwxr-xr-x 1 root shell 128636 2009-01-01 09:00 simpleperf
-rwxr-xr-x 1 root shell 70900 2009-01-01 09:00 sqlite3
-rwxr-xr-x 1 root shell 300764 2009-01-01 09:00 strace
-rwxr-xr-x 1 root shell 91968 2009-01-01 09:00 su
-rwxr-xr-x 1 root shell 22084 2009-01-01 09:00 taskstats
-rwxr-xr-x 1 root shell 898844 2009-01-01 09:00 tcpdump
lrwxr-xr-x 1 root shell 4 2009-01-01 09:00 unpigz -> pigz
-rwxr-xr-x 1 root shell 166136 2009-01-01 09:00 unrar
-rwxr-xr-x 1 root shell 168596 2009-01-01 09:00 unzip
-rwxr-xr-x 1 root shell 964520 2009-01-01 09:00 vim
-rwxr-xr-x 1 root shell 5611 2009-01-01 09:00 wget
lrwxr-xr-x 1 root shell 4 2009-01-01 09:00 zcat -> pigz
-rwxr-xr-x 1 root shell 184636 2009-01-01 09:00 zip

@DocSniper
Copy link
Author

Here the ls (without -l) version for better overview:

cd /system/bin

ls

aapt ftpget mount.exfat setprop
acpi ftpput mount.ntfs setsid
adsprpcd gatekeeperd mountpoint settings
am gatt_testtool mpdecision sftp
app_process gdbserver mtpd sgdisk
app_process32 getenforce mv sh
applypatch getevent nandread sha1sum
appops getprop nbd-client showlease
appwidget grep nc sleep
arp groups ndc sm
atrace gzip netcat sort
audiod head netd split
base64 help netmgrd ssh
basename hid netstat ssh-keygen
bcc host newfs_msdos sshd
bdt hostapd nice start
blkid hostapd_cli nl start-ssh
blockdev hostname nohup stat
bmgr hwaddrs nproc stop
bootanimation hwclock oatdump strings
brctl id od su
btsnoop idmap partprobe surfaceflinger
bu ifconfig paste svc
bugreport iftop patch swapoff
bzcat ime patchoat swapon
cal inotifyd pgrep switch_root
cat input pidof sync
chattr insmod ping sysctl
chcon install ping6 sysinit
chgrp install-recovery.sh pivot_root tac
chmod installd pkill tail
chown ioctl pm tar
chroot ionice pmap taskset
cksum iorenice pngtest tc
clatd ip pppd tee
clear ip6tables printenv telecom
cmp iptables printf telnet
comm irsc_util prlimit test
content keystore ps thermal-engine
cp keystore_cli pwd time
cpio kill pwdx time_daemon
curl killall qmuxd timeout
cut l2test_ertm qseecomd tm
dalvikvm ld.mc r toolbox
dalvikvm32 linker racoon top
date lmkd radiooptions touch
dd ln radish toybox
debuggerd load_policy readahead tr
dex2oat log readlink tracepath
df logcat realpath tracepath6
dhcpcd logd reboot traceroute
dhcptool logname renice traceroute6
diff logpersist.cat requestsync true
dirname logpersist.start reset truncate
dmesg logpersist.stop resize tty
dnsmasq logwrapper resize2fs tune2fs
dos2unix losetup restart tzdatacheck
dpm ls restorecon uiautomator
drmserver lsattr rev umount
du lsmod rfc uname
dumpstate lsof rfkill uncrypt
dumpsys lsusb rild uniq
e2fsck make_ext4fs rm unix2dos
ebtables makedevs rmdir uptime
echo mcap_tool rmmod usleep
egrep md5sum rmt_storage vconfig
env mdnsd route vdc
expand media run-as vmstat
expr mediaserver runcon vold
fallocate mkdir schedtest watch
false mke2fs scp wc
fdisk mkfifo screencap which
fgrep mkfs.exfat screenrecord whoami
find mkfs.f2fs sdcard wm
flock mkfs.ntfs secdiscard wpa_cli
free mknod sed wpa_supplicant
freeramdisk mkswap sendevent xargs
fsck.exfat mktemp sensors.qcom xxd
fsck.f2fs mm-qcamera-daemon sensorservice xzcat
fsck.ntfs modinfo seq yes
fsck_msdos monkey service
fsfreeze more servicemanager
fstype mount setenforce

cd /system/xbin

ls

7z fio ltrace procrank simpleperf unzip
add-property-tag gunzip micro_bench ps sqlite3 vim
bash gzip micro_bench_static puncture_fs strace wget
bzip2 htop nano rawbu su zcat
check-lost+found ksminfo perfprofd rsync taskstats zip
cpustats latencytop pigz sane_schedstat tcpdump
dexdump librank powertop showmap unpigz
dhdutil ls procmem showslab unrar

@jensstein
Copy link
Owner

thanks. it's probably because [[ is missing from toybox. could i get you to try this version which uses test instead: [deleted]

@jensstein
Copy link
Owner

sorry, i made a mistake. please try this one: https://drive.google.com/file/d/0B0bNUNWd2wPPQzFtYjUtRlREMVU/view?usp=sharing

@DocSniper
Copy link
Author

The files are restored and the chcon seems to work, but there is a problem with the chown, not all directories and files are set to the correct owner and group.

@DocSniper
Copy link
Author

A manual chown -R solved the problem.

@jensstein
Copy link
Owner

could you give me an ls -lRZ of a restored data directory (where the restore didn't fully succeed)?
and please try running this line and watch the output: for dir in $packagedir/*; do if toybox test toybox basename $dir != "lib"; then toybox chown -R $uid:$gid $dir; toybox chmod -R 771 $dir; fi; done where $packagedir is a data subdirectory (e.g. /data/data/dk.jens.backup) and $uid and $gid are the user and group ids of that package.
also, with chcon did you mean chmod or restorecon, because chcon is not called.

@DocSniper
Copy link
Author

First, yes I meant restorecon not chcon, can remember the discussion about what would be the best choice. ;-)


Here the output right after restoring an app:
#ls -lRZ
.:
total 24
drwxrwx--x 2 root root u:object_r:app_data_file:s0:c512,c768 4096 2016-01-10 13:43 databases
drwxrwx--x 3 root root u:object_r:app_data_file:s0:c512,c768 4096 2016-01-10 13:43 files
drwxrwx--x 2 root root u:object_r:app_data_file:s0:c512,c768 4096 2016-01-10 13:43 shared_prefs

./databases:
total 1768
-rw-rw---- 1 root root u:object_r:app_data_file:s0:c512,c768 614400 2016-01-10 13:43 DroidShows.db
-rw-rw---- 1 root root u:object_r:app_data_file:s0:c512,c768 287792 2016-01-10 13:43 DroidShows.db-journal

./files:
total 8
drwxrwx--x 3 root root u:object_r:app_data_file:s0:c512,c768 4096 2016-01-10 13:43 thumbs

./files/thumbs:
total 8
drwxrwx--x 3 root root u:object_r:app_data_file:s0:c512,c768 4096 2016-01-10 13:43 banners

./files/thumbs/banners:
total 8
drwxrwx--x 2 root root u:object_r:app_data_file:s0:c512,c768 4096 2016-01-10 13:43 posters

./files/thumbs/banners/posters:
total 744
-rw-rw---- 1 root root u:object_r:app_data_file:s0:c512,c768 25138 2016-01-10 13:43 121361-34.jpg
-rw-rw---- 1 root root u:object_r:app_data_file:s0:c512,c768 50514 2016-01-10 13:43 153021-31.jpg
-rw-rw---- 1 root root u:object_r:app_data_file:s0:c512,c768 52070 2016-01-10 13:43 248736-1.jpg
-rw-rw---- 1 root root u:object_r:app_data_file:s0:c512,c768 40471 2016-01-10 13:43 248835-29.jpg
-rw-rw---- 1 root root u:object_r:app_data_file:s0:c512,c768 54059 2016-01-10 13:43 248837-4.jpg
-rw-rw---- 1 root root u:object_r:app_data_file:s0:c512,c768 31727 2016-01-10 13:43 268592-16.jpg
-rw-rw---- 1 root root u:object_r:app_data_file:s0:c512,c768 35527 2016-01-10 13:43 289590-1.jpg
-rw-rw---- 1 root root u:object_r:app_data_file:s0:c512,c768 27886 2016-01-10 13:43 290853-1.jpg
-rw-rw---- 1 root root u:object_r:app_data_file:s0:c512,c768 48994 2016-01-10 13:43 78804-52.jpg

./shared_prefs:
total 8
-rw-rw---- 1 root root u:object_r:app_data_file:s0:c512,c768 403 2016-01-10 13:43 DroidShowsPref.xml


The small script hasn't made any output and didn't change the rights and owners.
I modified it, after that it was working so far:

First run:

for dir in /data/data/dk.jens.backup/*; do if test basename $dir != "lib"; then chown -R u0_a118:u0_a118 $dir; chmod -R 700 $dir; fi; done

ls -l

drwx------ 2 u0_a118 u0_a118 4096 2016-01-09 16:04 cache
drwx------ 2 u0_a118 u0_a118 4096 2016-01-10 13:02 code_cache
drwx------ 2 u0_a118 u0_a118 4096 2016-01-09 19:21 shared_prefs

Second run:

for dir in /data/data/dk.jens.backup/*; do if test basename $dir != "lib"; then chown -R u0_a117:u0_a117 $dir; chmod -R 771 $dir; fi; done

ls -l

drwxrwx--x 2 u0_a117 u0_a117 4096 2016-01-09 16:04 cache
drwxrwx--x 2 u0_a117 u0_a117 4096 2016-01-10 13:02 code_cache
drwxrwx--x 2 u0_a117 u0_a117 4096 2016-01-09 19:21 shared_prefs

@jensstein
Copy link
Owner

so the line you label first run fails and second run succeeds? but am i correct that the only things you have changed are the permissions and ids? i can't really see how that should have helped when the problem was that it didn't set ownership at all. please describe what you did.
also please run the commands from explicitly from toybox since that's how they are run in oab. so test should be toybox test. and please use the -R flag on ls every time (maybe choose a different app with fewer files to show up in the output).

does android 6 not have a lib symlink in the data subdirectories? try if this one works maybe: https://drive.google.com/file/d/0B0bNUNWd2wPPakM5QVZiZWNUTDA/view?usp=sharing

@DocSniper
Copy link
Author

No, both lines succeeded, I just wanted to show you that. I removed the 3 appearances of toybox in your snippet.
The new test version of your app worked well.

@jensstein
Copy link
Owner

ok, so removing toybox from the line fixed it?
i guess it's then either toybox test or toybox basename which is the problem because the apk i linked runs toybox chown and toybox chmod. but it seems a little unlikely that should be the case. if you find out what's wrong, it would be nice to know, but i think i'll go with the fix in the linked apk if there aren't any problems with it.
thanks :)

@DocSniper
Copy link
Author

Yes, removing fixed it.

Tested the following:

toybox basename /sdcard

sdcard

if toybox test toybox basename /sdcard != "lib" ; then ls -l /sdcard ; fi

(no ls output)

Actually I saw after restoring some data that the lib symlink was/is missing, the link looks like this on Android 6:
lrwxrwxrwx 1 root root 30 2016-01-10 10:05 lib -> /data/app/APPname/lib/arm

@jensstein
Copy link
Owner

ok, so toybox test could be the problem. what happens if you run something that obviously should succeed like if toybox test 1 = 1; then echo ok; else echo fail; fi?
if that's not the problem then it might be something with the backticks. please try this: if toybox test "$(toybox basename /sdcard/)" = "sdcard"; then echo ok; else echo fail; fi
and just to rule out some misbehaving of the shell if: toybox test "$(toybox basename /sdcard/)" = "sdcard" && echo ok || echo fail

is the lib symlink also missing if you only restore the apk and not the data? if not does it then disappear when data is restored? and if it is missing at first, is it then different if you install an app manually by clicking the apk in the oab subdirectory (after it has been uninstalled)?

@DocSniper
Copy link
Author

All three command lines give me a "fail".

Will do the other tests later. ;-)

@DocSniper
Copy link
Author

Was too quick, number 3 gives me:

if: toybox test "$(toybox basename /sdcard/)" = "sdcard" && echo ok || echo fail

/system/bin/sh: if:: not found
fail

@jensstein
Copy link
Owner

ok, so unless i'm going crazy i think we can say that toybox test (or the implementation you are using at least) is broken. unless it has something to do with the shell the commands are running in. to determine which version you could run strings /system/bin/sh | grep VERSION. mine reads "KSH_VERSION=@(#)MIRBSD KSH R50 2014/10/07".

your error on number 3 is just because of my confusing formatting. you should just run toybox test "$(toybox basename /sdcard/)" = "sdcard" && echo ok || echo fail which i also think you did the first time around. it was to establish whether if had anything to do with it.

@DocSniper
Copy link
Author

I'm using CM13, latest nightly.

strings /system/bin/sh | grep VERSION

KSH_VERSION=@(#)MIRBSD KSH R50 2015/04/19

Here your modified third command:

toybox test "$(toybox basename /sdcard/)" = "sdcard" && echo ok || echo fail

fail

@DocSniper
Copy link
Author

When I start toybox it gives me "test" as included command, so it seems you are right, it's broken.

Without toybox in front of test:

test "$(toybox basename /sdcard/)" = "sdcard" && echo ok || echo fail

ok

@jensstein
Copy link
Owner

ok, if you could report that in the appropriate place that could be helpful if we need test in the future.
now we just need to figure out what's happening with the lib symlink :)

@DocSniper
Copy link
Author

Cyanogen does not allow to report bugs before any stable version was released, so I'm unsure were the best place to report this error could be.

Will test the lib problem later, actually we have some visitors for coffee and cake.

@jensstein
Copy link
Owner

ah ok, i don't know where the best place to report it is either. i might try to cross-compile the toybox source from http://www.landley.net/toybox/ and see if the problem is there too.
and just take your time with the lib thing :)

@DocSniper
Copy link
Author

Tested all the three cases but no lib symlink. So I installed a new app from f-droid, but no lib link?!? See yourself:

/data/data/cz.martykan.webtube # ls -l
total 40
drwxrwx--x 2 u0_a94 u0_a94 4096 2016-01-10 19:22 app_cache
drwxrwx--x 5 u0_a94 u0_a94 4096 2016-01-10 19:24 app_webview
drwxrwx--x 3 u0_a94 u0_a94 4096 2016-01-10 19:22 cache
drwxrwx--x 2 u0_a94 u0_a94 4096 2016-01-10 19:24 code_cache
drwxrwx--x 2 u0_a94 u0_a94 4096 2016-01-10 19:23 shared_prefs

@DocSniper
Copy link
Author

But this one is having the link:

/data/data/jackpal.androidterm # ls -l
total 32
drwxrwx--x 2 u0_a62 u0_a62 4096 2016-01-10 13:40 app_HOME
drwxrwx--x 2 u0_a62 u0_a62 4096 2016-01-10 13:40 cache
drwxrwx--x 2 u0_a62 u0_a62 4096 2016-01-10 14:11 code_cache
lrwxrwxrwx 1 root root 39 2016-01-10 13:40 lib -> /data/app/jackpal.androidterm-1/lib/arm
drwxrwx--x 2 u0_a62 u0_a62 4096 2016-01-10 13:41 shared_prefs

@DocSniper
Copy link
Author

With the second app it was like this:

  • after restoring data only --> no lib link
  • after restoring the app --> lib link is created

@jensstein
Copy link
Owner

ok, so it's probably only created if it's actually needed.
can you try if the apk from #116 (comment) can restore an app with a lib symlink?

@DocSniper
Copy link
Author

I performed the last test with this program version.

@jensstein
Copy link
Owner

brilliant :)
and it would be a good help if you could be alert about problems related to this in the next peroid of time since errors might not always get picked up in the return codes.

thanks for reporting and testing :)

@DocSniper
Copy link
Author

Yes OK, I'll keep my eyes open ;-)
Thank you too for diving into it.

jensstein added a commit that referenced this issue Jan 11, 2016
There seems to be a problem with the toybox implementation of test in at
least cm 13 so the line which calls chmod and chown has been rewritten a
bit for android versions 6 and above.
Cf. issue 116: #116
@DocSniper
Copy link
Author

@revuwa
Copy link

revuwa commented Mar 31, 2016

Thanks for that awesome app and your enthusiasm.

I've tested a workaround on my CM13 setup, which seems to work (for now).
I installed BusyBox over that app: https://f-droid.org/repository/browse/?fdid=ru.meefik.busybox and oandbackup automatically detects that and work with it.
A test backup/restore of several apps worked great after that.

I also could backup to external storage over this way:
I switched the 'backup folder' inside the preferences to my external SD-card.
A test backup said that the storage is read only, as described here: #111
So I created a folder with a file manager (in my case: Amaze: https://f-droid.org/repository/browse/?fdid=com.amaze.filemanager) on my SD-card, which shows a message, that 'write access is required'. Choose [open] here and select the folder under which you want to create the new folder.
So if you want to create .../Backup/{new_folder} choose 'Backup' here.
After that I was able to batch backup to that new folder on my external storage.
(But this workaround is temporary. After some minutes or a reboot, the write access to that new folder is gone again. The problem seems to be global: http://forum.xda-developers.com/galaxy-s3/help/official-cm13-external-sd-write-fix-apps-t3275394 and you should avoid workarounds/solutions like this: http://forum.xda-developers.com/galaxy-tab-pro-12-10-8/orig-development/5-1-x-cyanogenmod-13-0-nightlies-tab-t3256093/post64689181#post64689181, because adopted storage may cause bootloop: http://androidforums.com/threads/adopted-storage-in-cm13.963729/).

Only the restore from the external storage completely doesn't work, as it's described here:
#124

@mvglasow
Copy link

mvglasow commented Apr 6, 2016

Still not working for me. I'm on 0.2.11 (as published on F-Droid), CM13, and keep getting an error message about busybox missing (and restore fails because of missing commands). I have no custom path set for *box, thus the default should be used.

I see all changes that seem related to this issue were before 0.2.11, the only exception being 32bc079. That commit is about detecting busybox v. toybox, and the error I get seems to indicate oandbackup is looking for busybox when I have only toybox.

Is 0.2.11 supposed to work with CM13/toybox? Will I have to wait for the next release? Or are there still issues to be resolved?

@jensstein
Copy link
Owner

@mvglasow i only fixed the issue halfway before the release but 32bc079 should fix the rest.
just put in "toybox" in the preferences and it should work :) (if not, please report)

@mvglasow
Copy link

mvglasow commented Apr 7, 2016

Thanks, that did the trick! I did a test backup and restored it, both went through without any errors.

@Iey4iej3
Copy link

When will a new version available in F-Droid repo?

@jensstein
Copy link
Owner

@FrankEular not very soon i'm afraid. i don't have so much time at the moment.

@ildar
Copy link

ildar commented Aug 14, 2017 via email

@strugee
Copy link

strugee commented Aug 14, 2017

@ildar do you need something? This should be fixed (#116 (comment)) and you just sent an email to a lot of people subscribed to this issue or watching this repo.

@ildar
Copy link

ildar commented Aug 15, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants