New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 705748 link

Starred by 9 users

Issue metadata

Status: Verified
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Samsung security policy prevents the opening of .apk from Download Home

Project Member Reported by jrp@google.com, Mar 27 2017

Issue description

Device name: Samsung S6

From "Settings > About Chrome"
Application version: 57.0.2987.108
Operating system: 6.0.1

URLs (if applicable): https://translate.google.cn/about 

Steps to reproduce:
(1) Tap on Android icon in Translate's marketing page.
(2) Tap open on the file.
(3) Tap again on file in chrome download manager.

Expected result:

System installer is invoked.

Actual result:

"Can't open file." butterbar is displayed.

This is a regression, it used to work:

Version: 56.0.2924.87
Device: Samsung S6
OS version: 6.0.1
Video: https://drive.google.com/file/d/0B00NduPrfrx2TUFfUVFsLVBVbmc/view

 
Cc: nataliyaf@google.com
Labels: Hotlist-ConOps

Comment 2 by klo...@chromium.org, Mar 28 2017

Cc: klo...@chromium.org
Status: Assigned (was: Unconfirmed)
I don't see the issue in Chrome Beta 58.0.3029.33. Current Chrome stable hasn't rolled to M57 yet.

Comment 3 by jrp@google.com, Mar 28 2017

Relevant logs from Samsung S6 / Verizon device:

03-27 19:53:55.960  3615  4298 I InputReader: Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=48663888497000
03-27 19:53:55.960  3615  4297 I InputDispatcher: Delivering touch to (26223): action: 0x1, toolType: 1
03-27 19:53:55.960 26223 26223 D ViewRootImpl: ViewPostImeInputStage processPointer 1
03-27 19:53:55.970 26223 26223 D Instrumentation: checkStartActivityResult() : Intent { act=android.intent.action.VIEW dat=content://com.chrome.beta.FileProvider/downloads/Translate (11).apk typ=application/vnd.android.package-archive flg=0x10000001 }
03-27 19:53:55.970 26223 26223 D Instrumentation: checkStartActivityResult() : intent is instance of [Intent].
03-27 19:53:55.970  3615  5133 D SecContentProvider2: query(), uri = 15 selection = getToastGravityEnabledState
03-27 19:53:55.980  3615  4800 D SecContentProvider2: query(), uri = 15 selection = getToastEnabledState
03-27 19:53:55.980  3615  4801 D SecContentProvider2: query(), uri = 15 selection = getToastShowPackageNameState
03-27 19:53:55.990 26223 26223 D ViewRootImpl: #1 mView = android.widget.LinearLayout{282e929 V.E...... ......I. 0,0-0,0 #102039d android:id/toast_layout_root}
03-27 19:53:55.990  3615  4799 D ISSUE_DEBUG: InputChannelName : 9f7d3f5 Toast
03-27 19:53:56.000  3084  3084 I SurfaceFlinger: id=862 createSurf (1x1),1 flag=4, Uoast
03-27 19:53:56.020  3615  4456 D PowerManagerService: [api] acquire WakeLock flags=0x2000000a tag=WindowManager uid=1000 pid=3615

Comment 4 by jrp@google.com, Mar 28 2017

I've already cleared user data, ensured no login to Chrome, and cleared all system defaults (for different handling apps).

Comment 5 by klo...@chromium.org, Mar 28 2017

Cc: dah...@chromium.org dtrainor@chromium.org
If you open the system "Download", which on Samsung is probably under "My Files", you can find the apk there. I assume you can install from there.

Please confirm when it works in M56, you installed the apk from the system Download, not Chrome Download Home.

From the log, "SecContentProvider2", I suspect installing APK from Chrome is blocked by Samsung security policy.

Comment 6 by jrp@google.com, Mar 28 2017

If I go to "My files" app provided by Samsung, it works and installs properly. Install from untrusted sources is on. So, I'm not sure by what mechanism it is blocked. I've checked Samsung Security Policy setting and it doesn't provide an explicit option specific to this.

What's really annoying is that the System Tray points at Chrome which then hits this "can't open file." error. So, most users who get into this situation are unlikely to find "My files" to workaround.

Comment 7 by jrp@google.com, Mar 28 2017

Comment 6 clarification: that's on M57/M58 on the affected device. Is there a way to get M56 on the affected device? I was only able to test M56 on another device (same model / OS version). If this is related to security policy, then it would be better to use the same device for all versions.

Comment 8 by klo...@chromium.org, Mar 28 2017

Cc: qin...@chromium.org
Owner: dah...@chromium.org
I sent you M56 link through email. In M56, Chrome points to the system download by default. So it should work.

From M57, we point the download to Chrome's own download home. That triggered this issue.

This is not "untrusted source" issue. This is about SecContentProvider. I suspect there is no UI to change the policy. We need to check with Samsung. 

Comment 9 by jrp@google.com, Mar 28 2017

The explanation in #8 makes a lot of sense. From memory, this flow worked on this same device last week. What happened was M57 rolled out on the device very recently and enabled the new behavior of pointing to download home.
Issue can be reproducible as per Steps C#0 
on S6 / 6.0.1,  Lenovo K4 Note A7010a48 / MRA58K, Moto G4 Plus / 7.0  and all the devices on 57.0.2987.108 and 57.0.2987.126
Works fine on 56.0.2924.87  

Please find logs @ http://go/chrome-androidlogs1/7/705748

Comment 11 by jrp@google.com, Mar 28 2017

Summary: Samsung security policy prevents the opening of .apk from Download Home (was: Somehow device is in state where .apk file cannot open, it should)
Is there log for Lenovo K4 and Moto G4 Plus?
Logs taken on Lenovo K4 Note and Sony Xperia Z (C6602) 

Please find logs @ http://go/chrome-androidlogs1/7/705748-1
Owner: qin...@chromium.org
qinmin@, please take a look at logs in #13. e.g. I saw back to back 11 intent sent by Chrome in Sony case. This is not as expected.

03-30 12:54:16.497   903  1293 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.chrome.FileProvider/downloads/Translate.apk typ=application/vnd.android.package-archive flg=0x10000001} from pid 9790
03-30 12:54:17.918   903  3205 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.chrome.FileProvider/downloads/Translate.apk typ=application/vnd.android.package-archive flg=0x10000001} from pid 9790
03-30 12:54:18.139   903  1420 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.chrome.FileProvider/downloads/Translate.apk typ=application/vnd.android.package-archive flg=0x10000001} from pid 9790
03-30 12:54:18.349   903  3141 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.chrome.FileProvider/downloads/Translate.apk typ=application/vnd.android.package-archive flg=0x10000001} from pid 9790
03-30 12:54:18.519   903  1422 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.chrome.FileProvider/downloads/Translate.apk typ=application/vnd.android.package-archive flg=0x10000001} from pid 9790
03-30 12:54:18.719   903  1296 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.chrome.FileProvider/downloads/Translate.apk typ=application/vnd.android.package-archive flg=0x10000001} from pid 9790
03-30 12:54:18.999   903  3203 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.chrome.FileProvider/downloads/Translate.apk typ=application/vnd.android.package-archive flg=0x10000001} from pid 9790
03-30 12:54:19.099   903  3191 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.chrome.FileProvider/downloads/Translate.apk typ=application/vnd.android.package-archive flg=0x10000001} from pid 9790
03-30 12:54:19.300   903  3190 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.chrome.FileProvider/downloads/Translate.apk typ=application/vnd.android.package-archive flg=0x10000001} from pid 9790
03-30 12:54:19.500   903  3191 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.chrome.FileProvider/downloads/Translate.apk typ=application/vnd.android.package-archive flg=0x10000001} from pid 9790
03-30 12:54:19.710   903  3190 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.chrome.FileProvider/downloads/Translate.apk typ=application/vnd.android.package-archive flg=0x10000001} from pid 9790
This is wierd, is it repeatedly trying to launch that intent? I will get the phone to check
I cannot repro the multiple 11 intent issue on the Sony Xperia Z.
However, I found that Sony device can launch the app installer successfully if I use the file URI, eg:
file:///storage/emulated/0/Download/com.android.chrome_57.0.2987.132-298713200_minAPI16(armeabi-v7a)(nodpi)_apkmirror.com.apk.

