[ROM][11][UNOFFICIAL] AICP 16.1 UNNOFICIAL FOR MOTO ONE (DEEN)

Search This thread

jeferson1979

Recognized Developer
Jan 15, 2018
508
697
Taió
sourceforge.net
Moto X
Moto X 2014


logo_black.png


AICP
Android Ice Cold Project

AICP is known by everyone as the "Ice Cold Project" that started on a Desire HD years ago (2012) and since then has evolved into a mature ROM with the BEST community that you can find!!!

Until Android Lollipop, the ROM has always been based on AOKP. Unfortunately, since AOKP stopped development (but made a comeback later), we changed our base to CM.
With the re-brand of CM to LineageOS (LOS), we became LineageOS based with some tweaks from AOSP and then changed to be based on the "Ground Zero Open Source Project" (GZOSP) for Android Pie.
We changed again for Android Q-R with a base of AOSP repositories and some additions from LineageOS for device-specific repositories.

If there are any bugs we will sort them out if it concerns our codebase. This ROM isn't LineageOS supported, so there is no need to report errors/bugs to them!!


Code:
#include <std_disclaimer.h>

/*
* Your warranty is now void.
*
* We are 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 us for messing up your device, we will laugh at you. Hard & a lot.
*
*/

features.png

Feature list (rough overview)


credits.png


In the beginning, we would like to thank:

GZOSP team
LineageOS & CM (R.I.P.) team
@maxwen and the rest of the OmniRom team
DU team
Resurrection Remix team
AOSiP team
Community

team.png


@LorD ClockaN
@eyosen
@semdoc
@SpiritCroc
@wartomato
@Miccia
plus the rest of the crazy bunch that we call "team"



donations.png


We are paying for servers that build weeklies and everything that comes with this, so EVERY DONATION will really be appreciated and be used to cover those expenses.
Thank you!!



downloads.png


Latest Stable Release Version 16.1

Download link: https://sourceforge.net/projects/moto-one-deen/files/AICP-11/

Please note that official builds will be deleted from our servers every month due to maintenance services.
Starting with AICP 15 we will be storing a copy of the most recent release here: https://media.aicp-rom.com/vault/.



changelog.png


Full Changelog link: https://dwnld.aicp-rom.com/
(Just click the changelog button next to the download link in the list of builds available for your device)

Google Apps:
We recommend MindTheGapps as it has been thoroughly tested and it works well with the ROM, some other minimal (and others) GApps packages could have issues, so try using MindTheGapps if you have any issues with other GApps packages

MindTheGapps: https://androidfilehost.com/?w=files&flid=322935
Mirror: http://downloads.codefi.re/jdcteam/javelinanddart/gapps

issues.png


You tell... :p

FAQ:
Before using the ROM:
Q. Can I have an ETA for the next build?
A. Yes, just look here to see what day your device is built on.

Q. Does this ROM support custom kernels officially?
A. No. You can still use them, but the discussion should go in the thread of the respective kernel. We don't offer support for bugs you might encounter while using them!

Q. Does this ROM include GApps or do I have to flash them separately?
A. No, we do not include prebuilt GApps, because of possible licensing issues with Google Software and because some users do not want GApps preinstalled as they want to use alternative services like MicroG or just prefer flashing a GApps "flavor" of their liking.

Q. Does this ROM use the camera or gallery app from stock?
A. It depends on the device. In most cases, these apps include proprietary libs/code and cannot be included in the device trees on GitHub or we risk having the ROM banned from GitHub. In this case, we might try to make them installable (separate from the ROM zip), or we might provide a version of these apps with the ROM that doesn't include any proprietary libs. It's also sometimes the case that these apps are simply not included because we didn't feel the need to do so for the device in question.

Q. Does this ROM have Extended/Scrolling screenshot?
A. No, extended screenshot was implemented using an app extracted and modified from manufacturer firmware/system images and is proprietary as well. It led to the closing of many ROM's sources on GitHub.

Q. Does this ROM have FaceUnlock?
A. No, FaceUnlock was also an app extracted and modified from some manufacturers. Even Google removed the Trusted Face (FaceUnlock) feature for security reasons on Android 9.0/10.x. Adding the modified feature did the same to ROM sources as described above.

Q. Can you add (insert favorite weather provider)?
A. No, we cannot add more weather providers as the implementations change and we (the ROM) now have to pay for most services, and that is not cheap, so we decided to use the best free service that we could find, the only way to add your own is for users to apply for their own API key to use their preferred service.

Q. Does this ROM have private official builds with the above proprietary libs included?
A. No, we believe in open source software, this way users know what's in the build and can replicate it themselves, all official builds are built on our build servers using the public sources from GitHub, and no one can (or would) add their own private sources to the build.

Flashing the ROM:
Q. What do I need to know before flashing?
A. Check the flashing instructions...

Q. Can the builds be dirty flashed over each other?
A. Yes, this is how users can/should install updates most of the time, this can be done with the built-in updater service or with a custom recovery.

Q. How do I 'dirty flash' builds?
A 1. For "A only" devices: Wipe the System, Cache, and ART/Dalvik cache. Flash the ROM, GApps (only needed if you wipe the system), your preferred root solution, and reboot. Or just use the OTA app to perform that task for you.

A 2. For "A/B" devices": Wipe the ART/Dalvik cache. Flash the ROM, reboot to the recovery, flash GApps, your preferred root solution, and reboot. Or just use the OTA app to perform that task for you.

