[AT&T Samsung Galaxy S7 Edge Questions & Answers] ryanman0:
The phone is up and running now. I am having some issues with packages which see to be related to the odex.

To get around the issue, I connect with adb shell catlog and search up for FATAL to see the crash stack.

I am still working on it to try to figure out what is wrong. From some searched on odex files,

I might have to deodex the file or find a deodex one from a ROM. I think what happened to my installation

is that I got corrupted/missing odx odex data for the system service providers. This might have

been from TB "integrate into system rom" operations that I did. I'll continue tomorrow.

//had some issues trying to set ringtones and other problems

//found that the media storage provider was not installed

//from adb shell, logcat shows the following crash over and over when searching up for FATAL in the output

--------------------------

10-01 05:36:53.589 4214 4226 I art : Wrote stack traces to '/data/anr/traces.txt'

10-01 05:36:53.589 1396 2217 I Process : Sending signal. PID: 4206 SIG: 3

10-01 05:36:53.589 4206 4212 I art : Thread[2,tid=4212,WaitingInMainSignalCatcherLoop,Thread*=0x7f8c71c000,peer=0x12c6d0a0,"Signal Catcher"]: reacting to signal 3

10-01 05:36:53.589 6347 6347 D AndroidRuntime: Shutting down VM

10-01 05:36:53.599 6347 6347 E AndroidRuntime: FATAL EXCEPTION: main

10-01 05:36:53.599 6347 6347 E AndroidRuntime: Process: android.process.media, PID: 6347

10-01 05:36:53.599 6347 6347 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.android.providers.media.MediaDocumentsProvider: java.lang.ClassNotFoundException: Didn't find class "com.android.providers.media.MediaDocumentsProvider" on path: DexPathList[[zip file "/system/priv-app/SecMediaProvider/SecMediaProvider.apk"],nativeLibraryDirectories=[/system/priv-app/SecMediaProvider/lib/arm64, /vendor/lib64, /system/lib64]]

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:6770)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:6362)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6302)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:755)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(<Xposed>)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at android.app.ActivityThread.access$1800(ActivityThread.java:222)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1861)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at android.os.Looper.loop(Looper.java:158)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7229)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

10-01 05:36:53.599 6347 6347 E AndroidRuntime: at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:133)

//cpu is pegged due to system process looping as the media provider crashes

root@hero2qlteatt:/ # top -m 4

top -m 4

User 27%, System 36%, IOW 0%, IRQ 1%

User 360 + Nice 1 + Sys 487 + Idle 464 + IOW 8 + IRQ 8 + SIRQ 9 = 1337

PID PR CPU% S #THR VSS RSS PCY UID Name

1396 3 30% S 205 2569632K 273356K fg system system_server

6697 1 16% S 17 2192572K 99180K bg u0_a181 com.wunderground.android.weather

6750 1 2% R 1 7568K 2836K fg root top

1015 1 0% S 5 2143016K 114400K fg root zygote64

//then I disabled the media provider

1|root@hero2qlteatt:/ # pm disable com.android.providers.media

pm disable com.android.providers.media

Package com.android.providers.media new state: disabled

//cpu dropped

ser 14%, System 32%, IOW 0%, IRQ 1%

User 111 + Nice 89 + Sys 442 + Idle 692 + IOW 3 + IRQ 10 + SIRQ 13 = 1360

PID PR CPU% S #THR VSS RSS PCY UID Name

1396 0 15% S 221 2621096K 223988K fg system system_server

651 3 5% S 1 7284K 2360K fg system /system/bin/servicemanager

135 0 4% S 1 0K 0K fg root kswapd0

983 3 2% S 1 65284K 9728K fg root /system/bin/installd

here is the current directory structure

root@hero2qlteatt:/system/priv-app/SecMediaProvider # ls

ls

SecMediaProvider.apk

arm64

root@hero2qlteatt:/system/priv-app/SecMediaProvider # cd arm64

cd arm64

root@hero2qlteatt:/system/priv-app/SecMediaProvider/arm64 # ls

ls

SecMediaProvider.odex

//then I used TB(Titanium Backup) to clean up dalvik cache

//However, when enabling the provider again, it still hung.

//Since the crash error listed a lib directory, I tried moving the .odex there,

root@hero2qlteatt:/system/priv-app/SecMediaProvider/arm64 #

mount -o rw,remount /system

mount -o rw,remount rootfs /

<

root@hero2qlteatt:/system/priv-app/SecMediaProvider/arm64 # cd ..

cd ..

127|root@hero2qlteatt:/system/priv-app/SecMediaProvider # mkdir lib

mkdir lib

root@hero2qlteatt:/system/priv-app/SecMediaProvider # mv arm64 lib/arm64

mv arm64 lib/arm64

root@hero2qlteatt:/system/priv-app/SecMediaProvider # ls

ls

SecMediaProvider.apk

lib

root@hero2qlteatt:/system/priv-app/SecMediaProvider # cd lib

cd lib

root@hero2qlteatt:/system/priv-app/SecMediaProvider/lib # ls

ls

arm64

root@hero2qlteatt:/system/priv-app/SecMediaProvider/lib # cd arm64

cd arm64

root@hero2qlteatt:/system/priv-app/SecMediaProvider/lib/arm64 # ls

ls

SecMediaProvider.odex

root@hero2qlteatt:/system/priv-app/SecMediaProvider/lib/arm64 # pm enable com.android.providers.media

m enable com.android.providers.media

<

Package com.android.providers.media new state: enabled

root@hero2qlteatt:/system/priv-app/SecMediaProvider/lib/arm64 #

