{"id":13718737,"url":"https://github.com/kaedea/dualapp-mediastore-compatibility","last_synced_at":"2025-03-26T14:31:28.489Z","repository":{"id":81348842,"uuid":"362779388","full_name":"kaedea/dualapp-mediastore-compatibility","owner":"kaedea","description":"安卓双开/分身 MediaStore 兼容性测试。Tuning of Android MediaStore \u0026 File IO compatibility issues between HostProfile App and WorkProfile/DualApp/MultiApp.","archived":false,"fork":false,"pushed_at":"2024-01-19T08:16:49.000Z","size":407,"stargazers_count":48,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-21T23:11:30.652Z","etag":null,"topics":["dualapp","mediastore","multiapp","workprofile"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaedea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-04-29T10:32:02.000Z","updated_at":"2025-03-18T00:00:24.000Z","dependencies_parsed_at":"2024-01-19T09:47:54.984Z","dependency_job_id":null,"html_url":"https://github.com/kaedea/dualapp-mediastore-compatibility","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaedea%2Fdualapp-mediastore-compatibility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaedea%2Fdualapp-mediastore-compatibility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaedea%2Fdualapp-mediastore-compatibility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaedea%2Fdualapp-mediastore-compatibility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaedea","download_url":"https://codeload.github.com/kaedea/dualapp-mediastore-compatibility/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245670722,"owners_count":20653409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dualapp","mediastore","multiapp","workprofile"],"created_at":"2024-08-03T01:00:36.775Z","updated_at":"2025-03-26T14:31:28.011Z","avatar_url":"https://github.com/kaedea.png","language":"Java","funding_links":[],"categories":["Apps","Apr 12, 2025"],"sub_categories":["Development utilities"],"readme":"# DualApp MediaStore APIs Compatibility Test\n[![CircleCI](https://circleci.com/gh/kaedea/dualapp-mediastore-compatibility.svg?style=shield\u0026circle-token=0408c3e1410b8176b0e9ff44e6ecd0cb2ed45c7b)](#)\n\nTuning of Android MediaStore \u0026 File IO compatibility issues between HostProfile app and\nWorkProfile app (DualApp/ParallelApp), especially for OEM Android Devices.\n\nAlso run the smoking tests for Android's **Scoped Storage** Feature.\n\n## Enable WorkProfile for DualApp\n\n1. Create Profile\n\n\u003e adb shell pm create-user --profileOf 0 --managed Island  \n\u003e adb -d shell pm list users  \n\u003e adb -d shell settings --user \u003cuser_id\u003e put secure install_non_market_apps 1  \n\n2. Install apk to Profile\n\n\u003e adb push \u003capk_path\u003e /data/local/tmp/android.apk  \n\u003e adb shell pm install -r -t --user \u003cuser_id\u003e /data/local/tmp/android.apk  \n\n## Test Cases\n\n1. WorkProfile/DualApp/MutliApp Recognize.\n2. Read \u0026 Write file by MediaStore within DualApp.\n3. File Uri/FilePath Convert within DualApp.\n4. Handle sharing file within DualApp.\n5. Files manipulations smoking test.\n\n## Known Problems\n\nAll IO tested above works perfectly within Google Pixel of Android 10/11/12. FileProvider is needed when interacting\nbetween HostProfile app and WorkProfile app.\n\nOEM Android Devices' DualApp(or MultiApp, mostly with a UserId `999`) works like WorkProfile(mostly with a UserId `10+`).\nBut unlike WorkProfile, DualApp MediaStore saves files into path of user `xxx-0` but not `999`. This\ncauses some problems:\n\n1. WorkProfile App can not directly access files saved by MediaStore itself in OEM devices (Huawei, OPPO confirmed), when query by file path.\n2. MediaStore query return missing within WorkProfile app when receiving sharing files from HostProfile app.\n3. HostProfile App might get wrong file path, which is actually DualApp's, when query file by MediaStore.\n\n## Demo Apk\n\n[See releases](https://github.com/kaedea/dulapp-mediastore-compatibility/releases)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaedea%2Fdualapp-mediastore-compatibility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaedea%2Fdualapp-mediastore-compatibility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaedea%2Fdualapp-mediastore-compatibility/lists"}