M
M
m0ody2014-11-19 15:36:00
Java
m0ody, 2014-11-19 15:36:00

What are the ways to analyze the source of downloading / installing Android applications?

Good afternoon!
There was a task to analyze the source of traffic from which the application is installed. The problem is that the application is not downloaded and installed via GooglePlay. The source is a site ID (number) in the ad network and is not known in advance.
Hence the question arose, are there adequate ways to somehow tag apk so that after successful installation, the application reports information (successful conversion) to Google Analytics?
So far I have found one way - to dynamically create apk:
Knowing that apk is a zip archive, I create a file with the site ID in the assets folder, then I sign the resulting apk using jarsigner.
Cons is jarsigner speed. It takes 4-6 seconds to sign an apk weighing 500kb. Accordingly, the user who downloads the apk may not like it.
Here, too, questions arose:
- Maybe there is a way to sign only a modified file (not familiar with the application signing algorithm)?
- Is there an alternative to jarsigner?
- Perhaps there is a way not to sign the application?
I would be grateful for any ideas.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
m0ody, 2015-04-11
@m0ody

The zip (apk) format allows you to add a comment to the archive. Moreover, if you comment on an already signed APK, then after commenting, the signature remains valid.
In the application, we find the location of our APK on the disk and read the comment in which we store the ID.

A
anyd3v, 2014-11-19
@anyd3v

https://developer.android.com/intl/en/reference/co...
but not suitable for you.
Unfortunately, other methods could not be found at the time.

O
one pavel, 2014-11-19
@onepavel

We don't have many partners, and we created builds for each partner. There is also a script that rebuilds all builds when changes are made and uploads them to the site.

V
Vladimir Abramov, 2014-11-19
@kivsiak

The last time it worked was adding n bytes to the tail of an already signed apk. Then, already at runtime, you can access the downloaded apk and read them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question