Pidsec

Rooting A Pixel 3 On De-Googled Firmware CalyxOS with Nethunter

calyxos

Rooting Calyxos

OS Driver: Mac OS

Using Macos, the entire process of rooting and flashing custom rom images will be used in the terminal app in macos. Ensure that you download the adb tools from android to ensure that the frameworks necessary are installed so that the terminal can startup the daemon to use adb tools

Steps

Note: these are steps AFTER you have installed calyxos. To actually install calysox on your pixel device, refer to the extremely easy steps outlined in the calyxos website here

Step 1: AFTER having flashed (installed) calyxos onto your pixel device, open terminal and you want to change your directory to the very folder that the calyxos firmware you originally downloaded to actually flash the os on your pixel is located. Example, if you have the firmware you downloaded from calyxos website into a unique folder, for example “calyx” inside of the downloads folder, then it is NOT enough to have the terminal where you are executing commands to simply be within the home folder or downloads folder. You must change your directory (cd) into the calyx folder or whatever folder you have the firmware directly inside of. Thus if the firmware is in the folder path home/Downloads/calyx and your terminal is in the downloads directory, you must type in

$ cd calyx

In order to link your terminal execution commands directly in the same directory that the firmware is located.

Step 2: It is advised that you just complete the initial setup of calyxos. Do not perform extra tasks like setting up passwords, fingerprint scans, sign into accounts, etc because rooting the phone in calyxos will wipe the phone back to the beginning of calyxos setup, as is normal when rooting any android rom. It will wipe the custom setup data of the device and you will have to redo all the setup options. Hence it is advised, in order to save time and energy, to just simply breeze through the setup without actually setting up extra personalized custom options. You dont even need to setup wifi with the password as the moment you flashed calyx, you can immediately root it.

If you have already had calyxos installed and revamped your phone to custom settings, apps, etc, it is advised that you backup your phone if you havent setup your Nextcloud account in calyxos. This is because rooting the device will wipe all the customs settings and will be as if you had originally flashed calyxos for the first time, except only rooted. So be advised if you have sensitive data you wish to keep, backup the device first prior to rooting.

AFTER having installed calyxos, the program will have you re-lock the bootloader as a protective measure. The bootloader simply allows the user to flash custom roms, in this case, calyxOS. It does not actually root the device.

Step: 3 because you have installed new firmware, after breezing through the set up, once you are in the OS, open up the settings app and scroll to about phone. Scrolll down to build number and tap on it 7 times. This will enable the user as a developer and will unlock the developer options in system. Once complete, go back out into settings, and tap on system. Click advanced, tap developer options and tap on “OEM unlocking”. A message will appear on the screen warning the user that device protection features wont work while this setting is enabled. Click enable anyway. Make sure you scroll down after that to usb debugging and enable it. A message will appear informing you this is for development purposes. Tap ok! Another message will appear on the screen if the device is connected to your computer asking you if you wish to “Allow USB debugging”

Click the box that is there to enable “always allow from this computer” and then click allow.

Step 4: install magisk apk in calyx. This can be performed several ways. I will offer two ways A. You can use the default browser on calyxos which is duckduckgo. Simply type “magisk github” in the search bar. The very first link is the direct link to the actual platform of the developer of magisk where you can download it directly from. It is from topjohnwu. Go to github. Scroll down to doenloads section. You will see three small tabs. The magisk latest version, the magisk beta, and magisk canary. I advise to download the original latest public release, not the beta or canary version. In the time of writing this, the version is magisk v23.0. Click on it. Scroll to the bottom. Where it has a small arrow and says “Assets” and the number 5. Click on this and a dropdown window appears listing all five you want to actually download the apk.

A popup window will ask you to allow duckduckgo access to your photos and media. Tap allow! It will download in the background without you noticing. A few seconds and the file is in your system

Step 5: go to homescreen, scroll up to conjure up your apps, open the files app. After it opens, you should immediately see the magisk apk. Click on it. A popup window pops up informing you that for your security, your phone is not allowed to install unknown apps from this source. Click on settings in that popup window. A new window appears asking you to allow duckduckgo with a toggle and a note on the left of the toggle “allow from this source”. Enable the toggle. Click back. Once back, the app will ask you to cancel or install. Click install.

Step 6. Now we get into the meat and potatoes. On your mac, go DIRECTLY to the calyxos firmware you downloaded. For example, the firmware for the pixel3 will be “blueline-factory-2.8.0.zip.

You want to extract the zip file.

Step 7. You should see various scripts inside the folder that was just extracted in step 6. There is also a folder. In the blueline version, the folder is labelled “image-blueline-rq3a and numbers after it. It is a folder. Go inside the folder. You should see several image files inside this folder. THEE image file you need is the one that says “boot.img”.

Step 8. In terminal. You want to push this very file into your pixel device. The way you would do that is with the adb push command. Thus, in my case, this is the text I would insert into terminal to execute this command.

$ adb push /Users/yourprofilename/Downloads/calyxos/blueline-rq3a.210805.001.a1/image-blueline-rq3a.210805.001.a1/boot.img /sdcard/

This command is composed of 3 functions

  1. Adb push, that is the command to take the file and push it onto the device. Make sure there is a space between the end of this command and the next string of text

  2. The next string of text is literally the folder path of where this boot.img file is located on your computer. Make sure there is a space after the g

  3. The last string of text is the path to where you are pushing this img file onto your device. In this case, it is /sdcard/.

Once you have your string of text in total, press enter on your mac. The terminal will immediately give you an updating percentage to show how long it will take to push the file onto your device. The action will literally only take like a couple of seconds.

Step 9. Now. On your phone, after you pushed the .img file using terminal, open the magisk app. On the right of “magisk”, you should see an install option. Tap install.

Step 10: it takes you to a new screen with data of the new magisk app. At the top portion of that screen, it says method, and below it, you should see a bubble and it says select and patch a file. Tap on it. A new window appears in the form of a file browser. Click the 3 lines at the very top left corner. A side panel appears. Click on your device. Example. If you have a Pixel3 tap Pixel3. It will take you to the home folder. At the bottom, you should see the actual .img file that you pushed onto it from your mac using terminal. Tap on that .img file

Step 11. After clicking the .img file, it takes you back to thr install window in magisk. On the right, tap “Let’s Go ->”

It takes you to a console window where it peforma the action of patching the boot image. The entire process takes a few seconds and it informs you of its progress. When its finished, it says the location of where it put the output file if you need to take a picture or write down that location, it would be good. It literally saves it in your downloads folder of the device.

Step 12: Now, you want to stroll back onto your mac’s terminal. Now we want to execute a different command. The adb pull command. Type in adb pull and then type the location in your device. And then leave a space, and then type two periods (..). This will pull that inage file from your device onto your computer and the .. will put it in your home folder. Fo to your homefolder and drag this patched img file into your folder where you are executing these commands in terminal. So the string of text to execute this would look something like this

$ adb pull /sdcard/download/magisk_patched-23000_rDY5k.img ..

Another method is, if you have Android File Transfer application, it makes this process much easier.

To use the Android File Transfer app on mac, you have to go to settings app in your device. Setting>system>Developer options. Now under developer options, you want to scroll down until you see the usb icon on the left and it says “Default USB configuration”. Tap it. Its usually set to “no data transfer” as default. From the list of options, you want to tap on “file transfer”. This will immediately open the Android File Transfer app on the mac and you will be able to see the folder system in the app. Simply click on download folder and you should see the patched img file that you just created in magisk. Drag and drop that file into your mac folder, specifically the path folder directory where your firmware folder is in.

Step 13: adb reboot bootloader Device state locked in green unlock the bootloader

Fastboot flashing unlock The screen will show you a warning sign if you unlock the bootloader. Use the volume keys up and down to select “unlock the bootloader”. Once you’ve selected “unlock the bootloader, press the power button next to it. The screen will shut off, and then the fastboot mode will appear on the screen. This time, towards the bottom, the it will inform you that your device state is “unlocked” in red text as opposed to “locked” in green text.

Step 14: now can run the > fastboot flash boot < command.

$ fastboot flash boot /Users/whateveryourcomputernameis/Downloads/calyxos/magisk_patched-23000_OAowV.img

So you can type in fastboot flash boot and type in the entire path where your patched img file is located on your mac, OR you can easily drag and drop the file into your terminal. Make sure there is a space after boot and before the beginning of your directory (folder path)

Once you have this, press enter on your mac. The terminal will immediately inform you of the progress telling you it is sending it to a soecific boot slot (usually a or b), then writing that boot slot, and then finished. It usually takes 2-3 seconds.

Step 15: once this is execute, go to your device. It should still be in the fastboot mode indicating to you its in the unlocked state. On the top right side of the screen, it should say “start. Press the physical power next to it to turn on your device.

Another screen appears saying that the bootloader is unlocked. This will always appear on your device each time you turn off your device and turn it back on.

Step 16. Your calyxos starts up and you have to setup your device. Connect to wifi. . Go through the setup process. Downlod all the default calyx apps.

You system is rooted. Go to your app section of the device and open up magisk. Magisk message will appear asking you to update it. After you click ok, another message appears saying that magisk isnt working properly and asking you to reboot. Disregard this. The most likely seems to ve the reason to this is that the calyxos is a completely different operating system than stock android. Its even a bit different than the AOSP open source android os. So the internal file system and system settings may be slightly different which may account for this glitch in magisk. That is because magisk is originally pure android app, and now its running on a calyx version of the os. Just click cancel, no need to reboot. Once you finished with magisk, You can check your newly rooted device running on calyxos by opening your app section, opening the Aurora Store (the degoogled anonymized version of the Google Play store). Setup the aurora store. You can log into google or you can actually log in anonymously. Once the store is setup up, and you are directly in, search for the root checker app by free android tools. It is a free app. Install it, open it.

Rooting Calyxos

OS Driver: Mac OS

Using Macos, the entire process of rooting and flashing custom rom images will be used in the terminal app in macos. Ensure that you download the adb tools from android to ensure that the frameworks necessary are installed so that the terminal can startup the daemon to use adb tools

Steps

Note: these are steps AFTER you have installed calyxos. To actually install calysox on your pixel device, refer to the extremely easy steps outlined in the calyxos website here

Step 1: AFTER having flashed (installed) calyxos onto your pixel device, open terminal and you want to change your directory to the very folder that the calyxos firmware you originally downloaded to actually flash the os on your pixel is located. Example, if you have the firmware you downloaded from calyxos website into a unique folder, for example “calyx” inside of the downloads folder, then it is NOT enough to have the terminal where you are executing commands to simply be within the home folder or downloads folder. You must change your directory (cd) into the calyx folder or whatever folder you have the firmware directly inside of. Thus if the firmware is in the folder path home/Downloads/calyx and your terminal is in the downloads directory, you must type in

$ cd calyx

In order to link your terminal execution commands directly in the same directory that the firmware is located.

Step 2: It is advised that you just complete the initial setup of calyxos. Do not perform extra tasks like setting up passwords, fingerprint scans, sign into accounts, etc because rooting the phone in calyxos will wipe the phone back to the beginning of calyxos setup, as is normal when rooting any android rom. It will wipe the custom setup data of the device and you will have to redo all the setup options. Hence it is advised, in order to save time and energy, to just simply breeze through the setup without actually setting up extra personalized custom options. You dont even need to setup wifi with the password as the moment you flashed calyx, you can immediately root it.

If you have already had calyxos installed and revamped your phone to custom settings, apps, etc, it is advised that you backup your phone if you havent setup your Nextcloud account in calyxos. This is because rooting the device will wipe all the customs settings and will be as if you had originally flashed calyxos for the first time, except only rooted. So be advised if you have sensitive data you wish to keep, backup the device first prior to rooting.

AFTER having installed calyxos, the program will have you re-lock the bootloader as a protective measure. The bootloader simply allows the user to flash custom roms, in this case, calyxOS. It does not actually root the device.

Step: 3 because you have installed new firmware, after breezing through the set up, once you are in the OS, open up the settings app and scroll to about phone. Scrolll down to build number and tap on it 7 times. This will enable the user as a developer and will unlock the developer options in system. Once complete, go back out into settings, and tap on system. Click advanced, tap developer options and tap on “OEM unlocking”. A message will appear on the screen warning the user that device protection features wont work while this setting is enabled. Click enable anyway. Make sure you scroll down after that to usb debugging and enable it. A message will appear informing you this is for development purposes. Tap ok! Another message will appear on the screen if the device is connected to your computer asking you if you wish to “Allow USB debugging”

Click the box that is there to enable “always allow from this computer” and then click allow.

Step 4: install magisk apk in calyx. This can be performed several ways. I will offer two ways A. You can use the default browser on calyxos which is duckduckgo. Simply type “magisk github” in the search bar. The very first link is the direct link to the actual platform of the developer of magisk where you can download it directly from. It is from topjohnwu. Go to github. Scroll down to doenloads section. You will see three small tabs. The magisk latest version, the magisk beta, and magisk canary. I advise to download the original latest public release, not the beta or canary version. In the time of writing this, the version is magisk v23.0. Click on it. Scroll to the bottom. Where it has a small arrow and says “Assets” and the number 5. Click on this and a dropdown window appears listing all five you want to actually download the apk.

A popup window will ask you to allow duckduckgo access to your photos and media. Tap allow! It will download in the background without you noticing. A few seconds and the file is in your system

Step 5: go to homescreen, scroll up to conjure up your apps, open the files app. After it opens, you should immediately see the magisk apk. Click on it. A popup window pops up informing you that for your security, your phone is not allowed to install unknown apps from this source. Click on settings in that popup window. A new window appears asking you to allow duckduckgo with a toggle and a note on the left of the toggle “allow from this source”. Enable the toggle. Click back. Once back, the app will ask you to cancel or install. Click install.

Step 6. Now we get into the meat and potatoes. On your mac, go DIRECTLY to the calyxos firmware you downloaded. For example, the firmware for the pixel3 will be “blueline-factory-2.8.0.zip.

You want to extract the zip file.

Step 7. You should see various scripts inside the folder that was just extracted in step 6. There is also a folder. In the blueline version, the folder is labelled “image-blueline-rq3a and numbers after it. It is a folder. Go inside the folder. You should see several image files inside this folder. THEE image file you need is the one that says “boot.img”.

Step 8. In terminal. You want to push this very file into your pixel device. The way you would do that is with the adb push command. Thus, in my case, this is the text I would insert into terminal to execute this command.

$ adb push /Users/yourprofilename/Downloads/calyxos/blueline-rq3a.210805.001.a1/image-blueline-rq3a.210805.001.a1/boot.img /sdcard/

This command is composed of 3 functions

  1. Adb push, that is the command to take the file and push it onto the device. Make sure there is a space between the end of this command and the next string of text

  2. The next string of text is literally the folder path of where this boot.img file is located on your computer. Make sure there is a space after the g

  3. The last string of text is the path to where you are pushing this img file onto your device. In this case, it is /sdcard/.

Once you have your string of text in total, press enter on your mac. The terminal will immediately give you an updating percentage to show how long it will take to push the file onto your device. The action will literally only take like a couple of seconds.

Step 9. Now. On your phone, after you pushed the .img file using terminal, open the magisk app. On the right of “magisk”, you should see an install option. Tap install.

Step 10: it takes you to a new screen with data of the new magisk app. At the top portion of that screen, it says method, and below it, you should see a bubble and it says select and patch a file. Tap on it. A new window appears in the form of a file browser. Click the 3 lines at the very top left corner. A side panel appears. Click on your device. Example. If you have a Pixel3 tap Pixel3. It will take you to the home folder. At the bottom, you should see the actual .img file that you pushed onto it from your mac using terminal. Tap on that .img file

Step 11. After clicking the .img file, it takes you back to thr install window in magisk. On the right, tap “Let’s Go ->”

It takes you to a console window where it peforma the action of patching the boot image. The entire process takes a few seconds and it informs you of its progress. When its finished, it says the location of where it put the output file if you need to take a picture or write down that location, it would be good. It literally saves it in your downloads folder of the device.

Step 12: Now, you want to stroll back onto your mac’s terminal. Now we want to execute a different command. The adb pull command. Type in adb pull and then type the location in your device. And then leave a space, and then type two periods (..). This will pull that inage file from your device onto your computer and the .. will put it in your home folder. Fo to your homefolder and drag this patched img file into your folder where you are executing these commands in terminal. So the string of text to execute this would look something like this

$ adb pull /sdcard/download/magisk_patched-23000_rDY5k.img ..

Another method is, if you have Android File Transfer application, it makes this process much easier.

To use the Android File Transfer app on mac, you have to go to settings app in your device. Setting>system>Developer options. Now under developer options, you want to scroll down until you see the usb icon on the left and it says “Default USB configuration”. Tap it. Its usually set to “no data transfer” as default. From the list of options, you want to tap on “file transfer”. This will immediately open the Android File Transfer app on the mac and you will be able to see the folder system in the app. Simply click on download folder and you should see the patched img file that you just created in magisk. Drag and drop that file into your mac folder, specifically the path folder directory where your firmware folder is in.

Step 13: adb reboot bootloader Device state locked in green unlock the bootloader

Fastboot flashing unlock The screen will show you a warning sign if you unlock the bootloader. Use the volume keys up and down to select “unlock the bootloader”. Once you’ve selected “unlock the bootloader, press the power button next to it. The screen will shut off, and then the fastboot mode will appear on the screen. This time, towards the bottom, the it will inform you that your device state is “unlocked” in red text as opposed to “locked” in green text.

Step 14: now can run the > fastboot flash boot < command.

$ fastboot flash boot /Users/whateveryourcomputernameis/Downloads/calyxos/magisk_patched-23000_OAowV.img

So you can type in fastboot flash boot and type in the entire path where your patched img file is located on your mac, OR you can easily drag and drop the file into your terminal. Make sure there is a space after boot and before the beginning of your directory (folder path)

Once you have this, press enter on your mac. The terminal will immediately inform you of the progress telling you it is sending it to a soecific boot slot (usually a or b), then writing that boot slot, and then finished. It usually takes 2-3 seconds.

Step 15: once this is execute, go to your device. It should still be in the fastboot mode indicating to you its in the unlocked state. On the top right side of the screen, it should say “start. Press the physical power next to it to turn on your device.

Another screen appears saying that the bootloader is unlocked. This will always appear on your device each time you turn off your device and turn it back on.

Step 16. Your calyxos starts up and you have to setup your device. Connect to wifi. . Go through the setup process. Downlod all the default calyx apps.

You system is rooted. Go to your app section of the device and open up magisk. Magisk message will appear asking you to update it. After you click ok, another message appears saying that magisk isnt working properly and asking you to reboot. Disregard this. The most likely seems to ve the reason to this is that the calyxos is a completely different operating system than stock android. Its even a bit different than the AOSP open source android os. So the internal file system and system settings may be slightly different which may account for this glitch in magisk. That is because magisk is originally pure android app, and now its running on a calyx version of the os. Just click cancel, no need to reboot. Once you finished with magisk, You can check your newly rooted device running on calyxos by opening your app section, opening the Aurora Store (the degoogled anonymized version of the Google Play store). Setup the aurora store. You can log into google or you can actually log in anonymously. Once the store is setup up, and you are directly in, search for the root checker app by free android tools. It is a free app. Install it, open it.

On root status, click “check”. A pop up window appears asking you to deny or grant this app root status and it gives you 10 seconds or else it will time out. You want to make sure you grant it root status before that timer is up. Once granted, it will show that your pixel device is now rooted.

###### Installing Nethunter

Now the device is ready to install nethunter. Nethunter is really not an entire os, it is more like a script that installs various applications onto the device. Since the device is already rooted, all I did was simply download the nethunter store so that you could access the various tools within the store and install them directly onto the device. No need to add/flash the nethunter image onto the device since that was technically part of the rooting process outlined above. The store can me accessed here https://store.nethunter.com/ On root status, click “check”. A pop up window appears asking you to deny or grant this app root status and it gives you 10 seconds or else it will time out. You want to make sure you grant it root status before that timer is up. Once granted, it will show that your pixel device is now rooted.

###### Installing Nethunter

Now the device is ready to install nethunter. Nethunter is really not an entire os, it is more like a script that installs various applications onto the device. Since the device is already rooted, all I did was simply download the nethunter store so that you could access the various tools within the store and install them directly onto the device. No need to add/flash the nethunter image onto the device since that was technically part of the rooting process outlined above. The store can me accessed here https://store.nethunter.com/

#bootloader #calyxos #rooting