Q. How do I flash kernel builds?
A1. If it's a .img file, boot into TWRP and go to the install page in TWRP, in the bottom right corner select "install image", select the desired kernel, then select "boot" as the destination, then swipe to flash, then go back to the install screen and install your root method again, if you don't want to lose root and reboot.
A2. If it's a flashable ZIP, you can flash it together with a ROM update or separately. Go to the install page in TWRP, choose the kernel zip (or add it to the flash queue right after the ROM zip). Then add your root method to the queue if you don't want to lose root. Now swipe to flash and reboot afterward.

Using the ROM:

Q. Do I need to provide a logcat if I'm reporting a bug?
A. If you want it to be fixed faster (or at all) then yes, you should definitely provide a logcat AND the model name. (Note: Please just link the logcat from your GDrive, Dropbox, etc. Do not post the content here. Thanks.)

Q. How do I get a logcat, what type should I get, and more questions that can conveniently be answered by my pre-determined answer?
A1. Read this thoroughly. Also, here's a good app for getting logs: https://play.google.com/store/apps/details?id=com.tortel.syslog (Root needed).
A2. If you are already rooted, you can use the built-in feature to make a logcat and provide that. Just look into the others section on the AICP Extras main page.


instructions.png


The ROM should contain everything you need to enjoy Android R. You don't need to install any Add-ons, simply download the latest ROM and GApps, then follow the flashing instructions and go!
If you want the device to run the ROM "rooted", you can flash a root solution of your choice after the ROM zip file.

It is STRONGLY recommended to fully wipe your device before flashing and please avoid restoring system apps and system data with Titanium Backup (or with any backup/restore app) as this can cause stability issues that are very hard to debug, restoring regular apps is fine though.
If you believe you know what you're doing - then fine, go ahead, but please don't complain if you experience any strange behavior.

How to flash for the first time:
(Again: Don't do it if you don't know!)

1. Download the ROM and GApps and transfer them to your device.
2. Boot to recovery (TWRP is recommended, the lineage recovery is a great alternative however, it will not decrypt the internal storage so you will have to flash the rom with adb sideload or usb OTG or with an external sdcard).
3. Wipe the System (DO NOT WIPE THE SYSTEM ON A/B DEVICES!), Cache, and Data (you might need to format the data partition!).
4. Flash the ROM zip file (reboot to recovery before flashing anything else if you have an "A/B" device).
5. Flash the GApps (optional, needed for e.g. Google Playstore to work)
6. Reboot and set up your device.
7. You can then reboot to recovery and flash the root solution of your choice if you want to, and then boot back to the system.
The procedure may vary from device to device and is a bit different on system updates!


The ROM has GApps persistence in between dirty flashes, so you only have to flash them once! This might differ on A/B Devices.


Currently supported Root Solution:

Magisk stable
Magisk versions >= 20.4 don't usually need to be flashed on every dirty flash.
Depending on the device, you may need to flash it every time, unless your maintainer says otherwise, you should be fine.


sources.png


If you want to contribute to AICP, or if you want to see what is being worked on/merged, feel free to visit our Gerrit code review system. (Link is at the bottom!!!)

Kernel source:
Device tree source:
Vendor source:
Follow this guide if you want to extract the vendor blobs

ROM & Additional links:
AICP's Homepage
AICP Gerrit Code Review
AICP sources on GitHub
AICP Download page for official builds and media content
AICP Discord Community
AICP Telegram channel for server notifications on official builds

Contributors:

Information:

ROM OS Version:
11.x
Kernel: 3.18.140
ROM Last stock Rom required:
Status:
STABLE
Release Date: 05-31-2022

You want to see a "normal" night at the "DEV office", click here!!
 

jeferson1979

Recognized Developer
Jan 15, 2018
508
697
Taió
sourceforge.net
Moto X
Moto X 2014
Q&A:
1: It's stable?
Yes, it's currently running with selinux enforcing and no major bugs
2: Can I use encryption?
Yes, it's not enforced by default because twrp still can't decrypt, but if you prefer you can do it via settings
3: From where I can find a twrp for first install?
From here. NOTICE: Aicp also ships it's own recovery and it is functional. Besides extreme stable, deen kernel still has a bug where when you are on slot a, recovery can't switch to slot b by it's own, so you need to use fastboot --set-active=b with latest adb tools from google (Download).
From b to a, you can just reboot system. At first install, I recommend a format data to fix selinux contexts that twrp may bork and avoid storage issues
 
Last edited:

jeferson1979

Recognized Developer
Jan 15, 2018
508
697
Taió
sourceforge.net
Moto X
Moto X 2014
AICP 16.1 (android 11)
Moto One deen


Changelog:
June security patch
Signed build;
Enabled verity checks; added the hability to lock bootloader (do it at your own risk -
fastboot flashing lock and fastboot flashing unlock (this kill your data as stock does));
Added Dolby (settings/sound/dolby atmos);
Working usb internet tethering,
Selinux enforcing;
Reworked paddings;
Enabled proccess reclaim;
Gesture navigation as default;
Enabled LiveDisplay (again)

Bugs:
*

Currently, recovery can't change slot from a to b;
You tell me


May be few more changes idk 😅

 

LNX86

New member
Nov 13, 2017
4
1
I've been away from the xda community for a while and got a Motorola One XT-1941-3 (retail from Brazil).
Is this AICP the most stable custom rom available?
Thanks!
 

zahidm

Senior Member
Nov 22, 2013
1,707
1,237
Karachi
Moto X 2014
Moto G5S
AICP 16.1 (android 11)
Moto One deen


Changelog:
June security patch
Signed build;
Enabled verity checks; added the hability to lock bootloader (do it at your own risk -
fastboot flashing lock and fastboot flashing unlock (this kill your data as stock does));
Added Dolby (settings/sound/dolby atmos);
Working usb internet tethering,
Selinux enforcing;
Reworked paddings;
Enabled proccess reclaim;
Gesture navigation as default;
Enabled LiveDisplay (again)

Bugs:
*

Currently, recovery can't change slot from a to b;
You tell me


May be few more changes idk 😅

Bro have Deen too?
 

xdadevc

Senior Member
Sep 19, 2005
63
6
Q&A:
1: It's stable?
Yes, it's currently running with selinux enforcing and no major bugs
...
This is a very nice rom and gives more life to my moto one.
However, I'm trying to build it locally and having some issues with the manifest.
Do you mind sharing your manifest for the rom?
Thank you.
 

xdadevc

Senior Member
Sep 19, 2005
63
6
I'm trying to rebuild your rom locally with your repositories. Maybe I don't use the correct manifest, and I'm getting selinux policy violation.

Code:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
AICP_VERSION=aicp_deen_r-16.1-UNOFFICIAL-20220728
TARGET_PRODUCT=aicp_deen
TARGET_BUILD_VARIANT=user
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.39-1-pve-x86_64-Ubuntu-20.04.4-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
KERNEL_TOOLCHAIN=gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin
HOST_BUILD_TYPE=release
BUILD_ID=RQ3A.211001.001
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=vendor/motorola/deen device/motorola/deen hardware/qcom-caf/msm8996 vendor/qcom/opensource/data-ipa-cfg-mgr vendor/qcom/opensource/dataservices packages/apps/Bluetooth
============================================
wildcard(out/target/product/deen/clean_steps.mk) was changed, regenerating...
$(shell date +%H%M%S) was changed, regenerating...
[100% 26280/26280] writing build rules ...
build/make/core/Makefile:49: warning: overriding commands for target `out/target/product/deen/vendor/lib/hw/audio.primary.msm8953.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `out/target/product/deen/vendor/lib/hw/audio.primary.msm8953.so'
build/make/core/Makefile:49: warning: overriding commands for target `out/target/product/deen/vendor/lib/libsensorndkbridge.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `out/target/product/deen/vendor/lib/libsensorndkbridge.so'
build/make/core/Makefile:49: warning: overriding commands for target `out/target/product/deen/vendor/lib/libtinycompress.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `out/target/product/deen/vendor/lib/libtinycompress.so'
build/make/core/Makefile:49: warning: overriding commands for target `out/target/product/deen/vendor/lib64/libsensorndkbridge.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `out/target/product/deen/vendor/lib64/libsensorndkbridge.so'
[ 60% 26285/43481] build out/target/product/deen/obj/FAKE/sepolicy_tests_intermediates/sepolicy_tests
FAILED: out/target/product/deen/obj/FAKE/sepolicy_tests_intermediates/sepolicy_tests
/bin/bash -c "(out/host/linux-x86/bin/sepolicy_tests -l out/host/linux-x86/lib64/libsepolwrap.so                 -f out/target/product/deen/system/etc/selinux/plat_file_contexts  -f out/target/product/deen/vendor/etc/selinux/vendor_file_contexts  -f out/target/product/deen/system/system_ext/etc/selinux/system_ext_file_contexts  -f out/target/product/deen/system/product/etc/selinux/product_file_contexts  -p out/target/product/deen/obj/ETC/sepolicy_intermediates/sepolicy ) && (touch out/target/product/deen/obj/FAKE/sepolicy_tests_intermediates/sepolicy_tests )"
The following types on /system/ must be associated with the "system_file_type" attribute: clean_scratch_files_exec

12:07:01 ninja failed with: exit status 1

#### failed to build some targets (01:56 (mm:ss)) ####

My local manifest is as follows:

Code:
<manifest>
  <remote name="kernel" fetch="https://github.com" revision="r11.1" />
  <remote name="device" fetch="https://github.com" revision="r11.1" />
  <remote name="vendor" fetch="https://github.com" revision="r11.1" />
  <remote name="github_fetch" fetch="https://github.com/" revision="lineage-18.1" />


  <project name="jro1979oliver/kernel_motorola_deen.git" path="kernel/motorola/deen" remote="kernel" />
  <project name="jro1979oliver/device_motorola_deen.git" path="device/motorola/deen" remote="device" />
  <project name="jro1979oliver/aicp_vendor_motorola.git" path="vendor/motorola" remote="vendor" />


  <project path="external/bson" name="LineageOS/android_external_bson" remote="github_fetch" revision="lineage-18.1" />
  <project path="hardware/motorola" name="LineageOS/android_hardware_motorola" remote="github_fetch" revision="lineage-18.1" />
  <project path="system/qcom" name="LineageOS/android_system_qcom" remote="github_fetch" revision="lineage-18.1" />
</manifest>

Could you point me in the right direction? Is the manifest good or am I missing something?

Your help will be much appreciated.
Thanks.
 

jeferson1979

Recognized Developer
Jan 15, 2018
508
697
Taió
sourceforge.net
Moto X
Moto X 2014
I'm trying to rebuild your rom locally with your repositories. Maybe I don't use the correct manifest, and I'm getting selinux policy violation.

