[MODULE] Detach3 - Detach Market Links

Search This thread

hinxnz

Senior Member
Jul 21, 2009
2,849
2,457
After about 24 hours my YouTube app was updated by Google Play, thereby reverting my YouTube Vanced installation.
Do you know if the playstore updated itself too when this happened?
Did you enable play protect?

Can you check last update times for playstore and youtube
Code:
su
dumpsys package com.android.vending | grep -e "lastUpdateTime"
dumpsys package com.google.android.youtube | grep -e "lastUpdateTime"
 
Last edited:
  • Like
Reactions: oldman20

Bradford1040

Senior Member
  • Mar 5, 2016
    137
    19
    49
    West Palm Beach, FL
    Well after 24hrs YouTube shows back up, play protect was off.

    Again I have 21.4 magisk and Unofficial LOS 17.1 on a 1+7tpro5g.

    I don't have any logs, sorry, I was out and about.

    It did work flawless for an entire day. I have noticed Google is constantly updating YouTube lately.

    I have just turned the automatic tic is off, so I'm back to pressing each update instead of update all. "boo hoo right :)"
     

    hinxnz

    Senior Member
    Jul 21, 2009
    2,849
    2,457
    Well after 24hrs YouTube shows back up, play protect was off.

    Again I have 21.4 magisk and Unofficial LOS 17.1 on a 1+7tpro5g.

    I don't have any logs, sorry, I was out and about.

    It did work flawless for an entire day. I have noticed Google is constantly updating YouTube lately.

    I have just turned the automatic tic is off, so I'm back to pressing each update instead of update all. "boo hoo right :)"
    I think it happens when the actual playstore updates itself, probably updated from v23.7 to 23.8
    Are you able to enter commands in terminal from the post above?
    If you flash module again it shouldn't show again until playstore releases an update for itself, if this the reason it happened
     
    Last edited:

    Bradford1040

    Senior Member
  • Mar 5, 2016
    137
    19
    49
    West Palm Beach, FL
    I think it happens when the actual playstore updates itself, probably updated from v23.7 to 23.8
    Are you able to enter commands in terminal from the post above?
    If you flash module again it shouldn't show again until playstore releases an update for itself, if this the reason it happened
    dumpsys package com.android.vending | grep -e "lastUpdateTime"


    m.android.vending | grep -e "lastUpdateTime" <
    lastUpdateTime=2021-02-04 17:23:18
    lastUpdateTime=2020-09-08 18:33:47


    dumpsys package com.google.android.youtube | grep -e "lastUpdateTime"


    m.google.android.youtube | grep -e "lastUpdateTime" <
    lastUpdateTime=2021-01-27 14:17:45
     
    • Like
    Reactions: hinxnz

    hinxnz

    Senior Member
    Jul 21, 2009
    2,849
    2,457
    dumpsys package com.android.vending | grep -e "lastUpdateTime"


    m.android.vending | grep -e "lastUpdateTime" <
    lastUpdateTime=2021-02-04 17:23:18a
    lastUpdateTime=2020-09-08 18:33:47


    dumpsys package com.google.android.youtube | grep -e "lastUpdateTime"


    m.google.android.youtube | grep -e "lastUpdateTime" <
    lastUpdateTime=2021-01-27 14:17:45
    Thanks, yeah it must be when the playstore updates itself
     
    • Like
    Reactions: jelbo

    hinxnz

    Senior Member
    Jul 21, 2009
    2,849
    2,457
    Maybe I can make a Tasker task to flash after playstore updates? Lol, I really like the apps from there, but not very fond of "G" itself
    You could but playstore updates aren't too often. Users can disable auto-update for their detached apps like you did so they don't auto-update when playstore updates itself but I might update mod at some stage to disable auto-updates for the detached apps until I find a solution anyways
     

    Bradford1040

    Senior Member
  • Mar 5, 2016
    137
    19
    49
    West Palm Beach, FL
    You could but playstore updates aren't too often. Users can disable auto-update for their detached apps like you did so they don't auto-update when playstore updates itself but I might update mod at some stage to disable auto-updates for the detached apps until I find a solution anyways
    I already have a task that detects when any app updates or installed, including playstore app, I just normally swipe the notification away,

    Until now lol, going to see if I can capture the notification after it updates, set up either intent's or autoinput tasks to auto flash detach3 after,

    Because I get bored lol, no useful reason. Guess to see if I can do it. Isn't that how things get created? 😉

    Great module BTW, very simple, no boot loops, happy user! Lol, everything that matters
     

    kanehun

    Senior Member
    Mar 21, 2012
    97
    7
    Noob question. I try to run detach, but no matter how I try, running it causes detach asking me which package to detach. I tried Youtube, tried m.google.android.youtube in the detach.txt file. Even if I name the app after detach asking me, it does not find my app. I grabbed the package name with Package name app. Still no success. I tried row 44, 45, 46, no success (I have counted by hand). Need some help. Thank you in advance.
    Another question. If I would like to detach two apps, I just add a line for that second app, and an empty line below? Lg V30 android 9.
     
    Noob question. I try to run detach, but no matter how I try, running it causes detach asking me which package to detach. I tried Youtube, tried m.google.android.youtube in the detach.txt file. Even if I name the app after detach asking me, it does not find my app. I grabbed the package name with Package name app. Still no success. I tried row 44, 45, 46, no success (I have counted by hand). Need some help. Thank you in advance.
    Another question. If I would like to detach two apps, I just add a line for that second app, and an empty line below? Lg V30 android 9.
    Detach3 uses config file in "storage/emulated/0/Android/detach.cfg". You can just add the package name of the app you want detached.

    This is my file. Remove ".txt" from it if you want to use it. Otherwise just add your package name to the file most likely already created in "storage/emulated/0/Android/".
     

    Attachments

    • detach.cfg.txt
      61 bytes · Views: 37
    • Like
    Reactions: iPAQ 6515a User

    Falcon_X

    Senior Member
    Jun 25, 2013
    119
    17
    This one was really helpful, but now it doesn't work anymore. But it worked for me before... Since I've updated my Syberia Android 11 ROM (fresh install) it does nothing.
    I can't access /storage/emulated/
    Phone is rooted with Magisk and my file manager has root rights.
    I just want to detach Youtube, what can I do?
     
    Last edited:

    hinxnz

    Senior Member
    Jul 21, 2009
    2,849
    2,457
    This one was really helpful, but now it doesn't work anymore. But it worked for me before... Since I've updated my Syberia Android 11 ROM (fresh install) it does nothing.
    I can't access /storage/emulated/
    Phone is rooted with Magisk and my file manager has root rights.
    I just want to detach Youtube, what can I do?
    Youtube is added by default so you can just flash without doing anything else.
    Some file managers have issues with A11, you should be able access the config file by /sdcard/Android
     

    elmer_fudd

    Senior Member
    Sep 29, 2015
    55
    16
    Hi, thanks for a great module!
    I have a problem with OnePlus Launcher (net.oneplus.launcher). It gets detached but always reappears after some hours/day. I checked that Play Store hasn't got updated. Many many times I have installed the module and it is always the same.
     

    hinxnz

    Senior Member
    Jul 21, 2009
    2,849
    2,457
    Hi, thanks for a great module!
    I have a problem with OnePlus Launcher (net.oneplus.launcher). It gets detached but always reappears after some hours/day. I checked that Play Store hasn't got updated. Many many times I have installed the module and it is always the same.
    Have you enabled play protect?
     

    Top Liked Posts

    • 2
      Since I had I new install I had never run `pkg install termux-api`
      But I had the termux api installed from fdroid. Just had forgotten to run the CMD, the schedule won't run without termux api, (I would add above)
    • 6
      UPDATE: Detach3 v3.06
      https://forum.xda-developers.com/t/module-detach3-detach-market-links

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


      Edit: I added the reattach feature for example, if you wanted to detach an app due to a bad update until fixed. Now without uninstalling or wiping playstore data, you can just comment out the package name in your detach config file and flash the module again, no reboot needed. See attachment for an example of detach.cfg
      3
      UPDATE: Detach3 v3.03
      https://forum.xda-developers.com/t/module-detach3-detach-market-links

      Changelog
      - Updated sqlite3 binary
      - Added support for x86 and x64

      Note: I had to remove initial upload due to error, new version now uploaded.
      3
      UPDATE: Detach3 v3.07
      https://forum.xda-developers.com/t/module-detach3-detach-market-links

      Changelog
      - 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

      Detach3 Scheduler
      I added this feature due to feedback, the playstore database seems to be updated at times when the playstore updates itself.
      I wrote the detach3 scheduler to work by controlling termux-job-scheduler. This uses Android's native job scheduler, making it the best on battery for scheduling tasks.
      Its a time scheduler, the interval is set by user. At the set interval, it checks if the playstore has been updated and if so, it will run the installer and detach your configuration list. It will also give you a notification that it has been updated, with the update time, as seen in attachment.
      Termux and Termux:API apks need to be installed prior to flashing.

      Usage:
      On first use, type 'detach3 '. This will do a self check for termux-api binary and install it, if not already installed. This is essential for the detach3 scheduler.

      Type 'detach3 ' in Termux
      Code:
      ~ $ detach3
      Usage: detach3 [OPTIONS]...
      Try 'detach3 --help' for more information.

      Type 'detach3 --help ' in Termux
      Code:
      ~ $ detach3 --help
      Usage: detach3 [OPTION]...
      Schedule detach3 script to run at specified intervals.
      -s, --schedule [MINUTES]    set interval in minutes
      -p, --pending               list pending job
      -c, --cancel                cancel running job

      Type 'detach3 --schedule 180 ' in Termux for example, will start job and set interval to 180 minutes ( 3 hours ). For Android 7+, the minimum interval is 15 minutes.

      Type 'detach3 --pending ' in Termux, will list your current job.

      Type 'detach3 --cancel ' in Termux, will cancel your current job.

      Note:
      No need to cancel job if updating or setting a new interval.
      No need to set scheduler after reboot, it's persistent.
      By design, when battery is low, scheduler won't run its check. Neither will the playstore for an update.
      I recommend to update Termux beforehand by entering 'pkg upgrade -y '.
      The binary helper 'termux-api' also needs to be installed but is handled by the detach3 scheduler. It will download and install it for you by entering 'detach3 ', if not already installed. You can install manually beforehand by entering 'pkg install termux-api -y '.
      Edit: I also recommend to download Termux with F-Droid or from the F-Droid site.
      2
      How do I detach current YouTube Music. I tried YT Music and it doesn't work

      ..... Haha
      Not sure if you understood the Dev correctly, but the version you are using is different than the one in this thread.


      Is the support link you are looking for
      2
      Since I had I new install I had never run `pkg install termux-api`
      But I had the termux api installed from fdroid. Just had forgotten to run the CMD, the schedule won't run without termux api, (I would add above)
    • 143
      Detach3

      Introduction

      This Magisk module is for detaching apps from the Google Play Store.
      It removes your defined packages from the 'My apps & games' 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 directory: /storage/emulated/0/Android/detach.cfg

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

      Scheduler
      https://forum.xda-developers.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 'My apps and games' 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

      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, 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://forum.xda-developers.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
      17
      Detach v2.6 updated to working with Magisk v16.3 and higher aviable :)

      https://www.mediafire.com/download/cryhbf4b35om2dx
      15
      Update: Detach_v2.5.zip
      Fixed market links reappearing
    Our Apps
    Get our official app!
    The best way to access XDA on your phone
    Nav Gestures
    Add swipe gestures to any Android
    One Handed Mode
    Eases uses one hand with your phone