[Android Q&A, Help & Troubleshooting] pigeon35:
Hello,

I'm hoping if you could advise what I'm doing wrong please?

I've built a couple of versions of AOSP but after flashing phone with system.img, phone is stuck on android splash screen for 20 minutes, so end up having to return to stock rom (which is fine, just frustrating).

Phone is 2018 Doogee S50 - MediaTek Helio P23 MT6763T + ARM Cortex-A53 CPU + Mali-G71 MP2 GPU

Stock ROM is Android 7.1.1

I have built and tried flashing:

10.0.0_r34

8.1.0_r1

Process followed largely taken from:

source.android.com/setup/build

storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo

chmod a+x ~/.bin/repo

mkdir /media/android/android-8.1.0_r1

mkdir /media/android/export-8.1.0_r1

git config --global user.name "My Name"

git config --global user.email "MyEmail@gmail.com"

export OUT_DIR_COMMON_BASE=/media/android/export-8.1.0_r1

cd /media/android/android-8.1.0_r1

repo init -u android.googlesource.com/platform/manifest -b android-8.1.0_r1

repo sync

export LC_ALL=C

export USE_CCACHE=1

ccache -M 50G

export ANDROID_JACK_VM_ARGS="-Xmx12g -Dfile.encoding=UTF-8 -XX:+TieredCompilation"

source build/envsetup.sh

lunch aosp_arm64-user (or lunch aosp_arm64-eng)

============================================

PLATFORM_VERSION_CODENAME=REL

PLATFORM_VERSION=8.1.0

TARGET_PRODUCT=aosp_arm64

TARGET_BUILD_VARIANT=user

TARGET_BUILD_TYPE=release

TARGET_PLATFORM_VERSION=OPM1

TARGET_BUILD_APPS=

TARGET_ARCH=arm64

TARGET_ARCH_VARIANT=armv8-a

TARGET_CPU_VARIANT=generic

TARGET_2ND_ARCH=arm

TARGET_2ND_ARCH_VARIANT=armv7-a-neon

TARGET_2ND_CPU_VARIANT=cortex-a15

HOST_ARCH=x86_64

HOST_2ND_ARCH=x86

HOST_OS=linux

HOST_OS_EXTRA=Linux-4.15.0-101-generic-x86_64-with-Ubuntu-18.04-bionic

HOST_CROSS_OS=windows

HOST_CROSS_ARCH=x86

HOST_CROSS_2ND_ARCH=x86_64

HOST_BUILD_TYPE=release

BUILD_ID=OPM1.171019.011

OUT_DIR=/media/android/export-8.1.0_r1/android-8.1.0_r1

AUX_OS_VARIANT_LIST=

============================================

make

4 hours later, build successful

emulator (opens, but screen blank)

adb devices reports emulator 5554 offline. At which point I try adb kill-server and adb start-server. But haven't got the emulator anything other than offline.

Unlock phone via Settings, tap About phone, then tap Build number seven (7) times.

Tap Developer options and enable OEM unlocking and USB debugging

Enter Recovery via holding vol+ and press power from cold boot.

Then select "reboot to bootloader"

fastboot devices

T758A1ZH84140735	fastboot

fastboot flashing unlock

fastboot -w

fastboot flash system /media/android/export-8.1.0_r1/working/target/product/generic_arm64/system.img

fastboot flashing lock

fastboot reboot

Phone is stuck on android splash screen for 10 minutes

So re-boot to recovery, choose "Wipe data/factory reset" and reboot

Phone is stuck on android splash screen for 20 minutes

Flashing back to stock:

fastboot flash system /media/android/s50_system.img

It re-boots a couple of times and its ok again.

Im about to try again with 7.1.2, but expect it too will fail to work because I'm missing some thing (perhaps many things).

Thank you for any help.

Brand – Doogee

Model – S50

CPU – Octa-Core 4 x 2.5GHz ARM Cortex-A53 + 4 x 1.6GHz ARM Cortex-A53 CPU Clock

Chipset – MediaTek Helio P23 MT6763T, 64-bit Processor

GPU – ARM Mali-G71 MP2, 770 MHz, 2-Cores

Stock ROM claims:

android-info.txt

board=t758_dg_m3t_n

build_fingerprint.txt

DOOGEE/full_t758_dg_m3t_n/t758_dg_m3t_n:7.1.1/N6F26Q/1517387436:user/release-keys