Code:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
AICP_VERSION=aicp_deen_r-16.1-UNOFFICIAL-20220728
TARGET_PRODUCT=aicp_deen
TARGET_BUILD_VARIANT=user
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.39-1-pve-x86_64-Ubuntu-20.04.4-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
KERNEL_TOOLCHAIN=gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin
HOST_BUILD_TYPE=release
BUILD_ID=RQ3A.211001.001
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=vendor/motorola/deen device/motorola/deen hardware/qcom-caf/msm8996 vendor/qcom/opensource/data-ipa-cfg-mgr vendor/qcom/opensource/dataservices packages/apps/Bluetooth
============================================
wildcard(out/target/product/deen/clean_steps.mk) was changed, regenerating...
$(shell date +%H%M%S) was changed, regenerating...
[100% 26280/26280] writing build rules ...
build/make/core/Makefile:49: warning: overriding commands for target `out/target/product/deen/vendor/lib/hw/audio.primary.msm8953.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `out/target/product/deen/vendor/lib/hw/audio.primary.msm8953.so'
build/make/core/Makefile:49: warning: overriding commands for target `out/target/product/deen/vendor/lib/libsensorndkbridge.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `out/target/product/deen/vendor/lib/libsensorndkbridge.so'
build/make/core/Makefile:49: warning: overriding commands for target `out/target/product/deen/vendor/lib/libtinycompress.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `out/target/product/deen/vendor/lib/libtinycompress.so'
build/make/core/Makefile:49: warning: overriding commands for target `out/target/product/deen/vendor/lib64/libsensorndkbridge.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `out/target/product/deen/vendor/lib64/libsensorndkbridge.so'
[ 60% 26285/43481] build out/target/product/deen/obj/FAKE/sepolicy_tests_intermediates/sepolicy_tests
FAILED: out/target/product/deen/obj/FAKE/sepolicy_tests_intermediates/sepolicy_tests
/bin/bash -c "(out/host/linux-x86/bin/sepolicy_tests -l out/host/linux-x86/lib64/libsepolwrap.so                 -f out/target/product/deen/system/etc/selinux/plat_file_contexts  -f out/target/product/deen/vendor/etc/selinux/vendor_file_contexts  -f out/target/product/deen/system/system_ext/etc/selinux/system_ext_file_contexts  -f out/target/product/deen/system/product/etc/selinux/product_file_contexts  -p out/target/product/deen/obj/ETC/sepolicy_intermediates/sepolicy ) && (touch out/target/product/deen/obj/FAKE/sepolicy_tests_intermediates/sepolicy_tests )"
The following types on /system/ must be associated with the "system_file_type" attribute: clean_scratch_files_exec

12:07:01 ninja failed with: exit status 1

#### failed to build some targets (01:56 (mm:ss)) ####

My local manifest is as follows:

Code:
<manifest>
  <remote name="kernel" fetch="https://github.com" revision="r11.1" />
  <remote name="device" fetch="https://github.com" revision="r11.1" />
  <remote name="vendor" fetch="https://github.com" revision="r11.1" />
  <remote name="github_fetch" fetch="https://github.com/" revision="lineage-18.1" />


  <project name="jro1979oliver/kernel_motorola_deen.git" path="kernel/motorola/deen" remote="kernel" />
  <project name="jro1979oliver/device_motorola_deen.git" path="device/motorola/deen" remote="device" />
  <project name="jro1979oliver/aicp_vendor_motorola.git" path="vendor/motorola" remote="vendor" />


  <project path="external/bson" name="LineageOS/android_external_bson" remote="github_fetch" revision="lineage-18.1" />
  <project path="hardware/motorola" name="LineageOS/android_hardware_motorola" remote="github_fetch" revision="lineage-18.1" />
  <project path="system/qcom" name="LineageOS/android_system_qcom" remote="github_fetch" revision="lineage-18.1" />
</manifest>

Could you point me in the right direction? Is the manifest good or am I missing something?

Your help will be much appreciated.
Thanks.
Just revert this commit. Also, use this repo for hardware/motorola
 

xdadevc

Senior Member
Sep 19, 2005
63
6
I made some progress (thanks). There seems to be another selinux issue:
Code:
[  4% 400/9625] build out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0
FAILED: out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0
/bin/bash -c "(out/host/linux-x86/bin/treble_sepolicy_tests -l          out/host/linux-x86/lib64/libsepolwrap.so  -f out/target/product/deen/system/etc/selinux/plat_file_contexts  -f out/target/product/deen/vendor/etc/selinux/vendor_file_contexts  -f out/target/product/deen/system/system_ext/etc/selinux/system_ext_file_contexts  -f out/target/product/deen/system/product/etc/selinux/product_file_contexts              -b out/target/product/deen/obj/ETC/built_plat_sepolicy_intermediates/built_plat_sepolicy -m out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/26.0_mapping.combined.cil             -o out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/built_26.0_plat_sepolicy -p out/target/product/deen/obj/ETC/sepolicy_intermediates/sepolicy            -u out/target/product/deen/obj/ETC/built_plat_sepolicy_intermediates/base_plat_pub_policy.cil ) && (touch out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0 )"
SELinux: The following domains violate the Treble ban against use of the binder_in_vendor_violators attribute: mm-qcamerad

14:04:29 ninja failed with: exit status 1

