Effie's Blog

Hi, I'm Effie, an Android Expert and GDE, welcome to my blog!

Deploying and running AOSP on Windows with WSL2 -part 2

Part 2 of this post is what to do with the created images from my AOSP build and how to run them on the Windows emulator. Adding disk space to WSL Now, while doing this, or later, you’ll run out of disk space with AOSP, so instead of waiting for a build to fail, do yourself a favor and increase the size to 300GB+ now, follow these instructions to do it: https://docs.

Building AOSP on Windows with WSL2 -part 1

After the recent news about deprecating support of building AOSP on macOS, and hoping to not switch to Linux full-time for any kind of AOSP dev, I decided to give WSL2 a shot. Here it is! What is WSL? “The Windows Subsystem for Linux lets developers run a GNU/Linux environment – including most command-line tools, utilities, and applications – directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup.

AOSP 8.1 failing to build on Mac High Sierra

If you’re trying to build AOSP on Mac High Sierra and getting this (or a similar error): [ 0% 35/75651] yacc out/soong/.intermediates/system/tools/aidl/libaidl-common/darwin_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp FAILED: out/soong/.intermediates/system/tools/aidl/libaidl-common/darwin_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp out/soong/.intermediates/system/tools/aidl/libaidl-common/darwin_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.h BISON_PKGDATADIR=external/bison/data prebuilts/misc/darwin-x86/bison/bison -d --defines=out/soong/.intermediates/system/tools/aidl/libaidl-common/darwin_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.h -o out/soong/.intermediates/system/tools/aidl/libaidl-common/darwin_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp system/tools/aidl/aidl_language_y.yy [ 0% 39/75651] lex out/soong/.intermediates/system/tools/aidl/libaidl-common/darwin_x86_64_static/gen/lex/system/tools/aidl/aidl_language_l.cpp ninja: build stopped: subcommand failed. 14:24:58 ninja failed with: exit status 1 It means that bison isn’t working. If you try running bison by running this command for example: ./prebuilts/misc/darwin-x86/bison/bison it fails on error

Will Android kill single activities in case it runs out of memory?

I answered this question on Reddit, and I thought the answer might be interesting to document here as well (is there good documentation of android lifetimes) is there good documentation of android lifetimes *Meaning, let’s say there’s an OOM event (or Android needs to clean up RAM for another app). What will Android clean up? For example, Activities and Services are independent (at least as far as I know), but each Activity is “atomic” (either it’s running fine or it’s 100% dead, you won’t find that a in String a = “abc”; Log.

Opening AOSP with IntelliJ - part 3

In this post, I’m going to continue with how to open AOSP and get IntelliJ support, Part 2 covered how to build AOSP, this part is how to open it in IntelliJ so you can navigate the codebase using a familiar editor similar to how you write apps. I tried getting the project to open with Android Studio as well, and got pretty close to the same result I did with IntelliJ, but ultimately IntelliJ provided better environment support than AS.

Building AOSP on macOS - part 2

In this post, I’m going to continue with how to build and open AOSP - Part 1 covered how to download the respository, and this part is how to build it so that you end up with an image that can be deployed via fastboot Part 3 (coming up) will be all about opening the project up in IntelliJ so that IDE features such as ‘Go to Definition’ work correctly.

Installing AOSP on a mac - part 1

In this post, I’m going to go into the details of how to download and install AOSP on a modern macOS machine. The instructions on the official Android page are somewhat out-of-date, and aren’t as well-maintained as the Linux instructions. 1. Create a case-sensitive disk image: Because Android requires a case-sensitive filesystem, we need to create a separate drive. This was easy-peasy using the Disk Utility tool, the important thing here is that it must be case sensitive or nothing will build: