[ROM][SNAPSHOT][9] AOSP Pie for Xperia SP

AdrianDC

Recognized Developer
Dec 22, 2009
2,206
12,943
208
Île-de-France
adriandc.github.io

Code:
#include <std_disclaimer.h>
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 */


Downloads Links
AOSP 9 Pie (Unlocked Bootloader) :
Xperia SP (Huashan) - 9 : https://mega.nz/#F!6hsHyKKT!ERgr5s0BMMtO2Cb9j8wLnA

Google Applications (optional) :
MindTheGapps : https://androidfilehost.com/?w=files&flid=170282 (Use packages for ARM, Android 9.0)
Information : Flash the GApps before the first boot. If not, a clean flash is recommended.

Recommended Recovery (optional) :
TWRP 3.x : http://forum.xda-developers.com/xperia-sp/orig-development/-t3309938

Configure the default Low-RAM features (optional) :
Low-RAM Property Patcher : http://forum.xda-developers.com/-/-t3737373

Informations and references :
Kernel CVEs : Security patches status https://cve.lineageos.org/android_kernel_sony_msm8960t
About AOSP : Repositories available on https://android.googlesource.com/


Flashing and updating
AOSP clean install :
- (Optional) Flash the boot.img kernel from the ROM zip with Fastboot or Flashtool
- (Optional) Install TWRP Recovery to the FOTA partition (Read the TWRP thread)
- (Optional) Wipe the data & cache (Backup to make sure not to lose data)
- Flash the AOSP ROM zip from recovery
- (Optional) Flash a GApps package to have the Google Applications
- (Optional) Every additional zip you want to flash
- Reboot

AOSP update / upgrade :
- (Information) Do not wipe anything unless you want to
- Flash the latest AOSP ROM zip from recovery
- (Optional) Flash a GApps package if you want to, otherwise preserved.
- (Optional) Every additional zip you want to flash
- Reboot


About the builds


Issues and reports
- Report issues only if you use the ROM kernel
- If an additional mod is installed, make sure it's unrelated, and mention it
- Make sure the issue wasn't discussed earlier in the threads
- Share a log of the error with CatLog for example


Q&A - FAQ
Q : Is root access included into AOSP ?
A : No but you can now root with my Boot Bridge and a superuser tool.

Q : Is the ROM suited for daily usage ?
A : Yes. Check the list below to decide for yourself.

Q : Where can I change the Quick Tiles and Status Bar ?
A : Long press the Settings icon in the notifications drawer.
> You will have access to the SystemUI Tuner from Marshmallow.

Q : When USB is connected to a computer, I can't access the storage ?
A : The phone is in charge-only mode by default (since Android Nougat),
> due to a stronger security logic regarding unauthorised data access.
> Swipe down the notifications and change the USB mode.​


AOSP available for Xperia Huashan also thanks to :
- Google AOSP
- The LineageOS Team
- CodeAurora Forums
- The CyanogenMod Team​

XDA:DevDB Information
AOSP Oreo 9, ROM for the Sony Xperia SP

Contributors
AdrianDC
Source Code: https://android.googlesource.com/

ROM OS Version: 9.x Pie
ROM Kernel: Linux 3.4.x
Based On: AOSP

Version Information
Status: Snapshot

Created 2019-08-17
Last Updated 2020-08-15
 

AdrianDC

Recognized Developer
Dec 22, 2009
2,206
12,943
208
Île-de-France
adriandc.github.io
Reserved

FEATURES AND ISSUES
Code:
- Boot : Ok
- GApps : OpenGApps Micro recommended
- Partitions (Data, Cache) : Ext4 and F2FS supported
- Bluetooth : Ok
- WiFi : Ok
- WiFi Hotspot : Ok
- RIL - Phone - Data : Ok
- GPS : Ok
- Camera : Ok
- Camcorder : Ok
- Lights : Ok
- MicroSD : Ok
- Accelerometer : Ok
- Compass : Ok
- Gyroscope : Ok
- AOSP sensors : Ok
- Touchscreen : Ok
- FM Radio : Ok
- Vibrator : Ok
- Microphone : Ok
- Audio & music : Ok
- Bluetooth audio : Ok
- NFC : Ok
- Kernel : Ok
- Graphics : Ok
- 3D Rendering : Ok
- Clock : Ok
- DRM : Ok
- Offline Charging : Ok
- USB : Ok
- USB OTG : Ok
- Encryption : Not tested yet
- SEPolicies : Permissive, enforcing is a work in progress