The file Uri works fine, but the content URI doesn't. I haven't tried the file URI on galaxy s6. But if I remember clearly,  using file URI is discouraged by Android folks
Labels: Merge-Request-58 M-58
Status: Started (was: Assigned)
Project Member

Comment 19 by sheriffbot@chromium.org, Apr 11 2017

Labels: -Merge-Request-58 Merge-Review-58 Hotlist-Merge-Review
This bug requires manual review: We are only 13 days from stable.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-58 Merge-Approved-58
After speaking with dahlke@ and qinmin@ this is going to be impactful, so we'll take it.  Approved for M58 branch 3029.
Project Member

Comment 21 by bugdroid1@chromium.org, Apr 13 2017

Labels: -merge-approved-58 merge-merged-3029
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/504d45617e2fe1708455f98a0ad09a764affbd78

commit 504d45617e2fe1708455f98a0ad09a764affbd78
Author: Min Qin <qinmin@chromium.org>
Date: Thu Apr 13 17:18:33 2017

Use file Uri to launch intent for download on M and below

Content Uri has permission issues on certain devices
Use file Uri instead.

TBR=dtrainor@chromium.org,nyquist@chromium.org
BUG= 705748 

Review-Url: https://codereview.chromium.org/2799533002
Cr-Commit-Position: refs/heads/master@{#463698}
(cherry picked from commit ca6e72620f092e950e6ce788bde57455a4e73eb1)

Review-Url: https://codereview.chromium.org/2820473003 .
Cr-Commit-Position: refs/branch-heads/3029@{#693}
Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471}

[modify] https://crrev.com/504d45617e2fe1708455f98a0ad09a764affbd78/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
[modify] https://crrev.com/504d45617e2fe1708455f98a0ad09a764affbd78/base/android/java/src/org/chromium/base/FileUtils.java
[modify] https://crrev.com/504d45617e2fe1708455f98a0ad09a764affbd78/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java

 Issue 711356  has been merged into this issue.
Cc: krav...@chromium.org
 Issue 710799  has been merged into this issue.
 Issue 709316  has been merged into this issue.
Verified in M58 - 58.0.3023.73 build/Samsung Galaxy S5(SM-G900V)/MMB29K
Status: Verified (was: Started)
Components: UI>Browser>Downloads
Issue 722383 has been merged into this issue.

Sign in to add a comment