git show commitID -- folder/ >> 001commitID.patch
cd to fresh git repo without changes and
git apply 001commitID.patch
git show commitID -- folder/ >> 001commitID.patch
cd to fresh git repo without changes and
git apply 001commitID.patch
git config --global user.name "USER"
git config --global user.email "123456789+USER@users.noreply.github.com"
git config --global --list
git config --local --list
Make sure working tree is clean:
git status
git add .
git commit -m "commit comment"
git filter-branch --env-filter '
export GIT_AUTHOR_EMAIL="123456789+USER@users.noreply.github.com"
export GIT_COMMITTER_EMAIL="123456789+USER@users.noreply.github.com"
' -- --all
rm -rf .git/refs/original
git reflog expire --expire=now --all
git gc --prune=now --aggressive
git log --reverse --format="%h %an <%ae>"
If you see:
yourname@users.noreply.github.com
git filter-branch --env-filter '
export GIT_AUTHOR_EMAIL="1123456789+USER@users.noreply.github.com"
export GIT_COMMITTER_EMAIL="123456789+USER@users.noreply.github.com"
' -- --all
git log
⚠️ This replaces the online repo history:
git push --force --all
git push --force --tags
git log
git log --all --author="yourname"
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
git stash clear
git reflog expire --expire=now --all
git gc --prune=now --aggressive
What others must do (if anyone cloned). They must reclone, or:
git fetch --all
git reset --hard origin/main
git log --all --author="yourname"
SHOULD SHOW NOTHING
lsusb
sudo apt install android-tools-adb
adb devices
adb pull / /$HOME/Videos
adb shell
Permanent USB Debugging
echo "mtp,adb" > /data/property/persist.sys.usb.config
chmod 644 /data/property/persist.sys.usb.config
echo "1" > /data/property/persist.service.adb.enable
chmod 644 /data/property/persist.service.adb.enable
reboot
MagiskHidePropsConf useless
acc useless
adb shell "magisk --remove-modules" // OR rm -rf /data/adb/modules/*
reboot
Launch Magisk > Settings > Superuser > Enable Tapjacking > Allow for ADB
adb shell su -c "settings put global development_settings_enabled 1"
adb shell su -c "settings put global adb_enabled 1"
Disabling Google Play Services
pm disable-user --user 0 com.google.android.gms
Package com.google.android.gms new state: disabled-user
pm disable-user --user 0 com.android.vending
Package com.android.vending new state: disabled-user
To re-enable:
adb shell su
pm enable com.google.android.gms
pm enable com.android.vending
Do NOT delete APK unless you know what you’re doing.
Install Magisk on phone, copy boot.img
Launch Magisk > Install > Select boot.img
DO NOT TICK AVB 2.0 for Android 5.1
adb pull storage/sdcard0/download/magisk_patched.img /home/user/Downloads
BACKUP YOUR DATA!!!
adb reboot bootloader
fastboot devices -l
0123456789ABCDEF fastboot
usb:5-1
fastboot getvar unlocked
unlocked: no
Finished. Total time: 0.002s
sudo fastboot oem unlock
Press Volume Up on phone (READ MESSAGE!!!)
Shows ==> Fastboot... No need to do anything.
sudo fastboot devices
[sudo] password for user:
0123456789ABCDEF fastboot
cd ~/Donwloads
ls
sudo fastboot flash boot magisk_patched.img
Sending 'boot' (16384 KB) OKAY [ 0.464s]
Writing 'boot' OKAY [ 2.210s]
Finished. Total time: 2.689s
sudo fastboot reboot
DO EVERYTHING AT YOUR OWN RISK!
sudo ufw enable
sudo ufw default deny incoming
sudo ufw allow from 192.168.1.0/24 to any port *****
sudo ufw allow from 192.168.1.0/24 to any port ***** proto udp
sudo ufw allow from 192.168.1.0/24 to any port ****
sudo ufw allow from 192.168.1.0/24 to any port 22
sudo ufw allow from 192.168.1.0/24 to any port 3389
sudo ufw allow from 192.168.1.0/24 to any port 445 proto tcp
sudo ufw status verbose
ss -tulpn
upnpc -l
curl ifconfig.me // compare with PC public ISP IP
nmap -p **,****,***** IP-address (check PC and ISP)
ip a
ip -4 addr
nmap -6 -p ****,***** YOUR_IPV6
Install dk.tacit.android.foldersync.lite
https://www.apkmirror.com/apk/tacit-dynamics/foldersync/foldersync-2-8-0-44-release/foldersync-2-8-0-44-android-apk-download/
Create account for SMB server in FolderSync.
Create new sync and choose interval.
That's easiest way to sync files between Android devices and Linux PC.
Delete useless user: sudo deluser --remove-all-files <username>