ALSO WORKING ON SONY HUASHAN


IMPORTANT FEATURES TO KNOW
  • Boot sequence : Once the LEDs light up :
    - Press Volume - to open AOSP Recovery,
    - Press Volume + to open the FOTA recovery (TWRP usually) if available
  • Powered-off alarm : When you have set an alarm
    - If you power down the device, it will wake automatically 5 minutes before
    - If you let the device charge offline, it will automatically reboot 5 minutes before
  • Gestures : Events like hand-wave and pocket removal can be enabled in the Settings
  • Force reboot : You can reset the device by holding Power and Volume+ 5 seconds
 
Last edited:

AdrianDC

Recognized Developer
Dec 22, 2009
2,206
12,943
208
Île-de-France
adriandc.github.io
Reserved

Changes log
  • 17/08 : Initial public release on Android 9.0.0_r46 August

  • 2018: Initial AOSP 9 ports, internal bringup
    >>> Kept private for development purposes


Recent branches commits

Original AOSP 9 sources with following relevant additions
  • Huashan device tree, kernel and vendor
  • Bionic: Support for SHIMs (Camera)
  • Build: Backup tool full support (GApps)
  • NFC: Proper support & removed log spam
  • Toybox: Support for init_sony boot selection
  • AV: Camera support for Pie
  • AV: Initial camcorder partial support
  • Camera2: Fixes for wrongly rotated photos and improvements
  • UI: Various efficiency improvements and fixes
  • Telephony: Support for older RIL layers
  • Audio: 8960 adapted HAL and FM support
  • FM: Fully implemented with AOSP FM Radio
  • Music: Minor fix to permissions
  • Settings: Minor visual rendering improvements
  • Healthd: Support for Huashan offline charger
  • Core: Disabled flash_recovery service from AOSP
  • Sepolicies: Minimal changes and fully enforced ROM

Current local manifest
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- [url]https://android.googlesource.com/platform/manifest[/url] -->
<manifest>

  <!-- See [url]https://github.com/AdrianDC/aosp_development_sony8960_p[/url] -->

</manifest>
 
Last edited:

globe79

Senior Member
Apr 1, 2013
67
33
48
I woke up in the morning and decided for a short walk around the internet - and to my surprise I found new builds of both AOSP and Lineage suitable for my favourite backup phone :) Thank you so much @AdrianDC - I know it is harder to withstand people than hardware ;)
 
  • Like
Reactions: AdrianDC

jurko217

Senior Member
Jun 1, 2019
68
19
0
Poprad
Experience, first stable build

Hello, i want to share my critic experience with you and this rom.
(C5303, Clean flash, Data and cache FS changed to F2FS, without gapps, magisk)
1. Music - i had good experience, led controls work good, but after day of using phone and some restarts, it shows only 2 from my 600 songs.
So i installed Sony music app, no difference. Cleared data, cache for both apps, but still no difference.
2. AOSP Browser - After some succesful launches, FC every launch time, other browsers OK
3. After day usage, system started drain battery as fck...
4. At same time as battery and music, system going slowly
5. And biggest issue - phone cannot turn off - it restarts. So i have 2 go 2 recovery and turn off here.

I have been without gapps, because i wanted pure system, so i installed yalp store (some 404 client errors, but logged succesfully) and with magisk 19.3 bootbridge (Modules: V4A 2.7.1.0, Audio compatibility and modification patches, Pixelarity, SF-Font, Busybox, all modules works flawlessly)

I must give big + and thanks for developers, because 6 y.o. phone still breaths for today with the new system, but stable work must have itself finality. Check this things on your phones and please fix it for stable, pure AOSP experience.
And add please full dark mode.