Looking at the sepolicy/vendor/mm-qcamerad.te file I see:
Code:
# TODO(b/36599434): Remove this once mm-qcamerad stops using Binder services
typeattribute mm-qcamerad binder_in_vendor_violators;
allow mm-qcamerad binder_device:chr_file { read write };
What would be the proper fix here? (sorry if I bother you, I understand I'm way out of my league).
 

jeferson1979

Recognized Developer
Jan 15, 2018
508
697
Taió
sourceforge.net
Moto X
Moto X 2014
I made some progress (thanks). There seems to be another selinux issue:
Code:
[  4% 400/9625] build out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0
FAILED: out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0
/bin/bash -c "(out/host/linux-x86/bin/treble_sepolicy_tests -l          out/host/linux-x86/lib64/libsepolwrap.so  -f out/target/product/deen/system/etc/selinux/plat_file_contexts  -f out/target/product/deen/vendor/etc/selinux/vendor_file_contexts  -f out/target/product/deen/system/system_ext/etc/selinux/system_ext_file_contexts  -f out/target/product/deen/system/product/etc/selinux/product_file_contexts              -b out/target/product/deen/obj/ETC/built_plat_sepolicy_intermediates/built_plat_sepolicy -m out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/26.0_mapping.combined.cil             -o out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/built_26.0_plat_sepolicy -p out/target/product/deen/obj/ETC/sepolicy_intermediates/sepolicy            -u out/target/product/deen/obj/ETC/built_plat_sepolicy_intermediates/base_plat_pub_policy.cil ) && (touch out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0 )"
SELinux: The following domains violate the Treble ban against use of the binder_in_vendor_violators attribute: mm-qcamerad

14:04:29 ninja failed with: exit status 1

Looking at the sepolicy/vendor/mm-qcamerad.te file I see:
Code:
# TODO(b/36599434): Remove this once mm-qcamerad stops using Binder services
typeattribute mm-qcamerad binder_in_vendor_violators;
allow mm-qcamerad binder_device:chr_file { read write };
What would be the proper fix here? (sorry if I bother you, I understand I'm way out of my league).
Remove typeattribute mm-qcamerad binder_in_vendor_violators;
 
  • Like
Reactions: xdadevc

xdadevc

Senior Member
Sep 19, 2005
63
6
Remove typeattribute mm-qcamerad binder_in_vendor_violators;
This fixed the compile problem. Thank you so much. I've been struggling with compiling an updated aicp for deen for two whole days.

I had a few other issues with a modified api, hence my delay, but I was able to compile, and flash the moto one. It seems to work. No boot loops :)

I ended up with a few gapps installed in the system (youtube, photos, maps) but there was no google services. This is weird. Why did those apps get included in the first place and how do I remove them?
 

jeferson1979

Recognized Developer
Jan 15, 2018
508
697
Taió
sourceforge.net
Moto X
Moto X 2014
This fixed the compile problem. Thank you so much. I've been struggling with compiling an updated aicp for deen for two whole days.

I had a few other issues with a modified api, hence my delay, but I was able to compile, and flash the moto one. It seems to work. No boot loops :)

I ended up with a few gapps installed in the system (youtube, photos, maps) but there was no google services. This is weird. Why did those apps get included in the first place and how do I remove them?
You may want to use my TWRP with oem wipe option built in, this gapps are coming from stock installation
 
  • Like
Reactions: xdadevc

xdadevc

Senior Member
Sep 19, 2005
63
6
You may want to use my TWRP with oem wipe option built in, this gapps are coming from stock installation
Formatting the oem partition made them disappear. Most/all things seem to work, including all the hardware. I'm going trough your github commit history. You did quite a bit of work there over the last few months. Impressive. Thank you again !
 
  • Like
Reactions: jeferson1979

xdadevc

Senior Member
Sep 19, 2005
63
6
Ok,
You may want to use my TWRP with oem wipe option built in, this gapps are coming from stock installation
I was trying to sign my build and I made something stupid and hard-bricked my xt1941-3 deen.
I have fastboot. fastboot devices shows something but there is no partition table. No A/B slots and no imei/baseband or any other thing. The serial number changed as well. It's still seend as a "deen" product with variant 000000000000000
In linux the phone is recognized as
Bus 001 Device 055: ID 22b8:2e80 Motorola PCS Fastboot deen S
Blankflash will not work in either linux or windows. It waits for the device (I quess the qualcomm flashing device) which is not there.

Is there a way out?

PS: What I did was I flashed the A slot with my boot/system/vendor.img. Then erased the B slot partitions, then booted into TWRP, activated the B slot and flashed the signed ota update, thinking that it would go to the A slot. In the middle of the flash, my phone rebooted and I got a faled boot, no gpt.bin etc.
 

xdadevc

Senior Member
Sep 19, 2005
63
6
So, I managed to get my bootloader back. The issue with a partial bootloader was that it was not accepting the blankflash command. No QCOM serial inteface etc.
I found out that "fastboot oem blankflash" will put the bootloader into blankflash mode, and pull up the serial interface. However there's a timing issue. blankflash must start almost immediately after going into this mode. To same me the hassle I made a small script:
Code:
#!/bin/bash

fastboot oem blankflash
for i in `seq 1 1000` ; do
   ./qboot blank-flash --debug=4 $*
done

Now this is sub-optimal, but worked first time for me. Just power on the phone, wait for the bootloader to come up, then start the script. It will require a ctrl-c after the phone reboots into fastboot again, this time with a proper partition table, imei, gpt etc all working.

Back to business. I'm trying to sign AICP with my own keys, then enable AVB verifier and relock the bootloader. Perhaps blankflash can be used to actually flash my own boot in place of the motorola one?

For now I'm trying to understand how to exactly sign the image with my keys. Then how to enable AVB.

PS: The "blankflash" command from fastboot oem disappeared as soon as I had a working gpt. I guess it's a failsafe. Trying to put it again into blankflash mode resulted in an error. YMMV
 
Last edited:

xdadevc

Senior Member
Sep 19, 2005
63
6
Hi, it's been a long weekend here. I'm up and running now. ROM compiles and works nicely. I have one residual issue when updating from a build generated by me. The recovery accepts it (keys verify) but fails at the last stage (3/3) after updating some of the partitions. After this the moto will not boot any more and requires a full image file upload. Not sure why this is and if it's only on my own phone.

But overall, things look nice. Great job @jeferson1979 and for the help in setting this up.
 
  • Like
Reactions: jeferson1979

xdadevc

Senior Member
Sep 19, 2005
63
6
There's an issue with TWRP 3.6.9. I tried to use it to make a nandroid backup of a running AICP (test keys) and I skipped the data partition. The backup seemed properly done (no errors).

However, rebooting the phone never gets past the initial bootloader screen. This is only after making a backup, no restore.

I tried restoring the boot image, then system and it failed with an error. Second thing I tried was flashing my current build of AICP (different keys that original). Booting works, but decoding the data (which is encrypted) resulted in an error. The message says "password is correct, but the data is corrupt and cannot be decoded". This is weird because it says the same even with a totally bogus password.

So, seems that booting in TWRP will damage the data partition. Is this due to the different selinux context? Any other suggestion for making a nandroid backup? Recompile TWRP for Moto Deen ?

I'm be willing to help/compile/work on this. Let me know where to dig ;)
I'm trying to get my moto up to standard of being a daily driver and reliable enough to be safe with the data in it.
I think there's a lot of life left in it.

Let me know. Thank you.
 
Last edited:

jeferson1979

Recognized Developer
Jan 15, 2018
508
697
Taió
sourceforge.net
Moto X
Moto X 2014
There's an issue with TWRP 3.6.9. I tried to use it to make a nandroid backup of a running AICP (test keys) and I skipped the data partition. The backup seemed properly done (no errors).

However, rebooting the phone never gets past the initial bootloader screen. This is only after making a backup, no restore.

I tried restoring the boot image, then system and it failed with an error. Second thing I tried was flashing my current build of AICP (different keys that original). Booting works, but decoding the data (which is encrypted) resulted in an error. The message says "password is correct, but the data is corrupt and cannot be decoded". This is weird because it says the same even with a totally bogus password.

So, seems that booting in TWRP will damage the data partition. Is this due to the different selinux context? Any other suggestion for making a nandroid backup? Recompile TWRP for Moto Deen ?

I'm be willing to help/compile/work on this. Let me know where to dig ;)
I'm trying to get my moto up to standard of being a daily driver and reliable enough to be safe with the data in it.
I think there's a lot of life left in it.

