yashsingh1/xdaforums huggingface dataset:
[Nexus 6P Android Development] mrjaydee82:
I'll update it at least once a week and post in here when there is system ui changes
[Nexus 6P Android Development] aalupatti:
Perfect.. I have learned how to build rom recently but will have to learn how to make these edits.. I tried once in the past but failed..

Sent from my Nexus 6P
[Nexus 6P Android Development] oldman_58:
use the mv command that will move the directory to the new location. You will need to check syntax in you operating environment but it should be something like:

mv /MyDirectory /New/location/Mydirectory
[Nexus 6P Android Development] Bucika:
That is awesome!

Where can I find the Xperia battery?

Are there any other ones available ? Like HTC?? And Samsung with the Battery % Just like on S6, S7, Note 7, etc..?

Many thanks for this mod.
[Nexus 6P Android Development] chrisexv6:
Anyone build from source yesterday? ROM works but is it just me or is there no LED notifications?
[Nexus 6P Android Development] SkyThes:
Thank you very much for the tutorial/learning opportunity The Flash!

After lurking for years on XDA I finally went on and compiled my very first build ever! :victory:
[Nexus 6P Android Development] AlienSr1:
Yes, LED is not working yet it seems.

Edit: Nevermind, notification light for snapchat is working. However charging led is not working for me.
[Nexus 6P Android Development] mrjaydee82:
Led notifications are working fine for me. You have to enable it in notification settings
[Nexus 6P Android Development] AlienSr1:
Is the charging LED working too?
[Nexus 6P Android Development] mrjaydee82:
Charging led hasn't been added yet
[Nexus 6P Android Development] chrisexv6:
Doh!

I was looking for a setting like that but didnt click the gear icon in the Notification settings screen. Stupid me was trying to use the 3 button "settings" menu.

We now return to our regularly scheduled programming.
[Nexus 6P Android Development] AlienSr1:
Is there noticable lag from pressing the power button/fingerprintreader until the screen turns on (maybe half a second/second) for anyone else?
[Nexus 6P Android Development] aalupatti:
It was not there until very recently. However the most recent builds seems to show a little.

Sent from my Nexus 6P
[Nexus 6P Android Development] mangusZen:
Ahahah Ive done it

It took ages on my tired VM bit it worked, thanks to everyone involved in this guide.
[Nexus 6P Android Development] kipue:
I use "Light manager" (free version) from the Play Store to get the charging light/control colors for others.

Works well ^^

Still have to activate it from the settings first, afaik.
[Nexus 6P Android Development] DowntownRDB:
[MENTION=3938273]mangusZen[/MENTION] Awesome!! :good: Glad you made it work. :)
[Nexus 6P Android Development] slothdabski:
I have a OnePlus 3 coming this week, is it possible to build purenexus for that device for my PERSONAL use only? If so, what would the additional steps be? I would imagine that, if possible, extra steps would involve things like vendor/device tree and blobs. Could I fork these things from other OnePlus aosp ROMs GitHub? I think I understand the general idea of how this process would work, I'm just not sure on the exact process/details/commands
[Nexus 6P Android Development] nathanchance:
It is certainly not a trivial process. You would have to add a bunch of CAF additions to the current repos, grab the device tree, vendor, and kernel source, as well as any additional repos needed for stuff like the camera, touchscreen, and other things.
[Nexus 6P Android Development] slothdabski:
Ah OK. I understand needing changes for device, vendor, kernel, and proprietary camera, etc. But just for my personal understanding of the building process, why are CAF additions needed?
[Nexus 6P Android Development] nathanchance:
Because pure AOSP doesn't have the hooks needed for those additions. The OS needs some additional patches in things like frameworks_native, system_core, etc. for those additional repos to work.
[Nexus 6P Android Development] slothdabski:
Ah makes sense, thanks for the quick response!!
[Nexus 6P Android Development] AlienSr1:
Question for all of you, who have been building their own versions for some time: How often do you rebuild and how often do you do clean flashes?

Also, does factory resetting after flashing the rom but before booting the first time disable encryption?

Edit: Official Version Hype :D
[Nexus 6P Android Development] clnzx2:
First off thank you so much for the guide and everyone's help throughout this post. I am building for the first time and have a question

I am assuming I use the following for Shamu

repo sync --force-sync
. build/envsetup.sh
breakfast shamu

Thanks again!
[Nexus 6P Android Development] nathanchance:
I build every couple of days or whenever there are changes. I'll clean flash whenever I feel it is necessary (every one to two months).

No, you need to format data with fastboot or TWRP (different than wiping).
[Nexus 6P Android Development] AlienSr1:
So since the official version just came out and i'm going to flash that:

1. Flashing the stock image from google

2. Flashing TWRP

3. Flashing PN + Gapps (without formating data after)

4. Flashing SuperSU (do i boot once before flashing it? on my own build it was kinda wonky and i had to reflash after booting once)

Should result in having an encrypted, rooted phone?

Are you able to pass safetynet with root?

And is magisk ready for 7.0 yet? The magisk thread isn't saying much about compatibility unfortunately, just 5.0+)

Thank you for the help!
[Nexus 6P Android Development] nathanchance:
I'm going to reply once here, any other questions, take them to the main thread and mention me because this thread is purely about building.

Yes, that will result in an encrypted, rooted phone.

I don't know about SafetyNet or Magisk, I've given up on fighting Google on that front. My wallet still works perfectly fine :silly:
[Nexus 6P Android Development] mangusZen:
for reference, I used this great tool to speed up the environment creation

https://nathanpfry.com/builduntu-virtual-machine-android-rom-compiling/

I just removed openjdk7 and installed openjdk8 and all was ready to go , good stuff
[Nexus 6P Android Development] Choochter:
I've been using the beta version, no problems, comes with openjdk8 as standard
[Nexus 6P Android Development] koivth:
Firstly I'd like to thank [MENTION=6842057]The Flash[/MENTION] for the excellent tutorial - I have successfully built my first rom from source and learned a ton along the way! Pretty cool :cool:

I'd like to make some small changes to my personal version of the rom, such as the addition of su, before compiling. I realize this is more easily obtained by flashing my favorite supersu zip separately, but this would be more so in the interest and spirit of learning than convenience.

1. Is this a realistic wish list item for a newbie to learn quickly, or would this take substantial research, time, and effort?

2. Where are some good places to start as far as reading material goes? I have a beginner-intermediate skill level in linux, but am completely new to working with git and android source.

Need some help finding where to start reading up. 'man git' was a little overwhelming and I'd like a more targeted reading if possible.
[Nexus 6P Android Development] kicker22004:
substratum issues

Hi guys i'm so glad to see this is back up and running once again. I've gotten a clean build but am attempting my hand at installing Substratum once again without much success. This is my error.

Building with Jack: /home/server/PureNexus/scripts/PureNexus/out/target/common/obj/JAVA_LIBRARIES/services.core_intermediates/classes.jack

ERROR: /home/server/PureNexus/scripts/PureNexus/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java:203: Syntax error, insert ";" to complete LocalVariableDeclarationStatement

make: *** [/home/server/PureNexus/scripts/PureNexus/out/target/common/obj/JAVA_LIBRARIES/services.core_intermediates/classes.jack] Error 41

make: *** Waiting for unfinished jobs....

DroidDoc took 144 sec. to write docs to /home/server/PureNexus/scripts/PureNexus/out/target/common/docs/api-stubs

#### make failed to build some targets (01:05:42 (hh:mm:ss)) ####

I'm still new to working with git and builds but ran git status after each cherry-pick and added the files in question after looking over them and removing the head message in them (I might be messing up).

Anyone have ideas? I know earlier in the thread a user had the same issue but was told it's Java so Beans is doing things.. They failed to mention that they were probably trying substratum not clean build.. Does that matter? Thanks you guys.
[Nexus 6P Android Development] clnzx2:
Thanks for the easy to follow guide. Got a memory error on my first attempt, fixed it and all is well. :svetius:
[Nexus 6P Android Development] Asitaka:
This is slightly off-topic, but not by much (I hope)

I want to recreate the xposed module 'Burnt toast' (or maybe buttered?) I forget which one, but basically it modifies all the toasts by putting the app's icon to the left of the toast message.

If I were to do that, would it basically just be finding the toast rendering service, and editing the code to that and make a pull request or something (I'm wondering if it could be made into a cherry-pickable commit)? or would it be much more complicated?
[Nexus 6P Android Development] nathanchance:
I would checkout how Beans did it in Marshmallow:

https://github.com/PureNexusProject...mmit/523f0ee30a843dd615cbd38fe2dadcfd092330a4

https://github.com/PureNexusProject...mmit/0f9031c36edc8d0b0507936b60c8f3fd8bdf3b25

As for git, I would recommend this website. I learned EVERYTHING I know about git from that website and I am still learning lol.

Try repo sync --force-sync and repicking your commits; you should not have any merge conflicts.
[Nexus 6P Android Development] kicker22004:
OK will do. Would it be OK if I linked my script I made here? To help myself grab and install everything.. Maybe I'm messing something up.. All the script is is my process step by step. That way I can repeat builds later easier(I forget things fast lol).
[Nexus 6P Android Development] nathanchance:
Sure thing.
[Nexus 6P Android Development] kicker22004:
I'll try to get it posted as soon as I can.. My main machine is running blender rendering right now and is useless, and the server is doing a fresh build (cleared cache and everything) so also useless... Thank god for phones :P

This is the msg I keep getting, should i just add them or go in and remove the head again?.

Changes to be committed:

new file: core/java/com/android/internal/util/ThemeUtils.java

Unmerged paths:

(use "git add <file>..." to mark resolution)

both modified: services/core/java/com/android/server/policy/GlobalActions.java

both modified: services/core/java/com/android/server/power/ShutdownThread.java
[Nexus 6P Android Development] 1112ee:
I'm having a problem with commit 263ff9d36c59777123d7b3f5ba8ef86ded72a383 as well, the one with the power menu stuff
[Nexus 6P Android Development] kicker22004:
Wow just opened this in the app... Turns out hide doesn't work. Sorry mobile users for my huge post, I swear I put it in hide..
[Nexus 6P Android Development] slothdabski:
Its hidden for me in Tapatalk, I have to click spoiler to see your script so no worries!
[Nexus 6P Android Development] kicker22004:
Oh OK, odd labs doesn't hide it.

Well i'm stuck on Shutdown error still, tried everything I could think of. Here is my error.

Building with Jack: /home/server/PureNexus/scripts/PureNexus/out/target/common/obj/JAVA_LIBRARIES/android-support-v4-honeycomb_intermediates/classes.jack

ERROR: /home/server/PureNexus/scripts/PureNexus/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java:202: Syntax error, insert ";" to complete LocalVariableDeclarationStatement

make: *** [/home/server/PureNexus/scripts/PureNexus/out/target/common/obj/JAVA_LIBRARIES/services.core_intermediates/classes.jack] Error 41

make: *** Waiting for unfinished jobs....

Any ideas guys?
[Nexus 6P Android Development] sToRm1nG:
Can you post the lines around 202 of ShutdownThread.java?
[Nexus 6P Android Development] kicker22004:
Shutdown

Sure thing, This is fresh off of the cherry pick as one of the issues listed under (git status)

This is prior to removing the HEAD:

Log.d(TAG, "Notifying thread to start shutdown longPressBehavior=" + longPressBehavior);

if (confirm) {

final CloseDialogReceiver closer = new CloseDialogReceiver(context);

<<<<<<< HEAD

final boolean advancedReboot = isAdvancedRebootPossible(context);

=======

final Context mUiContext = getUiContext(context);

>>>>>>> 263ff9d... OMS-N: Themes should be dynamically theming the power menu

if (sConfirmDialog != null) {

sConfirmDialog.dismiss(); ##This is the line before editing### (202 prior to changes)####

sConfirmDialog = null;

}

<<<<<<< HEAD

AlertDialog.Builder confirmDialogBuilder = new AlertDialog.Builder(context)

=======

sConfirmDialog = new AlertDialog.Builder(mUiContext)

>>>>>>> 263ff9d... OMS-N: Themes should be dynamically theming the power menu

.setTitle(mRebootSafeMode

? com.android.internal.R.string.reboot_safemode_title

: showRebootOption

? com.android.internal.R.string.global_action_reboot

: com.android.internal.R.string.power_off);

if (!advancedReboot) {

confirmDialogBuilder.setMessage(resourceId);

} else {

confirmDialogBuilder

.setSingleChoiceItems(com.android.internal.R.array.shutdown_reboot_options,

0, null);

}

And because the lines will change this is after:

Log.d(TAG, "Notifying thread to start shutdown longPressBehavior=" + longPressBehavior);

if (confirm) {

final CloseDialogReceiver closer = new CloseDialogReceiver(context);

final boolean advancedReboot = isAdvancedRebootPossible(context);

final Context mUiContext = getUiContext(context);

if (sConfirmDialog != null) {

sConfirmDialog.dismiss();

sConfirmDialog = null;

}

####And after this is line 202####

AlertDialog.Builder confirmDialogBuilder = new AlertDialog.Builder(context)

sConfirmDialog = new AlertDialog.Builder(mUiContext)

.setTitle(mRebootSafeMode

? com.android.internal.R.string.reboot_safemode_title

: showRebootOption

? com.android.internal.R.string.global_action_reboot

: com.android.internal.R.string.power_off);

if (!advancedReboot) {

confirmDialogBuilder.setMessage(resourceId);

} else {

confirmDialogBuilder

.setSingleChoiceItems(com.android.internal.R.array.shutdown_reboot_options,

0, null);

}

So i'm not sure if i'm messing this up or not.. still learning :P
[Nexus 6P Android Development] sToRm1nG:
You are missing a semicolon.

This:

if (sConfirmDialog != null) {
sConfirmDialog.dismiss();
sConfirmDialog = null;
}
####And after this is line 202####
AlertDialog.Builder confirmDialogBuilder = new AlertDialog.Builder(context)
sConfirmDialog = new AlertDialog.Builder(mUiContext)

Should be:

if (sConfirmDialog != null) {
sConfirmDialog.dismiss();
sConfirmDialog = null;
}
####And after this is line 202####
AlertDialog.Builder confirmDialogBuilder = new AlertDialog.Builder(context);
sConfirmDialog = new AlertDialog.Builder(mUiContext)

To be more specific:

AlertDialog.Builder confirmDialogBuilder = new AlertDialog.Builder(context)

Should be:

AlertDialog.Builder confirmDialogBuilder = new AlertDialog.Builder(context);
[Nexus 6P Android Development] kicker22004:
lol I looked over that but because the way it was bunched I missed it!!!!. Ok time to build again. wish me luck.
[Nexus 6P Android Development] aalupatti:
Gud luk....Please let us know how it went.

WOuld love to use this mod.
[Nexus 6P Android Development] kicker22004:
New day with a new error lol. Here is what i'm getting now.

Building with Jack: /home/server/PureNexus/scripts/PureNexus/out/target/common/obj/APPS/Stk_intermediates/with-local/classes.dex

ERROR: /home/server/PureNexus/scripts/PureNexus/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java:203: Type mismatch: cannot convert from AlertDialog.Builder to AlertDialog

make: *** [/home/server/PureNexus/scripts/PureNexus/out/target/common/obj/JAVA_LIBRARIES/services.core_intermediates/classes.jack] Error 41

make: *** Waiting for unfinished jobs....

#### make failed to build some targets (01:02:25 (hh:mm:ss)) ####

And so you have it i'll link the lines there.

if (confirm) {

final CloseDialogReceiver closer = new CloseDialogReceiver(context);

final boolean advancedReboot = isAdvancedRebootPossible(context);

final Context mUiContext = getUiContext(context);

if (sConfirmDialog != null) {

sConfirmDialog.dismiss();

sConfirmDialog = null;

}

AlertDialog.Builder confirmDialogBuilder = new AlertDialog.Builder(context);

sConfirmDialog = new AlertDialog.Builder(mUiContext) <<<<<This is line 203>>>>>>

.setTitle(mRebootSafeMode

? com.android.internal.R.string.reboot_safemode_title

: showRebootOption

? com.android.internal.R.string.global_action_reboot

: com.android.internal.R.string.power_off);

if (!advancedReboot) {
[Nexus 6P Android Development] oldman_58:
I think you need a ";" or it added ";" was in the wrong place.

}

AlertDialog.Builder confirmDialogBuilder = new AlertDialog.Builder(context);

sConfirmDialog = new AlertDialog.Builder(mUiContext); <<<<<Here!!!>>>>>>

or

}

AlertDialog.Builder confirmDialogBuilder = new AlertDialog.Builder(context)<<<<<Not Here>>>>>>

sConfirmDialog = new AlertDialog.Builder(mUiContext) ;<<<<<here>>>>>>
[Nexus 6P Android Development] sToRm1nG:
No, he is accessing the property title after the cast with setter setTitle(). The thing is that the cast is unsupported (from AlertDialog.Builder to AlertDialog).

The question is what's the definition of sConfirmDialog. I assume it is AlertDialog and therefore the error.
[Nexus 6P Android Development] oldman_58:
Thank you for clarifying.
[Nexus 6P Android Development] sToRm1nG:
No problem. :)

I added some additional comments to my previous post to clarify what is happening and what is possibly wrong.

if (sConfirmDialog != null) {
sConfirmDialog.dismiss();
sConfirmDialog = null;
}
[...]
sConfirmDialog = new AlertDialog.Builder(mUiContext).setTitle(mRebootSafeMode ? com.android.internal.R.string.reboot_safemode_title : showRebootOption ? com.android.internal.R.string.global_action_reboot : com.android.internal.R.string.power_off);

This code is checking if sConfirmDialog is already set and if so, it will call a dismiss() on it and set it to null. The definition of sConfirmDialog is further up in the code and I am almost 100% sure that it is defined as AlertDialog.

In this case we would either need to change specification, which will need more code changes or we have to explicitly cast it to AlertDialog.

[MENTION=907126]kicker22004[/MENTION]

I guess you missed a cherry pick. :)
[Nexus 6P Android Development] kicker22004:
Thanks guys, I just went and looked over the github and it seems the dev was making changes 19 hours ago. So maybe it's broken for now.
[Nexus 6P Android Development] DowntownRDB:
[MENTION=907126]kicker22004[/MENTION] Just looked at GitHub and Beans committed 5 minutes ago to android_frameworks_base and 5 other projects within the last 13 hours. Also Team Substratum have been busy as you stated. Doing personal builds can get tricky because we never know when those gents are making changes to their GitHubs. LOL.
[Nexus 6P Android Development] waleed.wa03:
Can anyone help me with this error? I have ninja disabled.
[Nexus 6P Android Development] Gizmoe:
May be a dependency issue. Did you do the automatic installation of the tools?

Automatic way (recommended!): -- Grab a repo with some useful scripts, and run the needed one

$ sudo apt-get install git-core

$ git clone https://github.com/akhilnarang/scripts

$ cd scripts

$ ls

$ bash <script-name> Run the script corresponding to your Linux Distribution.

And then set cache

$ ccache -M 50G
[Nexus 6P Android Development] nathanchance:
Install unzip.

Arch: sudo pacman -S unzip

Ubuntu: sudo apt-get install unzip
[Nexus 6P Android Development] aalupatti:
Off topic alert:

Hi I have been trying to build benzo. I have been having few issues

First - i am not able to sync the repo.

Here is the error

" Fetching project platform/packages/apps/BasicSmsReceiver

Fetching project platform/external/messageformat

Fetching projects: 99% (458/462) Fetching project packages_apps_OmniSwitch

fatal: Couldn't find remote ref refs/heads/dragon-tc

error: Cannot fetch xanaxdroid/dragontc-3.9

error: Exited sync due to fetch errors "

Can anyone please help ?
[Nexus 6P Android Development] oldman_58:
I am running my first Homemade build!!!! Almost feels as good as getting my 1st drivers license many years ago...

Hats off to [MENTION=6842057]The Flash[/MENTION] for all the information in this thread and [MENTION=4395895]BeansTown106[/MENTION] and the Dev team for an excellent ROM.
[Nexus 6P Android Development] DowntownRDB:
[MENTION=2742144]oldman_58[/MENTION] Congratulations! Always a great sense of accomplishment when you can run something that you personally compiled and built. I hope you enjoy building as Beans has been extremely busy as you will notice in the GitHub. Have a great day.
[Nexus 6P Android Development] waleed.wa03:
I'm getting this error now. Ninja is disabled and I followed the instructions for run out of memory error which I got.
[Nexus 6P Android Development] clnzx2:
Did you kill jack prior to building?
[Nexus 6P Android Development] Gizmoe:
Try

$ sudo apt install jackd2
[Nexus 6P Android Development] pvtjoker42:
I just increased the memory and cpu count on my build VM, and now it's giving me this error.

[ 94% 39716/41942] Building with Jack:...I_intermediates/with-local/classes.dex

ninja: build stopped: subcommand failed.

make: *** [ninja_wrapper] Error 1

I've built a dozen times without errors, so just trying to figure out if it was the hw changes or if there's some github update going on that broke something?

Any help is appreciated.
[Nexus 6P Android Development] AzraelsKiss:
That really don't give enough information to diagnose your issue... You may need to compile with ninja turned off in order to get a proper error notification.

Have a good one!

P.S. I think the source is currently being updated, so that is likely causing the build to fail.
[Nexus 6P Android Development] pvtjoker42:
noticed lots of updates, so i wasn't sure if maybe that was tripping me up or what. Hopefully it'll build in the morning. :cool:
[Nexus 6P Android Development] laxattack:
still not building right now, looks like beans is making additions for LED color notifications since that was his latest commit, :D
[Nexus 6P Android Development] rchtk:
Building from a moving master is expected to break.. Branching at the latest release point would be a better solution...

---------- Post added at 16:56 ---------- Previous post was at 16:46 ----------

If I do a pull request to correct a bug, will it be accepted?
[Nexus 6P Android Development] emanoj.i9103:
Yes, beans and nate have been kind enough to take in valid ones.
[Nexus 6P Android Development] mrjaydee82:
Damn lol...every time I build there's another change..not complaining lol...I'll just wait a little bit longer
[Nexus 6P Android Development] kantjer:
Lol, that's what all devs do. They wait until you started a build and then they start pushing commits :)
[Nexus 6P Android Development] a g bell:
That is the only reason we have new builds?
[Nexus 6P Android Development] DroidForLife33:
Thanks for your work.
[Nexus 6P Android Development] 911jason:
Thanks for this guide, I ran Ubuntu a few years ago in a virtual machine. But I'm pretty unhappy with Win10 right now, so after seeing this thread, I've decided I'm going to go back to Win7 and at the same time set up a dual boot with Ubuntu. I'm thinking I'm going to devote about 200gb to the Ubuntu partition. Will that be sufficient?

I saw this earlier post:

...but I'm not sure if all those were cumulative or what, because all those totals in the PS add up to ~250gb.
[Nexus 6P Android Development] pkelly517:
If it's in your budget, buy 500 GB ssd.

If not, devote as much as you can now. As you learn, you may spend more and more time in Linux.