System tune-up, optimization, tweaking
Jul 1st, 2014, 8:05 pm
Is this theming inconsistency something you would have to fix in Pandora or is this something the theme controls?

It should be transparent like the notification below it.

Thank you!

Image
Jul 1st, 2014, 8:05 pm
Jul 1st, 2014, 8:39 pm
(GL)gamer765 wrote:I finished writing the code for adding the lines to hosts but having slight issue writing the hosts file back.
The AdAway application is still being actively maintained and updated, but more importantly it is completely free and open source. Perhaps you may find it useful to compair your code to the code used by AdAway to determine what is preventing you from applying the updated hosts file.
Jul 1st, 2014, 8:39 pm
Jul 1st, 2014, 9:05 pm
And what will happen to your entries when adaway loads an updated host file?
Jul 1st, 2014, 9:05 pm
Jul 1st, 2014, 9:17 pm
I actually fixed my issue so it works now.
@lexluthor5 I believe the entries will be preserved but I can't tell for sure since I don't use it. adaway uses RootTools for its operations but I use libsuperuser and did it my own way.
As far as the theme goes, Pandora sets the theme. Pandora uses a custom view for the notification, that is why it doesn't use the system theme.
Jul 1st, 2014, 9:17 pm

Like my work? Consider a donation: http://bit.ly/1fnw38T
Image
Jul 1st, 2014, 10:13 pm
lexluthor5 wrote:And what will happen to your entries when adaway loads an updated host file?
(GL)gamer765 wrote:I actually fixed my issue so it works now.
@lexluthor5 I believe the entries will be preserved but I can't tell for sure since I don't use it. adaway uses RootTools for its operations but I use libsuperuser and did it my own way. As far as the theme goes, Pandora sets the theme.

Unfortunately, I believe that AdAway is destructive in the way that it generates and applies it's custom hosts file. Below is how I understand AdAway to work.


1) Download all available user defined online hosts file sources

2) Merge the downloaded hosts file sources into one list

3) Merge all user defined URLs from the 'Blacklist' to the list

4) Remove any entries in the list containing URLs from the user defined 'Whitelist'

5) Merge all user defined 'Redirection' entries to the list

6) Generate new hosts file from the list

7) Replace previous hosts file with the newly generated one
Jul 1st, 2014, 10:13 pm
Jul 1st, 2014, 10:38 pm
I parse the existing hosts file and add the entries from old hosts one by one and add my own entry at the end.
Jul 1st, 2014, 10:38 pm

Like my work? Consider a donation: http://bit.ly/1fnw38T
Image
Jul 1st, 2014, 11:12 pm
(GL)gamer765 wrote:I parse the existing hosts file and add the entries from old hosts one by one and add my own entry at the end.
Yes, I understand your implementation and think it's good in that it essentially performs a 'merge' of your entries into the existing entries. Given this, your implemention would be considered nondestructive. I simply wanted to warn users of AdAway that AdAway's implementation *is* destructive. AdAway essentially performs a 'replace' meaning that it disregards any and all existing entries. It is crucial for users of AdAway to understand this because every time AdAway updates the hosts file, any and all entries that Pandora Pacher may have added will be removed.
Jul 1st, 2014, 11:12 pm
Jul 2nd, 2014, 12:01 am
That is why I don't use adaway. I used to use it but whenever I disable, it defaults a generic hosts. My patcher again parses hosts and writes entries one by one and if an entry matches my entry, I simply don't write it (essentially deleting it)
Jul 2nd, 2014, 12:01 am

Like my work? Consider a donation: http://bit.ly/1fnw38T
Image