yashsingh1/xdaforums huggingface dataset:
[Raspberry Pi Original Development] Shidduxda:
How to Build custom Kernel module for aosp13 for Raspberry Pi ?​

Followed Steps

Establish Android build environment and install repo.

Initialize repo:

repo init -u https://android.googlesource.com/kernel/manifest -b common-android13-5.15-lts
curl --create-dirs -L -o .repo/local_manifests/manifest_brcm_rpi4.xml -O -L https://raw.githubusercontent.com/raspberry-vanilla/android_kernel_manifest/android-13.0/manifest_brcm_rpi4.xml

Sync source code:

repo sync

Compile

BUILD_CONFIG=common/build.config.rpi4 build/build.sh

Added new module to Kernel13 in kernel13/common/drivers/invcase

Added module to Menuconfig:

cd kernel13/common/drivers/invcase/Kconfig

Invcase Device configuration​

Kconfig file contents

menuconfig INVCASE tristate "Inverse Characters Case"
default y

help Say Y to include this module Say N will not build this module Say M to build this module but not include to kernel yet

Append invcase to list of menu:

kernel13/common/drivers/Kconfig

Kconfig file contents

source "drivers/invcase/Kconfig"

Add module to Makefile:

kernel13/common/drivers/invcase/Makefile or kernel/arpi/drivers/invcase/Kbuild

makefile contents

obj-$(CONFIG_INVCASE) += invcase.o

Append invcase to list of modules:

kernel13/common/drivers/Kbuild or kernel/arpi/drivers/Makefile

makefile contents

obj-$(CONFIG_INVCASE) += invcase/

Builded the Kernel

Compile

BUILD_CONFIG=common/build.config.rpi4 build/build.sh

Compiled kernel Image, dtbs, and overlays can be found in out/common/arch/arm64/boot directory.

Replaced existing files in device/brcm/rpi4-kernel directory of the Android source tree to include them in Android 13 build. You can also replace existing files in the boot partition of Raspberry Pi 4 Android 13 image.

BUild AOSP:

m all -j$(nproc)

Problem is that module i am building is being built successfully but When try to check whether kernel Intialized successfully or not with this command

ls -l /dev/invcase

, it shows file not found? please help
[Raspberry Pi Original Development] KonstaT:
The kernel build steps look fine but better question would be why? What is invcase (invcase.c you've added) and what is it used for?
[Raspberry Pi Original Development] Shidduxda:
I am attempting to work with a custom kernel module named "Invcase.c" in the AOSP 13 build . I referred to the blog at https://www.codeinsideout.com/blog/android/kernel-module/ and successfully implemented the module in AOSP 11. However, when I try to replicate the process in the AOSP 13 build from your repository, I encounter the above mentioned issue. I want to work with the full stack in AOSP 13.
[Raspberry Pi Original Development] KonstaT:
Ok, so it's just an example.

Have you checked that you have CONFIG_INVCASE=y in your defconfig and you've actually built the driver? Are you sure that you're using the kernel you've built (as your steps for building AOSP don't match anything I provide at least)?
[Raspberry Pi Original Development] Shidduxda:
Thanks
[Raspberry Pi Original Development] KonstaT:
Edit. wrong topic.🤦‍♂️
[Raspberry Pi Original Development] Shidduxda:
Added CONFIG_INVCASE=y in lineageos_rpi4_defconfig , kernel module is loading now, thank you.
[Raspberry Pi Original Development] mrnck:
Hello Konsta, I bought Full box Waveshare with CM4 module. It can run with Pi OS but cannot in AOSP. I have tried with AOSP13, AOSP14 in your website but it stand at Android or sometime Rainbow screen. Are there any advise for me?

Note: CM4 and board is work when I use HDMI to connect with Desktop Screen.
[Raspberry Pi Original Development] tam.tn:
i got the same issues.

