Systemless root, Android Pay, unroot - Nexus 5X Q&A, Help & Troubleshooting

So the only reason I have to root is to use AdAway. I use Android Pay often as it's convenient. Last I knew, Google had server-side blocked systemless root.
However, if I install systemless root. Install AdAway hosts. Unroot (probably just flash a stock kernel?). This should allow Android Pay to still work?

MattBooth said:
However, if I install systemless root. Install AdAway hosts. Unroot (probably just flash a stock kernel?). This should allow Android Pay to still work?
Click to expand...
Click to collapse
I don't follow AdAway installation that closely, but Nougat introduced forward error correction so any changes to the hosts file will get auto corrected back to original contents unless you disable dm-verity (either manually, installing SuperSU, or modified boot.img)
You could install AdAway systemless, but I think that install option piggybacks on stuff SuperSU creates for its set up.
I might have some of this stuff about AdAway installs incorrect, but the part about changes to the system (and vendor) partitions getting auto error corrected back to original contents I am sure of.
There is a thread about getting tethering working that might provide relevant information on getting root and AdAway working. Changing build.prop and getting the changes to stick is pretty much the same issue as getting changes to hosts to stick.
My guess is you don't want to get rid of SuperSU completely as that would re-enable dm-verity and thus turn on forward error correction. You can probably get rid of some SU binaries that Android Pay security check is looking for but leave the infrastructure SuperSU put in place.

There's an option to symlink the hosts file to AdAways private storage within the /data/data/ folder, but perhaps dm-verity would pick that up as well :/

MattBooth said:
There's an option to symlink the hosts file to AdAways private storage within the /data/data/ folder, but perhaps dm-verity would pick that up as well :/
Click to expand...
Click to collapse
It wouldn't, but I believe when I looked at that script, it piggybacked on some init scripts that the SuperSU install set up, which is why I suggested you might be able to remove the SU binaries but leave the SU infrastructure in place. I didn't look that closely, so I could be mistaken.

Related

[Root Question] How to I Install Xposed on Rooted Amazon Fire TV 2? (Guide Please)

How to I Install Xposed on Rooted Amazon Fire TV 2? (Guide Please)
Do I download XposedInstaller_3.0_alpha4.apk? and xposed-v78-sdk21-arm64.zip?
Please Help
Could I Use Flashfire?
You can't install xposed since there is no custom recovery
Tried with Flashfire where no custom recovery is needed ? what version of xposed should i try?
No Luck with Flashfire and xposed v78-sdk22-arm 64. Going to have to wait for a fix
yeah I've had no luck, just have to wait I guess
ians325 said:
No Luck with Flashfire and xposed v78-sdk22-arm 64. Going to have to wait for a fix
Click to expand...
Click to collapse
Did you encounter boot loop or soft-brick when you attempted this?
z_thompsonpa said:
Did you encounter boot loop or soft-brick when you attempted this?
Click to expand...
Click to collapse
No
ians325 said:
No
Click to expand...
Click to collapse
Thanks! You prompted me to give this a shot after confirming that it wouldn't do any serious damage. I found some things out in the process that explain why this isn't working as of yet.
The Xposed zip you mentioned requires the following Linux GNU tools (or equivalent):
cut
find
head
sed
I suspect this is why it is failing, because I was able to backup my system partition and restore my backed-up system partition through FlashFire. (more on this later)
Sooo.. I thought why not go all the way and try to install BusyBox first? ..since this would fix the missing commands
Much to my surprise the Busybox install actually worked and I had the whole suite of linux commands at my disposal!!!
Things went south pretty quick, though, when I realized that SELinux was blocking my ability to run the following command:
I couldn't run this command:
Code:
mount -o remount rw /system
So, this would prevent a further attempt at installing Xposed through Flashfire, because it would have to mount the system partition as rw in order to modify the files and add the Xposed framework.
I ended up restoring my system partition after this fiasco using Flashfire. It re-enabled my ability to remount /system as rw and SELinux has seemed to calm down in the logs.
In conclusion:
Xposed requires Busybox
[*]SELinux enforces more policies when Busybox is installed
[*]Setting SELinux to Permissive has no effect
EDIT: **Details in my next post**
z_thompsonpa said:
Thanks! You prompted me to give this a shot after confirming that it wouldn't do any serious damage. I found some things out in the process that explain why this isn't working as of yet.
The Xposed zip you mentioned requires the following Linux GNU tools (or equivalent):
cut
find
head
sed
I suspect this is why it is failing, because I was able to backup my system partition and restore my backed-up system partition through FlashFire. (more on this later)
Sooo.. I thought why not go all the way and try to install BusyBox first? ..since this would fix the missing commands
Much to my surprise the Busybox install actually worked and I had the whole suite of linux commands at my disposal!!!
Things went south pretty quick, though, when I realized that SELinux was blocking my ability to run the following command:
Code:
mount -o remount rw /system
So, this would prevent a further attempt at installing Xposed through Flashfire, because it would have to mount the system partition as rw in order to modify the files and add the Xposed framework.
I ended up restoring my system partition after this fiasco using Flashfire. It re-enabled my ability to remount /system as rw and SELinux has seemed to calm down in the logs.
In conclusion:
Xposed requires Busybox
SELinux enforces more policies when Busybox is installed
Setting SELinux to Permissive has no effect
Click to expand...
Click to collapse
Nice work, have you seen this tidbit on BusyBox Github for SELinux?
https://github.com/ukanth/afwall/wiki/BusyBox#difference-between-selinux-and-non-selinux-busybox
There's also some decent results on Google that may offer some clues... https://www.google.com/search?q=SELinux+mount+system+as+rw+android&ie=utf-8&oe=utf-8
fldash said:
Nice work, have you seen this tidbit on BusyBox Github for SELinux?
https://github.com/ukanth/afwall/wiki/BusyBox#difference-between-selinux-and-non-selinux-busybox
There's also some decent results on Google that may offer some clues... https://www.google.com/search?q=SELinux+mount+system+as+rw+android&ie=utf-8&oe=utf-8
Click to expand...
Click to collapse
Thanks for helping out. I jumped the gun on blaming SELinux. I'll go back and edit my previous post.
BusyBox, as far as I can tell works great!
(It will probably require more testing, but for the time being I am not having any issues.)
I figured out what was causing the problem with the inability to mount /system as rw. It was actually caused by attempting to flash Xposed, I believe. I tried it all again tonight and stopped this time after installing BusyBox and before flashing Xposed using Flashfire. I was still able to mount /system properly with functional GNU utils. I hadn't tested this before at this this stage.
I couldn't remount because of "orphaned inodes" after attempting to flash Xposed. Pretty sure this means its corrupting the partition, but yet its still mountable as read-only.
I restored my /system again to get everything back to normal and just installed BusyBox this time. So far so good...
I want to go back and try to flash Xposed again, and this time look in the logs folder. I think the addition of the BusyBox binaries are causing the installer script to error somewhere else during execution causing the partition corruption. Who knows.. there may be a workaround.
keep up the good work
z_thompsonpa said:
Thanks for helping out. I jumped the gun on blaming SELinux. I'll go back and edit my previous post.
BusyBox, as far as I can tell works great!
(It will probably require more testing, but for the time being I am not having any issues.)
I figured out what was causing the problem with the inability to mount /system as rw. It was actually caused by attempting to flash Xposed, I believe. I tried it all again tonight and stopped this time after installing BusyBox and before flashing Xposed using Flashfire. I was still able to mount /system properly with functional GNU utils. I hadn't tested this before at this this stage.
I couldn't remount because of "orphaned inodes" after attempting to flash Xposed. Pretty sure this means its corrupting the partition, but yet its still mountable as read-only.
I restored my /system again to get everything back to normal and just installed BusyBox this time. So far so good...
I want to go back and try to flash Xposed again, and this time look in the logs folder. I think the addition of the BusyBox binaries are causing the installer script to error somewhere else during execution causing the partition corruption. Who knows.. there may be a workaround.
Click to expand...
Click to collapse
How are you restoring your system partition? Using that diff patcher (for root) with a USB A-A cable?
fldash said:
How are you restoring your system partition? Using that diff patcher (for root) with a USB A-A cable?
Click to expand...
Click to collapse
I haven't had to break out the USB A-A cable yet... thankfully (except for root of course).
I used Flashfire to backup my /system partition as RAW backup before I started all of this experimentation. I have just been restoring back to this known good state using Flashfire after each time I corrupt the system partition.
I intended on trying this method, and if it didn't work to fall back to the method mentioned in the root thread. I checked the logs last night and Flashfire seems to be succeeding at this task, at least.
Right now, I am picking through the Xposed installer script source and using the Flashfire logs to debug why it is failing. It appears to be a permissions issue, but a lot of the stdout/stderr is suppressed so its hard to tell exactly where. When I get home today, I am going to try to modify the installer script to produce more output so I can debug the issue further. If I cant figure it out, I'll post my findings either way.
I've fixed a few bugs in the flash script already, but it always errors on overwriting:
Code:
/system/lib/libart.so
It's throwing some error about read-only filesystem. (I'll post exact error later)
I've thrown in some checks to see if the /system mount is unmounting or something odd like that, but that's not it.
I've got a few guesses as to why, but I am not going to mention them until I have more solid evidence.
Any advice would help as well... I just wanted to post the update I promised.
z_thompsonpa said:
Thanks for helping out. I jumped the gun on blaming SELinux. I'll go back and edit my previous post.
BusyBox, as far as I can tell works great!
(It will probably require more testing, but for the time being I am not having any issues.)
I figured out what was causing the problem with the inability to mount /system as rw. It was actually caused by attempting to flash Xposed, I believe. I tried it all again tonight and stopped this time after installing BusyBox and before flashing Xposed using Flashfire. I was still able to mount /system properly with functional GNU utils. I hadn't tested this before at this this stage.
I couldn't remount because of "orphaned inodes" after attempting to flash Xposed. Pretty sure this means its corrupting the partition, but yet its still mountable as read-only.
I restored my /system again to get everything back to normal and just installed BusyBox this time. So far so good...
I want to go back and try to flash Xposed again, and this time look in the logs folder. I think the addition of the BusyBox binaries are causing the installer script to error somewhere else during execution causing the partition corruption. Who knows.. there may be a workaround.
Click to expand...
Click to collapse
z_thompsonpa said:
I've fixed a few bugs in the flash script already, but it always errors on overwriting:
Code:
/system/lib/libart.so
It's throwing some error about read-only filesystem. (I'll post exact error later)
I've thrown in some checks to see if the /system mount is unmounting or something odd like that, but that's not it.
I've got a few guesses as to why, but I am not going to mention them until I have more solid evidence.
Any advice would help as well... I just wanted to post the update I promised.
Click to expand...
Click to collapse
I think we should go another method. Use the tools in the root thread to just create an image with Xposed/root and just do a DIFF.
fldash said:
I think we should go another method. Use the tools in the root thread to just create an image with Xposed/root and just do a DIFF.
Click to expand...
Click to collapse
I think so... I am pretty sure its a dead end. I also tested using adb to write the files and it failed on /system/lib/libart.so, as well. It's, I believe, because the object is loaded in memory?? don't quote me on that... but loading through preloader, I think, would avoid this limitation as ART is not running.
So can anyone in here tell me if its possible to have xposed on fire tv 2 5.0.5 thats rooted and now has twrp recovery on ? I have tried to flash the xposed zip in recovery but when i reboot its stuck at amazon logo. Went back into recovery and flashed rbox's pre rooted 5.0.5 and booted normally. Id like to have (im sure many others would also) xposed and playstore, ive searched the forums but because rbox method is new there is no information on this subject now.
sconnyuk said:
So can anyone in here tell me if its possible to have xposed on fire tv 2 5.0.5 thats rooted and now has twrp recovery on ? I have tried to flash the xposed zip in recovery but when i reboot its stuck at amazon logo. Went back into recovery and flashed rbox's pre rooted 5.0.5 and booted normally. Id like to have (im sure many others would also) xposed and playstore, ive searched the forums but because rbox method is new there is no information on this subject now.
Click to expand...
Click to collapse
Use this method, I've slightly modified the text from another post & added it into a text file for you, this works a 100% but as usual I take no responsibility if you do any thing wrong & brick the Fire Tv2.
Enjoy & press that thanks button If this helped you
Thanks for this. I will try it shortly and report back if it works for me. I have stumbled upon another thread that the guys seem to be working on playstore issues, http://forum.xda-developers.com/fire-tv/help/q-guide-to-getting-google-play-rbox-t3310974
Made a guide here if anyone wants to install
http://forum.xda-developers.com/fire-tv/general/installing-xposed-fire-tv-2-guide-t3314142

Android 7.0 & /etc/hosts

/etc/hosts blacklist entries seem to be ignored with Android 7.0 (e.g. adding 127.0.0.1 amazon.com still allows me to reach amazon.com). Is anyone else experiencing something similar or familiar with any gotchas around Android 7.0 and modifying /system/etc/hosts?
I'm running official Nexus 5X Android 7.0 build number NRD90R. I have an engineering build of android that I boot from as follows to modify my /system/etc/hosts file:
adb reboot-bootloader
fastboot boot my-recovery.img
<mount from phone menu>
adb remount
adb push my-hosts system/etc/hosts
adb shell
chmod 644 system/etc/hosts
exit
<reboot from phone menu>
I've been using this process after every OTA update since Android 6.0, and it's been working. I also noticed that I'm not getting the red warning on boot any more (the one you get after you modify anything on the system partition), just the yellow warning (the one you get from having phone unlocked). Maybe I did something wrong ¯\_(ツ)_/¯ but I could sure use a sanity check.
Could be related to java cache, after a modification to hosts file you should reboot to let the cache reload. Try it.
The OS is not booted when editing hosts since it's being edited from a recovery image with the system mounted into it. The last step is to reboot. I did reboot the phone again for good measure and it's still not working. If it is a cache related thing, it lives through reboot. I suspect it's not though as I was seeing ads in news websites that I do not frequent.
Any other thoughts?
Are you using chrome? Did you disable data saver option in chrome?
Sent from my SHIELD Tablet K1 using Tapatalk
Seems to be related to: http://forum.xda-developers.com/nex...oid-nougat-t3445647/post68737720#post68737720 . Basically the files that one would modify by mounting /system are no longer used, afaict.
When I boot a live image, mount the system partition, and make a modification (i.e. /system/etc/hosts), that change is persisted through a reboot back to the live image and remount. However, it's not loaded by the OS when it boots. Instead both /etc/hosts and /system/etc/hosts are unmodified. Odd, and why is there even anything mounted at /system? I'm not sure if there are multiple system partitions or what's going on. I would love to find some information about Android 7.0 that explains.
crashenx said:
Seems to be related to: http://forum.xda-developers.com/nex...oid-nougat-t3445647/post68737720#post68737720 . Basically the files that one would modify by mounting /system are no longer used, afaict.
When I boot a live image, mount the system partition, and make a modification (i.e. /system/etc/hosts), that change is persisted through a reboot back to the live image and remount. However, it's not loaded by the OS when it boots. Instead both /etc/hosts and /system/etc/hosts are unmodified. Odd, and why is there even anything mounted at /system? I'm not sure if there are multiple system partitions or what's going on. I would love to find some information about Android 7.0 that explains.
Click to expand...
Click to collapse
I responded to your post in the other thread. This is repost.
Android 7.0 introduced redundant bits for reed solomon forward error correction into the system and vendor partitions and code in the kernel to perform the error correction.
Your changes are being written to emmc but when you boot with 7.0 kernel with dm-verity enabled your changes are being treated as data corruption and on-the-fly error corrected back to original.
You can see your changes if you boot into twrp because it has dm-verity disabled. However if you boot into android with dm-verity enabled it will look like original image again even though your changes are technically still there.
It took me a day to figure out what was really going on because i initially had no idea they added this feature to Android N.
The simple way to disable dm-verity is to install SuperSU, but you can also accomplish the same patching your own kernel, installing pre-patched kernel, installing custom kernel, etc.
sfhub said:
I responded to your post in the other thread. This is repost.
Android 7.0 introduced redundant bits for reed solomon forward error correction into the system and vendor partitions and code in the kernel to perform the error correction.
Your changes are being written to emmc but when you boot with 7.0 kernel with dm-verity enabled your changes are being treated as data corruption and on-the-fly error corrected back to original.
You can see your changes if you boot into twrp because it has dm-verity disabled. However if you boot into android with dm-verity enabled it will look like original image again even though your changes are technically still there.
It took me a day to figure out what was really going on because i initially had no idea they added this feature to Android N.
The simple way to disable dm-verity is to install SuperSU, but you can also accomplish the same patching your own kernel, installing pre-patched kernel, installing custom kernel, etc.
Click to expand...
Click to collapse
That's good info and makes total sense. Thanks! Pretty neat actually, just a bummer for me.
Yeah so SuperSU path is not really one I want to pursue. I could learn how to update the dm-verity shas used for verification. That'd probably be the most secure, but it's gonna be a PITA I bet. I imagine I'd need to compile my own image similar to how I made my live image and update a few things. Might have to deal with encryption which is probably an even bigger headache. Also, I bet it would break OTA and have to reflash to update, though that's true now.
I'm really curious what AdAway is doing. Maybe I should pursue reverse engineering that.
I really appreciate you pointing us in the right direction.
crashenx said:
I'm really curious what AdAway is doing. Maybe I should pursue reverse engineering that.
Click to expand...
Click to collapse
I don't use adaway but I believe there are 2 ways to install it with Android N. First is to install SuperSU (or otherwise disable dm-verity) and have it update as it always has. 2nd way is systemless where it piggybacks on some init scripts SuperSU has created to mount "over" the existing hosts file. Basically like symlinking but using a mount point on top of the existing file.
sfhub said:
I don't use adaway but I believe there are 2 ways to install it with Android N. First is to install SuperSU (or otherwise disable dm-verity) and have it update as it always has. 2nd way is systemless where it piggybacks on some init scripts SuperSU has created to mount "over" the existing hosts file. Basically like symlinking but using a mount point on top of the existing file.
Click to expand...
Click to collapse
I'll probably try to go the route of updating init scripts to mount over the existing host file but without using SuperSU or AdAway.

Permanent fix for Bluetooth battery drain on stock 7.1 N108

I found a permanent fix for the Bluetooth battery drain bug on stock 7.1, the last n108 release.
Root is required for this fix.
First, go to developer settings and enable Bluetooth hci Snoop log. Reboot. Then disable the Bluetooth hci log. Reboot.
Next, using a root file explorer (I used ES file explorer), navigate to /system/etc/Bluetooth/
Open bt_stack.conf
Near the top is "BtSnoopConfigFromFile=false"
Change it to true, then make sure the following two lines are set to false.
BtSnoopLogOutput=false
BtSnoopExtDump=false
Save the file and reboot.
After some browsing on the nextbit forums, someone had identified that the Bluetooth Snoop hci log was being written to the root directory of /sdcard/, causing significant battery drain. Their solution was to toggle the Bluetooth log on in developer settings, reboot, turn it off, then reboot again. It would always turn itself back on though. This prevents that.
(Bluetooth hci log is a file where android literally records all Bluetooth traffic information, which as you might imagine is CPU and I/o intensive. Normally used by devs for troubleshooting).
I decided to go back to stock due to constant bugs and freezes with the lineage 14.1 builds. Battery life has even been a little better on stock, with rock solid stability.
This prevents the battery drain aspect, but the battery settings still has a reporting error that attributes much more drain to Bluetooth than it should. I'm still getting 3-4hrs screen on time with lots of Bluetooth use after this fix. Better battery stats will provide accurate drain stats.
This is excellent information - thanks for posting - however, I get stuck when trying to save the proposed changes to bt_stack.conf; the file is read-only and I cannot figure out how to change it to allow me to save the changes. How did you do that on the stock ROM?
Bleser said:
This is excellent information - thanks for posting - however, I get stuck when trying to save the proposed changes to bt_stack.conf; the file is read-only and I cannot figure out how to change it to allow me to save the changes. How did you do that on the stock ROM?
Click to expand...
Click to collapse
Is your phone rooted? I used ES File explorer with "root mode" enabled. You can only make changes to the file with a root elevated program. There is also solid file explorer and root file explorer as other options that may work. I should have mentioned root is required.
I believe ES file explorer changes the permission automatically when in root mode, to allow changes. Other apps may require manually changing the permissions of the BT config file.
I did also run 'hide magisk manager" in the magisk settings.
boxes said:
Is your phone rooted? I used ES File explorer with "root mode" enabled. You can only make changes to the file with a root elevated program. There is also solid file explorer and root file explorer as other options that may work. I should have mentioned root is required.
I believe ES file explorer changes the permission automatically when in root mode, to allow changes. Other apps may require manually changing the permissions of the BT config file.
Click to expand...
Click to collapse
Hi @boxes,
No, it is not rooted. I will try ES File explorer. Thanks!
Bleser said:
Hi @boxes,
No, it is not rooted. I will try ES File explorer. Thanks!
Click to expand...
Click to collapse
You will need to be rooted to do this. If you root with magisk, then you can still pass the safetynet check.
Rooting the robin is very easy luckily.
Follow these steps to unlock the bootloader and flash TWRP.
https://forum.xda-developers.com/nextbit-robin/general/guide-install-twrp-root-robin-t3334171
(Use this TWRP rather than the one on that thread-)
https://forum.xda-developers.com/ne...recovery-twrp-3-0-0-0-touch-recovery-t3334152
Then download magisk from here-
https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Also download the magisk manager APK. Flash magisk from TWRP then install magisk manger in android.
boxes said:
Is your phone rooted? I used ES File explorer with "root mode" enabled. You can only make changes to the file with a root elevated program. There is also solid file explorer and root file explorer as other options that may work. I should have mentioned root is required.
I believe ES file explorer changes the permission automatically when in root mode, to allow changes. Other apps may require manually changing the permissions of the BT config file.
Click to expand...
Click to collapse
boxes said:
You will need to be rooted to do this. If you root with magisk, then you can still pass the safetynet check.
Rooting the robin is very easy luckily.
Follow these steps to unlock the bootloader and flash TWRP.
https://forum.xda-developers.com/nextbit-robin/general/guide-install-twrp-root-robin-t3334171
(Use this TWRP rather than the one on that thread-)
https://forum.xda-developers.com/ne...recovery-twrp-3-0-0-0-touch-recovery-t3334152
Then download magisk from here-
https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Also download the magisk manager APK. Flash magisk from TWRP then install magisk manger in android.
Click to expand...
Click to collapse
Thanks again for your help!
boxes said:
I found a permanent fix for the Bluetooth battery drain bug on stock 7.1, the last n108 release.
Root is required for this fix.
First, go to developer settings and enable Bluetooth hci Snoop log. Reboot. Then disable the Bluetooth hci log. Reboot.
Next, using a root file explorer (I used ES file explorer), navigate to /system/etc/Bluetooth/
Open bt_stack.conf
Near the top is "BtSnoopConfigFromFile=false"
Change it to true, then make sure the following two lines are set to false.
BtSnoopLogOutput=false
BtSnoopExtDump=false
Save the file and reboot.
After some browsing on the nextbit forums, someone had identified that the Bluetooth Snoop hci log was being written to the root directory of /sdcard/, causing significant battery drain. Their solution was to toggle the Bluetooth log on in developer settings, reboot, turn it off, then reboot again. It would always turn itself back on though. This prevents that.
(Bluetooth hci log is a file where android literally records all Bluetooth traffic information, which as you might imagine is CPU and I/o intensive. Normally used by devs for troubleshooting).
I decided to go back to stock due to constant bugs and freezes with the lineage 14.1 builds. Battery life has even been a little better on stock, with rock solid stability.
This prevents the battery drain aspect, but the battery settings still has a reporting error that attributes much more drain to Bluetooth than it should. I'm still getting 3-4hrs screen on time with lots of Bluetooth use after this fix. Better battery stats will provide accurate drain stats.
For extra security you can change the permissions of the .conf file to read only for all groups.
Click to expand...
Click to collapse
Bless you! I should have looked into this earlier but never got around to it, having just left Bluetooth off except when charging. Will see if I can do a bind mount over the file with Magisk so I can leave the system image read-only.
---------- Post added 3rd July 2018 at 12:00 AM ---------- Previous post was 2nd July 2018 at 11:57 PM ----------
In the process of looking this up, I discovered a Magisk module to fix the Bluetooth config problem already exists:
https://forum.xda-developers.com/apps/magisk/module-disable-bluetooth-hci-snoop-log-t3680223
You do not need to edit your system image, just install Magisk and then use Magisk Manager to install this module.
iscaela said:
Bless you! I should have looked into this earlier but never got around to it, having just left Bluetooth off except when charging. Will see if I can do a bind mount over the file with Magisk so I can leave the system image read-only.
---------- Post added 3rd July 2018 at 12:00 AM ---------- Previous post was 2nd July 2018 at 11:57 PM ----------
In the process of looking this up, I discovered a Magisk module to fix the Bluetooth config problem already exists:
https://forum.xda-developers.com/apps/magisk/module-disable-bluetooth-hci-snoop-log-t3680223
You do not need to edit your system image, just install Magisk and then use Magisk Manager to install this module.
Click to expand...
Click to collapse
I tried that and it didn't work for me, I replied to the thread a while back. At least with magisk v16.
Are you concerned about passing the safetynet check? I ran the check in magisk manager and passed, both ctsProfile:true and basicIntegrity:true
I'm still able to download apps from the play store that block rooted/modified devices. Magisk is masking the changes perhaps.
edit: I tinkered with magisk, enabling "hide magisk manager" and now it wont pass safetynet check. So I reinstalled magisk manager. This time I didnt "hide magisk manager", but I enabled "magisk core only mode" and checked the box for "Magisk Hide" and "Systemless Hosts" (I use adaway), now it passes the safetynet check again.
boxes said:
I tried that and it didn't work for me, I replied to the thread a while back. At least with magisk v16.
Are you concerned about passing the safetynet check? I ran the check in magisk manager and passed, both ctsProfile:true and basicIntegrity:true
I'm still able to download apps from the play store that block rooted/modified devices. Magisk is masking the changes perhaps.
Click to expand...
Click to collapse
After installing the module, I had to turn "Enable Bluetooth HCI snoop log" on in "Developer options", reboot, and turn it back off again, but it seems to have worked and /sdcard/btsnoop_hci.log stopped growing in size.
The file was also not recreated after I deleted it and rebooted one more time. So I think the extra steps are necessary whether using the module or editing the original file in the system image (there's lingering config data which could in theory be handled in the module as well if ).
boxes said:
edit: I tinkered with magisk, enabling "hide magisk manager" and now it wont pass safetynet check. So I reinstalled magisk manager. This time I didnt "hide magisk manager", but I enabled "magisk core only mode" and checked the box for "Magisk Hide" and "Systemless Hosts" (I use adaway), now it passes the safetynet check again.
Click to expand...
Click to collapse
I've had Magisk installed since I first got the phone and except for a brief period in mid 2017, SafetyNet checks have been passing with "Magisk Hide" alone, without selecting "core only mode" (which disables modules). I'm also using "Systemless hosts" for AdAway.
@iscaela
How long has it been since you did that? Just the process of enabling/disabling in dev options would fix it for a day or two in my experience.
boxes said:
@iscaela
How long has it been since you did that? Just the process of enabling/disabling in dev options would fix it for a day or two in my experience.
Click to expand...
Click to collapse
Just over 12 hours today. I've rebooted twice recently and it's stayed the same. I doubt there's a time component to it reverting, the config loading is pretty simple.
Interestingly, bluedroid is still listening on port 8872 as documented at https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/master/doc/btsnoop_net.md but isn't producing any traces.
iscaela said:
Just over 12 hours today. I've rebooted twice recently and it's stayed the same. I doubt there's a time component to it reverting, the config loading is pretty simple.
Interestingly, bluedroid is still listening on port 8872 as documented at https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/master/doc/btsnoop_net.md but isn't producing any traces.
Click to expand...
Click to collapse
So the most recent reboot did enable the setting and created /sdcard/btsnoop_hci.log again. The reason appears to be the module leaves BtSnoopConfigFromFile=false.
I'm going to update the module to edit this and report back.
Looks like the updated Magisk module works, I've posted it to the other thread:
https://forum.xda-developers.com/ap...bluetooth-hci-snoop-log-t3680223/post76987430

Question How to install gapps after installing GSI rom?

I have installed Lineage 18.1 GSI and trying to install gapps. I have rooted and using franko to flash opengapps pico and get an error 70 that there is not enough space on /system. What is the way to get this done? Thanks in advance!
I would like to know that as well.
Tried to flash via stock recovery but that aborted because signature verification failed.
Apps like Flashify, Flash Gordon, Flashfire or Rashr didn't work either.
With MagiskGapps-basic-module from wacko1805 the playservice framework always crashed.
I think the easiest and best way would be to flash opengapps via TWRP.
@ada12 seems to have a TWRP build that still has some bugs, but can be used to flash unsigned zip files.
Maybe he can share this with us.
I feel like this should not be a collasal effort, but it has become one. I have spent the whole day trying to figure it out. I want to use Lineage OS 18.1 with gapps from Andyyan, not any other rom.
psychofaktory said:
I think the easiest and best way would be to flash opengapps via TWRP.
Click to expand...
Click to collapse
I suspect that Magisk should be able to do whatever TWRP is doing (which is just putting some files in certain places, for the most part). Have you tried to find a Magisk module with OpenGapps? Or you can try making your own (but be warned that lzip is not available by default on any Android or Linux).
Edit: nevermind, I see you found a LiteGapps Magisk module.
Thanks @wirespot
The hint with the linked script to create a custom Magisk module on the preferred OpenGapps bundle was worth gold!
Now I have another problem that comes from installing the OpenGapps via Magisk.
For passing SafetyNet I have to add com.google.android.gms and com.google.android.gms.unstable to the deny list.
But when restarting Magisk all modules are reloaded. So also the OpenGapps module.
As a result, the adjustments to the deny list for the Google Play services are discarded again with every restart and the SafetyNet check fails.
How can I prevent that the two entries are no longer removed from the deny list?
Or how can I ensure that the entries are automatically added to the deny list on restart?
Edit:
It seems that this is what Magisk intended and com.google.android.gms and ...gms.unstable are automatically added to the deny list.
But now I have the question, how can I pass the SafetyNet test?
wirespot said:
I suspect that Magisk should be able to do whatever TWRP is doing (which is just putting some files in certain places, for the most part). Have you tried to find a Magisk module with OpenGapps? Or you can try making your own (but be warned that lzip is not available by default on any Android or Linux).
Edit: nevermind, I see you found a LiteGapps Magisk module.
Click to expand...
Click to collapse
Yes, but there is an issue with litegapps, the google contacts sync is broken unfortunately...
psychofaktory said:
It seems that this is what Magisk intended and com.google.android.gms and ...gms.unstable are automatically added to the deny list.
But now I have the question, how can I pass the SafetyNet test?
Click to expand...
Click to collapse
The deny list only lets you pass Basic check. To also pass CTS you need the USNF module (Universal SafetyNet Fix) and possibly other modules too. More details in this thread (check the end of the post), but try with just deny list and USNF first.
Neither the basic integrity check, nor cts profile match are passed.
Besides the denial list, I tried the modules "Shamiko", "Universal SafetyNet Fix" and "MagiskHide Props Config".
With the latter I have also tried various combinations, unfortunately unsuccessful in each case.
It looks like the deny-list does not work.
I suspect here also a connection with the message together that Magisk displays with each call:
Code:
An "su" command that does no belong to Magisk is detected. Please remove the other unsupported su
I have already been able to disable Phh-su with these commands:
Code:
adb shell
phh-su
mount -o remount,rw /
mount -o remount,rw /system
remount
mount -o remount,rw /
mount -o remount,rw /system
/system/bin/phh-securize.sh system.img
But the message in Magisk still appears.
Yeah passing SafetyNet with a custom ROM may be tricky. Didgeridoohan has a few more tips on their website you can try.
OK, I am already a big step closer to the solution.
After installing Magisk regularly, I first installed the Franco Kernel Manager.
Through this I was then able to flash UnSu.zip, which completely removed phh-su.
This also removed the message "An "su" command that does no belong to Magisk is detected" from Magisk.
Magisk had to be set up again afterwards, since it was also cleaned up by the UnSu script.
YASNAC now already showed "Basic integrity -> Pass".
But now I have not found a way to pass the CTS-profile match.
Does anyone here know what settings to set via MagiskHideProps Config?
And could someone send me the fingerprint of the stock rom (62.0.A.9.11)?
Code:
getprop ro.build.fingerprint
After some tests I discovered a big disadvantage with the variant to flash OpenGapps via Magisk.
Push notifications do not seem to work.
I use too many services that rely on Google Push notifications, so I can't do without them.
Compared to the "normal" variant of flashing OpenGapps via recovery before the first boot, the Magisk variant seems to be missing important dependencies and permissions that are only set during the first boot of the rom.
Therefore, the only useful variant is to flash GApps via recovery.
I really hope that we will soon have the possibility to flash unsigned zip files here!
Another approach:
Opengapps-zip files cannot be flashed via the stock recovery because it fails signature verfication.
The GSI roms can be flashed via the stock recovery. So they seem to be signed correctly.
Would it be possible to sign the Opengapps-Zip files with the same signature keys as the GSI-Roms to be able to flash them via the stock recovery?
Aren't GSI ROMs flashed through fastboot? Since they're partition images not zip installers like OpenGapps.
Of course. You are right.
Would it be possible to merge a GAPPS zip file into a GSI image and then flash the image with fastboot?

Question Problem in ad blocking via host file in xiaomi pad 5

I am using xiaomi pad 5 (miui 13.1.3) for 3 months. Recently I have unlocked my bootloader and rooted my phone. After that I installed lucky patcher and tried to block ads(blocking all ads was the main purpose for rooting my device. ) But still ads were showing. Then I manually tried to replace “hosts” file inside the “system/etc” folder. But, root explorer said “can not replace hosts file”. It seems that original hosts file is uneditable. Can anyone help me to replace the original hosts file with custom one?
Ahamadmusa said:
I am using xiaomi pad 5 (miui 13.1.3) for 3 months. Recently I have unlocked my bootloader and rooted my phone. After that I installed lucky patcher and tried to block ads(blocking all ads was the main purpose for rooting my device. ) But still ads were showing. Then I manually tried to replace “hosts” file inside the “system/etc” folder. But, root explorer said “can not replace hosts file”. It seems that original hosts file is uneditable. Can anyone help me to replace the original hosts file with custom one?
Click to expand...
Click to collapse
I would recommend AdAway it's easy to use.
SubwayChamp said:
I would recommend AdAway it's easy to use.
Click to expand...
Click to collapse
Thanks brother. I have already tried adway. But, it also didn't work. It seems, the “system” folder is unmodifiable.
Ahamadmusa said:
Thanks brother. I have already tried adway. But, it also didn't work. It seems, the “system” folder is unmodifiable.
Click to expand...
Click to collapse
Stick a Pihole on your router - it'll take out the ads before they reach your devices without having to root, at home at least
It seems like Luck Patch getting less effective recently it's didn't work for me at all. Adaway is the best tool and if it's didn't work. It's gonna be hard to solve. I suggest maybe find a mod version of the apps
Ahamadmusa said:
Thanks brother. I have already tried adway. But, it also didn't work. It seems, the “system” folder is unmodifiable.
Click to expand...
Click to collapse
Sorry for delay, no, AdAway works perfectly.
You have to go to the Settings from Magisk, tap on Systemless host, then reboot, now open AdAway, and follow the on-screen instructions.
About the system, in newer Android versions, the system remains just RO (read-only), this is the reason, although you can edit the host file, you can't put it back.
SubwayChamp said:
Sorry for delay, no, AdAway works perfectly.
You have to go to the Settings from Magisk, tap on Systemless host, then reboot, now open AdAway, and follow the on-screen instructions.
About the system, in newer Android versions, the system remains just RO (read-only), this is the reason, although you can edit the host file, you can't put it back.
Click to expand...
Click to collapse
Thanks from deepest part of my heart, dear. It works like charm. Thanks . But, can u tell me, is there any way to convert the system from read only to writeable?
Ahamadmusa said:
Thanks from deepest part of my heart, dear. It works like charm. Thanks . But, can u tell me, is there any way to convert the system from read only to writeable?
Click to expand...
Click to collapse
Yes, and not. Unfortunately, there is not a universal solution for this Google based underlined method.
Most users rely on the need to use this, based on modules from Magisk, to make one thing here, and one thing there, I mean, a specific job in regard to that, and not, letting the system completely accessible to RW.
This script works for some device while it doesn't for others, so you could try on, https://forum.xda-developers.com/t/...-superrw-featuring-makerw-read-write.4247311/ This method worked for my last Redmi Note 10, but not for my current RN11 though.
And also, you could take a read on this method, https://forum.xda-developers.com/t/mount-system-read-write.4270857/
SubwayChamp said:
Yes, and not. Unfortunately, there is not a universal solution for this Google based underlined method.
Most users rely on the need to use this, based on modules from Magisk, to make one thing here, and one thing there, I mean, a specific job in regard to that, and not, letting the system completely accessible to RW.
This script works for some device while it doesn't for others, so you could try on, https://forum.xda-developers.com/t/...-superrw-featuring-makerw-read-write.4247311/ This method worked for my last Redmi Note 10, but not for my current RN11 though.
And also, you could take a read on this method, https://forum.xda-developers.com/t/mount-system-read-write.4270857/
Click to expand...
Click to collapse
Thank you brother. I shall try it during my freetime.
Ahamadmusa said:
I am using xiaomi pad 5 (miui 13.1.3) for 3 months. Recently I have unlocked my bootloader and rooted my phone. After that I installed lucky patcher and tried to block ads(blocking all ads was the main purpose for rooting my device. ) But still ads were showing. Then I manually tried to replace “hosts” file inside the “system/etc” folder. But, root explorer said “can not replace hosts file”. It seems that original hosts file is uneditable. Can anyone help me to replace the original hosts file with custom one?
Click to expand...
Click to collapse
Flash it in magisk.
U can edit the file with 7zip and replace host with yours
Keyvannn said:
Flash it in magisk.
U can edit the file with 7zip and replace host with yours
Click to expand...
Click to collapse
Thanks brother. After applying systemless host in magisk I was able to replace hosts file via adaway, but still some ads were showing in adm. After applying your zip file there is no ads, at least for now. Thanks dear.
Ahamadmusa said:
Thanks brother. After applying systemless host in magisk I was able to replace hosts file via adaway, but still some ads were showing in adm. After applying your zip file there is no ads, at least for now. Thanks dear.
Click to expand...
Click to collapse
If you want to update the host file , take it from here
GitHub - StevenBlack/hosts: 🔒 Consolidating and extending hosts files from several well-curated sources. Optionally pick extensions for porn, social media, and other categories.
🔒 Consolidating and extending hosts files from several well-curated sources. Optionally pick extensions for porn, social media, and other categories. - GitHub - StevenBlack/hosts: 🔒 Consolidating a...
github.com
Keyvannn said:
If you want to update the host file , take it from here
GitHub - StevenBlack/hosts: 🔒 Consolidating and extending hosts files from several well-curated sources. Optionally pick extensions for porn, social media, and other categories.
🔒 Consolidating and extending hosts files from several well-curated sources. Optionally pick extensions for porn, social media, and other categories. - GitHub - StevenBlack/hosts: 🔒 Consolidating a...
github.com
Click to expand...
Click to collapse
Then tell me, this can work apart from AdAway, no? I mean, once a new release is out, you can just flash it and it's done, no need to install and set it up AdAway, and no need to enable systemless host, I'm right?
SubwayChamp said:
Then tell me, this can work apart from AdAway, no? I mean, once a new release is out, you can just flash it and it's done, no need to install and set it up AdAway, and no need to enable systemless host, I'm right?
Click to expand...
Click to collapse
Actually u don't need to update if its working fine.
Just flash it with magisk, no need adaway app or any setting in magisk.

Categories

Resources