Skip to content

About

Use two accounts on the same Android app. Open source, no ads, no analytics.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Android App Duplicator

Android App Duplicator

Use two accounts on the same Android app. Open source, no ads, no analytics.

License: GPL-3.0 Android 9+ Kotlin Dependencies: none Internet permission: none GitHub stars

Android App Duplicator ships an app called DualSpace. It creates an isolated work profile on your phone and installs copies of the apps you choose inside it. Each copy has its own data and its own login, so you can use a second account next to the original app.

Most apps that do this are full of ads. This one has none, and it has no Internet permission at all.

Screenshots

Home screen Add an app Duplication prompt Manage Space 2

Features

  • Duplicate installed apps, including apps split into several APKs
  • Enable preinstalled apps such as Gmail inside the second space
  • Launch every copy from one home screen
  • Search your installed apps
  • Pause a copy and resume it later without losing its data
  • Remove a single copy without touching the original app
  • Delete the whole space in one step
  • No ads, no analytics, no account and no third-party libraries

Privacy

Component Internet access What it means
DualSpace No The manifest does not request the INTERNET permission, so the app cannot send data online.
Duplicated apps Yes Each copy keeps its own network access and sends data to its own services, like the original app.

DualSpace does not stop a duplicated app from collecting data. Data in the second space is separate from your main profile, but apps can still see that they run on the same device and may link your accounts.

The clipboard and keyboards may span both profiles, so text you copy or type in a copy may be visible outside the second space. DualSpace leaves copy and paste between profiles enabled.

Permissions

Permission Why it is needed
QUERY_ALL_PACKAGES List your installed apps, on the device only
REQUEST_INSTALL_PACKAGES Install copies in the second space
REQUEST_DELETE_PACKAGES Remove a copy
RECEIVE_BOOT_COMPLETED Block installs from unknown sources again in the second space after a restart, if a duplication was interrupted
dev.nekuz.dualspace.permission.CLONE Signature permission that stops apps signed with a different key from requesting a duplication

Requirements

  • Android 9 (API 28) or later
  • A phone that allows work profiles, with no other work profile already set up
  • JDK 21 and Android SDK 35 to build from source

Gradle 8.11 does not support the Java 25 runtime bundled with recent Android Studio versions, so use a separate JDK 21.

Download

Download the signed APK from the latest release and open it on your phone. Android may ask you to allow installs from the app you opened it with.

The release notes list the SHA-256 checksum of the APK and of its signing certificate.

Build from source

A build signed with your own key cannot install over the release APK. Delete your Spaces and uninstall the app first.

git clone https://github.com/Nekuzaky/android-app-duplicator.git
cd android-app-duplicator

Create a local.properties file that points to your Android SDK:

sdk.dir=/path/to/Android/Sdk

Create a signing key, then add a keystore.properties file at the project root. It is ignored by Git, so never commit it or your key:

storeFile=/path/to/your-key.jks
storePassword=your-password
keyAlias=release
keyPassword=your-password

Build the release APK with JDK 21:

JAVA_HOME=/path/to/jdk-21 ./gradlew assembleRelease

Install it on a phone with USB debugging enabled:

adb install -r app/build/outputs/apk/release/app-release.apk

Usage

  1. Open DualSpace and tap Create Space 2, then follow the Android setup screens.
  2. Tap Add an app and choose an app.
  3. The first time, tap Allow and enable installs for DualSpace on the Android screen.
  4. Confirm the installation when Android asks.
  5. Open the copy and sign in to your other account.

Your space appears as a work profile, so apps in it show a briefcase badge. Use Manage Space 2 to pause or remove copies.

How it works

DualSpace runs in both profiles from the same APK.

  1. Create the space. The app starts the standard Android managed profile provisioning flow and becomes the owner of that profile.
  2. Choose an app. The main profile lists its apps, because the work profile cannot see apps that are not installed in it.
  3. Cross the profile boundary. The request goes through the Android intent forwarder, opened with addCrossProfileIntentFilter.
  4. Install the copy. The work profile reads the APK files and writes them to a PackageInstaller session, then Android asks you to confirm. Preinstalled apps are enabled with enableSystemApp instead.

DevicePolicyManager.installExistingPackage is not used because Android reserves it for device owners and affiliated profile owners.

The installation approach is inspired by Shelter. Shelter is a more mature project, and it is worth a look if you want more features.

Limitations

  • One extra copy per app. Android allows one work profile, so you get the original and one copy.
  • Some apps may refuse to run. Banking apps in particular may reject work profiles.
  • Installer source changes. After a duplication by APK copy, Android reports DualSpace as the installer of that package, including for the original app. The effect on Play Store updates has not been verified. The duplication prompt warns about this.
  • The duplication request can be intercepted inside the second space. Android clears the target of a request that crosses profiles, so an app in the second space that declares the same action can appear in a chooser next to DualSpace. If you pick it, it receives the package name, label and APK paths of the app you chose, and it could show a fake duplication screen. The paths must stay in the request because the second space cannot look up an app that is not installed in it. If Android asks which app should handle a duplication, choose DualSpace.
  • Shared updates. Copies use the same installed package as the original, so an update applies to both.
  • Not suited to the Play Store. QUERY_ALL_PACKAGES and REQUEST_INSTALL_PACKAGES are restricted, so the app is meant to be installed directly.
  • Changing the signing key is disruptive. Installing a build signed with a different key requires deleting the space and uninstalling the app.

Test status

Tested on one device: Oppo Reno4 Z 5G (CPH2065) with Android 12 and ColorOS. The rows marked "1.0.2" were run on the current version. The other rows were run on version 1.0.1.

Scenario Status
Install over 1.0.1, existing copies kept Works, 1.0.2
New warning about the recorded installer in the prompt Works, 1.0.2
Duplicate a recently built app without a Play Store history Android's install prompt appeared, then Google Play Protect blocked the app, 1.0.2
Complete a duplication from start to finish Works, 1.0.2, confirmed by hand with an app already on the phone
Duplicate an app with split APKs (Duolingo) Works
Enable a preinstalled app (Gmail) Works
Open a copy from the home screen Works
Pause and resume a copy Works
Remove a copy, original app kept Works
Cancel at the Android install prompt Works
Duplicate and open Instagram Works, sign-in not attempted
Create a new space from a clean install Works
Delete Space 2 Works
Reject a forged install result on Android 12 Works
Reject a direct launch of the duplication screen Works
Sign in to a second account in a copy Not tested
Snapchat and other popular apps Not tested
Reject a third-party app that imitates the duplication request Not tested, fixed in code
Other phones and Android versions Not tested

Reports from other devices are welcome. Please open an issue with your phone model, Android version and the app you tried.

Disclaimer

This project is not affiliated with the apps you duplicate or with any other app called Dual Space. Some services restrict the use of multiple accounts, so check their terms before you use a copy.

License

Distributed under the GNU General Public License v3.0.

About

Use two accounts on the same Android app. Open source, no ads, no analytics.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages