Skip to content

Commit

Permalink
Added DexFile count manipulation function.
Browse files Browse the repository at this point in the history
- is not in use atm, because injected apps were not executed anyway.
  See: Project-ARTist/meta#5 (comment)
- Android 8.0 Oreo injection works, but base.apk must get replaced with
  injected APK for it to work
  • Loading branch information
sweisgerber-dev committed Oct 11, 2017
1 parent bc997f0 commit e3b1e22
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions runtime/oat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,16 @@ bool OatHeader::IsConcurrentCopying() const {
return IsKeyEnabled(OatHeader::kConcurrentCopying);
}

void OatHeader::ArtistFixDexFileCount() {
if (this->dex_file_count_ >= 2) {
VLOG(artist) << "ARTist Fixing Dexfile count, was: " << this->dex_file_count_;
--this->dex_file_count_;
VLOG(artist) << "ARTist Fixing Dexfile count, now: " << this->dex_file_count_;
} else {
VLOG(artist) << "ARTist NOT FIXINF Dexfile count, is " << this->dex_file_count_;
}
}

bool OatHeader::IsNativeDebuggable() const {
return IsKeyEnabled(OatHeader::kNativeDebuggableKey);
}
Expand Down
1 change: 1 addition & 0 deletions runtime/oat.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class PACKED(4) OatHeader {
bool IsNativeDebuggable() const;
CompilerFilter::Filter GetCompilerFilter() const;
bool IsConcurrentCopying() const;
void ArtistFixDexFileCount();

private:
bool KeyHasValue(const char* key, const char* value, size_t value_size) const;
Expand Down
2 changes: 1 addition & 1 deletion runtime/parsed_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ bool ParsedOptions::ProcessSpecialOptions(const RuntimeOptions& options,

// Intended for local changes only.
static void MaybeOverrideVerbosity() {
// gLogVerbosity.artist = true; // TODO: don't check this in!
// gLogVerbosity.artist = true; // TODO: don't check this in!
// gLogVerbosity.artistd = true; // TODO: don't check this in!
// gLogVerbosity.class_linker = true; // TODO: don't check this in!
// gLogVerbosity.collector = true; // TODO: don't check this in!
Expand Down

0 comments on commit e3b1e22

Please sign in to comment.