J'ai eu le besoin de nettoyer des tonnes et des tonnes de features-branches non-mergées et abandonnées dans nos répos Git. J'ai donc écrit un petit script bash qui va lister toutes les branches dont l'âge dépasse le nombre de jours indiqués en paramètre.
Utilisation
# Va lister toutes les branches qui n'ont pas bougées depuis plus de 180 jours
$ git-unused-branches 180
Le script
#!/usr/bin/env bash
if [ "$1" == "" ]; then
echo "Usage: git-too-old-branches <NB_DAYS>"
echo ""
echo "( NB_DAYS The lower age limit filter of branches"
echo " to list"
echo ""
echo "Example"
echo " To list any branches which has not been"
echo " changed since 90 days use :"
echo " git-unused-branches 90"
exit 1
fi
NB_DAYS="${1}"
SECONDS_IN_DAY=86400
TODAY_EPOCH_TIME=$(date +"%s")
## List everything expect
## - Production branches
## - Renovate branches
## - HEAD (master)
list_branches() {
local branches
branches=$(git branch -r | grep -v -E "origin/HEAD|origin/production|origin/renovate" | sed "s/ //" | sort)
echo "${branches}"
}
filter_branch() {
local ageGap
local branch
local branchAge
local maxDays
branch="${1}"
branchAge=$(git log "$branch" -n 1 --format=%ct)
ageGap=$(((TODAY_EPOCH_TIME-branchAge)/SECONDS_IN_DAY))
if (( ${ageGap} > ${NB_DAYS} )); then
echo "$branch is [$ageGap] days old"
fi
}
main() {
local branches
branches=$(list_branches)
for branch in ${branches}
do
filter_branch "${branch}"
done
}
main
En espérant que ça puisse aider certains :P
Très pratique pour nettoyer toutes les feature branches récupérées au fil du temps. Bref, le nettoyage se fait en deux commandes :
# Récupérer de tout le contenu distant (hors tags)
git pull --all
# Suppression des branches locales
git remote update origin --prune
Vous avez un téléphone Android que vous n'êtes pas en mesure de root / formatter. Voici les applications à supprimer via ADB Shell dont je parle dans ce post.
Android Packages list
- android.process.media - MtpService. DO NOT remove this.
- com.android.apps.tag - Still unclear how it acts with system, but should be safe to remove...
- com.android.backupconfirm - Restore google settings with Google Backup restore function.
- com.android.bips - Built-in Print Service. Safe to remove.
- com.android.blockednumber - Blocked numbers feature.
- com.android.bluetooth - Core of Bluetooth services.
- com.android.bluetoothmidiservice - Provides classes for sending and receiving messages using the MIDI event protocol over Bluetooth LE.
- com.android.calculator2 - Stock calculator app.
- com.android.calendar - Stock calendar app.
- com.android.captiveportallogin - This consists in a web page that the user of a public access network is obliged to view and interect with, before access is granted. Like public Wi-Fi hotspots that prompts you with an user and password login.
- com.android.carrierconfig - Provides access to telephony configuration values that are carrier-specific.
- com.android.cellbroadcastreceiver - Alerts for Broadcasts.
- com.android.certinstaller - Certificate installer. When removed, the Wi-Fi wouldn't be able to be turned on. DO NOT remove this.
- com.android.companiondevicemanager - Companion Device Manager that comes by default in every Oreo+ device. This handles connections to other devices, like Bluetooth Headphones, desktop Operative Systems, ecc. DO NOT remove this.
- com.android.contacts - Stock contacts app.
- com.android.cts.priv.ctsshim - Compatibilty Test Service. Used to certify your device as "valid" or not. DO NOT remove this.
- com.android.defcontainer - Needed for installer by applications.
- com.android.deskclock - Clock app, plus alarm function.
- com.android.dreams.basic - Support for screensaver mode.
- com.android.dreams.phototable - Photographic screensavers.
- com.android.egg - Android build's easter egg feature.
- com.android.email - Stock Email app (not Gmail).
- com.android.emergency - Emergency Contacts. Remove it if you don't use this feature.
- com.android.exchange - Needed for email app to work correctly if you use a mail different from Gmail.
- com.android.facelock - Essential if you wanna use Face Unlock features, removable if you don't want to.
- com.android.gallery3d - Gallery app.
- com.android.htmlviewer - In-built HTML viewer.
- com.android.hotwordenrollment.okgoogle - "OK Google" detection service (used when you wanna enroll Assistant by the hotword.
- com.android.incallui - In Call User Interface - Controls various activities during a call.
- com.android.inputdevices - Manages the input devices.
- com.android.inputmethod.latin - AOSP keyboard. Safe to remove.
- com.android.keychain - Should provide access to private keys plus their certificate chains in storage.
- com.android.location.fused - NEVER REMOVE this. Provides everything you need for GPS, Cellular and Wi-Fi networks location data.
- com.android.magicsmoke - Live wallpaper.
- com.android.managedprovisioning - For corporate restritctions on phones with Google Workplace.
- com.android.mediacenter - EMUI music app.
- com.android.mms - Stock SMS app.
- com.android.mms.service - Provides support for sending MMS messages with photos, videos, ecc.
- com.android.nfc - NFC service. If disabled, Settings app could crash or not work.
- com.android.noisefield - Live wallpaper.
- com.android.phasebeam - Wallpaper.
- com.android.printservice.reccomendation - Keep it, if you need to print directly via your phone.
- com.android.pacprocessor - PAC stands for proxy auto-config, and this file defines how web browsers and other agents can automatically define the correct proxy server for fetching an URL. Removable, if you don't use proxies on your phone.
- com.android.phone - Dialer app.
- com.android.phone.recorder - Call recorder function.
- com.android.printspooler - Keep it, if you need to print directly via your phone.
- com.android.providers.blockednumber - Storage of blocked numbers.
- com.android.providers.contacts - Part of stock contact app, sync contacts.
- com.android.providers.calendar - Necessary to sync stock Calendar app and let it work correctly.
- com.android.providers.downloads - Download provider. DO NOT remove this.
- com.android.providers.downloads.ui - Download app. DO NOT remove this.
- com.android.providers.media - Needed to access media files, and ringtones.
- com.android.providers.partnerbookmarks - Provides bookmarks about partners of Google in Chrome.
- com.android.providers.settings - Sync settings.
- com.android.providers.telephony - Telephony provider contains data related to phone operation. DO NOT remove this.
- com.android.providers.userdictionary - User dictionary for keyboard apps.
- com.android.quicksearchbox - Search box.
- com.android.se - Security Enhanced Linux (SELinux) framework. DO NOT remove this.
- com.android.settings - Settings app.
- com.android.settings.intelligence - Settings tips in Settings menu. DO NOT remove this.
- com.android.sharedstoragebackup - Possibly USB connection menu.
- com.android.shell - Unix shell to communicate via ADB commands through PC. DO NOT remove this.
- com.android.simappdialog - Sim App Dialog, comes by default in every Pie+ device. It is used to install the carrier app when the SIM is inserted. DO NOT remove this.
- com.android.soundrecorder - Sound recorder, obviously.
- com.android.spul - SUPL20SERVICES, seems related to GPS in Huawei devices. Should be safe to remove.
- com.android.systemui - System User Interface. DO NOT remove this.
- com.android.stk - SIM toolkit app.
- com.android.storagemanger - Storage Manager function, the one that details your occupied space on internal/external memory card and allows to see how many space is occupied by apps divided by sections, to be clear. DO NOT remove this.
- com.android.traceur - Android stock developer tool included by default in every Pie+ device. Allows to locally save logs. DO NOT remove this.
- com.android.vending - Google Play Store app.
- com.android.voicedialer - Voice search.
- com.android.vpndialogs - VPN system.
- com.android.wallpaper.holospiral - Live wallpaper.
- com.android.wallpaper.livepicker - Wallpaper picker.
- com.android.wallpapercropper - Wallpaper cropper.
- com.example.android.notepad - Notepad app.
Google Apps/Packages list
- com.google.android.backuptransport - Allows Android apps to back up their data on Google servers.
- com.google.android.apps.books - Google Books.
- com.google.android.apps.cloudprint - Cloud print.
- com.google.android.apps.currents - Currents.
- com.google.android.apps.docs - Google Drive.
- com.google.android.apps.fitness - Google Fit.
- com.google.android.apps.mapps - Google Maps app.
- com.google.android.apps.photos - Google Photos.
- com.google.android.apps.plus - Google+.
- com.google.android.apps.restore - Restore apps during first boot.
- com.google.android.apps.tachyon - Google Duo.
- com.google.android.apps.turbo - Device Health Services, ships by default on every Oreo+ device. DO NOT remove this.
- com.google.android.apps.wallpaper - Google Wallpapers. Safe to remove.
- com.google.android.apps.wellbeing - Digital Wellbeing app that is prebuilt in Android Pie. Safe to remove.
- com.android.documentsui - This prompts you with a window for apps wishing to access files outside of their own storage area. DO NOT remove this.
- com.google.android.ext.services - Android Notification Ranking service, part of Android Services Library. DO NOT remove this.
- com.google.android.feedback - When an app crashes, this is the app that briefly asks you if you want to feedback the crash on the market, Google Play Store.
- com.google.android.googlequicksearchbox - Google Search.
- com.google.android.gm - G-mail app.
- com.google.android.gms - Google Play Services. DO NOT remove this.
- com.google.android.gsf - Google Services Framework, needed for Google Apps. DO NOT remove this.
- com.google.android.gsf.login - Support for managing Google accounts. DO NOT remove this.
- com.google.android.inputmethod.latin - G Board.
- com.google.ar.core - Google ARCore app.
- com.google.marvin.talkback - Adds some features about accessibility settings.
- com.google.android.markup - Google Markup app made for modifying pictures, ships by default on every Pie+ device.
- com.google.android.onetimeinitializer - Provides first time setup, safe to remove.
- com.google.android.packageinstaller - Gives ability to install, update or remove applications on the device.
- com.google.android.partnersetup - Software that helps other apps to work with Google products.
- com.google.android.play.games - Google Play Games.
- com.google.android.setupwizard - Removable after the first start of the phone, it's the basic configuration wizard that drives you through first boot.
- com.google.android.soundpicker - Google Sounds. Removable if you already have another media select service.
- com.google.android.street - Google Street View app.
- com.google.android.syncadapters.calendar - Google Calendar sync.
- com.google.android.syncadapters.contacts - Google Contacts sync.
- com.google.android.talk - Google Hangouts.
- com.google.android.tts - Text-to-speech powers apps to read text on your scream aloud, in many languages.
- com.google.android.videos - Google Play Movies.
- com.google.android.webview - WebView interface. DO NOT remove this.
- com.google.android.youtube - YouTube app.
- com.google.tango.measure - Google Measure app.
Huawei Apps/Packages list
- com.baidu.input_huawei - Huawei chinese stock input keyboard. Safe to remove.
- com.hisi.mapcon - Don't disable/remove this if you use WiFi Calling, or it'll kill the app. If you don't use WiFi Calling, this is safe to remove. (Thanks @mj084 !)
- com.huawei.appmarket - Huawei Market app.
- com.huawei.android.chr - HwChrService. Safe to remove.
- com.huawei.android.dsdscardmanager - Dual Sim Card manager. DO NOT remove this.
- com.huawei.android.FloatTasks - Floating dock function.
- com.huawei.android.FMRadio - Radio FM app. DO NOT remove this.
- com.huawei.android.hsf - Huawei Services Framework. Safe to remove.
- com.huawei.android.hwpay - Huawei Pay. Safe to remove.
- com.huawei.android.hwouc - System update app. DO NOT remove this.
- com.huawei.android.karaoke - Karaoke mode feature. Safe to remove.
- com.huawei.android.instantshare - Huawei Share features. DO NOT remove this.
- com.huawei.android.internal.app - Component of Huawei sharing. DO NOT remove this.
- com.huawei.android.launcher - Huawei launcher app.
- com.huawei.android.mirrorshare - MirrorShare feature.
- com.huawei.android.projectmenu - ProjectMenu interface. DO NOT remove this.
- com.huawei.android.pushagent - System update OTA notification push service.
- com.huawei.android.remotecontroller - Juawei Smart Controller app.
- com.huawei.search - HiSearch. Safe to remove.
- com.huawei.synergy - Huawei Cloud Synergy. Shouldn't be safe to remove, need to learn more 'bout this.
- com.huawei.stylus.floatmenu - Floating menu with M-Pen feature. Safe to remove.
- com.huawei.android.thememanager - Theme Manager. DO NOT remove this.
- com.huawei.android.tips - Huawei Tips. Safe to remove.
- com.huawei.android.totemweather - Huawei Weather app.
- com.huawei.android.wfdirect - Wi-Fi Direct feature.
- com.huawei.aod - Always On Display feature. DO NOT remove this.
- com.huawei.arengine.service - Augmented reality service. Safe to remove.
- com.huawei.bluetooth - Import contact via Bluetooth function.
- com.huawei.browser - Huawei Browser app. More than safe to remove if you have another browser installed.
- com.huawei.contactscamcard - CamCard is a business card reader app. Safe to remove.
- com.huawei.compass - Huawei Compass app.
- com.huawei.desktop.explorer - Service that is been used when you wanna use your phone as an operative system on a PC. Safe to remove.
- com.huawei.fido.uafclient - Fast ID Online function. Safe to remove.
- com.huawei.gameassistant - Huawei Game Suite (HiGame). Safe to remove.
- com.huawei.geofence - GeofenceService. Safe to remove.
- com.huawei.hdiw - Huawei ID app. Safe to remove.
- com.huawei.hiai - Huawei Artificial Intelligence. DO NOT remove this.
- com.huawei.hidisk - Huawei File Manager app.
- com.huawei.hifolder - Huawei Online Cloud folder service. Safe to remove.
- com.huawei.himovie.overseas - Huawei videos App. Safe to remove.
- com.huawei.hitouch - Floating dock by Huawei. Safe to remove.
- com.huawei.HwMultiScreenShot - Sliding screen feature.
- com.huawei.hwasm - FIDO UAF Autenthicator-Specific Module.
- com.huawei.android.hwaps - Advanced Power Saving feature. DO NOT remove this.
- com.huawei.hwdetectrepair - Huawei Smart diagnosis app. Safe to remove.
- com.huawei.iaware - Never understood what thid does, but hey it's safe to remove.
- com.huawei.ihealth - MotionService package, it's required for actions like shaking the phone to shut off the alarm, ecc. - remove it, if you don't care about this.
- com.huawei.languagedownloader - Huawei language downloader. DO NOT remove this
- com.huawei.livewallpaper.paradise - Live wallpaper service.
- com.huawei.parentcontrol - Parental controls functions. Safe to remove.
- com.huawei.pcassistant - HiSuite service. If you use it, keep it.
- com.huawei.phoneservice - HiCare app. Safe to remove.
- com.huawei.powergenie - Huawei Power management app. DO NOT remove this.
- com.huawei.mirror - Huawei Mirror app. Safe to remove.
- com.huawei.scanner - Huawei Scanner function. DO NOT remove this.
- com.huawei.screenrecorder - Huawei Screen recorder feature. Safe to remove.
- com.huawei.systemmanager - Huawei System Manager app. DO NOT remove this.
- com.huawei.trustagent - Intelligent unlock feature.
- com.huawei.vassistant - HiVoice app. Safe to remove.
- com.huawei.videoeditor - Video editor function. Safe to remove.
- com.huawei.wallet - Huawei Wallet. Safe to remove.
- com.huawei.watch.sync - Huawei Watch sync function. Safe to remove.
- com.iflytek.speechsuite - Default voice input method.
- com.nuance.swype.emui - Huawei Swype functions.
Other apps
Obviously all bloatware apps and services related , Snapchat... etc.
- com.amazon.aa - Amazon Assistant app.
- com.amazon.aa.attribution - Amazon Assistant related package.
- com.booking - Booking.com app.
- com.ebay.mobile - eBay app.
- com.facebook.appmanager - Facebook related stuff. Purge this.
- com.facebook.system - Facebook related stuff. Purge this.
- com.facebook.orca - Facebook related stuff. Purge this.
- com.facebook.katana -Facebook related stuff. Purge this.
- com.facebook.services - Facebook related stuff. Purge this.
- com.instagram.android - Instagram app.
- com.netflix.mediaclient - Netflix app.
- com.netflix.partner.activation - Netflix related package.
- com.microsoft.translator - Microsoft Translate app. Safe to remove.
- com.snapchat.android - Snapchat App.
- com.swiftkey.swiftkeyconfigurator - SwiftKey factory settings. Safe to remove.
- com.touchtype.swiftkey - SwiftKey board. Safe to remove.
- com.twitter.android - Twitter app.
- org.smsalliance.openmobileapi.service - SmartcardService. "The SmartCard API is a reference implementation of the SIMalliance Open Mobile API specification that enables Android applications to communicate with Secure Elements, e.g. SIM card, embedded Secure Elements, Mobile Security Card or others."
Pour Chlouchloutte qui aide sa Maman
Merci à Timo qui est toujours serviable à ce sujet.
Mon point de vue à ce sujet
Quand vous aider gratuitement un utilisateur de Windows à "nettoyer son Windows" en réalité vous :
- Vous assurez gratuitement le support après-vente sur société commerciale américaine qui défiscalise massivement.
- Vous apportez de la visibilité et du soutien à un système privateur qui agresse le logiciel libre chaque année.
- Vous permettez à des gens "qui s'en foutent" de continuer de s'en foutre.
- Vous contribuez directement à la mort du logiciel libre en dépensant votre temps à servir son concurrent sans pitié.
De nouveaux trucs pour nettoyer vos tâches.
Tuto de nettoyage de mobile & tablettes sous Android
Vous avez des tupperware tâchés par de la sauce tomate ? Un bureau en bois délavé par le soleil ? Des casseroles noircies au cul et dont le teflon semble être rouillé ?
Si vous souhaitez réparer tout cela avec des techniques maison, un peu d'huile de coude et quelque heures de patiente (il faut souvent laisse le produit agir), alors cette page est faite pour vous.
Je me mets ça sous le coude : Android moins Google.
Petites astuces de nettoyage... Simple, rapide, pratique et efficace :D