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

Status
Not open for further replies.
Search This thread

96carboard

Senior Member
Jul 17, 2018
1,033
640
Last edited:

96carboard

Senior Member
Jul 17, 2018
1,033
640
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 😂
 

96carboard

Senior Member
Jul 17, 2018
1,033
640
What do you mean? You just extract the archive into the aosp root. When you build, it pulls it along. Its mostly a prepackaged vendor image.
 

SolidHal

Member
Oct 4, 2016
23
48
shadow moses island
github.com
@96carboard have you noticed any issues with using the fingerprint sensor on your AOSP builds? I tried flashing your build, but for some reason my version of fastboot (the most recent version) gets stuck after rebooting the device into fastboot. Odd considering this doesn't happen with my builds, but anyway...

I am seeing:
Code:
11-12 05:21:06.908  2791  2791 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'void com.android.systemui.biometrics.UdfpsHbmProvider.enableHbm(int, android.view.Surface, java.lang.Runnable)' on a null object reference

Which crashes the SystemUI during fingerprint enrollment.
 

SolidHal

Member
Oct 4, 2016
23
48
shadow moses island
github.com
@96carboard I think I have an idea as to why your build fails to flash. Flashing your build reboots the pixel to fastboot, while flashing mine reboots the pixel to fastbootd.

I think you need to provide all of the .txt and .json files along with the .img files to get a flashable file set.
 

96carboard

Senior Member
Jul 17, 2018
1,033
640
@96carboard have you noticed any issues with using the fingerprint sensor on your AOSP builds? I tried flashing your build, but for some reason my version of fastboot (the most recent version) gets stuck after rebooting the device into fastboot. Odd considering this doesn't happen with my builds, but anyway...

I am seeing:
Code:
11-12 05:21:06.908  2791  2791 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'void com.android.systemui.biometrics.UdfpsHbmProvider.enableHbm(int, android.view.Surface, java.lang.Runnable)' on a null object reference

Which crashes the SystemUI during fingerprint enrollment.

I've never tried fingerprint sensors. From a security standpoint, they're useless. Not protected by anti-self incrimination laws.
 

Prunkton

New member
Nov 18, 2021
2
0
This thread needs definitely more attention, its so nice to see aosp on my p6p :)

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.
In my next step I installed magisk just to find out I have no root access nor the right boot.img to manipulate it with magisk. I dont think the adb root access I got with 'userdebug' will help here.

My fist thought was, maybe there is a way to copy an image of my boot partition from my phone to the pc.
I found some older articles using 'dd' to do that but I'm not sure if this is still possible or even the way to go since it is just extracting a binary.

My second thought was, maybe there is a way to download the images from flash.android.com but I could not find anything (yet)

Next try was to just take the vendor_boot from @96carboard since selinux permissive should do the trick(?) but it also did not work out.

My next steps would be to just use the provided r7 build, extract its boot.img and make root work with magisk but I'm afraid this is what @AlexDalas already tried...

Did anyone make some progress regarding aosp + root access? Thanks!
 

allenjthomsen

Senior Member
Nov 17, 2010
2,630
3,347
37
Tacoma, WA
Google Pixel 7 Pro
Nothing Phone 2
This thread needs definitely more attention, its so nice to see aosp on my p6p :)

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.
In my next step I installed magisk just to find out I have no root access nor the right boot.img to manipulate it with magisk. I dont think the adb root access I got with 'userdebug' will help here.

My fist thought was, maybe there is a way to copy an image of my boot partition from my phone to the pc.
I found some older articles using 'dd' to do that but I'm not sure if this is still possible or even the way to go since it is just extracting a binary.

My second thought was, maybe there is a way to download the images from flash.android.com but I could not find anything (yet)

Next try was to just take the vendor_boot from @96carboard since selinux permissive should do the trick(?) but it also did not work out.

My next steps would be to just use the provided r7 build, extract its boot.img and make root work with magisk but I'm afraid this is what @AlexDalas already tried...

Did anyone make some progress regarding aosp + root access? Thanks!
i have booting builds of aosp for both pixel6/pro and i can say all you need is a magisk-patched.img and to disable verity and verification to get root working on any aosp build that is provided it is no different in the steps to get root access via magisk. as for why i havent released my builds its because im currently working through errors with getting gapps to build with it.
 
  • Like
Reactions: Prunkton and yyz71

Prunkton

New member
Nov 18, 2021
2
0
i have booting builds of aosp for both pixel6/pro and i can say all you need is a magisk-patched.img and to disable verity and verification to get root working on any aosp build that is provided it is no different in the steps to get root access via magisk. as for why i havent released my builds its because im currently working through errors with getting gapps to build with it.
thanks a lot it is working!

@96carboard I'm afraid you just get adb root access with aosp. with the modified boot.img I was able to start AdAway with root, I was not able to do that with plain aosp
 
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.