crazecoder / open_file

A plug-in that can call native APP to open files with string result in flutter, support iOS(UTI) / android(intent) / PC(ffi) / web(dart:html)
BSD 3-Clause "New" or "Revised" License
250 stars 438 forks source link

Remove `REQUEST_INSTALL_PACKAGES` permission #204

Closed Zazo032 closed 1 year ago

Zazo032 commented 2 years ago

Today I received a new message regarding a Flutter app published in Play Store, with the following information:

You'll need to complete a declaration soon for apps using REQUEST_INSTALL_PACKAGES

We found that your manifest file contains the REQUEST_INSTALL_PACKAGES permission. Starting September 29, 2022, apps that use this permission will not be able to submit updates for review until they have completed a new sensitive permission declaration. This declaration will be available in Play Console on August 31, 2022. You'll need to declare which permitted functionality your app provides, tell us about a core feature in your app that uses the permission, and provide a video showing its use. You must remove this sensitive permission from your manifest if your app does not use the permitted functionalities, or if you no longer use this permission. To learn more, watch this PolicyBytes video. Learn more

We don't directly need the permission to install other packages, so this should be removed from the plugin's manifest and instead be added to the apps that require it, otherwise it'll require apps to fill that Play Store form even if they don't need to

Galeen-Bidpath commented 2 years ago

I submitted a version 88 (3.5.4) which had REQUEST_INSTALL_PACKAGES and this version has been rejected.

I added the following row: <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove" />

And I submitted a new version 89 (3.5.4) and in permissions section for this version in Google play I can see that "REQUEST_INSTALL_PACKAGES" is removed. But this version has been also rejected.

What I should do now?

As a start is to read the comments in this thread. 3 comment on top of yours someone is giving the solution https://github.com/crazecoder/open_file/issues/204#issuecomment-1293201279

bharathking commented 1 year ago

I submitted a version 88 (3.5.4) which had REQUEST_INSTALL_PACKAGES and this version has been rejected.

I added the following row: <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove" />

And I submitted a new version 89 (3.5.4) and in permissions section for this version in Google play I can see that "REQUEST_INSTALL_PACKAGES" is removed. But this version has been also rejected.

What I should do now?

https://youtu.be/TaCxgCwQNpc

bharathking commented 1 year ago

I submitted a version 88 (3.5.4) which had REQUEST_INSTALL_PACKAGES and this version has been rejected. I added the following row: <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove" /> And I submitted a new version 89 (3.5.4) and in permissions section for this version in Google play I can see that "REQUEST_INSTALL_PACKAGES" is removed. But this version has been also rejected. What I should do now?

As a start is to read the comments in this thread. 3 comment on top of yours someone is giving the solution #204 (comment)

https://youtu.be/TaCxgCwQNpc

jamesncl commented 1 year ago

For anyone else who thinks they have removed the REQUEST_INSTALL_PACKAGES permission but are still getting rejected, this might help. I had the same problem. Try this - click on the Go to declaration button, then View app bundles and APKs. For me, it showed a really old build from years ago in a track that I no longer use and is deactivated (closed alpha testing). I think (hope) this is why I'm being rejected, even though I haven't touched this track since 2020, when you publish to any track they are scanning all the latest versions in all your tracks for this permission, even if the track is not used anymore.

I've just submitted an update to my closed alpha track and waiting for the result...

a b c

bharathking commented 1 year ago

For anyone else who thinks they have removed the REQUEST_INSTALL_PACKAGES permission but are still getting rejected, this might help. I had the same problem. Try this - click on the Go to declaration button, then View app bundles and APKs. For me, it showed a really old build from years ago in a track that I no longer use and is deactivated (closed alpha testing). I think (hope) this is why I'm being rejected, even though I haven't touched this track since 2020, when you publish to any track they are scanning all the latest versions in all your tracks for this permission, even if the track is not used anymore. I've just submitted an update to my closed alpha track and waiting for the result... a b c

If you didn’t use these “file_open” or “permission_handler” packages and also get the issue of flutter Remove REQUEST_INSTALL_PACKAGES Permission then you have to find out which package is the culprit for this issue.

First generate the app released version from Build > Flutter > Build App Bundle. Now go to your project root folder and open > build/app/outputs/logs/manifest-merger-release-report.txt Now check which package generate that permission and use different package for that.

You can learn more from here: Fix Flutter Remove REQUEST_INSTALL_PACKAGES Permission From Play Console

Set release rollout 100% it will deactivate all the builds except release build

bharathking commented 1 year ago

For anyone else who thinks they have removed the REQUEST_INSTALL_PACKAGES permission but are still getting rejected, this might help. I had the same problem. Try this - click on the Go to declaration button, then View app bundles and APKs. For me, it showed a really old build from years ago in a track that I no longer use and is deactivated (closed alpha testing). I think (hope) this is why I'm being rejected, even though I haven't touched this track since 2020, when you publish to any track they are scanning all the latest versions in all your tracks for this permission, even if the track is not used anymore. I've just submitted an update to my closed alpha track and waiting for the result... a b c

If you didn’t use these “file_open” or “permission_handler” packages and also get the issue of flutter Remove REQUEST_INSTALL_PACKAGES Permission then you have to find out which package is the culprit for this issue. First generate the app released version from Build > Flutter > Build App Bundle. Now go to your project root folder and open > build/app/outputs/logs/manifest-merger-release-report.txt Now check which package generate that permission and use different package for that. You can learn more from here: Fix Flutter Remove REQUEST_INSTALL_PACKAGES Permission From Play Console

Set release rollout 100% it will deactivate all the builds except release build

If its closed alpha testing - manage track - pause

bharathking commented 1 year ago

https://youtu.be/TaCxgCwQNpc - please verify all the steps done. I got approved two days before...

lakshydeep-14 commented 1 year ago

Application rejected though I am using open_file in my flutter application. What to do now? What to add in android manifest.xml file and what not so that my application will get accepted? Here is the image attached. 197323120-eacb789d-5491-44ad-b675-aab9f9c8d1ed

lakshydeep-14 commented 1 year ago

For anyone else who thinks they have removed the REQUEST_INSTALL_PACKAGES permission but are still getting rejected, this might help. I had the same problem. Try this - click on the Go to declaration button, then View app bundles and APKs. For me, it showed a really old build from years ago in a track that I no longer use and is deactivated (closed alpha testing). I think (hope) this is why I'm being rejected, even though I haven't touched this track since 2020, when you publish to any track they are scanning all the latest versions in all your tracks for this permission, even if the track is not used anymore. I've just submitted an update to my closed alpha track and waiting for the result... a b c

If you didn’t use these “file_open” or “permission_handler” packages and also get the issue of flutter Remove REQUEST_INSTALL_PACKAGES Permission then you have to find out which package is the culprit for this issue. First generate the app released version from Build > Flutter > Build App Bundle. Now go to your project root folder and open > build/app/outputs/logs/manifest-merger-release-report.txt Now check which package generate that permission and use different package for that. You can learn more from here: Fix Flutter Remove REQUEST_INSTALL_PACKAGES Permission From Play Console

Set release rollout 100% it will deactivate all the builds except release build

Article is not available. Please help. I am using open_file and it is required in my project. My previous build have request_install_packages permission. I am also uploading the apk with permission but still my app is getting rejected. What to do now? I tried many solution but not able to publish app on playstore. Here is the mail attached. 197323120-eacb789d-5491-44ad-b675-aab9f9c8d1ed

mohitleo03 commented 1 year ago

@lakshydeep-14 the solution is discussed above but if you want assistance the try these steps -

First of all the problem started with using dart package like open_file which is having sensitive android permission REQUEST_INSTALL_PACKAGES. according to my knowledge this permission allows application to install other application (due to which it becomes sensitive according to Google Play). So for removing this permission you can do any of the following -

  1. Best solution is to replace the dart package open_file with open_filex or open_file_safe . these both packages can open files like pdf, etc. but they don.t have sensitive permission REQUEST_INSTALL_PACKAGES due to which our application will get approval easily.
  2. another simple solution is simply remove or comment this android permission REQUEST_INSTALL_PACKAGES from the manifest file of package open_file in android studio - image
  3. another solution is replacing the permission line with this line - image

Note - using any one of the above 3 solution is enough.

IMPORTANT - Yes currently your apk is not having this permission and you can upload this apk bundle to Play Console but your can still got rejected :( Reason - any other track (track means - production, open testing, closed testing, internal testing, pre-registration) if any of the track is having an apk bundle live with that permission your app is going to get rejected. So, what is did was created a new release in every track (only those tracks in which I earlier released the application, like I don't have created any release in pre-registration so I didn't created a new release for that) and choose full rollout. Just make sure every track has been updated with new apk and sent for review from your side. (latest apk bundle must not have this permission REQUEST_INSTALL_PACKAGES).

How to check whether the apk bundle is having the REQUEST_INSTALL_PACKAGE or not - Upload your apk bundle to Play Console, go to app bundle explorer (you can find this option in left sidebar menu in Play Console), you would be able to see all the apk bundles uploaded by you. Click on this forward arrow to see details of your apk bundle. image Then click on show details of permissions - image

If you have any other issue then you can tag me, still if you receive the same mail from Play console then you can submit and appeal for help in Policy Status section or wait for the updated review on Google Play Console.

lakshydeep-14 commented 1 year ago

@lakshydeep-14 the solution is discussed above but if you want assistance the try these steps -

First of all the problem started with using dart package like open_file which is having sensitive android permission REQUEST_INSTALL_PACKAGES. according to my knowledge this permission allows application to install other application (due to which it becomes sensitive according to Google Play). So for removing this permission you can do any of the following -

  1. Best solution is to replace the dart package open_file with open_filex or open_file_safe . these both packages can open files like pdf, etc. but they don.t have sensitive permission REQUEST_INSTALL_PACKAGES due to which our application will get approval easily.
  2. another simple solution is simply remove or comment this android permission REQUEST_INSTALL_PACKAGES from the manifest file of package open_file in android studio - image
  3. another solution is replacing the permission line with this line - image

Note - using any one of the above 3 solution is enough.

IMPORTANT - Yes currently your apk is not having this permission and you can upload this apk bundle to Play Console but your can still got rejected :( Reason - any other track (track means - production, open testing, closed testing, internal testing, pre-registration) if any of the track is having an apk bundle live with that permission your app is going to get rejected. So, what is did was created a new release in every track (only those tracks in which I earlier released the application, like I don't have created any release in pre-registration so I didn't created a new release for that) and choose full rollout. Just make sure every track has been updated with new apk and sent for review from your side. (latest apk bundle must not have this permission REQUEST_INSTALL_PACKAGES).

How to check whether the apk bundle is having the REQUEST_INSTALL_PACKAGE or not - Upload your apk bundle to Play Console, go to app bundle explorer (you can find this option in left sidebar menu in Play Console), you would be able to see all the apk bundles uploaded by you. Click on this forward arrow to see details of your apk bundle. image Then click on show details of permissions - image

If you have any other issue then you can tag me, still if you receive the same mail from Play console then you can submit and appeal for help in Policy Status section or wait for the updated review on Google Play Console.

@mohitleo03 I have a previous version that has this permission in the first image. I have commented the line as you said now it doesn't have that permission in the second image. what to select in the form in the third image? Screenshot (641) Screenshot (642) Screenshot (640)

mohitleo03 commented 1 year ago

@lakshydeep-14 No, We are not using this permission anymore so don't look for this form. I also filled this form which was a mistake. Just create a new release on each - image only create if you have previous apk with that permission in that particular track

eggysudianto commented 1 year ago

issue solved https://github.com/crazecoder/open_file/issues/221#issuecomment-1299402607

bharathking commented 1 year ago

@mohitleo03 Go to Testing - open testing - manage track - pause. Submit build Open testing I hope this build5(1.0.2) using that permission

mohitleo03 commented 1 year ago

@mohitleo03 Go to Testing - open testing - manage track - pause. Submit build Open testing I hope this build5(1.0.2) using that permission

Thank you @bharathking but my issue is resolved i was helping someone else :)

blue492 commented 1 year ago

The issue is solved for me by uploading a new version to Testing, because I had an old version which included that permission in Testing. I paused Testing to avoid problem in future.

I added in AndroidManifest.xml <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>

You can contact the Policy team for further clarification regarding your app’s policy violation.

You can also chat with Google team: Chat Link Monday through Friday

mohitleo03 commented 1 year ago

I am removing in Android.manifest. But for some reason there is a "REQUEST_INSTALL_PACKAGES".

スクリーンショット 2022-11-03 13 12 53
  • Android>app>src>main>AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="schemas.android.com/tools"
    package="com.SimpleDrawPaint">
  <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
...
</manifest>
  • manifest-merger-release-report.txt
uses-permission#android.permission.REQUEST_INSTALL_PACKAGES
ADDED from /Users/t/StudioProjects/*****/android/app/src/main/AndroidManifest.xml:5:4-104
  tools:node
      ADDED from /Users/t/StudioProjects/*****/android/app/src/main/AndroidManifest.xml:5:80-102
  android:name
      ADDED from /Users/t/StudioProjects/*****/android/app/src/main/AndroidManifest.xml:5:21-79

you can also use another package instead of just removing the permission, like you can use open_filex inspite of open_file.

mohitleo03 commented 1 year ago

@jtaxiexpress If you are using open_filex the I don't think that your android project should contain REQUEST_INSTALL_PACKAGES as you can see my project file too - image I think you should try to build android project by flutter build apk so that the changes you have done in flutter project should get reflected in android project too.

ayman-elslamony commented 1 year ago

I fix This problem by following these steps:

  1. Removed open_file and added another package called open_filex
  2. Sure you removed REQUEST_INSTALL_PACKAGES from AndroidMainfiest.xml.
  3. Create an app bundle and upload it to Play Console.
  4. Open Play Console and go to the testing page check if there are any app bundles in:
    1. Open testing (Testing > Open testing)
    2. Closed testing (Testing > Closed testing).
    3. Internal testing (Testing > Internal testing).
    4. ... if it exists create a new release and add the uploaded app bundle.
  5. go to the Production page and create a new release then add it for review.

note: If there is an app bundle that you previously uploaded on the test page and it was accepted by Google before, be sure to replace it by creating a new release and add the uploaded app bundle.

Lazizbek97 commented 1 year ago

Has someone found which package(or plugin) requires open_file plugin? I tried to delete it from my app several times. But still, it suddenly appears...

blue492 commented 1 year ago

The issue is solved for me by uploading a new version to Testing, because I had an old version which included that permission in Testing. I paused Testing to avoid problem in future.

I added in AndroidManifest.xml <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>

The issue is solved for me by uploading a new app version to Testing, because I had an old version which included that "REQUEST_INSTALL_PACKAGES" in Testing. Then I paused Testing to avoid problem in future.

I added in AndroidManifest.xml and uploaded a new version to Production in Google play

ca-ruthish commented 1 year ago

I used these plugins open file, open filex, open file safe but still the error does not solved. Then I add URL launcher package then my got published. And more thing when your app published in any of the testing release pause the track and create a new release in production. Don't forget to add these lines in AndroidManifest.xml <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove" /> Then under the application tag add these lines too.. `

</queries>`

I hope this will help you REQUEST_INSTALL_PACKAGES Error.

shaileshpendams commented 1 year ago

I remove this permission by this video instructions. https://shaileshpendam.com/blog/REQUEST_INSTALL_PACKAGES/

tamilarasansrf commented 1 year ago

Finally i resolved using this https://gist.github.com/tamilarasansrf/d472bbd70f0c0ca5f73d7ee4cdb158a3

tamilarasansrf commented 1 year ago

Finally i resolved using this https://gist.github.com/tamilarasansrf/d472bbd70f0c0ca5f73d7ee4cdb158a3