Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
electrikjesus committed Aug 29, 2024
2 parents 892d96e + 90970bd commit 1d976a6
Show file tree
Hide file tree
Showing 26 changed files with 202 additions and 37 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Installation/raspberry-pi/images/rpi-imager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions Installation/raspberry-pi/raspberry-pi-installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Bass OS 13 for the Raspberry PI 4 series based on the GloDroid project

[![GloDroid](https://img.shields.io/badge/GLODROID-PROJECT-blue)](https://github.com/GloDroid/glodroid_manifest)
[![ProjectStatus](https://img.shields.io/badge/PROJECT-STATUS-yellowgreen)](https://github.com/GloDroidCommunity/raspberry-pi/issues/1)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## Flashing images

### Requirements

##### Raspberry Pi Imager
Download and install the official Raspberry Pi Imager from [here](https://www.raspberrypi.com/software/)

##### sdcard.img
Find the latest Bass rpi image archive sdcard images for your target use-case [here](https://sourceforge.net/projects/bliss-co-labs/files/BlissBass/Raspberry-Pi/)

### Step 1
Extract the sdcard archive using xz/7zip/Winzip/etc.

### Step 2
Launch the Raspberry Pi Imager application
![imager UI](images/rpi-imager.png)

### Step 3
Select the **CHOOSE DEVICE** button and select the **Raspberry Pi 4**
![select device](images/rpi-imager-select.png)

### Step 4
Select the **CHOOSE OS** button and scroll down to the bottom of the list, selecting **Use custom**
![custom image](images/rpi-imager-custom-image.png)

### Step 5
Click on the **CHOOSE STORAGE** button, and select your SD Card device
![storage](images/rpi-imager-storage.png)

### Step 6
Once you have all the parts selected, the Next button will be enabled:
![next](images/rpi-imager-next.png)

Clicking the **NEXT** button will ask if you want to make any custom changes. Select **NO**
![no custom](images/rpi-imager-no-custom.png)

### Step 7
The next question will be a confirmation dialog, making sure you want to erase the contents of the SDCard. Select **YES** to continue.
![erase](images/rpi-imager-erase.png)

### Step 8
The Imager will then ask for root permissions, and once provided, it will start to flash the sdcard.img onto the SDCard:
![writing](images/rpi-imager-writing.png)

Once completed, the Imager will show a **Write Successful** dialog.
![finished](images/rpi-imager-finish.png)

You can safely remove the SDCard from the PC, and plug it into the Raspberry Pi.

## Booting

After flashing the SDCard, insert it into the device and turn it on, and it will boot into the OS.

Depending on the version (application use-case), you should let the OS reach the desktop and wait while the target configurations are being set. This process will be setting up configs, apps, and permissions for the user environment, so it may take a bit.

Pressing the home button should make sure that you are set to the correct launcher UI when everthing is all set.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WARNING THIS WILL DELETE ANY DATA ON THE DRIVE

We will want to start by booting into the installer by selecting the top Install option from Grub

From here we will want to change the drive partition scheme to be A) EFI (VFAT) B) Android (ext4). This means that we need to delete all partitions except for the top EFI partition, and create a single new partition with the remaining space. You will need to start by selecting "Create/Modify partitions", then remove all partitions on the device. ![Partitioning p1](../.gitbook/assets/uefi-create.png)
From here we will want to change the drive partition scheme to be A) EFI (VFAT) B) Android (ext4). This means that we need to delete all partitions except for the top EFI partition, and create a single new partition with the remaining space. You will need to start by selecting "Create/Modify partitions", then remove all partitions on the device. ![Partitioning p1](../../.gitbook/assets/uefi-create.png)

In the next screen, we need to make **two** partiitons for this to work, as Bliss needs to install a bootloader to boot to. if you have a pre-existing install of linux, this step may be unnecessary.

Expand All @@ -26,28 +26,28 @@ First create the EFI partition, this is the partition that is used to install th
4. Set type as ef00 (or EFI)
5. We don't necessairly need to name this partition, but it is best practice to name it `EFI`

![Partitioning p2](../.gitbook/assets/uefi-android.png)
![Partitioning p2](../../.gitbook/assets/uefi-android.png)

Next we need to make the second partition this is the partition that the bulk of android will be installed to.

1. press down until the largest chunk of free space is slected, and click [ NEW ]
2. We can leave everything default. Although a name is not necesary we can call it ANDROID.
3. Lastly we click [ WRITE ] and [ QUIT ]

![Partitioned](../.gitbook/assets/uefi-partitioned.png)
![Partitioned](../../.gitbook/assets/uefi-partitioned.png)

Now that we have the drives partitioned, we can start to install android. Select the ANDROID partition that we have made before, and format it as ext4. this is the recomended format unless windows compatibility is need, in that case select NTFS. and click < Yes > on the next screen

![Format Drive p1](../.gitbook/assets/uefi-ext4.png)
![Format Drive p2](../.gitbook/assets/uefi-risks.png)
![Format Drive p1](../../.gitbook/assets/uefi-ext4.png)
![Format Drive p2](../../.gitbook/assets/uefi-risks.png)

The installer will procede to format and install android, you will then be prompted to install EFI GRUB2. we need to accept that, unless you have a pre-existing grub or other bootloader install

![Install Grub](../.gitbook/assets/uefi-grub.png)
![Install Grub](../../.gitbook/assets/uefi-grub.png)

The installer will begin to write the changes to the disk. This will take some time. Go grab another coffee!

![Grab a coffee](../.gitbook/assets/grab-a-coffee.png)
![Grab a coffee](../../.gitbook/assets/grab-a-coffee.png)

After this step, it will also prepare the install for A/B updates. This process will take a couple minutes at most.

Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ icon: home

## Install Bass OS

* [Install From Bootable USB](Installation/install-from-bootable-usb.md)
* [Collecting bug reports](Installation/collecting-bug-reports.md)
### x86_64-v2 (A12, A13)

* [Install From Bootable USB](Installation/x86_64-v2/install-from-bootable-usb.md)
* [Collecting bug reports](Installation/x86_64-v2/collecting-bug-reports.md)

### Raspberry Pi (A13)

* [Raspberry Pi Installation](Installation/raspberry-pi/raspberry-pi-installation.md)

## Configuration

Expand Down
13 changes: 9 additions & 4 deletions applications/BlissEthernetManager/BlissEthernetManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ ADB Interface:


```
adb shell service call blissethernet <code> <parameters>
adb shell service call blissethernet <code> <type parameter>
```


Expand All @@ -88,6 +88,11 @@ Examples:


1. getAvaliableInterfaces:
2. `x86_64:/ # service call blissethernet 1 s16 eth0 Result: Parcel( 0x00000000: 00000000 00000002 00000004 00740065 '............e.t.' 0x00000010: 00300068 00000000 00000004 00740065 'h.0.........e.t.' 0x00000020: 00310068 00000000 'h.1..... ')`
3. isAvaliable:
4. `x86_64:/ # service call blissethernet 2 s16 eth0 Result: Parcel(00000000 00000001 '........')`
`x86_64:/ # service call blissethernet 1 s16 eth0
Result: Parcel( 0x00000000: 00000000 00000002 00000004 00740065 '............e.t.' 0x00000010: 00300068 00000000 00000004 00740065 'h.0.........e.t.' 0x00000020: 00310068 00000000 'h.1..... ')`
2. isAvaliable:
`x86_64:/ # service call blissethernet 2 s16 eth0
Result: Parcel(00000000 00000001 '........')`
3. setIpAddress:
`x86_64:/ # service call blissethernet 10 s16 eth1 s16 10.1.1.112/24
Result: Parcel(00000000 '....')`
2 changes: 1 addition & 1 deletion features/admin-restriction.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ In order to confirm that a set password is working, you can run a check on the h


```
$ BLISSMODE_PASSWORD="your_companies_complex_password_schema1234"; if [ "$(echo -n "$BLISSBOOTMODE_PASSWORD" | sha256sum)" != "$(cat blissmode_password)" ]; then echo "its a match"; else echo "password does not match"; fi
$ BLISSMODE_PASSWORD="your_companies_complex_password_schema1234"; if [ "$(echo -n "$BLISSBOOTMODE_PASSWORD" | sha256sum)" != "$(cat blissmode_password)" ]; then echo "password does not match"; else echo "its a match"; fi
its a match
```

Expand Down
Binary file added features/images/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added features/images/image2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added features/images/image3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added features/images/image4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added features/images/image5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added features/images/image6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added features/images/image7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added features/images/image8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
127 changes: 105 additions & 22 deletions features/updates-and-ota.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,44 +14,139 @@ If you have installed the OS using the Bootable USB installer, then you can also

Once selected, the device will boot into the OEM installer and auto-update the existing OS on the device.

### OTA - Local Streaming

The UpdateService AIDL allows us to stream an OTA zip from the local device or network attached endpoint.

The UpdaterSDK interface has three main parts: \

#### IUpdater.aidl

```
interface IUpdater {
void setCallback(IUpdaterCallback cb);
void checkForUpdates();
List<UpdateItemInfo> getAvaliableUpdates();
void downloadUpdate(String id);
void pauseDownload(String id);
void resumeDownload(String id);
void installUpdate(String id);
void cancelUpdate();
void suspendUpdate();
void resumeUpdate();
void importUpdate(in ParcelFileDescriptor pfd);
}
```

#### IUpdaterCallback.aidl

```
interface IUpdaterCallback {
void onUpdateCheckCompleted(boolean hasNewUpdates);
void onStatusChange(in UpdateItemInfo update);
void onDownloadProgressChange(in UpdateItemInfo update);
void onInstallProgress(in UpdateItemInfo update);
void onImportStarted();
void onImportCompleted(in UpdateItemInfo updateBase);
}
```

#### UpdateItemInfo.aidl

```
parcelable UpdateItemInfo {
String name;
String downloadUrl;
String downloadId;
long timestamp;
String version;
long fileSize;
int status;
int persistentStatus;
int progress;
long eta;
long speed;
int installProgress;
boolean availableOnline;
boolean finalizing;
}
```

You can use the BlissUpdaterSDK-debug.aar from your target app to stream all required update information to the BlissUpdater app and system update engine.

#### Example: UpdaterClient

The UpdaterClient app acts as an example app for interfacing with the BlissUpdaterSDK. The apps MainActivity calls the AIDL methods with each button, and prints out the output in the textbox above.

![alt_text](images/image1.png "image_tooltip")

Clicking **Select update file** will launch the `ACTION_GET_CONTENT` intent and then the `ParcelFileDescriptor` will be passed to the UpdaterManager.importUpdate. And the import process is triggered, import results can be observed from callbacks onImportStarted and onImportCompleted

![alt_text](images/image2.png "image_tooltip")

Once the import status is complete, the output will be the imported files information:

![alt_text](images/image3.png "image_tooltip")

Using the imported ID (in this case, **local**), we can enter the ID and initiate the Install process:

![alt_text](images/image4.png "image_tooltip")

From there, it will also register the updater service notification:

![alt_text](images/image5.png "image_tooltip")

Once the install process starts, it will have a status of **9** and you can track the **installProgress** percentage.

![alt_text](images/image6.png "image_tooltip")

And after that is complete the **finalizing** process is started and set to **true** and the **installProgress** will track the process percentage.

![alt_text](images/image7.png "image_tooltip")

Then after receiving a status of **10 (Installed)** or **5 (tmp zip Deleted)**, then the updater service will trigger for a restart. And we can display that in the example by enabling that action


![alt_text](images/image8.png "image_tooltip")

The restart is carried out by the BlissPowerManager:

```
BlissPowerManager blissPowerManager = BlissPowerManager.getInstance(this);
mRebootBtn.setOnClickListener(v -> blissPowerManager.reboot());
```

### OTA - Local Server

By default, testing OTA on an unsecured HTTP server is disabled. In order to test OTA, you will need to setup a secured HTTPS nginx server, or change this line in the Updater package to **True**: [https://github.com/BlissRoms/platform_packages_apps_BlissUpdater/blob/arcadia-next/AndroidManifest.xml#L23](https://github.com/BlissRoms/platform_packages_apps_BlissUpdater/blob/arcadia-next/AndroidManifest.xml#L23) \
Then recompile BlissBass to disable this security measure.


#### Manually setting OTA URI address:

We do allow the ability to manually set the OTA update URI via kernel cmdline interface. This allows you to set the value only when needed for added security. To do so, you should add the following value:



* `SET_CUSTOM_OTA_URI` - Sets the custom URL for OTA updates


```
SET_CUSTOM_OTA_URI=https://192.168.1.1/updates/update.json
```


Or you can set the following system property via ADB:



* `bliss.updater.uri`


```
Setprop bliss.updater.uri https://192.168.1.1/updates/update.json
```


Setting Up The Server:

On the server, we will need to have it setup as a basic nginx web server, with the OTA update .zip located in the same folder as the update.json, with the updates/update.json file formatted like this:


```
{
"response": [
Expand All @@ -68,40 +163,28 @@ On the server, we will need to have it setup as a basic nginx web server, with t
}
```


The values are as follows:



***datetime**” - is calculated using the date command. Example:


```
$ date --date='2023-10-31 19:00' +"%s"
```



***id**” - is the sha256 value. Example:


```
$ sha256sum Bliss-Go-v15.8.6-x86_64-OFFICIAL-vanilla-20231031.zip
```



***size**” - is the size in bytes. Example:


```
$ wc -c Bliss-Go-v15.8.6-x86_64-OFFICIAL-vanilla-20231031.zip
```



### OTA - Dedicated Update Server

**ShipperStack**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,11 @@ INTEL_PSTATE_STATUS=passive

#### Navigation & Input Options:

* `FORCE_NAVBAR_ON_SECONDARY_DISPLAYS`: Enable navbar/gesture navigation on external display. options: 0,1
* `FORCE_IME_ON_SECONDARY_DISPLAYS`: Enable on-screen keyboard on external display (required for MultiDisplay Input). options: 0,1
* `androidboot.bliss.force_ime_on_all_displays=true`: Force IME on secondary displays. Uses "ro.boot.bliss.force_ime_on_all_displays" property (true,false)
* `androidboot.force.navbar_on_secondary_displays=true`: Allow a system property to override this for desktop mode navigation to work on secondary displays. (true/false)
* `ro.boot.force.right_mouse_as_back=true`: Allows overriding AMOTION_EVENT_BUTTON_SECONDARY with AMOTION_EVENT_BUTTON_BACK, using a property trigger. (true/false)
* `androidboot.force.right_mouse_as_back=true`: Allows overriding AMOTION_EVENT_BUTTON_SECONDARY with AMOTION_EVENT_BUTTON_BACK, using a property trigger. (true/false)



Expand All @@ -511,6 +513,13 @@ INTEL_PSTATE_STATUS=passive
* 2.middle_port: if a portrait apk, will show in the middle of the screen, left and right will show black
* 3.original: original orientation, if a portrait apk, will rotate 270 degree
* `androidboot.android.force_rotation_on_external_displays`: Set target orientation for external displays (0=0, 1=90, 2=180, 3-270)
* `fbcon=rotate:*`: The value 'n' accepts the following:
0 - normal orientation (0 degree)
1 - clockwise orientation (90 degrees)
2 - upside down orientation (180 degrees)
3 - counterclockwise orientation (270 degrees)
* `SET_PRIMARY_DISPLAY_ORIENTATION=*`: property: ro.surface_flinger.primary_display_orientation has three cases:
ORIENTATION_90, ORIENTATION_180, ORIENTATION_270


### Misc:
Expand Down

0 comments on commit 1d976a6

Please sign in to comment.