1. Download our Official Android App: Forums for Android!

Root replace /etc/security/cacerts.bks

Discussion in 'Android Devices' started by eadwig, Sep 23, 2011.

  1. eadwig

    eadwig Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Sep 23, 2011

    Sep 23, 2011
    2
    0
    5
    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 (Text):
    1. # 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
     

    Advertisement

  2. SUroot

    SUroot Android Expert
    Rank:
    None
    Points:
    1,123
    Posts:
    23,925
    Joined:
    May 25, 2010

    May 25, 2010
    23,925
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    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.
     
  3. eadwig

    eadwig Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Sep 23, 2011

    Sep 23, 2011
    2
    0
    5
    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 :)
     
Tags:

Share This Page

Loading...