Android application is being blocked from restarting by MARsPolicyManager - android

An Android function (APP A in the log) sent alerts to another application (APP B in the log).
We are facing one issue. APP B application is being blocked from restarting by MARsPolicyManager because of an autorun policy.
In Samsung S8, Smart Manager application is available. This application optimizes the device and kills the unnecessary background application from the device.
Below are the ADB logs:
05-30 01:03:33.481 1592 2291 D MARsPolicyManager: Blocked by Policy:2 -- Caller is not samsung!!
05-30 01:03:33.481 1592 2291 D MARsPolicyManager: Package: com.nielsen.appb, userid: 0, hostingType: provider is Restricted by policy: autorun(2) caller is: ProcessRecord{7da5e2d0 11579:com.nielsen.appa/u0a207}
05-30 01:03:33.482 1592 1654 I ActivityManager: Displayed com.nielsen.appa/md5ddf5d0d55652744930eac3d8d34aaa0c.SurveyPerform: +209ms
05-30 01:03:33.482 11579 11579 E ActivityThread: Failed to find provider info for com.nielsen.qct.contentprovider.EventsProvider
05-30 01:03:33.492 1592 2291 D EdgeLightingManager: isCallingUserSupported : callingUserId=0, mUserId=0, isDualAppId=false
05-30 01:03:33.492 1592 2291 D EdgeLightingManager: showForToast : packageName = com.nielsen.appa
05-30 01:03:33.492 1592 2291 D EdgeLightingClientManager: isAvailableEdgeLighting: condition=1 mCondition=3 mIsConnected=false0
05-30 01:03:33.492 1592 2291 D EdgeLightingPolicyManager: isAcceptableApplication: pkg=com.nielsen.appa
, range=512 , includeAllApp=false , userId=0 , infoRange=0 , infoCategory=0
05-30 01:03:33.492 1592 2291 D EdgeLightingManager: showForToast : return false by isAcceptableApplication.
When the app is force stopped all notifications are removed from the notification shade. Force stop / force killed also means the app can't receive any push notifications or any other Intents while the app is in this state.
The device is:
Samsung Galaxy S8
Model No-SM G9500
Android 8,9.
Processor- Snapdragon
This device model only available in the United States and China.
We need your support here. We have a couple of questions as well.
What the MARsPolicyManager is?
Is it something related to KNOX ?
How we can avoid this issue ?
Is this android specific ?

Related

Android 8 System App update effective only after reboot

TL;DR: When updating system apps on android, the updated app is only started after reboot.
I am developing a custom ROM based on Android 8.1.2 for a custom device based on Rockchip RK3126c. I took the AOSP source from the board manufacturer and only modified the platform key and added two custom apps as system apps; one is privileged (shared system user), and one isn't, i.e. the first is located in /system/priv-app and signed with the platform key, and the second in /system/app and signed with its own key.
Both apps work, but when I try to update any of the two (via adb shell pm install -r ... or via Android Studio) the update doesn't take effect; the old version still runs, even after killing (adb shell kill -9 ... or throwing a null pointer exception) and restarting it. Only after a full reboot is the new version started. I did increment the versionCode. Before the reboot, getPackageManager().getPackageInfo(...).versionCode yields the new version number, while BuildConfig.VERSION_CODE gives the old one. This is both for eng and user builds.
While updating, adb logcat shows:
10-17 15:45:19.706 1048 1048 D AndroidRuntime: Calling main entry com.android.commands.pm.Pm
10-17 15:45:19.725 1058 1058 E asset : setgid: Operation not permitted
10-17 15:45:22.563 336 362 I ActivityManager: Start proc 1062:com.android.defcontainer/u0a11 for service com.android.defcontainer/.DefaultContainerService
10-17 15:45:22.617 1062 1062 I zygote : The ClassLoaderContext is a special shared library.
10-17 15:45:22.739 336 362 I chatty : uid=1000(system) PackageManager expire 1 line
10-17 15:45:22.820 1077 1077 I dex2oat : /system/bin/dex2oat --input-vdex-fd=-1 --output-vdex-fd=14 --compiler-filter=quicken --classpath-dir=/data/app/com.example.myapp-cdF84NESHVxl5UTZHVbRdg== --class-loader-context=PCL[]
10-17 15:45:22.832 1077 1077 W dex2oat : Could not reserve sentinel fault page
10-17 15:45:26.117 1077 1080 W dex2oat : Verification of boolean ao0.a(java.lang.String, long) took 130.568ms
10-17 15:45:28.960 1077 1077 I dex2oat : dex2oat took 6.142s (10.744s cpu) (threads: 4) arena alloc=17KB (17568B) java alloc=4MB (4274432B) native alloc=6MB (6543768B) free=1801KB (1844840B)
10-17 15:45:28.997 336 350 I ActivityManager: Force stopping com.example.myapp appid=1000 user=-1: installPackageLI
10-17 15:45:29.009 336 362 W PackageManager: Trying to update system app code path from /system/priv-app/MyApp to /data/app/MyApp-cdF84NESHVxl5UTZHVbRdg==
10-17 15:45:29.010 336 362 W PackageManager: Code path for com.example.myapp changing from /system/priv-app/MyApp to /data/app/MyApp-cdF84NESHVxl5UTZHVbRdg==
10-17 15:45:29.010 336 362 W PackageManager: Resource path com.example.myapp changing from /system/priv-app/MyApp to /data/app/MyApp-cdF84NESHVxl5UTZHVbRdg==
10-17 15:45:29.205 242 242 E : Couldn't opendir /data/app/vmdl1968223466.tmp: No such file or directory
10-17 15:45:29.205 242 242 E installd: Failed to delete /data/app/vmdl1968223466.tmp: No such file or directory
10-17 15:45:29.213 336 362 I ActivityManager: Force stopping com.example.myapp appid=1000 user=0: pkg removed
10-17 15:45:29.214 1048 1048 I Pm : Package com.example.myapp installed in 9500 ms
10-17 15:45:29.239 1048 1048 I app_process: System.exit called, status: 0
10-17 15:45:29.239 1048 1048 I AndroidRuntime: VM exiting with result code 0.
After the reboot, further updates to the app do work - apparently, the problem only exists when changing the code path from /system/[priv-]app to /data/app, but not when the path is already /data/app.
The same thing worked fine on Android 7.1.2. Deep within the android framework there is probably some cache for the code paths of the apps which doesn't get updated after the app is overwritten. Anyone knows where that is located and how to fix this problem?
After a lot of fiddling, I found it myself: The app was marked as persistent in the manifest, which causes the mentioned behaviour. It only worked on Android 7.1.2 because there was a vendor-specific modification that ignored the persistent flag.

