[MOD][XPOSED] DirectAPKInstall

Search This thread

Matsca09

Member
Feb 22, 2013
42
134
Hi everyone,

I'm glad to present my first xposed module: DirectAPKInstall


[What it is]

DirectAPKInstall is a PackageInstaller mod which avoid enabling and disabling "Unknown sources" every single time you need to manually install an APK.

Usually, when you try to install an apk without having "Unknown sources" enabled, an alert stops the installation; this mod replace that alert showing you an alternative pop-up which permits you to install anyway the package without enabling "Unknown sources". ;)

It's an alternative to the "Get in the settings, enable unknown sources, install the package and disable unknown sources" procedure :D

[Screenshots]
Before:
Screenshot_2014_09_03_19_36_11.png

After:
Screenshot_2014_09_03_19_38_42.png


[Downloads]

The module was tested on a Galaxy S3 with CM11; I'm pretty sure it will work on any device with Android OS 4.0+.
If it does not work on your device or it works on a version of Android prior to 4.0 let me know in the comments! :cowboy:
Code:
Plugin: [URL="http://repo.xposed.info/module/it.matsca09.xposedmod.directapkinstall"]http://repo.xposed.info/module/it.matsca09.xposedmod.directapkinstall[/URL]
Source code: [URL="https://github.com/Matsca09/DirectApkInstall"]Github[/URL]

Hope you like it :highfive:
Matsca09
 
Last edited:

Matsca09

Member
Feb 22, 2013
42
134
Ehm... OK, good work,
but, is it not better to enable unknow sources by default?
why use it instead?

Sure you can enable "Unknown sources", but there are some people (like me) who don't like leaving it always enabled for various reasons (it's a possible security issue in my opinion).
So I've developed this mod in order to avoid the "Get in the settings, enable unknown sources, install the package and disable unknown sources" procedure I had to do every time I installed an apk.

Matsca09
 
  • Like
Reactions: Benny Bosser

chw9999

Senior Member
Dec 29, 2006
389
78
Bensheim
For Xposed installations I have set up a tasker profile allowing me to install modules and updates right away, and switching off when I leave the xposed installer. But if I install them from my browser,I get the"nag screen" ;)

Thanks, this is exactly what I need :)
 
Last edited:

hamzahrmalik

Senior Member
May 31, 2013
1,658
2,020
I don't see how its a security issue to just leave unknown sources enabled

Sent from my amazingly awesome OnePlus One using Tapatalk
 

chw9999

Senior Member
Dec 29, 2006
389
78
Bensheim
hi, on ICS I found it opens the install screen in Xposed installer, but doesn't do anything... stays black but the top row with the application's name ...

Disabled, and installation works again.

Done with "unknown sourced" enabled.
 
Last edited:

ZareliMan

Senior Member
Sep 2, 2013
247
32
I think the only added security of this module is that by leaving unknown sources on, you will get a prompt every time you try to install such on the device so you know when the source is unknown.
 

hamzahrmalik

Senior Member
May 31, 2013
1,658
2,020
I think the only added security of this module is that by leaving unknown sources on, you will get a prompt every time you try to install such on the device so you know when the source is unknown.
But the source is *always* unknown

Sent from my amazingly awesome OnePlus One using Tapatalk
 

k0m3n9

Senior Member
Apr 19, 2011
274
68
Kuala Lumpur
Googling and found this... https://securitystreet.jive-mobile.com/#jive-document?content=/api/core/v2/posts/6219

Dont know how true it is.. but i think this module is great for our own precautions :good:. I've xperienced before on some mtk devices installing chinese apk which i know it's not part of system apk that comes with device's rom nor downloaded/installed by myself (tho it's just contains chinese apps link/ads and once installed it's hard to be removed.

Thanks to @Matsca09 for this module. Works on Zenfone 5.
 
Last edited:

jdmst77

Senior Member
Feb 19, 2012
252
39
Hi everyone,

I'm glad to present my first xposed module: DirectAPKInstall


[What it is]

DirectAPKInstall is a PackageInstaller mod which avoid enabling and disabling "Unknown sources" every single time you need to manually install an APK.

Usually, when you try to install an apk without having "Unknown sources" enabled, an alert stops the installation; this mod replace that alert showing you an alternative pop-up which permits you to install anyway the package without enabling "Unknown sources". ;)

It's an alternative to the "Get in the settings, enable unknown sources, install the package and disable unknown sources" procedure :D

[Screenshots]
Before:
Screenshot_2014_09_03_19_36_11.png

After:
Screenshot_2014_09_03_19_38_42.png


[Downloads]