Let me know. Thank you.
It's a know issue of TWRP last years, also, encryption doesn't work either. And you're right, TWRP makes selinux contexts goes nuts
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I made some progress (thanks). There seems to be another selinux issue:
    Code:
    [  4% 400/9625] build out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0
    FAILED: out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0
    /bin/bash -c "(out/host/linux-x86/bin/treble_sepolicy_tests -l          out/host/linux-x86/lib64/libsepolwrap.so  -f out/target/product/deen/system/etc/selinux/plat_file_contexts  -f out/target/product/deen/vendor/etc/selinux/vendor_file_contexts  -f out/target/product/deen/system/system_ext/etc/selinux/system_ext_file_contexts  -f out/target/product/deen/system/product/etc/selinux/product_file_contexts              -b out/target/product/deen/obj/ETC/built_plat_sepolicy_intermediates/built_plat_sepolicy -m out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/26.0_mapping.combined.cil             -o out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/built_26.0_plat_sepolicy -p out/target/product/deen/obj/ETC/sepolicy_intermediates/sepolicy            -u out/target/product/deen/obj/ETC/built_plat_sepolicy_intermediates/base_plat_pub_policy.cil ) && (touch out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0 )"
    SELinux: The following domains violate the Treble ban against use of the binder_in_vendor_violators attribute: mm-qcamerad
    
    14:04:29 ninja failed with: exit status 1

    Looking at the sepolicy/vendor/mm-qcamerad.te file I see:
    Code:
    # TODO(b/36599434): Remove this once mm-qcamerad stops using Binder services
    typeattribute mm-qcamerad binder_in_vendor_violators;
    allow mm-qcamerad binder_device:chr_file { read write };
    What would be the proper fix here? (sorry if I bother you, I understand I'm way out of my league).
    Remove typeattribute mm-qcamerad binder_in_vendor_violators;
    1
    This fixed the compile problem. Thank you so much. I've been struggling with compiling an updated aicp for deen for two whole days.

    I had a few other issues with a modified api, hence my delay, but I was able to compile, and flash the moto one. It seems to work. No boot loops :)

    I ended up with a few gapps installed in the system (youtube, photos, maps) but there was no google services. This is weird. Why did those apps get included in the first place and how do I remove them?
    You may want to use my TWRP with oem wipe option built in, this gapps are coming from stock installation
    1
    You may want to use my TWRP with oem wipe option built in, this gapps are coming from stock installation
    Formatting the oem partition made them disappear. Most/all things seem to work, including all the hardware. I'm going trough your github commit history. You did quite a bit of work there over the last few months. Impressive. Thank you again !
    1
    Hi, it's been a long weekend here. I'm up and running now. ROM compiles and works nicely. I have one residual issue when updating from a build generated by me. The recovery accepts it (keys verify) but fails at the last stage (3/3) after updating some of the partitions. After this the moto will not boot any more and requires a full image file upload. Not sure why this is and if it's only on my own phone.

    But overall, things look nice. Great job @jeferson1979 and for the help in setting this up.
  • 4


    logo_black.png


    AICP
    Android Ice Cold Project

    AICP is known by everyone as the "Ice Cold Project" that started on a Desire HD years ago (2012) and since then has evolved into a mature ROM with the BEST community that you can find!!!

    Until Android Lollipop, the ROM has always been based on AOKP. Unfortunately, since AOKP stopped development (but made a comeback later), we changed our base to CM.
    With the re-brand of CM to LineageOS (LOS), we became LineageOS based with some tweaks from AOSP and then changed to be based on the "Ground Zero Open Source Project" (GZOSP) for Android Pie.
    We changed again for Android Q-R with a base of AOSP repositories and some additions from LineageOS for device-specific repositories.

    If there are any bugs we will sort them out if it concerns our codebase. This ROM isn't LineageOS supported, so there is no need to report errors/bugs to them!!


    Code:
    #include <std_disclaimer.h>
    
    /*
    * Your warranty is now void.
    *
    * We are 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 us for messing up your device, we will laugh at you. Hard & a lot.
    *
    */

    features.png

    Feature list (rough overview)


    credits.png


    In the beginning, we would like to thank:

    GZOSP team
    LineageOS & CM (R.I.P.) team
    @maxwen and the rest of the OmniRom team
    DU team
    Resurrection Remix team
    AOSiP team
    Community

    team.png


    @LorD ClockaN
    @eyosen
    @semdoc
    @SpiritCroc
    @wartomato
    @Miccia
    plus the rest of the crazy bunch that we call "team"



    donations.png


    We are paying for servers that build weeklies and everything that comes with this, so EVERY DONATION will really be appreciated and be used to cover those expenses.
    Thank you!!



    downloads.png


    Latest Stable Release Version 16.1

    Download link: https://sourceforge.net/projects/moto-one-deen/files/AICP-11/

    Please note that official builds will be deleted from our servers every month due to maintenance services.
    Starting with AICP 15 we will be storing a copy of the most recent release here: https://media.aicp-rom.com/vault/.



    changelog.png


    Full Changelog link: https://dwnld.aicp-rom.com/
    (Just click the changelog button next to the download link in the list of builds available for your device)

    Google Apps:
    We recommend MindTheGapps as it has been thoroughly tested and it works well with the ROM, some other minimal (and others) GApps packages could have issues, so try using MindTheGapps if you have any issues with other GApps packages

    MindTheGapps: https://androidfilehost.com/?w=files&flid=322935
    Mirror: http://downloads.codefi.re/jdcteam/javelinanddart/gapps

    issues.png


    You tell... :p

    FAQ:
    Before using the ROM:
    Q. Can I have an ETA for the next build?
    A. Yes, just look here to see what day your device is built on.

    Q. Does this ROM support custom kernels officially?
    A. No. You can still use them, but the discussion should go in the thread of the respective kernel. We don't offer support for bugs you might encounter while using them!

    Q. Does this ROM include GApps or do I have to flash them separately?
    A. No, we do not include prebuilt GApps, because of possible licensing issues with Google Software and because some users do not want GApps preinstalled as they want to use alternative services like MicroG or just prefer flashing a GApps "flavor" of their liking.

    Q. Does this ROM use the camera or gallery app from stock?
    A. It depends on the device. In most cases, these apps include proprietary libs/code and cannot be included in the device trees on GitHub or we risk having the ROM banned from GitHub. In this case, we might try to make them installable (separate from the ROM zip), or we might provide a version of these apps with the ROM that doesn't include any proprietary libs. It's also sometimes the case that these apps are simply not included because we didn't feel the need to do so for the device in question.

    Q. Does this ROM have Extended/Scrolling screenshot?
    A. No, extended screenshot was implemented using an app extracted and modified from manufacturer firmware/system images and is proprietary as well. It led to the closing of many ROM's sources on GitHub.

    Q. Does this ROM have FaceUnlock?
    A. No, FaceUnlock was also an app extracted and modified from some manufacturers. Even Google removed the Trusted Face (FaceUnlock) feature for security reasons on Android 9.0/10.x. Adding the modified feature did the same to ROM sources as described above.

    Q. Can you add (insert favorite weather provider)?
    A. No, we cannot add more weather providers as the implementations change and we (the ROM) now have to pay for most services, and that is not cheap, so we decided to use the best free service that we could find, the only way to add your own is for users to apply for their own API key to use their preferred service.

    Q. Does this ROM have private official builds with the above proprietary libs included?
    A. No, we believe in open source software, this way users know what's in the build and can replicate it themselves, all official builds are built on our build servers using the public sources from GitHub, and no one can (or would) add their own private sources to the build.

    Flashing the ROM:
    Q. What do I need to know before flashing?
    A. Check the flashing instructions...

    Q. Can the builds be dirty flashed over each other?
    A. Yes, this is how users can/should install updates most of the time, this can be done with the built-in updater service or with a custom recovery.

    Q. How do I 'dirty flash' builds?
    A 1. For "A only" devices: Wipe the System, Cache, and ART/Dalvik cache. Flash the ROM, GApps (only needed if you wipe the system), your preferred root solution, and reboot. Or just use the OTA app to perform that task for you.

    A 2. For "A/B" devices": Wipe the ART/Dalvik cache. Flash the ROM, reboot to the recovery, flash GApps, your preferred root solution, and reboot. Or just use the OTA app to perform that task for you.

    Q. How do I flash kernel builds?
    A1. If it's a .img file, boot into TWRP and go to the install page in TWRP, in the bottom right corner select "install image", select the desired kernel, then select "boot" as the destination, then swipe to flash, then go back to the install screen and install your root method again, if you don't want to lose root and reboot.
    A2. If it's a flashable ZIP, you can flash it together with a ROM update or separately. Go to the install page in TWRP, choose the kernel zip (or add it to the flash queue right after the ROM zip). Then add your root method to the queue if you don't want to lose root. Now swipe to flash and reboot afterward.

    Using the ROM:

    Q. Do I need to provide a logcat if I'm reporting a bug?
    A. If you want it to be fixed faster (or at all) then yes, you should definitely provide a logcat AND the model name. (Note: Please just link the logcat from your GDrive, Dropbox, etc. Do not post the content here. Thanks.)

    Q. How do I get a logcat, what type should I get, and more questions that can conveniently be answered by my pre-determined answer?
    A1. Read this thoroughly. Also, here's a good app for getting logs: https://play.google.com/store/apps/details?id=com.tortel.syslog (Root needed).
    A2. If you are already rooted, you can use the built-in feature to make a logcat and provide that. Just look into the others section on the AICP Extras main page.


    instructions.png


    The ROM should contain everything you need to enjoy Android R. You don't need to install any Add-ons, simply download the latest ROM and GApps, then follow the flashing instructions and go!
    If you want the device to run the ROM "rooted", you can flash a root solution of your choice after the ROM zip file.

    It is STRONGLY recommended to fully wipe your device before flashing and please avoid restoring system apps and system data with Titanium Backup (or with any backup/restore app) as this can cause stability issues that are very hard to debug, restoring regular apps is fine though.
    If you believe you know what you're doing - then fine, go ahead, but please don't complain if you experience any strange behavior.

    How to flash for the first time:
    (Again: Don't do it if you don't know!)

    1. Download the ROM and GApps and transfer them to your device.
    2. Boot to recovery (TWRP is recommended, the lineage recovery is a great alternative however, it will not decrypt the internal storage so you will have to flash the rom with adb sideload or usb OTG or with an external sdcard).
    3. Wipe the System (DO NOT WIPE THE SYSTEM ON A/B DEVICES!), Cache, and Data (you might need to format the data partition!).
    4. Flash the ROM zip file (reboot to recovery before flashing anything else if you have an "A/B" device).
    5. Flash the GApps (optional, needed for e.g. Google Playstore to work)
    6. Reboot and set up your device.
    7. You can then reboot to recovery and flash the root solution of your choice if you want to, and then boot back to the system.
    The procedure may vary from device to device and is a bit different on system updates!


    The ROM has GApps persistence in between dirty flashes, so you only have to flash them once! This might differ on A/B Devices.


    Currently supported Root Solution:

    Magisk stable
    Magisk versions >= 20.4 don't usually need to be flashed on every dirty flash.
    Depending on the device, you may need to flash it every time, unless your maintainer says otherwise, you should be fine.


    sources.png


    If you want to contribute to AICP, or if you want to see what is being worked on/merged, feel free to visit our Gerrit code review system. (Link is at the bottom!!!)

    Kernel source:
    Device tree source:
    Vendor source:
    Follow this guide if you want to extract the vendor blobs

    ROM & Additional links:
    AICP's Homepage
    AICP Gerrit Code Review
    AICP sources on GitHub
    AICP Download page for official builds and media content
    AICP Discord Community
    AICP Telegram channel for server notifications on official builds

    Contributors:

    Information:

    ROM OS Version:
    11.x
    Kernel: 3.18.140
    ROM Last stock Rom required:
    Status:
    STABLE
    Release Date: 05-31-2022

    You want to see a "normal" night at the "DEV office", click here!!
    3
    Q&A:
    1: It's stable?
    Yes, it's currently running with selinux enforcing and no major bugs
    2: Can I use encryption?
    Yes, it's not enforced by default because twrp still can't decrypt, but if you prefer you can do it via settings
    3: From where I can find a twrp for first install?
    From here. NOTICE: Aicp also ships it's own recovery and it is functional. Besides extreme stable, deen kernel still has a bug where when you are on slot a, recovery can't switch to slot b by it's own, so you need to use fastboot --set-active=b with latest adb tools from google (Download).
    From b to a, you can just reboot system. At first install, I recommend a format data to fix selinux contexts that twrp may bork and avoid storage issues
    1
    I made some progress (thanks). There seems to be another selinux issue:
    Code:
    [  4% 400/9625] build out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0
    FAILED: out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0
    /bin/bash -c "(out/host/linux-x86/bin/treble_sepolicy_tests -l          out/host/linux-x86/lib64/libsepolwrap.so  -f out/target/product/deen/system/etc/selinux/plat_file_contexts  -f out/target/product/deen/vendor/etc/selinux/vendor_file_contexts  -f out/target/product/deen/system/system_ext/etc/selinux/system_ext_file_contexts  -f out/target/product/deen/system/product/etc/selinux/product_file_contexts              -b out/target/product/deen/obj/ETC/built_plat_sepolicy_intermediates/built_plat_sepolicy -m out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/26.0_mapping.combined.cil             -o out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/built_26.0_plat_sepolicy -p out/target/product/deen/obj/ETC/sepolicy_intermediates/sepolicy            -u out/target/product/deen/obj/ETC/built_plat_sepolicy_intermediates/base_plat_pub_policy.cil ) && (touch out/target/product/deen/obj/FAKE/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0 )"
    SELinux: The following domains violate the Treble ban against use of the binder_in_vendor_violators attribute: mm-qcamerad
    
    14:04:29 ninja failed with: exit status 1

    Looking at the sepolicy/vendor/mm-qcamerad.te file I see:
    Code:
    # TODO(b/36599434): Remove this once mm-qcamerad stops using Binder services
    typeattribute mm-qcamerad binder_in_vendor_violators;
    allow mm-qcamerad binder_device:chr_file { read write };
    What would be the proper fix here? (sorry if I bother you, I understand I'm way out of my league).
    Remove typeattribute mm-qcamerad binder_in_vendor_violators;
    1
    This fixed the compile problem. Thank you so much. I've been struggling with compiling an updated aicp for deen for two whole days.

    I had a few other issues with a modified api, hence my delay, but I was able to compile, and flash the moto one. It seems to work. No boot loops :)

    I ended up with a few gapps installed in the system (youtube, photos, maps) but there was no google services. This is weird. Why did those apps get included in the first place and how do I remove them?
    You may want to use my TWRP with oem wipe option built in, this gapps are coming from stock installation