extract firmware, modify hosts file (adblock) repack and flash possible? - Sony Xperia XA1 Questions & Answers

hi
due to no root available for xa1 oreo i just asked myself if there would be away to, for adblock only reasons, open the firmware in any 7zip, winrar whatever to have access to the system/etc/hosts tab, copy and paste some text, (re)save and flash?
would it be possible and a guide from someone experienced here maybe?
adblock without root as a vpn solution prevents from real vpn on mobile...)

Related

protected apps not showing up after f/w upgrade or root.

see the following article.. can someone post a copy of their build.prop b4 firmware upgrade or confirm that it is rooting the phone that blocks you seeing protected apps.
http://androidforums.com/samsung-ga...ected-app-market-fix-tutorial-build-prop.html
suddenly sling mobile and other protected apps i paid for no longer appear in the market place..
thanks
ok everyone here is a fix for the problem.. i downloaded the original dump of xxjf3 that was posted and modifed the build.prop of my jf7 and here is the file..
here is a link with instructions (note you will have to checkin after installing and reboot)
i didnt use adb i prefer root explorer
in some terminal emulator sufs i copied the original in case i need and also ftpd off the system
ie
su
cd /system
cp build.prop build.prop.orig
then go in root explorer and copy the new one over the one in /system
then reboot
then checkin (the new build.prop: *#*#2432546#*#*)
then reboot again
(make sure you unzip the file first)
i can now see slingplayer again in search in marketplace..
probably would not use same modified build.propr with diff. f/w than jf7 but same approach works
note: if you are going to do this yourself make sure you strip the dos cr off before uploading i use a program called stripcr attached here.. (assuming you are editing on a pc)
here is the original post where i got the idea from
http://forum.xda-developers.com/showthread.php?t=687371

[NST] HELP IN PATCHING framework.jar

HI EVERY BODY, I REALLY NEED HELP IN PATCHING this files to get Arabic support. I am not an expert with patching and code stuffs . Last days i was trying to root my nook. First i rooted with Slasicha but i was not able to run android market,
then restored and rooted again with minimal touch. i was afraid of it because it involves installing cwm which i don't know any thing about it, but with following steps and instructions, It worked . also Google apps and market
files that i need to try patching it
framework.jar
libwebcore.so
framework.jar takes care of shaping texts in android on all texts except Gmail and the browser, while libwebcore.so takes care of shaping texts in the default Browser and Gmail app.
This patcher will attempt to get you Arabic support in both of these files.
This should work with all Android phones sporting Android
these steps taken from here :
http://blog.devasque.com/?page_id=11
by madmack member
http://forum.xda-developers.com/member.php?u=1436971
Requirements:
Your device needs to be rooted.
Your Android version is 2.1 or newer
Your ROM needs to be deodexed. To find out if your installed ROM is deodexed, navigate to /system/framework on your phone. If you see a file called framework.odex then this patch will NOT work for you.
Your rom is not based on MIUI.
Steps to apply the patch:
Download the patch below and extract it to a folder on your computer.
Pull /system/framework/framework.jar from your phone and place it in the subfolder input that you extracted in step 1
If you’re not using a CyanogenMod ROM, then you’ll also need to pull /system/lib/libandroid_runtime.so from your phone and place it in subfolder input that you extracted in step 1
If you’re interested in getting arabic shaping in the Browser, pull file /system/lib/libwebcore.so from your phone and place it in subfolder input as well.
Double click on commands.exe. Do not close the black cmd screens that will pop up. Once the patch is done, you should get a patched framework.jar in the subfolder output
Version 0.800 provides a recovery flashable file in folder output. Place that on your sdcard, reboot into recovery and flash it. If the flashing through recovery didn’t work for some reason, you’ll need to do the following manually:
Put file output/framework.jar in your phone at /system/framework/
Put file output/libandroid_runtime.so in your phone at /system/lib/ (if this file exists, it shouldn’t if you’re arabizing CM6).
Put file output/libicuuc-arabic.so in your phone at /system/lib/ This is extremely important, failing to place this file will result in a boot loop of your deivce
If file exists: Place file output/libwebcore.so in your phone at /system/lib/
If file exists: Place file output/lib__bcore.so in your phone at /system/lib/
I’ve also included the Aljazeera fonts in fonts. You can place these in /system/fonts and reboot
Sometimes permissions and xml data doesn’t get updated correctly resulting in corrupted data entries. If you receive a bunch of Force Closes after a reboot, you’ll need to Factory Reset.
member: dark hawk, on this post
http://forum.xda-developers.com/showpost.php?p=22521341&postcount=17
said ,
dark_hawk said:
As for how to add Arabic, I'll add a guide soon, it involves patching the Framework.jar only, as I found that patching the lib files causes crashes in the anything related to the stock browser , like gmail and such. But all in all, You'll have Arabic in everything else.
Click to expand...
Click to collapse
but he did not answer, i hope he is ok
can someone help me with that a screenshot with these website :
www.ce4arab.com
www.bbc.co.uk/arabic/
, it would be a great help

How to extract call log history file (db) with unrooted phone

Hi
I would like to extract the original call log history file from my GSM I9250 phone (any maybe other protected db files) without rooting my phone, is it possible?
is there a way to extract this file using ODIN or Heimdall ?
Thanks

How to do the instructions in "update-binary" of SuperSU manually ?

Hi all,
I want to root Android 4.4.4, as you may know the only way to root it to use pre root image file.
So I used "RK3xxx Firmware Tools by SergioPoverony" to extract "System" and "Boot" files,
No I have to embedded the SuperSU manually " explained in "META-INF\com\google\android\update-binary" then reflect all the permissions for the file into "system_statfile.txt" then repack the images via the same app then flash the drive.
me experience here is limited , can any one tell me how to follow the instruction in the "update-binary" file to install the superSu to be able to root the update.img ?
Do I have to use Linux or Windows is good to go ?
Thank you all.

[Android 7]Hosts file ignored

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

Categories

Resources