//still got a hang; however, the CPU was not pegged and I was able to navigate a bit

//went to devices\Applications\Application Manager --> more\show system apps

// Then I went to Media Storage and cleared the cache and data

10-01 06:04:19.009 976 1368 I APM::AudioPolicyManager: stopOutput() output 4, stream 1, session 190

10-01 06:04:19.019 19156 19156 I InjectionManager: Inside getClassLibPath caller

10-01 06:04:19.029 19156 19156 D RelationGraph: garbageCollect()

10-01 06:04:19.029 19156 19156 I InjectionManager: Inside getClassLibPath + mLibMap{0=, 1=}

10-01 06:04:19.029 19156 19156 D ContextRelationManager: ContextRelationManager() : FEATURE_ENABLED=true

10-01 06:04:19.029 19156 19156 W ResourcesManager: getTopLevelResources: /system/priv-app/SecMediaProvider/SecMediaProvider.apk / 1.0 running in com.android.providers.media rsrc of package com.android.providers.media

10-01 06:04:19.029 1396 3479 I InjectionManagerService -AppFeature: getCoreFeaturePkgList :[]

10-01 06:04:19.029 19156 19156 D ResourcesManager: For user 0 new overlays fetched [/data/overlays/style/com.s6theme.Astarlitnight/com.s6theme.Astarlitnight.common.apk, /data/overlays/style/com.s6theme.Astarlitnight/com.s6theme.Astarlitnight.touchwiz.apk, /data/overlays/style/com.s6theme.Astarlitnight/com.s6theme.Astarlitnight.media.apk]

10-01 06:04:19.039 19156 19156 D AndroidRuntime: Shutting down VM

10-01 06:04:19.049 19156 19156 E AndroidRuntime: FATAL EXCEPTION: main

10-01 06:04:19.049 19156 19156 E AndroidRuntime: Process: android.process.media, PID: 19156

10-01 06:04:19.049 19156 19156 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.android.providers.media.MediaDocumentsProvider: java.lang.ClassNotFoundException: Didn't find class "com.android.providers.media.MediaDocumentsProvider" on path: DexPathList[[zip file "/system/priv-app/SecMediaProvider/SecMediaProvider.apk"],nativeLibraryDirectories=[/system/priv-app/SecMediaProvider/lib/arm64, /vendor/lib64, /system/lib64]]

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:6770)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:6362)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6302)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:755)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(<Xposed>)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at android.app.ActivityThread.access$1800(ActivityThread.java:222)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1861)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at android.os.Looper.loop(Looper.java:158)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7229)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:133)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.providers.media.MediaDocumentsProvider" on path: DexPathList[[zip file "/system/priv-app/SecMediaProvider/SecMediaProvider.apk"],nativeLibraryDirectories=[/system/priv-app/SecMediaProvider/lib/arm64, /vendor/lib64, /system/lib64]]

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:6755)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: ... 14 more

10-01 06:04:19.049 19156 19156 E AndroidRuntime: Suppressed: java.io.IOException: No original dex files found for dex location /system/priv-app/SecMediaProvider/SecMediaProvider.apk

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at dalvik.system.DexFile.openDexFileNative(Native Method)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at dalvik.system.DexFile.openDexFile(DexFile.java:295)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at dalvik.system.DexFile.<init>(DexFile.java:80)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at dalvik.system.DexFile.<init>(DexFile.java:59)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at dalvik.system.DexPathList.loadDexFile(DexPathList.java:279)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at dalvik.system.DexPathList.makePathElements(DexPathList.java:248)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at dalvik.system.DexPathList.<init>(DexPathList.java:120)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:65)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:84)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:45)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at android.app.LoadedApk.getClassLoader(LoadedApk.java:434)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at de.robv.android.xposed.XposedBridge$1.beforeHookedMethod(XposedBridge.java:200)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:735)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: ... 10 more

10-01 06:04:19.049 19156 19156 E AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: com.android.providers.media.MediaDocumentsProvider

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at java.lang.Class.classForName(Native Method)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

10-01 06:04:19.049 19156 19156 E AndroidRuntime: ... 16 more

10-01 06:04:19.049 19156 19156 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

10-01 06:04:19.049 1396 3519 I PersonaManager: mKnoxInfo is empty

10-01 06:04:19.049 1396 3760 I Process : Sending signal. PID: 1396 SIG: 3

10-01 06:04:19.049 1396 3760 I Process : Sending signal. PID: 18955 SIG: 3

10-01 06:04:19.049 1396 1402 I art : Thread[2,tid=1402,WaitingInMainSignalCatcherLoop,Thread*=0x7f8c71c000,peer=0x12c010a0,"Signal Catcher"]: reacting to signal 3

10-01 06:04:19.049 1396 3519 W ActivityManager: Process android.process.media has crashed too many times: killing!

10-01 06:04:19.049 1396 3519 I ActivityManager: Killing 19156:android.process.media/u0a61 (adj 0): crash

10-01 06:04:19.049 1396 3519 D ActivityManager: isAutoRunBlockedApp:: com.android.providers.media, Auto Run ON

10-01 06:04:19.049 1396 3760 W ActivityManager: Unable to launch app com.android.providers.media/10061 for provider media: launching app became null

10-01 06:04:19.049 18955 18997 E ActivityThread: Failed to find provider info for media

10-01 06:04:19.059 18955 18960 I art : Thread[2,tid=18960,WaitingInMainSignalCatcherLoop,Thread*=0x7f8bc1d000,peer=0x12c6f0a0,"Signal Catcher"]: reacting to signal 3