Setting up Android AOSP on a Blackview BV9500 phone Published the 2021-09-07 I had to change phones due to my old one breaking down. But I wanted something pretty sturdy (that could handle the various high-breaking-risk activities I did) and with a very long battery life. I settled on a Blackview BV9500 phone, from a chinese manufacturer I don't remember the name of, as it was the only decent option I could see on the market. I had lots of trouble managing to properly setup a custom ROM, especially because of lots of shady forums and forums written in languages I had trouble handling (e.g. russian), to the point of bricking my phone's motherboard after I selected the wrong image to flash (my first ever phone brick!). This references my phone's info, its requirements in terms of system, the ROM I chose, and my current app/services choices. ## The phone's specifications for ROM flashing [bv-wiki]: https://github.com/phhusson/treble_experimentations/wiki/Blackview-BV9500 The Blackview BV9500 is marked as [an A-only phone system][bv-wiki] by some contributors to the treble experimentations project[^a-only]. [^a-only]: A/B systems (or "seamless updates") are made to allow for having two systems (one in each slot, slot A and slot B, to have a fallback in case one fails during update), [see more on the android documentation](https://source.android.com/devices/tech/ota/ab/). It also has an arm64 CPU architecture. The treble experimentations project is an open source effort to maintain AOSP releases for a vast array of phones supporting [the GSI system (Generic System Image)](https://source.android.com/setup/build/gsi). Since my phone is GSI-compatible, it is perfect and I can expect a decent compatibility. However, the phone is marked as A-only, *BUT* due to it being shipped with Android 9 and not Android 8, there is a quirk required by Google which makes it require AB ROMs[^google], and not A-Only ROMs (it is something I had a lot of trouble with, as I consistently tried A ROMs). [^google]: "On Android 9, Google changed the requirements and all devices shipped with Android 9 must use "system-as-root". Before this change, only A/B devices were system-as-root and GSI name was separated by A-only and A/B. For this historical reasons, you have to use GSI for A/B on the devices shipped with Android 9+." ([source](https://github.com/phhusson/treble_experimentations/wiki)). Additionally, [the wiki page][bv-wiki] indicates that the phone needs [VNDK support](https://source.android.com/devices/architecture/vndk). ### In short In short, this phone's specs are: - ARM64 CPU architecture - Android 9+ = A/B GSI ROM - VNDK requirement = VNDK-compatible ROM I also note that I don't want to burden myself with any google apps, so I will choose the ROM that doesn't ship them. The treble experiments shows a relatively stable Android 11 release, so that's what I took. The file I chose is named [`system-roar-arm64-ab-vndklite-vanilla.img.xz`](https://github.com/phhusson/treble_experimentations/releases/tag/v312). ## Flashing and that kind of stuff To flash it, and because I didn't want to deal with setting up a TWRP recovery (after trying, and failing, for a while), I chose to go through fastboot. To restart my phone in fastboot mode, I powered it off, and continously pressed Volume Up and Power together until it restarted in recovery, which let me select fastboot mode. From then, the standard procedure applied: ``` $ fastboot flash system GSI/system-roar-arm64-ab-vndklite-vanilla.img ... flashing $ fastboot reboot bootloader ``` Once I was in the bootloader again, I wiped the cache folder, and restarted the phone, and boom, I now have it installed! ## Apps and such For my personal convenience, I kept the phone rooted (some shitty bank apps may complain, I don't consider them to be important enough to warrant removing root for my own needs). I used adb to flash [the F-Droid store](https://f-droid.org/), which I use for most of my app needs, and it gives me access to Aurora Store, which I use to have an anonymous access to the play store, so I can still download and maintain the store-bound apps I use. In all, I use the following apps as daily driver. - Aegis for TOTPs - KeePassDX for my passwords - Catima (for fidelity cards and such) - Tachiyomi (for reading) - Firefox mobile - the Simple Apps suite (Simple Calendar, Simple Camera, Simple Gallery specifically) - Tusky, Telegram FOSS, K-9 Mail for communications - Markor for note-taking - MoodFlow for mood and health tracking - Syncthing-Fork for my files - Some proprietary apps: Spotify, Steam
This is the french writeup log in which I wrote every steps I went through and thoughts and such.
-- Blackview BV9500 --

La ROM AOSP treble est censée être supportée, et c'est un github et pas un forum random pété.

- [Page d'infos / setup sur BV9500](https://github.com/phhusson/treble_experimentations/wiki/Blackview-BV9500)
- [Page de release](https://github.com/phhusson/treble_experimentations/releases/tag/v312)

De ce que je comprends,

- Je dois prendre des ROMs A-only archi ARM64
- Pas de compatibilité magisk (je m'en fous mais voilà)

Pour boot en recovery, c'est Power + Volume UP, ça donne accès au boot en bootloader (fastboot).

-- ROMs testées --

-- Treble GSI --
- system-roar-arm64-aonly-vanilla.img: marche pas
- system-roar-arm64-aonly-floss.img: marche pas
- system-quack-arm64-aonly-vanilla.img: marche pas
- system-quack-arm64-aonly-gapps.img: marche pas
- system-arm64-aonly-vanilla-nosu.img: marche pas
-- LineageOS GSI --
- LineageOS 18: marche pas
- LineageOS 17: marche pas
-- STOCK --
- ROM stock: marche pas, corrompue

Faut que je teste en éditant /system/build.prop et en rajoutant ça.

```
ro.audio.ignore_effects=true
```

--- EDIT ---

Après un bug, le #1992, j'ai appris que les tels A sortis ave Android 9 doivent être flash avec des ROMs AB...

#1992: https://github.com/phhusson/treble_experimentations/issues/1992

Donc ça me fait un peu peur, mais bon, on va essayer, au point où on en est.

> Why should I use GSI for A/B devices to some A-only devices? : On Android 9, Google changed the requirements and all devices shipped with Android 9 must use "system-as-root". Before this change, only A/B devices were system-as-root and GSI name was separated by A-only and A/B. For this historical reasons, you have to use GSI for A/B on the devices shipped with Android 9+..

Le site dit que le blackview a VNDK actif, donc je prend les builds VNDKLite

-- AOSP --
- Roar A/B arm64 vndklite vanilla: SUCCESS
- Quack A/B arm64 vndklite vanilla: Not tried, since the Roar version (android 11) worked.