yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] daxgirl:
Dear [MENTION=3986004]civato[/MENTION]!

We have been looking for the source code for the Phronesis rom control and having forked the repo you linked we have found out that it's the original rom control source code. The source code that must be published is YOUR code. Your entire project that is. [MENTION=3026895]DaOldMan[/MENTION] is looking for the source code to make some additions for your rom and can't find your actual sources.

Please update your sources,

Anna
[Android Apps and Games] Er. Aditya:
sir i dont know why but this method isnt working on my phone , it never creates the backups folder

can u please guide me what can be the issue ??
[Android Apps and Games] tdunham:
I'm not really sure why I put the mkdir command there, the folder always gets created for us on 5.0 & also 5.1.1 for other use so it probably was not necessary.

- First make sure you can run script from terminal or root browser to see if it works.

- Possibly scripts are not compiling with rom control. Decompile with apktool and see if the scripts are really there in assets/scripts of decompiled apk.

- Last (probably simplest), it is possible sdcard mkdir command is not working for you. Try removing mkdir command and experiment using an existing folder that always get created for every version of TW android like Media (I think android requires case sensitive syntax for folders so make sure you use upper case M for media in script name if you use that folder as example).

Edit: Rom Toolbox root explorer is excellent tool for testing/running scripts. I copy the script to SD and run from there with Rom Toolbox. Exit code of 0 means it is successful. Exit code of 1 means a syntax or command error.
[Android Apps and Games] Er. Aditya:
the main problem is itsworking for my friend and not for me :(

the script creates folder and we have same device , same android version
[Android Apps and Games] tdunham:
Have you tried his rom control?

---------- Post added at 01:18 PM ---------- Previous post was at 12:46 PM ----------

Possible something going on with your internal storage too.

Try wiping internal storage and try script again.

---------- Post added at 01:25 PM ---------- Previous post was at 01:18 PM ----------

Also, you did not say if your friend is using the same rom and rom control or different rom with different rom control.
[Android Apps and Games] Er. Aditya:
1. i am using rom control sir , it works on my previous version of rom

2. wiped internal memory with custom/stock recovery alot of times

3. previous version in new version i changed busybox installer by osmosis and su to 2.65

can any of these cause this ??
[Android Apps and Games] and2:
Has your friend the same rom? May be on your rom is the internal storage writing bug not fixed?
[Android Apps and Games] Er. Aditya:
both are using same G varient note 4

currently he is using F based rom and i am on G based rom

how to confirm and sort this issue ?
[Android Apps and Games] thereassaad:
Delete ur data from internal sd exactly in Android/data/ then try it again if its still same probs then u need to wipe internal sd then 100% it should work unless u make something wrong somewhere mate ..
[Android Apps and Games] Er. Aditya:
bro i had allready wiped internel memory with stock recovery , but still this is same
[Android Apps and Games] Wuby986:
run it from terminal.. you need an output to see what's going on
[Android Apps and Games] Er. Aditya:
i ran those script codes via terminal it dsnt shows error but when i check my internel sd ...no folder is created
[Android Apps and Games] daxgirl:
What's the exit code for the script?

Try running in scripter.

Make sure your busybox is installed and working properly. Check it. Try running busybox commands separately and see what you get as exit code.

Sent from my ACTUAL SM-N920C using transporter...
[Android Apps and Games] Er. Aditya:
i am sorry dev's for spamming , i just found out latest SuperSu 2.65 was faulty

used old version and everythings fine again , somehow it was not mounting my initl sd

big thanks you everyone for helping
[Android Apps and Games] daxgirl:
No problem. Just glad you got it sorted out mate ?

Sent from my ACTUAL SM-N920C using transporter...
[Android Apps and Games] tdunham:
See, newer isn't always better. :rolleyes:

I'm several versions back on SU, but why update when it still maintains root without issue? ;)
[Android Apps and Games] Er. Aditya:
actually in search of stock rooted kernel.... latest su helps achieve that.. but as u said sir

newer isn't always better :)
[Android Apps and Games] ROBERT CM:
[MENTION=4714483]daxgirl[/MENTION] is a genius ..

I admire your work and guides about the world android, I hope to be a great developer as you have already learned several things and I want to continue learning..

Thanks for this guide .. :D
[Android Apps and Games] Kamy:
Hey. I need some hints please as I couldn't find it in the OP. I have a key that need to change the color, in this case I like to kill SystemUI in a way that informs the user (no silent way). We already have the killer method that triggers the switch preference as described in OP:

case "SwitchPreference":
SwitchPreference s = (SwitchPreference) pf.findPreference(key);
s.setChecked(sharedPreferences.getBoolean(key, true));
if (key.equals("toggle_call_recording")) {
appRebootRequired("com.android.incallui");
}
break;

I would be appreciate if somebody tell me how to do with ColorPickerPreference. Is it the same way like:

case "ColorPickerPreference":
ColorPickerPreference s = (ColorPickerPreference) pf.findPreference(key);
s.setChecked(sharedPreferences.getBoolean(key, true));[COLOR="Red"] >>> it shouldn't be boolean anymore right? I am just guessing [/COLOR]
if (key.equals("wifi_icon_color")) {
appRebootRequired("com.android.incallui");
}
break;
[Android Apps and Games] daxgirl:
Sure. Color picker preference extends dialog preference and not two state preference so it can't override method isChecked, since this method is only for two state preferences. All you need is create a key based condition and call for the method of reboot required with string of package name for system ui. You can just add an if statement in the case for color picker preference.

Sent from my ACTUAL SM-N920C using transporter...
[Android Apps and Games] Kamy:
Goodness me! I didn't see it carefully. It already exists in onSharedPreferenceChanged. Thank you for reply and of course amazing support. :good:
[Android Apps and Games] micky387:
Hi.

Thanks for all your work.

Sorry for my newbie question but i follow carfely our tut but lot of word/text are in red with lot of error

thanks ;)
[Android Apps and Games] Wuby986:
hey i guess you need to import those class.. go to the highlighted words and press alt+enter
[Android Apps and Games] micky387:
thanks man.You'rre the best.

I have resolved lot of error,adding string etc... just one

with [MENTION=439709]override[/MENTION] ,i have this " Error:(93, 2) error: method does not override or implement a method from a supertype" what i choose for this ??

regards
[Android Apps and Games] daxgirl:
Your entire setup of studio and sdk is screwed up. It's not import issue. As op states clearly you need to have working studio and updated sources to use this code. Please search specific errors online to try troubleshoot your error. It's not about being a noob or not. The pre requirements for using this project is having a working development environment. You don't.

After you have all setup, pull the project again from git. We do not troubleshoot android studio problems on this thread. Thank you for your understanding.

Sent from my ACTUAL SM-N920C using transporter...
[Android Apps and Games] micky387:
I haved a working project before adding backup/restore stuff. just with new stuff

Using your project from the beginning ;)
[Android Apps and Games] Martillero:
Just one post below wuby's guide i wrote what works for me regarding that matter, read it and it should work for u too.
[Android Apps and Games] micky387:
Thanks man. :good: Working great with your method.

just one thing now,i havd windows popup to backup but no selected item...
[Android Apps and Games] civato:
Sorry, misted your post.

The problem has been fixed a long time ago as @DaOldMan contacted me, I don't know what happened , the source is up to date to compile the Phronesis control app.
[Android Apps and Games] micky387:
My mistake.I haved forgot one item in string-array....

Working great now
[Android Apps and Games] DaOldMan:
Yes it's ok for some time. You fixed that problem after my pm. Thanks for all your work for phronesis users! We are waiting for new kernels now as there are some problems still.

Again, thanks a Lot!

Phronesis team member
[Android Apps and Games] goodman_east:
thank you very much for this threat, I can make a ROM control app for my HTC ROMs now.

Sent from my HTC A9w
[Android Apps and Games] Kamy:
Is it what it should look like:

public FilePreference(Context context, AttributeSet attrs) {
super(context, attrs);
c = context;
setWidgetLayoutResource(R.layout.file_preference_widget);
defaultNameSpace = "http://schemas.android.com/apk/res/android";
key = getStringForAttr(attrs, defaultNameSpace, "key", "file");
summaryOn = getStringForAttr(attrs, defaultNameSpace, "summaryOn", "");
summaryOff = getStringForAttr(attrs, defaultNameSpace, "summaryOff", "");
//We will store our files inside package default files dir in /data/data/packagename/files
[COLOR="Red"] summaryOff = getStringForAttr(attrs, defaultNameSpace, "summaryOff", "");
//We will store our files inside package default files dir in /data/data/packagename/files/FilePrefs
filedir = new File(c.getFilesDir() +"/FilePrefs");
if (!filedir.exists()) {
filedir.mkdir();
}
file = new File(filedir + File.separator + key);[/COLOR]
file = new File(c.getFilesDir() + File.separator + key);
isOn = file.exists() ? true : false;
FilePreference.this.setOnPreferenceClickListener(this);
}

If so, there is an error on filedir symbol that I don't know how to solve it. Is it going to be a local variable?
[Android Apps and Games] asc1977:
Hi guys

need your help please. i read now in thread a little but i dont find the first step to begin with my rom control

i installed Android Studio and SDK and all i need, download all i need and build app.

Pushed App to phone and work. Nice!!

now i want to center clock or roght clock or left clock but if i choose nothing happens. i dont find anywhere what i have to to that the rom control app can control my clock in statusbar.

i put a networkspeed in statusbar and settings for that in rom control app and that works well. i can change colors and hide or not. but that was finished smalis from a friend.

Now:

please guide me a little and tell a beginner what he must to do that i can edit allignment of clock. did i must edit smalis of systemUI.apk or or or. i need only that one sample that i can start with building my rom control
[Android Apps and Games] xenreon:
Yes you have to edit your systemui smalis according to your needs for any mod to work, the built-in options are just samples that are there to show you how they work and how to make more for yourself

For the clock customisation part, you need to edit com/android/systemui/statusbar/policy/Clock.smali (don't know how exactly you can change alignment, but you can study smalis from a systemui that has those features to learn) or you can try potato clock mods and edit that to add more options :)
[Android Apps and Games] asc1977:
please anyone have an idea

i want to start 3MinitBattery free app from rom control with followed code

But failed because INTEND NOT VALID

i tried some different ways but dont work

Any ideas?

Potato clock i start with

and all works. only difference is that 3 MInitBattery is a system app
[Android Apps and Games] Wuby986:
most likely the package has another activity or a non standard activity name.. please check it from its manifest i don't have a way to check it by now, but could be.. also just to make sure a logcat would help - logcat from android studio-
[Android Apps and Games] daxgirl:
Well, as previously mentioned, not once, we would love to see it in YOUR rom ;) happy to see you here!!!!

Sent from my awesome g920f powered by 6thGear
[Android Apps and Games] bawffg85:
You are the most helping one I ever met,any word can't express my gratefulness.

I will put the lovely app in all my rom,although I get tricky on Android Studio....
[Android Apps and Games] bawffg85:
Finally,I give up the git idea for network in my country.I just import the source,and it seems to work fine.Thanks again!:D
[Android Apps and Games] daxgirl:
Hi guys!

I have received some PMs related to android studio problems. I guess xda will be xda and no matter how many times you say you can't help everyone with android studio, it's still something new for most people here.

I am no expert on android studio and mostly I am happy it never gave me problems. The reason I can't help most of you debug it's problems, is because I only use it on Linux.

Anyway, I have been asked twice about the sake issue about it complaining about JAVA_HOME.

Please have a look here http://stackoverflow.com/questions/...-installation-on-windows-7-fails-no-jdk-found if someone still has that problem.

Stackoverflow is a good place to try and debug dev tools related problems. I hope this helps.

Sent from my awesome g920f powered by 6thGear
[Android Apps and Games] rompnit:
Anyone having java issues with the studio... Have you set the JAVA_HOME environment variable? I'm running Windows 7, and had to manually set it before it would work.

Start menu -> (Right click on) Computer -> System Properties -> Advanced System Properties. Open Advanced tab -> Environment Variables and add a new system variable JAVA_HOME that points to your JDK folder.. For example C:\Program Files\Java\jdk1.7.0_21
[Android Apps and Games] daxgirl:
Yes that seems to be the pickle with windows ???

Sent from my awesome g920f powered by 6thGear
[Android Apps and Games] Wuby986:
I am using it on linux as well, but i have installed on windows as well on work pc, but i had zero problem for jdk, given that i already had it set up for cygwin and apktool
[Android Apps and Games] intxeon:
Hi daxgirl

Can you make us an example on how to use this method:

* This method can be useful for devs that wish to inform their users

* that reboot of an app is required fpr the changes to take effect.

* Some apps reboot quietly, but f.e SystemUI will reboot visibly.

* To inform user, you can call this method, and a popup, informing of what reboot is required, will be shown.

* Upon clicking ok button, the specified app will be killed.*/

public void appRebootRequired(final String pckgName) {

Thank you

P.S Sorry...you just explained it right now
[Android Apps and Games] daxgirl:
Seriously you're scaring me man... Look what I JUST added to post #4 :)
[Android Apps and Games] intxeon:
Ahhhhhhhh :D:D:D:D:D:D
[Android Apps and Games] daxgirl:
I consider it an advanced usage of the code. So I created this method, but it is never used. So I just showed you an example how to use it...

Sent from my awesome g920f powered by 6thGear
[Android Apps and Games] daxgirl:
Adding more than one special key

If you need to add more than one special key (see popst #4 for instructions and explanations), you have 2 options:

1. We can go on with the if/else conditions, like so:

case "SwitchPreference":
SwitchPreference s = (SwitchPreference) pf.findPreference(key);
s.setChecked(sharedPreferences.getBoolean(key, true));
[COLOR="blue"][B] if (key.equals("toggle_call_recording")) {
appRebootRequired("com.android.incallui");
} else if (key.equals("some_other_key")) {
//do something you want
} else if (key.equals("again_some_key")) {
//do something different
}[/B][/COLOR]
break;

2. Or we make a switch for that based on key. Like so:

case "SwitchPreference":
SwitchPreference s = (SwitchPreference) pf.findPreference(key);
s.setChecked(sharedPreferences.getBoolean(key, true));
[COLOR="Blue"][B]switch (key){
case("toggle_call_recording"):
appRebootRequired("com.android.incallui");
break;
case("toggle_clock_visibility"):
appRebootRequired("com.android.systemui");
break;
case("some_other_key"):
//do something
break;
case("some_other_different_key"):
//do something different
break;[/B][/COLOR]
}[/B][/COLOR]
break;

Please note:

You can add the specific conditions to any preferences

You need to add them to the same preference instance as the preference that the key belongs to. Right now I showed how to do it for switch preference. You can do the same for any preference. If the key belongs to checkbox preference, you need to put the conditions inside the case of the "CheckBoxPreference" and so on

You need to make sure your condition comes after our built in lines. Like in this case I added it after the initiation of the object and setChecked

You need to finish your conditions BEFORE the main break; of the case.
[Android Apps and Games] Thebear j koss:
[MENTION=4714483]daxgirl[/MENTION] if you added anymore instructions to your op and 1st 3 posts, it may have been easier to just fly to everyone's location and personally show them. Lol. And as wuby said if you use apktool on windows your environment should be ok. I'm waiting for the nightmare of win10 and see all the issues that will bring. Lol. Thanks for all your patience.

Your morals are WRONG!! Your ideas are WRONG!! You're too far GONE... and god punishes you for your sins.
[Android Apps and Games] daxgirl:
Your signature is scary... ?????

Sent from my awesome g920f powered by 6thGear
[Android Apps and Games] Thebear j koss:
Justva lyric from a band from nyc that just reunited. I had it stuck in my head. It's not as scary if you know the band. No religious affiliation at all. It's more of a throwing it back at narrow thinking, close minded individuals. If you get the chance look up the band Burn from NY. Great underground heavy band.

Your morals are WRONG!! Your ideas are WRONG!! You're too far GONE... and god punishes you for your sins.
[Android Apps and Games] daxgirl:
New content added

I am no Troy unfortunately and I am no good at being tidy and I don't have OCD (obviously). So I have no idea how to keep things so everyone knows they are added or change.

So I will just make announcements...

Post #4 is now populated. I have started to add some tips and tricks there.

​

Man we are going to need more posts... I should have reserved like 10...
[Android Apps and Games] Thebear j koss:
Lol. Call in a mod to give you some posts, this thread will be about 95% instructions and instances and 5% users thanking you and wuby.

Your morals are WRONG!! Your ideas are WRONG!! You're too far GONE... and god punishes you for your sins.
[Android Apps and Games] daxgirl:
Fix for ColorPickerPreference ages old bug

Soooooo... I have had another look at the ColorPickerPreference with the ages old bug of retrieving defaultValue and I think I fixed the bug.

The nature of the bug:

Remember how I said you only ned to set default value as integer? Well, the reason was as following:

If you tried setting it as hex, the app would crash. It does not take hex as default value. It never did. From all the years that this color picker existed in all the apps that used it (including the one you used to use, you just never set default value for it, so you always got black).

If you tried to set default value as reference from resources, f.e. android:defaultValue = "@color/myWhiteColor" that would work. But that would persist 0 into preferences. Which in our app would persist 0 into database as well. So the only way was to set the default as actual integer, as I stated in post #3.

If you look at this commit https://github.com/daxgirl/CustomSe...8bb5596944ff9b26752e21068a67b85c?diff=unified

I think I have fixed it. I just clreared the app data and deleted all color keys from database and it sets the color correctly based on defaultValue given in proper hex format, meaning #ffffff or #ffffffff (6 or 8 values preceeded by #)

If you want to diff the commit (provided your project was pulled from git), just open the ColorPickerPreference on your android studio, on the upper tab of it, right click, go to git, go to compare to branch, click on master/origin. You will get a window of differences. Like KDiff or Meld. Just copy the differences from git to your java file. Make sure you get them all. or you can create a patch from the commit and apply. if you're profficient in git.
[Android Apps and Games] Wuby986:
That's amazing!!!!!! Really awesome achievement !!!
[Android Apps and Games] hanss1:
My sincerest thanks and congratulations for sharing your time and work.

Thanks to mates like you've learned and continue to do so at this passionate world Android.

regards
[Android Apps and Games] asc1977:
logcat after pressing app link in rom control

Android Manifest
[Android Apps and Games] asc1977:
If i choose the com.three.minit.minitbatterysettings.MainActivity

happens followed logcat and fc rom control

---------- Post added at 19:51 ---------- Previous post was at 19:47 ----------

on a older rom control app, not yours, i started like that but dont work in yours
[Android Apps and Games] Wuby986:
as you can see the package doesn't match the activity for standard ( i mean activity should be .....free.MainActivity but "free" is removed from activity, do that it will work using same code on free and paid app.

if i rememeber correctly we ( daxgirl) posted a fix for that back awhile.. please ckeck in OP and report back.. i am quite sure you're not the only one that run into this
[Android Apps and Games] asc1977:
thx for helping. i read in OP and didnt finds fix. i used search function and find a problem with 3minit but not same on site 15 and followed but no solution for me.

any ideas ? [MENTION=4714483]daxgirl[/MENTION] can help?
[Android Apps and Games] Wuby986:
if she cannot i'll check it tomorrow in the morning.. by now i am sick of looking to a monitor.. for today [emoji28]
[Android Apps and Games] asc1977:
Thx. I hope we find a solution
[Android Apps and Games] Kamy:
Just search this thread for 3minit battery you would find the answer. This once was discussed in page 15-16 and the Java changes explained by daxgirl have fixed the issue for me.
[Android Apps and Games] asc1977:
thx alot.

i read this but i thought that was for the other problem there was and not for 3minit. now all works and i am happy

thx again at all that helped me
[Android Apps and Games] edi.ejID:
create more like this for kitkat version please
[Android Apps and Games] xenreon:
Somewhere I've read the OP is too lazy to make it for older Android versions (no offense :D)

You can try to do that yourself though
[Android Apps and Games] daxgirl:
Min sdk version for this project is 21. Kitkat is 19. We are not making lower api compatibility. Cheers

Sent from my ACTUAL SM-N920C using transporter...
[Android Apps and Games] asc1977:
So hi again in the right thread

I have now builded from source my rom control app for my rom. No i want to start to upload my sources (what is nearly same like this here in thread) to github. Can somebody guide me how? Is there a easy way from AndroidStudio?

And second thing is do i must update my sources if i update my app?

Thx for helping
[Android Apps and Games] Wuby986:
on my way home now.. just quickly to say yes.. same logic as for kernels.. gonna tell you all soon

i remeber i did it already..

here the steps

first create the repo on git website, note the edits at bottom