Skip to content

Instantly share code, notes, and snippets.

@MarkWalters-dev
Created May 19, 2019 11:12
Show Gist options
  • Save MarkWalters-dev/4507d4514b7569c21eb052f0f84964e2 to your computer and use it in GitHub Desktop.
Save MarkWalters-dev/4507d4514b7569c21eb052f0f84964e2 to your computer and use it in GitHub Desktop.
OnePlus 6T commands
All commands tested with termux. With slight modifications they will also work from adb shell.
remount root
------------
su # tsu won't work with this
mount -o rw,remount /system_root
mount -o ro,remount /system_root
change hostname
---------------
su
hostname phone # works until reboot
su
mount -o rw,remount /system_root
# normal sed -i gives the error "sed: no temp file"
cp /system_root/init.rc /data/data/com.termux/files/home
sed -i "s/hostname localhost/hostname phone/" /data/data/com.termux/files/home/init.rc > /system_root/init.rc
mount -o ro,remount /system_root
reboot
change hosts
------------
su
mount -o rw,remount /system_root
echo 192.168.43.254 laptop >> /system_root/system/etc/hosts
mount -o ro,remount /system_root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment