BOINC / boinc

Open-source software for volunteer computing and grid computing.
https://boinc.berkeley.edu
GNU Lesser General Public License v3.0
2.03k stars 448 forks source link

Feature request: [Android] Add table chart for space storage. #3660

Open talregev opened 4 years ago

talregev commented 4 years ago

Describe the problem A clear and concise description of the problem you're looking to solve. I cannot see the space storage of boinc that is currently using for projects.

Describe the solution you'd like A clear and concise description of what you want to happen. Please add a table chart that specify space storage - Total and per project like windows client.

Additional context Add any other context or screenshots about the feature request here. Please add this two table charts:

Total table space storage chart: space storage table chart

Projects table space storage chart: Disk usage by BOINC projects

talregev commented 4 years ago

I want to implement this feature.

talregev commented 4 years ago

Here a glimpse how it going to look like: new storage menu: Screenshot_20200502-233031_BOINC

talregev commented 4 years ago

Someone can help with this issue? Maybe I doing something wrong. I take the assets from 7.16.3. apk and compile the android from the master. When I choose to add project it crush instantly. Do I missing something? I try on android 9 and android 7.2. same results.

Error log from android 9, one plus one lineageos:


05/03 23:38:59: Launching 'app' on OnePlus A0001.
$ adb shell am start -n "edu.berkeley.boinc/edu.berkeley.boinc.SplashActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 7153 on device 'oneplus-a0001-675c4369'.
Connected to process 7094 on device 'oneplus-a0001-675c4369'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/.berkeley.boin: Late-enabling -Xcheck:jni
W/System.err: java.io.FileNotFoundException: /jacoco.exec (Read-only file system)
W/System.err:     at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:308)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:238)
W/System.err:     at org.jacoco.agent.rt.internal_28bab1d.output.FileOutput.openFile(:67)
        at org.jacoco.agent.rt.internal_28bab1d.output.FileOutput.startup(:49)
        at org.jacoco.agent.rt.internal_28bab1d.Agent.startup(:122)
        at org.jacoco.agent.rt.internal_28bab1d.Agent.getInstance(:50)
W/System.err:     at org.jacoco.agent.rt.internal_28bab1d.Offline.<clinit>(:31)
        at org.jacoco.agent.rt.internal_28bab1d.Offline.getProbes(:51)
        at edu.berkeley.boinc.SplashActivity.a(Unknown Source:13)
W/System.err:     at edu.berkeley.boinc.SplashActivity.<clinit>(Unknown Source:0)
        at java.lang.Class.newInstance(Native Method)
W/System.err:     at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:69)
        at androidx.core.app.CoreComponentFactory.instantiateActivity(:45)
W/System.err:     at android.app.Instrumentation.newActivity(Instrumentation.java:1215)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2869)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
W/System.err:     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:6718)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
D/BOINC_GUI: SplashActivity onResume()
D/OpenGLRenderer: Skia GL Pipeline
I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8974_LA.BF.1.1.3_RB1__release_AU (I741a3d36ca)
    OpenGL ES Shader Compiler Version: E031.29.00.00
    Build Date: 04/04/16 Mon
    Local Branch: mybranch19053788
    Remote Branch: quic/LA.BF.1.1.3_rb1.12
    Local Patches: NONE
    Reconstruct Branch: NOTHING
I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
D/vndksupport: Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
D/vndksupport: Loading /vendor/lib/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace.
D/vndksupport: Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@dceea53
W/.berkeley.boin: Accessing hidden method Landroid/view/View;->getAccessibilityDelegate()Landroid/view/View$AccessibilityDelegate; (light greylist, linking)
W/.berkeley.boin: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
W/.berkeley.boin: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
W/.berkeley.boin: Accessing hidden method Landroid/widget/TextView;->getTextDirectionHeuristic()Landroid/text/TextDirectionHeuristic; (light greylist, linking)
W/BOINC_GUI: TasksActivity: Could not load data, clientStatus not initialized.
W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
D/vndksupport: Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@d245e0e
W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
D/vndksupport: Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
E/BOINC_GUI: BOINCActivity onServiceDisconnected
W/BOINC_GUI: android.os.DeadObjectException
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(Binder.java:1127)
        at edu.berkeley.boinc.client.u$a$a.h(:1700)
        at edu.berkeley.boinc.attach.SelectionListActivity$d.a(:248)
        at edu.berkeley.boinc.attach.SelectionListActivity$d.doInBackground(:240)
        at android.os.AsyncTask$2.call(AsyncTask.java:333)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
W/BOINC_GUI: UpdateProjectListAsyncTask: failed to retrieve data, retry....
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
    Process: edu.berkeley.boinc, PID: 7094
    java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:354)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
        at java.util.concurrent.FutureTask.run(FutureTask.java:271)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.List edu.berkeley.boinc.client.u.h()' on a null object reference
        at edu.berkeley.boinc.attach.SelectionListActivity$d.a(:248)
        at edu.berkeley.boinc.attach.SelectionListActivity$d.doInBackground(:240)
        at android.os.AsyncTask$2.call(AsyncTask.java:333)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:764) 

Screenshot_20200503-233907_BOINC

AenBleidd commented 4 years ago

See #3561 for reference

talregev commented 4 years ago

and android 7.2. same results.

It also happen on 7.2 android. Can you help? I think I am doing something wrong, because if I install 7.16.3 apk on both android it work perfect.

AenBleidd commented 4 years ago

Decrease target API from 28 to smth less (e.g. equal to min API).

talregev commented 4 years ago

For now I cannot show the projects space storage. It show only 0. Can someone help me to continue this feature? It really hard to debug c++ inside android. I didn't succeed. @AenBleidd suggest to see what happen in lib\filesys.cpp:425 but I didn't succeed to debug c++ inside android. Any help will be appreciate.

Show you some images: Storage menu: Screenshot_20200517-160606_BOINC

Projects storage space: Screenshot_20200517-161235_BOINC

talregev commented 4 years ago

I am trying to debug to see why it show zeros. I create a branch with debug msgs. But I cannot see them on the log. Can someone can compile this branch and see why and help? https://github.com/talregev/boinc/tree/TalR_storage_android_debug