Skip to content

Commit

Permalink
GUIDES: Update for SFOS 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
JamiKettunen committed Nov 20, 2020
1 parent de631dc commit c608651
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 22 deletions.
11 changes: 7 additions & 4 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,17 @@ HA_BUILD $ hybris-patches/apply-patches.sh --mb && . build/envsetup.sh && breakf

Now we will build the required parts of LineageOS for HAL to function properly under SFOS. This usually takes around 9 minutes on 16 Zen 2 threads (R7 3700X) for the first time. To start the process, enter:
```
HA_BUILD $ mka hybris-hal
HA_BUILD $
rm -rf vendor/lineage/bootanimation/
mka hybris-hal
```

**NOTE:** If this was your first time building the droid HAL side, the following needs to be also executed for working camera, video playback & recording etc; this shouldn't take very long:
```
echo "MINIMEDIA_AUDIOPOLICYSERVICE_ENABLE := 1" > external/droidmedia/env.mk
sed "s/Werror/Werror -Wno-unused-parameter/" -i frameworks/av/services/camera/libcameraservice/Android.mk
mka droidmedia
mka droidmedia libbiometry_fp_api_32
hybris/mw/sailfish-fpd-community/rpm/copy-hal.sh
```

During the `hybris-hal` build process `hybris-*.img` boot images in `out/target/product/$DEVICE/` will be generated. When kernel and other Android side changes are done afterwards the image can be regenerated using:
Expand All @@ -70,7 +73,7 @@ To pull updates and start (re)building all locally required SFOS packages & the
PLATFORM_SDK $ build_all_packages
```

As the rootfs `mic` build command line is now included in `build_packages.sh` steps, this is all you need to get a rather tiny (~340 MB) flashable SFOS zip file! Look into the [flashing guide](FLASHING.md) on how to proceed afterwards.
As the rootfs `mic` build command line is now included in `build_packages.sh` steps, this is all you need to get a rather tiny (~380 MB) flashable SFOS zip file! Look into the [flashing guide](FLASHING.md) on how to proceed afterwards.

When just droid configs have been modified, `build_device_configs` will be enough. Same goes for droid HAL stuff with `build_droid_hal` instead. Building with these commands instead will be substantially faster than rebuilding everything (which is unnecessary 99% of the time anyways).

Expand Down
31 changes: 19 additions & 12 deletions DEBUGGING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Debugging guide

### Table of Contents
* [Notice about default user](#notice-about-default-user)
* [Device reboots to fastboot](#device-reboots-to-fastboot)
* [Can't get past setup / lockscreen](#cant-get-past-setup-lockscreen)
* [Getting telnet](#getting-telnet)
Expand All @@ -9,6 +10,12 @@
* [Gathering logs](#gathering-logs)
* [Transferring logs](#transferring-logs)

## Notice about default user

Since Sailfish OS 3.4.0 (Pallas-Yllästunturi) the installation default user has become `defaultuser` where in all previous versions it has been `nemo`.

In case you upgraded to/past this version from a previous build where the user was still `nemo`, your user is still `nemo` and it should be used in all cases where `defaultuser` is now mentioned in this guide.

## Device reboots to fastboot

For me this has happened when flashing the wrong LineageOS 16.0 zip. Double-check that the zip I've mentioned in the [flashing guide](FLASHING.md#flashing-steps) matches yours unless you know what you are doing!
Expand Down Expand Up @@ -47,10 +54,10 @@ ip route add 192.168.2.15 dev $DEV

Remote debugging is possible via SSH on a local Wi-Fi network. It should be running by default on developer mode, but you'll need some setup:
```
TELNET # passwd nemo
TELNET # passwd defaultuser
```

Once a password has been set for the regular user `nemo`, you need to get the IP address of the device:
Once a password has been set for the regular user `defaultuser`, you need to get the IP address of the device:
```
TELNET # ip a | grep wlan0
23: wlan0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 3000
Expand All @@ -60,22 +67,22 @@ TELNET # ip a | grep wlan0

In this case the device's IP is `192.168.1.105` and I can SSH in like so:
```
HOST $ ssh nemo@192.168.1.105
nemo@192.168.1.105's password:
Last login: Sun Jul 7 12:16:15 2019
HOST $ ssh defaultuser@192.168.1.105
defaultuser@192.168.1.105's password:
Last login: Fri Nov 20 21:36:06 2020
,---
| Sailfish OS 3.3.0.16 (Rokua)
| Sailfish OS 3.4.0.24 (Pallas-Yllästunturi)
'---
[nemo@Sailfish ~]$
[defaultuser@Sailfish ~]$
```

To gain root access via SSH the following needs to be used (in some regards the command works like `sudo`):
```
[nemo@Sailfish ~]$ devel-su
[defaultuser@Sailfish ~]$ devel-su
Password:
[root@Sailfish nemo]#
[root@Sailfish defaultuser]#
```
**NOTE:** Prompts below starting with `#` are meant to be run as `root` and similarly ones starting with `$` are meant to be run as the user `nemo`!
**NOTE:** Prompts below starting with `#` are meant to be run as `root` and similarly ones starting with `$` are meant to be run as the user `defaultuser`!

## Stracing binaries

Expand Down Expand Up @@ -120,8 +127,8 @@ Starting from Android 9 Pie based ports, you can now just enable & use MTP like

If SSH access was enabled previously the logs can also be transferred via the command line:
```
HOST $ scp nemo@192.168.1.105:/sdcard/*.log .
nemo@192.168.1.105's password:
HOST $ scp defaultuser@192.168.1.105:/sdcard/*.log .
defaultuser@192.168.1.105's password:
dmesg.log 100% 2003KB 14.0MB/s 00:00
journalctl.log 100% 905KB 11.6MB/s 00:00
logcat.log 100% 491KB 9.6MB/s 00:00
Expand Down
2 changes: 1 addition & 1 deletion FLASHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Check out [this forum post](https://forums.oneplus.com/threads/guide-oneplus-5-h

When using Sailfish OS the current port expects the phone to have Android 9 Pie firmware.

1. Fetch the files for latest O<sub>2</sub>OS 9.0.11 firmware ([OP5 / cheeseburger](https://sourceforge.net/projects/crdroid/files/cheeseburger/6.x/firmware/firmware_9.0.11_oneplus5.zip/download) | [OP5T / dumpling](https://sourceforge.net/projects/crdroid/files/dumpling/6.x/firmware/firmware_9.0.11_oneplus5T.zip/download)) and a TWRP >=3.3.x image ([OP5 / cheeseburger](https://dl.twrp.me/cheeseburger/twrp-3.3.1-0-cheeseburger.img) | [OP5T / dumpling](https://dl.twrp.me/dumpling/twrp-3.3.1-0-dumpling.img)).
1. Fetch the files for latest O<sub>2</sub>OS 9.0.11 firmware ([OP5 / cheeseburger](https://sourceforge.net/projects/crdroid/files/cheeseburger/6.x/firmware/firmware_9.0.11_oneplus5.zip/download) | [OP5T / dumpling](https://sourceforge.net/projects/crdroid/files/dumpling/6.x/firmware/firmware_9.0.11_oneplus5T.zip/download)) and a [TWRP >=3.3.x image](https://dl.twrp.me/cheeseburger_dumpling/twrp-3.4.0-0-cheeseburger_dumpling.img.html).
2. Flash the firmware zip first and then TWRP image to Recovery partition.
3. First time flashers should also check `/data` for filesystem issues (make sure it's **unmounted** & formatted as **`ext4`** beforehand!):
```
Expand Down
10 changes: 5 additions & 5 deletions INITIAL-BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,16 @@ When gaining control of the prompt we need to fetch the HADK Android tools for u
PLATFORM_SDK $
sudo zypper ref -f
sudo zypper --non-interactive in bc pigz atruncate android-tools-hadk
sudo zypper --non-interactive in bc pigz atruncate android-tools-hadk kmod
```
**NOTE:** Repository errors for `adaptation0` can be safely ignored here and in the future.

## Adding SFOS build target

In the Platform SDK we use Scratchbox to build packages for the target device architecture. Releases for the SDK targets can be found [here](http://releases.sailfishos.org/sdk/targets/) if another version is desired. To build against the latest public release e.g. `3.3.0.16` at the time of writing, the following command should be run:
In the Platform SDK we use Scratchbox to build packages for the target device architecture. Releases for the SDK targets can be found [here](http://releases.sailfishos.org/sdk/targets/) if another version is desired. To build against the latest public release e.g. `3.4.0.24` at the time of writing, the following command should be run:
```
PLATFORM_SDK $
PLATFORM_SDK $
sed -i '1iexport RELEASE="3.3.0.16"' ~/.hadk.env
source ~/.hadk.env
cd && sdk-manage target install $VENDOR-$DEVICE-$PORT_ARCH http://releases.sailfishos.org/sdk/targets/Sailfish_OS-$RELEASE-Sailfish_SDK_Target-$PORT_ARCH.tar.7z --tooling SailfishOS-$RELEASE --tooling-url http://releases.sailfishos.org/sdk/targets/Sailfish_OS-$RELEASE-Sailfish_SDK_Tooling-i486.tar.7z
```
Expand All @@ -87,7 +86,7 @@ cd && sdk-manage target install $VENDOR-$DEVICE-$PORT_ARCH http://releases.sailf
To verify that the install(s) have succeeded, executing `sdk-assistant list` should yield something like this:
```
PLATFORM_SDK $ sdk-assistant list
SailfishOS-3.3.0.16
SailfishOS-3.4.0.24
|-oneplus-cheeseburger-armv7hl
`-oneplus-dumpling-armv7hl
```
Expand All @@ -114,6 +113,7 @@ HA_BUILD $
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
git config --global color.ui "auto"
```

## Cleaning up
Expand Down

0 comments on commit c608651

Please sign in to comment.