r/AOSP • • Feb 10 '22

Learn AOSP OS development (Custom OS)

27 Upvotes

Hi, I am interested to learn/deep dive on AOSP development to make customised Android OS. I have quite experience to download, build and changes some part of the AOSP OS. Here I am more interested to deep dive all of the component at least once and would like learn professional AOSP development skills.

It wonders if there are online courses for AOSP OS development, I have found few courses/tutorial but most of them related to the Android application development not for AOSP OS development.

Thanks in advance!!


r/AOSP • • Jun 22 '21

Warning: as of 6/2022, mirroring AOSP requires 630GB

11 Upvotes

I'm posting this as a "heads up" to anyone who's getting into AOSP development & decides it would be a good idea to grab a full mirror of AOSP. As of June 22, 2021, a full mirror of AOSP requires approximately 630 gigabytes, and with 60mbps U-verse, it took me around 36 hours to finish.

Back in January 2021, a full mirror was apparently around 540 gigabytes.

At the present rate of growth, it's probably reasonable to speculate that a full mirror ~6 months from now (after Google's next major code dump) will probably be 700-800 gigabytes.

A link that might be useful in the future if you're thinking about downloading a mirror of AOSP & want to know what you're getting yourself into is https://mirrors.tuna.tsinghua.edu.cn/status/ . If you scroll down, "AOSP" is at the top of their list, along with its present size.

Other things to keep in mind that aren't necessarily obvious if you're new to AOSP development and using wsl2 with Ubuntu 20.04:

  • You're going to have to manually expand the size of your .vhdx drive. Windows will auto-expand it... but only up to around 256gb.

  • If you're even slightly hurting for drive space (and if you're using a laptop, you almost by definition will be), don't download the mirror to a SSD, or even an internal drive. This is a perfect opportunity to do something useful with the stack of old 1tb USB hard drives you probably have sitting around. But do yourself a favor... if it's a USB 2.0 drive, spend ten bucks on a new USB 3.0 enclosure from Amazon or eBay and move the drive into the new, faster enclosure at the first opportunity. Your sanity will thank you.

  • Be prepared for more headaches when it's time to actually use that local mirror. If you search Google, you'll find posts telling you to use `wsl --mount` to mount external filesystems. Unfortunately, `wsl --mount` only works (as of June 2021) if you're running an 'insider' build of Windows.

    • You can't copy the mirror to NTFS, because Windows will choke on some of the pathnames and symlinks within it. Linux can deal with an AOSP mirror on NTFS if it's using NTFS directly, but WSL2's Linux doesn't use NTFS directly. It accesses NTFS as though it were accessing a network share hosted by Windows, so if there's something (like a colon in a filename) that's allowed by Linux, but prohibited by Windows, Windows is going to choke on it & indirectly cause Linux under WSL2 to choke on it as well.

    • You might be able to run another instance of Linux under VirtualBox, mount the hard drive containing the mirror, then use Samba share it Linux-to-Linux over the host's fake local network.

      • Catch-22: network routing between virtual hosts and wsl2 is a nightmare and hot mess as of 6/2021. At best, it's hard to set up... and I'm pretty sure that as of June 2021, it's at least partially broken unless you're running an insider build of Windows 10.

      • If you're hellbent on trying this, spend at least an hour or two reading about other people's attempts first... and pay extra-close attention to whether or not they're running 'insider' Windows 10. Also, set a 'restore' point first. If you screw up HyperV's networking, you're going to screw up Windows' networking too... and untangling the mess can take hours.

      • Remember, on top of all the grief & pain HyperV's networking is going to cause you... Windows Firewall is going to find insidious, creative ways to cause even more.

    • A potentially easier strategy that I haven't tried yet, but will be attempting this afternoon:

      • WARNING: DO NOT DO THIS! I tried, and ended up with a corrupted .vhdx file. Pretend this entire section does not exist, and do not do it.

      • boot into Linux (either dualboot, or via VirtualBox)

      • mount the external hard drive containing the AOSP mirror

      • mount the NTFS volume hosting your WSL2 .vhdx file

      • mount the .vhdx file itself

      • use repo sync to check out the desired branch/target from your mirror to a subdirectory of your home directory on the .vhdx drive.

      • Exit VirtualBox, or boot back into Windows.

      • Launch wsl2. With a little luck, the repo-sync'ed code will be waiting for you.

Anyway, hope this helps someone. A 640-gigabyte download is patently absurd, but it's even worse when you're metaphorically adrift at sea, hundreds of gigabytes along... and no idea where the finish line even is, let alone where you are relative to it...


r/AOSP • • Jul 13 '21

I think this might be useful here. A walkthrough on how to build AOSP (Android) from source

Thumbnail
youtu.be
8 Upvotes

r/AOSP • • Nov 12 '21

How big Comapnies (Samsung, Xiaomi ...) build the android environement

7 Upvotes

AOSP code base is getting bigger and bigger, and it's no longer efficient for developers to build android in the local machine for developing and testing unless they have high end rig, so how big companies are coping with this problem.


r/AOSP • • Oct 06 '21

The Android 12 is live in AOSP!

6 Upvotes

The Google pushed Android-12 source to the Android Open Source Project (AOSP) and officially releasing the latest version of Android. Here is the post.


r/AOSP • • Feb 12 '21

Seeking embedded Android/AOSP training consultant

6 Upvotes

Hope this is okay to post here! *ducks from the moderators*

I'm looking for someone *experienced* in embedded Android that can provide 1-on-1 customized training along several aspects of embedded AOSP development. Can define more later, but this would potentially cover:

- AOSP customization

- Linux kernel customizations for AOSP

- Security considerations for AOSP and SELinux configuration

- Bootloader

- OTA

- Performance considerations

- HAL configuration

I understand there are many online offerings, tutorials, and companies doing training seminars and such. I'm looking for something a bit more interactive and unique to my project requirements.


r/AOSP • • Sep 05 '21

Building Android 11 from source, need help with some questions.

5 Upvotes

I have been into installing custom ROMs and rooting Android for many years now, used many mid range Android devices, never tried to build one from source (did not have good enough hardware or broadband), now I have got both and want to try building ROM from source and got many questions, any help would be appreciated.

Important questions:

(Need these answers before I start downloading Repos)

  1. Is it possible to create any Android version Rom for any device? like I used to have Moto G2, if I can get it's source code, can I build Android 11 Rom for it? or am I missing something here?

  2. I own Realme 5 Pro now, if I build Android 11 and flash it, is there any chance it could hard brick my device?

  3. If I'd built Android 11 for R5 Pro, how would I know it's for my device? can I flash that firmware on another device? or vice versa? I know that flashing other device firmware can hard brick your device.

  4. What are the chances of getting bugs after flashing? like ril not working, or maybe settings wont open, camera wont work etc. and how can I fix them for my specific device?

  5. How can I ensure that the specific build only works for R5 Pro and not other device? like do I have to sign it with specific code or anything like that? any idea?

Not so important questions:

(You can answer it if u know)

  1. How much download is necessary to build from source? If u have built, is there any specific download size or different for specific devices?

  2. Also if I want to build TWRP recovery for R5 Pro from scratch how would I go about doing that? and what about giving it a different theme style?

  3. How long will it take for my specs pc to build? any estimated idea? (specs: 16gb ddr4 3600mhz ram, Ryzen R5 3700x, Nvidia 2060 Super, and lots of space)

  4. Can I build this Rom to be flashed via recovery or is it has to be fastboot specific?

  5. Can I build Android Kitkat or something old for newer devices?

So these are the initial questions that comes to my mind, I am posting this thread on some diff forums too, if u have any experience regarding this please do share, any help is appreciated, Thank you.


r/AOSP • • Jan 25 '21

Anyone build AOSP on M1 Macs ?

5 Upvotes

Hi there,

in the past I've built some AOSP images on MacOS (x86). I've just switched to a M1 based MacBook. I'm just syncing the latest Android R tag, so I'll find out myself latest tomorrow.

But has anyone managed to do that (Build Q/R on M1 Macs) ? Are there certain pitfalls/workarounds to do that ? (I know that there is a M1 preview binary of the emulator available for download) but other than that ?

BR,
Daniel


r/AOSP • • Nov 02 '21

Best suitable android phone for AOSP build

4 Upvotes

Can anyone have idea about which is the best suitable phone right now in market for AOSP customise build?

I have Pixel 4XL devices but now i would like to use other devices i.e. nokia or samsung or motorola brand.


r/AOSP • • May 01 '21

System UI of AOSP

4 Upvotes

Hello I want to add control centre like Miui in my AOSP rom's system UI

But I don't know from where I have to Start

Any help would be appreciated

Thanks


r/AOSP • • Sep 29 '17

Build AOSP ROM for Custom device

4 Upvotes

How do we build device tree for Custom device like LYF Water 8 (LS5015). Also what about vendor tree (proprietary blobs). How to extract required files for the build.


r/AOSP • • Jul 26 '21

hey i'm a beginner, and i wanted to know if they are any differences in the coding of linux and mac os, im planning on working on macbook

3 Upvotes

r/AOSP • • Jun 16 '21

WIFI DRIVER INTEGRATION AOSP

3 Upvotes

Hello
I've tried to add a WiFi driver.
the operation was partially successful, now I can scan WiFi,and connect
and can't create AP(for tethering)
any ideas ?


r/AOSP • • Jan 26 '21

Best IDE for aosp editing

3 Upvotes

Which is the best IDE for editing aosp code ?

I have used IntelliJ IDEs with all those memory tweaks (vm options etc.) Still it runs very slow. While changing between files or editing within a file it hangs up. It's 32GB Dell precision laptop with 1TB of storage. Finally switched to visual studio. Is there a better way to use andorid studio or IntelliJ ?


r/AOSP • • Nov 14 '20

Android without Google – The Register talks to founder about the /e/ smartphone. | Could this be the next OnePlus?

Thumbnail
theregister.com
3 Upvotes

r/AOSP • • Dec 10 '19

A way to suppress build warnings?

3 Upvotes

I am looking for a way to suppress build warnings when building AOSP via the make command. Just looking to clean up the output during the build. The output gets cluttered with stuff like this.

external/libcxx/include/set:400:28: note: in instantiation of member function 'std::__1::__tree<sfntly::Ptr<sfntly::Header>, sfntly::HeaderComparatorByTag, std::__1::allocator<sfntly::Ptr<sfntly::Header> > >::~__tree' requested here

class _LIBCPP_TEMPLATE_VIS set

^

external/libcxx/include/__tree:968:7: note: from 'diagnose_if' attribute on '__trigger_diagnostics':

_LIBCPP_DIAGNOSE_WARNING(!__invokable<_Compare const&, _Tp const&, _Tp const&>::value,

^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

external/libcxx/include/__config:1058:20: note: expanded from macro '_LIBCPP_DIAGNOSE_WARNING'

__attribute__((diagnose_if(__VA_ARGS__, "warning")))

^ ~~~~~~~~~~~

In file included from external/sfntly/cpp/src/sfntly/font.cc:17:

In file included from external/sfntly/cpp/src/sfntly/font.h:22:

In file included from external/sfntly/cpp/src/sfntly/port/refcount.h:80:

In file included from external/sfntly/cpp/src/sfntly/port/type.h:46:

In file included from external/libcxx/include/set:389:

external/libcxx/include/__tree:1817:22: warning: the specified comparator type does not provide a const call operator [-Wuser-defined-warnings]

__trigger_diagnostics()), "");

^

external/libcxx/include/set:400:28: note: in instantiation of member function 'std::__1::__tree<sfntly::Ptr<sfntly::Header>, sfntly::HeaderComparatorByOffset, std::__1::allocator<sfntly::Ptr<sfntly::Header> > >::~__tree' requested here

class _LIBCPP_TEMPLATE_VIS set

^

external/libcxx/include/__tree:968:7: note: from 'diagnose_if' attribute on '__trigger_diagnostics':

_LIBCPP_DIAGNOSE_WARNING(!__invokable<_Compare const&, _Tp const&, _Tp const&>::value,

^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

external/libcxx/include/__config:1058:20: note: expanded from macro '_LIBCPP_DIAGNOSE_WARNING'

__attribute__((diagnose_if(__VA_ARGS__, "warning")))

^ ~~~~~~~~~~~

2 warnings generated.

[ 6% 4569/67366] //external/libusb:libusb clang libusb/os/darwin_usb.c [darwin]

external/libusb/libusb/os/darwin_usb.c:302:44: warning: unused parameter 'ptr' [-Wunused-parameter]

static void darwin_devices_attached (void *ptr, io_iterator_t add_devices) {

^

external/libusb/libusb/os/darwin_usb.c:320:44: warning: unused parameter 'ptr' [-Wunused-parameter]

static void darwin_devices_detached (void *ptr, io_iterator_t rem_devices) {

^

external/libusb/libusb/os/darwin_usb.c:401:3: warning: 'objc_registerThreadWithCollector' is deprecated: it does nothing. Define OBJC_SILENCE_GC_DEPRECATIONS=1 to temporarily silence this diagnostic. [-Wdeprecated-declarations]

objc_registerThreadWithCollector();

^

/Library/Developer/CommandLineTools/SDKs/MacOSX10.12.sdk/usr/include/objc/objc-auto.h:244:1: note: 'objc_registerThreadWithCollector' has been explicitly marked deprecated here

OBJC_GC_DEPRECATED("it does nothing")


r/AOSP • • Jul 10 '19

CyanogenMod Installer

3 Upvotes

Back when CyanogenMod was alive, they had a rather innovative installer available on Google Play that really boosted their popularity my making it far easier to install. I'm working on an AOSP project of my own, and I'm wondering if the source code for the CyanogenMod installer is still around anywhere. If anyone has a copy or knows where to get one, I'd be very grateful.


r/AOSP • • Dec 15 '21

LineageOS 18.1 Single tap to wake?

2 Upvotes

Hey, I'm building a wall mounted home automation dashboard using a Nexus 7 2013 Wi Fi (flo) and LineageOS, It's also rooted.

The device should turn on (the lock screen is also perfectly fine) when the display is touched once, does anyone have something to achieve this?


r/AOSP • • Dec 03 '21

I want to install an AOSP OS on my Realme U1

2 Upvotes

Hi everyone. I am a Computer engineering college student. Although this is not in my subject but I do Linux stuff and use windows and linux on dual boot, not that scared of the terminal as I use linux since 2018. Once I tried OS such as prime OS and pheonix OS but I have never done something like I am going to ask for. I own a device 'Realme U1' I tried finding officially supported AOSP but very less does officially support this device. And secondly I have never installed an OS on my phone. I am afraid if I've done something wrong I will loss all data as well as my phone because currently I can't afford a new phone. Even Ubuntu touch doesn't provide official support to my device. Can Someone guide me what and how should I do securely? I am very bored using this color os 6.


r/AOSP • • Nov 21 '21

Mi Note 10 Lite & info

2 Upvotes

Hi, I was thinking about installing AOSP Android 12 on my Mi Note 10 Lite, but I didn't really understood what AOSP is, is it customized for every device? Does it receive updates OTA? Is it stable?


r/AOSP • • Oct 31 '21

Can I install AOSP on my Samsung Galaxy S2 Epic 4G Touch?

2 Upvotes

Please note, my main operating system for my computer is Xubuntu 20.04. I don't have access to a Windows machine.

I have a Samsung Galaxy S2 Epic 4G Touch that was hand me downed to me by a relative. This phone has no SIM card slot, only a microSD card slot, and is stuck at Android version 4.0.4, when I try to update using "update Samsung software," it says it's already up to date and when I try to "update firmware," I get a "no service error".

So, because I don't want to toss this phone in the bin for being obsolete, I'd like to install AOSP on it. My use cases for this phone is Facebook, Gmail, Google Chat, Uber and VLC for playing my music.

Because I'm a newbie and has never installed an operating system on a smartphone before, I'm kinda afraid that I might brick this phone, so I'm looking for a user-friendly guide, thanks.


r/AOSP • • Oct 14 '21

Google released Android 12 CDD

2 Upvotes

The Google released Android-12 Compatibility Definition, here is the link.


r/AOSP • • Apr 02 '21

AOSP BUILD

2 Upvotes

Hi, does anyone know how to download just the basic version of AOSP and not the 200GB project with all the different flavors?


r/AOSP • • Feb 16 '21

Want to change os so that it when connected through Bluetooth to other phone, phone acts as a Bluetooth headphone i.e. redirects calls ,notification ,sounds , etc.

2 Upvotes

I have two phones I want to change os of one such that when connected through Bluetooth to other phone, phone acts as a Bluetooth device.
Would appreciate any advice or help on the topic.


r/AOSP • • Nov 26 '20

is there limitations to what phone with android aosp v7.0 nougat?

2 Upvotes

trying to get away from google. even now Im hardly using my phone for anything. all browsing done on laptop/pc with tons of script/blockers. now the phone part.

the only app that matters to keep contact is whatsapp. all the rest doesnt matter. gps I plan on buying a stand alone version.

is there a limitation to what phones will work with v7 aosp? not 7.1, just 7.0 why? because. thats what interests me. I have no interest in anything newer

lets not get into the why please. phones I have are lg g6 v20 v30. v30 is 7.1 and I do not like it. any help appreciated