Skip to content

android: Disable debuggable on official Android builds - #13553

Merged
AIdrifter merged 2 commits into
youtube:mainfrom
AIdrifter:fix-android-manifest-debuggable
Nov 12, 2026
Merged

AIdrifter merged 2 commits into
youtube:mainfrom
AIdrifter:fix-android-manifest-debuggable

Conversation

@AIdrifter

@AIdrifter AIdrifter commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Official AOSP builds were incorrectly hardcoded to be debuggable and
profileable. This manifest was previously assumed to only be used
by development shells, but it is also shared by AOSP Evergreen
targets.
Shipping official builds as debuggable impacts runtime performance
due to Android ART overhead and causes failures in partner release
security checks. This change restores conditional logic to disable
debuggable and profileable tags for non-development build types.
Bug: 576136653
Bug: 462494527

@AIdrifter
AIdrifter requested a review from a team as a code owner October 22, 2026 03:31
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
Context State Description
CI / All Pass ✅ PASS All checks passed
CI / android ✅ PASS Passed
CI / evergreen ✅ PASS Passed
CI / linux ✅ PASS Passed
CI / tvos ✅ PASS Passed
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


android: Disable debuggable on official Android builds

Official AOSP builds were incorrectly hardcoded to be debuggable and
profileable. This manifest was previously assumed to only be used
by development shells, but it is also shared by AOSP Evergreen
targets.

Shipping official builds as debuggable impacts runtime performance
due to Android ART overhead and causes failures in partner release
security checks. This change restores conditional logic to disable
debuggable and profileable tags for non-development build types.

Bug: 576136653
Bug: 462494527

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces conditional configuration for Android builds, setting the debuggable attribute based on whether it is an official build and restricting the <profileable> tag in the manifest template to debug and devel build types. The feedback suggests using Jinja's default filter for the build_type variable to avoid potential UndefinedError exceptions if the template is evaluated by targets where build_type is not defined.

Comment thread cobalt/android/BUILD.gn Resolved
@AIdrifter
AIdrifter force-pushed the fix-android-manifest-debuggable branch from ac56b29 to 9ab4a76 Compare October 22, 2026 14:45
@kjyoun

kjyoun commented Oct 22, 2026

Copy link
Copy Markdown
Member

why do we need this change?

AFAIK, given manifest is for coat app used for development only

Comment thread cobalt/android/BUILD.gn Resolved
@kjyoun

kjyoun commented Oct 22, 2026

Copy link
Copy Markdown
Member

why do we need this change?

AFAIK, given manifest is for coat app used for development only

self-response:

3p-aosp app can use this manifest

@kjyoun

kjyoun commented Oct 22, 2026

Copy link
Copy Markdown
Member

🤖 Gemini Suggested Commit Message

android: Disable debuggable on official Android builds

Official AOSP builds were incorrectly hardcoded to be debuggable and
profileable. This manifest was previously assumed to only be used
by development shells, but it is also shared by AOSP Evergreen
targets.

Shipping official builds as debuggable impacts runtime performance
due to Android ART overhead and causes failures in partner release
security checks. This change restores conditional logic to disable
debuggable and profileable tags for non-development build types.

Bug: 576136653
Bug: 462494527

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message

can you update PR title and description?

  • title is broken
  • description looks verbose. you can gemini-suggested message
@AIdrifter
AIdrifter force-pushed the fix-android-manifest-debuggable branch from 9ab4a76 to ae578a8 Compare October 27, 2026 01:11
@AIdrifter AIdrifter changed the title android: Disable debuggable and profileable on official Android/AOSP … Oct 27, 2026
Official AOSP builds were incorrectly hardcoded to be debuggable and
profileable. This manifest was previously assumed to only be used
by development shells, but it is also shared by AOSP Evergreen
targets.

Shipping official builds as debuggable impacts runtime performance
due to Android ART overhead and causes failures in partner release
security checks. This change restores conditional logic to disable
debuggable and profileable tags for non-development build types.

Bug: 576136653
Bug: 462494527
@AIdrifter
AIdrifter force-pushed the fix-android-manifest-debuggable branch from ae578a8 to fd826f6 Compare October 28, 2026 13:47
@AIdrifter

Copy link
Copy Markdown
Contributor Author

Hi @kjyoun

Updated the comments in BUILD.gn and AndroidManifest.xml.jinja2, cleaned up the PR title/description, and rebased onto latest main (all CI checks green). PTAL and approve when you get a chance, thanks!

@kjyoun kjyoun changed the title android: Disable debuggable on official Android builds Oct 29, 2026

@kjyoun kjyoun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about this title?

android: Disable debuggable and profileable on AOSP gold builds

"official Android build" can be misleasing, since it includes 1P CoAT app, which still have debuggable on gold build.

@AIdrifter
AIdrifter enabled auto-merge (squash) November 12, 2026 09:52
@AIdrifter
AIdrifter disabled auto-merge November 12, 2026 10:25
@AIdrifter
AIdrifter enabled auto-merge (squash) November 12, 2026 10:25
@AIdrifter
AIdrifter disabled auto-merge November 12, 2026 11:28
@AIdrifter
AIdrifter enabled auto-merge (squash) November 12, 2026 11:29
@AIdrifter AIdrifter added the cp-27.lts Cherry Pick to the 27.lts branch label Nov 12, 2026
@AIdrifter

Copy link
Copy Markdown
Contributor Author

Hi @ckim1346 @haozheng-cobalt, friendly ping when you get a chance. @andrewsavage1 and @kjyoun already approved this change, and all CI checks are green, so it just needs a CODEOWNERS approval from @youtube/cobalt-androidtv on cobalt/android/BUILD.gn to auto-merge. Thanks!

