Open takiainen opened 8 years ago
I'd like to add, that after the FC, when I start the app again, the screen remains grey, but I am able to open "preferences" normally. If I close the app again and delete its data via settings, restart the app the FC appears again.
thanks. can you try giving me a logcat with this one: https://drive.google.com/file/d/0B0bNUNWd2wPPQXlKVlBHVTNpVm8/view?usp=sharing i expect the crash to be fixed and it has some logging to narrow down the missing apps list.
Still grey background (no apps visible). Preferences is opened normally, but when I click search and then hit the top left corner "back" arrow, oandbackup force closes. Here's the log.
kalle@kalle-Latitude-D630:~$ adb shell ps | grep dk.jens.backup
u0_a60 15641 276 701024 51252 sysepoll 00000000 S dk.jens.backup
kalle@kalle-Latitude-D630:~$ adb logcat | grep 15641
01-31 18:28:56.337 2498 3774 I ActivityManager: Start proc 15641:dk.jens.backup/u0a60 for activity dk.jens.backup/.OAndBackup
01-31 18:28:56.366 15641 15641 I art : Late-enabling -Xcheck:jni
01-31 18:28:56.400 15641 15641 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm
01-31 18:28:56.452 15641 15674 I oandbackup: start init
01-31 18:28:56.453 15641 15674 I oandbackup: break 1
01-31 18:28:56.460 15641 15676 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
01-31 18:28:56.485 15641 15676 I Adreno-EGL:
sorry, i should have expected that one. please make a logcat with this: https://drive.google.com/file/d/0B0bNUNWd2wPPdFRuOWh1VUdWVjg/view?usp=sharing if there are no crashes, it might be a good idea to let it sit for a couple of minutes after opening oab before taking the logcat.
Still grey, no apps visible. Preferences and search seem to work (although obviously search doesn't find anything), but when I clicked "tools" --> FC.
kalle@kalle-Latitude-D630:~$ adb shell ps | grep dk.jens.backup
u0_a59 8038 272 700228 51400 sysepoll 00000000 S dk.jens.backup
kalle@kalle-Latitude-D630:~$ adb logcat | grep 8038
02-03 15:21:04.148 2501 3454 I ActivityManager: Start proc 8038:dk.jens.backup/u0a59 for activity dk.jens.backup/.OAndBackup
02-03 15:21:04.153 8038 8038 I art : Late-enabling -Xcheck:jni
02-03 15:21:04.194 8038 8038 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm
02-03 15:21:04.234 8038 8067 I oandbackup: start init
02-03 15:21:04.234 8038 8067 I oandbackup: break 1
02-03 15:21:04.251 8038 8077 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
02-03 15:21:04.275 8038 8077 I Adreno-EGL:
Tried clicking also "batch restore" eventhough I don't have anything in /sdcard/oandbackups folder. This resulted in FC.
kalle@kalle-Latitude-D630:~$ adb shell ps | grep dk.jens.backup
u0_a59 18644 272 692220 49184 sysepoll 00000000 S dk.jens.backup
kalle@kalle-Latitude-D630:~$ adb logcat | grep 18644
02-03 15:26:29.991 2501 3453 I ActivityManager: Start proc 18644:dk.jens.backup/u0a59 for activity dk.jens.backup/.OAndBackup
02-03 15:26:30.024 18644 18644 I art : Late-enabling -Xcheck:jni
02-03 15:26:30.068 18644 18644 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm
02-03 15:26:30.110 18644 18670 I oandbackup: start init
02-03 15:26:30.110 18644 18670 I oandbackup: break 1
02-03 15:26:30.120 18644 18674 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
02-03 15:26:30.133 18644 18674 I Adreno-EGL:
"batch backup" also leads to FC.
kalle@kalle-Latitude-D630:~$ adb shell ps | grep dk.jens.backup
u0_a59 20728 272 691368 49272 sysepoll 00000000 S dk.jens.backup
kalle@kalle-Latitude-D630:~$ adb logcat | grep 20728
02-03 15:29:37.584 2501 2540 I ActivityManager: Start proc 20728:dk.jens.backup/u0a59 for activity dk.jens.backup/.OAndBackup
02-03 15:29:37.605 20728 20728 I art : Late-enabling -Xcheck:jni
02-03 15:29:37.645 20728 20728 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm
02-03 15:29:37.699 20728 20746 I oandbackup: start init
02-03 15:29:37.699 20728 20746 I oandbackup: break 1
02-03 15:29:37.712 20728 20749 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
02-03 15:29:37.726 20728 20749 I Adreno-EGL:
ok, we've almost narrowed it down enough now. please run this one: https://drive.google.com/file/d/0B0bNUNWd2wPPbGdyNUZVV3h5Qk0/view?usp=sharing you don't need to look around in the menus - all those crashes are expected here. just leave it on the empty apps list and take a logcat after a while. (i'll fix the crashes when we find out what's causing the issue)
Here we go again. It took me such a long time, because I normally don't use Darkobas ROM (don't really like it). So in order to take these logcats, I always have to format my device and clean flash Darkobas. Quite time consuming process, but since I want to help I do this debugging business everytime I chance roms or just want to clean flash a new update.
This time I followed your advice and let oandbackup just sit on the empty app list for 8 minutes. But nothing really happened. All the log entries are from the very first minute:
kalle@kalle-Latitude-D630:~$ adb shell ps | grep dk.jens.backup
u0_a60 8249 260 692708 51292 sysepoll 00000000 S dk.jens.backup
kalle@kalle-Latitude-D630:~$ adb logcat | grep 8249
02-23 18:50:40.754 2451 2490 I ActivityManager: Start proc 8249:dk.jens.backup/u0a60 for activity dk.jens.backup/.OAndBackup
02-23 18:50:40.758 8249 8249 I art : Late-enabling -Xcheck:jni
02-23 18:50:40.800 8249 8249 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm
02-23 18:50:40.848 8249 8272 I oandbackup: start init
02-23 18:50:40.848 8249 8272 I oandbackup: break 1
02-23 18:50:40.851 8249 8272 I oandbackup: sc: break 1
02-23 18:50:40.851 8249 8272 I oandbackup: sc: break 2
02-23 18:50:40.851 8249 8272 I oandbackup: sc: break 3
02-23 18:50:40.851 8249 8272 I oandbackup: sc: break 5
02-23 18:50:40.863 8249 8278 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
02-23 18:50:40.881 8249 8278 I Adreno-EGL:
great :) we'll just take it in a time that's comfortable for you. i think i have it now. the bug is when gathering a list of users on the device. please try this apk: https://drive.google.com/file/d/0B0bNUNWd2wPPcFQwdXJYeVhtajA/view?usp=sharing
if it works then it's fine. otherwise please give me a logcat from it and please run these two commands:
pm list users
and
pm list users | $box sed -nr 's/.*\{([0-9]+):.*/\1/p'
(replace $box
with either busybox
or toybox
considering what's default on the rom. i would guess toybox
if they follow aosp).
New version doesn't work either. Here's logcat.
kalle@kalle-Latitude-D630:~$ adb shell ps | grep dk.jens.backup
u0_a60 5388 266 700816 51452 sysepoll 00000000 S dk.jens.backup
kalle@kalle-Latitude-D630:~$ adb logcat | grep 5388
03-22 17:36:53.320 2441 2441 W PathParser: Points are too far apart 4.030360538880159
03-22 17:38:26.936 1536 2816 I ActivityManager: Start proc 5388:dk.jens.backup/u0a60 for activity dk.jens.backup/.OAndBackup
03-22 17:38:26.956 5388 5388 I art : Late-enabling -Xcheck:jni
03-22 17:38:27.001 5388 5388 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm
03-22 17:38:27.068 5388 5406 I oandbackup: start init
03-22 17:38:27.068 5388 5406 I oandbackup: break 1
03-22 17:38:27.069 5388 5406 I oandbackup: sc: break 1
03-22 17:38:27.069 5388 5406 I oandbackup: sc: break 2
03-22 17:38:27.069 5388 5406 I oandbackup: sc: break 3
03-22 17:38:27.069 5388 5406 I oandbackup: sc: break 5
03-22 17:38:27.069 5388 5406 I oandbackup: gu: break 1
03-22 17:38:27.069 5388 5406 I oandbackup: gu: break 2
03-22 17:38:27.069 5388 5406 I oandbackup: gu: break 3
03-22 17:38:27.069 5388 5406 I oandbackup: gu: break 4
03-22 17:38:27.080 5388 5410 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
03-22 17:38:27.087 5388 5406 I oandbackup: gu: break 5
03-22 17:38:27.103 5388 5410 I Adreno-EGL:
shell@A0001:/ $ pm list users Users: UserInfo{0:Owner:13} running
130|shell@A0001:/ $ pm list users | toybox sed -nr 's/.{([0-9]+):./\1/p'
sed: No such file or directory
1|shell@A0001:/ $ pm list users | busybox sed -nr 's/.{([0-9]+):./\1/p'
0
Found out that also with Dirty Unicorns -rom oab has same issue. Here's logcat:
kalle@kalle-Latitude-D630:~$ adb shell ps | grep dk.jens.backupu0_a50 11049 3653 927100 53208 sysepoll b6d56964 S dk.jens.backup
kalle@kalle-Latitude-D630:~$ adb logcat | grep 11049
03-22 18:17:26.138 4922 4937 I ActivityManager: Start proc 11049:dk.jens.backup/u0a50 for activity dk.jens.backup/.OAndBackup
03-22 18:17:26.143 11049 11049 I art : Late-enabling -Xcheck:jni
03-22 18:17:26.185 11049 11049 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm
03-22 18:17:26.230 11049 11070 I oandbackup: start init
03-22 18:17:26.230 11049 11070 I oandbackup: break 1
03-22 18:17:26.230 11049 11070 I oandbackup: sc: break 1
03-22 18:17:26.230 11049 11070 I oandbackup: sc: break 2
03-22 18:17:26.230 11049 11070 I oandbackup: sc: break 3
03-22 18:17:26.230 11049 11070 I oandbackup: sc: break 5
03-22 18:17:26.230 11049 11070 I oandbackup: gu: break 1
03-22 18:17:26.230 11049 11070 I oandbackup: gu: break 2
03-22 18:17:26.230 11049 11070 I oandbackup: gu: break 3
03-22 18:17:26.230 11049 11070 I oandbackup: gu: break 4
03-22 18:17:26.240 11049 11075 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
03-22 18:17:26.244 11049 11070 I oandbackup: gu: break 5
03-22 18:17:26.275 11049 11075 I Adreno-EGL:
And here's the output of "pm" commands while on Dirty Unicorns:
root@android:/ # pm list users Users: UserInfo{0:Owner:13} running root@android:/ # pm list users | busybox sed -nr 's/.{([0-9]+):./\1/p' UserInf0wner:13} running
hmm, the pm
output is not weird, so it's not that. you did forget the stars and a backslash in the regex though, but it's correct in the running code so it doesn't matter. it's supposed to read 's/.*\{([0-9]+):.*/\\1/p'
now my guess is that something is blocking the sed process, so please try this one when you have time and opportunity :) https://drive.google.com/file/d/0B0bNUNWd2wPPWjc0eUM3TU5kTXc/view?usp=sharing
(Good job jensstein, the latest version works on Dirty Unicorns rom! )
EDIT: Oops, it doesn't work afterall. It does show you the list of apps, but when trying to restore a backup, it gives you several errors:
sed: No such file or directory sed: write: Broken pipe sed: No such file or directory setPermissions error: could not find permissions for /data/user/0/org.smssecure.smssecure
@:~$ adb shell ps | grep dk.jens.backup
u0_a48 8946 3581 951980 64440 sysepoll b6ca0964 S dk.jens.backup
@:~$ adb logcat | grep 8946
03-26 22:25:12.389 4837 5680 I ActivityManager: Start proc 8946:dk.jens.backup/u0a48 for activity dk.jens.backup/.OAndBackup
03-26 22:25:12.407 8946 8946 I art : Late-enabling -Xcheck:jni
03-26 22:25:12.452 8946 8946 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm
03-26 22:25:12.490 8946 8963 I oandbackup: start init
03-26 22:25:12.490 8946 8963 I oandbackup: break 1
03-26 22:25:12.491 8946 8963 I oandbackup: gu: break 1
03-26 22:25:12.491 8946 8963 I oandbackup: gu: break 2
03-26 22:25:12.491 8946 8963 I oandbackup: gu: break 3
03-26 22:25:12.491 8946 8963 I oandbackup: gu: break 4
03-26 22:25:12.505 8946 8963 I oandbackup: gu: break 5
03-26 22:25:12.505 8946 8963 I oandbackup: gu: break 6
03-26 22:25:12.505 8946 8963 I oandbackup: gu: break 7
03-26 22:25:12.505 8946 8967 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
03-26 22:25:12.534 8946 8967 I Adreno-EGL:
root@android:/ # pm list users Users: UserInfo{0:Owner:13} running root@android:/ # pm list users | $box sed -nr 's/.{([0-9]+):./\1/p' sed: No such file or directory
EDIT: I didn't forget the * -symbol, it seems that it disappears when I copy it from terminal into this text field
Well now I don't really understand what has been happening during last few months: Now I just installed the 0.2.11 oab version from F-DROID, and everything works. Comments? :)
hmm, i think this is a combination of two things. one is the bug in oab that you discovered that was stalling the startup - this one is now fixed.
the other seems to be a bug possibly in the shell of the roms you are testing. one reason for sed exiting with ENOENT / "No such file or directory" might be that something happens with stdin so it cannot read it. try running something like echo "hello world" | sed 's/hello/hi/'
another reason might be that pm
dies before its output is delivered to sed. try running pm list users | cat
to see if it handles piping okay - it should give the same output as running it without the pipe and cat
.
if possible, please try with both toybox and busybox. and preferably, if you have the setup, self-compiled versions of them. i slightly suspect that the issue originates in a faulty toybox in the rom (if it's android 6).
Enoent sometimes happens when busybox doesn't know an option and treats it as another argument then seeks for a file with the name.
ah yes, that would also make sense. the default *box of that system might just be compiled without sed. oab needs to have a check for the required tools.
Just installed the latest Paranoid Android and pumped into this same "sed" -issue. Cannot restore my apps.
shell@bacon:/ $ echo "hello world" | sed 's/hello/hi/' hihello world
130|shell@bacon:/ $ pm list users | cat Users: UserInfo{0:Owner:13} running
Then I installed busybox from Fdroid, replaced "toybox" with "busybox" from oab's preferences and then oab started working normally !
Maybe faulty toybox as you suspected ? Any idea where is the fault exactly, and should I inform PA developers?
yes, it seems to be a bug in the sed implementation. i would report it to the nearest source of your rom, so if you are using an official paranoid build i would report it with them. they seem to have a bugtracker here: https://paranoidandroid.atlassian.net/projects/AOSPALP/issues/ but it also seems to be completely empty. also, it seems from their manifest https://github.com/AOSPA/manifest/blob/marshmallow/default.xml that they get toybox directly from the android repo: https://android.googlesource.com/platform/external/toybox/. i don't know if it can be cross-compiled like normal toybox or if it needs to be build with the rest of the android code. i couldn't get i building but i didn't try very long.
if you have an armv7 device, could you send me your broken toybox binary? i think i would like to make some code to sanity check the various external programs.
I just switched rom to candysix.. and here toybox works. But I could request this binary for you at PA rom xda oneplus thread. But did you mean /system/bin/toybox -file ? And yes, oneplus one seems to be armv7 device.
Xda user posted it here: http://downloads.hostingsharedbox.com/jake/toybox
Hopefully it is the correct file and you'll find useful. I'd like to know too if you find something interesting!
cool, i can reproduce your error with this toybox binary. thanks :)
it's weird because the git logs show that the official android source version of toybox contains the same recent commits as the version of cm which i use and which works correctly: https://android.googlesource.com/platform/external/toybox/+log/master/toys/posix/sed.c - https://github.com/CyanogenMod/android_external_toybox/commits/892c602b10e745977ca161d06f1a90ac6dfc3728/toys/posix/sed.c
the rest of toybox seems to contain some cm-specific commits so that could be an influence of course. and the aosp version seems to have more recent commits at the moment so that could also be significant.
another posibility is that the issue is caused by a specific compiler version or compiler optimizations. this is probably the most likely.
Ok so here we go: I clean flashed Darkobas MM ROM (for Oneplus one) in order to get this logcat of oandbackup FC when clicking "preferences". I installed busybox too. And Supersu 2.52 beta installed. Everything else stock.
Something else is wrong too, since oandbackup doesn't show list of apps as usually, but instead just grey background (see screenshot here: http://i.imgur.com/Ne92mPw.png )
kalle@kalle-Latitude-D630:~$ adb shell ps | grep dk.jens.backup u0_a59 11003 273 692392 50980 sysepoll 00000000 S dk.jens.backup kalle@kalle-Latitude-D630:~$ adb logcat | grep 11003 01-31 00:24:11.970 2505 2544 I ActivityManager: Start proc 11003:dk.jens.backup/u0a59 for activity dk.jens.backup/.OAndBackup 01-31 00:24:12.018 11003 11003 I art : Late-enabling -Xcheck:jni 01-31 00:24:12.117 11003 11003 W System : ClassLoader referenced unknown path: /data/app/dk.jens.backup-1/lib/arm 01-31 00:24:12.251 11003 11021 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true 01-31 00:24:12.455 11003 11021 I Adreno-EGL:: EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8974_LA.BF.1.1.3_RB1__release_AU (Ia6c73e7530)
01-31 00:24:12.455 11003 11021 I Adreno-EGL: OpenGL ES Shader Compiler Version: E031.29.00.00
01-31 00:24:12.455 11003 11021 I Adreno-EGL: Build Date: 12/04/15 Fri
01-31 00:24:12.455 11003 11021 I Adreno-EGL: Local Branch: mybranch17080070
01-31 00:24:12.455 11003 11021 I Adreno-EGL: Remote Branch: quic/LA.BF.1.1.3_rb1.5
01-31 00:24:12.455 11003 11021 I Adreno-EGL: Local Patches: NONE
01-31 00:24:12.455 11003 11021 I Adreno-EGL: Reconstruct Branch: NOTHING
01-31 00:24:12.458 11003 11021 I OpenGLRenderer: Initialized EGL, version 1.4
01-31 00:24:40.183 11003 11003 D AndroidRuntime: Shutting down VM
01-31 00:24:40.184 11003 11003 E AndroidRuntime: FATAL EXCEPTION: main
01-31 00:24:40.184 11003 11003 E AndroidRuntime: Process: dk.jens.backup, PID: 11003
01-31 00:24:40.184 11003 11003 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{dk.jens.backup/dk.jens.backup.Preferences}: java.lang.NullPointerException: Attempt to invoke virtual method 'void dk.jens.backup.AppInfoAdapter.setLocalTimestampFormat(boolean)' on a null object reference
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.app.ActivityThread.access$900(ActivityThread.java:150)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void dk.jens.backup.AppInfoAdapter.setLocalTimestampFormat(boolean)' on a null object reference
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at dk.jens.backup.OAndBackup.onSharedPreferenceChanged(OAndBackup.java:543)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.app.SharedPreferencesImpl$EditorImpl.notifyListeners(SharedPreferencesImpl.java:479)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.app.SharedPreferencesImpl$EditorImpl.apply(SharedPreferencesImpl.java:387)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.preference.PreferenceManager.setNoCommit(PreferenceManager.java:536)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:277)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.preference.PreferenceActivity.addPreferencesFromResource(PreferenceActivity.java:1521)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at dk.jens.backup.Preferences.onCreate(Preferences.java:16)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6251)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
01-31 00:24:40.184 11003 11003 E AndroidRuntime: ... 9 more
01-31 00:24:44.959 11003 11003 I Process : Sending signal. PID: 11003 SIG: 9
01-31 00:24:45.047 2505 3511 I libprocessgroup: Killing pid 11020 in uid 10059 as part of process group 11003
01-31 00:24:45.187 2505 3511 I ActivityManager: Process dk.jens.backup (pid 11003) has died
This kind of behavior I've only encountered with this particular MM ROM. Hopefully this logcat helps you.