Closed takiainen closed 7 years ago
Here's log (but it shows just one line after starting the backup)
adb logcat | grep 22702
10-20 10:24:01.783 8288 9244 I ActivityManager: Start proc 22702:dk.jens.backup/u0a73 for activity dk.jens.backup/.OAndBackup
10-20 10:24:01.852 22702 22702 I art : Starting a blocking GC AddRemoveAppImageSpace
10-20 10:24:01.854 22702 22702 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm
10-20 10:24:01.943 22702 22729 I Adreno-EGL:
Doesn't work on Slim7 either. First tried using the toybox that came with the rom, and then installed busybox too. But backing up just doesn't work.
Any ideas?
sorry for the late reply. could you make a logcat with this apk: https://drive.google.com/file/d/0B0bNUNWd2wPPd0ZSb0FIWHg1eXc/view?usp=sharing it has a lot of logging so we can hopefully pinpoint where the issue starts.
No problems! Here we go (I included everything it produced, then after a while I just killed the app):
adb shell ps | grep dk.jens.backup
u0_a70 10541 3269 1149564 103872 sysepoll b517de40 S dk.jens.backup
adb logcat | grep 10541
10-31 21:17:07.819 4499 5382 I ActivityManager: Start proc 10541:dk.jens.backup/u0a70 for activity dk.jens.backup/.OAndBackup
10-31 21:17:07.875 10541 10541 I art : Late-enabling -Xcheck:jni
10-31 21:17:08.026 10541 10541 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm
10-31 21:17:08.123 10541 10541 I oandbackup: p: true
10-31 21:17:08.208 10541 10566 I Adreno-EGL:
great. so this is both an attempt at a fix and some more logging if it doesn't work: https://drive.google.com/file/d/0B0bNUNWd2wPPTzRvaWZTd2JFNFU/view?usp=sharing
I appear to have the same issue on nougat. Let me know if you need another tester.
Thanks again @jensstein for the great app and support. Been a happy oandbackup user for several years now!
Doesn't work yet. Here's log:
adb shell ps | grep dk.jens.backup
u0_a70 20059 3269 1151684 101768 sysepoll b517de40 S dk.jens.backup
adb logcat | grep 20059
11-01 07:16:53.531 4499 10342 I ActivityManager: Start proc 20059:dk.jens.backup/u0a70 for activity dk.jens.backup/.OAndBackup
11-01 07:16:53.607 20059 20059 I art : Late-enabling -Xcheck:jni
11-01 07:16:53.732 20059 20059 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-2/lib/arm
11-01 07:16:53.836 20059 20059 I oandbackup: p: true
11-01 07:16:53.970 20059 20085 I Adreno-EGL:
could you try running this command in a terminal and see what happens:
cp -RL /data/user/0/org.smssecure.smssecure /storage/emulated/0/oandbackups/org.smssecure.smssecure
this is the command oab tries to run when it stalls.
@78c59635bdd8 you could try running the same apks as @takiainen and if your logcat shows that another breakpoint has been reached i would like to hear it. thanks for your support :)
OK, looks like I got the similar output. This is with your most recent apk, posted in this thread, trying to backup the Lightning browser (both data and apk):
11-01 21:06:38.962 559 2121 I ActivityManager: Start proc 14265:dk.jens.backup/u0a104 for activity dk.jens.backup/.OAndBackup 11-01 21:06:38.967 14265 14265 I art : Late-enabling -Xcheck:jni 11-01 21:06:39.018 14265 14265 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm64 11-01 21:06:39.113 14265 14265 I oandbackup: p: true 11-01 21:06:39.348 14265 14284 I OpenGLRenderer: Initialized EGL, version 1.4 11-01 21:06:39.348 14265 14284 D OpenGLRenderer: Swap behavior 2 11-01 21:06:39.463 14292 14292 D su : remote req pid: 14265 11-01 21:06:40.579 14348 14348 D su : remote req pid: 14265 11-01 21:06:41.835 14265 14281 E oandbackup: acr.browser.lightning: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject 11-01 21:06:43.612 14265 14281 E oandbackup: oandbackup.log: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject 11-01 21:07:05.722 14265 14435 I oandbackup: backup: Lightning 11-01 21:07:05.723 14265 14435 I oandbackup: break 1 11-01 21:07:05.730 14265 14435 I oandbackup: break 2 11-01 21:07:05.731 14265 14435 I oandbackup: break 3 11-01 21:07:05.731 14265 14435 I oandbackup: break 4 11-01 21:07:05.731 14265 14435 I oandbackup: cmdline: cp -RL /data/user/0/acr.browser.lightning /storage/emulated/0/oandbackups/acr.browser.lightning 11-01 21:07:05.731 14265 14435 I oandbackup: cp /data/app/acr.browser.lightning-1/base.apk /storage/emulated/0/oandbackups/acr.browser.lightning 11-01 21:07:05.731 14265 14435 I oandbackup: break 5 backupmode 3 11-01 21:07:05.735 14265 14435 I oandbackup: break 6 11-01 21:07:05.735 14265 14435 I oandbackup: break 7 11-01 21:07:05.735 14265 14435 I oandbackup: break 8 11-01 21:07:05.739 14265 14435 I oandbackup: break 9 11-01 21:07:05.740 14265 14435 I oandbackup: break 10 11-01 21:07:05.910 14444 14444 D su : remote req pid: 14265
By the way, this may not be relevant to note for you, but this is a factory image of Nougat, straight from Google (except for being rooted and having TWRP).
Actually I tried the command already before once I saw the last log, and the command runs fine. It copies the org.smssecure.smssecure folder.
One more thing: I need to run the command as root. Otherwise it says permission denied.
@takiainen , when you backed up that data on the command line, did it show up in oandbackup as a new backup for that app? I thinking, as an interim workaround, to just create a shell script that I can run as root to do all of these backups and then use oandbackup for restores?
oandbackup seems to store the backups as a zip file, which this command naturally doesn't create. So if your script makes the the compressed file also, then I don't see any reason why the restore process should not work. Please share the script if you make one!
@jensstein Any news regarding this issue? Did it turn out to be more complex than assumed? thx
@takiainen I'll have to wait for jensstein. I tried making a zip file of one app. Oandbackup seemed to restore it, but my customized settings in the app were gone. Hopefully jensstein can figure out what is going on. @jensstein let me know if I can do anything else to assist.
sorry, i just have en acute lack of time. and yes, it's not entirely clear why it stalls. but please try this one: https://drive.google.com/file/d/0B0bNUNWd2wPPQlB6WkxBRUtNTWs/view?usp=sharing
@78c59635bdd8 if you want to script the backup process you should do three things:
1) make a directory under the backup directory with the package name of the app in question. e.g. dk.jens.backup
2) zip up the data directory of the app. e.g. /data/user/0/dk.jens.backup
3) make a metadata file and put it next to the zip. it should be named after the package name and end in .log
. it should have contents like this:
{
"label": "oandbackup",
"versionName": "0.2.11",
"versionCode": 17,
"packageName": "dk.jens.backup",
"sourceDir": "\/data\/app\/dk.jens.backup-1\/base.apk",
"dataDir": "\/data\/user\/0\/dk.jens.backup",
"lastBackupMillis": 1471770751198,
"isEncrypted": false,
"isSystem": false,
"backupMode": 3
}
backupMode should be 1 if you only have apk backed up, 2 if you only have data and 3 if you have both apk and data. let me know if you have any problems :)
The latest version FC's right from the start. I mean the app doesn't start at all. Cannot take log either.
But thanks anyway for managing to find some time for this! We are not in a hurry.
apologies, that was too hasty. this one should work: https://drive.google.com/file/d/0B0bNUNWd2wPPTjJ3T25KaEVQd2c/view?usp=sharing
Thanks @jensstein. Unfortunately, it looks like the same results:
ck101:platform-tools cibkw$ ./adb logcat | grep 7751 11-19 09:10:47.648 827 1645 I ActivityManager: Start proc 7751:dk.jens.backup/u0a113 for activity dk.jens.backup/.OAndBackup 11-19 09:10:47.654 7751 7751 I art : Late-enabling -Xcheck:jni 11-19 09:10:47.723 7751 7751 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm 11-19 09:10:47.793 7751 7751 I oandbackup: p: true 11-19 09:10:47.862 7751 7771 I Adreno : QUALCOMM build : 74df444, I409c65498b 11-19 09:10:47.862 7751 7771 I Adreno : Build Date : 06/22/16 11-19 09:10:47.862 7751 7771 I Adreno : OpenGL ES Shader Compiler Version: XE031.08.00.02 11-19 09:10:47.862 7751 7771 I Adreno : Local Branch : N16 11-19 09:10:47.862 7751 7771 I Adreno : Remote Branch : 11-19 09:10:47.862 7751 7771 I Adreno : Remote Branch : 11-19 09:10:47.862 7751 7771 I Adreno : Reconstruct Branch : 11-19 09:10:47.867 7751 7771 I OpenGLRenderer: Initialized EGL, version 1.4 11-19 09:10:47.868 7751 7771 D OpenGLRenderer: Swap behavior 1 11-19 09:10:47.914 7778 7778 D su : remote req pid: 7751 11-19 09:10:48.939 7823 7823 D su : remote req pid: 7751 11-19 09:10:51.311 7751 7767 E oandbackup: customlist0: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject 11-19 09:10:51.311 7751 7767 E oandbackup: customlist1: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject 11-19 09:10:51.312 7751 7767 E oandbackup: customlist2: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject 11-19 09:10:51.313 7751 7767 E oandbackup: oandbackup.apk: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject 11-19 09:10:51.313 7751 7767 E oandbackup: oandbackup.log: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject 11-19 09:10:56.400 7751 7771 D OpenGLRenderer: endAllActiveAnimators on 0x8e309900 (MenuPopupWindow$MenuDropDownListView) with handle 0x954d9c10 11-19 09:11:18.098 7751 7908 I oandbackup: backup: GetBack GPS 11-19 09:11:18.098 7751 7908 I oandbackup: break 1 11-19 09:11:18.103 7751 7908 I oandbackup: break 2 11-19 09:11:18.103 7751 7908 I oandbackup: break 3 11-19 09:11:18.103 7751 7908 I oandbackup: break 4 11-19 09:11:18.104 7751 7908 I oandbackup: cmdline: cp /data/app/com.github.ruleant.getback_gps-1/base.apk /storage/emulated/0/oandbackups/com.github.ruleant.getback_gps 11-19 09:11:18.104 7751 7908 I oandbackup: break 5 backupmode 1 11-19 09:11:18.109 7751 7908 I oandbackup: break 6 11-19 09:11:18.109 7751 7908 I oandbackup: break 7 11-19 09:11:18.110 7751 7908 I oandbackup: break 8 11-19 09:11:18.110 7751 7908 I oandbackup: break 9 11-19 09:11:18.110 7751 7908 I oandbackup: break 10 11-19 09:11:18.256 7918 7918 D su : remote req pid: 7751 11-19 09:11:38.709 7955 7955 D su : remote req pid: 7751
I opened the app again and attempted a backup one more time, this time I let the backup job go for longer, while still running the logcat. I saw some stuff after some additional time that might , or might not be helpful:
11-19 09:26:33.676 9236 9414 I oandbackup: backup: GetBack GPS 11-19 09:26:33.676 9236 9414 I oandbackup: break 1 11-19 09:26:33.680 9236 9414 I oandbackup: break 2 11-19 09:26:33.680 9236 9414 I oandbackup: break 3 11-19 09:26:33.681 9236 9414 I oandbackup: break 4 11-19 09:26:33.681 9236 9414 I oandbackup: cmdline: cp /data/app/com.github.ruleant.getback_gps-1/base.apk /storage/emulated/0/oandbackups/com.github.ruleant.getback_gps 11-19 09:26:33.681 9236 9414 I oandbackup: break 5 backupmode 1 11-19 09:26:33.687 9236 9414 I oandbackup: break 6 11-19 09:26:33.688 9236 9414 I oandbackup: break 7 11-19 09:26:33.688 9236 9414 I oandbackup: break 8 11-19 09:26:33.688 9236 9414 I oandbackup: break 9 11-19 09:26:33.688 9236 9414 I oandbackup: break 10 11-19 09:26:33.822 9425 9425 D su : remote req pid: 9236 11-19 09:27:08.415 9470 9470 D su : remote req pid: 9236 11-19 09:27:09.444 9236 9236 I Choreographer: Skipped 72 frames! The application may be doing too much work on its main thread. 11-19 09:28:00.790 9537 9537 D su : remote req pid: 9236 11-19 09:28:02.021 9236 9236 I Choreographer: Skipped 85 frames! The application may be doing too much work on its main thread. 11-19 09:29:24.264 9617 9617 D su : remote req pid: 9236 11-19 09:29:25.353 9236 9236 I Choreographer: Skipped 76 frames! The application may be doing too much work on its main thread.
Doesn't work here either. Here's the log.
11-22 16:07:18.702 2283 2283 I art : Late-enabling -Xcheck:jni
11-22 16:07:18.767 2283 2283 I art : Starting a blocking GC AddRemoveAppImageSpace
11-22 16:07:18.768 2283 2283 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm
11-22 16:07:18.843 2283 2283 I oandbackup: p: true
11-22 16:07:18.888 2283 2310 I Adreno-EGL:
I can reproduce this issue on my Nexus 5 running CM14.1 with similar logs as above.
Another Nexus 5 user here running CM14.1. My output, which is very similar to the last two provided logs (but using backupmode 3
). Sorry if I'm being noisy in the GitHub logs, don't have much more to contribute right now:
alex@desktop-pc $> adb logcat | grep 16555
12-15 09:25:52.315 29703 29721 I ActivityManager: Start proc 16555:dk.jens.backup/u0a133 for activity dk.jens.backup/.OAndBackup
12-15 09:25:52.323 16555 16555 I art : Late-enabling -Xcheck:jni
12-15 09:25:52.412 16555 16555 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm
12-15 09:25:52.541 16555 16555 I oandbackup: p: true
12-15 09:25:52.607 16555 16586 I Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 10/21/15, 369a2ea, I96aee987eb
12-15 09:25:52.611 16555 16586 I OpenGLRenderer: Initialized EGL, version 1.4
12-15 09:25:52.611 16555 16586 D OpenGLRenderer: Swap behavior 1
12-15 09:26:01.033 16555 16585 E oandbackup: at.bitfire.davdroid: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject
12-15 09:26:01.090 16555 16585 E oandbackup: com.amazon.now: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject
12-15 09:26:02.544 16555 16585 E oandbackup: com.doodle.android: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject
12-15 09:26:02.772 16555 16566 I art : Background partial concurrent mark sweep GC freed 1121(46KB) AllocSpace objects, 0(0B) LOS objects, 31% free, 34MB/50MB, paused 8.336ms total 20.364ms
12-15 09:26:04.636 16555 16585 E oandbackup: com.mobilepearls.sokoban: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject
12-15 09:26:06.347 16555 16585 E oandbackup: oandbackup.log: error while reading logfile: org.json.JSONException: Value java.io.FileNotFoundException of type java.lang.String cannot be converted to JSONObject
12-15 09:27:09.009 16555 16555 I oandbackup: p: true
12-15 09:27:09.858 16555 16555 I oandbackup: p: true
12-15 09:27:46.944 16555 17116 I oandbackup: backup: Sokoban
12-15 09:27:46.945 16555 17116 I oandbackup: break 1
12-15 09:27:46.954 16555 17116 I oandbackup: break 2
12-15 09:27:46.954 16555 17116 I oandbackup: break 3
12-15 09:27:46.954 16555 17116 I oandbackup: break 4
12-15 09:27:46.961 16555 17116 I oandbackup: cmdline: cp -RL /data/user/0/com.mobilepearls.sokoban /storage/emulated/0/oandbackups/com.mobilepearls.sokoban
12-15 09:27:46.961 16555 17116 I oandbackup: cp /data/app/com.mobilepearls.sokoban-1/base.apk /storage/emulated/0/oandbackups/com.mobilepearls.sokoban
12-15 09:27:46.961 16555 17116 I oandbackup: break 5 backupmode 3
12-15 09:27:46.996 16555 17116 I oandbackup: break 6
12-15 09:27:46.996 16555 17116 I oandbackup: break 7
12-15 09:27:46.996 16555 17116 I oandbackup: break 8
12-15 09:27:47.000 16555 17116 I oandbackup: break 9
12-15 09:27:47.001 16555 17116 I oandbackup: break 10
CM14.1 is a nightly (from two days ago more or less). The busybox
has been installed through the ru.meefik.busybox
package (BusyBox package at F-Droid).
thanks for the input from you all. i will try installing android 7 on one of my own devices tomorrow and see if i can reproduce the issue myself. i think i need to have my hands on it to fix this.
does this one work: https://drive.google.com/open?id=0B0bNUNWd2wPPTjJ3T25KaEVQd2c (i know the link is the same as the last, but the file should be different. md5: 9534d56c5d145f3cc2cfdd866d0a24f9)
@jensstein you fixed it! I tested both an apk only backup and a backup of apk+data. In the app that I backed up apk+data, I modified some data just before taking the backup. Both jobs completed! I deleted both apps and then restored from the backups I had just taken. Both restores worked, of course. For the app that I had backed up apk+data, the recently modified data was restored. Great job!
It indeed works, thanks a lot ! Mind sharing what was the problem? And will you push this to F-Droid to let others continue to enjoy it too on Nougat?
@jensstein I can confirm that your latest version works as intended (md5: 9534d56c5d145f3cc2cfdd866d0a24f9)
Thank you.
great :) the problem was just that the output stream wasn't flushed after writing the last command. i had just forgotten about it in the code that does the backups - all the other places that call external commands have flushing. so it was a one line fix.
i will make a release sometime soon so people using f-droid also get the fix.
I'm currently running CM14 based TugaROM and just noticed that while restoring backups goes as usual, I cannot make new backups. It just loops the circle animation for ever and says "backup", but nothing happens. I have to force close the app. The app has storage permission.