FORUMS
Remove All Ads from XDA

[MOD][TWRP] LOS16 Tweak script - Please share yours also![9.0][3/3T][24/07/19]

n/a posts
Thanks Meter: 0
 
By GuestK00264, Guest on 25th July 2019, 03:13 PM
Post Reply Email Thread
GuestK00264
17th September 2019, 07:16 PM |#11  
Guest
Thanks Meter: 0
 
More
Quote:
Originally Posted by anupritaisno1

Fixed it some more

Code:
<cut>

I compared both scripts, but why did you remove the first two lines?
Further you added quotes for the echo command:
Code:
echo "$nstr" > $fname
which is indeed a good one; thanks!
Further any changes?
GuestK00264
27th September 2019, 05:59 AM |#12  
Guest
Thanks Meter: 0
 
More
The latest script for Pie I guess, seeing a lot of Android 10 activity and always been an early adapter....

Some changes:
  • Switched back to LibreChair as launcher. Very nice option is the ability to shape your own icons (see screenshot)
  • Really like Apkgrabber and Aurora, so using the combi Aurora Droid, Aurora Store (wo automatic update) and Apkgrabber now instead of GPS.
  • Added New Pipe and Transistor to my apps but has nothing to do with the basic setup
Setup still:
  • Firmware 9.05
  • TWRP from anupritaisno1
  • Latest Lineage Nightly 16.0 (Pie)
  • Latest Flash Kernel (3.18.140)
Further the tweak and cleanup script is pretty stable now.
Nothing to optimise or other tweaks I want to implement, so here the latest lineage.sh (also added as attachment):
Code:
#!/sbin/sh
#
# Script by 2Tweak
# Last modified 21-09-2019

################################################

# First setup
clear

echo
echo "##########################################"
echo "#         LINEAGE CLEANUP SCRIPT         #"
echo "##########################################"
echo

mount -o remount,rw /cache
mount -o remount,rw /data
mount -o remount,rw /sdcard
mount -o remount,rw /system

################################################

echo -n "Shrinking ROM to the bare minimum..."

# app list to remove
applist="
AntHalService
AudioFX
BackupRestoreConfirmation
BasicDreams
BluetoothMidiService
BookmarkProvider
BuiltInPrintService
Calendar
CaptivePortalLogin
CNEService
CallLogBackup
CellBroadcastReceiver
CompanionDeviceManager
com.qualcomm.location
Contacts
CtsShimPrebuilt
CtsShimPrivPrebuilt
Development
DocumentsUI
EasterEgg
Eleven
Email
ExactCalculator
Exchange2
Gallery2
HTMLViewer
InputDevices
Jelly
LineageSetupWizard
LiveWallpapersPicker
LockClock
ManagedProvisioning
OneTimeInitializer
OneplusDoze
OneplusPocketMode
PhotoTable
PrintRecommendationService
SharedStorageBackup
SimAppDialog
Stk
Tag
Terminal
Traceur
TrebuchetQuickStep
Updater
UserDictionaryProvider
VpnDialogs
WallpaperBackup
WallpaperCropper
WeatherProvider
WfdService
"

for appname in $applist
do
  if [ -e /system/app/"$appname" ]; then
    chmod -R 777 /system/app/"$appname"
    rm -rf /system/app/"$appname"
  fi
  if [ -e /system/priv-app/"$appname" ]; then
    chmod -R 777 /system/priv-app/"$appname"
    rm -rf /system/priv-app/"$appname"
  fi
done

echo " done!"

################################################

echo -n "Removing unneeded and junk files...."

# file list to cleanup
filelist="
/cache
/data/anr
/data/backup
/data/cache
/data/dalvik-cache
/data/lineageos_updates
/data/local/tmp
/data/lost+found
/data/misc/bootstat
/data/ota
/data/ota_package
/data/resource-cache
/data/system/batterystats.bin
/data/system/dropbox
/data/system/graphicsstats
/data/system/install_sessions.xml
/data/system/last-fstrim
/data/system/package_cache
/data/system/procstats
/data/system/syncmanager-log
/data/system/uiderrors.txt
/data/system/usagestats/0/daily
/data/system/usagestats/0/monthly
/data/system/usagestats/0/weekly
/data/system/usagestats/0/yearly
/data/tombstones
/system/bin/bootanimation
/system/media/bootanimation.zip
"

