Related
I put together a small shell script to make it easy for anyone rooted to block ads and check to see if they have the latest version I keep of adhosts. If after checking you do not have the latest, it will download it for you automatically.
What does this script do (in a nutshell):
1) Checks to see if you have the latest version of ad hosts for adblocking from me
2) If you do not have the latest, it will download it for you
3) If you have the latest, it just exits out, no changes
4) Installs the script to your /system/xbin directory so the next time you just have to type:
Code:
su
blockads
and it will run the script for you
How to run this?
Get this if you are using an AOSP ROM:
1) Download it from http://dl.dropbox.com/u/24904191/blockads
Try this if you are using a SENSE ROM (thanks chrootz for the fixes):
1) http://dl.dropbox.com/u/24904191/sense/blockads
*** If you have troubles getting the script to work, try updating your system to the latest version of busybox (stick it in /system/xbin and overwrite the current version of busybox, then change the permissions to 755 and owner and group to root) ***
2) Move it to /data/local/tmp (if you dont have it, create it) from a file explorer with root permissions (must set the system in r/w mode) or from the terminal shell
3) make sure the script has the right permissions by typing:
Code:
su
chmod 755 /data/local/tmp/blockads
in the terminal shell (in the emulator or whatever you use to get to it)
4) run the script by typing
Code:
/data/local/tmp/blockads
5) let it do its thing
After its done you can run it again anytime from the terminal by typing
Code:
su
blockads
as already mentioned.
I'm working on making it a GUI app next (with more features), but this should tie anyone who wants it over until then
Anyone who finds any adservers and wants me to add them to the list, feel free to list them here and I will add them.
Latest updates:
2011-12-01: Updated to block carrieriq
Tried this out and got this:
sh-3.2# su
sh-3.2# /data/local/tmp/blockads
Fetching host file via hostname
wget: bad address 'dl.dropbox.com'
update could not be completed, sorry
sh-3.2#
newter55 said:
Tried this out and got this:
sh-3.2# su
sh-3.2# /data/local/tmp/blockads
Fetching host file via hostname
wget: bad address 'dl.dropbox.com'
update could not be completed, sorry
sh-3.2#
Click to expand...
Click to collapse
I forgot some ROMs and such have a busybox version that doesn't work right with hostnames in wget. I'll see if I can work around that and update the script
EDIT: updated to work around by using the IP for those that their busybox wget does not work correctly with hostnames. Only issue with that is the IP may change.
Ok. I am stuck. I actually don't have a hosts file under "etc", only a hosts.bak. With root explorer mounted as r/w I am still not able to rename the "host.bak" file to "hosts" - error message "read-only file/directory". I created a blank "hosts" text file, put in on the sdcard and with terminal emulator still can't cp to "etc" because of "read-only directory" error message. Any other suggestions?
GermanGuy said:
Ok. I am stuck. I actually don't have a hosts file under "etc", only a hosts.bak. With root explorer mounted as r/w I am still not able to rename the "host.bak" file to "hosts" - error message "read-only file/directory". I created a blank "hosts" text file, put in on the sdcard and with terminal emulator still can't cp to "etc" because of "read-only directory" error message. Any other suggestions?
Click to expand...
Click to collapse
Top right corner of Root Explorer .... Mount RW.
Sent from my A05PTH3ORY using XDA App
Does this do anything differently then AdFree, from the market?
yareally said:
I forgot some ROMs and such have a busybox version that doesn't work right with hostnames in wget. I'll see if I can work around that and update the script
EDIT: updated to work around by using the IP for those that their busybox wget does not work correctly with hostnames. Only issue with that is the IP may change.
Click to expand...
Click to collapse
Updated blockads script to test this am and:
sh-3.2$ export PATH=/data/local/bin:$PATH
sh-3.2$ su
sh-3.2# blockads
Fetching host file via hostname
wget: bad address 'dl.dropbox.com'
The busybox version of wget on your system does not work correctly with
hostnames. Trying workaround with latest known IP to the hostname...
Connecting to 184.73.229.87 (184.73.229.87:80)
hosts 100% |***********| 641k 00:00:00 ETA
backing up old host file and updating
failed on 'hosts' - Cross-device link
md5sum: can't open '/system/etc/hosts': No such file or directory
/system/xbin/blockads: line 38: [: 8172d35d1b72871f7e1ef4e709920f0e: unary operator expected
Unable to chmod /system/etc/hosts: No such file or directory
Unable to chmod /system/etc/hosts: No such file or directory
remounting filesystem in r/o mode...
Cleaning up files...
rm failed for -f, No such file or directory
update complete!
sh-3.2#
The end result is the existing hosts file being renamed hosts.bak and obviously no new hosts filebeing being created.
EDIT.... The above is testing on my inspire running busybox 1.19. Tried using the script on my sensation running bb 1.18.4 and it works fine.
Edit edit... Installed bb 1.18.4 on inspire and result is the same as posted above.
DroidTh3ory said:
Top right corner of Root Explorer .... Mount RW.
Sent from my A05PTH3ORY using XDA App
Click to expand...
Click to collapse
That's what I did, but it does not work - still does not let me modify read-only files.
After reading over the code and seeing the comments, I can only guess you had the modified version of wget on your device during testing, which does support host names. Before I continue, I am not trying to rain on your parade, but... By downloading the file, checking the md5, comparing it to the existing file, replacing if needed, and then cleaning up... you went about 5 steps beyond what just doing an "if server file is newer" check would do by including a custom wget. Even though you have to put in the code to install and verify the wget, the trade is that you no longer have to download the file every time, check it every time, and worry about making sure the md5 matches.
If you decide you want to switch over to that method, you can check out the option already included in http://forum.xda-developers.com/showthread.php?t=1092128 by downloading the live install version to view the actual script. Just a recommendation to optimize the process. Nice work, though, you definitely found a way to get the job done.
As for the difference between this and Adfree. There is no real difference. Adfree checks the server, does a callback, and prompts the user with updates. Adfree just requires an entire shell to turn it into an app, but will automatically run on boot.
twistedumbrella said:
As for the difference between this and Adfree. There is no real difference. Adfree checks the server, does a callback, and prompts the user with updates. Adfree just requires an entire shell to turn it into an app, but will automatically run on boot.
Click to expand...
Click to collapse
So, for those of you not comfortable running ADB, or Terminal Emulator, just install AdFree, and let it do everything for you.
spotmark said:
So, for those of you not comfortable running ADB, or Terminal Emulator, just install AdFree, and let it do everything for you.
Click to expand...
Click to collapse
Well, you also have the option of most included ROM toolkits, ScriptFusion, and a lot of preinstalled adblock scripts, but the big difference is the hosts file itself. Sounds like this one is custom, whereas mine takes bamf and adfree and merges them. This one may end up blocking more ads, but the only way to know would be to sit down and compare them all.
Sent from my ADR6400L using Tapatalk
twistedumbrella said:
Well, you also have the option of most included ROM toolkits, ScriptFusion, and a lot of preinstalled adblock scripts, but the big difference is the hosts file itself. Sounds like this one is custom, whereas mine takes bamf and adfree and merges them. This one may end up blocking more ads, but the only way to know would be to sit down and compare them all.
Sent from my ADR6400L using Tapatalk
Click to expand...
Click to collapse
Ah, I see.
Thank you for your comments everyone . I'll refine the script a bit more and also deal with a permanent workaround for not having a wget that checks hostsnames by testing with a ping and getting the IP first, using that and then doing wget. This started as a way for me to deal with having to move my ad host file each time I update it on my phone to just giving it out to everyone.
The only other difference than what was mentioned between my script and adfree as far as I know is I include a wider range of adhosts according to those that have used both. I have never used adfree, but people that have said I blocked more ads than they do and I also use an invalid IP address to block (0.0.0.0) instead of the loopback address (127.0.0.1) so it kills them a bit faster.
If anyone is still having problems that weren't resolved with it from above, let me know as well. I tested it against busybox 1.16.2 on my own phone, but it seems no 2 busybox version are alike
I havent tried this, but this one does include busybox 1.19 for those that don't want to manually install it. https://market.android.com/details?id=com.jrummy.busybox.installer&feature=related_apps
yareally said:
Thank you for your comments everyone . I'll refine the script a bit more and also deal with a permanent workaround for not having a wget that checks hostsnames by testing with a ping and getting the IP first, using that and then doing wget. This started as a way for me to deal with having to move my ad host file each time I update it on my phone to just giving it out to everyone.
The only other difference than what was mentioned between my script and adfree as far as I know is I include a wider range of adhosts according to those that have used both. I have never used adfree, but people that have said I blocked more ads than they do and I also use an invalid IP address to block (0.0.0.0) instead of the loopback address (127.0.0.1) so it kills them a bit faster.
If anyone is still having problems that weren't resolved with it from above, let me know as well. I tested it against busybox 1.16.2 on my own phone, but it seems no 2 busybox version are alike
I havent tried this, but this one does include busybox 1.19 for those that don't want to manually install it. https://market.android.com/details?id=com.jrummy.busybox.installer&feature=related_apps
Click to expand...
Click to collapse
Hit me up if I can be any help. It's good to have a better list available. Adfree has never been very thorough.
Sent from my ADR6400L using Tapatalk
+1 I exam yareally's hosts, This is much faster killing them and I glad you finally developing the script update for the hosts. I am going test your script update on 2 of the roms A05PTH3ORY and Gengeritis 3D VII. Thanks - Keep it up
yareally said:
The only other difference than what was mentioned between my script and adfree as far as I know is I include a wider range of adhosts according to those that have used both. I have never used adfree, but people that have said I blocked more ads than they do and I also use an invalid IP address to block (0.0.0.0) instead of the loopback address (127.0.0.1) so it kills them a bit faster.
Click to expand...
Click to collapse
Added about 10-15 more hosts today.
Thanks for the script. I'm going to give it a shot in a little bit. AdFree hasn't worked right in months. I've been using Absolute System to block ads, but I think I'll give this a try. Thanks again.
I'm about 50% done working on a basic gui app to do what the script does + some other features, just to give an update. GUI app will be free to any xda members of course
Things I am putting into it:
Choice between no blocking, partial blocking (basically in browser only stuff in case you want to show developers some love by not blocking their application ads), and full blocking.
Updating like the script does with just a touch of a button.
Optional ability to download a host block list for your desktop pc.
*features that may come later*
-ability to send me hosts from the app to add to the block list
-ability to add your own hosts on the fly to the list (either for personal routing or for adblocking, since adblocking is only the secondary use of the hosts file). Unfortunately, you will have to figure out the hosts yourself, since there's no easy way to tell really automatically.
Any other suggestions are welcomed
yareally said:
I'm about 50% done working on a basic gui app to do what the script does + some other features, just to give an update. GUI app will be free to any xda members of course
Things I am putting into it:
Choice between no blocking, partial blocking (basically in browser only stuff in case you want to show developers some love by not blocking their application ads), and full blocking.
Updating like the script does with just a touch of a button.
Optional ability to download a host block list for your desktop pc.
*features that may come later*
-ability to send me hosts from the app to add to the block list
-ability to add your own hosts on the fly to the list (either for personal routing or for adblocking, since adblocking is only the secondary use of the hosts file). Unfortunately, you will have to figure out the hosts yourself, since there's no easy way to tell really automatically.
Any other suggestions are welcomed
Click to expand...
Click to collapse
Sounds like AdFree but much better and will work better as well. Can't wait!!
Just tried this today on gingeritis 3d beta8 and it doesnt seem to work as i get the same error someone else posted a few posts back. Something about no such file or directory system/etc/hosts. I reverted adfree and uninstalled it and renamed the hosts file to hosts from hosts.bak but when I Su adblock it gets renamed to hosts.bak and terminal shows that same error
ANNOUNCEMENT:
If you have a new Nook HD/HD+ and want to root and get the GAPPS running, you should follow the guide at the All-in-One thread instead. That said, I won't copy all the information here to there, so you should continue to read on.
Proof:
https://www.youtube.com/watch?v=MssQ25bnZnk
Okay this one is more interesting than the root I created. I don't think there will be a simple batch file for this one. I barely get this working and I'm going to try to write instruction for the people. I guess let me start off with the same disclaimer.
Disclaimer:
If something gone wrong, it's all your fault. I take ZERO responsibility for what happen to your device, your life, your wife/husband, your kids, your unborn child and etc. You get the idea.
Background:
I basically taking the installation process from the Kindle Fire HD and apply it it here. The original instruction which I "borrow" from is here. For the most part, the process is the same, but we have to be extra careful for writing into /system partition or we are toast.
What I found:
Well, since we didn't have "UNKNOWN SOURCE" option, we have to adapt and fix that first. You can thanks skyhawk21 for coming up with that idea. Since then, there have been other way to enable Unknown Source. LeapinLar have wrote an excellent here. And I have make it even simpler here. Also, I have found that trying to install Google Play store after some other stuff already installed is kinda pain and brought some error. So I would strongly start this fresh. I mean factory reset and apply root. If you don't know how to gain root on the Nook HD+, I wrote an excellent piece for it here.
Hugh big caution
I did all my stuff based off my root method. I also noticed that verygreen updated his root. While there are some similarlity in our methods, THERE ARE SOME DIFFERENCE ALSO. For example his root doesn't have a working superuser or he have busybox installed and symbolicly linked for all sub command. This mean the instruction I have may not work if you used his method to root.
Addendum 1: 11/19/[email protected]:50PM Pacific
I have been told that the first set of instruction is no longer necessary by leapinlar. This mean that if you only want the ability to install app via Google Play, you can do the first set of instruction and be done with it. But this means you won't be able to utilize the rest of Google's services. On the other hand, you can skip the first instruction and purely do 2nd instruction and get most of the stuff working. Well I say most because it doesn't include Google Maps and Chrome.
Addendum 2: 11/19/[email protected] Pacific
I have added Google Map below so you can download separately But Chrome Browser is like 20MB and over the filesize limit of the xda forum. Since most people don't use it, and there are many good alternative browser already, I won't bother. You can also look up both apk online if you want. they both should work on Nook. You don't have to make symbolic link on these two, but you can't have it on /system either. Either try install it via "adb install" command or open it using your favorite file browser. I forgot which method I use, probably the first.
Addendum 3: 11/30/[email protected]:25AM Pacific
I rewrite and hide unnecessary stuff and streamline the guide.
Addendum 4: 12/01/[email protected]:25PM Pacific
Adding gapps-ics-inst.sh.img which should be compatible for both my and verygreen root method.
Addendum 5: 12/02/[email protected] Pacific
Adding troubleshooting tips
Addendum 6: 12/04/[email protected]:45PM Pacific
Update with brand new easy to follow instruction.
Addendum 7: 12/07/[email protected] Pacific
The Google Map will no longer install as part of the script. I think Maps may not function properly if google framework weren't installed correctly first.
So, you will just have to install it manually after the Google Play updated.
EXTREMELY OUTDATED NOT FULLY WORKING Instruction is hidden since it's no longer necessary.
Instruction:
Optional, factory reset it. Seriously I cannot say this will work unless you start from scratch. If you already have rooted earlier, then install something like titanium backup and backup your porn(I mean data).
Gain root access. Follow this guide.
Follow my instruction here to enable "UNKNOWN SOURCE".
Upload 3 files to /data/su/ using "adb push" command
GoogleServicesFramework.apk - mediafire.com/?zaumfwhraxcifqf
Vending.apk - mediafire.com/?31bn3e258jjpj8d
Play.apk - mediafire.com/?wwcqrlfwt8o1gnv
If you have problem downloading this Play.apk I suggest try using this Vending_v3.9.17.apk instead. Be sure not to confuse with the earlier Vending.apk file, or better yet, rename it to something like Play3917.apk
adb install $your_choice_of_file_manager(must support root), I prefer ES File manager
using your file manager and browse to /data/su and install GoogleServicesFramework.apk (I'm not sure if you can just do adb install GoogleServicesFramework.apk from your PC, but since I didn't do it that way and this is a known result, so I recommend doing it this way)
adb shell
su
mount -o remount,rw /system
mv /data/su/Vending.apk /system/app/Vending.apk
chmod 644 /system/app/Vending.apk
chown 0.0 /system/app/Vending.apk
mount -o remount,ro /system (not sure if this is necessary, but I better safe than sorry)
using your file manager and navigate to /system/app and install Vending.apk
mount -o remount,rw /system (only if you did step 11)
rm /system/app/Vending.apk
mount -o remount,ro /system
using your file manager and go to /data/su and install Play.apk or Play3917.apk depending on what you download
now you can delete both GoogleServiceFramework.apk and Play.apk in the /data/su folder.
That's all, your Google Play Store should now be working.
Login and have fun. I manage to install some stuff through that.
Click the "THANKS" button below.
OK, now to get a more complete gapps. The below steps are to be only after you have Google Play Store, meaning all the above steps are done. The instruction below will let your other app sync and use google account. Meaning stuff like RSS reader sync with google reader or Youtube app access your personal account. Well, atleast those are the two I have tried and seem to be working.
OUTDATED Instruction:
Instructions:
Download these two files. gapps-ics-inst.sh.img and gapps-ics-system.zip (if you use verygreen root method use this gapps-ics-inst.sh.img , the one embedded on this post instead. This one should work universally but untested. I re-wrote it to adapt for verygreen root method also. If it works I'll rewrite this part of instruction again to use the new version of the shell script.)
adb push gapps-ics-inst.sh.img /data/su/gapps-ics-inst.sh
adb push gapps-ics-system.zip /data/su/
This step might take some time
adb shell
su
cd /data/su
chmod 755 gapps-ics-inst.sh
./gapps-ics-inst.sh
This step could take some time too, once it return to shell, then go to next step
(optional delete installation file to save space) rm gapps-ics-system.zip
(optional delete installation file to save space) rm gapps-ics-inst.sh
exit
exit
(you should be back to your OS by now, if not keep exiting until you are out of adb)
adb reboot
once your nook is rebooted, the screen may say updating some files, this is normal.
enjoy, everything should work now.
If you didn't hit that "THANKS" button, you better do now. If you did, do it again?
Thanks leapinlar for catching the typo, I have reupload the shell script file now. And thanks to him for hosting the gapps-system.zip
There have been some errors on my initial instruction. Certain things have been point out. I have updated the instruction accordingly. leapinlar have also fixed gapps files and the shell script for that in post #34. So big kudo to him. I haven't have much time to toy with this lately, but since people report that his script work. So here are the new instruction.
If you were using verygreen version of root, try running this first.
Code:
adb shell su -c "/data/su/busybox chown shell.shell /data/su"
FAQ:
Q: I don't see the Google Play Market on the list of apps.
A: If you use the "Skip OOBE" aka Test mode, then (reboot first or go into shell and kill the app launcher and then) you have to hold down the Vol-Up key and tap the word Apps on the top to see them. After that I recommend installing other launcher, then they can see all the apps.
Q: Some people are saying after they install an adblock app, after reboot it get into bootloop and wipe everything.
A: The way most adblock apps work is that they modify the hosts file which usually located at /system/etc/hosts Well, as we have discussed before this is not a good idea to make change directly to /system folder(directory). The only adblock I know of that work is AdAway with a specific setting.
When installed, first you have to go to menu > preferences > target hosts file > /data/data/hosts, it will then ask to create symbolic link, say yes and then you can reboot.
Troubleshooting Tips:
I had a little problem today, unrelated to the GAPPS install mod here. But the problem involved Google Play not working correctly. I kept getting Google Play error pop up. So, I use Titanium Backup ROOT to wipe the data and then uninstall all the apps which names start with Google. I'm not sure if this is enough, it might but I didn't want to take any chance. This maybe unnecessary but I did it anyway; I delete all the files that I created in the /data/su/system that have anything to do with google. Basically anything that was unzip there. Rebooted, then re-apply the same google mod here. And problem solved. I did have to re-login again, but yes I clear up that Google Play error.
Pre-Requisite:
ADB + ROOT + Enable Unknown Source.
1. ADB: leapinlar wrote a post to help you getting ADB to work here.
2. ROOT: I wrote a guide on how to get root the easy way here.
3. Enable Unknown Source: Again, I make an easy little tool for you here.
Brand New and Improve Instructions:
Download these three files. New.zip GoogleMaps.apk and gapps-ics-system.zip
Unzip New.zip (don't unzip gapps-ics-system.zip)
run install.bat
PS: Now I know how hard it's to write a guide in xda. Prop to all those dev that have been there b4 and after, especially the one I have use their works.
That's it, I'm going out to buy one ASAP. Thanks for your hard work!
thanks for you Howto
after that is it possible to use Youtube and Google Maps apps?
Youtube can be install from Play Store but you have to sideload the Google Maps since it's not available for download in Play Store. GMail works, but the authentication through google account on other apps still aren't working. I guess this problem may be beyond my current level of tinkering knowledge.
great job on getting google market somewhat working!!!! We need the manual nooter developer or author to make what we need for the Nook HD AND HD+. Anyhow I belwive you need more framework files to get google authentication working and unfortunately they need to be installed within root folders like the /system folders and sub folders... Also Barness and noble included frameworks for google authentication, probably just not working with google apps installed manually.... gotta figure it out...
---------- Post added at 05:49 PM ---------- Previous post was at 05:47 PM ----------
By the way youtube app works installed older version from my Motorola Droid 3 manually through es file explorer and it works and does HD fine
I have been thinking about that and wonder if we can put those lib files on diff folder and sym link them? I still afraid it might reset the thing.
someone0 said:
Instruction:
[*]Optional, factory reset it. Seriously I cannot say this will work unless you start from scratch. If you already have rooted earlier, then install something like titanium backup and backup your porn(I mean data).
Click to expand...
Click to collapse
I was able to do this with root explorer after rooting with no problem.
Thanks for this (and your rooting zip - both are super!)
issue was fixed, removed obnoxiously long quote
smatticus said:
still have the issue where i can't get the nookcolortools to run properly from /system/app. it just crashes. i googled this and it says that i need to reboot the nook to apply the system/app move BUT that supposedly creates the bootloop. i REALLY don't want to do that so can someone help me out here?
Click to expand...
Click to collapse
You probably shouldn't quote anything that big unless you very need to. As far as getting nook color tool to run, did you set the file to have proper permission, eg: chmod and chown the file? Your other option is factory reset and start from scratch. Sometime getting a clean slate to start with make things easiler to follow.
Thank you for the Google Play Store. It works great for me. I want to install Google Voice. Before I installed your framework apk, I was not able to get the credentials to come up. Now since installing that, it comes up with my Google credentials and tries to authenticate them. But immediately Android System force closes and the sign in screen just sits there. Any ideas on this one? This is the last thing I need to make this my everyday device.
Sent from my Nook HD+ using Tapatalk
someone0 said:
As far as getting nook color tool to run, did you set the file to have proper permission, eg: chmod and chown the file? Your other option is factory reset and start from scratch. Sometime getting a clean slate to start with make things easiler to follow.
Click to expand...
Click to collapse
turns out i wasn't supposed to install the app via adb. my fault for not following instructions. thanks for your hard work
Nice, I think I am getting the Nook HD+.. Hope there is custom ROM soon.. thanks man
leapinlar said:
Thank you for the Google Play Store. It works great for me. I want to install Google Voice. Before I installed your framework apk, I was not able to get the credentials to come up. Now since installing that, it comes up with my Google credentials and tries to authenticate them. But immediately Android System force closes and the sign in screen just sits there. Any ideas on this one? This is the last thing I need to make this my everyday device.
Sent from my Nook HD+ using Tapatalk
Click to expand...
Click to collapse
I'm thinking about that right now but as I suggested, putting the google lib in other place and make symbolic link in the appropriate /system sub. I won't be able to test that theory of mine until I get home later tonight. I will have to research where all the files suppose to go and their permission. Unless you want to do it, you are welcome to.
I agree, getting authentication would be tha last missing link to make this device fully enjoyable as day-to-day usage. And the we can wait for custom ROM from real developers. That is definitely out of my knowledge.
works without full reset
figured i'd put it out there that i DID NOT do a full factory reset (partly to be a guinea pig, partly because i'm lazy) and this method DOES WORK without it. It took 2 tries (it loaded up the first time, then crashed a few minutes later.) the second time it worked like a charm. One note: the chown command gave me an "operation not permitted" notice, but the market IS working, i grabbed a TON of apps and thankfully got updates to the ones i purchased through the nook shop that hadn't seen an update since they first launched (i'm looking at you, machinarium).
Thanks!
Thanks so much for your work on this! I can access the Google Play Store along with the Amazon App Store now and have loaded up my new Nook with my favorite apps. My only disappointment is that I still can't get Amazon Instant Video or Google Play Movies to work...once these work I'll be in heaven!
leapinlar said:
Thank you for the Google Play Store. It works great for me. I want to install Google Voice. Before I installed your framework apk, I was not able to get the credentials to come up. Now since installing that, it comes up with my Google credentials and tries to authenticate them. But immediately Android System force closes and the sign in screen just sits there. Any ideas on this one? This is the last thing I need to make this my everyday device.
Sent from my Nook HD+ using Tapatalk
Click to expand...
Click to collapse
BTW, I got that working now, my theory works. Now only if I have a place to store 60+MB file. Then I can update this guide to include that. I was able to use Youtube app to access my account and so is my RSS reader to sync with google reader.
Access Denied
I'm getting an error when I try to execute ./gapps-inst.sh. It's saying cannot execute - Permission denied. I've rooted and followed the instructions to install Google Play and all worked fine...I'm on this last step and it won't work! Advice is much appreciated!! I also keep having permission denied issues with the adb push command...I can paste the files manually via ES File Explorer and rename to remove the .bin but I still can't install from adb shell.
I've also tried chmod 777 on the gapps-inst.sh prior to doing ./gapps-inst.sh but that produces a giant string of errors.
I'm at a loss!
someone0:
I just rehosted your files on my MediaFire account.
Removed links. New links on OP.
Alright, so I have no idea what Nook HD/HD+ thread to put this is in... so here i go.
1. Will these steps get the play store on the Nook HD as well?
2. Will the apps show up in the Nook app section, or do we still need a launcher. I have sideloaded all my apps, but have to use a launcher to get at them.
Thanks!
someone0:
There is are a couple of typos in your gapps-inst.sh file -
Code:
ln -s /data/su/system/usr/srec/en-US/google_hotword_clg /system/usr/en-US/google_hotword_clg
ln -s /data/su/system/usr/srec/en-US/google_hotword_logistic /system/usr/en-US/google_hotword_logistic
are missing the /srec in the second /system link.
Also it seems the real /system has these files so the symlinks fail.
Code:
ln -s /data/su/system/etc/permissions/com.google.widevine.software.drm.xml /system/etc/permissions/com.google.widevine.software.drm.xml
ln -s /data/su/system/framework/com.google.widevine.software.drm.jar /system/framework/com.google.widevine.software.drm.jar
ln -s /data/su/system/usr/srec/en-US/acoustic_model /system/usr/srec/en-US/acoustic_model
hello im getting the following message everytime i try and download the lists "copying of host file failed! please read help for more information"
ive just updated to the android 7.0 through the developer program, twrp custom recovery installed with root access build number NRD90M
just wondering what could be causing this and if i can do anything to try and fix it thanks
Is your /system set to read only, or read/write? If read only, adaway will not be able to update /system/etc/hosts
dratsablive said:
Is your /system set to read only, or read/write? If read only, adaway will not be able to update /system/etc/hosts
Click to expand...
Click to collapse
i have it set to read write im gonna try to flash the systemless hosts right now ill update how it goes
flashing the AdAway_systemless_hosts_v2.zip in the recovery, then unistalling and reinstalling the app seems to have worked
you can also use Magisk now to enable complete systemless root and then the hosts file /system/etc will be forwarded to the systemless version
I didn't even install Adaway, I just downloaded a host file and replaced it in /etc/
Works good enough for me and one less app running...
kennehh said:
hello im getting the following message everytime i try and download the lists "copying of host file failed! please read help for more information"
ive just updated to the android 7.0 through the developer program, twrp custom recovery installed with root access build number NRD90M
just wondering what could be causing this and if i can do anything to try and fix it thanks
Click to expand...
Click to collapse
In the exact same boat. Frustrating. Tried Adfree, to no avail. Adaway, to no avail. Tried the adaway bind zip file, making hosts writable, and even System to writable. Nothing.
treoo0_1 said:
In the exact same boat. Frustrating. Tried Adfree, to no avail. Adaway, to no avail. Tried the adaway bind zip file, making hosts writable, and even System to writable. Nothing.
Click to expand...
Click to collapse
i have fixed this by converting adaway from user apps to system apps using Link2SD, reboot and adaway working properly again
Very old thread, but I've had exactly the same problem installing AdAway on the last 3 or 4 phones -- all but one running Nougat 7.0, the other on Oreo 8.1. This was when trying to install AdAway versions 3.1 and 3.3.something.
I finally got it to write hosts file updates using one of the following, not sure which was the key:
-- Installed version 3.2 which had been running problem-free on an old phone for years. The biggest difference is this older phone is running Resurrection Remix 5.8.3 (Nougat 7.1.2).
-- Before trying to update the hosts file on this fresh install, I went straight to AdAway preferences and set "Check for updates daily", "Enable webserver", and "Start webserver on boot". After making those settings I tapped Download Files and Apply Ad Blocking, and it successfully wrote to the hosts file.
Again I don't know which was the fix. It seems weird that version 3.2 would work when a version just before and after it didn't work for me. But of course it is possible that the version is the difference. It seems even more weird that those 3 little preference settings make any difference at all . . . unless it's just the act of writing changes to the AdAway app itself.
Before installing 3.2, using Root Explorer I checked permissions on the working phone and one non-working phone, for the systems and etc folders, and for the hosts file itself. (In all cases AdAway is/was set to use /systems/etc/hosts.) I also checked Android permissions in the Apps list. All permissions were exactly the same on both phones: 0755 for system, 0755 for etc, and 0644 for hosts. No permissions assigned via Android.
Hoping this bump will also get fresh attention from somebody who might know the details of a real answer.
@Moondroid
Why the hell you trying to make some really old ass version of it work instead of installing the newest version? Lol
I've been using 4.2.7 and though its kind of weird on a fresh install I need to update and apply the hosts twice before searching for newer hosts comes back its up to date. But at least it works.
YOU NEED TO BE ROOTED TO DO THIS OR ELSE YOU WON'T GET ANY RESULTS!Here's how to install a working Google Play Store without any error 406, a full Leanback Launcher complete with suggestions and settings, and a fully working Google search with mic!
BEFORE YOU STARTYou need to first follow the Playing with Fire guide, but please delete the wifi direct xml from the tar.gz first so the remote and wifi will work.
Now for the tweaking!Please install the XInstaller XPosed module and enable it.
And please enable downgrading apps in the Installations menu in XInstaller.
GOOGLE APPNow, you want to download this version of the Google App and install it with the Downgrade App toggle you enabled.
Now you will have working Google Search.
LEANBACK LAUNCHER + SETTINGSNow for Leanback Launcher. Playing With Fire already installed the TvSettings but this version of it doesn't work very well.
Download this version of TvSettings from aftv2atv. Now do these commands to install it.
Code:
adb push TvSettings.apk /sdcard/
adb shell
su
mount -o rw,remount /system
rm /system/priv-app/TvSettings/TvSettings.apk
mkdir /system/priv-app/TvSettings
chmod 755 /system/priv-app/TvSettings
chown root:root /system/priv-app/TvSettings
mv /sdcard/TvSettings.apk /system/priv-app/TvSettings/
cd /system/priv-app/TvSettings/
chown root:root TvSettings.apk
Now you will have a better Settings app. Now for the main launcher.
Download Leanback Launcher and rename it to TvLauncher.apk
Now do these commands.
Code:
adb shell
su
mount -o rw,remount /system
mkdir /system/priv-app/TvLauncher
chmod 755 /system/priv-app/TvLauncher
chown root:root /system/priv-app/TvLauncher
mv /sdcard/TvLauncher.apk /system/priv-app/TvLauncher/
cd /system/priv-app/TvLauncher/
chown root:root TvLauncher.apk
Now you should have a working Leanback Launcher with settings and suggestions!
GOOGLE PLAY STORENow for the main event, the Google Play Store! Download the Play Store mod I made and install it.
It might crash on launch, if it does, go into settings, go to apps, select Play Store from System Applications, and clear data. You'll do this every time it crashes.
Now you have the full Play Store!
CONCLUSION
If you read this through and followed the steps, you should have all of these fully working.
Enjoy your Googlified Fire Stick 2!
Awesome, can't wait to try this tomorrow.
---------- Post added at 07:12 PM ---------- Previous post was at 07:05 PM ----------
Sorry to ask a question to soon but the title says firestick 2 and the playing with fire thread says it works on fire tv 2 box. Is it fair to assume it will work for that too or just the firestick 2?
brick00444 said:
Awesome, can't wait to try this tomorrow.
---------- Post added at 07:12 PM ---------- Previous post was at 07:05 PM ----------
Sorry to ask a question to soon but the title says firestick 2 and the playing with fire thread says it works on fire tv 2 box. Is it fair to assume it will work for that too or just the firestick 2?
Click to expand...
Click to collapse
It works, make sure to use the ARM versions.
Pix12 said:
It works, make sure to use the ARM versions.
Click to expand...
Click to collapse
Now I'm confused, in the instructions for Lazyv4 it says: "Step One: Required Files - Download the following files. For some of these I will have listed two versions (ARM) and (ARM64) so make sure you pick the version that's appropriate for the architecture of your CPU. FireTV-v1 (ARM) & FireTV-v2 (ARM64)."
Thanks for the post @Pix12.
Do you have any extra advice for the Google Play login on Fire Box 2nd gen? I followed the guide above - your Play Store mod won't install (and the old apk you recommend on Playing Fire thread will install but still won't allow Google login)
Btw- I think you forgot to include an 'adb push Tvlauncher.apk' line in your guide. Cheers.
EDIT: Worked it out: - so re-installing Google Play Services fixed login issue. I used an apk uploaded Aug'18 (https://www.apkmirror.com/apk/googl...3-2-78-080406-210410490-android-apk-download/) and used the Google Play apk mentioned here: https://forum.xda-developers.com/showpost.php?p=79117328&postcount=279 (thanks @Pix12)
EDIT#2: Giving up on both Fire Stick 2 (tank) & Fire TV box 2 (sloane) mods - i.e. insert Google Playstore. 'Playing with Fire' mod doesn't work reliably anymore and I can't get the method outlined in this OP to fix it (although I did make some progress with the recommended XInstaller module - it was patchy to say the least). Hopefully a Dev on here will work it out properly but it's well beyond me. Need a new, less frustrating project.....
JJ2017 said:
Thanks for the post @Pix12.
Do you have any extra advice for the Google Play login on Fire Box 2nd gen? I followed the guide above - your Play Store mod won't install (and the old apk you recommend on Playing Fire thread will install but still won't allow Google login)
Btw- I think you forgot to include an 'adb push Tvlauncher.apk' line in your guide. Cheers.
EDIT: Worked it out: - so re-installing Google Play Services fixed login issue. I used an apk uploaded Aug'18 (https://www.apkmirror.com/apk/googl...3-2-78-080406-210410490-android-apk-download/) and used the Google Play apk mentioned here: https://forum.xda-developers.com/showpost.php?p=79117328&postcount=279 (thanks @Pix12)
Click to expand...
Click to collapse
You need to use the XInstaller module to be able to force downgrade.
So I saw installed those files for the launcher And the settings. However nothing happened. Whenever I disable Amazons launcher nothingLeanback Launcher will launch but after both files are installed my settings disappeared for the it. I was trying to do this on a fire tv 2. So maybe the files are different or something just not sure what I should do
is there any tutorial how to root the Stick 2?
Now that the fire tv 2 on the latest firmware has been rooted, https://forum.xda-developers.com/fir...2-box-t3908387, it would be great if google play store could also be installed. Could you please provide a tutorial to add only this feature? Personally not interested in changing the launcher or the other interesting features in your guide. Congratulations on what you have been able to accomplish. Hopefully Amazon doesn't hire you away from us.
Thanks for this. Is there a way to install this using Magisk GApps (MagicGApps module) and without Xposed?
..i don't know the correct configuration yet that could work? ..anyone?
I have installed it with the gapps-config mentioned but getting black screen after booting. (Guess original launcher cant start?)
Eyedoctor2 said:
Now that the fire tv 2 on the latest firmware has been rooted, https://forum.xda-developers.com/fir...2-box-t3908387, it would be great if google play store could also be installed. Could you please provide a tutorial to add only this feature? Personally not interested in changing the launcher or the other interesting features in your guide. Congratulations on what you have been able to accomplish. Hopefully Amazon doesn't hire you away from us.
Click to expand...
Click to collapse
Yeah, you can just do the Play Store part of it, in fact, the Playing with Fire guide contains a gapps-config that only includes the bare minimum.
Pix12 said:
Yeah, you can just do the Play Store part of it, in fact, the Playing with Fire guide contains a gapps-config that only includes the bare minimum.
Click to expand...
Click to collapse
I have tried to read through most of that post and also searched through it but I can't find anywhere that details a method of installing the play store only. Can you please point me in the right direction?
I know from other threads that there is a definite demand for this functionality.
Arturkeibel said:
is there any tutorial how to root the Stick 2?
Click to expand...
Click to collapse
https://forum.xda-developers.com/fire-tv/development/unlock-fire-tv-stick-2nd-gen-tank-t3907002
When trying to install your modded play store I get the following error. I do have the Xinstaller module enabled with downgrading apps selected:
$ adb install PlayTVMod4FTVS2.apk
PlayTVMod4FTVS2.apk: 1 file pushed. 5.0 MB/s (24434423 bytes in 4.689s)
pkg: /data/local/tmp/PlayTVMod4FTVS2.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
eelsid said:
When trying to install your modded play store I get the following error. I do have the Xinstaller module enabled with downgrading apps selected:
$ adb install PlayTVMod4FTVS2.apk
PlayTVMod4FTVS2.apk: 1 file pushed. 5.0 MB/s (24434423 bytes in 4.689s)
pkg: /data/local/tmp/PlayTVMod4FTVS2.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
Click to expand...
Click to collapse
Oh, you need to tick the disable signature check option.
Pix12 said:
Oh, you need to tick the disable signature check option.
Click to expand...
Click to collapse
I disabled signature checking in XINstaller however I'm not able to install either through adb or pm, I get the following error when installing from the adb shell:
# pm install /sdcard/PlayTVMod4FTVS2.apk
pkg: /sdcard/PlayTVMod4FTVS2.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
I already have com.android.vending installed in /system/priv-app/PhoneskyKamikazeCanvas as installed by open Gapps (the version linked in the "playing with fire" thread. I would expect the apk to simply update the system app however it's seeing it as a duplicate. I am able to install it via "pm install -r" to replace it but this breaks play store altogether with a host of permissions errors in logcat.
Using only the gapps version installed in priv-app, with no apk installed under /data/app, I am able to sign into play store and install an app, however after that point I am not able to install any more apps, when I click install I get error code 406.
eelsid said:
I disabled signature checking in XINstaller however I'm not able to install either through adb or pm, I get the following error when installing from the adb shell:
# pm install /sdcard/PlayTVMod4FTVS2.apk
pkg: /sdcard/PlayTVMod4FTVS2.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
I already have com.android.vending installed in /system/priv-app/PhoneskyKamikazeCanvas as installed by open Gapps (the version linked in the "playing with fire" thread. I would expect the apk to simply update the system app however it's seeing it as a duplicate. I am able to install it via "pm install -r" to replace it but this breaks play store altogether with a host of permissions errors in logcat.
Using only the gapps version installed in priv-app, with no apk installed under /data/app, I am able to sign into play store and install an app, however after that point I am not able to install any more apps, when I click install I get error code 406.
Click to expand...
Click to collapse
XInstaller only works with installing on the system without adb or shell commands, Try pushing it to the sdcard and installing it with a file explorer.
Backup image
Hello @Pix12 thank you for your guide, i have tried everything to get this to work but cant, would it be possible for you to make a backup of your fully set up stick in twrp, put it in a zip and upload it to mega for me to install to my stick? ( I know this method works as i have tested it to clone a stick you just have to change the serial number to yours on the backup folder before restoring in twrp ) it would be a great help if you could! Thanks in advance @Pix12
Can you please upload the version of the opengapps you are using. All versions older than a couple months are not on their git anymore. Using the gapps-config.txt. I'm not able to install with the "tvlauncher" flag, It only installs the launcher when I add "leanbacklauncher" thus it creates the "leanbacklauncher" folder in /system/priv-app/. vs "TVlauncher" This is the reason why I'm wondering if the opengapps versions have changed. When I followed your instructions this the TVsettings disappeared alltogether from the home screen.
thecdman said:
Hello @Pix12 thank you for your guide, i have tried everything to get this to work but cant, would it be possible for you to make a backup of your fully set up stick in twrp, put it in a zip and upload it to mega for me to install to my stick? ( I know this method works as i have tested it to clone a stick you just have to change the serial number to yours on the backup folder before restoring in twrp ) it would be a great help if you could! Thanks in advance @Pix12
Click to expand...
Click to collapse
Same request! It would help a lot
I am using PE+ 11 on Moto G6, when I run command "su" and then "systemize" it does not list any apps. Can someone help?
I am using module "App Systemizer v17.3.1 by veez221" and "Busybox 1.31.1".
24INVINCIBLE24 said:
I am using PE+ 11 on Moto G6, when I run command "su" and then "systemize" it does not list any apps. Can someone help?
I am using module "App Systemizer v17.3.1 by veez221" and "Busybox 1.31.1".
Click to expand...
Click to collapse
I know your issue has already been solved. But what's the advantage of changing a user app to a system app? The next update installs the APK to /data again, which is the same as an user installed app...
An alternative is to use lucky patcher
Did
24INVINCIBLE24 said:
I am using PE+ 11 on Moto G6, when I run command "su" and then "systemize" it does not list any apps. Can someone help?
I am using module "App Systemizer v17.3.1 by veez221" and "Busybox 1.31.1".
Click to expand...
Click to collapse
Did you find a solution yet? I'm having the same issue on a Samsung S20 running Android 12 - same configuration as yours otherwise.
nacos said:
Did
Did you find a solution yet? I'm having the same issue on a Samsung S20 running Android 12 - same configuration as yours otherwise.
Click to expand...
Click to collapse
We need logs to find an error. It's explained in the thread for app systemizer:
veez21 said:
** Uploading logs
Go to the menu and type `logs`, this will upload the log files of this module and will generate a link.
Click to expand...
Click to collapse
Hi
WoKoschekk said:
We need logs to find an error. It's explained in the thread for app systemizer:
Click to expand...
Click to collapse
Hi, Thanks for the reply. I followed your directions and a file called "bash_history" seemed to have been created under /data/data/com.termux.com/home. Would you like me to post this file here?
Thanks!
nacos said:
Hi
Hi, Thanks for the reply. I followed your directions and a file called "bash_history" seemed to have been created under /data/data/com.termux.com/home. Would you like me to post this file here?
Thanks!
Click to expand...
Click to collapse
yes
Hi
WoKoschekk said:
We need logs to find an error. It's explained in the thread for app systemizer:
Click to expand...
Click to collapse
Hi, Thanks for the reply. I followed your directions and a file called "bash_history" seemed to have been created under /data/data/com.termux.com/home. Would you like me to post this file here?
Thanks!
WoKoschekk said:
yes
Click to expand...
Click to collapse
I had to archive (zip) the file to attach it here. Thanks!
nacos said:
I had to archive (zip) the file to attach it here. Thanks!
Click to expand...
Click to collapse
the file is only 8 bytes in size... not very helpful.
Above I've linked the instructions on how to create logs. Please follow it and post the links you'll create.
WoKoschekk said:
the file is only 8 bytes in size... not very helpful.
Above I've linked the instructions on how to create logs. Please follow it and post the links you'll create.
Click to expand...
Click to collapse
Unfortunately, none of the two suggested methods worked:
1. The generated link indicates ":/data/data/com.termux/files/home" however, there is no data in this folder other than the file I've already uploaded.
2. The alternative path, as suggested in the original thread doesn't contain such folder: "/cache/terminal_debloater-verbose.log".
I believe the reason is the access restriction on /data/data on Android 11 and above. I'm on Android 12 (Samsung S20). MiXPlore appears to be the only root file explorer, I have installed, that can access and read these folders.
Attached screenshots.
nacos said:
Unfortunately, none of the two suggested methods worked:
1. The generated link indicates ":/data/data/com.termux/files/home" however, there is no data in this folder other than the file I've already uploaded.
2. The alternative path, as suggested in the original thread doesn't contain such folder: "/cache/terminal_debloater-verbose.log".
I believe the reason is the access restriction on /data/data on Android 11 and above. I'm on Android 12 (Samsung S20). MiXPlore appears to be the only root file explorer, I have installed, that can access and read these folders.
Attached screenshots.
Click to expand...
Click to collapse
Screenshot #3:
Code:
[CHOICE]: logs
Testing internet connection - OK
Uploading logs
Link: :/data/data/com.termux/files/home #
Last line: After "Link:" there should appear a link like "https://termbin.com/XXX" where you can see the uploaded logs. That's an easy way to provide/share the logs for the dev.
Unfortunately the tool does not create any link for you and I don't know why.
The command "logs" exits the tool. So, you'll get back to your local shell and Termux shows the current directory you are in: /data/data/...
It does not mean you'll find the logs there. It should look like this:
On my device systemizer also stores logs in
/data/local/tmp. Maybe you'll find your logs there.
nacos said:
I believe the reason is the access restriction on /data/data on Android 11 and above.c
Click to expand...
Click to collapse
You are logged in as root. You have no restrictions as root.
nacos said:
I believe the reason is the access restriction on /data/data on Android 11 and above. I'm on Android 12 (Samsung S20). MiXPlore appears to be the only root file explorer, I have installed, that can access and read these folders.
Click to expand...
Click to collapse
Google restricted access for Android 10+ to the directory /storage/emulated/0/Android/data/*. The real path is /data/media/0/Android/data/*. The path /data/data/* is restricted since many years and contains all data of all your apps. Don't mix up the two paths as they are completely different!
What puzzles me is that I have two identical Samsung S20 phones running identical configurations with the exception of OS. One runs Android 10, the other one Android 12. Again, under the *exact same configuration the App Systemizer runs perfectly fine on Android 10 but not on Android 12.
* When I say exact same configuration I mean settings, apps, restrictions, etc. Obviously I do realize that the OS itself constitutes a significant difference.
Also, maybe it's also worth noting that Debloater runs fine on both phones.
nacos said:
What puzzles me is that I have two identical Samsung S20 phones running identical configurations with the exception of OS. One runs Android 10, the other one Android 12. Again, under the *exact same configuration the App Systemizer runs perfectly fine on Android 10 but not on Android 12.
* When I say exact same configuration I mean settings, apps, restrictions, etc. Obviously I do realize that the OS itself constitutes a significant difference.
Also, maybe it's also worth noting that Debloater runs fine on both phones.
Click to expand...
Click to collapse
Did you find the logs in /data/local/tmp? This will answer your questions.
WoKoschekk said:
Did you find the logs in /data/local/tmp? This will answer your questions.
Click to expand...
Click to collapse
Yes, I did! Thanks for suggesting the logs path.
"mount: can't find /data/adb/modules in /proc/mounts"
See attached log.
Finally I solved it. I needed to uninstall the 17.3.1 version and then install the 17.4.1 version through Magisk from here.
I would normally install/update all my modules through Fox Magisk Modules Manager however:
their repository shows version 17.3.1 as the latest one (the one that I've been experiencing problems with) plus,
the downloaded zip file saved from Androidacy repository appears to install only through their own Fox module. I tried installing it both through Magisk and TWRP but it fails.
Once I've installed the version 17.4.1 through Magisk everything works just fine.
Thank you for your support, I do appreciate it!