Skip to content

Android 8.0 Oreo: Untouched base.apk #7

@sweisgerber-dev

Description

@sweisgerber-dev

ARTist's injection only works when replacing the original /data/app/<package>/base.apk with the injected and signed base.apk..

On Android 6, 7 & 7.1 it works, when rewriting / faking the checksums.

Affected Projects

  • ARTist
  • art
  • ArtistGui (potential)
  • dexterous (potential)

The only log message indicating the problem is: zygote64: expected 1 dex files but found 2
Then the compiled oat fiel is thrown away and the original non-injected app is executed

Context Logs

10-10 15:37:28.066  1081  1784 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=de.heise.android.heiseonlineapp/.ui.ChannelActivity bnds=[255,245][512,440]} from uid 10035
10-10 15:37:28.069   803  4088 I ACDB-LOADER: ACDB AFE returned = -19
10-10 15:37:28.069   803  4088 D hardware_info: hw_info_append_hw_type : device_name = speaker
10-10 15:37:28.069   803  4088 D audio_hw_primary: enable_snd_device: snd_device(2: speaker)
10-10 15:37:28.069   803  4088 D audio_hw_primary: enable_audio_route: usecase(1) apply and update mixer path: low-latency-playback speaker
10-10 15:37:28.069   872   997 E ANDR-PERF-OPTSHANDLER: Warning: Resource [2, 0] not supported for core 1. Instead use resource for core 0
10-10 15:37:28.069   872   997 E ANDR-PERF-RESOURCEQS: Failed to apply optimization [2, 2, 0]
10-10 15:37:28.101  1081  2426 I ActivityManager: Start proc 17944:de.heise.android.heiseonlineapp/u0a150 for activity de.heise.android.heiseonlineapp/.ui.ChannelActivity
10-10 15:37:28.165 17944 17944 E zygote64: expected 1 dex files but found 2

Error Research

Log(Fatal) terminates here:

bool OatFileAssistant::DexChecksumUpToDate(const OatFile& file, std::string* error_msg) {
  (...)
  // art::OatFile
  uint32_t number_of_dex_files = file.GetOatHeader().GetDexFileCount();
  if (required_dex_checksums->size() != number_of_dex_files) {
  (...)
}
bool OatFileAssistant::DexChecksumUpToDate(const VdexFile& file, std::string* error_msg) {
  (...)
  // art::VdexFile
  uint32_t number_of_dex_files = file.GetHeader().GetNumberOfDexFiles();
  if (required_dex_checksums->size() != number_of_dex_files) {
  (...)
}

Ideas

Experiments with rewriting the dexfile count have been done here:

Project-ARTist/art@e3b1e22 via:

OatHeader::ArtistFixDexFileCount(){ ... }

w/o success. Injected apps didn't even log an error, before ARTist's compiled oat file was thrown away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions