OnePlus Nord | N10 | N100 [TMO/MPCS] Network Unlock & Enable OEM Unlocking (April 19th, 2021) - Upgrading, Modifying and Unlocking

1.) ADB access must be enabled
-Tap build number 7 times until Developer Options are enabled
2.) Enable USB Debugging
-For PC-less enable Wireless Debugging
Optional if PC-less
3.) Go to Play Store or F-Droid and download Shizuku
4.) Tap Shizuku in Terminal Apps and configure the shizuku file reflect the terminal package is "com.termux" and Start Shizuku
5.) Navigate to where the shizuku and shizuku.dex files are andn enter
cat shizuku > $PREFIX/bin/shizuku && chmod 755 $PREFIX/bin/shizuku
cat shizuku.dex > $PREFIX/bin/shizuku.dex && chmod 755 $PREFIX/bin/shizuku.dex && shizuku sh
TADA Now you have an ADB Shell locally on your OnePlus. One last command to enter.
settings put secure device_provisioned 0
Either nothing is returned or one word 'Success'is the only way to confirm the command was executed properly.
If with computer :
adb shell settings put secure device_provisioned 0
Congratulations your phone is now Network Unlocked. But wait, there's more to this groundbreaking method.
To enable OEM Unlocking in the Developers Menu this is where things get chipote-cray
In your terminal (termux, bash) enter this command
MOD EDIT: Link removed
Enter accordingly to onscreen prompts and then exit the script.
For finalization of effects Enter
adb reboot-bootloader
Toggle for the Start option.
Go to Network and Sim and there is confirmation that the Network Unlock is persistent. Go to Developer Options and viola, the Enable OEM Unlock button is enabled again. This is also persistent. Make sure to leave enabled in case of accidental/intentional factory reset. Good job everyone.
To get unlock code for the OnePlus.com/unlock_token form Enter
adb reboot-bootloader && fastboot oem get_unlock_code
0day from Jay . This isn't cosmetic, this directly impact's the kernel and is thus persistent.
Support for this is located
MOD EDIT: Link removed

Related

Developer needs your feedback (sense lock screen & root needed)

