How To Guide [HOW TO] Banking apps for Google-less Lineage, modifying build.prop and adb tweaks

Search This thread

Moto-J

Senior Member
Sep 9, 2022
154
58
Updated the first five posts as my script setup is completely changed in the last year.

Current Android is that good optimised, that it is not needed to remove apk's, tweak build.prop a lot, to use apps to keep system in deep sleep etc..

Though, as I am not using all functionality, and some apps give a (very small) security risc, I am still disabling them.

So use these examples for your own setup if you want, though do not expect much better battery life, a faster system or whatever as the LOS itself is that good optimised that even tweaking will not give much extra juice.

For battery life:
  • try a system without Google Play Services. I am doing this for more then 10 years now for privacy and battery reasons. And yes, sometimes you have to search for an app working without GPS, though for me it is worth the effort, knowing that Google is not in between everything AND battery life is much better as not everything is synced at background, connections are not kept open etc..
  • set your screen to 60Hz refresh (also max refresh); screen is still one of the things using most of battery for normal usage (socials, browsing, email)
  • switch off location when you are not using navigation or other apps needing location.
  • switch off bluetooth when not used
And in fact; that's all I am doing (and the tweak scripts in post 1-5).

Enjoy!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    THE ADB TWEAK SCRIPT I AM USING IN ADB ROOT MODE:

    For who wants to use some additional adb tweaks; it is possible to do this by enabling adb and adb root in your developer settings.

    The script below is a script I am using after every update. After booting the system, You can enable adb and adb-root in developer settings, run the script, reboot and afterwards disable adb again.

    I run this script for:
    • restricting some system apps
    • disabling some system apps
    • Restricting user apps
    • giving the minimum extra app ops for some specified apps
    • trimming caches, running dexopt optimisation
    • optimising some system settings for battery
    Be careful using a setup like this as I am NOT using any Google Play Services, Google Play Store etc...
    May be the script can be helpful to make something for yourself with your own setup and your own modified settings.

    Note:
    Script is used as a .bat file on a pc running Windows 11. So no bash, though a Windows batch file.

    Code:
    @echo off
    Setlocal EnableExtensions EnableDelayedExpansion
    color 17
    cls
    
    ::------------------------------------------------------------------------------
    :: Moto G100 Tweak Script
    :: This script is being used after updating and reboot, with adb root enabled in developer settings of the LOS system
    ::
    :: SETUP:
    :: Device: Motorola Moto G100
    :: Android: Lineage OS 23.2 (Android Version 16), No Google Play Services or microG
    :: Scripts: Windows 11 computer with ADB to run bash-syntax script after updates and reboot, no grep available
    ::
    :: Last modified: 05-05-2026
    ::------------------------------------------------------------------------------
    
    for /f %%a in ('copy /Z "%~dpf0" nul') do set "CR=%%a"
    
    if not exist "debug" mkdir "debug" >nul 2>&1
    
    echo **********************************************
    echo *         MOTO G100 ADB TWEAK SCRIPT         *
    echo **********************************************
    echo.
    echo Important:
    echo - Enable adb + adb root in developer options
    echo - Connect device
    echo.
    pause
    echo.
    
    adb kill-server >nul 2>&1
    adb start-server
    adb wait-for-device
    
    :: ************************************************
    :: STEP 1: DEVICE SCHECK
    :: ************************************************
    
    :CHECK_DEVICE
    set "DEVICE_FOUND="
    for /f "skip=1 tokens=1" %%A in ('adb devices') do (
        if "%%A" NEQ "" if NOT "%%A"=="List" set DEVICE_FOUND=1
    )
    
    if not defined DEVICE_FOUND (
        <nul set /p ="Waiting for device...!CR!"
        timeout /t 1 /nobreak >nul
        goto CHECK_DEVICE
    )
    
    adb root >nul 2>&1
    adb wait-for-device root >nul 2>&1
    
    adb shell whoami | findstr /i root >nul || (
        echo WARNING: adb root not active
        timeout /t 5
    )
    
    echo.
    pause
    echo.
    
    :: First dump package list
    
    adb shell pm list packages -s  > debug/packagelist_system.txt
    adb shell pm list packages -3  > debug/packagelist_user.txt
    
    :: ************************************************
    :: STEP 2: SYSTEM DISABLE LIST
    :: ************************************************
    
    echo | set /p=Disabling system apps.................
    
    set dis[0]=com.android.apps.tag
    set dis[1]=com.android.bips
    set dis[2]=com.android.bluetoothmidiservice
    set dis[3]=com.android.bookmarkprovider
    set dis[4]=com.android.calllogbackup
    set dis[5]=com.android.captiveportallogin
    set dis[6]=com.android.cellbroadcastreceiver
    set dis[7]=com.android.cellbroadcastreceiver.module
    set dis[8]=com.android.cellbroadcastservice
    set dis[9]=com.android.companiondevicemanager
    set dis[10]=com.android.devicediagnostics
    set dis[11]=com.android.dreams.basic
    set dis[12]=com.android.dreams.phototable
    set dis[13]=com.android.dynsystem
    set dis[14]=com.android.egg
    set dis[15]=com.android.gallery3d
    set dis[16]=com.android.htmlviewer
    set dis[17]=com.android.inputdevices
    set dis[18]=com.android.localtransport
    set dis[19]=com.android.pacprocessor
    set dis[20]=com.android.printservice.recommendation
    set dis[21]=com.android.printspooler
    set dis[22]=com.android.sharedstoragebackup
    set dis[23]=com.android.simappdialog
    set dis[24]=com.android.statementservice
    set dis[25]=com.android.stk
    set dis[26]=com.android.vpndialogs
    set dis[27]=com.android.wallpaper.livepicker
    set dis[28]=com.android.wallpaperbackup
    set dis[29]=com.stevesoltys.seedvault
    set dis[30]=org.lineageos.audiofx
    set dis[31]=org.lineageos.camelot
    set dis[32]=org.lineageos.glimpse
    set dis[33]=org.lineageos.jelly
    set dis[34]=org.lineageos.twelve
    set dis[35]=org.lineageos.updater
    
    set DIS_COUNT=35
    
    for /L %%i in (0,1,!DIS_COUNT!) do (
        set "pkg=!dis[%%i]!"
        adb shell dumpsys deviceidle whitelist -!pkg! >nul 2>&1
        adb shell pm disable !pkg! >nul 2>&1
        adb shell am force-stop !pkg! >nul 2>&1
        adb shell pm clear !pkg! >nul 2>&1
    )
    
    echo. done
    
    :: ************************************************
    :: STEP 3: SYSTEM LAYER (profile-based)
    :: ************************************************
    
    echo | set /p=Applying system layer settings........
    
    :: Relevante AppOps voor ignore (privacy & batterij)
    set "ops=ACTIVITY_RECOGNITION ACCESS_MEDIA_LOCATION MONITOR_LOCATION MONITOR_HIGH_POWER_LOCATION CAMERA RECORD_AUDIO MUTE_MICROPHONE READ_EXTERNAL_STORAGE WRITE_EXTERNAL_STORAGE SYSTEM_ALERT_WINDOW WRITE_SETTINGS VIBRATE"
    
    :: Kritieke systeemapps die we NIET willen beperken
    set CRIT_SYS[0]=com.android.dialer
    set CRIT_SYS[1]=com.android.permissioncontroller
    set CRIT_SYS[2]=com.android.phone
    set CRIT_SYS[3]=com.android.providers.blockednumber
    set CRIT_SYS[4]=com.android.providers.contacts
    set CRIT_SYS[5]=com.android.providers.telephony
    set CRIT_SYS[6]=com.android.server.telecom
    set CRIT_SYS[7]=com.android.systemui
    set CRIT_SYS[8]=com.qualcomm.qti.telephonyservice
    set CRIT_SYS[9]=org.codeaurora.ims
    
    set CRIT_COUNT=9
    
    :: Loop over alle system apps
    for /f "tokens=2 delims=:" %%A in ('adb shell pm list packages -s') do (
        set "pkg=%%A"
        call set "pkg=%%pkg:package:=%%"
        set "SKIP=false"
    
        :: 1. Reset en ops-ignore in één call
        set "cmdline="
        for %%O in (!ops!) do set "cmdline=!cmdline! %%O ignore"
        adb shell cmd appops reset !pkg! >nul 2>&1
        adb shell cmd appops set !pkg!!cmdline! >nul 2>&1
    
        :: 2. Beperk apps verder die niet in de kritische lijst staan
        for /L %%i in (0,1,!CRIT_COUNT!) do (
            if "!pkg!"=="!CRIT_SYS[%%i]!" set "SKIP=true"
        )
        if "!SKIP!"=="false" (
            adb shell cmd appops set !pkg! SYSTEM_ALERT_WINDOW ignore >nul 2>&1
            adb shell cmd appops set !pkg! USE_FULL_SCREEN_INTENT ignore >nul 2>&1
        )
    
        :: Korte timeout om device niet te overloaden
        timeout /t 0 /nobreak >nul
    )
    
    :: Hard-allow voor telefoon core
    for %%P in (
        com.android.phone
        com.android.server.telecom
        com.android.systemui
        com.android.dialer
    ) do (
        adb shell cmd appops set %%P ^
            POST_NOTIFICATION allow ^
            RUN_IN_BACKGROUND allow ^
            SHOW_WHEN_LOCKED allow ^
            START_FOREGROUND allow ^
            SYSTEM_ALERT_WINDOW allow ^
            TURN_SCREEN_ON allow ^
            USE_FULL_SCREEN_INTENT allow ^
            WAKE_LOCK allow >nul 2>&1
    )
    
    :: Hard-allow i.v.m. klok & alarm
    adb shell cmd appops set com.android.deskclock ^
        ACCESS_NOTIFICATION_POLICY allow ^
        POST_NOTIFICATION allow ^
        RUN_ANY_IN_BACKGROUND allow ^
        RUN_IN_BACKGROUND allow ^
        SHOW_WHEN_LOCKED allow ^
        START_FOREGROUND allow ^
        SYSTEM_ALERT_WINDOW allow ^
        TURN_SCREEN_ON allow ^
        USE_FULL_SCREEN_INTENT allow ^
        WAKE_LOCK allow >nul 2>&1
    
    :: Hard-allow voor Berichten/SMS
    adb shell cmd appops set com.android.messaging ^
        POST_NOTIFICATION allow ^
        RUN_IN_BACKGROUND allow ^
        START_FOREGROUND allow ^
        WAKE_LOCK allow >nul 2>&1
    
    :: Hard-allow i.v.m. kalender reminders
    adb shell cmd appops set org.lineageos.etar ^
        POST_NOTIFICATION allow ^
        RUN_IN_BACKGROUND allow ^
        START_FOREGROUND allow ^
        WAKE_LOCK allow >nul 2>&1
    
    :: Kritieke netwerk services (VoLTE/Data stabiliteit)
    for %%P in (
        com.qualcomm.qti.telephonyservice
        org.codeaurora.ims
        vendor.qti.imsrcs
    ) do (
        adb shell cmd appops set %%P ^
            RUN_IN_BACKGROUND allow ^
            START_FOREGROUND allow ^
            WAKE_LOCK allow >nul 2>&1
    )
    
    :: Extra beperken systeem apps die batterij kunnen lekken
    for %%P in (com.qualcomm.qti.cne com.qualcomm.qti.uimGbaApp com.qualcomm.timeservice) do (
        adb shell cmd appops set %%P RUN_IN_BACKGROUND ignore >nul 2>&1
        adb shell cmd appops set %%P WAKE_LOCK ignore >nul 2>&1
    )
    
    echo. done
    
    :: ************************************************
    :: STEP 4: USER LAYER
    :: ************************************************
    
    echo | set /p=Applying user layer settings..........
    
    :: Alle werkende AppOps voor Android 16 (gecorrigeerd: geen BLUETOOTH_ADVERTISE of MANAGE_MEDIA)
    set "ops=POST_NOTIFICATION SYSTEM_ALERT_WINDOW REQUEST_INSTALL_PACKAGES RUN_IN_BACKGROUND RUN_ANY_IN_BACKGROUND WAKE_LOCK VIBRATE WIFI_SCAN BLUETOOTH_SCAN BLUETOOTH_CONNECT RECORD_AUDIO CAMERA FINE_LOCATION COARSE_LOCATION MONITOR_LOCATION MONITOR_HIGH_POWER_LOCATION READ_CLIPBOARD GET_USAGE_STATS BODY_SENSORS NEARBY_DEVICES UWB_RANGING ACTIVITY_RECOGNITION READ_MEDIA_IMAGES READ_MEDIA_VIDEO READ_MEDIA_AUDIO MANAGE_EXTERNAL_STORAGE USE_FULL_SCREEN_INTENT START_FOREGROUND ACCESS_NOTIFICATION_POLICY REQUEST_IGNORE_BATTERY_OPTIMIZATIONS READ_PHONE_STATE"
    
    :: Per-package profiles
    ::
    :: App stores and saving apps
    set "profile_com.aefyr.sai.fdroid=REQUEST_INSTALL_PACKAGES"
    set "profile_com.aurora.store=POST_NOTIFICATION REQUEST_INSTALL_PACKAGES READ_CLIPBOARD"
    set "profile_com.machiav3lli.fdroid=POST_NOTIFICATION REQUEST_INSTALL_PACKAGES READ_CLIPBOARD"
    ::
    :: Banking
    set "profile_<BANKING_APP_NAME>=READ_CLIPBOARD CAMERA"
    ::
    :: Internet, email and other communications
    set "profile_com.brave.browser=READ_CLIPBOARD POST_NOTIFICATION"
    set "profile_com.fjsoft.myphoneexplorer.client=READ_CLIPBOARD POST_NOTIFICATION"
    set "profile_com.kaching.merchant=POST_NOTIFICATION"
    set "profile_net.thunderbird.android=RUN_IN_BACKGROUND RUN_ANY_IN_BACKGROUND READ_CLIPBOARD"
    ::
    :: Files and Multimedia
    set "profile_com.sonos.acr2=WIFI_SCAN FINE_LOCATION COARSE_LOCATION"
    set "profile_org.fossify.gallery=READ_MEDIA_IMAGES READ_MEDIA_VIDEO"
    set "profile_org.videolan.vlc=RUN_IN_BACKGROUND RUN_ANY_IN_BACKGROUND POST_NOTIFICATION READ_MEDIA_AUDIO READ_MEDIA_VIDEO"
    set "profile_net.sjava.officereader="
    ::
    :: Navigation, parking, car related
    set "profile_app.organicmaps=RUN_IN_BACKGROUND RUN_ANY_IN_BACKGROUND WAKE_LOCK START_FOREGROUND READ_CLIPBOARD POST_NOTIFICATION FINE_LOCATION COARSE_LOCATION MONITOR_LOCATION MONITOR_HIGH_POWER_LOCATION"
    set "profile_com.oneshoe.yellowbrick=POST_NOTIFICATION"
    set "profile_com.waze=RUN_IN_BACKGROUND RUN_ANY_IN_BACKGROUND WAKE_LOCK START_FOREGROUND READ_CLIPBOARD POST_NOTIFICATION FINE_LOCATION COARSE_LOCATION MONITOR_LOCATION MONITOR_HIGH_POWER_LOCATION"
    set "profile_net.osmand.plus=RUN_IN_BACKGROUND RUN_ANY_IN_BACKGROUND WAKE_LOCK START_FOREGROUND READ_CLIPBOARD POST_NOTIFICATION FINE_LOCATION COARSE_LOCATION MONITOR_LOCATION MONITOR_HIGH_POWER_LOCATION"
    ::
    :: Socials
    set "profile_com.facebook.katana=READ_CLIPBOARD POST_NOTIFICATION"
    set "profile_com.facebook.orca=READ_CLIPBOARD POST_NOTIFICATION"
    set "profile_com.instagram.android=READ_CLIPBOARD POST_NOTIFICATION"
    set "profile_com.whatsapp=RUN_IN_BACKGROUND RUN_ANY_IN_BACKGROUND POST_NOTIFICATION RECORD_AUDIO CAMERA READ_CLIPBOARD"
    set "profile_org.forkgram.messenger=POST_NOTIFICATION RECORD_AUDIO CAMERA READ_CLIPBOARD"
    set "profile_org.vinaygopinath.launchchat=READ_CLIPBOARD"
    ::
    :: Miscellaneous
    set "profile_me.hackerchick.catima="
    set "profile_nl.anwb.energie="
    set "profile_org.breezyweather="
    set "profile_org.woheller69.whobird="
    
    :: Kritieke apps voor Working Set
    set "WS_APPS=com.whatsapp net.thunderbird.android app.organicmaps com.waze net.osmand.plus"
    
    for /f "tokens=2 delims=:" %%A in ('adb shell pm list packages -3') do (
        set "pkg=%%A"
        set "pkg=!pkg: =!"
    
        call set "allowed_ops=%%profile_!pkg!%%"
    
        :: baseline deny
        for %%O in (!ops!) do (
            adb shell cmd appops set !pkg! %%O ignore >nul 2>&1
        )
    
        :: profile override
        if "!allowed_ops!"=="" (
            rem no-op (fully restricted)
        ) else (
            for %%O in (!allowed_ops!) do (
                adb shell cmd appops set !pkg! %%O allow >nul 2>&1
            )
        )
    
        :: standby handling
        set "IS_WS=false"
        for %%W in (!WS_APPS!) do if "!pkg!"=="%%W" set "IS_WS=true"
    
        if "!IS_WS!"=="true" (
            adb shell am set-standby-bucket !pkg! working_set >nul 2>&1
        ) else (
            adb shell am set-standby-bucket !pkg! restricted >nul 2>&1
            adb shell cmd jobscheduler cancel-all !pkg! >nul 2>&1
        )
    
        adb shell am force-stop !pkg! >nul 2>&1
    )
    
    echo. done
    
    :: ************************************************
    :: STEP 5: AOSP 16 BATTERY OPTIMISATION
    :: ************************************************
    
    echo | set /p=Applying AOSP battery optimisations...
    
    :: 1. Background / App behavior control (HIGH IMPACT)
    adb shell settings put global app_restriction_enabled 1
    adb shell settings put global app_standby_enabled 1
    adb shell settings put global fgs_throttle_time_ms 60000
    adb shell settings put global background_restriction_enabled 1
    adb shell settings put global adaptive_battery_management_enabled 1
    
    :: 2. Idle / Doze behavior
    adb shell dumpsys deviceidle enable >nul 2>&1
    
    :: 3. Process / memory pressure
    adb shell device_config put activity_manager max_phantom_processes 0 >nul 2>&1
    
    :: 4. Display power savings (REAL IMPACT)
    adb shell settings put system peak_refresh_rate 60.0
    adb shell settings put system min_refresh_rate 60.0
    
    :: 5. UI / haptics energy reduction
    adb shell settings put system haptic_feedback_enabled 0
    adb shell settings put global touch_feedback_enabled 0
    
    echo. done
    
    :: ************************************************
    :: STEP 6: CACHE + MAINTENANCE
    :: ************************************************
    
    echo | set /p=Cache trimming and compilation........
    
    adb shell cmd package compile --reset -a >nul 2>&1
    adb shell pm trim-caches 128G >nul 2>&1
    adb shell pm gc >nul 2>&1
    adb shell rm -rf /data/dalvik-cache/* >nul 2>&1
    adb shell cmd package bg-dexopt-job >nul 2>&1
    adb shell sm fstrim >nul 2>&1
    
    echo. done
    
    :: ************************************************
    :: STEP 7: BATTERY RESET
    :: ************************************************
    
    echo | set /p=Cleaning battery stats................
    
    adb shell dumpsys batterystats --reset >nul 2>&1
    adb shell rm /data/system/batterystats.bin >nul 2>&1
    
    echo. done
    
    :: ************************************************
    :: END
    :: ************************************************
    
    echo.
    echo Tweaks completed
    echo Rebooting...
    echo.
    
    pause
    adb reboot
    
    :EXIT
    color 0F
    cls
    endlocal
    1
    After extensive reading and testing, my conclusion is that it is not possible to tweak a running system with not triggering SELinux. For example /vendor is a dynamic partition and every change will brick your LOS installation.

    Though, for letting banking apps work or tweaking your system, you can modify the build.prop in /system, remove system apps if you want, replace fonts etc..., using the LOS recovery and some scripts (or straight from adb).

    So, this is what I am doing now:

    Reboot into (LOS) recovery and then in the recovery menu:
    Goto “Advanced”
    Mount /system
    Enable adb

    From your pc with adb etc.. installed to let most banking apps work without issues:
    Code:
    adb shell mount -o rw,remount /mnt/system
    adb shell sed -i 's/ro.debuggable=1/ro.debuggable=0/g' /mnt/system/system/build.prop
    adb shell sed -i 's/ro.build.type=userdebug/ro.build.type=user/g' /mnt/system/system/build.prop
    adb reboot

    That's it!

    The posts below give an idea about how I further make modifications to build.prop settings, remove some apps, replace fonts and some other things too.

    Please note:
    No support is given and you are completely on your own using these files for your own setup.

    It is also appropriate to issue a warning:
    Be careful with changing or deleting files on /vendor as it can brick your LOS installation
    1
    THE TWEAK SCRIPT IN RECOVERY MODE:

    The script below is a script I am using after every update.

    I am using the approach in previous post and then run this script for:
    • modification of build.prop
    • replacing some font files
    • copying build.prop for debugging
    Be careful using a setup like this as I am NOT using any Google Play Services, Google Play Store etc...
    May be the script can be helpful to make something for yourself with your own setup and your own modified settings.

    Note:
    Script is used as a .bat file on a pc running Windows 11. So no bash, though a Windows batch file.

    Code:
    @echo off
    Setlocal EnableDelayedExpansion
    color 17
    cls
    
    :: Moto G100 Tweak Script
    :: Used after updating (adb sideload LineageOS update), and rebooting in recovery
    ::
    :: SETUP:
    :: Device:  Motorola Moto G100
    :: Android: Lineage OS 23.2 (Android Version 16), No Google Play Services
    :: Scripts:  Windows 11 computer with ADB to run bash-syntax script after updates and reboot, no grep available
    ::
    :: Last modified: 05-05-2026
    
    echo ***********************************************
    echo *         MOTO G100 ADB TWEAK SCRIPT          *
    echo ***********************************************
    echo.
    echo Important:
    echo - Boot into recovery
    echo - Goto advanced
    echo - Mount /system,
    echo - Enable adb
    echo.
    pause
    echo.
    
    adb devices
    
    :: *************************************************
    :: STEP 1: MOUNTING
    :: *************************************************
    
    echo | set /p=Mount necessary partitions............
    
    adb shell mkdir /mnt/system > nul 2>&1
    adb shell mount -o rw,remount /mnt/system > nul 2>&1
    adb shell mount /dev/block/dm-7 /mnt/system > nul 2>&1
    
    echo. done
    echo.
    
    pause
    
    echo.
    echo Implementing tweaks:
    
    :: *************************************************
    :: STEP 2: REPLACE FONTS
    :: *************************************************
    
    echo | set /p=Use high dpi Roboto font files........
    
    for %%F in (RobotoFlex-Regular.ttf Roboto-Regular.ttf RobotoStatic-Regular.ttf) do (
        adb push ./fonts/%%F /mnt/system/system/fonts >nul 2>&1
        adb shell chmod 644 /mnt/system/system/fonts/%%F >nul 2>&1
    )
    
    echo. done
    
    :: *************************************************
    :: STEP 3: BUILD.PROP
    :: *************************************************
    
    echo | set /p=Modify build.prop file................
    
    :: Debuggable status
    adb shell sed -i '/^ro.debuggable/d' /mnt/system/system/build.prop
    adb shell sed -i '/^ro.force.debuggable/d' /mnt/system/system/build.prop
    
    adb shell sed -i -e '$aro.debuggable=0' /mnt/system/system/build.prop
    adb shell sed -i -e '$aro.force.debuggable=0' /mnt/system/system/build.prop
    
    :: Build type & tags
    adb shell sed -i '/^ro.build.tags/d' /mnt/system/system/build.prop
    adb shell sed -i '/^ro.build.type/d' /mnt/system/system/build.prop
    adb shell sed -i '/^ro.system.build.tags/d' /mnt/system/system/build.prop
    adb shell sed -i '/^ro.system.build.type/d' /mnt/system/system/build.prop
    adb shell sed -i '/^ro.build.flavor/d' /mnt/system/system/build.prop
    
    adb shell sed -i -e '$aro.build.tags=release-keys' /mnt/system/system/build.prop
    adb shell sed -i -e '$aro.build.type=user' /mnt/system/system/build.prop
    adb shell sed -i -e '$aro.system.build.tags=release-keys' /mnt/system/system/build.prop
    adb shell sed -i -e '$aro.system.build.type=user' /mnt/system/system/build.prop
    adb shell sed -i -e '$aro.build.flavor=lineage_nio-user' /mnt/system/system/build.prop
    
    :: Bootloader & Verified Boot
    adb shell sed -i '/^ro.boot.vbmeta.device_state/d' /mnt/system/system/build.prop
    adb shell sed -i '/^ro.boot.verifiedbootstate/d' /mnt/system/system/build.prop
    
    adb shell sed -i -e '$aro.boot.vbmeta.device_state=locked' /mnt/system/system/build.prop
    adb shell sed -i -e '$aro.boot.verifiedbootstate=green' /mnt/system/system/build.prop
    
    :: Interaction & Notifications
    adb shell sed -i '/^persist.adb.notify/d' /mnt/system/system/build.prop
    
    adb shell sed -i -e '$apersist.adb.notify=0' /mnt/system/system/build.prop
    
    :: User management
    adb shell sed -i '/^fw.power_user_switcher/d' /mnt/system/system/build.prop
    adb shell sed -i '/^fw.show_hidden_users/d' /mnt/system/system/build.prop
    adb shell sed -i '/^fw.show_multiuserui/d' /mnt/system/system/build.prop
    
    adb shell sed -i -e '$afw.power_user_switcher=0' /mnt/system/system/build.prop
    adb shell sed -i -e '$afw.show_hidden_users=0' /mnt/system/system/build.prop
    adb shell sed -i -e '$afw.show_multiuserui=0' /mnt/system/system/build.prop
    
    :: Battery
    adb shell sed -i '/^persist.sys.composition.type/d' /mnt/system/system/build.prop
    adb shell sed -i '/^pm.sleep_mode/d' /mnt/system/system/build.prop
    
    adb shell sed -i -e '$apersist.sys.composition.type=gpu' /mnt/system/system/build.prop
    adb shell sed -i -e '$apm.sleep_mode=1' /mnt/system/system/build.prop
    
    :: Remove old ineffective settings
    adb shell sed -i '/^debug.hwui.skia_atrace_enabled/d' /mnt/system/system/build.prop
    adb shell sed -i '/^persist.sys.force_sw_gles/d' /mnt/system/system/build.prop
    adb shell sed -i '/^ro.launcher.blur.appLaunch/d' /mnt/system/system/build.prop
    adb shell sed -i '/^ro.surface_flinger.game_default_frame_rate_override/d' /mnt/system/system/build.prop
    
    adb shell sed -i '/^#/d' /mnt/system/system/build.prop
    
    adb shell chmod 644 /mnt/system/system/build.prop
    
    :: Force sync so we are sure everything is written
    adb shell sync
    
    :: For debugging copy build.prop file
    del /F build.prop > nul 2>&1
    del /F debug/build.prop > nul 2>&1
    
    adb pull /mnt/system/system/build.prop > nul 2>&1
    move build.prop debug/build.prop > nul 2>&1
    
    echo. done
    
    :: *************************************************
    :: STEP 4: UNMOUNT AND REBOOT
    :: *************************************************
    
    echo | set /p=Properly unmount partitions...........
    
    adb shell umount /mnt/system > nul 2>&1
    
    echo. done
    echo.
    echo Tweaks implemented, going to reboot...
    echo.
    
    pause
    
    adb reboot
    
    color 0F
    cls
    1
    <removed post as not needed anymore>
    1
    <removed post as not needed anymore>