SafetyNet on LineageOS 20 microG - OnePlus 6 Questions & Answers

Hi guys, I installed LineageOS 20 for MicroG on my Oneplus 6, then I installed Magisk (latest version) through Lineage Recovery and enabled Zygisk and the denylist.
I also installed Universal SafetyNet Fix, but my device doesn't pass SafetyNet attestation test.
What am I missing?
I also found MagiskHidePropsConf module but it was discontinued...
Is there a working method to make banking apps work on LineageOS?
Bye

On my Pocophone F1 at least I don't need magisk at all to pass safetynet. All that is needed is to have USB debugging disabled and to change two lines in build.prop. To do this, you need to pull the file using adb, edit it on your computer, and push the new version. Of course, you have to temporarily enable USB debugging for this to work. On linux, I use the following script:
#!/bin/bash
adb root
adb remount
adb pull /system/build.prop .
sed -i "s/ro.secure=0/ro.secure=1/" build.prop
sed -i "s/ro.debuggable=1/ro.debuggable=0/" build.prop
adb push build.prop /system/build.prop
rm build.prop
the adb commands should work on all systems with adb; the two sed commands just change the lines "ro.secure=0" and "ro.debuggable=1" to "ro.secure=1" and "ro.debuggable=0", and I remove the build.prop file from my pc once it is pushed with the rm command.
Do note that this has to be done after every system update.

nonodie said:
On my Pocophone F1 at least I don't need magisk at all to pass safetynet. All that is needed is to have USB debugging disabled and to change two lines in build.prop. To do this, you need to pull the file using adb, edit it on your computer, and push the new version. Of course, you have to temporarily enable USB debugging for this to work. On linux, I use the following script:
#!/bin/bash
adb root
adb remount
adb pull /system/build.prop .
sed -i "s/ro.secure=0/ro.secure=1/" build.prop
sed -i "s/ro.debuggable=1/ro.debuggable=0/" build.prop
adb push build.prop /system/build.prop
rm build.prop
the adb commands should work on all systems with adb; the two sed commands just change the lines "ro.secure=0" and "ro.debuggable=1" to "ro.secure=1" and "ro.debuggable=0", and I remove the build.prop file from my pc once it is pushed with the rm command.
Do note that this has to be done after every system update.
Click to expand...
Click to collapse
work fine for oneplus 7 pro

Related

USCC Mesmerize Rooting on Official 2.2 (Froyo)

Okay, this was my first time trying to root my phone and it would figure that non of the automated methods worked for me. Still, I was able to get root on my US Cellular Samsung Galaxy S Mesmerize (SCH-i500 for the kids keeping track at home) and these are the steps that I took. I hope this helps others who may be scratching their head wondering what to do when the developers haven't gotten around to (read: forsaken) us.
The nice thing about this method is that it doesn't require Windows (though you still do download SuperOneClick).
NOTE: This is only for an officially updated Mesmerize. Rooting is unnecessary for the leaked version.
APOLOGY: I can't post any links to anything outside the forum as I am a newer member, so, sorry for not being able to post URLs.
1. Download the Android SDK from the Android developer website and install/unzip it. You may need to add the path to the adb tool (found under platform-tools for me) to your PATH variable.
2. Download the SuperOneClick tool and unzip it
3a. If you are using Windows, then make sure to install the drivers for your phone. I don't have Windows, so don't ask me which file to download. Sorry.
3b. Enable USB Debugging on your phone (Settings->Applications->Development->Check "USB Debugging").
4. Connect your phone to your computer using the USB cable
5. Open a shell (or command prompt on Windows) and change directories to where you unzipped SuperOneClick
6. Run the following commands to copy files to your device
A. adb push psneuter /data/local/tmp/psneuter
B. adb push busybox /sdcard/busybox
C. adb push su-v2 /sdcard/su
NOTE: A quick note of each of these files.
A. psneuter - an exploit to gain root access temporarily on your phone
B. busybox - a compilation of common unix commands to help you along the CLI world
C. su - the super-user command used to gain elevated privileges
7. Run the following command to get a command line interface to your device
adb shell
At this point, you should see a $ prompt indicating that you are on your phone.
From here, you will change directories to where you put the exploit, change the permissions so you can run it, copy over the files that we need to sustain root access, and finally, install the Superuser.apk app so that you can manage root access from the UI.
Execute the following commands:
$ cd /data/local/tmp
$ chmod 777 psneuter
$ ./psneuter
Here, you will be disconnected from your device. This is normal. Just run "adb shell" again to get back in, though now, you will notice that the prompt has changed to a #. The following commands will reflect that.
# mount -t rfs -o remount,rw /dev/block/st19 /system
# cd /system/xbin
# cat /sdcard/busybox > busybox
# cat /sdcard/su > su
# chmod 4755 busybox
# chmod 4755 su
# exit
Now, you will be back on your computer. Type the following to install the Superuser.apk app.
adb install Superuser.apk
That should do it! You now have root access. Go ahead and try to install Titanium Backup (requires root). You can also install a terminal app or anything else.
I hope this helps. Report your successes/failures in the comments.

[SOLVED] - Manually enable adb debugging from recovery

First off, this may seem a noob question, but I am definitely not.
I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:
Added to default.prop and /system/build.prop
Code:
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
Edit: Must have had typos... It now works.
workdowg said:
First off, this may seem a noob question, but I am definitely not.
I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:
Added to default.prop and /system/build.prop
Code:
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
Edit: Must have had typos... It now works.
Click to expand...
Click to collapse
Ok Sounds good for you. Can you changed the title of your thread by [SOLVED]
Thanks in advance
philos64 said:
Ok Sounds good for you. Can you changed the title of your thread by [SOLVED]
Thanks in advance
Click to expand...
Click to collapse
Ooops.... :good:
How would i do this with my skyrocket? same problem, broken screen, adb disabled. Some instructions would be sweet, cause im not really clear with what you did here.
workdowg said:
First off, this may seem a noob question, but I am definitely not.
I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:
Added to default.prop and /system/build.prop
Code:
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
Edit: Must have had typos... It now works.
Click to expand...
Click to collapse
MikeMobes said:
How would i do this with my skyrocket? same problem, broken screen, adb disabled. Some instructions would be sweet, cause im not really clear with what you did here.
Click to expand...
Click to collapse
MikeMobes said:
How would i do this with my skyrocket? same problem, broken screen, adb disabled. Some instructions would be sweet, cause im not really clear with what you did here.
Click to expand...
Click to collapse
I'm going to stay general and assume that a skyrochet is a phone, you have a linux or windows pc with ADB installed (and the drivers to connect to your phone) and have TWRP or CWM Recovery installed already...
1) Start the phone in recovery mode - mine is power down and vol
2) Connect you cable to the pc and start a console terminal or cmd prompt
3) Run the following
Code:
adb shell
su
mount -o remount,rw /system
cd /
echo "persist.service.adb.enable=1" >> default.prop
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
Once you reboot into Android you should be able to connect via adb.
If you google vnc over adb you can get a usable but very slow vnc connection then install Andriod VNC server for a little better performance.
That's the best I can do from memory ...
workdowg said:
I'm going to stay general and assume that a skyrochet is a phone, you have a linux or windows pc with ADB installed (and the drivers to connect to your phone) and have TWRP or CWM Recovery installed already...
1) Start the phone in recovery mode - mine is power down and vol
2) Connect you cable to the pc and start a console terminal or cmd prompt
3) Run the following
Code:
adb shell
su
mount -o remount,rw /system
cd /
echo "persist.service.adb.enable=1" >> default.prop
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
Once you reboot into Android you should be able to connect via adb.
If you google vnc over adb you can get a usable but very slow vnc connection then install Andriod VNC server for a little better performance.
That's the best I can do from memory ...
Click to expand...
Click to collapse
I'm booted into twrp 2.6.3 and when i try to run adb devices i just get this
Code:
[email protected]:~$ adb devices
List of devices attached
???????????? no permissions
That Baker Guy said:
I'm booted into twrp 2.6.3 and when i try to run adb devices i just get this
Code:
[email protected]:~$ adb devices
List of devices attached
???????????? no permissions
Click to expand...
Click to collapse
Enter the following commands:
Code:
adb kill-server sudo ./adb start-server adb devices
The issue is your not running adb server as root.
Hello. Does possible enable accesibility and set default tts via adb shell, and edit default.prop and build.prop?
Thanks and best regards.
workdowg said:
I'm going to stay general and assume that a skyrochet is a phone, you have a linux or windows pc with ADB installed (and the drivers to connect to your phone) and have TWRP or CWM Recovery installed already...
1) Start the phone in recovery mode - mine is power down and vol
2) Connect you cable to the pc and start a console terminal or cmd prompt
3) Run the following
Code:
adb shell
su
mount -o remount,rw /system
cd /
echo "persist.service.adb.enable=1" >> default.prop
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
Once you reboot into Android you should be able to connect via adb.
If you google vnc over adb you can get a usable but very slow vnc connection then install Andriod VNC server for a little better performance.
That's the best I can do from memory ...
Click to expand...
Click to collapse
OMG! After my screen broke, i raged and became hulk. After 3 hours of internet-searching the hulk found your post and released me to become bruce banner again...
The thank you button was just not enough!
Sorry to resurrect a dead thread, but I need a bit more help with this. I've successfully followed these instructions to enable the adb service on my i9505 with a dead screen, however it hasn't authorised it. When I try to connect I get the following error: error: device unauthorized. Please check the confirmation dialog on your device.
Is there anyway to bypass this confirmation dialog from ADB in recovery (Philz Touch)?
Thanks.
pnz said:
Sorry to resurrect a dead thread, but I need a bit more help with this. I've successfully followed these instructions to enable the adb service on my i9505 with a dead screen, however it hasn't authorised it. When I try to connect I get the following error: error: device unauthorized. Please check the confirmation dialog on your device.
Is there anyway to bypass this confirmation dialog from ADB in recovery (Philz Touch)?
Thanks.
Click to expand...
Click to collapse
I Googled it a little and it seems to be a Samsung thing. Apparently it isn't booting to recovery. Sorry for the lack help
From my Debloated Stock Kitkat VS980 4G VZN
workdowg said:
I Googled it a little and it seems to be a Samsung thing. Apparently it isn't booting to recovery. Sorry for the lack help
From my Debloated Stock Kitkat VS980 4G VZN
Click to expand...
Click to collapse
No, I'm quite sure it is booting to my custom recovery, as I have full ADB access to that. What I'm trying to do is enable ADB access to the Android 4.4.2 proper from my custom recovery. So far following the instructions in this thread I've managed to enable ADB there, but whenever you try to connect to this phone a dialog box is meant to come up asking if you want to accept incoming ADB requests from your computer's key. Unfortunately I have no way of selecting accept (or even seeing that dialog box), so I'm hoping there's a way to bypass it.
Hey mate,
Sorry to necro-bumb the thread. I have been reading and have much similar issue to your self. Maybe some drivers that automatically enable adb, android usb or MTP without debugging enabled might be something to take a look at?
Check this thread out >>> here
Hope that might help (you and I both?)
Besides that I am still searching for a post I saw where you can edit the init-rc in the kernel (the guy explained how to extract the boot.img) and then decompile the kernel, edit the init-rc, recompile the kernel and then flash it back in recovery.
At the moment I am really stuck with a customer device that is bricked, so have a bash script and busybox binary that loads from a signed update.zip that should allow editing of the init-rc and add the lines mentioned in this thread to the build.prop and system.prop.
Fingers crossed it works for a completely stock device :fingers-crossed:
Jarmezrocks said:
Hey mate,
Sorry to necro-bumb the thread. I have been reading and have much similar issue to your self. Maybe some drivers that automatically enable adb, android usb or MTP without debugging enabled might be something to take a look at?
Check this thread out >>> here
Hope that might help (you and I both?)
Besides that I am still searching for a post I saw where you can edit the init-rc in the kernel (the guy explained how to extract the boot.img) and then decompile the kernel, edit the init-rc, recompile the kernel and then flash it back in recovery.
At the moment I am really stuck with a customer device that is bricked, so have a bash script and busybox binary that loads from a signed update.zip that should allow editing of the init-rc and add the lines mentioned in this thread to the build.prop and system.prop.
Fingers crossed it works for a completely stock device :fingers-crossed:
Click to expand...
Click to collapse
Hi mate, did you manage to get into the customers mobile? I have the same problem as I'm locked out with no access to enable USB debugging and a home button which does not work, meaning I can't load recovery mode to wipe the phone
Sent from my C6903 using XDA app
workdowg said:
Code:
echo "persist.service.adb.enable=1" >> default.prop
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
Click to expand...
Click to collapse
Thank you, I had no clue how, but my phone's (MUCH Snail, aka MUCH W1, aka MUCH 78P01) manufacturer (China's Snail Mobile) had removed from Android's Developer Options menu the option to Enable/Disable USB Debugging.
I was looking all over the web for days, this was the only way I could effectively turn on USB debugging in my phone. Thanks!
There's only one difference, instead of performing the above steps from an ADB console window (for obvious reasons) I did it with Build.prop Editor, but first I needed to change permissions to 666 on the default.prop file (otherwise it wouldn't save my changes).
Curiously, every time I do a full reboot the default.prop file somehow is overwritten with the manufacturer's original settings - that doesn't happen when I soft reboot my device though. Any clues as to what could be reversing my changes at boot?
wmoecke said:
Thank you, I had no clue how, but my phone's (MUCH Snail, aka MUCH W1, aka MUCH 78P01) manufacturer (China's Snail Mobile) had removed from Android's Developer Options menu the option to Enable/Disable USB Debugging.
I was looking all over the web for days, this was the only way I could effectively turn on USB debugging in my phone. Thanks!
There's only one difference, instead of performing the above steps from an ADB console window (for obvious reasons) I did it with Build.prop Editor, but first I needed to change permissions to 666 on the default.prop file (otherwise it wouldn't save my changes).
Curiously, every time I do a full reboot the default.prop file somehow is overwritten with the manufacturer's original settings - that doesn't happen when I soft reboot my device though. Any clues as to what could be reversing my changes at boot?
Click to expand...
Click to collapse
Everytime you boot your phone, the root path is extracted from ramdisk which is usually bound to kernel. As a result, your modification is overwritten. In order to modify files under root path(such as default.prop), you must change the file in ramdisk.
There is many tools and tutorials about this task, I think this is a good point to google.
Addition:
The poster of this thread try to edit default.prop via adb, which is not possible to achieve, at least, for every android device I has hold.
For the unauthorized issue, It's because secure adb, which could be disabled via ro.adb.secure=0, but if there is a ro.adb.secure=1 in default.prop, modification of ramdisk is needed.
Given92 said:
Everytime you boot your phone, the root path is extracted from ramdisk which is usually bound to kernel. As a result, your modification is overwritten. In order to modify files under root path(such as default.prop), you must change the file in ramdisk.
There is many tools and tutorials about this task, I think this is a good point to google.
Addition:
The poster of this thread try to edit default.prop via adb, which is not possible to achieve, at least, for every android device I has hold.
For the unauthorized issue, It's because secure adb, which could be disabled via ro.adb.secure=0, but if there is a ro.adb.secure=1 in default.prop, modification of ramdisk is needed.
Click to expand...
Click to collapse
I had edited both default.prop AND /system/build.prop not knowing which one to use. This worked for me on JB and I used the tablet for a while after that.
From my Nexus 9
workdowg said:
I had edited both default.prop AND /system/build.prop not knowing which one to use. This worked for me on JB and I used the tablet for a while after that.
From my Nexus 9
Click to expand...
Click to collapse
In my view, the /system/build.prop works.
I am a huge noob and i dont really understand where i am inputing that code ?
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Windows\system32>adb shell
'adb' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows\system32>su
'su' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows\system32>mount -o remount,rw /system
'mount' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows\system32>cd /
C:\>echo "persist.service.adb.enable=1" >> default.prop
C:\>echo "persist.service.debuggable=1" >> default.prop
C:\>echo "persist.sys.usb.config=mtp,adb" >> default.prop
C:\>echo "persist.service.adb.enable=1" >> /system/build.prop
The system cannot find the path specified.
C:\>echo "persist.service.debuggable=1" >> /system/build.prop
The system cannot find the path specified.
C:\>echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
The system cannot find the path specified.
C:\>
Getting this on S$..any1 here to help me!

[TUTORIAL] Resetting a Parental Lock without Factory Resetting (no pre-root required)

So I just spent a few hours digging into this and thought someone might need it sometime down the line.
My wife's job uses a Kindle Fire HD 10 and they have a parental lock on it. Today they needed to change a Wi-Fi setting and couldn't remember the lock password.
The following tutorial will use adb to temporarily root your Fire, update the database to corrupt the lock, and create a new Parental Lock.
What you'll need:
ADB
mtk-su (Download from the first post here, don't worry about using their tutorial since I'll reiterate it here)
1. After you download mtk-su, push it to your device
Code:
adb push path/to/mtk-su /data/local/tmp/
2. Open an adb shell and cd to the data/local/tmp folder
Code:
adb shell
cd /data/local/tmp
3. Write executable permissions to the script
Code:
chmod 755 mtk-su
4. With the screen on, run the script:
Code:
./mtk-su -v
5. You should now be at a root shell (you can tell by the # instead of the $ symbol). Read the mtk-su thread for debugging if you don't get a root shell.
6. Get to your databases folder:
Code:
# cd /data/data/com.android.providers.settings/databases
7. Send some commands to your settings.db to overwrite those parental password values:
Code:
sqlite3 settings.db "insert into secure values(NULL,'parental_password_exist', '0');"
sqlite3 settings.db "insert into secure values(NULL,'parental_control', '0');"
sqlite3 settings.db "insert into secure values(NULL,'com.amazon.parentalcontrols.changed', '0');"
8. Delete the original password salt and key files via:
Code:
rm ./data/securedStorageLocation/com.amazon.parentalcontrols/files/*
9. Congrats, your parental controls are now corrupted! Your WiFi, among other things probably, will not work! Head over to your Settings and click on Parental Controls. Turn them on and create a new password. Now everything will work again.

Problem using adb with Moto C

Hi, I'm having trouble choosing the right section, anyway..
After more than a year i managed to correctly install ADB drivers, because before i installed Google driver, when i noticed i must install Motorola driver , the removing of previous one did not successful done, so the Motorola one did not installed well, by manually removing files it succeed.
But now another annoying not previewed issue, i need to exchange a file in /system/etc both in my tablet and my Motorola moto C tel. , it needs to remount system part. in r/w but to do this need to restart adb as root but with 'adb root' this is the answer:
adbd cannot run as root in production builds
my system is 7.0, what can i do?
You can install a temporary root to run shell-commmands what require root-rights like mount in ADB:
Code:
adb devices
adb push <FULL-PATH-TO-SU-BINARY-ON-PC> /data/local/tmp/
adb shell "chmod +x /data/local/tmp/su"
adb shell "/data/local/tmp/su -c 'mount -o rw,remount,rw /system'"
I have two questions, i don't find any su command available in the net.
I don't understand how it is possible to have to do all these hard maneuvers with a debug tool, i think it might be simpler.. why there's a command remount or root if it doesn't work?

[HELP THREAD] blank build.prop file Mi 11T.

Hi,
I was trying to run `adb root` instead of `adb shell su` because when i write something to /system/* dir the files get empty. After that i searched something about it and i see a related topic which contains 'edit build.prop'. Idk maybe i was searching about wrong thing. After that i update build.prop and it just get empty after that i reboot my phone and its staying on MI icon now. What should i do. Is there any way to access shell and replace a default build.prop file.
My Phone: Mi 11T
I tried nothing because after see an empty build.prop file. I just reboot device instead of search something about it.
If file /vendor/build.prop exists, use a copy of it. File default.prop never should get changed / overwritten.
File /system/build.prop should be formatted as UNIX-file, also be RW, hence run the related chmod command.
xXx yYy said:
If file /vendor/build.prop exists, use a copy of it. File default.prop never should get changed / overwritten.
File /system/build.prop should be formatted as UNIX-file, also be RW, hence run the related chmod command.
Click to expand...
Click to collapse
But how can i access shell now. I cant use adb. its not working anymore
Boot phone into Recovery mode: there ADB commands as
Code:
adb pull
adb push
adb shell
are available.
my device shows as unauthorized on adb devices thats why im telling i cant access my device. i removed/replace recent adbkey files but i cant access adb anyway
Then push the RSA-keys what are stored on PC to phone.
Do not mess with system files, Xiaomi doesn't care about props anyway. whatever you want can be probably done systemless.
[MODULE] [DEPRECATED] MagiskHide Props Config - SafetyNet, prop edits, and more - v6.1.2
MagiskHide Props Config v6.1.2 Note: This project is dead, and has been for some time. I have not been involved in the Android modding scene for some time and I no longer have the energy to take it up again. If anyone feels like taking over...
forum.xda-developers.com

Categories

Resources