• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root replace /etc/security/cacerts.bks

eadwig

Lurker
hey,
i got some private certificates i need to install on my rooted htc desire.

i copied /etc/security/cacerts.bks and added my cert
Code:
# keytool -keystore cacerts.bks -storetype BKS -provider org.bouncycastle.jce.provider.BouncyCastleProvider -storepass changeit -importcert -trustcacerts -alias CACERT -file mycert.crt
then i tried to replace the old cacerts.bks, but i failed everytime.

  • 1. mount /system rw
  • mount -o rw,remount -t yaffs2 /dev/block/mtdblock3
  • adb remount
  • 2. replace /cacerts.bks
  • cp /mnt/sdcard/cacerts.bks /system/etc/security/cacerts.bks > cp: cannot create '/system/etc/security/cacerts.bks': File exists OR rm failed for /system/etc/security/cacerts.bks, Directory not empty
  • dd if=/data/cacerts.bks of=/system/etc/security/cacerts.bks > 123+1 records in
    123+1 records out
    63285 bytes transferred in 0.015 secs (4219000 bytes/sec)
    > ls -l tells me, that the filesize changed, but after rebooting the htc it's stil the old file.
  • adb push cacerts.bks /system/etc/security > failed to copy 'cacerts.bks' to '/system/etc/security/cacerts.bks': Directory not empty

i need to install those certificates, but i don't know how.... any ideas?

kind regards
eadwig
 
Looks like you are using a teminal emulator? Using adb push would be much simpler.

Dont have to bother with all the mounting rw etc. Just boot into recovery.

FAQ in my sig if youre not sure.
 
there is a recovery mode? Good to know ^^
i already used adb: adb remount to mount /system rw and adb push cacerts.bks /system/etc/security to replace the file but it didn't work, so i tried mount, dd etc. i hope the recovery mode will solve my problem

thank you :-)
 
Back
Top Bottom