[FIXED] Cannot open downloaded apk files from notifications dialog - Android Q&A, Help & Troubleshooting

My device is a Nexus 6P on Stock 7.0, and rooted.
If I download an apk from a browser like Chrome, I get the dialog completion notification in my notifications. If I open up my notifications by swiping down, and tap on the completed download, I get this error:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now, if I open up a file manager and navigate to Downloads folder and click the file, it opens the package installer dialog as it should be. If I open up the Downloads app and do the same thing, it does not crash either. Only when I try to open the file via the notification panel, I get this message. Error occurs when trying to tap the "Download Complete" notification:
If I click the open button in the dialog that Chrome displays, it does not crash.
I managed to get the logcat of the crash:
Code:
350/? E/DatabaseUtils: Writing exception to parcel
java.lang.SecurityException: Permission Denial: reading com.android.providers.downloads.DownloadProvider uri content://downloads/all_downloads/159 from pid=745, uid=10023 requires android.permission.ACCESS_ALL_DOWNLOADS, or grantUriPermission()
at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:608)
at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:483)
at android.content.ContentProvider$Transport.enforceFilePermission(ContentProvider.java:474)
at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:419)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:313)
at android.os.Binder.execTransact(Binder.java:565)
11-22 20:40:34.200 745-796/? E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.google.android.packageinstaller, PID: 745
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:318)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.downloads.DownloadProvider uri content://downloads/all_downloads/159 from pid=745, uid=10023 requires android.permission.ACCESS_ALL_DOWNLOADS, or grantUriPermission()
at android.os.Parcel.readException(Parcel.java:1683)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:146)
at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:692)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1145)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:982)
at android.content.ContentResolver.openInputStream(ContentResolver.java:702)
at com.android.packageinstaller.PackageInstallerActivity$StagingAsyncTask.doInBackground(PackageInstallerActivity.java:732)
at com.android.packageinstaller.PackageInstallerActivity$StagingAsyncTask.doInBackground(PackageInstallerActivity.java:723)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)*
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)*
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)*
at java.lang.Thread.run(Thread.java:761)*
11-22 20:40:34.209 1090-3592/? W/ActivityManager: Force finishing activity com.google.android.packageinstaller/com.android.packageinstaller.PackageInstallerActivity
11-22 20:40:34.214 1090-3592/? W/ActivityManager: Force finishing activity com.google.android.packageinstaller/com.android.packageinstaller.PackageInstallerActivity
11-22 20:40:34.214 1090-3592/? W/ActivityManager: Duplicate finish request for ActivityRecord{f061cbf u0 com.google.android.packageinstaller/com.android.packageinstaller.PackageInstallerActivity t358 f}
Does anyone else experience this? How do I fix this problem?

Edit: This seems to not be only with apk files, for any file I open through the notifications panel, the corresponding app that is supposed to open it stops working.

Edit: I think it has something to do with the Chrome app itself. On my device, it's installed as a System app. I tried uninstalling with TitaniumBackup and reinstalling as a normal user app. Now it works fine. Hope this helps for anyone else who has this issue!

Related

[Q] How to remove this trojan?

Hi,
a cousin came to me with a problem about a trojan and now I have some questions to you:
All I know:
Some weeks ago I installed on this smartphone an app from F-Droid (Ghost-Commander) and to do so I had to tick >unknown sources<. After that I forgot to untick it again. About a week after that my cousin came to me with the smartphone and the 'trojan' on it (as you can see on the picture). She said that she only installed apps from the appstore.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
What the 'trojan' does:
A program is forced to foreground (as you can see on the picture) - it can't be exited. No key works. The status bar can be expanded but also clicking on the icons doesn't do anything. If the device is rebooted the lock-screen is shown first and when the device is unlocked then after about one to two seconds later the 'trojan' is executed.
What I did:
After some research I rebooted the device into safe-mode. The 'trojan' wasn't executed there and so I enabled android debugging. I couldn't remove any malicious app because due to safe-mode no suspicious app was loaded. After rebooting to normal-mode again the 'trojan' was back. I connected to the android shell with $adb shell and executed $top there. Then I started to force-stop suspicious apps with $am force-stop <package> and after some tries the 'trojan' was gone. I unchecked >unknown sources< und returned the smartphone to my cousin.
The problem now is that after some days the 'trojan' showed up again but now with a different package-name! (it was called edu.fluster this time)
View attachment commands.txt
Do you know
1) how this 'trojan' got onto the smartphone?
2) how it can be totally removed or if it was another infection how to prevented more infections?
3) how it is possible to write such a harmful program? I did some simple android programming and the sandbox that is built seemed pretty secure to me (as a novice) but how are such vulnerabilitiesfound? With much time? luck? knowledge? or all together?
I would be glad if you helped me!
piqJZu
EDIT:
I finally found the apps that start this trojan:
- 2 apps with the same name both are malicious - both show up as "Browser Update" in the menu
|-- one package is called: de.record.gauge
|-- the other: edu.fluster
Answers to the other questions are still appreciated

Self compiled: Help to get rid with a Bootloop (logcat included)...

Hi guys, finally a was able to get a logcat from my device:
https://forum.xda-developers.com/chef-central/android/starting-adb-boot-process-debugging-t3559980
Righ now the device boots into optimizing apps, then gets into a bootloop when "starting apps" appears, just reboot.
Directory with all the files (dmesg, logcat, tombstone and ndk-atack debug): https://drive.google.com/open?id=0ByjBTzGuQ9FIaWJ4RjBkZ1RWSDQ
Thanks alot for your time!
Nobody? As far i google it probably is zygote dying and killing all the child process....
Tombstone added. This is when the system bootloop:
Code:
Abort message: 'frameworks/av/media/libmedia/MediaProfiles.cpp:326 CHECK(quality != -1) failed.'
I found this: https://forum.xda-developers.com/showthread.php?t=2589516
I try with a similar solution for my device (Snadragon 805) i try media_profiles.xml and media_codecs.xml from shamu and quark (twin devices) but with the same result.
Also i try with stock libmedia.so and libmedia_jni.so in vendor tree, but it bootloop in bootanimation...i'm close bun any help will be appreciated!
EDIT: I jut solve this bootloop removing the 4k profile...
Added media_profiles and media_codecs
Finally i get rid of the bootloop related to media_profiles.xml, i just delete the 4k profile, seems to work on stock but not on CM.
I'm still on a bootloop but this is more nasty...i have no idea why this happen and i cant understand the logs at all.
I just post dmesg, logcat, tombstone and ndk-stack debuged tombstone....any hel will be appreciated!
As far i see the device crash here:
Code:
/data/dalvik-cache/arm/[email protected]@[email protected] (offset 0x80b000)
I don't know but probably seems to be related with dex2oat? with jar files....
I think i put some propietares odexed jar files in a deodexed rom....but i don't know why services and frameork crash...
I was playing around with some ART config https://source.android.com/devices/tech/dalvik/configure.html
But no luck, probably the crash isn't related to ART at all...anyone see something in the logs that can help me to start to search a solution?
Thanks in advance
Finally i found the reason of the bootloop. Looking at the tombstone i found the string "antutu". Doing a "grep" in CM sources i found it's related to "Perfomance Manager Service" here "vendor/cm/overlay/common/vendor/cmsdk/cm/res/res/values/config.xml". So disabling the service in "/vendor/cmsdk/cm/res/res/values/config.xml" (with an overlay) i got my rom booting.
Code:
<!-- <item>org.cyanogenmod.platform.internal.PerformanceManagerService</item> -->
But this come with nasty consecuenses, because mpdecision goes mad and only activate one core of four....So, digging some more i found out that probably only need to disable "Performance Profiles" in source, but i have no idea how to do it...a little step, btw...
This is what i need to disable:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

Titanium Backup Keeps Stopping

Hey guys! I have an annoying bug what i found today and i can't fix it. I installed today Titanium Backup from google play store (the free version) and it worked. From accident I uninstalled many apps from my device including Titanium. I reinstalled it and I got this crash message (screenshot). "Titanium Backup keeps stopping" with this summary: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.keramidas.TitaniumBackup/com.keramidas.TitaniumBackup.MainActivity}: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14 SQLITE_CANTOPEN): Could not open database
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2946)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6806)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14 SQLITE_CANTOPEN): Could not open database
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:211)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:195)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:503)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:204)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:196)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:880)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:865)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:729)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:365)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:322)
at o.dn.ˊ(Source:192)
at com.keramidas.TitaniumBackup.MainActivity.onCreate(Source:396)
at android.app.Activity.performCreate(Activity.java:7224)
at android.app.Activity.performCreate(Activity.java:7213)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2926)
... 11 more
I tried to download older versions, I tried to download from the internet( not from play store) but keeps stopping when i open it. I seen on forums to delete "com.keramidas.." file but I dont have this file on my phone. Someone can help me?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
SOlved?
majoris said:
Hey guys! I have an annoying bug what i found today and i can't fix it. I installed today Titanium Backup from google play store (the free version) and it worked. From accident I uninstalled many apps from my device including Titanium. I reinstalled it and I got this crash message (screenshot). "Titanium Backup keeps stopping" with this summary: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.keramidas.TitaniumBackup/com.keramidas.TitaniumBackup.MainActivity}: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14 SQLITE_CANTOPEN): Could not open database
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2946)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6806)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14 SQLITE_CANTOPEN): Could not open database
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:211)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:195)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:503)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:204)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:196)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:880)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:865)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:729)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:365)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:322)
at o.dn.ˊ(Source:192)
at com.keramidas.TitaniumBackup.MainActivity.onCreate(Source:396)
at android.app.Activity.performCreate(Activity.java:7224)
at android.app.Activity.performCreate(Activity.java:7213)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2926)
... 11 more
I tried to download older versions, I tried to download from the internet( not from play store) but keeps stopping when i open it. I seen on forums to delete "com.keramidas.." file but I dont have this file on my phone. Someone can help me?
Click to expand...
Click to collapse
having the same problem, figure out the issue?
bigknowz said:
having the same problem, figure out the issue?
Click to expand...
Click to collapse
I have found a solution.
Uninstall TB and delete com.keramidas.... folders in /data/data with any root file explorer, there some leftovers which make app to crush.
g_seva said:
I have found a solution.
Uninstall TB and delete com.keramidas.... folders in /data/data with any root file explorer, there some leftovers which make app to crush.
Click to expand...
Click to collapse
Thanks a bunch! I used Total Commander to access the root data/data folder and delete com.keramidas.... Now its working! :victory:

