Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安卓6.0 解析包错误 #103

Open
yjt1216 opened this issue Jun 1, 2023 · 6 comments
Open

安卓6.0 解析包错误 #103

yjt1216 opened this issue Jun 1, 2023 · 6 comments
Labels
waiting-for-response Further information is requested

Comments

@yjt1216
Copy link

yjt1216 commented Jun 1, 2023

通过url_launcher 打开浏览器 下载的apk 正常安装

推断可能是ota 下载路径 出现错误,所以想了解 ota_update 下载apk 会下载到 哪里

@yjt1216
Copy link
Author

yjt1216 commented Jun 1, 2023

android 6.0 install error

@yjt1216
Copy link
Author

yjt1216 commented Jun 1, 2023

Through the url_launcher to open the browser to download the apk normal installation inference may be ota download path error, so want to know where to download the ota _ update download apk

@MartinHlavna MartinHlavna added the waiting-for-response Further information is requested label Nov 24, 2023
@MartinHlavna
Copy link
Member

Hello, apk is downloaded into private app storage, so it is not accessible via file manager. Can you provide logcat output?

@xiongzhaoxu
Copy link

Hello, apk is downloaded into private app storage, so it is not accessible via file manager. Can you provide logcat output?

你找一个安卓6.0的手机调试,就可以看到问题了

@xiongzhaoxu
Copy link

Hello, apk is downloaded into private app storage, so it is not accessible via file manager. Can you provide logcat output?

我在flutter中获取到的路径是:
/storage/emulated/0/Android/data/com.xxx.xxxi.beta/files/xxx_app.apk

而PackageInstaller的log是这样的:
2024-01-21 23:30:43.602 23699-23719 flutter com.xxx.xxxi.beta I ProgressDialog shown
2024-01-21 23:30:43.647 23699-23849 System com.xxx.xxxi.beta I core_booster, getBoosterConfig = false
2024-01-21 23:30:43.702 23699-23849 System com.xxx.xxxi.beta I core_booster, getBoosterConfig = false
2024-01-21 23:30:47.727 23699-23719 flutter com.xxx.xxxi.beta I -----安装中----
2024-01-21 23:30:47.731 23699-23719 flutter com.xxx.xxxi.beta I ProgressDialog dismissed
2024-01-21 23:30:47.750 22802-22802 asset com.android.packageinstaller W Asset path /data/user/0/com.xxx.xxxi.beta/files/ota_update/xxx_app.apk is neither a directory nor file (type=0).
2024-01-21 23:30:47.750 22802-22802 PackageInstaller com.android.packageinstaller E PackageUtil:can not parse packag
android.content.pm.PackageParser$PackageParserException: Failed adding asset path: /data/user/0/com.xxx.xxxi.beta/files/ota_update/xxx_app.apk
at android.content.pm.PackageParser.loadApkIntoAssetManager(PackageParser.java:900)
at android.content.pm.PackageParser.parseBaseApk(PackageParser.java:928)
at android.content.pm.PackageParser.parseMonolithicPackage(PackageParser.java:876)
at android.content.pm.PackageParser.parseMonolithicPackage(PackageParser.java:857)
at com.android.packageinstaller.b.a(Unknown Source)
at com.android.packageinstaller.PackageInstallerActivity.h(Unknown Source)
at com.android.packageinstaller.PackageInstallerActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:6372)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2432)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2539)
at android.app.ActivityThread.access$900(ActivityThread.java:168)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1378)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5659)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:822)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:712)
2024-01-21 23:30:48.071 23699-23719 flutter com.xxx.xxxi.beta I ProgressDialog dismissed by back button
2024-01-21 23:32:01.141 23699-23705 art com.xxx.xxxi.beta I Debugger is no longer active

@xiongzhaoxu
Copy link

Hello, apk is downloaded into private app storage, so it is not accessible via file manager. Can you provide logcat output?

You can expose a parameter and customize the path obtained by passing in flutter, so it should be correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-response Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants