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

Samsung theme folders private data is detected as corpse #1842

Open
SuperSandro2000 opened this Issue Jul 9, 2018 · 17 comments

Comments

4 participants
@SuperSandro2000

SuperSandro2000 commented Jul 9, 2018

Related to #1813 and #1815 CorpseFinder still shows data folders from Samsung Themes as corpse and ownerless. Those folders are created when the theme is installed and will probably be regenerated when deleted.
SD Maid can't add an owner as the owner suggestor does not show the theme as installed.
The theme app is probably not a real app because AppControl does not show it either but TitaniumBackup does (?).
As the apk path is obfuscated in oreo it is not an option to just search trough /data/app/package-name if there exist a base.apk.

I tested this under Oreo and can't say what happens on Marshmallow or Nougat Touchwiz. If needed I could test this on Marshmallow but I can't on Nougat.

Clutterreport:

Clutterreport: /data/user/0/theme.pas2001.TheDawn.II.appiconpack (FP)
### Target
Target: `/data/user/0/theme.pas2001.TheDawn.II.appiconpack`
Prefix-free: `theme.pas2001.TheDawn.II.appiconpack`
Path-prefix: `/data/user/0/`
Type: `DIRECTORY`
Location: `PRIVATE_DATA`
Current keeper state: `false`
Suggested keeper state: `true`

### SD Maid
Version: `4.11.3 (41103)`

### Device
Fingerprint: `samsung/dreamltexx/dreamlte:8.0.0/R16NW/G950FXXU1CRD7:user/release-keys`

@d4rken d4rken added this to the Next Tasks milestone Jul 9, 2018

@d4rken

This comment has been minimized.

Owner

d4rken commented Jul 9, 2018

The theme app is probably not a real app because AppControl does not show it either but TitaniumBackup does (?).

It does? Can you get the apps to show in a terminal with root and "pm list packages" + some flags?

As the apk path is obfuscated in oreo it is not an option to just search trough /data/app/package-name if there exist a base.apk.

Yeah, but there is still some pattern to it, it all comes down to how expensive we make the checks as we don't want to slow down the scan too much.

@SuperSandro2000

This comment has been minimized.

SuperSandro2000 commented Jul 9, 2018

Pm list does not work and i have no PC right now so dumpsys needs to do it.

Key Set Manager:
  [theme.pas2001.TheDawn.II.appiconpack]
      Signing KeySets: 435

Packages:
  Package [theme.pas2001.TheDawn.II.appiconpack] (38ef3bb):
    userId=10318
    pkg=Package{fc2f0d8 theme.pas2001.TheDawn.II.appiconpack}
    codePath=/data/app/theme.pas2001.TheDawn.II.appiconpack-t1Q5Wt6qp3yDRE1xtUaB4w==
    resourcePath=/data/app/theme.pas2001.TheDawn.II.appiconpack-t1Q5Wt6qp3yDRE1xtUaB4w==
    legacyNativeLibraryDir=/data/app/theme.pas2001.TheDawn.II.appiconpack-t1Q5Wt6qp3yDRE1xtUaB4w==/lib
    primaryCpuAbi=null
    secondaryCpuAbi=null
    dexMode=unknown
    versionCode=16 minSdk=21 targetSdk=21
    versionName=1.0
    splits=[base]
    apkSigningVersion=1
    applicationInfo=ApplicationInfo{a728c31 theme.pas2001.TheDawn.II.appiconpack}
    flags=[ ALLOW_CLEAR_USER_DATA ]
    dataDir=/data/user/0/theme.pas2001.TheDawn.II.appiconpack
    supportsScreens=[small, medium, large, xlarge, resizeable, anyDensity]
    timeStamp=2018-07-09 13:46:08
    firstInstallTime=2018-07-09 13:46:08
    lastUpdateTime=2018-07-09 13:46:08
    signatures=PackageSignatures{862cf16 [68043d73]}
    installPermissionsFixed=true installStatus=1
    pkgFlags=[ ALLOW_CLEAR_USER_DATA ]
    requested permissions:
      com.samsung.android.permission.SAMSUNG_OVERLAY_APPICON
    User 0: ceDataInode=2066479 installed=true hidden=false suspended=false stopped=true notLaunched=true enabled=0 instant=false
    overlay paths:
      /data/app/android.swiftinstaller.overlay-RTdCd1PhzzvE5kGdcLfAqA==/base.apk
      runtime permissions:
mSkippingApks:
  package : SamsungPayStub.apk
  package : StubUpdater.apk
  package : CnnPanel.apk
  package : apps_brasil_signed_aligned.apk
  package : UserManual.apk
  package : NaverV_N.apk
  package : SamsungClub_CTP_v1.0.apk
  package : samsung_club_uy_access_release_v1_3.apk
  package : MSSkype_stub.apk
  package : FlipboardBriefing.apk
  package : RRO_AMX_stk1.apk
  package : RRO_AMX_stk2.apk
  package : CLAROAPPS_STUB_1_0_0.apk
  package : ClaroJuegos_Stub.apk
  package : OnStartNotification_v20.apk
  package : Portal_Stub.apk
  package : ClaroContenedor_Stub.apk
  package : MiClaro_CDR_v5.1.apk
  package : ubank_samsung.apk
  package : yandex.search.apk
  package : UWT_STK_RRO_v1.1_20160113.apk
  package : 100Game_MOVISTAR_4x3_KU84_2009_2.0.9.apk
  package : MShopAndroidPhoneApp-16.5.0.100-build16.0.201246.0-patron-release-releasesigned.apk
  package : MaftPreloadManagerAndroidApp-release-signed-tagged-TelefonicaLATAM.apk
  package : TonosDeEspera_v1.6_20170123_omc_tgu_only.apk
  package : MinhaClaro_v5.0.3-28.apk
  package : Adalyst_IU_V3.2.PR.CBR.10_19.apk
  package : messenger-stub.apk
  package : instagram-stub.apk
  package : papergarden.apk
  package : Vivo_Apps_Clube-v1.19.177.apk
  package : vivo-apps-embedded-2.6.9.apk
  package : ZVV_STK_RRO.apk
  package : ZVV_STK2_RRO.apk
  package : apt_Vodafone_StartOne_Katniss.apk
  package : instagram_stub.apk
  package : MyVF_VOD.apk
  package : Ignite-Singtel_1.7.306_releaseProduction.apk
  package : My_Singtel_4.4_com.singtel.mysingtel.apk
  package : MiClaro_PCT_v1.5.3_build67.apk
  package : HPSClient.apk
  package : mobileTworld.apk
  package : SKTOneStore.apk
  package : ONEstoreSetupwizard.apk
  package : TStoreAgent.apk
  package : TStoreUtility.apk
  package : TPhoneOnePackage.apk
  package : TPhone.apk
  package : TPhoneInternal.apk
  package : TPhoneSetup.apk
  package : SKTService.apk
  package : SmartPush.apk
  package : SafetyCleaner.apk
  package : SktUsimService.apk
  package : SKTMemberShip.apk
  package : SKTHiddenMenu.apk
  package : EweMBMSServer_SKT.apk
  package : MaftPreloadManagerAndroidApp-release-signed-tagged-movistarmx.apk
  package : signatureClub.apk
  package : miClaroPeru_Stub.apk
  package : MiClaro_CENAM_v2.0.1.apk
  package : Ebay_Carrier_ID_AT_TR.apk
  package : MyVodafone_CNX.apk
  package : miClaro_COM_Stub.apk
  package : Ebay_Carrier_ID_DE_CS.apk
  package : MiClaro_CTI_v1.2.0-111.apk
  package : MyVodafone_OMN.apk
  package : newsstubv2.apk
  package : vsimservice.apk
  package : MiVodafone_ATL_DropNoviembre.apk
  package : MyATT_ATT.apk
  package : VFAL_MyVodafone_AVF.apk
  package : mein.apk
  package : idapk-1.0.0.2-1.apk
  package : samsung_rewards.apk
  package : app_productionflavor.apk
  package : com_zentity_VDC.apk
  package : IE_MyVodafone.apk
  package : myvodafone_VDH.apk
  package : MiClaro_ECO_v3.6.1.apk
  package : mtel_selfcare_app.apk
  package : miTelcel_Stub.apk
  package : TelcelContenedorStub.apk
  package : My_Vodafone_PT.apk
  package : vfgr_myvf.apk
  package : MyGalaxy.apk
  package : LGUGPSnWPS.apk
  package : LGUOZStore.apk
  package : LGUPushAgent.apk
  package : LGUplusTsmProxy.apk
  package : LGUSetting.apk
  package : LGUPlusBox.apk
  package : LGUMiniCustomerCenter.apk
  package : LGUplusHDTV.apk
  package : LGUHiddenMenu.apk
  package : KT114Provider.apk
  package : CLiP.apk
  package : KTCustomerService.apk
  package : KTOneStore.apk
  package : KTPackageInstaller.apk
  package : KTPushNotiService.apk
  package : KTServiceMenu.apk
  package : WelcomeLogin.apk
  package : KTServiceAgent.apk
  package : KTHiddenMenu.apk
  package : Ignite-Globe_2.2.003-996_releaseProduction.apk
  package : mojvip.apk

Package Changes:
  Sequence number=105
  User 0:
    seq=7, package=com.android.phone
    seq=11, package=com.google.android.gms
    seq=13, package=com.samsung.android.lool
    seq=20, package=com.rejh.sharedr
    seq=35, package=theme.pas2001.TheDawn.II.appiconpack
    seq=81, package=com.jndapp.iconpack.minimalist
    seq=82, package=de.vvo_online.vvomobil
    seq=83, package=com.zacharee1.systemuituner
    seq=84, package=com.google.android.googlequicksearchbox
    seq=90, package=com.android.settings
    seq=91, package=com.dsfishlabs.disurvivors
    seq=95, package=com.samsung.android.messaging
    seq=101, package=eu.thedarken.sdm
    seq=102, package=net.rention.mind.skillz
    seq=103, package=com.vector.game.puzzle.twodots.numberlink2248hexa
    seq=104, package=com.mousecity.escapemachinecity


Dexopt state:
  [theme.pas2001.TheDawn.II.appiconpack]
    Instruction Set: arm64


Compiler stats:
  [theme.pas2001.TheDawn.II.appiconpack]
    (No recorded stats)


Package White/Blacklist Metadata:

Historical install Logging info(9/10):

-------- coreapps list --------
com.sec.location.nsflp2:/system/priv-app/NSFusedLocation_v3.2
com.google.android.ext.services:/system/priv-app/GoogleExtServices
com.android.providers.telephony:/system/priv-app/SecTelephonyProvider
com.google.android.ext.shared:/system/app/GoogleExtShared
com.samsung.android.incallui:/data/app/com.samsung.android.incallui-9qLm_DUG3jfGj6bfRsnqKA==
com.samsung.android.knox.containercore:/system/priv-app/KnoxCore
org.simalliance.openmobileapi.service:/system/app/SmartcardService
com.android.mms.service:/system/priv-app/MmsService
com.samsung.ucs.agent.boot:/system/app/bootagent
com.android.defcontainer:/system/priv-app/DefaultContainerService
com.sec.ims:/system/priv-app/ImsTelephonyService
com.sec.sve:/system/app/sveservice
com.samsung.android.SettingsReceiver:/system/priv-app/SettingsReceiver
android:/system/framework/framework-res.apk
com.android.providers.settings:/system/priv-app/SecSettingsProvider
com.sec.imsservice:/system/priv-app/imsservice
com.android.inputdevices:/system/priv-app/InputDevices
com.samsung.advp.imssettings:/system/app/ImsSettings
com.sec.android.inputmethod:/data/app/com.sec.android.inputmethod-GvOR-ZzqGQogLmEgZG6I9g==
com.android.server.telecom:/system/priv-app/Telecom
com.google.android.packageinstaller:/system/priv-app/GooglePackageInstaller
com.android.proxyhandler:/system/priv-app/ProxyHandler
com.sec.phone:/system/app/SecFactoryPhoneTest
com.sec.app.RilErrorNotifier:/system/priv-app/PhoneErrService
com.android.settings:/system/priv-app/SecSettings
com.android.phone:/system/priv-app/TeleService
com.android.shell:/system/priv-app/Shell
com.android.location.fused:/system/priv-app/FusedLocation
com.sec.epdg:/system/priv-app/EpdgService
com.android.systemui:/system/priv-app/SystemUI

@yelkarama

This comment has been minimized.

yelkarama commented Jul 9, 2018

in my case (/data/user_de/0/theme.ideadesigns.FractalCurls.wallpaperpack), the following command give a lot of the details:

pm dump theme.pas2001.TheDawn.II.appiconpack

 pkg=Package{1bf4810 theme.ideadesigns.FractalCurls.wallpaperpack}
 codePath=/data/app/theme.ideadesigns.FractalCurls.wallpaperpack-cbltOu30uzGQDJA41PJqXQ==