Alter the IR database to send other codes to the TV - Need help

Hey there.
I have since a few days the new ShieldTV remote with IR function and netflix button. Since yesterday I try to change the NvIRTuner.apk (com.nvidia.irtuner) or its database or the IR calls. Unfortunately without success so far.
The database is built very interesting. I'm talking about the O1R_UPDATE_19NOV20.sqlite here.
In the table M_Codes you can find all IR codes. Before the corresponding Java class determines the device which one has selected in the IR-AV-Toogle menu. In my case a LG TV with the id 1970. This Id can be seen in the setup.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Here a Logcat excerpt, if I press my menu button to trigger the HDMI toggle:
07-11 13:37:30.050 4415 4601 D ShieldBluetoothIRInterface: *****REPORT*****0 - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
pastebin.com
Good to see the actual IR_Code that is taken, or its alias:
INPUT SCROLL
What I have tried so far:​-I replaced all IR codes in O1R_UPDATE_19NOV20.sqlite with Channel_UP and then moved this db to /data/data/com.nvidia.irtuner/databases with su-rights.
-> Unfortunately the system app com.nvidia.irtuner seems to read the db inital only once. I can't get it to read my db. I don't understand why. No matter if I reset the app, replaced the O1R_UPDATE_19NOV20.sqlite and give appropriate chown and chmod rights or reset the app before.
-My second attempt was a modified APK. Unfortunately, this can not be installed, because it must be signed by nvidia. I have root, but I don't know what to change in the /system/packages.xml so that the system would accept the app.
->When I try to install it, I only get the message that you have to sign this apk appropriately for the user.
-Then I tried to reproduce the service call from the logcat but unfortunately I don't know what to do.
Does anyone have a tip for me?
Greetings by Idijt

How to fix app crashing when using the showFloatWindow API on Huawei devices running EMUI before version 9.1

A number of reports were received about crashes when the showFloatWindow API is called on devices running older versions of EMUI. Let's take a look at this crash today and how we can fix the issue.
Start by integrating version 6.1.0.301 of the Game Service SDK into a project and successfully implemented the floating window function.
Then, when testing the game on devices running a version of EMUI earlier than 9.1, the game crashed when showFloatWindow API is called. The crash logs are as follows.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The error logs suggested that the issue was caused by missing layout files during layout implementation. This error suggests that c_buoycircle_window_small.xml, c_buoycircle_hide_notice.xml, and c_buoycircle_hide_guide_dialog.xml layout files were not found in this project. However, they had been saved under the layout folder as displayed in the following figure.
The next possible issue could have been that the layout files were obfuscated. So, let's check the build file to be sure:
As you can see minifyEnabled was set to true, indicating that the obfuscation function was enabled. This was also the case for shrinkResources, which meant that resource files were excluded during package creation.
One option of course would be to simply disable the shrinking of resources. By commenting out this line the game would run fine and the API call wouldn’t crash, however, the resource files are no longer compressed and will take up much more space.
To compress the resources, you can create an XML file that contains the resources tag in the project or use the keep.xml file in the res/raw directory, and specify the resources to be reserved in the tools:keep attribute as follows:
XML:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:keep="@layout/c_buoycircle*" />
This solution allows the floating window function to work and is able to compress the resource files.
Note: If you have integrated the Game Service SDK, Huawei suggests that you add the following resources and configure the following obfuscation scripts.
@drawable/c_buoycircle*
@drawable/hms_game*
@Layout/c_buoycircle*
@Layout/hms_game*
@StRiNgS/hms_game*
@StRiNgS/c_buoycircle*
nice article

Categories

Resources