Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

Monday, October 5, 2020

SSL notes

 Android CA paths

system

/system/etc/security/cacerts

System CA Certificates in Android are stored by the name of their hash, with a ‘0’ as extension.
Rename the CA certificate:
$ MY_CA_CERT=my-ca-cert.pem
$ cp $MY_CA_CERT $(openssl x509 -inform PEM -subject_hash_old -in $MY_CA_CERT | head -1).0

user

/data/misc/keystore/user_0


References:

Friday, August 9, 2019

Android Treble GSI

install aosp - https://www.getdroidtips.com/how-to-install-generic-system-image-on-project-treble-devices-phh-treble/
root device via magisk - https://www.getdroidtips.com/download-latest-magisk-zip-magisk-manager-root-phone
open gapps - https://opengapps.org/
AOSP - https://github.com/phhusson/treble_experimentations/releases

about GSI and vbmeta.img - https://source.android.com/setup/build/gsi


GSI variant: legacy arm64 a-only

prerequisites:
- ADB drivers
- ADB framework (platform tools)
- SP Flash Tool
- Magisk Manager (.apk) [and Magisk (.zip)]
- TWRP
- GSI (aosp image)

TODO:
00) flash the whole Firmware via SP Flash Tool

0) enable developer mode (tap on Build Number on the phone About Phone settings)
1) enable USB debugging (see developer options)

2) unlock bootloader:
- allow bootloader unlocking (developer options => OEM unlocking option)
- then:
$ adb reboot bootloader
$ fastboot flashing unlock
$ fastboot reboot
note: 
On some devices Android Verified Boot (AVB) is enabled. This means that installing TWRP or swiping to allow system modifications will prevent you from being able to boot.  To disable AVB grab the vbmeta image from the ROM you are on, and flash it with the following command:
$ fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
3) install TWRP:
$ adb reboot bootloader
$ fastboot flash recovery twrp.img
$ fastboot reboot
note: 
Many devices will replace custom recovery automatically during first boot.
After typing fastboot reboot, hold the key combo and boot to TWRP. 
Once TWRP is booted, TWRP will patch the stock ROM to prevent the stock ROM from replacing TWRP. 
If you don't follow this step, you will have to repeat the install.

4) 
- mount
 => check data,system, vendor, nvdata [,MicroSD card]
- Advanced - File Manager => delete /system_root/system/recovery_fromboot.p
-  Advanced => Close AVB2.0 

5) root:
- install MagiskManager .apk
- run it and update
- patch boot.img from the original Firmware (magisk manager => install magisk => open and patch file)
- flash the patched file:
$ adb reboot bootloader
$ fastboot flash boot patched_boot.img
$ fastboot reboot
- run Magisk Manager and finish Magisk instalation

6) install GSI via TWRP:
- wipe => advanced wipe
- install => image => system image

7) install open gapps .zip via TWRP

Saturday, December 13, 2014

Использование ADB shell

cd <path_to_android_SDK>/platform-tools
sudo ./adb kill-server
sudo ./adb start-server
./adb devices
./adb shell
su
rm /data/system/gesture.key