for filename in $filelist
do
  if [ -d "$filename" ]; then
    chmod -R 777 "$filename"
    rm -rf "${filename:?}"/*
  fi
  if [ -f "$filename" ]; then
    chmod 777 "$filename"
    rm -f "$filename"
  fi
done

# Remove bak, log, tmp files
find /data -iname "*.bak" -iname "*.log" -iname "*.tmp" -iname "*.odex" -iname "*.vdex" -type f -exec rm -f {} +
find /system -iname "*.bak" -iname "*.log" -iname "*.tmp" -type f -exec rm -f {} +

# Reduce fonts to the bare minimum
find /system/fonts ! -iname "*roboto*.*" ! -name "DroidSansMono.ttf" ! -name "NotoColorEmoji.ttf" -name "NotoSansSymbols-Regular-Subsetted*.ttf" -type f -exec rm -f {} +

# Some other useless system related files
rm -f /data/stock_boot_*.img.gz
rm -rf /system/vendor/overlay

echo " done!"

################################################

echo -n "Cleaning app data..................."

for i in $(ls /data/data/)
do
  if [ -e /data/data/"$i"/cache ]; then
    chmod -R 777 /data/data/"$i"/cache
    rm -rf /data/data/"$i"/cache/*
  fi
  if [ -e /data/data/"$i"/code_cache ]; then
    chmod -R 777 /data/data/"$i"/code_cache
    rm -rf /data/data/"$i"/code_cache/*
  fi
  if [ -e /data/data/"$i"/files/.Fabric ]; then
    chmod -R 777 /data/data/"$i"/files/.Fabric
    rm -rf /data/data/"$i"/files/.Fabric/*
  fi
  if [ -e /data/data/"$i"/files/cache ]; then
    chmod -R 777 /data/data/"$i"/files/cache
    rm -rf /data/data/"$i"/files/cache/*
  fi
  if [ -e /data/data/"$i"/app_webview ]; then
    chmod -R 777 /data/data/"$i"/app_webview
    # keep cookies for webapp logins
    if [ -e /data/data/"$i"/app_webview/Cookies ]; then
      mv -f /data/data/"$i"/app_webview/Cookies /data/local/tmp/"$i".Cookies
    fi
    rm -rf /data/data/"$i"/app_webview/*
    if [ -e /data/local/tmp/"$i".Cookies ]; then
      mv -f /data/local/tmp/"$i".Cookies /data/data/"$i"/app_webview/Cookies
    fi
  fi
done

for k in $(ls /sdcard/Android/data/)
do
  if [ -e /sdcard/Android/data/"$k"/cache ]; then
    chmod -R 777 /sdcard/Android/data/"$k"/cache
    rm -rf /sdcard/Android/data/"$k"/cache/*
  fi
done

echo " done!"

################################################

echo -n "Cleaning app oat files.............."

for j in $(ls /data/app/)
do
  if [ -e /data/app/"$j"/oat/arm ]; then
    chmod -R 777 /data/app/"$j"/oat/arm
    rm -rf /data/app/"$j"/oat/arm/*
  fi
  if [ -e /data/app/"$j"/oat/arm64 ]; then
    chmod -R 777 /data/app/"$j"/oat/arm64
    rm -rf /data/app/"$j"/oat/arm64/*
  fi
done

echo " done!"

################################################

echo -n "Remove some app specific files......"

# App specific
rm -rf /data/data/com.abnamro.nl.mobile.payments/app_dex/oat/arm64/*
rm -rf /data/data/org.fdroid.fdroid/files/*.apk
rm -rf /data/data/org.videolan.vlc/app_vlc/*

echo " done!"

################################################

echo -n "Optimizing app databases............"

# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
  sqlite3 "$i" "VACUUM;" 2>/dev/null
  sqlite3 "$i" "REINDEX;" 2>/dev/null
done

for i in $(find /sdcard -iname "*.db" -type f)
do
  sqlite3 "$i" "VACUUM;" 2>/dev/null
  sqlite3 "$i" "REINDEX;" 2>/dev/null
done

echo " done!"

################################################

echo -n "Remove live display functionality..."

rm -f '/system/vendor/bin/hw/[email protected]'
rm -f '/system/vendor/etc/init/[email protected]'
fname="/system/vendor/etc/vintf/manifest.xml"

found=0
startstop=0
tstr=""
nstr=""
IFS=$'\n'
while read line
do
  if [[ "$line" == *'<hal'* ]]; then
    startstop=1
  elif [[ "$line" == *'</hal'* ]]; then
    startstop=2
  elif [[ "$line" == *'livedisplay'* ]]; then
    found=1
  fi
  if [ $startstop -eq 1 ]; then
    tstr="${tstr}\n${line}"
  elif [ $startstop -eq 2 ]; then
    tstr="${tstr}\n${line}"
    if [ $found -eq 0 ]; then
      nstr="${nstr}${tstr}"
    else
      found=0
    fi
    tstr=""
    startstop=0
  else
    if [ "$nstr" == "" ]; then
      nstr="${line}"
    else
      nstr="${nstr}\n${line}"
    fi
  fi
done <"$fname"

echo "$nstr" > $fname

echo " done!"

################################################

echo -n "Remove empty directories............"

# Remove empty directories
find /data/data -type d -depth -exec rmdir {} + 2>/dev/null
find /sdcard -type d -depth -exec rmdir {} + 2>/dev/null

echo " done!"

################################################

echo -n "Setting log permissions read-only..."

chmod 000 /data/tombstones
chmod 000 /data/system/dropbox
chmod 000 /data/system/graphicsstats
chmod 000 /data/system/procstats
chmod 000 /data/system/usagestats/0/daily
chmod 000 /data/system/usagestats/0/weekly
chmod 000 /data/system/usagestats/0/monthly
chmod 000 /data/system/usagestats/0/yearly

echo " done!"

################################################

echo -n "Adding my build.prop settings......."

fname="/system/build.prop"
tmpvar=$(sed '/.*My settings.*/{s///;q;}' $fname | sed '$d')
echo "$tmpvar" > $fname
echo '
# My settings

# Disable multi user
fw.max_users=1
fw.show_multiuserui=0
fw.show_hidden_users=0
fw.power_user_switcher=0

# Disable logging
logcat.live=disable

# Disable boot animation
debug.sf.nobootanimation=1

# Disable USB debugging notification
persist.adb.notify=0

# Disable ring delay
ro.telephony.call_ring.delay=0
ring.delay=0

# Remove fps limit
debug.gr.swapinterval=0

# Disable dithering
persist.sys.use_dithering=0

# Disable scrolling cache
persist.sys.scrollingcache=4

# End of my settings
' >> $fname
chmod 644 $fname

echo " done!"

################################################

echo -n "Adding my gps.conf settings........."

rm -f /system/vendor/etc/gps.conf
touch /system/vendor/etc/gps.conf
echo '# My settings

# NTP Server - only one allowed!
NTP_SERVER=nl.pool.ntp.org

# Debug level
DEBUG_LEVEL=0

# End of my settings
' > /system/vendor/etc/gps.conf
chmod 644 /system/vendor/etc/gps.conf

echo " done!"

################################################

echo -n "Adding my userinit.sh settings......"

echo '#!/system/bin/sh
# My settings

# Optimize databases
for i in $(find /data -iname "*.db" -type f)
do
  sqlite3 $i "VACUUM;" 2>/dev/null
  sqlite3 $i "REINDEX;" 2>/dev/null
done

for i in $(find /storage/emulated/0 -iname "*.db" -type f)
do
  sqlite3 $i "VACUUM;" 2>/dev/null
  sqlite3 $i "REINDEX;" 2>/dev/null
done

# Instead of disabling fsync remount with higher fsync interval
mount -o remount,rw,commit=300 /data

# Enable power_efficient workqueue
chmod 666 /sys/module/workqueue/parameters/power_efficient
echo 1 > /sys/module/workqueue/parameters/power_efficient
chmod 444 /sys/module/workqueue/parameters/power_efficient

# Disable iostats
chmod 666 /sys/block/sda/queue/iostats
echo "0" > /sys/block/sda/queue/iostats
chmod 444 /sys/block/sda/queue/iostats

# When there, use Boeffla to disable some wakelocks
if [ -e /sys/devices/virtual/misc/boeffla_wakelock_blocker ]; then
  echo "IPA_WS;NETLINK;bms;netmgr_wl;qcom_rx_wakelock;sensor_SMD;wlan;wlan_extscan_wl;wlan_ipa;wlan_pno_wl;wlan_wow_wl" > /sys/devices/virtual/misc/boeffla_wakelock_blocker/wakelock_blocker
fi

# End of my settings
' > /data/local/userinit.sh
chmod 777 /data/local/userinit.sh

echo " done!"

 echo
As you probably know; use at your own risc!


---
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20190927-055803_Librechair.png
Views:	214
Size:	244.9 KB
ID:	4828997   Click image for larger version

Name:	Screenshot_20190927-055813_Librechair.jpg
Views:	214
Size:	144.9 KB
ID:	4828999   Click image for larger version

Name:	Screenshot_20190927-055819_Librechair.jpg
Views:	214
Size:	146.2 KB
ID:	4829001  
Attached Files
File Type: txt lineage.sh.txt - [Click for QR Code] (9.3 KB, 40 views)
The Following User Says Thank You to For This Useful Post: [ View ] Gift Ad-Free
GuestK00264
6th October 2019, 09:27 AM |#13  
Guest
Thanks Meter: 0
 
More
I am on NOS 10 at the moment and started with a new, in fact my old approach.
Not using Magisk or SuperSU and keeping it as default as possible.

Using adb to disable packages without removing, next step will be a short twrp cleanup script once a month for cache and other crap files.

Using the following bat file for disabling packages and setting some optimised doze settings:
Code:
:setup

@echo off
color 0A
cls

echo.
echo Connect device...
adb devices

:packages

echo.
echo Disable packages...

:: Tag
adb shell pm disable-user --user 0 com.android.apps.tag
adb shell am force-stop com.android.apps.tag
adb shell pm clear com.android.apps.tag

:: BackupRestoreConfirmation
adb shell pm disable-user --user 0 com.android.backupconfirm
adb shell am force-stop com.android.backupconfirm
adb shell pm clear com.android.backupconfirm

:: BuiltInPrintService
adb shell pm disable-user --user 0 com.android.bips
adb shell am force-stop com.android.bips
adb shell pm clear com.android.bips

:: BluetoothMidiService
adb shell pm disable-user --user 0 com.android.bluetoothmidiservice
adb shell am force-stop com.android.bluetoothmidiservice
adb shell pm clear com.android.bluetoothmidiservice

:: BookmarkProvider
adb shell pm disable-user --user 0 com.android.bookmarkprovider
adb shell am force-stop com.android.bookmarkprovider
adb shell pm clear com.android.bookmarkprovider

:: Calendar
adb shell pm disable-user --user 0 com.android.calendar
adb shell am force-stop com.android.calendar
adb shell pm clear com.android.calendar

:: CallLogBackup >> HAVE TO TEST!!
adb shell pm disable-user --user 0 com.android.calllogbackup
adb shell am force-stop com.android.calllogbackup
adb shell pm clear com.android.calllogbackup

:: CaptivePortalLogin
adb shell pm disable-user --user 0 com.android.captiveportallogin
adb shell am force-stop com.android.captiveportallogin
adb shell pm clear com.android.captiveportallogin

:: CellBroadcastReceiver
adb shell pm disable-user --user 0 com.android.cellbroadcastreceiver
adb shell am force-stop com.android.cellbroadcastreceiver
adb shell pm clear com.android.cellbroadcastreceiver

:: CompanionDeviceManager
adb shell pm disable-user --user 0 com.android.companiondevicemanager
adb shell am force-stop com.android.companiondevicemanager
adb shell pm clear com.android.companiondevicemanager

:: Contacts
adb shell pm disable-user --user 0 com.android.contacts
adb shell am force-stop com.android.contacts
adb shell pm clear com.android.contacts

:: CtsShimPrebuilt
adb shell pm disable-user --user 0 com.android.cts.ctsshim
adb shell am force-stop com.android.cts.ctsshim
adb shell pm clear com.android.cts.ctsshim

:: CtsShimPrivPrebuilt
adb shell pm disable-user --user 0 com.android.cts.priv.ctsshim
adb shell am force-stop com.android.cts.priv.ctsshim
adb shell pm clear com.android.cts.priv.ctsshim

:: DocumentsUI
adb shell pm disable-user --user 0 com.android.documentsui
adb shell am force-stop com.android.documentsui
adb shell pm clear com.android.documentsui

:: BasicDreams
adb shell pm disable-user --user 0 com.android.dreams.basic
adb shell am force-stop com.android.dreams.basic
adb shell pm clear com.android.dreams.basic

:: PhotoTable
adb shell pm disable-user --user 0 com.android.dreams.phototable
adb shell am force-stop com.android.dreams.phototable
adb shell pm clear com.android.dreams.phototable

:: DynamicSystemInstallationService
adb shell pm disable-user --user 0 com.android.dynsystem
adb shell am force-stop com.android.dynsystem
adb shell pm clear com.android.dynsystem

:: EasterEgg
adb shell pm disable-user --user 0 com.android.egg
adb shell am force-stop com.android.egg
adb shell pm clear com.android.egg

:: Email
adb shell pm disable-user --user 0 com.android.email
adb shell am force-stop com.android.email
adb shell pm clear com.android.email

:: ExternalStorageProvider
adb shell pm disable-user --user 0 com.android.externalstorage
adb shell am force-stop com.android.externalstorage
adb shell pm clear com.android.externalstorage

:: Gallery2
adb shell pm disable-user --user 0 com.android.gallery3d
adb shell am force-stop com.android.gallery3d
adb shell pm clear com.android.gallery3d

:: InputDevices
adb shell pm disable-user --user 0 com.android.inputdevices
adb shell am force-stop com.android.inputdevices
adb shell pm clear com.android.inputdevices

:: DisplayCutoutEmulationCorner
adb shell pm disable-user --user 0 com.android.internal.display.cutout.emulation.corner
adb shell am force-stop com.android.internal.display.cutout.emulation.corner
adb shell pm clear com.android.internal.display.cutout.emulation.corner

:: DisplayCutoutEmulationDouble
adb shell pm disable-user --user 0 com.android.internal.display.cutout.emulation.double
adb shell am force-stop com.android.internal.display.cutout.emulation.double
adb shell pm clear com.android.internal.display.cutout.emulation.double

:: DisplayCutoutEmulationTall
adb shell pm disable-user --user 0 com.android.internal.display.cutout.emulation.tall
adb shell am force-stop com.android.internal.display.cutout.emulation.tall
adb shell pm clear com.android.internal.display.cutout.emulation.tall

:: LocalTransport
adb shell pm disable-user --user 0 com.android.localtransport
adb shell am force-stop com.android.localtransport
adb shell pm clear com.android.localtransport

:: ManagedProvisioning
adb shell pm disable-user --user 0 com.android.managedprovisioning
adb shell am force-stop com.android.managedprovisioning
adb shell pm clear com.android.managedprovisioning

:: Music
adb shell pm disable-user --user 0 com.android.music
adb shell am force-stop com.android.music
adb shell pm clear com.android.music

:: MusicFX
adb shell pm disable-user --user 0 com.android.musicfx
adb shell am force-stop com.android.musicfx
adb shell pm clear com.android.musicfx

:: NfcNci
adb shell pm disable-user --user 0 com.android.nfc
adb shell am force-stop com.android.nfc
adb shell pm clear com.android.nfc

:: OneTimeInitializer
adb shell pm disable-user --user 0 com.android.onetimeinitializer
adb shell am force-stop com.android.onetimeinitializer
adb shell pm clear com.android.onetimeinitializer

:: PrintRecommendationService
adb shell pm disable-user --user 0 com.android.printservice.recommendation
adb shell am force-stop com.android.printservice.recommendation
adb shell pm clear com.android.printservice.recommendation

:: QuickSearchBox
adb shell pm disable-user --user 0 com.android.quicksearchbox
adb shell am force-stop com.android.quicksearchbox
adb shell pm clear com.android.quicksearchbox

:: SettingsIntelligence
adb shell pm disable-user --user 0 com.android.settings.intelligence
adb shell am force-stop com.android.settings.intelligence
adb shell pm clear com.android.settings.intelligence

:: SharedStorageBackup
adb shell pm disable-user --user 0 com.android.sharedstoragebackup
adb shell am force-stop com.android.sharedstoragebackup
adb shell pm clear com.android.sharedstoragebackup

:: SimAppDialog
adb shell pm disable-user --user 0 com.android.simappdialog
adb shell am force-stop com.android.simappdialog
adb shell pm clear com.android.simappdialog

:: Stk
adb shell pm disable-user --user 0 com.android.stk
adb shell am force-stop com.android.stk
adb shell pm clear com.android.stk

:: Terminal
adb shell pm disable-user --user 0 com.android.terminal
adb shell am force-stop com.android.terminal
adb shell pm clear com.android.terminal

:: Traceur
adb shell pm disable-user --user 0 com.android.traceur
adb shell am force-stop com.android.traceur
adb shell pm clear com.android.traceur

:: UserDictionaryProvider
adb shell pm disable-user --user 0 com.android.providers.userdictionary
adb shell am force-stop com.android.providers.userdictionary
adb shell pm clear com.android.providers.userdictionary

:: VpnDialogs
adb shell pm disable-user --user 0 com.android.vpndialogs
adb shell am force-stop com.android.vpndialogs
adb shell pm clear com.android.vpndialogs

:: WallpaperBackup
adb shell pm disable-user --user 0 com.android.wallpaperbackup
adb shell am force-stop com.android.wallpaperbackup
adb shell pm clear com.android.wallpaperbackup

:: LiveWallpapersPicker
adb shell pm disable-user --user 0 com.android.wallpaper.livepicker
adb shell am force-stop com.android.wallpaper.livepicker
adb shell pm clear com.android.wallpaper.livepicker

:: AntHalService
adb shell pm disable-user --user 0 com.dsi.ant.server
adb shell am force-stop com.dsi.ant.server
adb shell pm clear com.dsi.ant.server

:: HTMLViewer
adb shell pm disable-user --user 0 com.android.htmlviewer
adb shell am force-stop com.android.htmlviewer
adb shell pm clear com.android.htmlviewer

:: WfdService
adb shell pm disable-user --user 0 com.qualcomm.wfd.service
adb shell am force-stop com.qualcomm.wfd.service
adb shell pm clear com.qualcomm.wfd.service

:: datastatusnotification
adb shell pm disable-user --user 0 com.qti.qualcomm.datastatusnotification
adb shell am force-stop com.qti.qualcomm.datastatusnotification
adb shell pm clear com.qti.qualcomm.datastatusnotification

:: CNEService
adb shell pm disable-user --user 0 com.quicinc.cne.CNEService
adb shell am force-stop com.quicinc.cne.CNEService
adb shell pm clear com.quicinc.cne.CNEService

:: SoterService
adb shell pm disable-user --user 0 com.tencent.soter.soterserver
adb shell am force-stop com.tencent.soter.soterserver
adb shell pm clear com.tencent.soter.soterserver

:: Unknown
adb shell pm disable-user --user 0 org.chromium.webview_shell
adb shell am force-stop org.chromium.webview_shell
adb shell pm clear org.chromium.webview_shell

:: DO NOT DISABLE WHEN USING PASSWORD:
:: LatinIME - com.android.inputmethod.latin

:: DO NOT DISABLE WHEN NO OTHER LAUNCHER IS USED:
:: Launcher3QuickStep - com.android.launcher3

:: DO NOT DISABLE AT FIRST BOOT:
:: OneTimeInitializer - com.android.onetimeinitializer

:: DO NOT DISABLE ON NITROGEN BECAUSE OF CRASH ON BOOT:
:: WallpaperCropper - com.android.wallpapercropper

:doze

echo.
echo Modify doze settings...

:: Remove old modified settings
adb shell settings delete global device_idle_constants

:: Enable doze
adb shell dumpsys deviceidle enable

:: To put phone in deep sleep immediately
adb shell dumpsys deviceidle force-idle

:: Modified doze settings
adb shell settings put global device_idle_constants inactive_to=15000,sensing_to=0,locating_to=0,location_accuracy=20.0,motion_inactive_to=0,idle_after_inactive_to=0,idle_pending_to=60000,max_idle_pending_to=120000,idle_pending_factor=2.0,idle_to=900000,max_idle_to=86400000,idle_factor=2.0,min_time_to_alarm=600000,max_temp_app_whitelist_duration=10000,mms_temp_app_whitelist_duration=10000,sms_temp_app_whitelist_duration=10000

:reboot

echo.
echo Press button to reboot phone...
pause

adb reboot
Attached Files
File Type: txt disable.bat.txt - [Click for QR Code] (10.1 KB, 20 views)
1st November 2019, 09:30 PM |#14  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by GuestK00264

I am on NOS 10 at the moment and started with a new, in fact my old approach.
Not using Magisk or SuperSU and keeping it as default as possible.

Using adb to disable packages without removing, next step will be a short twrp cleanup script once a month for cache and other crap files.

Using the following bat file for disabling packages and setting some optimised doze settings:

Hi!
Why did you go back to trebuchet, is there anything wrong with librechair? I installed librechair today and I kinda like it, so I'm curious whether you found a downside or just prefer the more simplistic trebuchet..
Thanks in advance
26th November 2019, 11:25 PM |#15  
Dirk's Avatar
Senior Member
Thanks Meter: 3,802
 
1010
More
Okay script people, i'm currently using the following to delete a font on Pie ROMs:

Code:
 run_program("/sbin/mount", "/system");
ui_print(" ");
ui_print("***Working***");
delete_recursive(
"/system/fonts/NotoColorEmoji.ttf"
);
ui_print("Removing Emoji");
show_progress(8.800000, 5);
run_program("/sbin/umount", "/system");
ui_print(" ");
ui_print("Done.");
ui_print("Ready to reboot.");
How should this be adapted to work on Android 10? As far as i know the folder is now system/system/fonts which is easy to change, but is there anything that needs changing regarding the mount point now that system is root? I know that bash scripts need adapting but don't know about edify.

Thanks.
27th November 2019, 07:38 PM |#16  
Member
Thanks Meter: 9
 
More
Quote:
Originally Posted by Dirk

Okay script people, i'm currently using the following to delete a font on Pie ROMs:

Code:
 run_program("/sbin/mount", "/system");
ui_print(" ");
ui_print("***Working***");
delete_recursive(
"/system/fonts/NotoColorEmoji.ttf"
);
ui_print("Removing Emoji");
show_progress(8.800000, 5);
run_program("/sbin/umount", "/system");
ui_print(" ");
ui_print("Done.");
ui_print("Ready to reboot.");
How should this be adapted to work on Android 10? As far as i know the folder is now system/system/fonts which is easy to change, but is there anything that needs changing regarding the mount point now that system is root? I know that bash scripts need adapting but don't know about edify.

Thanks.

Why not just:
Code:
mount -o remount,rw /system 2>/dev/null
rm -f /system/system/fonts/NotoColorEmoji.ttf 2>/dev/null
Remount to have /system writable, rm -f for removing the font, 2>/dev/null to suppress errors.
/system/system is when you are using a script in twrp, which I suppose you are doing...
The Following 2 Users Say Thank You to !J! For This Useful Post: [ View ] Gift !J! Ad-Free
Post Reply Subscribe to Thread

Tags
build.prop, cleanup, script, tweak, userinit.sh

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes