Anh-Tuan Mai
Anh-Tuan Mai

Reputation: 1199

Clone an android application programmatically

There are some Android applications which allow user to clone existed application on the phone. eg: http://fixoptimize.com/app-cloner Can you explain how these cloners work? Thank you.

Upvotes: 3

Views: 9177

Answers (2)

Rohan Zemse
Rohan Zemse

Reputation: 49

  1. Parallel space application creates a sandbox within their own app to host cloned apps.
  2. For example Parallel Space app "Dual Apps" will create sandbox for our CloneAppChecker app as /data/user/0/com.dual.space.parallel.app.clone.multiple/virtual/data/user/0/com.example.cloneappchecker/files
  3. We need to check Sandbox within our application to verify whether app has own sandbox (/data/user/0/com.example.cloneappchecker/files) or created by Parallel Space application.
  4. Hence we can restrict parallel app and original app will work as it is. 5.I have checked almost 15 to 16 parallel space apps and behavior is same for all.

Upvotes: 1

Meow Cat 2012
Meow Cat 2012

Reputation: 1008

  1. Change the package name in AndroidManifest.xml and re-sign the app. Notice that the xml is binary instead of text in an apk package. Android identify different apps with package name and with package name changed an app would be considered a "new one".
  2. While the simple approach may or may not work (e.g. the app assumes its package name to be constant, or checks its signature) in many cases various other changes should be applied, including also chage the java package name, disable signature check, change string literals which are assumed path names containing a package name. All these would (likely) require decompiling and deassambling dex and even native codes, which is not only hard but illegal as well.
  3. The modern way: Sandboxify the app. A sandbox environment would be created, within which the app being "cloned" is not actually cloned and remains unchanged. The sandbox would intercept all communication between the cloned app and the system, the user and other apps so it's transparent and stable. Neither the app nor the user would notice that the app's being sandboxed. And this most likely keeps legal concerns away unless a emulator is also outlawed. There are open source sandbox apps on github that you could examine and, well, copy.

Upvotes: 7

Related Questions