I have tried both AdAway and AdFree Android on my Nexus and while both seem to work okay on wi-fi, as soon as I use a mobile data connection the ads show as usual.
Has anybody else noticed this?
(I'm rooted etc. btw)
all I can tell is that I've the same experience.
Probably because they both use the hosts file to block ads, which is pretty silly and not very reliable.
Solution: use iptables instead. Get a script like this: http://pgl.yoyo.org/as/iplist.php?ipformat=iptables and put it in your userinit.d. Might have to change the location of the iptables executable for Android.
Thanks, but excuse the amateurish question, but where can I find the userinit.d?
I've extracted a ROM and tried searching for it but with no success.
cmonthegas said:
Thanks, but excuse the amateurish question, but where can I find the userinit.d?
I've extracted a ROM and tried searching for it but with no success.
Click to expand...
Click to collapse
Unfortunately I don't have a Galaxy Nexus yet so I don't know where they put userinit.d and iptables in the new version. I hope to put detailed instructions once I get my GN, but that could be a while....
Haven't checked yet but normally init.d folder is located in...
/etc/init.d
dunno if thats the same as userinit.d though???
right, I've checked in the /etc/init.d folder and there's three files
87calibration
93zipalign
99complete
I doubt it's any of them?
cmonthegas said:
right, I've checked in the /etc/init.d folder and there's three files
87calibration
93zipalign
99complete
I doubt it's any of them?
Click to expand...
Click to collapse
Actually since you are rooted you can just put it in that directory. Doesn't look like it comes with userinit but that's not a big deal, the point of using userinit is so that it lives on /data and not /system so you don't have to replace it everytime you flash /system. Just put the script in there, name it "95firewall", replace the location of the iptables binary in the script (you can find out where iptables lives by typing "which iptables" in the terminal) and chmod and chown it to be the same as the rest of the files in the directory.
Oh yeah and take out "-o eth0" from every line in the script, I don't think Android uses that interface name.
adaway adblocking works fine for me regardless of being on wifi or 3g. I don't really understand why there would be a difference, does it reference a separate host file per interface or something?
bleomycin said:
adaway adblocking works fine for me regardless of being on wifi or 3g. I don't really understand why there would be a difference, does it reference a separate host file per interface or something?
Click to expand...
Click to collapse
I think it may have something to do with proxies. With some SIM cards, Internet access through the cell radio is automatically configured to use a proxy. I've seen this with desktop operating systems: with proxies set up a certain way, domain name resolution bypasses the hosts file completely. Since on Android, this layer is just Linux, it wouldn't surprise me if this is what's happening as well.
Thanks for the input! I'll give it a try after lunch and see what happens.
I tried briefly last night using a custom script in Droidwall, but I couldn't get it to work properly. That would probably be the ideal method as the rules can just be turned on/off easily from within the app, but I'll give this a try first.
I'll update when I've had a go at it.
Cheers!
Ha, well it would appear I can't try it as I'm running a stock rom which doesn't support init.d
I was so used to running a custom rom, I forgot all about that.
I'll probably try installing another rom today or tomorrow - I haven't got time to be reinstalling everything atm
Shodney said:
Ha, well it would appear I can't try it as I'm running a stock rom which doesn't support init.d
I was so used to running a custom rom, I forgot all about that.
I'll probably try installing another rom today or tomorrow - I haven't got time to be reinstalling everything atm
Click to expand...
Click to collapse
Haha, same here...I didn't realize the stock ROM doesn't support it. Darn that sucks.
Okay i've (finally) had chance to have a play with this after installing Revolution rom with init.d support.
I changed the tables and dropped them into init.d, but they aren't being applied and ads are still coming through.
example of what I changed the entries to:
/system/bin/iptables -A OUTPUT -d 1100i.com -j DROP
Click to expand...
Click to collapse
If I try to apply a rule manually using ADB, I get the following error:
FIX ME! implement getgrnam() bionic/libc/bionic/stubs.c:416
Click to expand...
Click to collapse
So I'm stuck
Any ideas?
Related
Hi, after the update to froyo (in my case JP6) i found out the appbrain fast web installer wasn't working anymore. After some reading, it seems that the android_id (which this app uses) is set to a fixed number during the froyo update. This means the app cannot find a unique android_id to send the 'install instruction' to.
Source: http://forum.xda-developers.com/showthread.php?p=8604909#post86049
1. Make sure and backup your /dbdata/databases /com.android.providers.settings /settings.db file
Then in ADB or connectbot type the following
su
cd /dbdata/databases/com.android.providers.settings sqlite3 settings.db
sqlite> insert into secure (’name’, ‘value’ ) values (’android_id’,'device_id_goes_here’);
sqlite> .exit
Reboot
note 'device_id_goes_here’is your 16 digit HEX device ID
Click to expand...
Click to collapse
This fix seems to do the job, but i can't get it to work. Probably because i made a mistake with the usage of su and shell etc.
So i tried to fix it another way and this is how i did it (similar to the other fix):
1) With RootExplorer (or similar) navigate to: /dbdata/databases/com.android.providers.settings/
2) Make a backup of the file (by copying it)
3) Change the permissions of the file (using RootExplorer) ,so that it can be moved/sent to your pc using Dropbox,Gmail,Bluetooth etc. In this example i have moved it to my c:/ folder on windows.
4) When the file is on your pc. Run windows command (cmd) and navigate (using cd) to your /android/tools folder.
5) Execute: 'sqlite3 c:/settings.db
6) Now type in (after sqlite>): insert into secure (’name’, ‘value’ ) values (’android_id’,'device_id_goes_here’);
Note: 'device_id_goes_here' is a random (so you can choose whatever you want) 16 digit number.
7) Type: .exit and close the cmd box.
8) copy the settings.db file back to your phone and move it back to /dbdata/databases/com.android.providers.settings/
Choose yes when overwrite prompt pops up.
9) Reboot your device
10) Register your device using the 'Fast web installer' app on your phone.
11) DONE! You're ok again to install apps OTA using the appbrain market!
Click to expand...
Click to collapse
Note, if you don't know how to do step 4-7, read some articles about how to set up and use adb (since that also contains the sqlite3 tool)
I hope this helps for people having problems with this.
Hanness said:
Hi, after the update to froyo (in my case JP6) i found out the appbrain fast web installer wasn't working anymore. After some reading, it seems that the android_id (which this app uses) is set to a fixed number during the froyo update. This means the app cannot find a unique android_id to send the 'install instruction' to.
Source: http://forum.xda-developers.com/showthread.php?p=8604909#post86049
This fix seems to do the job, but i can't get it to work. Probably because i made a mistake with the usage of su and shell etc.
So i tried to fix it another way and this is how i did it (similar to the other fix):
Note, if you don't know how to do step 4-7, read some articles about how to set up and use adb (since that also contains the sqlite3 tool)
I hope this helps for people having problems with this.
Click to expand...
Click to collapse
Looks good. One question, how do you find out what your original device ID is? I have a UK unbranded GT-I9000... what's the ANDROID ID for that?
Ah, you just make one up. I used SQLite Editor to just edit the file, made up my own number and rebooted. Works fine now. A bit simpler than your suggestion above.
tokyogtr said:
Ah, you just make one up. I used SQLite Editor to just edit the file, made up my own number and rebooted. Works fine now. A bit simpler than your suggestion above.
Click to expand...
Click to collapse
That should indeed be easier
In the post I refer to in the captivate forum, there is mentioned an app to find out your android_id. But to know your original id, you would first have to reflash to an older firmware where the id is not touched. But it is true, you can just make up your own 16digit number. Only some games with online highscores fixed to the id instead of an account could benefit to know your old id, I think.
Worked for me!
Sent from my GT-I9000 using Tapatalk
hum
shud be easier to just download "Android ID Changer" from market after installing sqlite3. does the same trick.. but more user-friendly for people not so comfortable to use adb shell.
trasig said:
shud be easier to just download "Android ID Changer" from market after installing sqlite3. does the same trick.. but more user-friendly for people not so comfortable to use adb shell.
Click to expand...
Click to collapse
Hmm maybe Iḿ retarded, but how do I install sqlite3 to my phone?
No clue what he meant with installing sqlite3, I just downloaded the said Android ID Changer, made up and applied an ID and now Fast Web Installer works just fine.
I don't know if it is just coincidence or due to this, but before that I had tons of "download unsuccessfull" errors with the Market. Downloads failed nine out of ten times. Now, with changed ID, it works flawlessly again! My phone runs on JP6 Voodoo Doctor Edition 2.1.
Thanks for this advice!
I just installed the ID changer, entered a new code and rebooted, but the ID had not changed..
first time i tried it i got an "error editing databases".... do you have to change permissions to the folder/directory for the settings.db?
ukdtweak said:
I just installed the ID changer, entered a new code and rebooted, but the ID had not changed..
first time i tried it i got an "error editing databases".... do you have to change permissions to the folder/directory for the settings.db?
Click to expand...
Click to collapse
same problem here....
The only thing remotely related I could think of is that I had my system folder mounted as R/W with SGS Toolbox. But does that affect dbdata?
Check SGS Toolbox on mine and system was already mounted as RW...
I have tried changing the permissions with Root Explorer, to dbdata etc. but after rebooting, they are back as they were?
Beats me... but I can now confirm that the "download unsuccessfull" errors are back in place. It was just a coincidence after all, and shows that the blame is on Google, not any specific ROM or mod.
Fast Web Installer still worked though, even made it past the "unsuccessfull" barrier.
Wonderful fix!
Hanness, have you considered reporting this to Samsung? I think having the proper Android ID set and retained during firmware updates is quite important.
miki4242 said:
Wonderful fix!
Hanness, have you considered reporting this to Samsung? I think having the proper Android ID set and retained during firmware updates is quite important.
Click to expand...
Click to collapse
According to this, this may be due to ro.serialno not being set in build.prop
trasig said:
shud be easier to just download "Android ID Changer" from market after installing sqlite3. does the same trick.. but more user-friendly for people not so comfortable to use adb shell.
Click to expand...
Click to collapse
Android ID Changer did the trick for me . (I have not done anything with sqlite3.)
I used http://www.dbsoftlab.com/database-editors/database-browser/overview.html to edit settings.db as explained.
Works like a charm. Downloads & Updates are flying in!
Edit: After few downloads it stucks again, I deleted Market data. Works again. Bugs everywhere ...
Hanness said:
Hi, after the update to froyo (in my case JP6) i found out the appbrain fast web installer wasn't working anymore. After some reading, it seems that the android_id (which this app uses) is set to a fixed number during the froyo update. This means the app cannot find a unique android_id to send the 'install instruction' to.
Source: http://forum.xda-developers.com/showthread.php?p=8604909#post86049
This fix seems to do the job, but i can't get it to work. Probably because i made a mistake with the usage of su and shell etc.
So i tried to fix it another way and this is how i did it (similar to the other fix):
Note, if you don't know how to do step 4-7, read some articles about how to set up and use adb (since that also contains the sqlite3 tool)
I hope this helps for people having problems with this.
Click to expand...
Click to collapse
Thank you very much...I followed your instructions exactly and managed to fix it. Android ID changer didn't work for me.
sadly appbrain is blocked in China for whatever reason I don't know... so that won't work for me hehe
stassano said:
sadly appbrain is blocked in China for whatever reason I don't know... so that won't work for me hehe
Click to expand...
Click to collapse
oh well, the great firewall of china at work again.
I am just about to release my new barebones build with a lot of new features but one thing is killing me. I cannot get superuser to work anymore with the latest build and the latest kernel. Rogue tools won't overclock without SU working and that just totall kills the speed of my build =(. The build is based off scoot's release 5 and I am using the latest kernel with and without the module update SU is unaffected. Everything else works though.
What have you changed from the build i sent you that might effect it? Does it work for you with the original build? Things to check are the sysinit.rc, make sure it calls userinit.sh on startup, and also check your userinit.sh in the /bin directory and make sure the su fix is still present in the file Otherwise, try opening the super user app and downloading the latest su binary file, if it fails to install then you most likely have partition permission issues.
I did edit userinit to enable the odex script. I am gonna check that now.
Ok I am pretty sure that was it. how do I add this line to userinit to have it be proper then? /system/bin/odex.sh
aceoyame said:
Ok I am pretty sure that was it. how do I add this line to userinit to have it be proper then? /system/bin/odex.sh
Click to expand...
Click to collapse
You'd need to put it in sysinit.rc like this :
service odex /system/bin/odex.sh
So put that line right at the end then? Or is there a special format it has to go in. Sorry, I have just never had to edit this particular file before lol.
aceoyame said:
So put that line right at the end then? Or is there a special format it has to go in. Sorry, I have just never had to edit this particular file before lol.
Click to expand...
Click to collapse
At the end is fine, you will see some similar lines in there, you may want to add some options such as :
console
user root
oneshot
I don't know what the structure of the odex script is so i don't know which options you will need to get it to run properly but these are the most likely, just experiment and see
I've always put it at the end, after the su fix just as "/system/bin/odex.sh" and nothing else. What does service do? will it run it continuously or just with different permissions?
I would say its more likely that something's gone wrong while you edited userinit.sh, and now it can't be executed.
did you edit it in windows? you may have /n/r line endings now instead of /n
if you did it in linux it may be a permissions problem
fixed! I used the userinit from my old barebones. Something changed in the update. The two looked totally different.
NOTE: Due to the fact that the Jellybean build went smoother and we all want the latest candy anyway, I've scrapped this effort. Get your candy at: http://forum.xda-developers.com/showthread.php?t=1867579
DISCLAIMER: This is a test build. It works for me, and I spent a good bit of time cleaning up the rough edges and fixing a few silly things, but for all I know it will make zombie worms run out of your tab resulting in your untimely death without warning. If you're not comfortable hacking a Galaxy-series android, probably best to wait for the official update from Samsung and be a good compliant end user and update with Kies... If the death star ever lets the ICS update out, that is.
As Cyanogen likes to say on his work in progress repos: MAY EAT YOUR CAT
ALSO: This is wholly unsupported and I have no affiliation with the Cyanogenmod team. If you bug them for help with this, they will send a laser-equipped triangle-shaped monolith of a hovercraft to your location and decimate anything in your general vicinity with insane force and completely reckless abandon. Well, maybe not, but you get the idea. Don't piss off superman.
First, the bad.. I'm going to start a list of what seems broken:
- Camera. Tablet reboots on snapping photo, preview is 90 degrees off.. weird.
- Google Talk: Looks related to the camera problem. All seems to center around some camera effects issue. Talk.apk from the original honeycomb image does work, so if you need google talk, just swap it out.
Taking what I learned from building CM10 for this device, I grabbed the CM9 tree, which is supposedly final now, and built that too. This time, I'm dropping a flashable .zip, since CM9 is "solid" and won't be updated any more. That doesn't mean this is perfect, as Cyanogenmod is only the android framwork -- The dirty low level bits still come from the OEM, and samsung hasn't released those yet, but.. It's good enough for me, so... Maybe it is for you too!
Since AT&T is still jerking around with the official ICS update, worried about their pathetic "value added" software instead of dropping a clean build, there's no official, fully regression tested radio/RIL combo... So I've yanked the RIL from the Note, a very similar device. It seems to work, but may or may not get LTE at first -- Might stick in HSPA mode a bit, might get LTE, it's a little flaky. May work better in your area, may also depend on network conditions. I'm not completely up to speed on cellular tech so the cryptic debug output doesn't say much to me. However, unlike my work with Jellybean, at least the stock radio works on ICS... For me. If you flash this, please share your 3G/4G experience, and be sure to indicate which carrier and area you are in, if you don't mind.
In Settings, Wireless/Network, More..., Mobile Networks... There is a network mode option. Be sure that is set to LTE/GSM, not GSM. In ICS, this setting actually seems to work - In Jellybean, it does nothing.
WiFi should work without any effort, bluetooth too, and it has the phone app, so you can voice call. Video playback works, audio works, GPS works, and I didn't run into troubles with about 10-15 of the more popular apps from the market.
Tether works, and I changed the tether service to hand out the google DNS server (8.8.8.8/8.8.4.4) to clients, because AT&T's DNS tends to be annoyingly slow.
I also noticed stagefright (a video rendering library, among other things) refused to play anything besides the base-quality x264 videos, so I commented out the retarded bailout (return with unspecified error) in stagefright.so, because all the better-quality youtube videos just refused to play with no reason, just a generic error (what a POS) - So have fun watching HD videos on youtube, although some of the top-quality ones (1080) are a bit on the tough side for the GPU to render. Ah well, beats a non-sensical error.
Samsung did already release the 3.0.8 ICS kernel, for the SHV-140, which is the same hardware with a different radio.. That kernel, in it's .config, has an option for the SGH-i957, so I built that and stuffed resulting kernel binary into boot.img, and packed that into the zip. boot.img also enables early ADB, so you can adb shell into it even if the framework completely shats itself, which it sure did before I got the proper production-level Adreno 220 drivers straight from qualcomm into the build. So the main advantage of this build over jellybean right now is an official Samsung kernel built from their unmodified source code and official release Qualcomm GPU driver binaries.
I also changed apns-conf.xml to use the proper "Broadband" APN for AT&T LTE data-only, as is usually sold with these tablets.
To get this going, start with TWRP recovery -- if you don't have it already, visit that thread in this forum and get yourself hooked up, drop the zip in /sdcard, boot into recovery and..
1) Make a complete TWRP backup before you do anything further! (of course)
2) Wipe -> Factory Reset
3) Wipe -> System
4) Install the .zip I'm about to link you to
5) Reboot, receive bacon.
http://d-h.st/W3X
I've not tested everything and anything, and some things may not be fixable until we get the binary bits from Samsung when they drop ICS officially for this device. However, please report any problems you have here. If I can find time to reproduce and fix, you might get lucky
Enjoy! Honeycomb got boring long ago!
Appreciate all the work. I'll hopefully have time to flash tomorrow. Looking forward to dumping honeycomb.
really glad to see developement picking up for this tab!
I never use the camera or the 4G. I'm gonna flash this in the am. Thanks!
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
Flashed and currently running this build. Looks stable enough so far, a couple of FC's but definitely manageable. I know this far fetched but once CM9 gets more stable, will we be able to start porting cm9 based roms? Or can we only port roms created for devices with similar CPU/structures/etc?
Sent from my SAMSUNG-SGH-I957 using xda premium
This is great, thanks for the build. Working great for a 1st edition. From a few minutes playing with it, I noticed that vibrate doesn't work nor does MTP (drivers refuse to install). Not deal breakers and I'm going to use this as my main OS - much better than honeycomb.
I can confirm that this is working very well on rogers, havent tested all functions but my tablet is now 10 times better, currently running Apex launcher. Dont forget to flash gapps for ics....
Something is up with package manager, can't install xda app
Sent from my SAMSUNG-SGH-I717 using xda app-developers app
Confirming difficulty with package manager, for both side loading and loading from the Google Play App. However, if I load from the Google Play website the installation works.
Other than that I'm very impressed by the quality and stability of what you've built here - many thanks.
My package installer seems to work just fine.
70ish apps from the play store installed fine, and a dozen or so non market apps.
Ive had some good success with this rom and my apps are installing as well. I do have a situation where I tried using an update to rom manager and it seemed to have broke my recovery and I cant get it back! I would like to try using twrp and how do I install it? I would flash through odin but I don't have the file :crying:
cottageboy said:
Ive had some good success with this rom and my apps are installing as well. I do have a situation where I tried using an update to rom manager and it seemed to have broke my recovery and I cant get it back! I would like to try using twrp and how do I install it? I would flash through odin but I don't have the file :crying:
Click to expand...
Click to collapse
Yikes! Never good when you lose recovery, that's a bad place to be. I'm assuming you have a working image on the device that isn't locked down? IE the CM9 image and/or a rooted honeycomb image is still functional?
Recovery image at:
https://dl.dropbox.com/u/69488769/twrp_recovery_SGHI957_2.2.1.5.img
From a shell, either via adb or via the terminal, just dd (block copy) the image to the recovery partition
dd if=twrp_recovery_SGHI957_2.2.1.5.img of=/dev/block/mmcblk0p22
That should solve that
dan-htc-touch said:
Something is up with package manager, can't install xda app
Click to expand...
Click to collapse
I'm getting an "Error Processing Purchase" on the xda FREE app?? logcat shows google's server returns HTTP/500
Code:
E/Volley ( 8075): [386] BasicNetwork.performRequest: Unexpected response code 500 for https://android.clients.google.com/fdfe/purchase
HTTP 500 = Server Error
Looks like a problem others have had and may relate to the app caching information it shouldnt?
http://code.google.com/p/android/issues/detail?id=30039
also,
http://forum.xda-developers.com/showthread.php?t=1695519
After clearing the play store's DB, the google services framework database, and removing/readding my google account, the error went away.
Then I got another vague error, which the following text from logcat explained:
I/PackageHelper( 3428): Size of container 5 MB
E/PackageHelper( 3428): Failed to create secure container smdl2tmp1
D/VoldCmdListener( 157): asec create smdl2tmp1 5 fat {} 10012
E/Vold ( 157): Error creating imagefile (Read-only file system)
E/Vold ( 157): ASEC image file creation failed (Read-only file system)
W/Vold ( 157): Returning OperationFailed - no handler for errno 30
E/DefContainer( 3428): Failed to create container smdl2tmp1
Click to expand...
Click to collapse
Anyone know anything about how to configure the ASEC location? I've never delved into ASEC and probably need to configure something in the image to account for handling ASEC transactions.
... Looks like I'll need to tweak a few things in the initial ramdisk to get the asec mountpoint correctly set. Good grief, the freaking thing wants to set up a loopback block device on a tmpfs partition to install an application. That's pretty sad... /hacking it
I'm confused. How do I log into my Google account? Where's "my files" folder?
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
ZX6Chris said:
I'm confused. How do I log into my Google account? Where's "my files" folder?
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
Click to expand...
Click to collapse
You need to flash gapps for ICS for your Google account and apps.
The "my files" app does not exist on AOSP. You will need to download another file explorer.
Excellent work so far!
Snappy and mostly stable it seems.
Clicking on storage under settings causes a FC, the camera is derpy as stated in the op, and an occasional YouTube derp as stated in the op.
No hapatic at all either.
3g/hspa+/4g lte all working perfectly here.
Thanks!!
neubauej said:
Clicking on storage under settings causes a FC
No hapatic at all either.
Click to expand...
Click to collapse
Interesting, I'll check into that, thanks for that!
It Appears haptic feedback works with the keyboard, and on the home screen softbuttons. immvibed is running and doesn't register any complaints -- atleast that's how it is on my tab. does it not work at all for you?
storage FC: It's looking for /storage/sdcard1, the secondary SD card, which doesn't exist, and it has no error handling for this condition, so it explodes with java exception and the Settings process thus dies.. I believe I just need to yank that definition (for non-existent sdcard1) out of the xml for this package and rebuild, will try that next build!
Figured out the package manager issues, needed to mount tmpfs on both /mnt/secure and /mnt/asec and open up the permissions. That's unfortunately an initial ramdisk (root filesystem) hack, which means a new boot image.
attached. if you're not sure what to do with this, probably best to wait until i roll a few more fixes into a fresh flashable zip.. Otherwise, block copy to mmcblk0p8, reboot.
Been fighting with the camera issue, not having much progress there.
Thanks for the feedback, folks!
when im in my file explorer, where do I find the recovery portion?
im assuming that I put the img file there and using terminal emulator run your commands (do i have to type su first)?
nrvate said:
Yikes! Never good when you lose recovery, that's a bad place to be. I'm assuming you have a working image on the device that isn't locked down? IE the CM9 image and/or a rooted honeycomb image is still functional?
Recovery image at:
https://dl.dropbox.com/u/69488769/twrp_recovery_SGHI957_2.2.1.5.img
From a shell, either via adb or via the terminal, just dd (block copy) the image to the recovery partition
dd if=twrp_recovery_SGHI957_2.2.1.5.img of=/dev/block/mmcblk0p22
That should solve that
Click to expand...
Click to collapse
cottageboy said:
when im in my file explorer, where do I find the recovery portion?
im assuming that I put the img file there and using terminal emulator run your commands (do i have to type su first)?
Click to expand...
Click to collapse
There is no recovery partition to find in root explorer.
Just put the image file in your root directory (/sdcard).
Type "su" enter then the command.
I don't remember if you need to do it as a superuser, but it will certainly work if you are.
cottageboy said:
when im in my file explorer, where do I find the recovery portion?
im assuming that I put the img file there and using terminal emulator run your commands (do i have to type su first)?
Click to expand...
Click to collapse
The recovery emmc partition is /dev/block/mmcblk0p22. The dd command block copies the recovery image (twrp_recovery_SGHI957_2.2.1.5.img) from the filesystem to the emmc partition. if= specifies the image to read from, of= specifies the device to write the image to.
The recovery image is a raw partition image.
You will need to be root to do this.
If you're not comfortable operating on the command line, dan offered a apk to do this: http://db.tt/DXtF5iB6 -- from his TWRP thread @ http://forum.xda-developers.com/showthread.php?t=1697610
Finally got time to flash cm9. Block copied the fixed boot image. Running great. Amazing for a first build. Like a new tablet. Thanks!
Well I ran into a little struggle when trying to use the complete Linux installer by default so I thought I would post how I got it to work correctly.
When trying to run by default I got errors stating it could not mount the loop device, it is a very simple
Download the bootscript4-3.sh file from
sourceforge.net/projects/linuxonandroid/files/bootscript4-3.sh/downloadSorry not allowed to hyperlink)
and rename it as bootscript.sh
After you have that file ready move it to the directory /data/data/com.zpwebsites.linuxonandroid/files/ and replace the file that is already in there.
You now have a working CompleteLinuxInstaller app enjoy!
Expressionless said:
Well I ran into a little struggle when trying to use the complete Linux installer by default so I thought I would post how I got it to work correctly.
When trying to run by default I got errors stating it could not mount the loop device, it is a very simple
Download the bootscript4-3.sh file from
sourceforge.net/projects/linuxonandroid/files/bootscript4-3.sh/downloadSorry not allowed to hyperlink)
and rename it as bootscript.sh
After you have that file ready move it to the directory /data/data/com.zpwebsites.linuxonandroid/files/ and replace the file that is already in there.
You now have a working CompleteLinuxInstaller app enjoy!
Click to expand...
Click to collapse
What branch are you running? I mean I want to install Ubuntu, but all the installers say it's really buggy, and to use a different branch.
bobbyphoenix said:
What branch are you running? I mean I want to install Ubuntu, but all the installers say it's really buggy, and to use a different branch.
Click to expand...
Click to collapse
I haven't really toyed around with the different packs of Ubuntu, the only one I have used is the Ubuntu 10.10 version by Linux-on-android, it seemed to run okay, but I have not looked into it.
Expressionless said:
Well I ran into a little struggle when trying to use the complete Linux installer by default so I thought I would post how I got it to work correctly.
When trying to run by default I got errors stating it could not mount the loop device, it is a very simple
Download the bootscript4-3.sh file from
sourceforge.net/projects/linuxonandroid/files/bootscript4-3.sh/downloadSorry not allowed to hyperlink)
and rename it as bootscript.sh
After you have that file ready move it to the directory /data/data/com.zpwebsites.linuxonandroid/files/ and replace the file that is already in there.
You now have a working CompleteLinuxInstaller app enjoy!
Click to expand...
Click to collapse
Hi. Thanks for your efforts. Just a couple questions. Do you need to use a kernel that has SELinux set to permissive. Also, can I just take the ubuntu image file I was using on my GN II and bring it over to my GN 3 to use.
mscion said:
Hi. Thanks for your efforts. Just a couple questions. Do you need to use a kernel that has SELinux set to permissive. Also, can I just take the ubuntu image file I was using on my GN II and bring it over to my GN 3 to use.
Click to expand...
Click to collapse
I am using a kernel with SElinux set to permissive, also any arm based Linux distro should theoretically work, I do no believe they are phone specific. I would recommend the sabrekernel.
Expressionless said:
I am using a kernel with SElinux set to permissive, also any arm based Linux distro should theoretically work, I do no believe they are phone specific. I would recommend the sabrekernel.
Click to expand...
Click to collapse
Ok. Great! So basically once I have appropriate kernel, I then run Linux on Android. It will set up its file structure and I then I replace bootscript.sh and I'm good to go.
EDIT. This bootscript file is from Linux on android project. I wonder if it is going under further testing. Doesn't hurt to try, and, of course, report to them as it is an open project!
Hi guys,
I'm having trouble with the hosts file on my OPO3 and the latest stock firmware.
On Android 6 I booted into TWRP, mounted system and flashed my own hosts file to /system/etc/hosts. This worked fine.
Before updating I to Android 7 I pulled the hosts file and uploaded the same hosts file to android 7. However its getting completely ignored.
I tried various other hosts file, different encoding, blank line at the end of the file, tabs, no tabs, spaces, no spaces, 127.0.0.1, 0.0.0.0 etc but nothing works. If I go back into TWRP and pull the hosts file it actually is the hosts file that I pushed earlier so its not that Android is somehow overwriting the file.
Does anybody know what the problem could be?
PS I am NOT rooted and I don't want to root either.
Thanks
sjaak1234 said:
Hi guys,
I'm having trouble with the hosts file on my OPO3 and the latest stock firmware.
On Android 6 I booted into TWRP, mounted system and flashed my own hosts file to /system/etc/hosts. This worked fine.
Before updating I to Android 7 I pulled the hosts file and uploaded the same hosts file to android 7. However its getting completely ignored.
I tried various other hosts file, different encoding, blank line at the end of the file, tabs, no tabs, spaces, no spaces, 127.0.0.1, 0.0.0.0 etc but nothing works. If I go back into TWRP and pull the hosts file it actually is the hosts file that I pushed earlier so its not that Android is somehow overwriting the file.
Does anybody know what the problem could be?
PS I am NOT rooted and I don't want to root either.
Thanks
Click to expand...
Click to collapse
have you applied proper permissions to hosts file ?
JumboMan said:
have you applied proper permissions to hosts file ?
Click to expand...
Click to collapse
I think so? Didn't set any permissions myself.
C:\android>adb shell
~ # ←]6ngs -l /system/etc/hosts
-rw-r--r-- 1 root root 393105 Jan 27 01:21 /system/etc/hosts
sjaak1234 said:
I think so? Didn't set any permissions myself.
C:\android>adb shell
~ # ←]6ngs -l /system/etc/hosts
-rw-r--r-- 1 root root 393105 Jan 27 01:21 /system/etc/hosts
Click to expand...
Click to collapse
can you post link to hosts file that you are using so that i can try myself to see what is the problem
JumboMan said:
can you post link to hosts file that you are using so that i can try myself to see what is the problem
Click to expand...
Click to collapse
I'm not at home for the weekend so I can't pull the actual file but I used (among others) the one from http://someonewhocares.org/hosts/
Pasted in notepad++ with encoding utf without BOM and EOL Linux encoding. Tried copying it to Windows notepad as well.
I also tried the host file I pulled from my phone before upgrading. I'll upload that one once I get back to my PC. Should still have it somewhere.
sjaak1234 said:
I'm not at home for the weekend so I can't pull the actual file but I used (among others) the one from http://someonewhocares.org/hosts/
Pasted in notepad++ with encoding utf without BOM and EOL Linux encoding. Tried copying it to Windows notepad as well.
I also tried the host file I pulled from my phone before upgrading. I'll upload that one once I get back to my PC. Should still have it somewhere.
Click to expand...
Click to collapse
i would suggest you to upload the hosts file you currently have problem.
JumboMan said:
i would suggest you to upload the hosts file you currently have problem.
Click to expand...
Click to collapse
I've attached the hosts file that I pulled from my Md pushed to my OP3. Can't find the original untouched one from my OP3 anymore but this works fine on my M7 and its practically the same as the file that worked fine on my OP3 on Marshmellow.
sjaak1234 said:
I've attached the hosts file that I pulled from my Md pushed to my OP3. Can't find the original untouched one from my OP3 anymore but this works fine on my M7 and its practically the same as the file that worked fine on my OP3 on Marshmellow.
Click to expand...
Click to collapse
nothing suspicious except encoding.
can you try UTF-8 encoding.
I tried but it makes no difference. Tried notepad++ as well as windows notepad (files made in notepad++ look messed up in windows notepad and vica versa though).
Tried a clean file with just a couple of normal websites on it just for testing but no luck.
Does adjusting the hosts file on the stock nougat rom work for you?
****ing google
sjaak1234 said:
I tried but it makes no difference. Tried notepad++ as well as windows notepad (files made in notepad++ look messed up in windows notepad and vica versa though).
Tried a clean file with just a couple of normal websites on it just for testing but no luck.
Does adjusting the hosts file on the stock nougat rom work for you?
****ing google
Click to expand...
Click to collapse
can you try MOAB (search xda). I am using this on stock oos 328 without any problems.
*edit - also tried on stock oos 402. its working
Finally had some time to try again.
Moab doesn't work either. I ran a packet capture to make sure the ad urls are in the hosts file. They are. That ****ing piece of **** google is simply ignoring the hosts file.
sjaak1234 said:
Finally had some time to try again.
Moab doesn't work either. I ran a packet capture to make sure the ad urls are in the hosts file. They are. That ****ing piece of **** google is simply ignoring the hosts file.
Click to expand...
Click to collapse
Mine works fine but with AdAway.
Great.
Except on that piece of **** of mine this craptastic os is simply ignoring the hosts file. Even if I put in something like 127.0.0.1 cnn.com it won't block ****.
And no I'm not going to root because it breaks banking apps, pokemon go etc. No I'm not going to bother with endless workarounds for that either and finally no unroot does not work and has never worked.
sjaak1234 said:
Great.
Except on that piece of **** of mine this craptastic os is simply ignoring the hosts file. Even if I put in something like 127.0.0.1 cnn.com it won't block ****.
And no I'm not going to root because it breaks banking apps, pokemon go etc. No I'm not going to bother with endless workarounds for that either and finally no unroot does not work and has never worked.
Click to expand...
Click to collapse
I don't know if this is any help but on nougat with adaway app it only works properly when choosing systemless mode , whether or not you can make your hosts file systemless i don't know but i thought I'd mention it to see if it helps you out with the manual way...
sjaak1234 said:
Finally had some time to try again.
Moab doesn't work either. I ran a packet capture to make sure the ad urls are in the hosts file. They are. That ****ing piece of **** google is simply ignoring the hosts file.
Click to expand...
Click to collapse
you sure that data saver option is not on right? else it wont use your host, since it's proxi-ed to google server
otonieru said:
you sure that data saver option is not on right? else it wont use your host, since it's proxi-ed to google server
Click to expand...
Click to collapse
I'm sure that's not on. I've tried Firefox as well and the results are the same. Something weird though is that if I connect to my own vpn server and block a url on the firewall there, somehow chrome still finds a way around it while on Firefox the url will be blocked.
When I got time I'll root and try adaway. It's not really a solution for me as I can't keep root (and unrooting still permanently triggers some apps thinking the phone is rooted) but at least it it should narrow down the problem.
I cannot be the new dm verity in android 7 right? Somehow ignoring files that have been changed? I obviously do get that error/warning during boot because I changed the system partition.
@sjaak1234
Hi
I can confirm that my hosts file has been working fine on
OOS 3.2.8 to 4.0.3
CB5 to OB12
H2OS 7.0 & 7.1.1
So nothing wrong (as yet) with Android OS or Google or even OnePlus. I can share my hosts file if you want to try.
Two suggestions:
use Aroma File Manager to replace hosts file and set permission (644 or rw-r-r).
Use Magisk for root as well working banking apps (MagiskHide).
Good luck :good:
Have you tried creating a symlink to data/hosts?
In order to make adfree android the symlink is required,
Maybe the symlink is also needed to make the hosts file work without the app
https://forum.xda-developers.com/showpost.php?p=64554262&postcount=978
Maybe this also helps your cause