General [CLOSED] AOSP support -- working AOSP12 built from source.

Status
Not open for further replies.
Search This thread

AlexDalas

Member
Oct 31, 2021
10
6
Google Pixel 6 Pro
Although I'm in the process of learning right now. I already managed to install the provided image of @96carboard and updated it with a random aosp_raven-userdebug build from flash.android.com, witch went really smoothly.
I would do the same thing, but i have no idea how to flash a build of android from the command line, and i dont want to accidentally mess something up by following a tutorial from google... (can someone please point me in the general direction, i am new to aosp and roms on android)

Without the custom build from 96carboard, AOSP is sort of usable, just cameras and microphones do not work at all (although there was that one time it barely worked, but i can't really call anyone... which defeats the point of the phone itself). The only reason i am waitinbg for Calyx or Graphene (said above) is because i do not know how to get it working (again please someone point me in the general direction). (if i do get it working, i will not use calyx or graphene)

I tried building my own version of AOSP with the patches, but that did not work (i got a lot of errors, and my computer did (practically) fit the requirements but to no avail from errors)
 
Last edited:

96carboard

Senior Member
Jul 17, 2018
669
374
Without the custom build from 96carboard, AOSP is sort of usable, just cameras and microphones do not work at all (although there was that one time it barely worked, but i can't really call anyone... which defeats the point of the phone itself). The only reason i am waitinbg for Calyx or Graphene (said above) is because i do not know how to get it working (again please someone point me in the general direction). (if i do get it working, i will not use calyx or graphene)

I tried building my own version of AOSP with the patches, but that did not work (i got a lot of errors, and my computer did (practically) fit the requirements but to no avail from errors)

You shouldn't be having any problem with cameras or microphones on AOSP builds. They work 100%. Certainly do on my builds. Calls, cameras, you name it, all working. No patches needed.

Have a log clip?
 

Burt Squirtz

Senior Member
Feb 11, 2018
601
282
Google Pixel 6
Here is a build of AOSP12r14
This is SD1A.210817.037

{Mod edit: Link removed}

Run flash-base.sh from the corresponding factory image to update bootloader and radio if you like.
Use "fastboot update" to install.

Very minor changes from pure AOSP;
1) selinux is permissive because I haven't got around to fixing a glitch.
2) Dialer/Messaging/Contacts have selective picks from lineageos for dark mode.
3) Dialer includes automatic call recording per the following;

Code:
From 945c17eabfdf9f108b26eda3d54266c0a2255234 Mon Sep 17 00:00:00 2001
Date: Mon, 8 Nov 2021 14:17:51 -0500
Subject: [PATCH] Automatic call recording

Change-Id: Icdb26fa6729e6a13dc6190a42dc75453900a6345
---
 .../dialer/app/res/values/cm_strings.xml      |  2 ++
 .../dialer/app/res/xml/sound_settings.xml     |  5 ++++
 .../dialer/callrecord/res/values/config.xml   |  4 +--
 .../android/incallui/CallButtonPresenter.java | 30 +++++++++++++++++--
 4 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/java/com/android/dialer/app/res/values/cm_strings.xml b/java/com/android/dialer/app/res/values/cm_strings.xml
index 1dcdb2b81..3f7602d44 100644
--- a/java/com/android/dialer/app/res/values/cm_strings.xml
+++ b/java/com/android/dialer/app/res/values/cm_strings.xml
@@ -38,6 +38,8 @@
     <string name="call_recording_format">Audio format</string>
     <string name="wb_amr_format" translatable="false">AMR-WB</string>
     <string name="aac_format" translatable="false">AAC</string>
+    <string name="auto_call_recording_title">Auto call recording</string>
+    <string name="auto_call_recording_key" translatable="false">auto_call_recording</string>
 
     <string name="call_via">Call via</string>
     <string name="call_via_dialog_title">Call via\u2026</string>
