Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Halhadus committed Sep 9, 2024
0 parents commit bbf7fe6
Show file tree
Hide file tree
Showing 57 changed files with 916 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2.1

setup: true

orbs:
continuation: circleci/[email protected]
droidian-buildd: droidian-releng/droidian-buildd-orb@volatile

jobs:
setup:
executor: continuation/default
resource_class: small
steps:
- droidian-buildd/checkout
- droidian-buildd/generate
- continuation/continue:
configuration_path: generated_config.yml

workflows:
setup:
jobs:
- setup:
filters:
tags:
only: /^droidian\/.*\/.*/
96 changes: 96 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# xiaomi-begonia Adaptation Files for Droidian:

## What's works

### Camera:

droidian-camera or pinhole not working.

### Sensors:

* Brightness control: ✔

* Rotation: ✔

* Fingerprint: ? (temporary disabled)

* Auto brightness: ❌

* Proximity: ✔

* Vibration ✔

### Cellular:

* Calls: ✔

* Data: ✔

* SMS: ✔

* Carrier info: ✔

* Dual SIM: ✔(partialy)

* MMS: ✔

### Sound:

* Speaker: ✔

* Microphone: ✔

* Headphones: ✔

* Volume control: ✔

* Bluetooth Headphones: ✔

* Call audio: ✔

### Network:

* WiFi: ✔

* Bluetooth: ✔

* Hotspot: ❌ (can work with some fixes)

* NFC: ✔

### Misc:

* SDcard: ✔

* Waydroid: ✔

* GPS: ✔(partialy)

* Encryption: ❌

* MTP: ❌ (needed configuration not maked, can work)

## Thanks to:

