Skip to content

Commit 0d77587

Browse files
nqmgamingclaude
andcommitted
docs: record the #100 investigation
Delete-after-install is not a Shizuku problem. The pref is wired correctly; the delete itself only ever calls DocumentsContract .deleteDocument, which cannot handle the file:// URIs that collectIncomingUris explicitly accepts, nor third-party FileProvider URIs like the reporter's MiXplorer one. Both failure paths swallow the exception, so it looks like the toggle does nothing. Separates verified-by-reading from inferred, and notes the fix options without picking one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 14a37c9 commit 0d77587

1 file changed

Lines changed: 36 additions & 6 deletions

File tree

docs/ISSUE_BACKLOG.md

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,42 @@ Con trỏ code bên dưới chỉ ghi ở những issue đã thực sự mở fi
2222
## Bug
2323

2424
- [ ] **#100** — "Delete apk after installation" không chạy (Shizuku mode)
25-
- Reporter kèm log `JavaBinder: ibinderForJava`.
26-
- Xoá file nằm ở `BaseInstallController.deleteSourceFileIfNeeded()` /
27-
`deleteSourceDocument()`, dùng `DocumentsContract.deleteDocument`. Kiểm tra
28-
`takePersistableUriPermission` có thật sự lấy được quyền ghi từ picker không.
29-
- Lưu ý: `RootInstallController``ManualInstallController` **đi đường riêng**, không
30-
qua `awaitSession` — kiểm tra cả ba đường.
25+
26+
Đã điều tra 2026-08-01. **Không liên quan gì tới Shizuku** — reporter nhầm biến số.
27+
28+
Đã xác minh bằng cách đọc code:
29+
- Pref nối đúng: `SettingViewModel` ghi `delete_apk_after_install`,
30+
`InstallViewModel.readDeleteApkPref()` (dòng 1631) đọc đúng key đó. Toggle không hỏng.
31+
- Toàn bộ việc xoá nằm ở `BaseInstallController.deleteSourceFileIfNeeded()`
32+
`deleteSourceDocument()`, và **chỉ gọi `DocumentsContract.deleteDocument`** — không có
33+
nhánh nào cho `file://`, không có fallback.
34+
- `DialogInstallActivity.collectIncomingUris()` nhận cả `scheme == "file"`. URI `file://`
35+
chắc chắn không xoá được bằng `deleteDocument`**lỗi chắc chắn, không cần suy đoán**.
36+
- URI từ intent ngoài **không bao giờ** đi qua `takePersistableUriPermission` lúc nhận;
37+
chỉ picker trong app mới gọi.
38+
- Picker 1 file (`InstallScreen.kt:298`) lấy `READ or WRITE` → đường này *có lẽ chạy được*.
39+
- Picker nhiều file (`InstallScreen.kt:287`) chỉ lấy **READ**, nhưng batch install vẫn
40+
truyền `deleteAfterInstall` (`InstallViewModel.kt:1019`) → nghi ngờ đường batch cũng hỏng.
41+
- Log reporter có `VRI[DialogInstallActivity]` + `com.mixplorer` → họ cài từ file manager
42+
ngoài, tức là đúng đường bị hỏng.
43+
- Cả hai chỗ lỗi đều **nuốt exception** (`catch (_: Exception)` + `Timber.e`), nên user
44+
không thấy gì và tưởng tính năng không hoạt động.
45+
46+
Suy đoán (chưa chạy thử):
47+
- `DocumentsContract.deleteDocument` fail với URI của FileProvider bên thứ ba
48+
(`content://com.mixplorer.fileprovider/...`) vì đó không phải document URI của một
49+
DocumentsProvider.
50+
51+
Hướng sửa, cần chọn:
52+
1. Thêm nhánh `file://``File.delete()`. App đã có `MANAGE_EXTERNAL_STORAGE`. Rẻ, chắc ăn.
53+
2. Sửa picker batch lấy `READ or WRITE` như nhánh 1 file.
54+
3. FileProvider bên thứ ba: **về nguyên tắc không xoá được**. Đừng đi dò `_data` column để
55+
map ra đường dẫn thật rồi xoá — mong manh và là xoá file của app khác bằng cách đoán.
56+
4. Dù chọn gì cũng nên **báo cho user khi xoá thất bại** thay vì im lặng.
57+
58+
Ghi riêng, không thuộc #100: `Timber` chỉ `plant` khi `BuildConfig.DEBUG`
59+
(`Application.kt:45`), nên diagnostics report của bản release **không có một dòng log nào
60+
của app**. Đó là lý do issue này không có bằng chứng nào để lần. Đáng mở issue riêng.
3161

3262
- [ ] **#92** — Parsing error khi cài ReAppzuku 1.8.4
3363
- "Install with Options" cài được cùng file → parser của mình sai, không phải file hỏng.

0 commit comments

Comments
 (0)