Edit:
I have tried new Lineage 16 and same issues with different music players, browser and newly - gallery doesnt show anything and camera not working.
 
Last edited:

fsw_informatrix

Senior Member
Mar 29, 2016
66
26
18
Colmar
www.informatrix-web.fr
Hi,
First of all, I want to thank again AdrianDC for bringing Android Pie on our lovely SP (that I'm keeping as a backup phone and can't let it go), man, you just rock :)
But I'm really surprised not to read anything here about the setup problems I've encountered, because for me, it was Hell on Earth !!!
It has NOTHING to do with the ROM or the work of AdrianDC, but it seems to be purely Google's fault :(
So, I thought I will share how I got through it, perhaps helping some of you not getting nearly insane, like me yesterday...

First one was "Stuck on "Checking for updates..", so I found first here : https://www.reddit.com/r/GalaxyS9/comments/aqa384/t_mobile_s9_stuck_on_checking_for_updates_after/ this reply : "I had to completely disconnect from wifi, took the sim out so it would skip that process. Its finally working fine now." method confirmed in this XDA thread here : https://forum.xda-developers.com/nokia-7/help/stuck-screen-checking-updates-hard-reset-t3767866/page2 in the post #15 : "Try without SIM card inserted. It should work."
Alternatively, in this thread : https://forum.xda-developers.com/2015-moto-g/help/reset-stuck-checking-updates-t3571496 the method explained in post #4 worked well also :
"On the TWRP Terminal:
echo "ro.setupwizard.mode=DISABLED" >> /system/build.prop
this will skip the first setup!
edit: may need to mount /system"

And then came the second bug : "Phone stuck on Preparing for Setup after factory reset of Android Pie"
I read a lot of threads about it :
https://forum.xda-developers.com/mi-a2/help/phone-stuck-preparing-setup-t3870469
https://forums.oneplus.com/threads/android-preparing-for-setup-prompt-always-appearing.1083942/
https://forums.oneplus.com/threads/stuck-with-android-setup-issue-on-oneplus-6t.953686/
https://forums.lenovo.com/t5/motorola-one-motorola-one-power/Preparing-for-Setup-you-can-finish-your-motorola-one-power-soon/m-p/4391471#M4710
https://www.reddit.com/r/tmobile/comments/9uj9vw/cannot_get_android_setup_app_updates_are_ready/e94uow3
https://uk.community.huawei.com/mate-20-series-20/app-updates-is-not-moving-preparing-for-setup-2591
https://uk.community.huawei.com/mate-20-series-20/android-setup-keeps-telling-me-that-app-updates-are-ready-and-that-i-should-connect-to-wifi-5687
And so on, but nothing in all this posts helped :mad: so I ended disabling the notification AND the Android Setup app !!!
Some of those reports are more than a year old and I've rooted and flashed custom ROMs on 5 differents devices / brands over the years, but I never encountered such a mess !
Google, what's wrong with you ?!?
So I hope this will help a bit, I wish you all a nice Sunday...
 

fsw_informatrix

Senior Member
Mar 29, 2016
66
26
18
Colmar
www.informatrix-web.fr
For completion's sake, I forgot to add that I've made a clean install and did follow exactly these steps to do it :
- having made the TA backup years ago and finding LineageOS Oreo a bit too lagy to my taste, I took the occasion to try (for the first time) to restore the TA partition (with success), this locking back again the bootloader and then, restored with Flashtool the original ROM that was shipped with the SP;
- so I find myself back with the original DRM keys :D and the original Jelly Bean :crying:, played a little bit with it (a real trip down Memory Lane) and confirmed forever to myself that I really don't miss anything of Sony's crap (Bravia Engine, Track-ID, whatever...), but to each his own;
- I used fastboot and Sony's code to unlock the bootloader again, then boot twrp.img, flashed the FOTA.zip and erase EVERYTHING, but the SD card !
- I just flashed the 20190817 build and the OpenGapps Micro, one after the other from the SD Card and let the BootBridge.zip with Magisk inside for a later time...
- I rebooted and then, all Hell broke loose :mad:
- Hours (and a lot of swearing) later, I flashed BootBridge.zip with Magisk and could finaly enjoy how mean and lean is Android 9 on this 2013 device :D again, bravo !!!
So, I honestly don't think that any of those steps described above could have been the cause of the 2 bugs (and the numerous threads I've read seem to confirm it), but I would be glady corrected if I'm wrong...
Really, nobody here had to go through this whole hassle, seriously ? You've all got a smooth ride with a clean install ?
I would really like to know if it's me or if, in this case, Google is having two left hands, and just with thumbs :silly:
 
