[MODULE] Detach3 - Detach Market Links

Search This thread

Wolfcity

Recognized Contributor
and i say detach does work well on magisk 19.3 ;) if u might consider using this: https://github.com/Magisk-Modules-Repo/iYTBP-Vanced-Magisk-Repo/blob/master/common/post-fs-data.sh
which is included in recent magisk modules of vanced yt (i imply u r using it *g*) so by removing all available detachment apps/scripts from ur system and putting a empty file "enable_detach"
into your /cache directory and reboot u might get some good results like me on OOS and other roms/devices.but keep in mind THERE IS NO waterproof method to avoid popping
up updates yet. best result for me is to use the detach script i provide and disable playstore auto-update (which i anyway do since using a android phone as i don't wanna be forced happy).
advantage: if the YT updated slips thru and poppes up (which will happen from time to time!) u can just ignore it and let it be, the detach script does its jop after the default delay of 60 seconds in background. so u don't get updated automatically as soon as the update popps up. just as a reminder that there is another option already included in the vanced modules which u maybe can give a try.
Thanks for that alternative, I just tried it out but it seems it doesn't work after a reboot and waiting 60 seconds. Maybe I'm doing something wrong.
I copied the script from GitHub and pasted it to
/data/adb/post-fs-data.d with a random name (ytv_detach.sh) and 755 permissions, also I created an empty file named enable_detach in /cache with the same permissions.
I have no other detach mods installed.
Anything else to do?

Magisk 18.1 (never change a running system)
Moto G5+ stock android 8.1

Edit:
Ok, I should have waited a bit longer than exactly 60 seconds before posting, now YT is detached.:)
Thanks!

Sent from my Moto G5 Plus using XDA Labs
 
Last edited:

kenny.lam

