2024-11-30 14:05:02 +00:00
## Recovery Mode
2024-11-30 23:01:43 +00:00
```
adb reboot recovery
```
2024-12-01 08:22:35 +00:00
Ensure Phone is Off, Hold Volume Up + Power, Release as soon as the Samsung logo shows up, (Also release when warning about unsafe software etc. is shown)
2024-11-30 14:05:02 +00:00
## Download Mode
Hold Volume Up + Volume Down and plug USB cable into device; hold until download mode visible
2024-11-30 16:29:23 +00:00
## Unlock Bootloader
Enable OEM Unlocking in Android Developer Options, Enter Download Mode, Hold Volume Up, accept with Volume Up
2024-11-30 23:01:43 +00:00
## Installation (WIP)
```bash
pmbootstrap install --no-recommends --android-recovery-zip --password pw --zap --recovery-install-partition super
```
2024-12-01 21:55:06 +00:00
2024-12-02 18:53:53 +00:00
## Create empty dtbo partition file
```bash
avbtool add_hash_footer --partition_name dtbo --partition_size 2621440 --image empty_dtbo.img
```
2024-12-08 20:30:56 +00:00
## Dump kernel values through debugfs
```bash
mount -t debugfs debugfs /sys/kernel/debug
ls -lah /sys/kernel/debug # A lot of values here can be copied/dumped
```
2024-12-09 21:35:42 +00:00
## Fix bluetooth after reboot
```bash
sudo btmgmt --index 0 public-addr 00:11:22:33:44:55
```
NOTE: `bluez-btmgmt` must be installed
2024-12-10 10:51:13 +00:00
## Enable Internet over USB
2024-12-11 13:03:26 +00:00
(see https://wiki.postmarketos.org/wiki/USB_Internet)
2024-12-10 10:51:13 +00:00
### Host
```bash
sysctl net.ipv4.ip_forward=1
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -s 172.16.42.0/24 -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE -s 172.16.42.0/24
iptables-save
```
2024-12-11 13:03:26 +00:00
### Device
```bash
ip route add default via 172.16.42.2 dev usb0
echo nameserver 1.1.1.1 > /etc/resolv.conf
echo 'ip route add default via 172.16.42.2 dev usb0' > /etc/local.d/usb_internet.start
chmod +x /etc/local.d/usb_internet.start
rc-update add local
```
## Notes
2024-12-11 17:01:49 +00:00
- `&pdc` implies +480 when using `&intc`
2024-12-11 13:03:26 +00:00
- Regarding GPI DMA issue: https://oftc.irclog.whitequark.org/linux-msm/2023-11-26 (and following days)
2024-12-10 10:51:13 +00:00
2024-12-01 21:55:06 +00:00
## Misc. Links
- https://softhandtech.com/what-is-ffbm-mode-in-android/
2024-12-02 19:02:10 +00:00
- https://wiki.postmarketos.org/wiki/Samsung_Galaxy_S24_Ultra_(samsung-e3q)
2024-12-02 19:16:26 +00:00
- https://wiki.postmarketos.org/wiki/Samsung_Galaxy_A52_4G_(samsung-a52q)
2024-12-06 22:58:19 +00:00
- https://github.com/JamiKettunen/qcom-fw-setup