it also shows the requested permissions:

 requested permissions:
   com.samsung.android.permission.SAMSUNG_OVERLAY_WALLPAPER

I also spot these lines:

 overlay paths:
   /data/app/android.SwiftBlack.AzureWhiteshadow.Android8Samsung-z1-rw4NpywLMxE9jVkJFow==/base.apk

but I'm not sure about the relationship between the theme ans SwiftBlack...

@d4rken

This comment has been minimized.

Owner

d4rken commented Jul 9, 2018

Hm seems that the system hides this from the PackageManager?

Does TiBu use dumpsys?

SD Maid already uses PackageManager to get installed+uninstalled apps and merges that with the output from pm list packages (because only that shows instant apps).

While theoretically we could also generate and parse dumpsys if root is available, that would be quite bad for performance I think...

@SuperSandro2000

This comment has been minimized.

SuperSandro2000 commented Jul 9, 2018

I have no clue how tibu works.
I read that you can list overlays with pm list overlays. Maybe this helps.

@d4rken

This comment has been minimized.

Owner

d4rken commented Jul 9, 2018

Hm

walleye:/ # pm list overlay
Error: unknown list type 'overlay'
255|walleye:/ # pm list overlays
Error: unknown list type 'overlays'

There is cmd overlay list, what does that show for you?

@SuperSandro2000

This comment has been minimized.

SuperSandro2000 commented Jul 9, 2018

Bad memory. It should be cmd overlay list .
I need adb for that...

I ran pm list packages theme.pas2001.TheDawn.II.appiconpack and it returned nothing.
cmd overlay list only showed substratum and swift installer themes.

@gagabs

This comment has been minimized.

gagabs commented Jul 11, 2018

The "broken app" I've mentioned is what happens when you clear the false positives itens in the corpse finder and reboot. The theme is removed and the broken app entries appears in the Android config app list

@SuperSandro2000

This comment has been minimized.

SuperSandro2000 commented Jul 11, 2018

I am pretty sure they appear before already.

@gagabs

This comment has been minimized.

gagabs commented Jul 11, 2018

@SuperSandro2000 not on my phone

@SuperSandro2000

This comment has been minimized.

SuperSandro2000 commented Jul 11, 2018

They did for me when I tested it

@gagabs

This comment has been minimized.

gagabs commented Jul 11, 2018

Can be a specific Oreo thing. In MM they don't appear

@SuperSandro2000

This comment has been minimized.

SuperSandro2000 commented Jul 11, 2018

#1813

In Oreo ROMs, When selecting /data/app in Corpus Finder options, SD Maid identifies Substratum overlays as Corpus to be removed. That was not the case in Nougat ROM.
I disabled this option for now.

@gagabs

This comment has been minimized.

gagabs commented Jul 12, 2018

The broken apps shows in the Android Config app list, not in the SD Maid corpse finder

@gagabs

This comment has been minimized.

gagabs commented Jul 12, 2018

A pm dump FelipeLeite.Oreo:

DUMP OF SERVICE package:
  Key Set Manager:
    [FelipeLeite.Oreo]
        Signing KeySets: 300

  Packages:
    Package [FelipeLeite.Oreo] (2d56004):
      userId=10055
      pkg=Package{75aefe4 FelipeLeite.Oreo}
      codePath=/data/app/FelipeLeite.Oreo-1
      resourcePath=/data/app/FelipeLeite.Oreo-1
      legacyNativeLibraryDir=/data/app/FelipeLeite.Oreo-1/lib
      primaryCpuAbi=null
      secondaryCpuAbi=null
      nativeLibraryRootDir=/data/app/FelipeLeite.Oreo-1/lib
      nativeLibraryDir=/data/app/FelipeLeite.Oreo-1/lib/arm
      secondaryNativeLibraryDir=null
      nativeLibraryRootRequiresIsa=true
      dexMode=unknown
      versionCode=13 targetSdk=21
      versionName=1
      splits=[base]
      applicationInfo=ApplicationInfo{3aae022 FelipeLeite.Oreo}
      flags=[ ALLOW_CLEAR_USER_DATA ]
      dataDir=/data/user/0/FelipeLeite.Oreo
      supportsScreens=[small, medium, large, xlarge, resizeable, anyDensity]
      timeStamp=2018-07-11 08:39:56
      firstInstallTime=2018-07-11 08:39:56
      lastUpdateTime=2018-07-11 08:39:56
      installerPackageName=com.samsung.android.themecenter
      signatures=PackageSignatures{c57fab3 [94a7870]}
      installPermissionsFixed=true installStatus=1
      pkgFlags=[ ALLOW_CLEAR_USER_DATA ]
      requested permissions:
        com.samsung.android.permission.SAMSUNG_OVERLAY_THEME
      install permissions:
        com.samsung.android.permission.SAMSUNG_OVERLAY_THEME, granted=true, flags=0x0
      User 0:  installed=true hidden=false stopped=true notLaunched=true enabled=2
        lastDisabledCaller: com.samsung.android.themecenter
        runtime permissions:
  mPackagesOnlyForOwnerUser:
  mComponentsOnlyForOwnerUser:
  mSkippingApks:
    package : Nfc.apk
    package : NfcNci.apk
    package : NfcFn.apk
    package : NfcTest.apk
    package : Tag.apk
    package : SamsungNfcTag.apk
    package : UrgentFWUpdateNfc.apk