Senior Member
Dec 19, 2014
117
38
Actually Youtube Vance is quite not detached, It is just temporary removed in short time, after some hours this returns back to Play Store, and I have to reflash this module again and again, it is so annoy !!!! And there is no solution up to now :( (I dont want to use tasker or any app to make scheduling to flash the module)
 
Last edited:
  • Like
Reactions: Krlos Eduardo

garylawwd

Forum Moderator
Staff member
Actually Youtube Vance is quite not detached, It is just temporary removed in short time, after some hours this returns back to Play Store, and I have to reflash this module again and again, it is so annoy !!!! And there is no solution up to now :( (I dont want to use tasker or any app to make scheduling to flash the module)
You don't use tasker to flash anything. You use it to run the script every few mins. Completely done in the background without you even knowing.

If you use xposed/edxposed you can use sudohide module which is the only clear cut way to detach vanced
 

ZaneZam

Inactive Recognized Contributor
Dec 6, 2010
3,398
16,825
Thanks for that alternative, I just tried it out but it seems it doesn't work after a reboot and waiting 60 seconds. Maybe I'm doing something wrong.
I copied the script from GitHub and pasted it to
/data/adb/post-fs-data.d with a random name (ytv_detach.sh) and 755 permissions, also I created an empty file named enable_detach in /cache with the same permissions.
I have no other detach mods installed.
Anything else to do?

Magisk 18.1 (never change a running system)
Moto G5+ stock android 8.1

Edit:
Ok, I should have waited a bit longer than exactly 60 seconds before posting, now YT is detached.:)
Thanks!

Sent from my Moto G5 Plus using XDA Labs

:good: nice happy that it work for u too!
HINT1: u don't have to download the script if u use the magisk module it's already included. u just have to put the enable_detach file to /cache dir and reboot.
HINT2: u can overwrite a delay in seconds to whatever u want into that file. eg. i have 30 seconds and driving very well with it. i almost never see the yt update
and if then only for about 30 seconds *g*

Actually Youtube Vance is quite not detached, It is just temporary removed in short time, after some hours this returns back to Play Store, and I have to reflash this module again and again, it is so annoy !!!! And there is no solution up to now :( (I dont want to use tasker or any app to make scheduling to flash the module)

yes yes yes there is no 100% solution, and it might be that we never get this. anyway the thing u can try is to DISABLE app-auto-update in playstore (yes that's mandatory to avoid forced updates!)
and then use the detach method and as mentioned above put a lower delay into the enable_detach file (like 30 secs or so). the only "disadvantage" is that u have to tab on "update apps" in playstore
once there are updates (which anyway is the better way in my opinion. i never used auto update since using android, but thats just me not liking beeing "forced benefitted" on any system i use)

maybe u can live with that? i can confirm non annoyingness with this method. :)
 
Last edited:

DiamondJohn

Recognized Contributor
Aug 31, 2013
7,380
7,395
Sydney
yes yes yes there is no 100% solution, and it might be that we never get this.
I havent used it myself, but those using the exposed method have been reporting it works 100%

anyway the thing u can try is to DISABLE app-auto-update in playstore (yes that's mandatory to avoid forced updates!)
and then use the detach method and as mentioned above put a lower delay into the enable_detach file (like 30 secs or so). the only "disadvantage" is that u have to tab on "update apps" in playstore
My understanding is that you cannot use the "disable updates" and the detach. The "disable auto-updates" is stored in the database record that the detach script explicitly deletes. So as soon as the detach script runs, you loose you "disable auto-updates" setting, and it will be re-inserted with the default value of auto-updates enabled. Its kind of one or the other.
 

marciozomb13

Senior Member
Apr 30, 2012
1,560
2,989
Rio de Janeiro
Samsung Galaxy A51
My understanding is that you cannot use the "disable updates" and the detach. The "disable auto-updates" is stored in the database record that the detach script explicitly deletes. So as soon as the detach script runs, you loose you "disable auto-updates" setting, and it will be re-inserted with the default value of auto-updates enabled. Its kind of one or the other.
Not true, at least for me, it always worked perfectly, and when occasionally I see YouTube reattached, it took only 3 minutes for the script to run and make it disappear again. And never updates itself too. Using "enable_detach method.
 

DiamondJohn

Recognized Contributor
Aug 31, 2013
7,380
7,395
Sydney
Not true, at least for me, it always worked perfectly, and when occasionally I see YouTube reattached, it took only 3 minutes for the script to run and make it disappear again. And never updates itself too. Using "enable_detach method.
You missed the point. You "can" use both, however, the detach script will cancel out your "disable auto-update" selection. Next time you see YouTube back in your list of apps to be updated (ie it has to be there then disappear then re-appear), check the auto-update setting, you will see that it has switched auto-updates back on. The detach, cancels out your disabling of auto-update setting.

The detach deletes this record where it is stored, and when it gets re-inserted, it will be reinserted as on.
 

ZaneZam

Inactive Recognized Contributor
Dec 6, 2010
3,398
16,825
Are you guys keen for an update?
oooh i missed that.... looking forward to it! :fingers-crossed:

It's against the rules to ask for updates.....lmao

I joke I joke keep those flames away! :angel:

indeed u r right no no, no exceptions we should report him! :D

Apparently not, lol. But I'll take one! [emoji16]
Wrapped with delicious Fajita [emoji896]

me too! :D
hey @Timmmmaaahh i report @hinxnz for teasing and not bringing the indirectly promised update, its been 3 days already!! :D

Not true, at least for me, it always worked perfectly, and when occasionally I see YouTube reattached, it took only 3 minutes for the script to run and make it disappear again. And never updates itself too. Using "enable_detach method.

yeah for me too since some good amount of time, but i should have been more concrete: i have disabled auto update completely! i guess u have done that too?

You missed the point. You "can" use both, however, the detach script will cancel out your "disable auto-update" selection. Next time you see YouTube back in your list of apps to be updated (ie it has to be there then disappear then re-appear), check the auto-update setting, you will see that it has switched auto-updates back on. The detach, cancels out your disabling of auto-update setting.

The detach deletes this record where it is stored, and when it gets re-inserted, it will be reinserted as on.

yeah THAT can be the per-app auto-update setting gets lost after detaching.

but lets see with what @hinxnz comes up with...
 

marciozomb13

Senior Member
Apr 30, 2012
1,560
2,989
Rio de Janeiro
Samsung Galaxy A51
yeah for me too since some good amount of time, but i should have been more concrete: i have disabled auto update completely! i guess u have done that too?

You are right. Disabled updates globally, i always read changelogs before update anything.

---------- Post added at 11:10 AM ---------- Previous post was at 11:05 AM ----------

You missed the point. You "can" use both, however, the detach script will cancel out your "disable auto-update" selection. Next time you see YouTube back in your list of apps to be updated (ie it has to be there then disappear then re-appear), check the auto-update setting, you will see that it has switched auto-updates back on. The detach, cancels out your disabling of auto-update setting.

The detach deletes this record where it is stored, and when it gets re-inserted, it will be reinserted as on.
I disable updates globally, never update apps without reading the changes.
 

hinxnz

Senior Member
Jul 21, 2009
2,872
2,554
Sorry guys, I actually still having hiccups right now after apps I detached, reattached after more time than expected.
I need more time, my bad. Almost like clockwork it takes two days for it to reset for me, so testing actually taking awhile, seems like forever because I cant replicate the event.
I also only have one device at the moment with root and no access to data while in recovery but not too much of an issue because that just installer side, I can figure that out.
Localappstate set to 2 on package name should disable auto update for that app if auto update enabled, the entry doesn't get overwritten as far as I know but will get reinserted if not located I presume.
 

kevintm78

Senior Member
Sorry guys, I actually still having hiccups right now after apps I detached, reattached after more time than expected.
I need more time, my bad. Almost like clockwork it takes two days for it to reset for me, so testing actually taking awhile, seems like forever because I cant replicate the event.
I also only have one device at the moment with root and no access to data while in recovery but not too much of an issue because that just installer side, I can figure that out.
Localappstate set to 2 on package name should disable auto update for that app if auto update enabled, the entry doesn't get overwritten as far as I know but will get reinserted if not located I presume.
I might be misunderstanding how your mod works, but I haven't been able to get the per app update settings to work for the last couple months using a stock 6.0.1 rom with pre-installed ğapps. I had always just installed vanced directly to the system and turned off auto update for Youtube only while the global settings were set to auto update. For the longest time that did the trick and it never got updated, but now, with that same setup, youtube will update several times a day. After the update I would check the settings and it would still be set to not auto update, but it's like that setting is just being ignored. The global setting still works so it's not a big deal to me but I wonder if that's affecting your results in some way.

Just to clarify, I haven't been using any detach scripts or mods and the only Magisk module I have is busybox. I don't think there's anything on my end that's triggering that auto update.
 

Timmmmaaahh!

Sr. Mod / Mod Cmte / Recognized Xmas Avatar Themer
Staff member
Sep 11, 2012
6,658
1
18,945
From From eh... Belgium!
OnePlus One
OnePlus 6T
hey @Timmmmaaahh i report @hinxnz for teasing and not bringing the indirectly promised update, its been 3 days already!! :D

Banned of course, we don't accept teasing :silly:
@hinxnz Thanks for your efforts nonetheless! Take as much time as you need (but don't keep @ZaneZam waiting too long, lol). I'm not sure what impact this may have or if it's even possible (what isn't possible on here?) but perhaps something can be hooked in boot so the desired apps can be detached every time upon every reboot. Or daily with some scheduler method. Just thinking out loud here :good:
 
  • Like
Reactions: hinxnz and ZaneZam
Banned of course, we don't accept teasing :silly:

@hinxnz Thanks for your efforts nonetheless! Take as much time as you need (but don't keep @ZaneZam waiting too long, lol). I'm not sure what impact this may have or if it's even possible (what isn't possible on here?) but perhaps something can be hooked in boot so the desired apps can be detached every time upon every reboot. Or daily with some scheduler method. Just thinking out loud here :good:
Could you train water bears to be xda users? They should be able to survive longer without an update or eta!

(Didn't know we have South Park resident as a forum moderator until now)
 
Last edited:

dimm0k

Senior Member
Jan 25, 2014
1,706
661
Google Pixel 4 XL
Android 8.1, Magisk 20.1, Magisk Manager 7.4

After flashing the .zip file, Detach.txt become like this, is this normal?
I want to detach YT Vanced also.

Code:
.Detach Market Apps Configuration -

.Remove comment (#) to detach an App.
 
#Contact.
#Gmai.
#Google.p.
#Google.lu.
#Hangout.
#Phon.
#Photo.
YouTub.
#Gboar.
#Cloc.
#Camer.
#Inbo.
#Duo
#Dropbo.
#PushBulle.
#Calenda.
#Kee.
#Telegra.
#Swiftke.
#Translat.
#Faceboo.
#Pandor.
#Twitte.
#Slac.
#Meg.
#WhatsAp.
#Voic.
#Driv.
#Netfle.
#Pixel.aunche.
#Wallpaper.
#Captur.
#Google.onnectivit.Services 
#Google..Services 
#Google.la.Services 
#Google.arrie.Services

This is happening to me too! My Detach.txt is getting modified in the same exact way when I flash the module to apply changes! Notice the modifications to the original default entries with truncation and insertion of ".", which does not seem to happen to the manual entries I've entered. any ideas why this is happening?
 
  • Like
Reactions: silver2004

lottarake

Senior Member
Dec 14, 2010
125
77
Manchester
Google Pixel 7 Pro
Module works great temporarily for me, seems to last around 8 hours or so before the Play Store will unhide YouTube in the update list. Detach.txt is unaltered as well, not quite sure why it's reappearing.
 

jaggillararla

Senior Member
Mar 27, 2015
804
132
Module works great temporarily for me, seems to last around 8 hours or so before the Play Store will unhide YouTube in the update list. Detach.txt is unaltered as well, not quite sure why it's reappearing.
Do you get the same error as I ?
This happens on all phones
 

Attachments

  • Screenshot_20200121-123057.png
    Screenshot_20200121-123057.png
    186.6 KB · Views: 226

Top Liked Posts

  • There are no posts matching your filters.
  • 183
    Detach3

    Introduction

    This Magisk module is for detaching apps from the Google Play Store.
    It removes your defined packages from the 'Manage apps and device" section and disables them from auto-updates.

    Installation
    Flash module in Magisk Manager only.
    Not necessary to reboot after flashing this module.
    This module is designed to flash as many times as you like.
    It is configured with a *configuration file. You can create one before flashing this module to define your package(s) or the default one will be used instead, which detaches YouTube by default.
    Add your package name(s) you would like to detach to the configuration file, with each package name on a new line.
    You can add more package names to your configuration file or the default one at any time, then simply just flash module again to apply it. Again, no need to reboot or any other user interaction needed.
    Read the log that Magisk Manager displays when flashing the module, it displays the detached package(s) for confirmation.
    *Configuration file: /storage/emulated/0/Android/detach.cfg

    Reattach
    https://xdaforums.com/t/module-detach3-detach-market-links.3447494/post-84951411

    Scheduler
    https://xdaforums.com/t/module-detach3-detach-market-links.3447494/post-84981039


    Uninstallation
    Uninstall with Magisk and reboot.

    Troubleshooting
    Follow uninstallation method. After reboot open playstore, navigate to the 'Manage apps and device' section so it can populate and then re-flash the module.
    Still have an issue? Post your problem in detail and upload your Magisk installer log, found in your Download directory after saving it ( Shown here ).

    Changelog
    v3.00
    - Initial release

    v3.01
    - Disabled Fallback broadcast

    v3.02
    - Disable auto-update for detached apps
    - Disable playstore running in background
    - Added uninstall script to revert changes

    v3.03
    - Updated sqlite3 binary
    - Added support for x86 and x64

    v3.04
    - Added package check for configuration file
    - Minor alterations

    v3.05
    - Recompiled sqlite3 binaries
    - Improved device platform check
    - Added database check
    - Added the default detach.cfg file
    - Minor alterations

    v3.06
    - Improved installer checks
    - Fixed inflating uninstall script error
    - Tidied installer script
    - Added reattach feature*
    * Comment out package name(s) in detach.cfg to reattach.


    v3.07
    - Fixed minor install.sh error on Android 11
    - Improved some installer logic
    - Added scheduler feature*
    *Termux and Termux:API apks need to be installed beforehand for scheduler

    v3.08
    - Fixed playstore update log error on some devices
    - Fixed script not applying package names with the same string of characters
    - Fixed minor installer check for checking packages
    - Fixed termux-api binary check
    - Disabled package checks on some devices
    - Added option to open playstore with scheduler notification
    - Added option to open configuration file with scheduler notification
    - Added option to flash module with scheduler notification

    v3.10 - Note: Disable scheduler and uninstall previous version before installing this version.
    - Removed package check (Some users have had issues, reboots etc.)
    - Removed scheduler (Not needed for now)
    - Removed unnecessary coding
    - Added new method to prevent detached apps repopulating
    - Added disabling of Play store trackers
    - Other minor alterations in installer script
    - Cleaned up installer script for new method

    v3.11
    - Added ignore GET_USAGE_STATS in AppOps

    v3.12
    - Updated sqlite binaries
    - Removed disabling of fallback receiver
    - Added disabling of alarm manager background service

    v3.13
    - Updated sqlite binaries
    - Added ignore RUN_ANY_IN_BACKGROUND in AppOps
    - Added ignore RUN_IN_BACKGROUND in AppOps
    - Disabled App Discovery Service

    Frequenly Asked Questions
    Q. Can I use the old detach.txt?
    A. No, I decided to ditch it. It now uses a new method explained in the installation section.

    Q. Where is the boot script installed?
    A. No boot script is needed for detaching, everything is done while flashing the module.

    Q. Does this break safetynet?
    A. No, it doesn't conflict with safetynet at all.

    Q. Why shouldn't I re-enable Play Protect?
    A. It will interfere with the module's purpose.

    Q. Will having Play Protect disabled, open me up to vulnerabilities?
    A. No, the playstore scans their market apk's after developers upload them.

    Q. I usually install after-market apks (modified ones) and I think play protects me from this?
    A. You should scan your unknown apk with Total Virus.

    Q. How do you find a package name?
    A. Magisk Manager lists your apps with the package name underneath each one, in the Magisk Hide list.

    Q. What Magisk version is needed?
    A. The module template is designed for Magisk v20.4+

    Q. Do I need to uninstall previous version before updating?
    A. No, unless stated. Just flash updated version.

    Q. Do auto-updates still work for all my other apps that aren't detached?
    A. Yes, auto-update and other notifications etc still work.

    Download
    See attached below -- detach-3.xx.zip

    Previous versions

    Detach Market Links for Theme Ready Apps *

    Introduction
    This Mod is for detaching apps from the Google Play Store that are included in the Theme Ready Apps zip and/or aroma installer from Team Black Out for CMTE and Substratum theme engines.
    *Now also includes majority of all themed apps by Team Black Out by using an optional txt file.
    The purpose is that updates will not show in your update list and also in update notifications from the Google Play Store.
    This allows you to auto-update or the ability to use the update all button without the worry of updating Theme Ready Apps which will break your themes for those apps updated.
    The Google apps that are detached if you're not using the optional txt file are Gmail, Google App, Google Plus, Hangouts, YouTube and Gboard (Google Keyboard).

    Installation
    Flash Mod in recovery, no need to wipe anything but if using SuperSU systemless mode or Magisk, flash this mod afterwards.
    No need to flash again in-between ROM updates if using SuperSU systemless mode or Magisk or if your ROM supports addon.d scripts.
    To detach more themed apps, place the detach.txt file either on root of your sdcard or internal storage and remove the comment from the apps you wish to detach and then flash Detach.zip
    You can also use the optional detach.txt file to just selectively detach Theme Ready Apps.
    If you don't use the supplied detach.txt file, only Theme Ready Apps will be detached.
    To add your own custom packages (apps), read here > https://xdaforums.com/showpost.php?p=72194332&postcount=147

    Uninstallation
    Rename detach.txt on sdcard to detach.remove, flash Detach.zip again and reboot.
    This will remove all files related to installation, including the txt and custom file and restores all market links.

    Note
    If not using SuperSU or Magisk, you need to have init.d support.
    The configured script doesn't execute until after 60 seconds when boot has completed, this also includes the remove script too.
    This Mod has been tested by myself on Android 6 and 7.
    You still have the ability to update your Theme Ready Apps via Google Play Store but you'll need to use the search function instead.

    Changelog
    v1.0
    - Initial release
    v1.1
    - Changed detach method
    v1.2
    - Disabled service for database
    v1.3
    - Bug fixes
    v1.4
    - Added static sqlite binary
    v2.0
    - Added themed apps to detach with configuration txt file (optional)
    v2.1
    - Cleaned up installation script
    - Added mod removal option
    v2.2
    - Magisk compatible (systemless installation)
    - SuperSU systemless mode compatible (systemless installation)
    - Fixed init.d detection
    - Fixed market links reappearing
    - Updated detach.txt (added Wallpapers, Pixel Launcher, Capture (GoPro))
    v2.3
    - Updated script and detach.txt (added Gboard, Clock, Camera, Google Connectivity Services, Google VR Services, Google Play Services)
    v2.4
    - Updated script and detach.txt (added Google Carrier Services and the ability to add custom packages)
    v2.5
    - Fixed market links reappearing
    v2.6
    - Main script updated for removal process
    - Disabled code for a playstore service that no longer needs to be disabled
    - Removed Contacts, Phone and Photos from default install
    41
    Update: Detach_v2.4.zip + detach.txt
    Updated script to include Google Carrier Services and also custom packages.

    To add your own custom packages (apps) to detach from market, create a file on root of sdcard or internal storage called detach.custom with the package names you wish to detach and then flash Detach.zip
    See attachment for example (example has .txt extension to be able to upload).
    You can goto Settings > Apps > [App name] to see the package name or source it from a site such as APK Mirror.
    23
    Update - Detach_v2.6.zip
    - Main script updated for removal process
    - Disabled code for a playstore service that no longer needs to be disabled
    - Removed Contacts, Phone and Photos from default install
    20
    UPDATE: Detach3 v3.13
    https://xdaforums.com/t/module-detach3-detach-market-links

    Changelog
    - Updated sqlite binaries
    - Added ignore RUN_ANY_IN_BACKGROUND in AppOps
    - Added ignore RUN_IN_BACKGROUND in AppOps
    - Disabled App Discovery Service
    17
    Detach v2.6 updated to working with Magisk v16.3 and higher aviable :)

    https://www.mediafire.com/download/cryhbf4b35om2dx