Hi;
I'm currently developing an application (seen in my signature). One of the things users are asking is the action to remove lock when certain conditions are met. This, however, can be echieved with root permissions and here's where you step in.
Since there are some differences in roms developed by Sony, Samsung, HTC and others, I am looking for additional info.
So if your phone is rooted and running Stock HTC ROM with Sense UI, you're the person I need!
Please do this steps and just copy paste results here:
1. Enable any kind of lock screen protection in System Settings.
2. Open Terminal Emulator or connect your phone with PC with usb cable and run adb command:
2.1 if Terminal Emulator, run: "su" (without quotes)
2.2 if adb, run: "adb shell" and then "su" (both, without quotes)
3. run command: sqlite3 /data/system/locksettings.db "SELECT * FROM locksettings"
4. save output info somewhere
5. Disable lock screen protection you've enabled in 1st step.
6. run command: sqlite3 /data/system/locksettings.db "SELECT * FROM locksettings"
7. save output info
8. paste output info from #4 & #8
9. ???
10. profit.
Click to expand...
Click to collapse
Here is the example output:
Code:
[email protected]:/ # sqlite3 /data/system/locksettings.db "SELECT * FROM locksettings"
2|migrated|0|true
3|migrated_user_specific|0|true
4|lockscreen.password_salt|0|3977270701243753649
9|lockscreen.passwordhistory|0|
14|lock_pattern_autolock|0|0
15|lockscreen.password_type|0|0
16|lockscreen.password_type_alternate|0|0
17|lockscreen.disabled|0|0
Thank you for your help!
(if you think you're pasting too much information, you can replace any strings (hashes, salts, etc) with zeros or anything else)

Battery saving mode: how to keep work vibration and double tap to awake?

I explore the possibilities of working in power saving mode (battery saver mode) on Android 9 (Google Pixel 2XL) with vibration and double tap to awake ON.
Through ADB I managed to enable both of these options for this mode with the command:
Code:
adb shell settings put global battery_saver_constants "vibration_disabled=false, aod_disabled"
Everything worked as I needed, however, after some time (maybe half a day to go, maybe 5 minutes), the battery_saver_constants value returns to the default (empty). I look at its value using the
Code:
adb shell settings list global
Previously, I changed the location of the buttons using the command
Code:
adb shell settings put secure sysui_nav_bar "space,recent;home;back,space"
and it still works correctly.
Anyone can tell what exactly is responsible for resetting global constants battery_saver_constants? And is it possible to disable the constant reset of these constants through some ADB settings without root?
For the root there is the following method:
Code:
pm disable --user 0 com.google.android.gms/.phenotype.service.sync.PhenotypeConfigurator
but without root this command returns error:
Code:
Security exception: Shell cannot change component state for com.google.android.gms/com.google.android.gms.phenotype.service.sync.PhenotypeConfigurator to 2
So, question is still same: how do it without root?
Did you find any solution for this without root? I am having the same problem on OnePlus 7 Android 9. I want to enable the vibrations and disable screen dimming.
Dude, I spent hours trying to do this until I found ur post, I really appreciated u for posting this.
It worked on my pixel 3 with last update "Android 9 July"
This is what I did:
1- Root first
2- Using a terminal app typed the following commands:
3-
PHP:
pm disable --user 0 com.google.android.gms/.phenotype.service.sync.PhenotypeConfigurator
4-
PHP:
settings put global battery_saver_constants "vibration_disabled=false, aod_disabled=false"
3-reboot
Enjoy!!
Double tap to wake will works only after rebooting

[GUIDE] Access color-filter through command shell

I'm running on the 10.5.10.IN11BA build.
Just get a command shell to your OnePlus 8 Pro through adb, no need for the device to be rooted or anything.
Once you get there, just type:
Code:
am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
It will launch the FactoryMode app and get you directly to the manual camera test view.
Just press the bottom right icon until you get to the color filter.
I have no doubt there is easier and quicker ways to get the same result, maybe through an apk.
Edit:
As far as I know, this workaround could work on any OnePlus 8 Pro model.
Also, as pointed out by ster88, you also can take videos with the filter, which was not possible with the camera app.
I tried not working. I used th terminal app from google playstore.
Can u specifically provide which app and where.
And anything to enable on developer mode.
sajjadhussaini said:
I tried not working. I used th terminal app from google playstore.
Can u specifically provide which app and where.
And anything to enable on developer mode.
Click to expand...
Click to collapse
Sure !
To enable developper mode, go to "Settings > About phone" and tap the "Build number" until they tell you have developper mode enabled.
Then go to "Settings > System > Developper options" and under "Debugging" enable "USB Debugging" and "Wireless ADB Debugging".
Once that is done, on your computer, download the platform-tools, containing adb here :
Code:
https://developer.android.com/studio/releases/platform-tools
Once it is downloaded, go inside it with your command line.
If you are doing this wirelessly, get your phone IP address and type:
Code:
adb connect <your-phone-ip-address>
Then if it worked, to know what the transport id of our device is, type :
Code:
adb devices -l
Once you have the transport id, type this to get a shell to your phone:
Code:
adb -t <transport-id> shell
You can get more details on how adb works here:
Code:
https://developer.android.com/studio/command-line/adb
Then when you have access to the shell, just type:
Code:
am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
If everything went fine, you should get access to the camera !
I could not use a terminal app to run the command, usually because the terminal app doesn't want to let the camera application to take over the view, or something like that, not sure.
The ideal would be to have a dedicated apk to run the command, at least for the time being.
Tried to launch using an app called Activity launcher and it didn't work.
play.google.com/store/apps/details?id=de.szalkowski.activitylauncher
imgur.com/a/BS9Wqzc
I'm not rooted, are you sure this works for non rooted devices? I'll try later with adb to see what happens.
Here is the error from Termux. Hope it can be loaded via apk, not sure if it suffers same restrictions:
$ am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
Starting: Intent { cmp=com.oneplus.factorymode/.camera.manualtest.CameraManualTest }
Warning: Activity not started because the current activity is being kept for the user.
From what I understood, you need to run the command from an adb shell. You cannot run it from within the phone as far as I know.
You can still run it from adb and "lock" the application so it stays in the background.
And I tried with multiple Terminal apps, the command works with none of them (Termux, Terminal Emulator, Material Terminal, etc...)
Apparently, you have some rights on the adb command shell that you don't get as a simple user on the phone.
You man are genius. I found easy way also to keep it running if needed. After getting the camera test to run, you can lock the app so phone will not close it and always return to it. Thanks, finally I can enjoy my camera
Launched it without a computer by using ADB from temux
--no root required
https://github.com/MasterDevX/Termux-ADB
*Enable wireless debugging (wireless doesn't actually need to be on)
Note wireless debugging --takes some time to take effect, sometimes up to 3-5 minutes for me.
*Run the installer above in termux,
*Type adb devices
*Type adb connect 127.0.0.1
*Accept the trusted key
*type adb shell
Troubleshooting:
*If you get an error about multiple devices type adb kill-server
*type adb devices
*type adb shell
*Accept the trusted key
*then paste in: am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
lllsondowlll said:
Here is the error from Termux. Hope it can be loaded via apk, not sure if it suffers same restrictions:
$ am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
Starting: Intent { cmp=com.oneplus.factorymode/.camera.manualtest.CameraManualTest }
Warning: Activity not started because the current activity is being kept for the user.
Click to expand...
Click to collapse
Did you get any solution for this ?
aishkumar said:
Did you get any solution for this ?
Click to expand...
Click to collapse
...
lllsondowlll said:
Launched it without a computer by using ADB from temux
--no root required
https://github.com/MasterDevX/Termux-ADB
*Enable wireless debugging (wireless doesn't actually need to be on)
Note wireless debugging --takes some time to take effect, sometimes up to 3-5 minutes for me.
*Run the installer above in termux,
*Type adb devices
*Type adb connect 127.0.0.1
*Accept the trusted key
*type adb shell
Troubleshooting:
*If you get an error about multiple devices type adb kill-server
*type adb devices
*type adb shell
*Accept the trusted key
*then paste in: am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
Click to expand...
Click to collapse
I've made a script that allows you to launch the Camera from your phone by just typing ./camera in Termux. No root needed. It can be found here: https://github.com/lllsondowlll/OP8_Camera/blob/master/README.md
can u make a video on this how u used termux and what to do whole process screen recording will be helpful coz i am new to this and i dnt wanna mess up with my phone if i lost some files or smthing please make a video i really want to play with IR camera
It works but not really required
It's working, but have few questions to myself.
1. Does it really needed?
Ans: No, you won't keep clicking pics of plastic material to see inside.
2. Is it handy?
Ans: yes, once opened you can pin/lock it in recent app and open whenever required.
It is just a IR camera and nothing wrong in it, I believe OP will enable it in future, because it really doesn't show through the clothes and even if you want to see for some black thin clothes, you need to go near.
So if you are thinking to click the nude people and go closure you will be slapped.
Few images I have taken.
babsvsphudi said:
can u make a video on this how u used termux and what to do whole process screen recording will be helpful coz i am new to this and i dnt wanna mess up with my phone if i lost some files or smthing please make a video i really want to play with IR camera
Click to expand...
Click to collapse
https://youtu.be/iVQYu-CeN24
You can't hurt anything. Just follow the instructions.
lllsondowlll said:
You can't hurt anything. Just follow the instructions.
Click to expand...
Click to collapse
thanks man you are awesome love n respect for u brother
Starting: Intent { cmp=com.oneplus.factorymode/.camera.manualtest.CameraManualTest }
Error type 3
Error: Activity class {com.oneplus.factorymode/com.oneplus.factorymode.camera.manualtest.CameraManualTest} does not exist.
connected to localhost:5555
error: more than one device/emulator
I ran it as the video shows. But I got an error like above.
Is there any way to solve this problem or is it not possible with IN2020? Please forgive me for using a translator.
pcningen said:
Starting: Intent { cmp=com.oneplus.factorymode/.camera.manualtest.CameraManualTest }
Error type 3
Error: Activity class {com.oneplus.factorymode/com.oneplus.factorymode.camera.manualtest.CameraManualTest} does not exist.
connected to localhost:5555
error: more than one device/emulator
I ran it as the video shows. But I got an error like above.
Is there any way to solve this problem or is it not possible with IN2020? Please forgive me for using a translator.
Click to expand...
Click to collapse
I was able to resolve this issue by reinstalling factory mode. I apologize to you for a fuss over. Many thanks to the developers of this method.
Since I can't get termux to work for now, another idea if you want to have it accessible all the time(*), is to run this (beautiful) command with an adb shell from a computer and then lock the app so you can't accidentally close it.
After that you can always go back to it whenever you want it!
*App won't remain locked after reboot, obviously.
lllsondowlll said:
Launched it without a computer by using ADB from temux
--no root required
https://github.com/MasterDevX/Termux-ADB
*Enable wireless debugging (wireless doesn't actually need to be on)
Note wireless debugging --takes some time to take effect, sometimes up to 3-5 minutes for me.
*Run the installer above in termux,
*Type adb devices
*Type adb connect 127.0.0.1
*Accept the trusted key
*type adb shell
Troubleshooting:
*If you get an error about multiple devices type adb kill-server
*type adb devices
*type adb shell
*Accept the trusted key
*then paste in: am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
Click to expand...
Click to collapse
I wanna piggyback on this some, since this is similar to the process I just did.
So while this works for nonroot users (I didn't actually test the nonroot version myself), if you are rooted, AND using magisk, I personally install ADB and fastboot binaries from the repo from zackptg5(?) And then just told termux to run an elevated shell (su) and then pasted in the command linked in OP:
Code:
am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest
It then loaded the testmode camera app, and (xXx caused it to crash, I had to disable it but I don't know if it's a setting with my config) voila. It worked! Thank you.
Edit: I wanna say just running termux in root would solve the issue either way still, but, my point still is there.

[HOW-TO] UNLOCK & ROOT+MAGISK - HERO SP-001 Access Wireless

The Hero SP-001 is a free Lifeline phone from Access Wireless made by Shenzhen Eternity Technology Co., Ltd.
You must Unlock the phone before Rooting it. The Steps for both are provided below.
[Unlock Phone]
****Be aware that you will lose all user data when you unlock bootloader***
1) Unlock Developer options
2) Enable OEM unlocking from Dev options
3) Enable Android Debugging from Dev options.
4) Connect phone to computer
5) From command line type 'adb devices'
6) From command line type 'adb reboot fastboot'
7) From command line type 'fastboot devices'
8) From command line type 'fastboot flashing unlock'
9) Press the volume up button to accept unlocking warning
10) From command line type 'fastboot reboot'
You will see a warning saying it is unlocked everytime you reboot phone.
**EDIT** You can use the RE Live Distro mentioned below to do the above commands if you dont want to fuss with installing adbd on your computer.
----------------------------------------------------------------------------------
[Root+Magisk]
If your'e on Windows you will have to download and install python and git and MTKClient and UsbDK 64 and abdb. I'm not going to get into how to do all that because there is an Ubuntu image tailored made for all MTK based devices. It has all the programs installed. it is called RE Live made by viperbjk . I recommend doing it this way especially if you have any other devices using MTK chips.
Download Re Live DVD V3. The account credentials are Username: user Password: user
You can create the bootable usb thumb drive with Rufus if you're using windows.
The following steps are based on using the Re Live DVD:
***Your phone must be unlocked before you can root it. *****
1) Power off the phone and do not have it connected to the computer.
2) Boot up RE Live and type 'user' at the login screen.
3) Double-click the 'MTK' icon on the desktop.
4) Plug the USB cable into the computer. Do not plug it into the phone.
5) In the terminal type: python mtk r boot,vbmeta boot.img,vbmeta.img
6) When you see "Preloader - Status: waiting for PreLoader VCOM, please connect mobile" in the terminal you will hold the down volume button and plug the cable into the phone. Let go of the button a second or two after you connect phone. It will show you a progress bar as it downloads the 2 images you need.
7) Unplug the phone and power it on.
8) from that same terminal screen type: wget https://raw.githubusercontent.com/v...9e22fa276698f6c03bc1168df2c10/app-release.apk
or use the shortened url if you dont want to type all that: wget https://tinyurl.com/magiskmtk
9) plug the phone and type in the terminal: adb install release-apk [ look at the phone and accept auth rsa request on mobile screen so it can install the app.]
10) in the terminal type: adb push boot.img /sdcard/Download
11) Start magisk, tap on Install, select boot.img from /sdcard/Download.
12) in the terminal type: adb shell ls /sdcard/Download [You should see the boot.img file and another file name 'magisk_patched.something.something.img']
13) in the terminal type: adb shell mv [name of the patched file] boot.patched
14) in the terminal type: adb pull /sdcard/Download/boot.patched
15) Unplug the phone and turn it off (keep the usb plugged into the computer)
16) in the terminal type: python mtk w boot,vbmeta boot.patched,vbmeta.img.empty
17) When you see "Preloader - Satus: waiting..." hold the volume down button and connect the phone. release button when u see it connect and let it do its thing.
18) Unplug phone and power it on. Phone will now be rooted.

ADB debugging not working on reboot

I am running lineageOS on a rooted firestick. I am using ADB on the Firestick to control it via Homeassistant. The problem is that the adb debugging does not automatically work on reboot. Everytime i reboot i have to manually go to the menu turn off the ADB debugging and then turn in back on. After doing this i am able to reconnect adb via network (i.e, on homeassistant).
I want to ask is there any way i can use a script to automatically do this on restart of firestick. I have tried creating a script in init.d with the following contents but it doesn't seem to work.
adb tcpip 5555
I have added the following line to build.prop but this doesn't seem to work too
service.adb.tcp.port=5555
On restart the adb debugging is on in the developer tools but somehow it doesn't connect (either to Homeassistant or to my laptop), what seems to make it work is toggling it off and then back on.
Have you tried persist, so that the setting sticks between reboots?
Code:
ADB shell setprop persist.adb.tcp.port 5555
Just tried it. Still not working after reboot.
I there any command i can use to toggle the adb debugging via a startup script or crontab?
symbiansucks said:
Just tried it. Still not working after reboot.
I there any command i can use to toggle the adb debugging via a startup script or crontab?
Click to expand...
Click to collapse
Be sure you are running the above command as root user. Type su at the shell prompt, then type whoami to confirm you are root.
I guess you could make a script to run the following on each boot if the above doesn't work:
Code:
settings put global adb_enabled 1
setprop service.adb.tcp.port 5555
stop adbd
start adbd
exit 0
But I don't think this should be necessary.
Finnzz said:
Be sure you are running the above command as root user. Type su at the shell prompt, then type whoami to confirm you are root.
I guess you could make a script to run the following on each boot if the above doesn't work:
Code:
settings put global adb_enabled 1
setprop service.adb.tcp.port 5555
stop adbd
start adbd
exit 0
But I don't think this should be necessary.
Click to expand...
Click to collapse
Thanks. yes the command was run as root. Can i ask you one more thing, whats the best place to put the startup scripts in? I have tried init.d/ directory but the scripts don't get loaded from there i believe?
I have set permissions to chmod 755 for the script.
You can follow this guide,
Android (LineageOS 16) Execute Script on Start Up | sqall's blog
but it seems like there should be a much easier way to make ADB tcpip persist between reboots. I don't want to steer you wrong. @Sus_i would know better, he uses your build of LineageOS, and may have a cleaner solution.

Categories

Resources