Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaedea/dualapp-mediastore-compatibility
安卓双开/分身 MediaStore 兼容性测试。Tuning of Android MediaStore & File IO compatibility issues between HostProfile App and WorkProfile/DualApp/MultiApp.
https://github.com/kaedea/dualapp-mediastore-compatibility
dualapp mediastore multiapp workprofile
Last synced: 9 days ago
JSON representation
安卓双开/分身 MediaStore 兼容性测试。Tuning of Android MediaStore & File IO compatibility issues between HostProfile App and WorkProfile/DualApp/MultiApp.
- Host: GitHub
- URL: https://github.com/kaedea/dualapp-mediastore-compatibility
- Owner: kaedea
- Created: 2021-04-29T10:32:02.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-19T08:16:49.000Z (10 months ago)
- Last Synced: 2024-08-04T01:11:28.837Z (3 months ago)
- Topics: dualapp, mediastore, multiapp, workprofile
- Language: Java
- Homepage:
- Size: 397 KB
- Stars: 32
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-shizuku - dualapp-mediastore-compatibility - Fixes MediaStore & File IO compatibility issues between HostProfile App and WorkProfile/DualApp/MultiApp. `No license` (Apps / Miscellaneous)
README
# DualApp MediaStore APIs Compatibility Test
[![CircleCI](https://circleci.com/gh/kaedea/dualapp-mediastore-compatibility.svg?style=shield&circle-token=0408c3e1410b8176b0e9ff44e6ecd0cb2ed45c7b)](#)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 put secure install_non_market_apps 12. Install apk to Profile
> adb push /data/local/tmp/android.apk
> adb shell pm install -r -t --user /data/local/tmp/android.apk## 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](https://github.com/kaedea/dulapp-mediastore-compatibility/releases)