@gagabs

This comment has been minimized.

gagabs commented Jul 12, 2018

A pm dump FelipeLeite.Oreo.appicon:

DUMP OF SERVICE package:
  Key Set Manager:
    [FelipeLeite.Oreo.appicon]
        Signing KeySets: 300

  Packages:
    Package [FelipeLeite.Oreo.appicon] (379c519):
      userId=10129
      pkg=Package{c6850c1 FelipeLeite.Oreo.appicon}
      codePath=/data/app/FelipeLeite.Oreo.appicon-1
      resourcePath=/data/app/FelipeLeite.Oreo.appicon-1
      legacyNativeLibraryDir=/data/app/FelipeLeite.Oreo.appicon-1/lib
      primaryCpuAbi=null
      secondaryCpuAbi=null
      nativeLibraryRootDir=/data/app/FelipeLeite.Oreo.appicon-1/lib
      nativeLibraryDir=/data/app/FelipeLeite.Oreo.appicon-1/lib/arm
      secondaryNativeLibraryDir=null
      nativeLibraryRootRequiresIsa=true
      dexMode=unknown
      versionCode=13 targetSdk=0
      versionName=1
      splits=[base]
      applicationInfo=ApplicationInfo{d30f7bf FelipeLeite.Oreo.appicon}
      flags=[ ALLOW_CLEAR_USER_DATA ]
      dataDir=/data/user/0/FelipeLeite.Oreo.appicon
      supportsScreens=[medium]
      timeStamp=2018-07-11 08:40:00
      firstInstallTime=2018-07-11 08:40:01
      lastUpdateTime=2018-07-11 08:40:01
      signatures=PackageSignatures{60fde8c [6d899d5]}
      installPermissionsFixed=true installStatus=1
      pkgFlags=[ ALLOW_CLEAR_USER_DATA ]
      requested permissions:
        com.samsung.android.permission.SAMSUNG_OVERLAY_COMPONENT
        android.permission.WRITE_EXTERNAL_STORAGE
        android.permission.READ_PHONE_STATE
        android.permission.READ_EXTERNAL_STORAGE
      install permissions:
        android.permission.READ_EXTERNAL_STORAGE, granted=true, flags=0x0
        android.permission.READ_PHONE_STATE, granted=true, flags=0x0
        com.samsung.android.permission.SAMSUNG_OVERLAY_COMPONENT, granted=true, flags=0x0
        android.permission.WRITE_EXTERNAL_STORAGE, granted=true, flags=0x0
      User 0:  installed=true hidden=false stopped=true notLaunched=true enabled=2
        lastDisabledCaller: com.samsung.android.themecenter
        runtime permissions:
  mPackagesOnlyForOwnerUser:
  mComponentsOnlyForOwnerUser:
  mSkippingApks:
    package : Nfc.apk
    package : NfcNci.apk
    package : NfcFn.apk
    package : NfcTest.apk
    package : Tag.apk
    package : SamsungNfcTag.apk
    package : UrgentFWUpdateNfc.apk
@SuperSandro2000

This comment has been minimized.

SuperSandro2000 commented Jul 12, 2018

The broken apps shows in the Android Config app list, not in the SD Maid corpse finder

What do you mean exaactly?
Btw you can edit issues comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment