diff --git a/Installation/raspberry-pi/images/rpi-imager-custom-image.png b/Installation/raspberry-pi/images/rpi-imager-custom-image.png new file mode 100644 index 00000000..1375f3f2 Binary files /dev/null and b/Installation/raspberry-pi/images/rpi-imager-custom-image.png differ diff --git a/Installation/raspberry-pi/images/rpi-imager-erase.png b/Installation/raspberry-pi/images/rpi-imager-erase.png new file mode 100644 index 00000000..24d8cdb2 Binary files /dev/null and b/Installation/raspberry-pi/images/rpi-imager-erase.png differ diff --git a/Installation/raspberry-pi/images/rpi-imager-file-sdcard.png b/Installation/raspberry-pi/images/rpi-imager-file-sdcard.png new file mode 100644 index 00000000..e7b7f54f Binary files /dev/null and b/Installation/raspberry-pi/images/rpi-imager-file-sdcard.png differ diff --git a/Installation/raspberry-pi/images/rpi-imager-finish.png b/Installation/raspberry-pi/images/rpi-imager-finish.png new file mode 100644 index 00000000..3a6bf9d2 Binary files /dev/null and b/Installation/raspberry-pi/images/rpi-imager-finish.png differ diff --git a/Installation/raspberry-pi/images/rpi-imager-next.png b/Installation/raspberry-pi/images/rpi-imager-next.png new file mode 100644 index 00000000..2174204f Binary files /dev/null and b/Installation/raspberry-pi/images/rpi-imager-next.png differ diff --git a/Installation/raspberry-pi/images/rpi-imager-no-custom.png b/Installation/raspberry-pi/images/rpi-imager-no-custom.png new file mode 100644 index 00000000..d313d9f4 Binary files /dev/null and b/Installation/raspberry-pi/images/rpi-imager-no-custom.png differ diff --git a/Installation/raspberry-pi/images/rpi-imager-select.png b/Installation/raspberry-pi/images/rpi-imager-select.png new file mode 100644 index 00000000..5a79ab53 Binary files /dev/null and b/Installation/raspberry-pi/images/rpi-imager-select.png differ diff --git a/Installation/raspberry-pi/images/rpi-imager-storage.png b/Installation/raspberry-pi/images/rpi-imager-storage.png new file mode 100644 index 00000000..6a059ede Binary files /dev/null and b/Installation/raspberry-pi/images/rpi-imager-storage.png differ diff --git a/Installation/raspberry-pi/images/rpi-imager-writing.png b/Installation/raspberry-pi/images/rpi-imager-writing.png new file mode 100644 index 00000000..dedae47e Binary files /dev/null and b/Installation/raspberry-pi/images/rpi-imager-writing.png differ diff --git a/Installation/raspberry-pi/images/rpi-imager.png b/Installation/raspberry-pi/images/rpi-imager.png new file mode 100644 index 00000000..005e3af1 Binary files /dev/null and b/Installation/raspberry-pi/images/rpi-imager.png differ diff --git a/Installation/raspberry-pi/raspberry-pi-installation.md b/Installation/raspberry-pi/raspberry-pi-installation.md new file mode 100644 index 00000000..b91989cf --- /dev/null +++ b/Installation/raspberry-pi/raspberry-pi-installation.md @@ -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. diff --git a/Installation/collecting-bug-reports.md b/Installation/x86_64-v2/collecting-bug-reports.md similarity index 100% rename from Installation/collecting-bug-reports.md rename to Installation/x86_64-v2/collecting-bug-reports.md diff --git a/Installation/install-from-bootable-usb.md b/Installation/x86_64-v2/install-from-bootable-usb.md similarity index 84% rename from Installation/install-from-bootable-usb.md rename to Installation/x86_64-v2/install-from-bootable-usb.md index 48e5a861..84f22646 100644 --- a/Installation/install-from-bootable-usb.md +++ b/Installation/x86_64-v2/install-from-bootable-usb.md @@ -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. @@ -26,7 +26,7 @@ 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. @@ -34,20 +34,20 @@ Next we need to make the second partition this is the partition that the bulk of 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. diff --git a/README.md b/README.md index 680d654c..3d79e535 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/applications/BlissEthernetManager/BlissEthernetManager.md b/applications/BlissEthernetManager/BlissEthernetManager.md index e14e5446..c541c6d9 100644 --- a/applications/BlissEthernetManager/BlissEthernetManager.md +++ b/applications/BlissEthernetManager/BlissEthernetManager.md @@ -71,7 +71,7 @@ ADB Interface: ``` -adb shell service call blissethernet +adb shell service call blissethernet ``` @@ -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 '........')` \ No newline at end of file + `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 '....')` diff --git a/features/admin-restriction.md b/features/admin-restriction.md index c151e2b8..2e86578d 100644 --- a/features/admin-restriction.md +++ b/features/admin-restriction.md @@ -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 ``` diff --git a/features/images/image1.png b/features/images/image1.png new file mode 100644 index 00000000..9a583770 Binary files /dev/null and b/features/images/image1.png differ diff --git a/features/images/image2.png b/features/images/image2.png new file mode 100644 index 00000000..c70dac12 Binary files /dev/null and b/features/images/image2.png differ diff --git a/features/images/image3.png b/features/images/image3.png new file mode 100644 index 00000000..c7febd3d Binary files /dev/null and b/features/images/image3.png differ diff --git a/features/images/image4.png b/features/images/image4.png new file mode 100644 index 00000000..195287b6 Binary files /dev/null and b/features/images/image4.png differ diff --git a/features/images/image5.png b/features/images/image5.png new file mode 100644 index 00000000..707763ad Binary files /dev/null and b/features/images/image5.png differ diff --git a/features/images/image6.png b/features/images/image6.png new file mode 100644 index 00000000..0fd59ab2 Binary files /dev/null and b/features/images/image6.png differ diff --git a/features/images/image7.png b/features/images/image7.png new file mode 100644 index 00000000..329e80d5 Binary files /dev/null and b/features/images/image7.png differ diff --git a/features/images/image8.png b/features/images/image8.png new file mode 100644 index 00000000..328e4deb Binary files /dev/null and b/features/images/image8.png differ diff --git a/features/updates-and-ota.md b/features/updates-and-ota.md index 4086135d..154544ff 100644 --- a/features/updates-and-ota.md +++ b/features/updates-and-ota.md @@ -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 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": [ @@ -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** diff --git a/setup_and_configuration/Configuration-through-Command-Line-Parameters.md b/setup_and_configuration/Configuration-through-Command-Line-Parameters.md index 25ff2947..4fdd5969 100644 --- a/setup_and_configuration/Configuration-through-Command-Line-Parameters.md +++ b/setup_and_configuration/Configuration-through-Command-Line-Parameters.md @@ -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) @@ -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: