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

Android 8.0 Oreo: Untouched base.apk #7

Open
sweisgerber-dev opened this Issue Oct 11, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@sweisgerber-dev
Copy link
Member

sweisgerber-dev commented Oct 11, 2017

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.

@sweisgerber-dev sweisgerber-dev referenced this issue Oct 11, 2017

Closed

Android 8.0 Oreo Support #5

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