Last edited:

TechnoSparks

Senior Member
Mar 9, 2014
1,428
809
143
23
Selangor
www.technosparks.net
For completion's sake, I forgot to add that I've made a clean install and did follow exactly these steps to do it :
- having made the TA backup years ago and finding LineageOS Oreo a bit too lagy to my taste, I took the occasion to try (for the first time) to restore the TA partition (with success), this locking back again the bootloader and then, restored with Flashtool the original ROM that was shipped with the SP;
- so I find myself back with the original DRM keys :D and the original Jelly Bean :crying:, played a little bit with it (a real trip down Memory Lane) and confirmed forever to myself that I really don't miss anything of Sony's crap (Bravia Engine, Track-ID, whatever...), but to each his own;
- I used fastboot and Sony's code to unlock the bootloader again, then boot twrp.img, flashed the FOTA.zip and erase EVERYTHING, but the SD card !
- I just flashed the 20190817 build and the OpenGapps Micro, one after the other from the SD Card and let the BootBridge.zip with Magisk inside for a later time...
- I rebooted and then, all Hell broke loose :mad:
- Hours (and a lot of swearing) later, I flashed BootBridge.zip with Magisk and could finaly enjoy how mean and lean is Android 9 on this 2013 device :D again, bravo !!!
So, I honestly don't think that any of those steps described above could have been the cause of the 2 bugs (and the numerous threads I've read seem to confirm it), but I would be glady corrected if I'm wrong...
Really, nobody here had to go through this whole hassle, seriously ? You've all got a smooth ride with a clean install ?
I would really like to know if it's me or if, in this case, Google is having to left hands, and just with thumbs :silly:
Sometimes opengapps can cause errors given how itself is like a rolling Nightly packages generated on demand when you hit download. I recommend trying MindTheGapps as it went smoothly for me using that one.

Not a setup issue, but an issue nonetheless: During my attempt to flash this ROM, I had free space errors with Opengapps. Even on pico package!

Ninja Edit: I found out on the LOS pie thread that Pico is the only one that fits. I still however stand by the authenticity of my story
 
Last edited:

fsw_informatrix

Senior Member
Mar 29, 2016
66
26
18
Colmar
www.informatrix-web.fr
Sometimes opengapps can cause errors given how itself is like a rolling Nightly packages generated on demand when you hit download. I recommend trying MindTheGapps as it went smoothly for me using that one.

Not a setup issue, but an issue nonetheless: During my attempt to flash this ROM, I had free space errors with Opengapps. Even on pico package!

Ninja Edit: I found out on the LOS pie thread that Pico is the only one that fits. I still however stand by the authenticity of my story
Thank you again :) didn't thought about that one, I will give MindTheGapps a try, next time...
 

fsw_informatrix

Senior Member
Mar 29, 2016
66
26
18
Colmar
www.informatrix-web.fr
OMG, my second try was so quick & easy with MindThe Gapps, thanks again @TechnoSparks :D

I did a Nandroid backup and couldn't resist to give it another try, so from TWRP in the FOTA :
1) I manually erased all partitions, but recovery, SD Card and USB-OTG, just to be sure.
2) I queued and installed from the first post (and in this order) aosp-9-20190817-huashan-adriandc.zip, android_lowram_enabler.zip and MindTheGapps-9.0.0-arm-20190615_031401.zip, without any errors.
That was the right call to flash the android_lowram_enabler.zip in between, because I've noticed a message from the MindTheGapps installer :
"Low ressource device detected, removing large extras", which is lovely and exactly what I needed, no Google bloatware...
3) I rebooted and didn't met any of the bugs I had with OpenGapps, not even an initial setup :laugh: just had to pick manually language and Wi-Fi (location and date/hour too, as there is no SIM inside).
4) I got back to TWRP and flashed BootBridge-SonyELF.zip with Magisk19.3 inside, rebooted and updated Magisk Manager (Note: strangely, I had to reflash BootBridge-SonyELF.zip a second time, after the Magisk Manager update, to get it working back).
Now, it's all set up and I can finally test it further ;)
Hope this helps somebody and keep up the good work, M. AdrianDC...
 

AdrianDC

Recognized Developer
Dec 22, 2009
2,206
12,943
208
Île-de-France
adriandc.github.io
That was the right call to flash the android_lowram_enabler.zip in between, because I've noticed a message from the MindTheGapps installer
Thank you for your report.

For information, I'll remind something for everyone : My Sony Huashan & Blue releases are all using the Go low RAM configs.
Flashing android_lowram_enabler is not required, it's a no-op, however android_lowram_disabler will bring back disabled features per user choice.

The android_lowram_enabler tool serves a purpose only to come back from a disabler and for any other devices not using Go low RAM configs.
 

mirhl

Senior Member
Oct 15, 2012
3,071
1,149
253
My Sony Huashan & Blue releases are all using the Go low RAM configs.
Flashing android_lowram_enabler is not required, it's a no-op, however android_lowram_disabler will bring back disabled features per user choice.
I see and I could report this is the case in the system...
But I swear I don't understand why the status bar still is transparent on the homescreen and in various programs.

Btw did you investigate using the ro.config.small_battery flag? I'm not sure if huashan would fit the bill (even though, assuming you still have the original battery it may as well do) but perhaps tsubasa could qualify.
 
  • Like
Reactions: TechnoSparks

abiyyu_b

Member
Sep 21, 2015
19
1
0
sir can i do dirty flash if i want to downgrade to aosp oreo or nougat? i got a bit unresponsive on pie
i want to keep my app data if it possible
 

LaRazón

Member
Jan 26, 2018
34
11
8
Not really expecting an answer at this point but here goes...

I am using a really early build of this rom (4/2019), but it works really well.

I've also installed the latest version of Magisk using Bootbridge. My problem is that I can't seem to make it pass the safetynet check, says false on both CTS Profile and Basic Integrity.

I've tried a lot of things, but nothing seems to work. Is it just because of the build, and something that has been repaired in later builds?
 

feromgar

Senior Member
Feb 14, 2014
141
61
58
Barranquilla
Not really expecting an answer at this point but here goes...

I am using a really early build of this rom (4/2019), but it works really well.

I've also installed the latest version of Magisk using Bootbridge. My problem is that I can't seem to make it pass the safetynet check, says false on both CTS Profile and Basic Integrity.

I've tried a lot of things, but nothing seems to work. Is it just because of the build, and something that has been repaired in later builds?
No version of this room pases CTS profile without a magisk module helping it to fool Safetynet. Basic Integrity failing is a weird error that does happen from time to time. Usually just reflashing everything fixes it. Keep in mind, that there have been some changes in safetynet that could be breaking it for you.
 
  • Like
Reactions: LaRazón

Vladried9

New member
Jul 25, 2020
1
0
0
HI AdrianDC, thank you for all you work, i think its amazing, i Tryed this rom from yesterday, and everything is going perfect, navigation on this emviroment is smooth, i instaled the lastest GAPPS, no issue found, even i installed FB , Instagram and another social apps, works fine to me.

But i may find some kind of bug or something, some apps that i use has a media pleyer inside to play micro- video tutorial, but i cant see them, looks like buffering only, even videos played from chrome , like news videos i cant see them, only seems buffering, maybe its only me, or i did something wrong, can you or anyone help me?, please


regards!