* Rúben Carneiro (https://github.com/rubencarneiro)

* Sohrab Behdani (https://github.com/behdanisohrab)

* NotKit (https://github.com/NotKit)

* https://github.com/droidian-mt6765/adaptation-droidian-garden

* https://github.com/dyingwillow/droidian-rosemary

* https://gitlab.com/ubports/porting/community-ports/android10/xiaomi-redmi-note-8-pro/xiaomi-begonia/

* https://github.com/rubencarneiro/adaptation-xiaomi-begonia

## Links:
Support Group: https://t.me/begonia_linux/

Kernel: https://github.com/begonia-linux/linux-android-begonia

Organization link: https://github.com/begonia-linux

### Main porter: Halhadus (https://github.com/Halhadus)
3 changes: 3 additions & 0 deletions debian/adaptation-begonia-android.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/usr/lib/droid-system-overlay/mnt
/usr/lib/drois-system-overlay/metadata
/usr/lib/droid-vendor-overlay/etc
3 changes: 3 additions & 0 deletions debian/adaptation-begonia-android.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
usr/lib/droid-system-overlay/mnt /usr/lib/droid-system-overlay/
usr/lib/droid-system-overlay/metadata /usr/lib/droid-system-overlay/
usr/lib/droid-vendor-overlay/etc/* /usr/lib/droid-vendor-overlay/etc
15 changes: 15 additions & 0 deletions debian/adaptation-begonia-configs.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/etc/dbus-1
/etc/environment.d
/etc/modules-load.d
/etc/ofono/ril_subscription.d
/etc/pulse
/etc/systemd
/etc/udev/rules.d
/lib/systemd/system/bluebinder.service.d
/lib/systemd/system/systemd-modules-load.service.d/
/usr/bin
/usr/share/glib-2.0/schemas
/usr/lib/systemd/system
/usr/lib/systemd/user
/mnt/vendor
/var/lib
8 changes: 8 additions & 0 deletions debian/adaptation-begonia-configs.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
etc/* /etc
lib/systemd/system/* lib/system/system
mnt/vendor /mnt
usr/bin /usr
usr/lib/droidian /usr/lib
usr/lib/systemd /usr/lib
usr/share /usr
var/lib/* /var
Empty file.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
adaptation-xiaomi-begonia (0.0.0+git202303252918331.6d41b85.main) main; urgency=medium

* Inıtial setup

-- Halhadus <[email protected]> Mon, 9 Sep 2024 08:23:45 +0330

1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
13
30 changes: 30 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Source: adaptation-xiaomi-begonia
Maintainer: Halhadus
Section: metapackages
Priority: optional
Build-Depends: debhelper (>= 10)
Standards-Version: 4.5.0.3
Vcs-Browser: https://github.com/begonia-linux/adaptation-xiaomi-begonia
Vcs-Git: https://github.com/begonia-linux/adaptation-xiaomi-begonia.git

Package: adaptation-xiaomi-begonia
Architecture: all
Depends: ${misc:Depends},
linux-bootimage-xiaomi-begonia,
adaptation-hybris-api29-phone-dual-sim,
adaptation-begonia-configs,
droidian-camera,
mobile-power-saver,
python3-evdev
Description: adapatation-xiaomi-begonia- meta
begonia api29 adaptation metapackage

Package: adaptation-begonia-configs
Architecture: all
Depends: ${misc:Depends},
Description: begonia's specific adaptation configs

Package: adaptation-begonia-android
Architecture: all
Depends: ${misc:Depends},
Description: begonia's specific adaptation for Android. This will disable many Android binaries, remove me if something breaks.
3 changes: 3 additions & 0 deletions debian/debhelper-build-stamp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
adaptation-xiaomi-begonia
adaptation-begonia-configs
adaptation-begonia-android
3 changes: 3 additions & 0 deletions debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
cp -rf /etc/environment.d/environment /etc/environment
rm /etc/ofono/ril_subscription.conf
4 changes: 4 additions & 0 deletions debian/preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
groupadd --gid 9997 android_everybody
useradd -u 1018 -g 1018 usb -s /bin/true
usermod -aG tty,disk,kmem,dialout,plugdev,systemd-journal,systemd-network,input,kvm,render,netdev,bluetooth,pulse,pulse-access,system,radio,android_bluetooth,android_graphics,android_input,android_audio,android_camera,android_log,android_compass,android_wifi,android_media,android_sdcard_rw,android_vpn,android_usb,android_gps,android_media_rw,android_mtp,android_drmrpc,android_everybody,android_nfc,android_sdcard_r,android_mediadrm,android_debuggerd,android_cache,android_net_bt_admin,android_net_bt,android_inet,android_inet_raw,android_inet_admin,android_readproc,android_wakelock,android_uhid,android_misc,android_audioserver,android_mediacodec,android_cameraserver droidian
10 changes: 10 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/make -f

%:
dh $@

override_dh_installsystemd:
dh_installsystemd -padaptation-begonia-configs --name=brightness brightness.service --no-start
dh_installsystemd -padaptation-begonia-configs --name=droidian-perf droidian-perf.service --no-start
dh_installsystemd -padaptation-begonia-configs --name=modules modules.service --no-start
dh_installsystemd -padaptation-begonia-configs --name=pbhelper pbhelper.service --no-start
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)
5 changes: 5 additions & 0 deletions etc/dbus-1/session-local.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<busconfig>
<policy context="mandatory">
<allow user="root"/>
</policy>
</busconfig>
2 changes: 2 additions & 0 deletions etc/environment.d/environment
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_libhybris.json
HYBRIS_LD_LIBRARY_PATH=/vendor/lib64/soundfx:/vendor/lib64/hw:/vendor/lib64:/system/lib64:/apex/com.android.runtime/lib64:/apex/com.android.runtime/lib64/bionic
4 changes: 4 additions & 0 deletions etc/modules-load.d/connectivity.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bt_drv
fmradio_drv
gps_drv
wlan_drv_gen4m
2 changes: 2 additions & 0 deletions etc/modules-load.d/performance.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fpsgo
met
25 changes: 25 additions & 0 deletions etc/ofono/ril_subscription.d/mtk.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Ofono configuration for MediaTek devices

[Settings]
#EmptyConfig=false
#Identity=radio:radio
#3GLTEHandover=true

emptyPinQuery=false
radioPowerCycle=false
confirmRadioPowerOn=false
networkSelectionManual0=false
cellInfoIntervalShortMs=0
useDataProfiles=true
mmsDataProfileId=1001
# RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
rilRequestOnSetUdub=13

[ril_0]
transport=binder:name=slot1;[email protected]
name=slot1

#[ril_1]
#transport=binder:name=slot2;[email protected]
#name=slot2
#SIM2 working but ofono can crash sometimes, disabled for safe usage.
5 changes: 5 additions & 0 deletions etc/pulse/arm_droid_card_custom.pa
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/pulseaudio -nF
# fix volume not being adjustable
.ifexists module-droid-card.so
load-module module-droid-card rate=48000 voice_virtual_stream=true quirks=+no_hw_volume
.endif
49 changes: 49 additions & 0 deletions etc/systemd/logind.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the logind.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/logind.conf' to display the full config.
#
# See logind.conf(5) for details.

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
HandlePowerKey=ignore
HandlePowerKeyLongPress=ignore
HandleRebootKey=ignore
HandleRebootKeyLongPress=ignore
HandleSuspendKey=ignore
HandleSuspendKeyLongPress=ignore
HandleHibernateKey=ignore
HandleHibernateKeyLongPress=ignore
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodesMax=
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#StopIdleSessionSec=infinity
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Service]
ExecStart=-/usr/bin/chown droidian:droidian /dev/mtk_disp_mgr
2 changes: 2 additions & 0 deletions etc/systemd/user/pulseaudio.service.d/10-env.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Service]
Environment="HYBRIS_LD_LIBRARY_PATH=/apex/com.android.runtime/lib64:/apex/com.android.runtime/lib64/bionic:/system/lib64:/vendor/lib64:/vendor/lib64/hw:/vendor/lib64/soundfx"
Loading

0 comments on commit bbf7fe6

Please sign in to comment.