linkedin / dexmaker

A utility for doing compile or runtime code generation targeting Android's Dalvik VM
Apache License 2.0
1.86k stars 248 forks source link

guessPath not to depend on the first level of app directory #156

Closed ttanxu closed 4 years ago

ttanxu commented 4 years ago

We are updating apps' apk path to have a two-level structure.

Default apk path of an installed app: Before: /data/app/[packageName]-[randomString]/base.apk After: /data/app/[randomStringA]/[packageName]-[randomStringB]/base.apk

This CL fixes the path guessing assumption the apk dir is only one level below the /data/app dir.

Fixes #155.

ttanxu commented 4 years ago

One of Google employees sent out this patch for the fork in AOSP so I sent out this for review as well. Note the author also updated existing cases to match the most recently released Android version, and added new test cases for the new case.

ttanxu commented 4 years ago

Updated this PR. We found a bug in the previous version that didn't consider the case where there is dash in the random string.