diff --git a/java/com/android/dialer/app/res/xml/sound_settings.xml b/java/com/android/dialer/app/res/xml/sound_settings.xml
index aa025874f..d31ea9e5c 100644
--- a/java/com/android/dialer/app/res/xml/sound_settings.xml
+++ b/java/com/android/dialer/app/res/xml/sound_settings.xml
@@ -83,6 +83,11 @@
       android:entryValues="@array/call_recording_encoder_values"
       android:defaultValue="0" />
 
+    <SwitchPreference
+      android:defaultValue="false"
+      android:key="@string/auto_call_recording_key"
+      android:title="@string/auto_call_recording_title"/>
+
   </PreferenceCategory>
 
 </PreferenceScreen>
diff --git a/java/com/android/dialer/callrecord/res/values/config.xml b/java/com/android/dialer/callrecord/res/values/config.xml
index 7aabd6cac..2832c87bc 100644
--- a/java/com/android/dialer/callrecord/res/values/config.xml
+++ b/java/com/android/dialer/callrecord/res/values/config.xml
@@ -16,8 +16,8 @@
 -->
 
 <resources>
-    <bool name="call_recording_enabled">false</bool>
+    <bool name="call_recording_enabled">true</bool>
     <!-- 1 (MIC) for microphone audio source (default)
          4 (VOICE_CALL) if supported by device for voice call uplink + downlink audio source -->
-    <integer name="call_recording_audio_source">1</integer>
+    <integer name="call_recording_audio_source">4</integer>
 </resources>
diff --git a/java/com/android/incallui/CallButtonPresenter.java b/java/com/android/incallui/CallButtonPresenter.java
index 0fa833edd..175fe7cc2 100644
--- a/java/com/android/incallui/CallButtonPresenter.java
+++ b/java/com/android/incallui/CallButtonPresenter.java
@@ -21,6 +21,7 @@ import android.content.Context;
 import android.content.SharedPreferences;
 import android.content.pm.PackageManager;
 import android.os.Bundle;
+import android.os.Handler;
 import android.os.Trace;
 import android.preference.PreferenceManager;
 import android.support.v4.app.Fragment;
@@ -74,6 +75,7 @@ public class CallButtonPresenter
   private DialerCall call;
   private boolean isInCallButtonUiReady;
   private PhoneAccountHandle otherAccount;
+  private boolean isRecording = false;
 
   private CallRecorder.RecordingProgressListener recordingProgressListener =
       new CallRecorder.RecordingProgressListener() {
@@ -114,6 +116,11 @@ public class CallButtonPresenter
 
     CallRecorder recorder = CallRecorder.getInstance();
     recorder.addRecordingProgressListener(recordingProgressListener);
+    if(recorder.isRecording()){
+      inCallButtonUi.setCallRecordingState(true);
+    } else {
+      inCallButtonUi.setCallRecordingState(false);
+    }
 
     // Update the buttons state immediately for the current call
     onStateChange(InCallState.NO_CALLS, inCallPresenter.getInCallState(), CallList.getInstance());
@@ -144,6 +151,8 @@ public class CallButtonPresenter
   @Override
   public void onStateChange(InCallState oldState, InCallState newState, CallList callList) {
     Trace.beginSection("CallButtonPresenter.onStateChange");
+    CallRecorder recorder = CallRecorder.getInstance();
+    boolean isEnabled = PreferenceManager.getDefaultSharedPreferences(context).getBoolean(context.getString(R.string.auto_call_recording_key), false);
     if (call != null) {
       call.removeListener(this);
     }
@@ -152,6 +161,16 @@ public class CallButtonPresenter
     } else if (newState == InCallState.INCALL) {
       call = callList.getActiveOrBackgroundCall();
 
+    if (!isRecording && isEnabled && call != null) {
+                isRecording = true;
+                new Handler().postDelayed(new Runnable() {
+                    @Override
+                    public void run() {
+                        callRecordClicked(true);
+                    }
+                }, 500);
+    }
+
       // When connected to voice mail, automatically shows the dialpad.
       // (On previous releases we showed it when in-call shows up, before waiting for
       // OUTGOING.  We may want to do that once we start showing "Voice mail" label on
@@ -167,6 +186,9 @@ public class CallButtonPresenter
       }
       call = callList.getIncomingCall();
     } else {
+      if (isEnabled && recorder.isRecording()) {
+         recorder.finishRecording();
+      }
       call = null;
     }
 
@@ -337,6 +359,7 @@ public class CallButtonPresenter
   public void callRecordClicked(boolean checked) {
     CallRecorder recorder = CallRecorder.getInstance();
     if (checked) {
+        /*
       final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
       boolean warningPresented = prefs.getBoolean(KEY_RECORDING_WARNING_PRESENTED, false);
       if (!warningPresented) {
@@ -354,6 +377,10 @@ public class CallButtonPresenter
       } else {
         startCallRecordingOrAskForPermission();
       }
+      */
+      if(!recorder.isRecording()) {
+        startCallRecordingOrAskForPermission();
+      }
     } else {
       if (recorder.isRecording()) {
         recorder.finishRecording();
@@ -566,8 +593,7 @@ public class CallButtonPresenter
             && call.getState() != DialerCallState.CONNECTING;
 
     final CallRecorder recorder = CallRecorder.getInstance();
-    final boolean showCallRecordOption = recorder.canRecordInCurrentCountry()
-        && !isVideo && call.getState() == DialerCallState.ACTIVE;
+    final boolean showCallRecordOption = !isVideo && call.getState() == DialerCallState.ACTIVE;
 
     otherAccount = TelecomUtil.getOtherAccount(getContext(), call.getAccountHandle());
     boolean showSwapSim =
--
2.27.0
So just to make sure, you can flash this directly pixel Android 0.37?
 
Last edited by a moderator:

Oswald Boelcke

Senior Moderator / Moderator & RC-RT Committees
Staff member
@96carboard Thread closed as non-compliant with GPLv2 and download link removed. The references were already provided to you by private message. Please advise the moderators team to re-open the thread when ready to provide a link to your kernel source.

Respectfully
Oswald Boelcke
Senior Moderator

CC: @TNSMANI
 
  • Like
Reactions: yyz71 and TNSMANI
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Here is a build of AOSP12r14
    This is SD1A.210817.037

    {Mod edit: Link removed}

    Run flash-base.sh from the corresponding factory image to update bootloader and radio if you like.
    Use "fastboot update" to install.

    Very minor changes from pure AOSP;
    1) selinux is permissive because I haven't got around to fixing a glitch.
    2) Dialer/Messaging/Contacts have selective picks from lineageos for dark mode.
    3) Dialer includes automatic call recording per the following;

    Code:
    From 945c17eabfdf9f108b26eda3d54266c0a2255234 Mon Sep 17 00:00:00 2001
    Date: Mon, 8 Nov 2021 14:17:51 -0500
    Subject: [PATCH] Automatic call recording
    
    Change-Id: Icdb26fa6729e6a13dc6190a42dc75453900a6345
    ---
     .../dialer/app/res/values/cm_strings.xml      |  2 ++
     .../dialer/app/res/xml/sound_settings.xml     |  5 ++++
     .../dialer/callrecord/res/values/config.xml   |  4 +--
     .../android/incallui/CallButtonPresenter.java | 30 +++++++++++++++++--
     4 files changed, 37 insertions(+), 4 deletions(-)
    
    diff --git a/java/com/android/dialer/app/res/values/cm_strings.xml b/java/com/android/dialer/app/res/values/cm_strings.xml
    index 1dcdb2b81..3f7602d44 100644
    --- a/java/com/android/dialer/app/res/values/cm_strings.xml
    +++ b/java/com/android/dialer/app/res/values/cm_strings.xml
    @@ -38,6 +38,8 @@
         <string name="call_recording_format">Audio format</string>
         <string name="wb_amr_format" translatable="false">AMR-WB</string>
         <string name="aac_format" translatable="false">AAC</string>
    +    <string name="auto_call_recording_title">Auto call recording</string>
    +    <string name="auto_call_recording_key" translatable="false">auto_call_recording</string>
     
         <string name="call_via">Call via</string>
         <string name="call_via_dialog_title">Call via\u2026</string>
    diff --git a/java/com/android/dialer/app/res/xml/sound_settings.xml b/java/com/android/dialer/app/res/xml/sound_settings.xml
    index aa025874f..d31ea9e5c 100644
    --- a/java/com/android/dialer/app/res/xml/sound_settings.xml
    +++ b/java/com/android/dialer/app/res/xml/sound_settings.xml
    @@ -83,6 +83,11 @@
           android:entryValues="@array/call_recording_encoder_values"
           android:defaultValue="0" />
     
    +    <SwitchPreference
    +      android:defaultValue="false"
    +      android:key="@string/auto_call_recording_key"
    +      android:title="@string/auto_call_recording_title"/>
    +
       </PreferenceCategory>
     
     </PreferenceScreen>
    diff --git a/java/com/android/dialer/callrecord/res/values/config.xml b/java/com/android/dialer/callrecord/res/values/config.xml
    index 7aabd6cac..2832c87bc 100644
    --- a/java/com/android/dialer/callrecord/res/values/config.xml
    +++ b/java/com/android/dialer/callrecord/res/values/config.xml
    @@ -16,8 +16,8 @@
     -->
     
     <resources>
    -    <bool name="call_recording_enabled">false</bool>
    +    <bool name="call_recording_enabled">true</bool>
         <!-- 1 (MIC) for microphone audio source (default)
              4 (VOICE_CALL) if supported by device for voice call uplink + downlink audio source -->
    -    <integer name="call_recording_audio_source">1</integer>
    +    <integer name="call_recording_audio_source">4</integer>
     </resources>
    diff --git a/java/com/android/incallui/CallButtonPresenter.java b/java/com/android/incallui/CallButtonPresenter.java
    index 0fa833edd..175fe7cc2 100644
    --- a/java/com/android/incallui/CallButtonPresenter.java
    +++ b/java/com/android/incallui/CallButtonPresenter.java
    @@ -21,6 +21,7 @@ import android.content.Context;
     import android.content.SharedPreferences;
     import android.content.pm.PackageManager;
     import android.os.Bundle;
    +import android.os.Handler;
     import android.os.Trace;
     import android.preference.PreferenceManager;
     import android.support.v4.app.Fragment;
    @@ -74,6 +75,7 @@ public class CallButtonPresenter
       private DialerCall call;
       private boolean isInCallButtonUiReady;
       private PhoneAccountHandle otherAccount;
    +  private boolean isRecording = false;
     
       private CallRecorder.RecordingProgressListener recordingProgressListener =
           new CallRecorder.RecordingProgressListener() {
    @@ -114,6 +116,11 @@ public class CallButtonPresenter
     
         CallRecorder recorder = CallRecorder.getInstance();
         recorder.addRecordingProgressListener(recordingProgressListener);
    +    if(recorder.isRecording()){
    +      inCallButtonUi.setCallRecordingState(true);
    +    } else {
    +      inCallButtonUi.setCallRecordingState(false);
    +    }
     
         // Update the buttons state immediately for the current call
         onStateChange(InCallState.NO_CALLS, inCallPresenter.getInCallState(), CallList.getInstance());
    @@ -144,6 +151,8 @@ public class CallButtonPresenter
       @Override
       public void onStateChange(InCallState oldState, InCallState newState, CallList callList) {
         Trace.beginSection("CallButtonPresenter.onStateChange");
    +    CallRecorder recorder = CallRecorder.getInstance();
    +    boolean isEnabled = PreferenceManager.getDefaultSharedPreferences(context).getBoolean(context.getString(R.string.auto_call_recording_key), false);
         if (call != null) {
           call.removeListener(this);
         }
    @@ -152,6 +161,16 @@ public class CallButtonPresenter
         } else if (newState == InCallState.INCALL) {
           call = callList.getActiveOrBackgroundCall();
     
    +    if (!isRecording && isEnabled && call != null) {
    +                isRecording = true;
    +                new Handler().postDelayed(new Runnable() {
    +                    @Override
    +                    public void run() {
    +                        callRecordClicked(true);
    +                    }
    +                }, 500);
    +    }
    +
           // When connected to voice mail, automatically shows the dialpad.
           // (On previous releases we showed it when in-call shows up, before waiting for
           // OUTGOING.  We may want to do that once we start showing "Voice mail" label on
    @@ -167,6 +186,9 @@ public class CallButtonPresenter
           }
           call = callList.getIncomingCall();
         } else {
    +      if (isEnabled && recorder.isRecording()) {
    +         recorder.finishRecording();
    +      }
           call = null;
         }
     
    @@ -337,6 +359,7 @@ public class CallButtonPresenter
       public void callRecordClicked(boolean checked) {
         CallRecorder recorder = CallRecorder.getInstance();
         if (checked) {
    +        /*
           final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
           boolean warningPresented = prefs.getBoolean(KEY_RECORDING_WARNING_PRESENTED, false);
           if (!warningPresented) {
    @@ -354,6 +377,10 @@ public class CallButtonPresenter
           } else {
             startCallRecordingOrAskForPermission();
           }
    +      */
    +      if(!recorder.isRecording()) {
    +        startCallRecordingOrAskForPermission();
    +      }
         } else {
           if (recorder.isRecording()) {
             recorder.finishRecording();
    @@ -566,8 +593,7 @@ public class CallButtonPresenter
                 && call.getState() != DialerCallState.CONNECTING;
     
         final CallRecorder recorder = CallRecorder.getInstance();
    -    final boolean showCallRecordOption = recorder.canRecordInCurrentCountry()
    -        && !isVideo && call.getState() == DialerCallState.ACTIVE;
    +    final boolean showCallRecordOption = !isVideo && call.getState() == DialerCallState.ACTIVE;
     
         otherAccount = TelecomUtil.getOtherAccount(getContext(), call.getAccountHandle());
         boolean showSwapSim =
    --
    2.27.0
    5
    So, it built and it installed and it sort-of works.

    When I put in the sim card, it did a bunch of strange reboot and wipes, but eventually booted. Checked the logs and it was going crazy with a couple of selinux denials;

    [ 38.787756] type=1400 audit(1635512778.460:87): avc: denied { read } for comm="pool-3-thread-1" name="u:eek:bject_r:vendor_rild_prop:s0" dev="tmpfs" ino=326 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:eek:bject_r:vendor_rild_prop:s0 tclass=file permissive=0 app=com.shannon.imsservice
    [ 38.788763] type=1107 audit(1635512778.464:88): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=persist.vendor.radio.call_waiting_for_sync_0 pid=4573 uid=10086 gid=10086 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:eek:bject_r:vendor_rild_prop:s0 tclass=property_service permissive=0'

    Setting it to permissive briefly (i.e. # setenforce 0) lets it do what it has to do.

    Not too bad for a first try!

    Download: <removed, out of date. See first post.>

    UPDATE!!!
    Here's a vendor_boot.img (fastboot flash vendor_boot vendor_boot.img) that sets selinux to permissive:
    <removed, out of date. See first post.>

    That pretty much makes it all work. Obviously making it enforce is better, but this at least is usable now.
    5
    I am not sure if it is AOSP (think it is, but can never be so sure), but it doesn't have gapps so it's doable for me

    edit: i am getting micro g working hopefully

    Yes microg is a great transitional tool. I used it for a little while, but not any more. I'm completely free of google. Nextcloud is a great replacement. I've also noticed that most software that claims to require google services actually works just fine without it. Including google maps 😂
    3
    I think i might try doing aosp (i dont know where to start, but ill try fastboot flash), but have you tried the GrapheneOS camera app? (https://github.com/GrapheneOS/Camera) I have tried the one from here ( ) and it works, but i am not sure about on AOSP.