Overloading the APK and creating custom applications

Is it possible to create a new APK by overloading / overriding and the existing APK.

Say we have a WhatsApp messenger. Now, if I want to show a notification, for example, β€œPerson X is online now.”, In the notification area this is not possible using the existing WhatsApp Messenger. So, I would like to develop a new custom messenger that uses all the functionality of WhatsApp Messenger, with some of my custom code. Just like importing JARs, can we import the APK ... ??

This is similar to using other people's work, but only in terms of training, I would like to know the possibilities. For now, let's leave all the vulnerabilities, security, and security.

+4
source share
3 answers

In a nutshell, no.

APKs are not like Jar files, so you can simply import them into your application. They also contain other resources, such as XML and assets. The code is stored in the classes.dex file, which is created from the Jar file of the application code.

In addition, each application runs in its own DVM and is isolated to prevent such interaction between applications. You cannot just use the WhatsApp code in your application as third-party applications.

There are two ways to achieve what you want.

  • If the targeting application provides an API through content providers or even web services that you can use to access your data and events, for example, users connected to the network. WhatsApp does not offer such an API
  • You decompile the target application and paste your own code to do what you want. This can be very difficult, because most popular applications, such as WhatsApp, obfuscate their code, which makes it difficult to decrypt it (but not impossible). In addition, WhatsApp encrypts most of its data, such as messages, contacts, chat streams, etc. Using AES, which adds an additional layer to bypass in some places. Oh, and that also violates several copyright and copyright laws if you do.
+6
source

Yes and no.

There are several ways for an application - standalone - to share its information with other applications. One of them is the use of a content provider, and the other through user translations.

If, say, WhatsApp documented your application and was built in such a way that you can use it further, you can catch these broadcasts and listen to those providers that your application can also respond to changes made to WhatsApp.

+2
source

you can create the config.properties file and paste it into the Asset folder in your messenger messenger if you have the source code,

Now you need to configure your own application to record changes to this file, however you can change this data in several ways, such as web services, which allow you to change this data in this file through them.

ok in the above scenario, you can make changes, but your application will never update these changes because your relationship with the APK is not code, so you will have to generate the APK again so that it becomes the last change.

to automatically create an APK, you can use the ANT tools by placing the build.xml file in your wattsp code sources, you can run this script, which is ANT release, which will generate a new APK with the latest code as you said, this is still possible, but, on my opinion, after all, you cannot use the APK as a library

0
source

Source: https://habr.com/ru/post/1487824/


All Articles