@AIdrifter
AIdrifter merged commit 91051c9 into youtube:main Nov 12, 2026
1106 of 1115 checks passed
cobalt-roller-and-merger Bot pushed a commit that referenced this pull request Nov 13, 2026
…d builds

Refer to original PR: #13553

Official AOSP builds were incorrectly hardcoded to be debuggable and
profileable. This manifest was previously assumed to only be used
by development shells, but it is also shared by AOSP Evergreen
targets.
Shipping official builds as debuggable impacts runtime performance
due to Android ART overhead and causes failures in partner release
security checks. This change restores conditional logic to disable
debuggable and profileable tags for non-development build types.
Bug: 576136653
Bug: 462494527

(cherry picked from commit 91051c9)
cobalt-github-releaser-bot pushed a commit that referenced this pull request Nov 24, 2026
…d builds

Refer to original PR: #13553

Official AOSP builds were incorrectly hardcoded to be debuggable and
profileable. This manifest was previously assumed to only be used
by development shells, but it is also shared by AOSP Evergreen
targets.
Shipping official builds as debuggable impacts runtime performance
due to Android ART overhead and causes failures in partner release
security checks. This change restores conditional logic to disable
debuggable and profileable tags for non-development build types.
Bug: 576136653
Bug: 462494527

(cherry picked from commit 91051c9)
andrewsavage1 pushed a commit that referenced this pull request Nov 24, 2026
…d builds

Refer to original PR: #13553

Official AOSP builds were incorrectly hardcoded to be debuggable and
profileable. This manifest was previously assumed to only be used
by development shells, but it is also shared by AOSP Evergreen
targets.
Shipping official builds as debuggable impacts runtime performance
due to Android ART overhead and causes failures in partner release
security checks. This change restores conditional logic to disable
debuggable and profileable tags for non-development build types.
Bug: 576136653
Bug: 462494527

(cherry picked from commit 91051c9)
andrewsavage1 added a commit that referenced this pull request Nov 25, 2026
Automated cherry-pick roll to staging.

Original pull requests:
- #13847
- #13771
- #13851
- #13774
- #13862
- #13852
- #13623
- #13839
- #13854
- #13731
- #13162
- #13841
- #13546
- #13754
- #13277
- #13857
- #13604
- #13805
- #13859
- #13758
- #13902
- #13899
- #13910
- #13825
- #13881
- #13883
- #13914
- #13656
- #13929
- #13558
- #13932
- #13863
- #13845
- #13747
- #13927
- #13885
- #13912
- #13898
- #13879
- #13844
- #13855
- #13715
- #13920
- #13860
- #13924
- #13949
- #13936
- #13553
- #13867
- #13868
- #13945
- #13930

To merge these changes, run the autoroll script:

```bash
GITHUB_REPOSITORY=youtube/cobalt python3 cobalt/devinfra/github/autoroll/merge_autoroll.py \
  --source-branch main \
  --target-branch staging
```

---------

Co-authored-by: johnx <johnx@google.com>
Co-authored-by: Adam Walls <avvall@google.com>
Co-authored-by: Kyujung Youn <kjyoun@google.com>
Co-authored-by: Jesus Horta <jshorta@google.com>
Co-authored-by: Xinan Lin <65635777+linxinan-yt@users.noreply.github.com>
Co-authored-by: fayev-g <fayev@google.com>
Co-authored-by: Austin Osagie <austinosagie@google.com>
Co-authored-by: Raphael Kubo da Costa <kubo@igalia.com>
Co-authored-by: Yavor Goulishev <yavor@google.com>
Co-authored-by: Sunny Tang <tasunny@google.com>
Co-authored-by: Xiaoming Shi <xiaomings@google.com>
Co-authored-by: Orko Garai <orko@igalia.com>
Co-authored-by: Henrique Ferreiro <hferreiro@igalia.com>
Co-authored-by: Jelle Foks <jfoks@google.com>
Co-authored-by: Bo-Rong Chen <borongchen@google.com>
Co-authored-by: Abhijeet Kandalkar <abhijeet@igalia.com>
Co-authored-by: Jeremmy <34620271+a8901147@users.noreply.github.com>
Co-authored-by: Igor Sarkisov <isarkisov@google.com>
Co-authored-by: Vinish Chamrani <vinishc@google.com>
Co-authored-by: Roger Zanoni <rzanoni@igalia.com>
Co-authored-by: Sherry Zhou <sherryzy@google.com>
Co-authored-by: AIdrifter(Pinkus) <aidrifter@gmail.com>
Co-authored-by: Andrew Savage <andrewsavage@google.com>
Co-authored-by: Charley Kim <charleykim@google.com>
Co-authored-by: Ying Yu <yuying@google.com>
Co-authored-by: Hao <131711973+haozheng-cobalt@users.noreply.github.com>
cobalt-roller-and-merger Bot pushed a commit that referenced this pull request Nov 25, 2026
…d builds

Refer to original PR: #13553

Official AOSP builds were incorrectly hardcoded to be debuggable and
profileable. This manifest was previously assumed to only be used
by development shells, but it is also shared by AOSP Evergreen
targets.
Shipping official builds as debuggable impacts runtime performance
due to Android ART overhead and causes failures in partner release
security checks. This change restores conditional logic to disable
debuggable and profileable tags for non-development build types.
Bug: 576136653
Bug: 462494527

(cherry picked from commit 91051c9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cp-27.lts Cherry Pick to the 27.lts branch

4 participants