ShizuStore

DualAppMediastoreTest

kaedea

1.0 · GitHub

Download APK
Development utilities Android 7.0+ 2 years ago Proprietary
24 ShizuStore
2k GitHub
58 Stars
3 MB Size

More about this app

Fixes MediaStore & File IO compatibility issues between HostProfile App and WorkProfile/DualApp/MultiApp.

DualApp MediaStore APIs Compatibility Test

CircleCI

Tuning of Android MediaStore & File IO compatibility issues between HostProfile app and WorkProfile app (DualApp/ParallelApp), especially for OEM Android Devices.

Also run the smoking tests for Android's Scoped Storage Feature.

Enable WorkProfile for DualApp

  1. Create Profile
adb shell pm create-user --profileOf 0 --managed Island  
adb -d shell pm list users  
adb -d shell settings --user <user_id> put secure install_non_market_apps 1
  1. Install apk to Profile
adb push <apk_path> /data/local/tmp/android.apk  
adb shell pm install -r -t --user <user_id> /data/local/tmp/android.apk
  1. Clears
# delete profile user after tests 
adb -d shell pm list users  
adb -d shell pm remove-user <user_id>

Test Cases

  1. WorkProfile/DualApp/MutliApp Recognize.
  2. Read & Write file by MediaStore within DualApp.
  3. File Uri/FilePath Convert within DualApp.
  4. Handle sharing file within DualApp.
  5. Files manipulations smoking test.

Known Problems

All IO tested above works perfectly within Google Pixel of Android 10/11/12. FileProvider is needed when interacting between HostProfile app and WorkProfile app.

OEM Android Devices' DualApp(or MultiApp, mostly with a UserId 999) works like WorkProfile(mostly with a UserId 10+). But unlike WorkProfile, DualApp MediaStore saves files into path of user xxx-0 but not 999. This causes some problems:

  1. WorkProfile App can not directly access files saved by MediaStore itself in OEM devices (Huawei, OPPO confirmed), when query by file path.
  2. MediaStore query return missing within WorkProfile app when receiving sharing files from HostProfile app.
  3. HostProfile App might get wrong file path, which is actually DualApp's, when query file by MediaStore.

Demo Apk

See releases

Close

How Shizuku is used

Can view system battery use, top power using apps and per-app details via `batterystats` through Shizuku.

This is an AI-assisted analysis of Shizuku-related usages in the app's public source code. It is best effort, so it may not catch every single usage.

How this app uses Shizuku

Shizuku is used to read privileged battery statistics for on-screen diagnostics.

  • View overall battery use: see total drain, measured time range and remaining estimate retrieved through Shizuku from the system battery service.
  • List top power users: see the highest draining apps ranked by consumed power from the same privileged battery query.
  • Inspect app power detail: see a detailed power breakdown with CPU, process and mobile radio activity for a demo app using a privileged per-app snapshot through Shizuku.

Android APIs or commands used

  • IBatteryStats.getBatteryUsageStats
  • IBatteryStats.takeUidSnapshot

Notable details

The same battery views can work without Shizuku if the BATTERY_STATS permission is granted over ADB; the app can share that grant command as text.

Close

Changelog

What's new for version 1.0

Close

Permissions

6 permissions requested

  • android.permission.WRITE_EXTERNAL_STORAGE
  • android.permission.MANAGE_EXTERNAL_STORAGE
  • android.permission.QUERY_ALL_PACKAGES
  • android.permission.BATTERY_STATS
  • moe.shizuku.manager.permission.API_V23
  • android.permission.READ_EXTERNAL_STORAGE
Close