Possible URL location for 1.1 OTA updates - Nook Color General

Since I can't post to the development forum, I'll have to post here.
But I think I may have found the web address that the Nook looks for it's OTA updates.
I was exploring in root explorer and came across this:
/data/data/com/bn.devicemanager/databases/devicemanager.db
Looks like this database is what determines OTA updates.
under registry, there is an entry that has a description of "URL for checking for updates" and gives a value of h**ps://csqaint.barnesandnoble.com/bncloud/serciceG
Should be h**ps://csqaint.barnesandnoble.com/bncloud/serviceG
There is another entry that has a description of "URL to get other URLs" which is h**ps://bncs.barnesandnoble.com/bncloud/prefServlet
I typed that url into my desktop browser:
Code:
PREF,BNCLOUD_URL,https://bncs.barnesandnoble.com/bncloud/serviceD?version=1
PREF,BNCLOUD_OAUTH,https://bncs.barnesandnoble.com/bncloud/oauthpage/BnOAuthMgmt.jsp
PREF,BNCLOUD_URL_UPLOAD,https://bncs.barnesandnoble.com/bncloud/multiPartUpload.do
PREF,AKAMAI_ENV,Cloud
PREF,BNCLOUD_INSTORE_URL,https://bncsis.barnesandnoble.com/bncloud/serviceDI
PREF,BNCLOUD_URL_UPLOAD_V2,https://bncs.barnesandnoble.com/bncloud/RESTUpload
PREF,INSTORE_ENVID,001
PREF,HEARTBEAT_INTERVAL,15
I'm a total noob when it comes to Android. Maybe this will help?
Perhaps we can change the website that it looks for the updates, or even change the the FOTA operation mode entry to false.

Not sure if the urls that you list are indeed where it looks, but you can simply modify the hosts file to include
127.0.0.1 csqaint.barnesandnoble.com
Located at /etc/hosts

I added "bncs.barnesandnoble.com" into my home router to block access from my network. Any others?

Related

Block BN OTA Updates the EASY way!!!

First, I'm sorry if this is posted somewhere already. I spent numerous hours trying to block OTA updates following a post under Android Development... Link to post.
Having played with adb for hours and not being able to get sqlite working in cmd. I tried browsing to the file the script in the above post appeared to be editing with Root Explorer. To my surprise, when you click on the devicemanager.db file, Root Explorer gives you an option to buy SQLite Editor. Which I did.
Required Apps:
- Root Explorer (in market)
- SQLite Editor (in market)
Process:
1. Open Root Explorer
2. Open devicemanager.db from (/data/data/com.bn.devicemanager/databases/devicemanager.db)
3. Select "registry" - this should open up a spreadsheet looking file
4. Find row: com.bn.device.fota.mode
5. Drag over to the column labeled "value"
6. Press and hold "auto" until the "Actions" window pops up
7. Select "Edit Field"
8. Replace auto with manual
9. Select "Save"
Assuming this is what the scripts are doing, your nook color should now be blocking BN OTA updates. The best part is that you can do all of this from your nook color. Hope this helps!
RootNewbie said:
First, I'm sorry if this is posted somewhere already. I spent numerous hours trying to block OTA updates following a post under Android Development...
Click to expand...
Click to collapse
Really? Or push a modified build.prop, done... *shrug*
Thats actually a good find because for a minute we were all sweating losing root over the 1.1.0 update.
khaytsus said:
Really? Or push a modified build.prop, done... *shrug*
Click to expand...
Click to collapse
Correct me if I'm wrong. I'm still a beginner. I thought I read threads where people were still getting the OTA update after editing/replacing the build.prop ... Plus, what happens when BN decides to release a new update? You would then have to change the build.prop again? Editing the registry value should prevent the device from ever checking for new updates. Seems like a cleaner fix to me.
RootNewbie said:
Correct me if I'm wrong. I'm still a beginner. I thought I read threads where people were still getting the OTA update after editing/replacing the build.prop ... Plus, what happens when BN decides to release a new update? You would then have to change the build.prop again? Editing the registry value should prevent the device from ever checking for new updates. Seems like a cleaner fix to me.
Click to expand...
Click to collapse
Nobody I'm aware of, including my two NC's. Perhaps you're confusing updating the build.prop with renaming the otacerts file?
http://forum.xda-developers.com/showthread.php?t=930382
RootNewbie said:
First, I'm sorry if this is posted somewhere already. I spent numerous hours trying to block OTA updates following a post under Android Development... Link to post.
Having played with adb for hours and not being able to get sqlite working in cmd. I tried browsing to the file the script in the above post appeared to be editing with Root Explorer. To my surprise, when you click on the devicemanager.db file, Root Explorer gives you an option to buy SQLite Editor. Which I did.
Required Apps:
- Root Explorer (in market)
- SQLite Editor (in market)
Process:
1. Open Root Explorer
2. Open devicemanager.db from (/data/data/com.bn.devicemanager/databases/devicemanager.db)
3. Select "registry" - this should open up a spreadsheet looking file
4. Find row: com.bn.device.fota.mode
5. Drag over to the column labeled "value"
6. Press and hold "auto" until the "Actions" window pops up
7. Select "Edit Field"
8. Replace auto with manual
9. Select "Save"
Assuming this is what the scripts are doing, your nook color should now be blocking BN OTA updates. The best part is that you can do all of this from your nook color. Hope this helps!
Click to expand...
Click to collapse
Thanks for posting this. I'm sure it will help someone out. It would have been me a week or two ago. I was trying to figure out how to change this value to avoid the OTA and really didnt understand ADB, SDK, Sqlite or any of that then. when i first opened Root explorer i remember it asking me if i would like to purchase it and i declined, now if i only would have known how easy it could have been.
RootNewbie said:
Correct me if I'm wrong. I'm still a beginner. I thought I read threads where people were still getting the OTA update after editing/replacing the build.prop ... Plus, what happens when BN decides to release a new update? You would then have to change the build.prop again? Editing the registry value should prevent the device from ever checking for new updates. Seems like a cleaner fix to me.
Click to expand...
Click to collapse
I agree. Changing the setting in devicemanager.db is A LOT cleaner than the build.prop fix.
I just use a task killer and kill the B&N stuff... No updates here..
redking79 said:
I agree. Changing the setting in devicemanager.db is A LOT cleaner than the build.prop fix.
Click to expand...
Click to collapse
Considering this is how all Android OTAs are determined.... eh, whatever floats your boat
Slightly off-topic: I made this change (in devicemanager.db) to disable B&N updates. Whilst in the database, I noticed a table called Tasks that has 5 entries with types 100, 101, 102, 3, 2. The types 100 & 2 are tagged as enabled, the others are disabled. They have a date_next_run column. I imagine this is some kind of scheduling. I haven't worked out the date format. Does anyone know what these tasks will do - I would imagine one of them forces a B&N update?
RootNewbie said:
Process:
1. Open Root Explorer
2. Open devicemanager.db from (/data/data/com.bn.devicemanager/databases/devicemanager.db)
3. Select "registry" - this should open up a spreadsheet looking file
4. Find row: com.bn.device.fota.mode
5. Drag over to the column labeled "value"
6. Press and hold "auto" until the "Actions" window pops up
7. Select "Edit Field"
8. Replace auto with manual
9. Select "Save"
Click to expand...
Click to collapse
Thank you for this- It's nice to find a nice, easy, self-contained way to ensure my NC will stay the way I have set it up 'til I decide otherwise.
One question though- to make it stick shouldn't there be one more step-
10. Reboot?
Block OTA updates
Xboxexpert has posted a bat file for download in a zip file Block updates.zip. Has anyone used this?
I need instructions regarding running the bat file.
Do I load the contents of the zip file on my SD card or do I open a command prompt box?
What do I do to run this bat file?
Thank you.
I can't get the "actions" window to pop up.
Wow this is an awesome find. Can anyone verify that this did indeed work for them? I have my rooted NC running 1.1 smoothly with all apps running perfectly. My final task is to stop OTA's from triggering. I don't feel confident doing this via ADB but using this method on the NC seems easy. Does this sound the same thing as the bat file does from the other thread? Thank you all for your amazing help!
Followed the process listed here... so far so good, no resets.
I have been through this 4 times so far and have been unable to get it to stick. I have backed up the rom after installing sqllite and root explorer, modded the registry, rebooted and still getting the damn OTA. Anyone else having this issue or has figured out if there is another entry that needs to be edited to defeat this?
Nm, I edited the url that the fota uses to check for updates so it is "dead"
backedup the rom again and have yet to see fota from BN. *fingers crossed as this is annoying*
****NM this didnt work either****
http://forum.xda-developers.com/showthread.php?t=930382
Thanks khaytsus! I do believe that has done the trick. I went ahead and edited the build.prop versus pushing it but we will see how it fairs now that i have hit wifi back on
Does this method still works to prevent 1.2 ota update? it surely looks the easiest method of all.
Yes or no?

[Q] How to delete preloaded bookmarks? PERMANENT SOLUTION FOUND!!!

EDIT: SOLUTION FOUND!!! HERE (see also the P.S.: Disabling Fast Dormancy on v20s stock)! and file download HERE (Keep in mind this file was for v10E Europe Open)!
After I made the upgrade on the new 10E European Open, the browser keeps getting it's homepage to live.vodafone.com, and a bunch of vodafone bookmarks keep appearing after every phone reset.
I managed to delete them with "Bookmarks Manager", but they keep appearing on reboot, what's worse, they don't work, the pages are not loading and is driving me crazy.
I tried deleting browser.db, setting read only flag to 0 in browser.db for the selected bookmarks with sqlite editor and then deleting, everything, I just can't get rid of these bookmarks once and for all!
Please help!
Maybe if I do some wipe data on some system APP will solve the problem (with Titanium Backup), but wiping the data for the browser doesn't do the trick (only temporary fix)
P.S. Bookmarks Manager was a very good solution for Orange Bookmarks on older firmware, but these VODAFONE ones are very persistent! I tryed an ORANGE sim and the same situation happens but with Orange Bookmarks, once phone reboots, the damn bookmarks get resurrected!
I think these bookmarks are stored somewhere in a file and once phone reboots are read and automatically created... It's very annoying because even my homepage gets changed everytime phone reboots...
Some more info:
I don't want to let this die, here is my experience:
Before I used 10B Orange Romania, and once the bookmarks were deleted, they dissapeared forefer, but maybe because that firmware is (was) intended only for orange phones, so, in truth the phone didn't needed to "PUSH" new bookmarks on reboot.
This only happens with 10E European - OPEN, because, probably being a OPEN firmware it's actually supposed to support all carriers, so maybe the phone scans the sim for carrier name and automatically PUSHES the HOMEPAGE and BOOKMARKS...
I'm in the process of testing this theory with NO SIM, it should NOT push any bookmarks in this case... And what do you know... I'm right, with no SIM, there are no bookmarks loaded! Insert a phone sim and that carriers bookmarks get pushed on the phone! Even the homepage stays untouched!
Could we use this info to trace the program that does this??? if yes HOW?
Try bookmarkymark (free in Market), it got rid of my preinstalled bookmarks, too.
HTH!
I can delete them, the problem is how to make them stay deleted... They come back on every reboot!
Same problem with my P970 on a Red Bull Mobile contract.
NEW INFO and SOLUTION!!!
quyTam said:
@valakinaki & @mihaiolimpiu
and all those who have problem with operator bookmark.
I've got the same problem with a previous rom version, LG black loads operator bookmark from sim card ! è.é
finally (after trying frezing all services), I've found the service who cause that !!
"FlexProvider"
After freezing this service, the problem is solved (but freezing this service crash the default SMS app, so I have to use Handcent)
Click to expand...
Click to collapse
Ok, so I found this service resides in:
/data/data/com.lge.providers.flex/
/lib/ dir is empty
/databases/ has two files:
error_report.txt and flex.db !!!Every info for this is stored in that file and by editing this file we might find the answer!!
EDIT:
Yes, indeed the database has all the bookmarks and nasty homepage stored, the problem is that every modification to the file brings flexproviders service to FORCE CLOSE...
PROBLEM FIXED!!! JUST SET read/write for Owner/Group/ALL after you copy the file over!
You will need to have ROOT access to copy the file!
I used http://sqliteman.com/ to edit the file, the info needed is in the table flexinfo:
BRW_SETTINGDB_HOME_URL_I: browser homepage <-SET TO WHATEVER YOU WANT!
BRW_SETTINGDB_CURRENT_HOME_URL_I: current browser homepage <-SET TO WHATEVER YOU WANT!
BOOKMARKDB_CNT: how many bookmarks are loaded from database <-SET TO 0!!! YAY!!!!
BOOKMARKDB_NAME_1_I: name of bookmark <-just ignore if BOOKMARKDB_CNT is set to 0
BOOKMARKDB_URL_1_I: url of bookmark <-just ignore if BOOKMARKDB_CNT is set to 0
FIRST you have to go to the table flexoperator, and find your operator index - OPERATORKEY, for example ORANGE RO is 115!
Then go to flexinfo to operator index you want and find above fields and modify accordingly!
THANKS quyTam for the hint... I couldn't do it without the info you provided!!!
P.S.: Flex.db can be used to disable Fast Dormancy on Gingerbread 20s stock rom, and maybe other Roms:
On v20s, add the requested line to build.prop ro.ril.fast.dormancy.rule=0 and editing flex.db in /data/data/com.lge.providers.flex/ and setting datacom_fastdormancy from 10 to 0 for your operator... tested, fully working, phone now is taking 36-48 hours to fully discharge in stand by mode, from 16-24 hours MAX!
Keep in mind that I had two operators, and with one of them the fix was not needed, the battery problem only occured when I changed Networks!
Or you could use this SQL commands to alter the entire file:
SELECT flex_name, operator_index, user_values, default_values FROM "main"."flexinfo" WHERE flex_name LIKE '%BRW_SETTINGDB_CURRENT_HOME_URL_I%' OR flex_name LIKE '%BRW_SETTINGDB_HOME_URL_I%';
update "main"."flexinfo" SET user_values = "http://www.google.com" where flex_name LIKE '%BRW_SETTINGDB_CURRENT_HOME_URL_I%' OR flex_name LIKE '%BRW_SETTINGDB_HOME_URL_I%';
update "main"."flexinfo" SET default_values = "http://www.google.com" where flex_name LIKE '%BRW_SETTINGDB_CURRENT_HOME_URL_I%' OR flex_name LIKE '%BRW_SETTINGDB_HOME_URL_I%';
SELECT flex_name, operator_index, user_values, default_values FROM "main"."flexinfo" WHERE flex_name LIKE '%BOOKMARKDB_CNT%';
update "main"."flexinfo" SET user_values = 0 WHERE flex_name LIKE '%BOOKMARKDB_CNT%';
update "main"."flexinfo" SET default_values = 0 WHERE flex_name LIKE '%BOOKMARKDB_CNT%';
or download this already edited file and copy over yours (every operator has no bookmarks, and every homepage set to google.com )! I didn't tested the file but it looks ok... I tested only the file I edited for myself! I grabbed the file from EUROPEAN v10E OPEN.
Copy the file over to /data/data/com.lge.providers.flex/databases/flex.db
Don't forget to change permissions on the copied file or you will get a Force Close bonanza!
cool, thank you for analysing it (my method was a little bit "rough" ^^')
I'll try your file.
Please post feedback, I searched the web high and low for a solution to this problem, I'm so excited I finally got my phone back clean and tidy ...
Permissions?
I'm an Android noob...how do you set 'permissions' and what should they be set to for this?
With file manager of choice
Use your file manager of choice to set the right file permissions, I use file expert (search for it on market) which is free, has root support and overall is a g great alternative to astro or root explorer...
The permissions need to be set so that the file sistem has read/write permission to the file, when you copy the file on sd card (like me) the permissions are all screwed up...
Remember, that to do this hack, your phone has to be rooted to have write access to system partition...
mihaiolimpiu said:
Ok, so I found this service resides in:
/data/data/com.lge.providers.flex/
/lib/ dir is empty
/databases/ has two files:
error_report.txt and flex.db !!!Every info for this is stored in that file and by editing this file we might find the answer!!
...
Click to expand...
Click to collapse
Thanks for the solution, I copied your flex.db file to my phone. However I only see /data/ not /data/data/ .
Do I need to be rooted to do this? Sorry but this is my first android phone...
Edit: only see now that it has to be rooted.. thanks.
Yeah it's my second android HOWTO, and I'm learning how to write it along you... I think I made pretty good explanations, but at the moment it's all scattered around, I'll try to make a point by point tutorial, and will edit one of the posts to make it easier to understand and apply on your phone!
Yeah, the phone has to be ROOTED, and if you try to apply this patch to another phone (other than LG O Black) first you have to find your flex service, on motorola I think the database is stored in /data/bla bla flex or something, other manufacturers have different names for the flex service, or they didn't made the bookmarks permanent and you simply don't need this hack!
The /data/data/com.lge.providers.flex/databases/ dir is on system partition, that you normally don't even see if your phone isn't rooted!
BE CAREFULL, this flex database has other info stored in there, practically it configures your whole network, and if you encounter problems , maybe it's better do edit the database by hand, I provided the full SQL command to do that on your PC...
mihaiolimpiu said:
Yeah it's my second android HOWTO, and I'm learning how to write it along you... I think I made pretty good explanations, but at the moment it's all scattered around, I'll try to make a point by point tutorial, and will edit one of the posts to make it easier to understand and apply on your phone!
Yeah, the phone has to be ROOTED, and if you try to apply this patch to another phone (other than LG O Black) first you have to find your flex service, on motorola I think the database is stored in /data/bla bla flex or something, other manufacturers have different names for the flex service, or they didn't made the bookmarks permanent and you simply don't need this hack!
The /data/data/com.lge.providers.flex/databases/ dir is on system partition, that you normally don't even see if your phone isn't rooted!
BE CAREFULL, this flex database has other info stored in there, practically it configures your whole network, and if you encounter problems , maybe it's better do edit the database by hand, I provided the full SQL command to do that on your PC...
Click to expand...
Click to collapse
Hi, okay so I've just rooted and verified that it is rooted. I would rather want to use the file you provided.
I installed file expert, renamed my flex.db to "flex.db old" (so I have a backup) and copied your flex.db into /data/data/com.lge.providers.flex/databases/ then changed the permissions to read and write for owner and group.
But when I open the browser it still opens the default home page, I thought it should open google.com.
Am I missing something? Thanks for the help so far.
You are right, it should open www.google.com!
Restart your phone... and the new file should be loaded! or maybe you could have that page open in a new window in browser (Navigator), try closing all browser windows to auto load homepage.
Oh, I remembered, some Operators, don't make their homepages PERMANENT, so maybe it's enough to change the homepage??? I don't know yet hot to remove PERMANENT HOMEPAGE... this is why I set them all to www.google.com!
Q: What about perma - bookmarks are they gone?
If it still opens default page please post feedback with country and operator, and I'll check the file for errors! or if it needs adding some setting if let's say your operator isn't listed!
YOUR FEEDBACK is very, very, very important, because I can only test 2 networks, and from my tests this is all I can do, maybe a setting is different for your operator, I didn't changed anything else (things I don't know what they do - that would be stupid no?).
I rebooted shortly after my previews post but to my horror the "force close" message appeared and I had to keep on dismissing it.
I managed to get into the file manager and delete your flex.db that I copied. It seems like it created a new flex.db when I rebooted again.
The "force close" problem is gone now but I am still stuck on the default home page.
The "force close" issue has something to do with permissions right?
I used the same permissions as the flex.db file that was there in the first place:
read and write for owner and group...
The "force close" thing scared me, it just kept on popping up again and again. I almost thought I bricked my phone.
Edit:
perma links? don't think I have any.
Yeah, the force close message appears if permissions are not set right... It needs read/write for Owner/Group/ALL!!!
I will test the file myself right now to make shure it all works OK! just wait a few sec and I'll post the test result!
Ok, I tested the file, checked all permissions -> phone rebooted, everything works as it should! Homepage set to google.com, no bookmarks anywhere!
Keep in mind I have V10E Europe Open, maybe if you have another firmware you need to manually modify your file... I'm not going to do a reflash just to test ... but, if you still get that FC message, just delete the file and it will go away.. Yeah, I know it's scary but keep it cool and you can fix it quickly by deleting the file!
If you want just open the file on your PC side and see how yours and mine looks.. or check for a VERY different size of the file, if there is a VERY BIG difference, chances are that your service loads a different kind of file and then only solution is to do it manually!
I uploaded a screenshot, see the homepage set to google.com, and only my bookmarks, not even one operator bookmark in sight!
mihaiolimpiu said:
Yeah, the force close message appears if permissions are not set right... It needs read/write for Owner/Group/ALL!!!
...
Click to expand...
Click to collapse
Success! I just needed to add permissions to ALL.
Thanks for the help. I am running Android 2.2.2 V10a.
I just test your DB, it works perfectly !
I think I'm on v10c (Nova Rom), with Belgian provider.
And I don't have given permission to "All", only to "Owner" and "Group" (as the original file).
Thank you very much !
I'm very happy to hear this! Thank you!
I also found out, that every carrier pushes 4 or more RSS adresses for an RSS reader??? have you been bothered by this?? does it need changing?
I think the most common are Engadget, CNN, and 2 more...
More detail on my work:
I searched the database, there are two values regarding browser homepage per carrier, (FROM MEMORY) browserdb_homepage_default_i and browserdb_homepage_current_i, I tried putting {NULL} there, deleting the value, a space, anything, it just doesn't let you change the homepage permanently. On boot it gets overwritten by some default android address (still google.com but more chars), so I decided to give it a rest for the moment.
I'm pretty happy with the results, this would of been great, but, in whole sincerity, who uses a different page different from a good search engine?
So, just consider the file I provided version 1.0!

[HOWTO] Emulate a Chromecast update check

For those of you who have a need for the URLs of new Chromecast updates without actually updating your device, you can manually perform a checkin by POSTing the following XML to https://tools.google.com/service/update2 (make sure to set Content-Type to text/xml):
Code:
<?xml version="1.0" encoding="UTF-8"?>
<o:gupdate xmlns:o="http://www.google.com/update2/request" version="GoogleTvEureka-0.1.0.0" updaterversion="GoogleTvEureka-0.1.0.0" protocol="2.0" ismachine="1">
<o:os version="3.0.8" platform="Linux" sp=""></o:os>
<o:app appid="{45ab3f62-be86-44be-9799-faa6a1229396}" version="12940" lang="en-US" track="stable-channel" board="eureka-b3"
hardware_class="">
<o:updatecheck targetversionprefix=""></o:updatecheck>
</o:app>
</o:gupdate>
The fields are pretty self-explanatory. If you use Linux, you can save the XML to a file called update2.req and make the request using the command
Code:
curl -s https://tools.google.com/service/update2 -d [PLAIN]@update2.req[/PLAIN] -H 'Content-Type: text/xml'
Note: build 13300 is rolling out slowly, so don't complain if you don't get the URL right away. It's entirely up to Google who gets it and who doesn't.
anyone gotten this yet and unpacked it to see what files have changes made to them?
Thank you! I wish I would have seen this sooner.
Now, with a little bit of python, I can automate the making of my rooted images
Ashcunak said:
anyone gotten this yet and unpacked it to see what files have changes made to them?
Click to expand...
Click to collapse
Here's the update if anyone wants it...
http://wreckage.johndenverschooloff....1f63ef63d1f43c6222116806e5bea38a47e9f124.zip
dev-channel ota?
Any idea how to get the dev-channel update zip?
I tried changing to track="beta-channel" in the xml, but that doesnt help.
It seems like there should be atleast one zip file for the below channels
stable-channel
beta-channel
canary-channel
dev-channel
developer-channel
dogfood-channel
Also found this interesting link in the updater binary.
http://omaha.sandbox.google.com/service/update2
morchu said:
Any idea how to get the dev-channel update zip?
I tried changing to track="beta-channel" in the xml, but that doesnt help.
It seems like there should be atleast one zip file for the below channels
stable-channel
beta-channel
canary-channel
dev-channel
developer-channel
dogfood-channel
Also found this interesting link in the updater binary.
http://omaha.sandbox.google.com/service/update2
Click to expand...
Click to collapse
As far as I can tell, none of those channels (except for beta which seems to just be an alias for stable) are active for a stock device. I'm guessing that to receive updates from those channels, your device has to be configured to send its serial number, which also has to be whitelisted on Google's servers. If you want to send a request with a serial number, just add a line like
Code:
serial_num="XXXXXXXXXXXX"
after line 4 (<o:app ...) in the XML. Unless you have access to a development unit's serial number, I doubt it will do much good though.
I had requeseted for whitelisting my device some time back. But never got a response from google.
Can anybody who already had their device whitelisted try the download using your device serial number, and let me know if it works?
I dont think there is anything device specific in the dev-channel system image. So I wonder why that system image is not shared already?
tchebb said:
As far as I can tell, none of those channels (except for beta which seems to just be an alias for stable) are active for a stock device. I'm guessing that to receive updates from those channels, your device has to be configured to send its serial number, which also has to be whitelisted on Google's servers. If you want to send a request with a serial number, just add a line like
Code:
serial_num="XXXXXXXXXXXX"
after line 4 (<o:app ...) in the XML. Unless you have access to a development unit's serial number, I doubt it will do much good though.
Click to expand...
Click to collapse
Just to conclude, it seems like there is no more separate dev-channel firmware download. Emulated my whitelisted devices update request, and received the regular stable-channel update.
morchu said:
I had requeseted for whitelisting my device some time back. But never got a response from google.
Can anybody who already had their device whitelisted try the download using your device serial number, and let me know if it works?
I dont think there is anything device specific in the dev-channel system image. So I wonder why that system image is not shared already?
Click to expand...
Click to collapse
If you are on Windows, then use same XML update2.req file, as @tchebb on 1st post and download cURL for Windows here.
Then use following command, since Linux one is not working in Windows (just place update2.req file in same directory as curl.exe):
Code:
curl -k https://tools.google.com/service/update2 -d @update2.req -H "Content-Type: text/xml"

[TUTORIAL] Block ads in Youtube apk (without xposed)

*edit
seems like it no longer works with updated youtube apk.
but give it a go anyway
hi guys
this is a simple trick which uses editing of hosts file to block youtube ads. works on KK, CM, AOSP JB etc.
i know alot of people use xposed and adblock and what not to block ads in youtube or use alternative youtube apps
however if you hate using 3rd party programs then this thread is for you.
Requirements*
-rooted phone
- file manager with root access (ie Root explorer, ES, CM file Manager etc)
- either edit hosts file manually or download my hosts file and push it to system/etc
-reboot
copy and paste the following into the hosts file and reboot (please note hosts file has no extension so DO NOT rename it to .txt, or .doc or anything like that, jsut leave it without any extension)
Code:
127.0.0.1 https://googleads.g.doubleclick.net/*
127.0.0.1 https://pubads.g.doubleclick.net/*
127.0.0.1 https://ad.doubleclick.net/*
127.0.0.1 https://s0.2mdn.net/ads/*
127.0.0.1 http://pagead2.googlesyndication.com/pagead/*
127.0.0.1 http://stats.tubemogul.com/stats/*
127.0.0.1 http://pubads.g.doubleclick.net/*
127.0.0.1 http://googleads.g.doubleclick.net/*
127.0.0.1 ##div.video-ads html5-stop-propagation
127.0.0.1 ##div.pyv-afc-ads-inner
127.0.0.1 youtube.com###osd-id
or alternatively
downlaod and push https://mega.co.nz/#!Hsg2iTSI!pCNvYDEtoUQzoDWCGqwKjiSopsUBQLxgWVFet1npir8
this to system/etc
Click to expand...
Click to collapse
or simply install adaway ...
mrassol said:
or simply install adaway ...
Click to expand...
Click to collapse
Or simply read?
i know alot of people use xposed and adblock and what not to block ads in youtube or use alternative youtube apps
however if you hate using 3rd party programs then this thread is for you
Click to expand...
Click to collapse
So you have no problem with 3rd party apps so clearly this thread is not intended for you... Some people do or just want to learn how to do things manually, this is xda DEVELOPERS after all...
Not sure why I'm even bothering to reply to a troll
This is nice
It isnt easily detected from sites when you edit the hosts, nice work!
Sent from my D6503 using XDA Premium 4 mobile app
adamsmth663 said:
hi guys
this is a simple trick which uses editing of hosts file to block youtube ads. works on KK, CM, AOSP JB etc.
i know alot of people use xposed and adblock and what not to block ads in youtube or use alternative youtube apps
however if you hate using 3rd party programs then this thread is for you.
Requirements*
-rooted phone
- file manager with root access (ie Root explorer, ES, CM file Manager etc)
- either edit hosts file manually or download my hosts file and push it to system/etc
-reboot
copy and paste the following into the hosts file and reboot (please note hosts file has no extension so DO NOT rename it to .txt, or .doc or anything like that, jsut leave it without any extension)
Code:
127.0.0.1 #https://googleads.g.doubleclick.net/*
127.0.0.1 #https://pubads.g.doubleclick.net/*
127.0.0.1 #https://ad.doubleclick.net/*
127.0.0.1 #https://s0.2mdn.net/ads/*
127.0.0.1 #http://pagead2.googlesyndication.com/pagead/*
127.0.0.1 #http://stats.tubemogul.com/stats/*
127.0.0.1 #http://pubads.g.doubleclick.net/*
127.0.0.1 #http://googleads.g.doubleclick.net/*
127.0.0.1 ##div.video-ads html5-stop-propagation
127.0.0.1 ##div.pyv-afc-ads-inner
127.0.0.1 youtube.com###osd-id
or alternatively
downlaod and push https://mega.co.nz/#!244n0CTJ!SC3nPlmtmt1i2d4R2z9txPSM6aIYwASihoAqxKorFB8
this to system/etc
Click to expand...
Click to collapse
I went on etc/hosts file on ES File Manager and tried to edit it. Copied this and pasted on it but it won't save. I have root and ES File Manager has root permissions... This is weird.
V4LKyR said:
I went on etc/hosts file on ES File Manager and tried to edit it. Copied this and pasted on it but it won't save. I have root and ES File Manager has root permissions... This is weird.
Click to expand...
Click to collapse
if it wont save then it means you might not have full root, try running the latest easy root again..
adamsmth663 said:
if it wont save then it means you might not have full root, try running the latest easy root again..
Click to expand...
Click to collapse
But Root Checker says I have full root... :laugh: Really weird.
I downloaded host file push to system/etc
And reboot but it looks not working when I try to watch YouTube there still have ad
Do I need to change permission?
Sent from my D6503 using XDA Free mobile app
paullu said:
I downloaded host file push to system/etc
And reboot but it looks not working when I try to watch YouTube there still have ad
Do I need to change permission?
Sent from my D6503 using XDA Free mobile app
Click to expand...
Click to collapse
try removing the # infront of each address listed
if that dosent work
download this host file it has 1000's of adddresses listed
https://mega.co.nz/#!Hsg2iTSI!pCNvYDEtoUQzoDWCGqwKjiSopsUBQLxgWVFet1npir8
try pushing this to system/etc (its 1.3 mb, the old file is 20kb, so you should be able to tell now if it has been pushed to the correct folder)
mrassol said:
or simply install adaway ...
Click to expand...
Click to collapse
adaway doesn't seem to block ads from the updated version of YouTube apk.
I've event tried adding the http listed here in my blacklist in adaway, reboot and still didn't work.
had to open the host list and add this list in manually for it to finally block ads in the YouTube apk.
"#" cannot be read by system. You should remove them from links. Also last entry blocking directly Youtube.com
dilldoe said:
adaway doesn't seem to block ads from the updated version of YouTube apk.
I've event tried adding the http listed here in my blacklist in adaway, reboot and still didn't work.
had to open the host list and add this list in manually for it to finally block ads in the YouTube apk.
Click to expand...
Click to collapse
Does this mean it worked? I've tried using YouTube Adaway (Xposed Module) + Adaway and still had ads in the original YouTube application.
I manually added the hosts to d away black list (since the actual file is too large to edit with all the text editors I've tried) and have gotten a majority of the ads blocked. The problem with adding hosts to the blacklist is that they need to be in the form of just the server name. Including anything else results in adaway complaining about it not being a proper host name.
I don't know how adaway handles these blacklisted host names, meaning I have no clue if it adds a /* to the end, but doesn't blocking just a server result in everything being blocked to begin with ... Since adaway doesn't allow us to add directories after the server we can't really be too specific about what we block..
Therefore I wasn't able to block anything coming from YouTube.com itself or else I'd block the site completely.
It would he a good idea to move your download link to Box for example (Dropbox probably also works but just tested it with Box) so that people with Adaway can copy the Box URL and add it directly to AdAway's Host Sources list so it automatically updates when they press update, so they don't need to always check here to see if any changes were made.
Here's my test link that works, (as far as adding to Hosts Sources in AdAway...whether or not YouTube ads are blocked I've yet to test fully again). It's fine if anyone wants to use this one, but there's no guarantee I'll update the list if the OP updates their list.
Link Deleted
Rebooted and after a bunch of tries, I ended up catching an ad. I'm going to see if I can catch some of the new URLs. Btw, this was with adaway's default hosts sources plus the YouTube hosts you posted as well as the moab list that's posted here on xda (that's a lot of hosts getting blocked...that moab lost is huge and as the name says, Mother Of All Ad Blocking. It does seem to be blocking some of the ads as they seem less frequent but could be placebo.
Edit: Seems like the adaway final merged lost of my goat sources is getting malformed cause after a
PHP:
grep "120.0.0.1 youtube.com###osd-id" /etc/hosts
Nothing is returned. Lemme reboot and see of the updated link I provided fixes the issue after applying the list again...
-----------
Well I unchecked all sources except the YouTube hosts from the Box link and even though it says it successfully applied the changes..it didn't..so off to try other cloud storages...might have to just create a webpage and put it there as I know that works but I don't see why this isn't working.
# when applied only "YouTube.com" gets redirected ..also is duplicate entries and I guess not formatted correctly to automatically import into adaway....
Update: Used logcat and checked the ad URLs and they are correct as listed here. So, I parsed through a little more and found where YouTube was pinging for ads, and then found the code in smali. Pretty sure I've found the ad URL constants and doing a build now where I just set each one to 121.0.0.1 and have it redirect back just as if in the hosts file and leave the rest of the code intact to reduce chances of error.
---------------------
Seems like only ads from googleads.g.doubleclick.net are passing through. Oh, yeah I found another URL to add to the YouTube list to redirect or add to adaway blacklist.
Code:
csi.gstatic.com
Looking at the code, it appears that the app pings a request for an ad and then receives it and passes it on to the actual video playback classes, so the URLs may not even be hard coded. If I could find what framework I'm missing I could look and see, still working on that.
I tried a few variations last night on changing the source, which I can decompile. Tried removing all the ad request calls by just returning void and leaving the methods empty and not removing the actual classes. I could use search and try removing all references to the classes so the entire ad interface is removed but doing so cleanly will take a lot of time.
In the mean time I'll keep adding new URLs as I find them. I just need to figure out the flow more...there's a lot of code. If anyone can decompile the resources .. It would be helpful (or know what framework I'm missing...I need to try again and look at the error log and find out what jar/apk the class is in.
---------------------------------------
Finally got resources to decompile. Stupid apktool mobile is picky about imported framework naming. And I has to import them manually but got it straight .. Anyways can't find any host or proxies in there or URLs .. Time to check the /data folder for YouTube though. Guess I couldn't technically modify the XML there so that the ads aren't visible but that's not what im after right now.
----------------------
The Google Services Framework database contains tables which also contain booleans for controlling ads (both in /data/data and /data/0/user. The googleads.g.doubleclick.net host is also apparently controlled here and looks like the reasoning why this was passing by was due to it being enabled and therefore white listed. Use SQLLite Editor and you'll see what I mean. This has been mostly what I've been looking for. Several other ad switches can be turned on and off here.. Some ads are still fetched by youtube.com/whatever, but I haven't manually added that to my hosts yet as was looking for a way to maybe disable those as well elsewhere. There's a lot in gsf I probably looked right past and missed.
Since when hosts file can block elements? Hosts file can't read anything besides domain name. Guys don't waste your time adding this nonsense to your hosts file. It might even slow down your browsing because it won't read the hosts file and it will wait till it times out. If you wish then download a proper hosts file but don't add these lines manually.
---------- Post added at 06:18 AM ---------- Previous post was at 05:54 AM ----------
MidnightHarvester said:
Some ads are still fetched by youtube.com/whatever, but I haven't manually added that to my hosts yet as was looking for a way to maybe disable those as well elsewhere. There's a lot in gsf I probably looked right past and missed.
Click to expand...
Click to collapse
The easiest way to see all URLs by using your router if you have tomato or ddwrt installed. All you need is enable dnsmasq log and then you can see all urls requests. I didn't spend much time only about 15 minutes but I couldn't block ads using hosts file and I blocked most of the requests using hosts file. Maybe I missed something but anyway give it a go and don't use wildcards, slashes, divs, or http in hosts file. A proper hosts file must look like
127.0.0.1 domain.com
or
127.0.0.1 www.domain.com
Almazick said:
Since when hosts file can block elements? Hosts file can't read anything besides domain name. Guys don't waste your time adding this nonsense to your hosts file. It might even slow down your browsing because it won't read the hosts file and it will wait till it times out. If you wish then download a proper hosts file but don't add these lines manually.
---------- Post added at 06:18 AM ---------- Previous post was at 05:54 AM ----------
The easiest way to see all URLs by using your router if you have tomato or ddwrt installed. All you need is enable dnsmasq log and then you can see all urls requests. I didn't spend much time only about 15 minutes but I couldn't block ads using hosts file and I blocked most of the requests using hosts file. Maybe I missed something but anyway give it a go and don't use wildcards, slashes, divs, or http in hosts file. A proper hosts file must look like
127.0.0.1 domain.com
or
127.0.0.1 www.domain.com
Click to expand...
Click to collapse
Yeah I had to clean this up before even trying.. I have all ads blocked now anyways thankfully. Some ada are manages in Google Play Services and stored in one of the databases in the data file for that, and is most likely white listing these certain domains we can't block. My host file is formatted correctly ..been using them forever before uneven started using them to block ads.
Normal hosts I use blocks most the ads, blocked the g.googleads whatever it is domain via editing the play services database so other APS don't see them, then added my code in the smali eliminating YouTube from even pinging for ad servers...so all good
Thanks for the tips though in sure they'll be useful ')
This procedure works great!
I cannot post links for the moment. Try to search on Google this two keywords: "lolloland youtube"
The first link "TechNote: How to remove video ads from Youtube without ..." is a good procedure to configure your hosts files not to see pre-roll Youtube Ads.
Numerio said:
I cannot post links for the moment. Try to search on Google this two keywords: "lolloland youtube"
The first link "TechNote: How to remove video ads from Youtube without ..." is a good procedure to configure your hosts files not to see pre-roll Youtube Ads.
Click to expand...
Click to collapse
Really does not work I don't get why android's hosts file gets ignored if it is about the Youtube app.

Investigating Huawei system app - your help needed

Hi guys,
I was recently reverse engineering a package com.huawei.autoinstallapkfrommcc and trying to understand what it is doing.
From what I could see it looks like this service after system boots up, is checking what mobile carrier you are using and then loads a list of packages from file autoInstallAPK.xml and then installs/uninstalls them based on mcc and mnc codes.
I am wondering if this xml file can be used to bypass device security. However I can't find it on my device.
Could you please check if you have a file at
Code:
[ROOT]/System/etc/xml/autoInstallAPK.xml
and share it if it exists there?
Check your
/cust/vendor/country/xml/*.xml
&
/preload/model/vendor/country/xml/*.txt
Look also for :
APKInstallListEMUI5Release.txt
&
DelAPKInstallListEMUI5Release.txt
Share back your tweaks and findings
oslo83 said:
Check your
/cust/vendor/country/xml/*.xml
&
/preload/model/vendor/country/xml/*.txt
Look also for :
APKInstallListEMUI5Release.txt
&
DelAPKInstallListEMUI5Release.txt
Share back your tweaks and findings
Click to expand...
Click to collapse
I don't have such folders, did you mean main partition? I don't have root so I am quite limited.
Maybe this config file is included only in roms which come from mobile carriers like Verizon, T-Mobile etc.
So far what I think this package is reading from that xml is:
* package name
* apk path
* action type (install, uninstall, disable, maybe others)
* card info (probably sim card info/ carrier info)
Then this data is being processed (atm I don't fully understand the process flow but in general it goes through each element (app) described in the xml list and takes defined action depending on the carrier you have). Ofc whole process is not started untill system is booted and sim card present/installed.
I wonder why Huawei have implemented such service. Maybe to make it easier for carriers to install branding apps on EMUI? Maybe this is only used to install carrier config package to. Can't really tell at the moment.
However I see a potential use case where someone uses buffer overflow or other vunerability to alter/overwrite this xml file. This could allow someone to install malicious apps on the device.
I am now analyzing bytecode of the part that is parsing InputStream from xml to see if I have missed something.

Categories

Resources