The module was tested on a Galaxy S3 with CM11; I'm pretty sure it will work on any device with Android OS 4.0+.
If it does not work on your device or it works on a version of Android prior to 4.0 let me know in the comments! :cowboy:
Code:
Plugin: [URL="http://repo.xposed.info/module/it.matsca09.xposedmod.directapkinstall"]http://repo.xposed.info/module/it.matsca09.xposedmod.directapkinstall[/URL]
Source code: [URL="https://github.com/Matsca09/DirectApkInstall"]Github[/URL]

Hope you like it :highfive:
Matsca09

Great job on this app. Very useful but the only problem is that it doesn't work with the Amazon app. Works fine with the Amazon app store app but not with updating Amazon apps using the regular Amazon app
 

Matsca09

Member
Feb 22, 2013
42
134
As far as I know, since the latest update of the Amazon app, you cannot install/update applications via the main application.

Matsca09
 

#Henkate

Senior Member
Feb 1, 2012
3,484
3,124
28
フェアリーテイル
Nice work.


For Xposed installations I have set up a tasker profile allowing me to install modules and updates right away, and switching off when I leave the xposed installer. But if I install them from my browser,I get the"nag screen" ;)

Thanks, this is exactly what I need :)


Can you share that tasker profile ? :) Also, can u give me your tasker profiles description ( what it does) in a PM ? Im out of ideas :D Thank you !
 

chw9999

Senior Member
Dec 29, 2006
389
78
Bensheim
Nice work.
Can you share that tasker profile ? :) Also, can u give me your tasker profiles description ( what it does) in a PM ? Im out of ideas :D Thank you !

Hi, I'd rather write in public ;)

Basically, you need Secure Settings to allow Tasker to switch permit installation of "Unknown sources".
https://play.google.com/store/apps/details?id=com.intangibleobject.securesettings.plugin

Simply, in Tasker...
1. create a profile for Xposed Installer (app start event) or any other app you want to allow to install "Unknown sources"
2. create and add Enter Task -> add step Plugin "Secure Settings" set to allow "Unknown sources"
3. create and add Exit Task -> add step Plugin "Secure Settings" set to deny "Unknown sources"
Done :)

You can make it more comfortable if you add a wait timer before switching OFF "allow Unknown sources", and a "Kill deny Unknown sources"-Task in the "allow Unknown sources"-Task. This way you may switch shortly to another app without losing "allow Unknown sources". But it is NOT necessary to do so.

Hope it helps!

Cheers,
Christoph
 

jdmst77

Senior Member
Feb 19, 2012
252
39
As far as I know, since the latest update of the Amazon app, you cannot install/update applications via the main application.

Matsca09

Wonder why... hope they don't plan on phasing out the Amazon App Store app but it seems like they are making efforts to do it

Great work either way!
 
Last edited:

Matsca09

Member
Feb 22, 2013
42
134
Mainly because Google changed its Terms of Service for Play store apps (basically no alternative stores inside the Play Store), so they had to split the application into two parts: Amazon Shopping (which you can find on the Play Store), and the Amazon App Store (which you have to download from their website).
All the story: http://9to5google.com/2014/12/11/google-amazon-app-store/

Matsca09

EDIT: the module should be Lollipop-compatible. If there are problems, let me know, thanks.
 
Last edited:

degg

Member
Feb 23, 2013
6
0
Version 1.0.1 doesn't work on Galaxy Nexus (Android 4.3). I have to enable unknown sources manually. Version 1.0 works.
 

Matsca09

Member
Feb 22, 2013
42
134
Hey @Matsca09 I love this module. It was working great on my Nexus 6 with Android 5.0.1 but looks like 5.1.1 broke it. Can I do anything to help update it so that it works?

Hi sansnil, thanks for the report and sorry for the slow reply.

I've updated the module; now it should work on Android 5.1.1 (tested on 5.1.1 on SGS3)

Please try the new version (1.0.3) and let me know if it works for you :D


Matsca09
 
  • Like
Reactions: sansnil