i am using CM4-DISP-BASE-7A-BOX (https://www.waveshare.com/wiki/CM4-DISP-BASE-7A-BOX), and have installed AOSP13-20230615-KonstaKANG-rpi4(Android-13).

i got issues with DISP0, i had to use twrp for the aosp 13 kernal and dtoverlay=vc4-kms-dsi-waveshare-panel,7_0_inchC,i2c1 or another config: dtoverlay=vc4-fkms-v3d

kindly let me know is it a known issues or some DIY can help the cause.

note that: hard ware works normally with Rasperry OS with /boot/dt-blob.bin and dtoverlay=vc4-fkms-v3d as guide from waveshare.

Thanks all!
[Raspberry Pi Original Development] KonstaT:
For builds with Linux 6.1 kernel (i.e. AOSP14) please see https://github.com/lineage-rpi/android_ ... /issues/32 and e.g. http://disq.us/p/2v90bvx & http://disq.us/p/2wljt58 for previous discussion.
[Raspberry Pi Original Development] tam.tn:
Hi Konsta,

Thank you for your reply.

i checked Linux 6.1 kernel (i.e. AOSP13) with below steps:

1. Flash AOSP13-20230615-KonstaKANG-rpi4(Android-13)

2. Edit config.txt file to enable use port: dtoverlay=dwc2,dr_mode=host

3. Start device (CM4-DISP-BASE-7A-BOX) with hdmi monitor, copy AOSP13-20230615-KonstaKANG-rpi4-6.1-kernel.zip to device (via external usb)

4. Settings -> System -> Raspberry Pi settings -> Boot to TWRP recovery

5. Install AOSP13-20230615-KonstaKANG-rpi4-6.1-kernel.zip from selected storage

6. Delete /boot/resolution.txt and change /boot/config.txt: dtoverlay=vc4-kms-dsi-waveshare-panel,7_0_inchC

7. Boot out of recovery

But nothing in my waveshare screen. Please correct me!

Right now i will double check with Linux 6.1 kernel (i.e. AOSP14)
[Raspberry Pi Original Development] tam.tn:
Hi Konsta,

With Linux 6.1 kernel (i.e. AOSP14), in step 6, i also comment camera_auto_detect and disable_overscan and Graphics acceleration as below:

# Camera

#camera_auto_detect=1

start_x=1

# Display

#disable_overscan=1

# Graphics acceleration

[gpio21=1]

#dtoverlay=vc4-kms-v3d

#dtoverlay=cma,cma-512

[all]

dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch

include config_user.txt

i tried with dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch and dtoverlay=vc4-kms-dsi-waveshare-panel,7_0_inchC [also with para i2c1], but nothing happens on my 7" waveshare screen. Could you please share your config.txt?
[Raspberry Pi Original Development] tam.tn:
when i used /boot/dt-blob.bin and config dtoverlay=vc4-fkms-v3d as waveshare suggested, screen hung at android logo.
[Raspberry Pi Original Development] KonstaT:
First of all start with the latest AOSP14 release - not something from last June.

I don't know which DSI panel this set actually contains. It's not any of these https://github.com/raspberry-vanill...arch/arm/boot/dts/overlays/README#L4571-L4586 as the specs say 7" 800x480? There's also Waveshare DSI displays that are compatible with the official Raspberry 7" DSI display. Have you tested what it says on the FAQ about that?

And yes, you need to place dt-blob.bin to boot partition on CM4 to use DSI display and/or CSI camera. These are available for different combinations on the official CM4 documentation (which I'm unavailable to find as they've moved things around but the files are cmio/dt-blob*.bin at https://datasheets.raspberrypi.com/).
[Raspberry Pi Original Development] tam.tn:
Thanks for your reply.

i did testing with AOSP14-20240104-KonstaKANG-rpi4 (and also updated to Linux 6.1.65 kernel)

i tried with some config (deleted resolution.txt):

1. Option 1: dtoverlay=vc4-kms-dsi-7inch

/boot/config.txt

# Display panel

[gpio21=1]

#dtoverlay=cutiepi-panel

dtoverlay=vc4-kms-dsi-7inch

2. Option 2: dtoverlay=vc4-kms-dsi-7inch with cmio/dt-blob-disp0-only.bin from https://datasheets.raspberrypi.com/

/boot/config.txt

# Display panel

[gpio21=1]

#dtoverlay=cutiepi-panel

dtoverlay=vc4-kms-dsi-7inch

3. Option 3: dtoverlay=vc4-kms-dsi-waveshare-panel,7_0_inchC,i2c1

/boot/config.txt

[all]

#dtoverlay=vc4-kms-dsi-waveshare-panel,7_0_inchC,i2c1

4. Option 4: dtoverlay=vc4-kms-dsi-waveshare-panel,7_0_inchC,i2c1

/boot/config.txt

[all]

#dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch,i2c1

Note that with Raspberry OS (Bullseye version), it's working with /boot/dt-blob.bin (from waveshare) and config dtoverlay=vc4-fkms-v3d as their suggestion.

With AOSP 13 and AOSP 14, screen can work in TWRP boot mode, but it can not work in normal mode
[Raspberry Pi Original Development] tam.tn:
Detail of screen can be found at:https://www.waveshare.com/7inch-Capacitive-Touch-LCD-G.htm

7inch Capacitive Touch LCD (G) 800 × 480

TOUCH CONTROLLER GT911

7inch Capacitive Touch LCD (G) - Waveshare Wiki

www.waveshare.com
[Raspberry Pi Original Development] KonstaT:
It's not a DSI display to begin with - it uses DPI interface.

You would need to ask Waveshare on how to use this with KMS driver (there's at least the 'vc4-kms-dpi-generic' overlay for this). Using the fake/firmware FKMS in not an option on Android.
[Raspberry Pi Original Development] tam.tn:
thanks for your reply, I'm going to contact waveshare.

If there are any suggestions, please tell me.

Thanks for your support.
[Raspberry Pi Original Development] Shidduxda:
Hi Konsta ,

I use to enable gpio pins like this,

rpi4:/ $ su
rpi4:/ # echo 17 > /sys/class/gpio/export
rpi4:/ # echo in > /sys/class/gpio/gpio17/direction
rpi4:/ # cd /sys/class/gpio
rpi4:/sys/class/gpio # ls
export gpio17 gpiochip0 gpiochip504 unexport
rpi4:/sys/class/gpio # cat gpio17/value
1
rpi4:/sys/class/gpio # cat gpio17/value
0
rpi4:/sys/class/gpio # cat gpio17/value
1
rpi4:/sys/class/gpio #

, Now After adding my custom Kernel module CONFIG_INVCASE=y , i am not able to do above things(enable certain gpio pin to read the high and low of that pin). need your help with this?
[Raspberry Pi Original Development] morgiee:
I've installed this build on my pi 4 4gb model and a 400gb SD SanDisk card. Heatsink and fan installed. So far really impressed with the build. I have a few snags which may be an easy enough fix?

1. When streaming a 1080p movie on it, although the resolution is set to 1920x1080x60. The image is quite washed out and pixelated at points. The screen I'm using is a 55" Phillips 4k. If I go into the pi setting and change the resolution to 4k, the image studders, like it's struggling to process, so I put it back to 1920x1080p.

Interestly if you watch a catch-up programme is 1080p it's buttery smooth and sharp ha.

2. I use expressvpn as my VPN client. I use the most recent android app of this program which supports android 13 and 14. The app installs fine, opens fine but as soon as I connect to any VPN location, the app instantly closes.

A notification message then appears on the android homepage saying VPN connected. Then 2 seconds later VPN disconnected.

Other than that can't fault the build and tha I you for making it possible 👍👍
[Android Head-Units] MingQin12:
Hi everyone, I am using the 7862 android player, now facing the Bluetooth issue, the player can't scan and connect with the phone, there is also a "activation error" sign in the Bluetooth page. Besides, the Bluetooth version in the settings page has become "unknown blink". Anyone know how to solve it. Thanks in advance View attachment 5690231
[Android Head-Units] ezazah_1:
Did you come to a solution?
[Android Head-Units] Matt Devo:
you need to prepare an update USB and change the BT type in the config file. it's either 0 or 1
[Android Head-Units] ezazah_1:
Please explain more with a picture or a video, I'm in the same problem
[Android Head-Units] SEBMIC:
Hello guys, I have exactly the same problem about bluetooth, any idea?
[Android Head-Units] hasani19:
Hi, although the main post is pretty old, but it seems that this issue is not that uncommon regarding @SEBMIC recent post and the fact that I have the same problem now! I have a Winca S300+ (QG855A) with a UIS8581A (SC9863A) CPU. My Bluetooth Version was like BLINK_2161_RELEASE/2022:18:26:05:39:14_blink, but after installing VIVID Launcher and the uninstalling it, the Bluetooth version changed to "Unknown_blink" just like the original post's screenshot; my Bluetooth phone app also stopped working. Thanks to @Matt Devo I could get my Bluetooth app back to working state, but the Bluetooth Version is shown as "10-29_Built-in". I even got the original Firmware from reseller and flashed the device but it didn't resolve the issue, after flashing Bluetooth Version was back to "Unknown_blink". Something I noticed is that MCU version is ZHAN2_53_L6315_N32P48F64_V:1.0 while according to @surfer63 and his great post: "General FYT based Spreadtrum uis7862(s) (unisoc ums512) & uis8581a (sc9863) - Q&A, Mods, tips, firmware", L6315 is for UIS7862. Could it be the root of this problem, that a wrong firmware was installed on the device? Although my BT app works now but the range and quality is worse than the time when Bluetooth Version was BLINK_2161. I know even it's advised on this forum to enable built-in module to have a better Bluetooth functionality, but unfortunately it's the opposite for me! So, after this long explanation, my main question is that, how can I get my device back to BLINK_2161 version? Why flashing the ROM didn't fix the issue? Could it be helpful if I use ADB to inject the ROM instead of using the device automatic ROM installer?

Any help would be greatly appreciated.

UPDATE: Right now when brushing my teeth this came to my mind, hmm let's see if uninstalling VIVID Launcher deleted/disabled my BT module, what happens if I install it again... and guess what, BLINK_2161_RELEASE is back under my Bluetooth Version section. Now the question is how can I safely uninstall this buggy launcher without hurting my system components?

​
[Android Head-Units] hasani19:
Try installing VIVID launcher if you've had this launcher installed and then you have uninstalled it. You can read my first post here.
[Touch Pro, Fuze General] ld-runner:
using TouchFlo 3d. syncing with an Exchange server. i really like the home screen on the TouchFlo interface, but the calendar portion shows all day calendar events. How can i disable that. i do not want to see 'All Day' events.

Thanks
[Touch Pro, Fuze General] lollonais:
You mean from the main screen, underneath the clock? I wish I could see all my day events under the clock on the main screen. All I see is the earliest one.
[Touch Pro, Fuze General] noellenchris:
There must be a reg setting under HTC somewhere that controls what events are displayed....I'm not that good with this kind of stuff, but I'm gonna try and search the reg and see if I see anything like this....If anyone else has any luck, please post your results....thanks
[Samsung Galaxy Tab A7 Lite] Difficul:
Tab của mình bị chết mấy ngày rồi, mình thử hồi sinh lại thì kết nối được với máy tính của mình trình quản lý thiết bị hiển thị máy nhưng không hiển thị liên tục, ai đó làm ơn giúp mình vấn đề kết nối tab cứng với máy tính với
[Samsung Galaxy Tab A7 Lite] Difficul:
help me ....
[Samsung Galaxy Tab A7 Lite] Difficul:
View attachment 5690403
[General Questions and Answers] Ferdoh:
Hi so last night I tried rooting my device everything was was going good until I installed pixel experience now my mobile is stuck in a constant boot loop I have tried everything I can think off the mobile is constantly rebooting its self I have let the battery die and still having the same out come I can not even boot into download mode using button combinations nor recovery the buttons on the mobile are fine as its only a few weeks old this all happened as soon as I installed pixel experience I am no expert at this and I know I have messed something up but any insight would be great I am using TWRP recovery but unfortunately its not letting me boot into that either nor can my pc detect it to connect to odin

Samsung a53

SM-536B/DS

VERSION 12
[Razer Phone 2 Questions & Answers] Titanricky8:
Does anyone here know when it would be possible to have any MIUI rom for the razer phone 2? currently using lineage os unnoficial pixel experience build and i wanted to try out different roms but i can only find crdroid, ressurection remix, evolution x but its discontinued. does anyone also have experience with these roms on their razer phone 2? by that being said: dolby atmos module, logo+, universal safety net fix module, and gapps being applicable? i know ever since i unlocked the bootloader my phone was gonna be better but also not like stock(fluency and stability) , ever, and thats all i want since razer didnt update the phone and im looking for my best option of a rom to use.
[Upgrading, Modifying and Unlocking] ctradio:
The title about says it all. I'm on an AT&T business plan via work and we get our choice of upgrades every 18 months or so. I'm trying to plan my next upgrade. Just curious if there is anything at all that is either a developer edition or something with an unlockable bootloader. Sure I know the answer already but figured I'd check anyway! Even if it is hackable to get unlock I'd love to know. Thanks!
[Upgrading, Modifying and Unlocking] ze7zez:
Could you please write to me as for a child 🧒 what is it about?

I guess I'm stupid because I didn't understand anything. o_O
[Upgrading, Modifying and Unlocking] ctradio:
Most carriers sell phones with bootloaders that cannot be unlocked. Sometimes though there are hacks/exploits to get access and unlock a bootloader that cannot be unlocked. Usually if one wants a bootloader unlockable phone they have to buy directly from Google (or Best Buy or Amazon or other retailer that sells fully unlocked devices). An unlockable bootloader allows you to customize software on your device and make it run or do the things you want. Carriers don't like that ... quite frankly IMHO it's 100% about monetization of you, the product. If you are interested, stay FAR away from Samsung stuff. None of it is unlockable here in the states without an exploit (correct me if I'm wrong).
[Upgrading, Modifying and Unlocking] ze7zez:
This post is obvious, but ...

Did I understand correctly from the first post that you work for AT&T and would like to break the locks on phones ordered from manufacturers for the employer/client?
[Upgrading, Modifying and Unlocking] ddougg:
See if they have a Pixel or Xaomi and you have a prayer. Other options would be talking a majority of CO workers into T Mobile stage a rebellion over phones they give you cuz they spy on you. Let freedom reign!
[Introductions] Qubidk:
Just registered, big time gadget enthusiast.
[Wear OS Q&A, Help & Troubleshooting] Fra078:
View attachment 5690299

Unfortunately, last year Telegram decided to remove the official Telegram app for Wear OS from Play Store forcing users to install the old application(with some compatibility problems with notfications, stickers and media). When I started developing Weargram I wanted to create an app functional, modern and simple to update. This was possible thanks to TDLib(Telegram Database Library) and Jetpack Compose for Wear OS. Thanks to these powerful tools I can easily keep the app updated.

Current features:​

Standalone app (Smartphone app is not required)

Creating a new chat

Send and receive voice notes and text messages

Receiving images

Explore users profile

Channels, group and Supergroup supported

Notifications

Features under development:​

Send/Receive Stickers and GIFs

Receive Video Notes

Animated Emoji

Layout and performance improvement

Auto-download and more settings

Archived chats support

Localization

Improved notifications

The app will have a small price and will be published soon.
[Wear OS Q&A, Help & Troubleshooting] rodken:
@Fra078 Are you up to creating a browser app for WearOS that would be somewhat useful considering that the majority of the current ones in the Playstore are close to being useless as useless can get?
[Wear OS Q&A, Help & Troubleshooting] KKona22:
Made an account just for this post, can't wait! :)
[Wear OS Q&A, Help & Troubleshooting] Badger50:
Thread closed. @Fra078 Please check your PM inbox. Thank you.

-Regards: Badger50
[Google Pixel 5 Questions & Answers] soCram:
Dear all,

I'm searching for a possibility to enable all icons on the AOD display instead of some icons being replaced with a dot. Does anyone have an idea if this is possible and how? I did have a look at all the magisk mods and also at system ui tuner, but didn't find any solution for this.

Kind regards

socram
[Android Q&A, Help & Troubleshooting] TrueKotyara:
Hello, I have a problem, when using a proxy on android, I hide my ip, but sites through WebRTC see my public ip(

how can i make public ip as my ip with proxy

Tried v2rayNg+adGuard, but only managed to hide it, which doesn't work

does anyone know other options?
[Android Q&A, Help & Troubleshooting] joke19:
Bromite webview
[Android Q&A, Help & Troubleshooting] TrueKotyara:
this browser disables public IP.

i need to change
[Android Q&A, Help & Troubleshooting] joke19:
Webview not browser, but okay
[Android Q&A, Help & Troubleshooting] TrueKotyara:
maybe I misunderstood something? is this app?
[Android Q&A, Help & Troubleshooting] joke19:
SystemWebView releases

SystemWebView releases

www.bromite.org
[Redmi Note 11 (spes/spesn)] Lister Of Smeg:
Hi All,

Day by day, another MIUI quirk/challenge... Things that were easy and possible under other phones and stock Android versions seem ever so more challenging under MIUI....

So, I purchased a nice 128GB SD Card to go with the built in storage. Mainly for moving data around, so don't loose it...

However due to Android 4.4 and beyond, Google make it difficult to write access this. However other File Managers and Android versions in past, I've managed to re-enable this. However with this phone, so far I have not found to a way to unlock it yet??

The usual app (FX Explorer) doesn't work, says I can't unlook the root of the SD Card, only individual folders... which it then complains, isn't the root.... (yeah, I know that... you wouldn't let me unlock the root of SD).

I try MIUI Storage settings, but that has nothing in there to unlock it....

I then install Google Files, as strangley a guide says that'll work... it doesn't....

There was then a guide with the stock Xiaomi File Manager to unlock write access to SD Card, yet the options in the guide don't exist in this version. And can't see how allowing access to my Contacts in File Manager and then clearing the settings would fix it anyway? :p

So now running out of idea's to allow access to SD Card... T'was so simple on other Android devices.....

Cheers, Lister
[Redmi Note 11 (spes/spesn)] Lister Of Smeg:
Update: Seems I am not alone, many have this bug and looks not to be fixed.... or consistently fixed. Very hit and miss.... :(

https://www.reddit.com/r/miui/comments/joxuhi
[Redmi Note 11 (spes/spesn)] Lister Of Smeg:
The plot thickens.... or not, so it seems !!!

So under Developer Settings, there is an options to "Force Write Access to External SD for all Apps" so I have enabled this and it has done..... diddly squat !!! :(

What's the point of providing an SD Card slot, with no write access...?? :(

Lister
[Redmi Note 11 (spes/spesn)] Lister Of Smeg:
Hi All,

Has anyone had any luck getting an Ext SD Card to be writable between apps....?? As all the usual methods that I know of, and apps (FX) that have worked in the past, don't work.

The OS built in settings don't work, and the hidden Developer Settings to force write access don't work....

So at this point, I am racking my brians why Xiaomi even bothered to include an SD Card slot, as currently its pointless and redundant !!!

I'm having to copy it from the Internal memory, onto PC, then from PC back onto Exteral.... and it's slow as hell and doesn't always work... :( It's a brand new SanDisk MicroSD purchased from large retail store... So not like its some iffy thing off eBay.

Cheers, Lister
[Redmi Note 11 (spes/spesn)] thestupiddev-chris:
Thats, lets say, weird. i never had that problem, try finding something in the developer options?

if nothing worked, then root your phone i guess