Need some help analyzing Android catlogs to solve constant crashes

I am an owner of a Lenovo K2; due to having a lot of reboots and application crashes, I flashed the official Lenovo Nougat ROM from their recovery tool, performed system factory reset, cleared cache of everything...
Doing so did not resolve the problem at all, so I replicated the crashes and reboots while logging via adb logcat (treshold level Warning).
Here is the complete log: https://www.dropbox.com/s/c9955zdinyemezx/log4.txt?dl=0
I am no expert so I'd appreciate if someone could help me analyse the log I'd be very thankful; here are the most recurring errors:
07-22 19:34:36.375 5135 5135 W PackageManager: Not granting permission android.permission.WRITE_EXTERNAL_STORAGE to package com.lenovo.leos.cloud.sync.row because it was previously installed without
07-22 19:34:36.375 5135 5135 W PackageManager: Unknown permission android.permission.ACCESS_SUPERUSER in package com.lenovo.leos.cloud.sync.row
07-22 19:34:39.504 5135 5135 E DeviceIdleController: Bad device idle settings
07-22 19:34:39.504 5135 5135 E DeviceIdleController: java.lang.IllegalArgumentException: 'null' in 'null' is not a valid key-value pair
And Fatal exceptions thrown when apps crash:
07-22 19:33:56.796 1422 1516 F art : art/runtime/gc/collector/mark_sweep.cc:413] Tried to mark 0x40 not contained by any spaces
07-22 19:34:28.815 4933 4933 F DEBUG : pid: 665, tid: 665, name: fingerprintd >>> /system/bin/fingerprintd <<<
There is a solution for this.
Go to the Settings Page.
Go to 'Apps' Settings.
Find the app package causing this problem and click into it.
Go to 'Permissions' settings and allow all the permissions shown there.
Hope the issue is now solved.

Xamarin PCL Bluetooth can't see devices

I'm trying to using xamarin for do a test app.
This app must search bluetooth devices, view them into a list and connect to them for read or write data.
I choose xamarin Portable Class Library for my project.
I see a lots of examples but I can't see devices in my list.
I try Monkey Robotics (project 'Robocontroller' and project 'BLE') but scanning I can't see devices!
Robocontroller:
05-30 15:14:21.048 D/Mono (11792): [0x7f6946d000] worker starting
05-30 15:14:21.063 I/mono-stdout(11792): BluetoothLEManager: Scan timeout has elapsed.
BluetoothLEManager: Scan timeout has elapsed.
05-30 15:14:21.065 D/BluetoothAdapter(11792): stopLeScan()
05-30 15:14:21.067 D/BluetoothAdapter(11792): 622203304: getState(). Returning 12
BLE:
Adapter: Starting a scan for devices.
05-30 15:23:53.549 D/BluetoothAdapter(17688): startLeScan(): null
05-30 15:23:53.647 D/BluetoothLeScanner(17688): onClientRegistered() - status=0 clientIf=5
adapter.StartScanningForDevices(00000000-0000-0000-0000-000000000000)
05-30 15:23:53.755 I/mono-stdout(17688): adapter.StartScanningForDevices(00000000-0000-0000-0000-000000000000)
[0:] adapter.StartScanningForDevices(00000000-0000-0000-0000-000000000000)
05-30 15:23:53.768 I/Choreographer(17688): Skipped 152 frames! The application may be doing too much work on its main thread.
Thread started: <Thread Pool> #7
05-30 15:24:03.718 D/Mono (17688): [0xba2bcf40] worker starting
BluetoothLEManager: Scan timeout has elapsed.
05-30 15:24:03.801 I/mono-stdout(17688): BluetoothLEManager: Scan timeout has elapsed.
05-30 15:24:03.808 D/BluetoothAdapter(17688): stopLeScan()
I tryed others projects like 'estimotes', 'xamarin BLE' (the one with old code that redirect to Monkey.Robotics) and 'BluetoothLEExplorer'.
I'm using latest version of xamarin with vs2015 pro.
Any suggestions?
Thanks
Using BLE you can't see another bluetooth devices (like android phone), must be a ble device.

Android M API 23 emulator Unfortunately, browser has stopped

I am trying to launch browser on Android M Emulator. It keeps on crashing on every launch.
10-14 13:34:12.934: I/ActivityManager(1294): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.android.browser cmp=com.android.browser/.BrowserActivity bnds=[372,692][460,800] (has extras)} from uid 10007 on display 0
10-14 13:34:13.046: I/ActivityManager(1294): Start proc 5514:com.android.browser/u0a17 for activity com.android.browser/.BrowserActivity
10-14 13:34:13.131: W/System(5514): ClassLoader referenced unknown path: /system/app/Browser/lib/x86
10-14 13:34:13.451: E/chromium(5514): [ERROR:browser_main_loop.cc(698)] GLSurface::InitializeOneOff failed
10-14 13:34:13.591: D/WebViewTimersControl(5514): onBrowserActivityResume
10-14 13:34:13.591: D/WebViewTimersControl(5514): Resuming webview timers, view=com.android.browser.BrowserWebView{2900a61 VFEDHVC.. ......I. 0,0-0,0}
10-14 13:34:13.861: I/ActivityManager(1294): Displayed com.android.browser/.BrowserActivity: +833ms
10-14 13:34:14.377: A/DEBUG(962): pid: 5514, tid: 5559, name: GpuThread >>> com.android.browser <<<
10-14 13:34:14.500: I/WindowState(1294): WIN DEATH: Window{bd73c76 u0 com.android.browser/com.android.browser.BrowserActivity}
10-14 13:34:14.556: I/ActivityManager(1294): Process com.android.browser (pid 5514) has died
10-14 13:34:14.560: W/ActivityManager(1294): Force removing ActivityRecord{1b3e625 u0 com.android.browser/.BrowserActivity t25}: app died, no saved state
Settings -> Apps -> Browser. then goto permission and enable storage permission to be enabled.because the storage permission is closed default.Just open it!
Edit the Android Virtual Device settings inside you AVD manager that you are using and try starting your emulator with the "Use Host GPU" option enabled, this will help to fix your error with the browser.
For downloading files with the browser make sure you also add enough size to your SD Card option. After editing both settings, start Android and goto: Settings -> Apps -> Browser.
(If needed force to stop the browser) then goto permission and enable storage permission to be enabled. This will fix your error with the browser when downloading files.

cant pair programmatically with BLE device

When I connect BLE device with my Nexus7 and Samsung Galaxy S3 with Android 4.3 , it connects and works fine.
When I try to connect programatically, it pairs(I can see logs and changing of the state to the paired).
But when I am trying connect and work with,there are different problem such as no service discovered and so on.
When I connect Samsung S3 with native android tools, it works, services is discovered and app works.
On Nexus 7 doesn't work even after native connection.
Logs that cause problems(At least I think so):
10-31 10:24:09.219: W/bt-l2cap(10778): L2CA_EnableUpdateBleConnParams - unknown BD_ADDR e0c79d649927
10-31 10:24:09.219: E/bt-btm(10778): btm_sec_disconnected - Clearing Pending flag
10-31 10:24:09.219: E/bt-btif(10778): Unknown conn ID: 3
10-31 10:24:09.219: E/bt-btif(10778): property type:3, len:0 is invalid
10-31 10:24:09.219: E/(10778): ### ASSERT : external/bluetooth/bluedroid/main/../btif/src/btif_dm.c line 1125 storing remote services failed (1) ###
10-31 10:24:09.219: E/BluetoothRemoteDevices(10778): devicePropertyChangedCallback: bdDevice: E0:C7:9D:64:99:27, value is empty for type: 3

Categories

Resources