Skip to content

Instantly share code, notes, and snippets.

@T0NG-J
Created August 13, 2024 12:13
Show Gist options
  • Save T0NG-J/1fd0bcb5a7a362d420f5c5699f1ef48d to your computer and use it in GitHub Desktop.
Save T0NG-J/1fd0bcb5a7a362d420f5c5699f1ef48d to your computer and use it in GitHub Desktop.
android-move-certs
# Backup the existing system certificates to the user certs folder
cp /system/etc/security/cacerts/* /data/misc/user/0/cacerts-added/
# Create the in-memory mount on top of the system certs folder
mount -t tmpfs tmpfs /system/etc/security/cacerts
# copy all system certs and our user cert into the tmpfs system certs folder
cp /data/misc/user/0/cacerts-added/* /system/etc/security/cacerts/
# Fix any permissions & selinux context labels
chown root:root /system/etc/security/cacerts/*
chmod 644 /system/etc/security/cacerts/*
chcon u:object_r:system_file:s0 /system/etc/security/cacerts/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment