[General Topics] DarkSoulGaming:
THIS POST IS FOR EDUCATIONAL PURPOSE ONLY (FOR USERS USING BLUESTACKS AS THEIR ANDROID DEVELOPMENT PLATFORM)

Requirements:

Bluestacks 4 or 5

Rooted Bluestacks with ADB + Root Files Editing Ability

OpenSSL Software

​

Step 1.​

Generate the hash used by android for the certificate file name by running this command for openssl software:

openssl x509 -inform PEM -subject_hash_old -in rootCA.crt

It will return something like:

5d4e73c2
-----BEGIN CERTIFICATE-----
FuIEZyYW5zaXNjbzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMRp
eTkNLUb/u3ukTwoQ9LzToWhPwdVKf+CLn98GF46/qif1vUGSOmRgdVhjFMgBYXz6
+b2MW+UAuCYWvYJ5R5g3OQo8kSy4KHs47yDrEImQcIV9M7+wAcyf4ehVCuk5Ytxr
4R8KIjP6wOfKb3/f38iqoEx1IYaweDnmL0MktbACMzaMYsPUFn/Y9SnqW7UEbkYE
3qpX+gFFcUvuHDemnimNiDcmWHnRY7cEzZniMZiLSp753nHhZTrxzStPijReSOgw
ozmDhztsyoo05fgazue8LhMJY0Nr5w3WiwRJPdQmsCG3bL6Iq/Z7Zcyt8vFvYHRt
tJPuBej0ZGecj+DWbXkCAwEAAaNTMFEwHQYDVR0OBBYEFMJ4HTxoK4isk9Ec8GFC
AOsxtj5gMB8GA1UdIwQYMBaAFMJ4HTxoK4is
-----END CERTIFICATE-----

5d4e73c2 will be the filename used by android so run the next command:

openssl x509 -inform PEM -text -in rootCA.crt -noout >> 5d4e73c2.0

make sure you replace rootCA.crt with your cert file and 5d4e73c2.0 with your hash

Step 1 should be done if you have the new file with the hashname in your directory (around 5kb size)

Step 2.​

Edit the generated hashname.0 file and move CERTIFICATE data from your .crt file to top of hashname.0 file:

Example (rootCA.cert):

-----BEGIN CERTIFICATE-----
FuIEZyYW5zaXNjbzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMRp
eTkNLUb/u3ukTwoQ9LsToWhPwdVKf+CLn98GF46/qif1vUGSOmRgdVhjFMgBYXz6
+b2MW+UAuCYWvYJ5R5g3OQo8kSy4KHs47yDrEImQcIV9M7+wAcyf4ehVCuk5Ytxr
4R8KIjP6wOfKb3/X38iqoEx1IYaweDnmL0MktbACMzaMYsPUFn/Y9SnqW7UEbkYE
3qpX+gFFcUvuHDemnimNiDcmWHnRY7cEzZniMZiLSp753nHhZTrxzStPijReSOgw
ozmDhztsyoo05fgazue8LhMJY0Nr5w3WiwRJPdQmsCG3bL6Iq/Z7Zcyt8vFvYHRt
tJPuBej0ZGecj+DWbXkCAwEAAaNTMFEwHQYDVR0OBBYEFMJ4HTxoK4isk9Ec8GFC
AOsxtj5gMB8GA1UdIwQYMBaAFMJ4HTxoK4is
-----END CERTIFICATE-----

copy your certificate data to top of hashname.0 file like:

-----BEGIN CERTIFICATE-----
FuIEZyYW5zaXNjbzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMRp
eTkNLUb/u3ukTwoQ9LzToWhP2dVKf+CLn98GF46/qif1vUGSOmRgdVhjFMgBYXz6
+b2MW+UAuCYWvYJ5R5g3OQo8kSy4KHs47yDrEImQcIV9M7+wAcyf4ehVCuk5Ytxr
4R8KIjP6wOfKb3/X38iqoEx1IYaweDnmL0MktbACMzaMYsPUFn/Y9SnqW7UEbkYE
3qpX+gFFcUvuHDemnimNiDcmWHnRY7cEzZniMZiLSp753nHhZTrxzStPijReSOgw
ozmDhztsyoo05fgazue8LhMJY0Nr5w3WiwRJPdQmsCG3bL6Iq/Z7Zcyt8vFvYHRt
tJPuBej0ZGecj+DWbXkCAwEAAaNTMFEwHQYDVR0OBBYEFMJ4HTxoK4isk9Ec8GFC
AOsxtj5gMB8GA1UdIwQYMBaAFMJ4HTxoK4is
-----END CERTIFICATE-----
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
9b:59:08:67:2a:bb:f5:df
Signature Algorithm: sha256WithRSAEncryption
................................................... (alot of data below)

save the file and get ready to copy to your bluestacks.

Step 3.​

there are many ways to transfer files to bluestacks, for example by using their windows file manager import option or using adb

once you have copied the hashname.0 file to your bluestacks.

Using Root Explorer:- Copy .0 file to /system/etc/security/cacerts/ and set the file permissions to 644 (file owner can remain root:root)

OR

Using ADB:- run these commands below:

su
mount -o remount,rw /system
adb push C:\openssl\5d4e73c2.0 /system/etc/security/cacerts/
cd /system/etc/security/cacerts/
chmod 644 5d4e73c2.0
mount -o remount,ro /system
reboot

AND DONE!​

once rebooted, you should have the certificates installed.