Well, new user but old lurker here, no points to post in dev threads and I'm not going to wait 3 months to get them so jumping right into things...
This is a record of my attempts to build AOSP 8.0 Orea for the nex Xperia XZ2 Compact. I'm running into problems and figured I'd document them here, for the betterment of others and to get help if needed.
Main guide: https://developer.sony.com/develop/open-devices/guides/aosp-build-instructions/build-aosp-oreo-8-0-kernel-4-4/#tutorial-step-3
Some modification required, as the phone and code are both pretty new, as mentioned by BeNeDeLuX on May 22 the repo was only just uploaded. More to follow.
github links not permitted?!??!?
well according to XDA, outside links are not allowed to be posted until you've replied 10 times... Even if the posts are OBVIOUSLY code-related (e.g. GitHub *cough*cough*)...
Please excuse me while I go spam another thread, or create an intro or something... brb
Step 2
OK, jumping right back into it:
Now we need to add the git repos for tama (platform) and apollo (xz2).
First follow the steps in the main guide up to step 4.3: https://developer.sony.com/develop/.../build-aosp-oreo-8-0-kernel-4-4/
Then clone the following two repositories into the ~/android/devices/sony directory:
Code:
git clone https://github.com/sonyxperiadev/device-sony-tama.git tama
Code:
git clone https://github.com/sonyxperiadev/device-sony-apollo.git apollo
now continue on with the steps in the main guide
There may be errors yet to come...
First error
First error:
Code:
build/core/base_rules.mk:374: warning: ignoring old commands for target
`out/target/product/apollo/vendor/etc/gps.conf'
ninja: error: 'kernel/sony/msm/arch/arm64/configs/aosp_tama_apollo_defconfig',
needed by '/home/anna/android_8-0-0/out/target/product/apollo/obj/KERNEL_OBJ/.config',
missing and no known rule to make it
16:32:12 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
#### make failed to build some targets (01:40 (mm:ss)) ####
System Info:
Code:
Linux hostname 4.8.0-53-generic #56~16.04.1-Ubuntu SMP Tue May 16 01:18:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Will post any progress as I make it, suggestions are welcome. You can find the full log here
any progress??
I'm back!
[email protected] said:
any progress??
Click to expand...
Click to collapse
Hey yes sorry my real-life job doesn't always allow for much personal time...
So right now the Sony dev repos don't have a pre-built kernel or kernel configuration for the XZ2 Compact.
I've grabbed the current config from /proc/config.gz on my XZ2 Compact running Android 8.0.0, Linux kernel 4.9.65-perf+, posted to gist here: https://gist.github.com/Ifiht/9d0eff34d1f47ecd955b49acd34a14fb
The closest config (based on software/hardware from https://en.wikipedia.org/wiki/Sony_Xperia) in sony repos is the aosp_yoshino_lilac default config, I've started compiling all these resources in a single git repo at https://github.com/Ifiht/sony-xperia-xz2.build.
Will update here with progress once I've got some with the kernel build.
2nd Error
Code:
ninja: error: 'out/target/product/apollo/obj_arm/SHARED_LIBRARIES/libqdutils_intermediates/export_includes', needed by 'out/target/product/apollo/obj_arm/SHARED_LIBRARIES/libOmxVdec_intermediates/import_includes', missing and no known rule to make it
12:58:20 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
#### make failed to build some targets (03:37 (mm:ss)) ####
So the build failed again using the defconfig listed in my git repo for this project. This time it doesn't even look like a kernel issue, more like a repo conflict given that all the errors are in "out" directory.
Appreciate any guidance from those that have seen this before. Full error copied here: https://gist.github.com/Ifiht/bb4e1dd43b6598ffcf02b83d960cd959
3rd error
Code:
[ 90% 10/11] glob system/core/*/Android.bp
ninja: error: 'device/sony/common-kernel/kernel-dtb-apollo', needed by 'out/target/product/apollo/kernel', missing and no known rule to make it
14:07:36 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
After upgrading my kernel and local repos to 4.9.6 and re-syncing everything for good measure I'm now getting the above. At least this one seems straightforward, even if it may mean I have to frankenstein together a custom kernel from the flagship source repos currently available from Sony...
Oh well onward and upward!
Build attempt on Mac OSX
Hey,
thank you for documenting your progress, I am playing along trying to get the build to work on my Mac OS 10.13 machine,
nice to see I am not the only one trying
Stuck with the exact same error now btw
Code:
[ 99% 141/142] glob prebuilts/abi-dumps/vndk/current/arm64/source-based/[email protected]
ninja: error: 'device/sony/common-kernel/kernel-dtb-apollo', needed by 'out/target/product/apollo/kernel', missing and no known rule to make it
20:16:48 ninja failed with: exit status 1
best wishes
https://github.com/sonyxperiadev/bug_tracker/issues/169#issuecomment-424278920
PLEASE DON'T FLASH TAMA WITH THE CURRENT KERNEL
My Akari's display got permanently damaged.
I repeat, DO NOT FLASH.
Click to expand...
Click to collapse
Hello!
There is a Nougat 7.1.2 lineage OS 14.1 rom available for HTC 816 (a5)
So I'm trying to build lineage os 16 for HTC 816
First of all I'm no expert . That's why I'm seeking for help.
I have gone through some steps by downloading sources and setting
up environment. (which took more than 14 hours )
But when Im hitting
breakfast a5
Click to expand...
Click to collapse
(A5 is our device code name for lineage os)
It is saying something like this .
Code:
[email protected]:~/android/lineage$ breakfast a5
including vendor/lineage/vendorsetup.sh
build/make/core/product_config.mk:234: error: Can not locate config makefile for product "lineage_a5".
21:42:42 dumpvars failed with: exit status 1
Device a5 not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Found repository: android_device_htc_a5
Default revision: lineage-16.0
Checking branch info
Default revision lineage-16.0 not found in android_device_htc_a5. Bailing.
Branches found:
cm-11.0
cm-12.0
cm-12.1
stable/cm-11.0
stable/cm-12.0-YNG3C
stable/cm-12.0-YNG4N
Use the ROOMSERVICE_BRANCHES environment variable to specify a list of fallback branches.
build/make/core/product_config.mk:234: error: Can not locate config makefile for product "lineage_a5".
21:42:58 dumpvars failed with: exit status 1
build/make/core/product_config.mk:234: error: Can not locate config makefile for product "lineage_a5".
21:43:08 dumpvars failed with: exit status 1
** Don't have a product spec for: 'lineage_a5'
** Do you have the right repo manifest?
It's detecting device. but showing this.
now what to do .
If anyone know please help me out.
Thanks.
Am also getting same problem
am trying to build los 16 for TOMATO(yureka)... and am getting same problem..
any help
I am a htc 816 single sim user I also trying to make an android 9.0 rom but its still not worked yet but I think you should find a way to make some changes to build.prop it may work sorry about my language
Thank you
Any update... I want to use the los 16 on my a5dwg. Plzzz build this rom.?????
Hi,
I'm successfully building LineageOS 14.1 for my device with Xubuntu 16.04 LTS.
...but this OS is outdated!
So I installed Xubuntu 18.04 LTS (parallel to 16.04) and try to build my ROM, but it fails after a few minutes with this error (in german):
Code:
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Zusicherung >>cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))<< nicht erfüllt.
After searching the web I figured out that I have to set
Code:
export USE_HOST_LEX=yes
in my .bashrc. This sets a switch in los14/build/core/config.mk:
Code:
ifeq ($(USE_HOST_LEX),yes)
LEX := flex
else
LEX := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/flex/flex-2.5.39
endif
...but this leads to dozens of java and c++ errors, that I don't want to print here. It's too much!!
The problem seems to be a different version of flex.
...but LineageOS 15.1 and 16.0 have no problems at all with that.
Any ideas? Or should I remain using Xubuntu 16.04 LTS?
Dear All,
I'm new to this forum, so apologies if this is not the right section for my question.
I'm entering the world of AOSP and I built the product target aosp_arm64-eng on a MacOS M1 (ARM64 processor).
Unfortunately when I launch the emulator I get a kernel panic with the below message and I would like to understand how I can debug it
Code:
RAMDISK: lz4 image found at block 0
RAMDISK: lz4 decompressor not configured!
Invalid ramdisk decompression routine. Select appropriate config option.
Kernel panic - not syncing: Could not decompress initial ramdisk image.
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.18.94+ #1
Hardware name: ranchu (DT)
Call trace:
[<ffffffc00008a590>] dump_backtrace+0x0/0x128
[<ffffffc00008a6cc>] show_stack+0x14/0x1c
[<ffffffc0005ca064>] dump_stack+0x80/0xa4
[<ffffffc0005c95a0>] panic+0xe8/0x228
[<ffffffc00074ba34>] rd_load_image+0x2fc/0x5e0
[<ffffffc00074be30>] initrd_load+0x50/0x2cc
[<ffffffc00074b47c>] prepare_namespace+0xd8/0x1ac
[<ffffffc00074ad04>] kernel_init_freeable+0x1bc/0x1dc
[<ffffffc0005c8150>] kernel_init+0x10/0xf4
Rebooting in 5 seconds..Reboot failed -- System halted
From the message it seems that the kernel is not configured correctly.
How can I check if the kernel I build contained the LZ4 support with which the Ramdisk image seems to be compressed?
Thanks.
I think it's not possible to run an emulator on a mac with an arm processor see here
Central project page
[EOL][SODP][ROM][AOSP][XZ2, XZ2C, XZ3] SonyAOSP 12.1 [Alpha]
The Sony Open Devices Project is always happy about volunteers (coding, testing, etc) :) Also mainlining your favorite snapdragon powered xperia device into the mainline kernel is possible and we will be glad to help you! Official site...
forum.xda-developers.com
09.02.2022
android-12.0.0_r28 (February security patchlevel)
OEMv1c support
Click to expand...
Click to collapse
14.02.2022
hotfix for the bootloop
Click to expand...
Click to collapse
30.03.2022
android-12.1.0_r1 (March security patchlevel)
Click to expand...
Click to collapse
MartinX3 said:
30.03.2022
Click to expand...
Click to collapse
a question why you don't upload photos of the user interface, and what options are available, I currently have the Xperia XZ2 Compact, and I'm thinking of changing the rom for this one based on Android 12.1
Carljaynp03 said:
a question why you don't upload photos of the user interface, and what options are available, I currently have the Xperia XZ2 Compact, and I'm thinking of changing the rom for this one based on Android 12.1
Click to expand...
Click to collapse
It's 90% aosp.
Please report any bug in the linked issue tracker.
MartinX3 said:
It's 90% aosp.
Please report any bug in the linked issue tracker.
Click to expand...
Click to collapse
any direct contact number for more information I am new in the world of custom roms, I want help, I can contribute with the work done please
Carljaynp03 said:
any direct contact number for more information I am new in the world of custom roms, I want help, I can contribute with the work done please
Click to expand...
Click to collapse
Thank you, please follow the link in the first post.
There it is also in the first post.
12.04.2022
android-12.1.0_r3 (April security patchlevel)
Click to expand...
Click to collapse
Bug....the touch does not work and it seems to reboot intermittently
Mint rhfo said:
Bug....the touch does not work and it seems to reboot intermittently
Click to expand...
Click to collapse
Bug....report?
MartinX3 said:
Bug....report?
Click to expand...
Click to collapse
Yeah! It's Bug report!
Mint rhfo said:
Yeah! It's Bug report!
Click to expand...
Click to collapse
I don't see a valid bug report according to the instructions.
Or you claim that I'm god and know everything.
But maybe I'm god, who knows.
Hello,
Android Custom Rom noob here. Just picked up a XPERIA zx2 Compact and wanted to use this guide to flash a more current Android on the phone (came with Android10).
I followed some guides and was able to unlock my bootloader and enable USB Debugging. I used adb platform tools to boot the device in fastboot mode and flashed the files as described in the instructions.
Errors encountered:
fastboot flash oem _a SW_binaries_for_Xperia_Android_12_4.19_v1c_tama.img
fastboot: error: cannot load '_a': No such file or directory
I changed the command to: fastboot flash oem_a SW_binaries_for_Xperia_Android_12_4.19_v1c_tama.img
Sadly, the device reboots after a few seconds showing the sony logo. Reboots about three times and then says corrupted image, then shuts down. What am I doing wrong?
Thanks for your help guys!
BigWoodFarmer said:
Hello,
Android Custom Rom noob here. Just picked up a XPERIA zx2 Compact and wanted to use this guide to flash a more current Android on the phone (came with Android10).
I followed some guides and was able to unlock my bootloader and enable USB Debugging. I used adb platform tools to boot the device in fastboot mode and flashed the files as described in the instructions.
Errors encountered:
fastboot flash oem _a SW_binaries_for_Xperia_Android_12_4.19_v1c_tama.img
fastboot: error: cannot load '_a': No such file or directory
I changed the command to: fastboot flash oem_a SW_binaries_for_Xperia_Android_12_4.19_v1c_tama.img
Sadly, the device reboots after a few seconds showing the sony logo. Reboots about three times and then says corrupted image, then shuts down. What am I doing wrong?
Thanks for your help guys!
Click to expand...
Click to collapse
Hey,
I'm sorry and fixed the type.
There was a wrong whitespace character in the manual.
It's `oem_a`, that's correct.
Did you flash everything and wiped the userdata before?
Because other XZ2C owners were able to post logs.
Also it is mandatory to run the latest stock firmware on both slots once before in the lifetime of your phone.
Hi,
Thank you for your fast reply. I flashed everything and wiped as described with "fastboot -w"
I am unsure what you mean by both slots, you mean Firmware and Software Content Erase? I used EMMA to flash: H8324 52.1.A.0.618 Customized_UK 1313-5469 R3C User-Live COM on the device.
Some other questions I had:
a) Do I need Magisk for root on the device?
b) can I use another Version the twrp 3.4.0.0.? If I install this to my recovery partition, I can't use it when booting since the screen seems frozen.
sry for asking some dumb questions in my last post. I was now able to install this Android 12 Version. I think the problem was, that i didn't wipe the device before the deployment.
Thanks again for all your work on this.
*EDIT*
Can you suggest a twrp version I should use? I cannot start 3.4-0-0 (2020-06-14_21-07-37) anymore using fastboot boot
**EDIT #2**
I received the following error: "there is an internal problem with your device, contact manufacturer". I will attach output of logcat -b all
BigWoodFarmer said:
sry for asking some dumb questions in my last post. I was now able to install this Android 12 Version. I think the problem was, that i didn't wipe the device before the deployment.
Thanks again for all your work on this.
*EDIT*
Can you suggest a twrp version I should use? I cannot start 3.4-0-0 (2020-06-14_21-07-37) anymore using fastboot boot
**EDIT #2**
I received the following error: "there is an internal problem with your device, contact manufacturer". I will attach output of logcat -b all
Click to expand...
Click to collapse
Nice that you achieve to flash it.
The camera is currently not implemented because of the russian invasion in the ukraine.
Code:
04-12 19:02:48.363 0 0 I init : starting service 'vendor.camera-provider-2-4'...
04-12 19:02:48.451 3114 3114 I [email protected]: [email protected] legacy service is starting.
04-12 19:02:48.452 3114 3114 D ProcessState: Binder ioctl to enable oneway spam detection failed: Invalid argument
04-12 19:02:48.453 3114 3114 D hw-ProcessState: Binder ioctl to enable oneway spam detection failed: Invalid argument
04-12 19:02:48.452 0 0 I binder : 3114:3114 ioctl 40046210 7ff5fbfc44 returned -22
04-12 19:02:48.453 0 0 I binder : 3114:3114 ioctl 40046210 7ff5fbfc24 returned -22
04-12 19:02:48.489 3114 3114 E [email protected]: Could not load camera HAL module: -2 (No such file or directory)
04-12 19:02:48.489 3114 3114 E [email protected]_64: getProviderImpl: camera provider init failed!
04-12 19:02:48.490 3114 3114 D RefBase : RefBase: Explicit destruction, weak count = 0 (in 0xb400007a624ceaa0)
04-12 19:02:48.491 3114 3114 W RefBase : CallStack::getCurrentInternal not linked, returning null
04-12 19:02:48.491 3114 3114 W RefBase : CallStack::logStackInternal not linked
04-12 19:02:48.492 3114 3114 E HidlServiceManagement: Could not find instance 'legacy/0' in library [email protected] Keeping library open.
04-12 19:02:48.493 3114 3114 E LegacySupport: Could not get passthrough implementation for [email protected]::ICameraProvider/legacy/0.
04-12 19:02:48.501 0 0 I init : Service 'vendor.camera-provider-2-4' (pid 3114) exited with status 1
04-12 19:02:48.501 0 0 I init : Sending signal 9 to service 'vendor.camera-provider-2-4' (pid 3114) process group...
04-12 19:02:48.501 0 0 I libprocessgroup: Successfully killed process cgroup uid 1047 pid 3114 in 0ms
04-12 19:02:48.504 0 0 E init : process with updatable components 'vendor.camera-provider-2-4' exited 4 times in 4 minutes
04-12 19:02:48.513 0 0 I init : processing action (sys.init.updatable_crashing=1) from (/system/etc/init/flags_health_check.rc:10)
04-12 19:02:48.514 0 0 I init : starting service 'exec 29 (/system/bin/flags_health_check UPDATABLE_CRASHING)'...
04-12 19:02:48.541 0 0 I init : SVC_EXEC service 'exec 29 (/system/bin/flags_health_check UPDATABLE_CRASHING)' pid 3115 (uid 1000 gid 1000+0 context default) started; waiting...
04-12 19:02:48.564 3115 3115 I flags_health_check: ServerConfigurableFlagsReset reset_mode value: 1
04-12 19:02:48.565 3115 3115 I flags_health_check: ServerConfigurableFlagsReset updatable crashing detected, resetting flags.
Please subscribe to
[Tama][XZ2C][AOSP12][4.19] Apollo camera provider init failed (every 5secs) · Issue #751 · sonyxperiadev/bug_tracker
Platform: Tama Device: XZ2C (apollo) Kernel version: 4.19.188-ge73c1a837c4f-dirty Android version: AOSP12 Software binaries version: 12_4.19_v1c_tama Previously working on n/a (latest official Sony...
github.com
[Tama][4.19][AOSP12] Device reboots for no clear reason any time it is not idle · Issue #755 · sonyxperiadev/bug_tracker
Platform: Tama Device: Apollo Kernel version: 4.19 Android version: AOSP12 Software binaries version: 12_4.19_v1c_tama Previously working on n/a Description The device reboots after a few minutes o...
github.com
[TAMA][12][4.19] Bootloop · Issue #748 · sonyxperiadev/bug_tracker
Platform: Tama Device: Apollo Kernel version: 4.19 Android version: 12 Software binaries version: v1c Previously working on Stock Description Bootloop and no ADB logs available. The device was flas...
github.com
and firstly this will get fixed: https://github.com/sonyxperiadev/bug_tracker/issues/770
20.05.2022
android-12.1.0_r5 (May security patchlevel)
Click to expand...
Click to collapse
Because of problems with the ftp server the new release is on google drive.
Click to expand...
Click to collapse
Hello, what changes between this rom and the stock based roms ?