Top Liked Posts

  • There are no posts matching your filters.
  • 17
    Hi everyone,

    I'm glad to present my first xposed module: DirectAPKInstall


    [What it is]

    DirectAPKInstall is a PackageInstaller mod which avoid enabling and disabling "Unknown sources" every single time you need to manually install an APK.

    Usually, when you try to install an apk without having "Unknown sources" enabled, an alert stops the installation; this mod replace that alert showing you an alternative pop-up which permits you to install anyway the package without enabling "Unknown sources". ;)

    It's an alternative to the "Get in the settings, enable unknown sources, install the package and disable unknown sources" procedure :D

    [Screenshots]
    Before:
    Screenshot_2014_09_03_19_36_11.png

    After:
    Screenshot_2014_09_03_19_38_42.png


    [Downloads]

    The module was tested on a Galaxy S3 with CM11; I'm pretty sure it will work on any device with Android OS 4.0+.
    If it does not work on your device or it works on a version of Android prior to 4.0 let me know in the comments! :cowboy:
    Code:
    Plugin: [URL="http://repo.xposed.info/module/it.matsca09.xposedmod.directapkinstall"]http://repo.xposed.info/module/it.matsca09.xposedmod.directapkinstall[/URL]
    Source code: [URL="https://github.com/Matsca09/DirectApkInstall"]Github[/URL]

    Hope you like it :highfive:
    Matsca09
    5
    Hi everyone,

    The module is now Marshmallow compatible! Check for the latest 1.0.4 on Xposed repo (tested on a Nexus 5 with Android 6.0.1 ).
    Like always, let me know if you encounter any bug :)

    Matsca09
    2
    Nice work.
    Can you share that tasker profile ? :) Also, can u give me your tasker profiles description ( what it does) in a PM ? Im out of ideas :D Thank you !

    Hi, I'd rather write in public ;)

    Basically, you need Secure Settings to allow Tasker to switch permit installation of "Unknown sources".
    https://play.google.com/store/apps/details?id=com.intangibleobject.securesettings.plugin

    Simply, in Tasker...
    1. create a profile for Xposed Installer (app start event) or any other app you want to allow to install "Unknown sources"
    2. create and add Enter Task -> add step Plugin "Secure Settings" set to allow "Unknown sources"
    3. create and add Exit Task -> add step Plugin "Secure Settings" set to deny "Unknown sources"
    Done :)

    You can make it more comfortable if you add a wait timer before switching OFF "allow Unknown sources", and a "Kill deny Unknown sources"-Task in the "allow Unknown sources"-Task. This way you may switch shortly to another app without losing "allow Unknown sources". But it is NOT necessary to do so.

    Hope it helps!

    Cheers,
    Christoph
    2
    No, but here is the diff:

    Code:
    --- aaa/src/it/matsca09/xposedmod/directapkinstall/DirectInstallMod.java    2016-01-11 13:41:14.000000000 -0600
    +++ bbb/src/it/matsca09/xposedmod/directapkinstall/DirectInstallMod.java    2017-10-29 03:09:02.719974139 -0600
    @@ -42,7 +42,7 @@
              * Yay! Google has changed the package installer package name in Marshmallow
              */
     
    -        if(Build.VERSION.SDK_INT >= 23){
    +        if(Build.VERSION.SDK_INT == 23){
                 packageInstallerID = "com.google.android.packageinstaller";
             }else{
                 packageInstallerID = "com.android.packageinstaller";
    @@ -77,23 +77,25 @@
                      * This is available at the moment only on Marshmallow
                      */
     
    -                if(Build.VERSION.SDK_INT >= 23){
    +                if(Build.VERSION.SDK_INT == 23){
                         if(!(Boolean)XposedHelpers.callMethod(param.thisObject, "isUnknownSourcesAllowedByAdmin")){
                             return;
                         }
                     }
                     if(!(Boolean)XposedHelpers.callMethod(param.thisObject, checkUnknownSourceMethod)){
                         AlertDialog.Builder builder = new AlertDialog.Builder((Context) param.thisObject);
    -                    builder.setTitle(instAlertTitle);
    +                    if(Build.VERSION.SDK_INT <= 23){
    +                        builder.setTitle(instAlertTitle);
    +                    }
                         //Alert taken from Android settings
                         builder.setMessage(instAlertBody);
    -                    builder.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
    +                    builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
                             public void onClick(DialogInterface dialog, int which) { 
                                 dialog.dismiss();
                                 XposedHelpers.callMethod(param.thisObject, "initiateInstall");
                             }
                         });
    -                    builder.setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {
    +                    builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
                             public void onClick(DialogInterface dialog, int which) { 
                                 dialog.dismiss();
                                 XposedHelpers.callMethod(param.thisObject, "finish");
    2
    So I just realized this stopped working for me but I'm not sure what broke it. For anyone using MM AOSP - does this module still work for you with the July Google update?

    It doesn't work for me either with the July update.
    Nexus 5X, CM 13.0-20160820
    You could try InstallerOpt. Works great for me.

    http://xdaforums.com/xposed/modules/xposed-installeropt-0-4-t3377008

    http://repo.xposed.info/module/net.fypm.installeropt