DM Verity and Force Encryption disabling on Nexus 5X for Kali Nethunter installation - Nexus 5X Q&A, Help & Troubleshooting

Hi,
GOAL: I'm trying to flash Kali Nethunter on my Nexus 5X (bullhead)
MIDD: This boils down to try to disable dm-verity and force-encryption from my Nexus 5X (bullhead).
STEP: I have a rooted, TWRP'ed phone on (alledgedly) stock ROM, disabling both FAILs
Let's 1st state my safety nets
1. I went the safe route : Fastboot > Temporary TWRP through fastboot > Full backup
2. So I have carefully backed up every partition, literally boot.emmc.win, data.ext4.win, efs1.emmc.win, efs2.emmc.win, recovery.emmc.win, system.ext4.win000, system.ext4.win001, system_image.emmc.win, vendor.ext4.win, vendor_image.emmc.win
3. I can at any time restore my phone - it was a huge step, using fastboot + twrp + the backup above
4. Then I installed magisk, produced a dm-verity-enabled and encryption-enabled boot partition copy
5. Then flashed this boot, then had root, then added twrp app, and gained permanent TWRP
6. Now I'm fine with a safe backup at that point
That said (100% clear : I can try anything out of deleting fastboot - if that's even a thing )
Guys .. I have a real corner case :
1. I want to flash NetHunter .. brings error "Can't write to /system"
2. OK I (think I) know that one : mount -o remount,rw /system && touch /system/test # .. oh crap
3. It looks like dm-verity-plus-encrypt switches prevent me from tinkering with /system
And that's where it becomes furry
4. I adb push my boot.emmc.win as /sdcard/boot.emmc.win.img
5. I use magisk to "disable dm-verity" and "disable force-encrypt" [screenshot Screenshot_20210416-131341.png] .. and patch that boot image. The result is some magisk_patched_kSiHo.img [screenshot Screenshot_20210416-131422.png]
6. I rename this to /sdcard/TWRP/boot.emmc.NOVERITY.NOENCRYPTION.img and go to TWRP
7. In TWRP I use *this* image to flash boot, and *format* (not wipe) data and *format* cache
8. Cross fingers, pray, reboot .. FAIL : Google white logo doesn't move - no fancy colorful anim
9. I flash back my stuf, go to step 4 state again, and decide I may have made a typo
10. I triple check the original boot.emmc.win.img, put it again on sdcard, go through magisk again with the same options
11. I get a alledgedly bullet-proof BOOT image again [screenshot Screenshot_20210416-131841.png], copy it to /sdcard
12. I decide to do it hardcore-style [screenshot EXTRACT 2021-04-16 à 13.22.21.png] and issue a fastboot flash boot boot.emmc_nodmverity_noencryption.win && fastboot format userdata && fastboot format cache
Now I can't possibly have typed things wrong and I'm hoping to
* Have wiped all my data (format userdata)
* Have gotten RID OF dm-verity and encryption
* Be able to boot the partition without android needing to decrypt it
And the result is ... tadaa .. FAIL
RESULT: A white "Google" logo forever (1 night so > 6h) without Android booting. Time to restore.
So .. I don't have dm-verity and force-encryption disabled. The boot partition is (still, to date) dm-veritied and data encrypted and .. the Kali Nethunter zip fails to Install using TWRP because it fails to mountpoint /system || mount -o remount,rw,seclabel /system .. and in fact it mounts but then fails to write to any /system/some_file (and TWRP terminal show the impossibility to even touch /system/hello_world # readonly filesystem)
Any checklist/hint/manual/request_for_getprop_or_info is welcome !

For some reason /system had become non-writable and non-mountable (rw).
I don't have any data on the phone so I went down the strong route :
* Using https://dl.google.com/dl/android/aosp/bullhead-n4f26u-factory-e6420fc1.zip to extract the cache.img
* Using https://dl.google.com/dl/android/aosp/bullhead-opm7.181205.001-factory-5f189d84.zip for every other partition
I did the following, which works :
Code:
fastboot format userdata \
&& fastboot format cache \
&& fastboot flash bootloader bootloader-bullhead-bhz32c.img \
&& fastboot reboot-bootloader \
&& sleep 6 \
&& fastboot flash radio radio-bullhead-m8994f-2.6.42.5.03.img \
&& fastboot reboot-bootloader \
&& sleep 6 \
&& fastboot erase cache \
&& fastboot flash cache cache.img \
&& fastboot flash boot boot.img \
&& fastboot flash recovery recovery.img \
&& fastboot flash vendor vendor.img \
&& fastboot flash system system.img \
&& fastboot boot ~/Downloads/twrp-3.5.2_9-0-bullhead.img \
&& sleep 30 \
&& adb push ~/Downloads/Magisk-v22-0.zip /sdcard/Magisk-v22-0.zip
At that point I had a *stock* ROM with TWRP booted temporarily, Magisk on the sdcard and no encrypted data partition.
I flashed Magisk and rebooted the phone.
After configuring Android (first boot overwhelmingly long wizard) I found out I had root and a writable /system . I don't know why it had become read-only. Something between dm-verity, encryption, using the TWRP app instead of the img and (probably) a shadow /system that gets re-signed and archived in /data with verity_keys each time.
Problem #1 solved. Onto the next - Kali NetHunter now installs in TWRP .. but does not boot.

I found a reproducible way to install Kali NetHunter on a Nexus 5X (in March 2021, in case you bump on this thread in the 'future')
Do this at your own risk. While it works, it erases everything on your phone. Please learn how to backup and use fastboot and TWRP first
Scope :
Model Nexus 5X, codename bullhead
A spare phone, you will erase everything on it by following the instructions
Installation of Android 8.1.0 OREO, namely https://dl.google.com/dl/android/aosp/bullhead-opm7.181205.001-factory-5f189d84.zip
With the addition of cache.img from a 7.1 archive, namely https://dl.google.com/dl/android/aosp/bullhead-n4f26u-factory-e6420fc1.zip
Installation of SuperSU 2.82, namely SR5-SuperSU-v2.82-SR5-20171001224502.zip from https://download.chainfire.eu/1220/SuperSU/SR5-SuperSU-v2.82-SR5-20171001224502.zip/
Installation of Kali NetHunter 2021.1, namely https://images.kali.org/nethunter/nethunter-2021.1-bullhead-oreo-kalifs-full.zip
All this using fastboot and TWRP 3.5.2, namely https://dl.twrp.me/bullhead/twrp-3.5.2_9-0-bullhead.img.html
You, a fluent Linux (preferably) user with some knowledge of fastboot and adb - including the proper google USD drivers installed if on windows. You've been warned
Enough warnings. After long and painful weeks of tests I finally succeeded in installing NetHunter on Nexus 5X, the crucial point being SuperSU works whereas M.a.g.i.s.k does not (redacted to prevent search to get here)
Step 1​Download the prerequisites, create an install directory on your pc
Unzip there bullhead-n4f26u-factory-e6420fc1.zip/cache.img
Unzip there bullhead-opm7.181205.001/image-bullhead-opm7.181205.001.zip/*.img
Using the key combo POWER + Volume Down, boot in fastboot mode.
Connect your phone to the PC/Mac/Linux
Step 2​Here goes the (non-bricking but) destroying commands
Code:
D=YOUR_INSTALL_DIR
cd $D
fastboot format userdata \
&& fastboot format cache \
&& fastboot flash bootloader $D/bootloader-bullhead-bhz32c.img \
&& fastboot reboot-bootloader \
&& sleep 6 \
&& fastboot flash radio $D/radio-bullhead-m8994f-2.6.42.5.03.img \
&& fastboot reboot-bootloader \
&& sleep 6 \
&& fastboot erase cache \
&& fastboot flash cache $D/cache-bullhead-n4f26u.img \
&& fastboot flash boot $D/boot.img \
&& fastboot flash recovery $D/recovery.img \
&& fastboot flash vendor $D/vendor.img \
&& fastboot flash system $D/system.img \
&& fastboot boot $D/twrp-3.5.2_9-0-bullhead.img \
&& sleep 30 \
&& adb push $D/SR5-SuperSU-v2.82-SR5-20171001224502.zip /sdcard/SR5-SuperSU-v2.82-SR5-20171001224502.zip
Your phone should now be inside the TWRP gui (if necessary slide to answer "yes I want to modify the system partition")
Step 3​
From within TWRP, choose "Install"
Select SR5-SuperSU-v2.82-SR5-20171001224502.zip
Wait for the end of the install
Also run Wipe Davik/Cache
Select reboot > system
Your phone should boot within less than 2 mins in normal Stock Android 8.1.0. Configure it slightly (especially the wifi) and on to the next step
Step 4​
Boot again in TWRP mode
Code:
fastboot boot $D/twrp-3.5.2_9-0-bullhead.img
Now transfer the Kali NetHunter image from the PC
Code:
adb push nethunter-2021.1-bullhead-oreo-kalifs-full.zip /sdcard/nethunter-2021.1-bullhead-oreo-kalifs-full.zip
At the end (~20mins) run Wipe Davik/Cache
Select and run reboot > system
Wait for the ~1min for 1st boot
Enjoy !

Related

Pre Rooted PATCHED_BOOT.IMG (10.0.4) for Magisk Root

Original tutorial located at https://forum.xda-developers.com/oneplus-7t/how-to/guide-how-to-root-oneplus-7t-twrp-t3979307
Hello all. Just providing this file for convenience. All credit goes to original author of the guides. This file is a pre-rooted, magisk patched boot.img for firmware version 10.0.4. Use this boot.img for flashing/booting if you are on version 10.0.4 and want to have root using magisk.
!!!I AM NOT RESPONSIBLE FOR ANY DAMAGE DONE TO YOUR DEVICE. USE COMMON SINCE AND YOU WILL BE OK!!​
STEP 1 - Put phone into fastboot mode
Code:
adb reboot fastboot
STEP 2 - Boot the patched boot.img. Download here
Code:
fastboot boot patched_boot_10.0.4.img
STEP 3 - Backup current boot.img. Open an adb shell and find which block device contains your boot partition and then using dd, make a copy of it.
Open ADB Shell
Code:
adb shell
then
Code:
su
Find boot partition
Code:
ls -lah /dev/block/bootdevice/by-name | grep -i boot
You will see something like this as output:
boot_a -> /dev/block/sde11
boot_b -> /dev/block/sde38
Make copy of boot partition(s)
Code:
dd if=/dev/sde11 of=/sdcard/boot_backup.img
DO THIS FOR BOTH BOOT PARTITIONS, LABEL ACCORDINGLY. JUST IN CASE!
Backup boot.img file(s) to PC
FROM YOUR PC, OPEN COMMAND PROMPT AND DO FOR BOTH IMAGES.
Code:
adb pull /sdcard/boot_backup.img
STEP 4 - Install magisk manager
Get magisk manager APK from here. Download the app-release.apk and install on phone.
Code:
adb install app-release.apk
STEP 5 - Open magisk manager and select Install -> Direct Install.
After you have completed the above steps, if everything worked correctly, and you followed the steps with common sense, everything should be good to go.
The download link is not working. Do you still have a patched 10.0.4 boot image?

Looking to hire tech $upport for Moto G7 Play --> /e/ Project Conversion

Money. $$$$$$$$$$$$$$$$$$$$$$
I need HELP in de-soft-bricking my Moto Play G7 and installing the /e/ project (or perhaps other Linux-based build), and I am willing to PAY for tech support to walk me through it (ideally via Skype or Zoom platform). Here are a few more specifics:
I bought a used Moto G7 Play that was updated by a developer from Android 9 to Android 10. I followed tutorials to unlock the phone and install TWRP via ADB but ran into problems, as far as I can tell, due to the Motorola A-B slot issue (it says "No bootable A/B slot, failed to boot Linux, falling back to fastboot" when I try to reboot). I can no longer recover the phone to Android or reset it to "factory" settings via the bare-bones Android and Motorola phone menus, but I remain able to issue commands via ADB / USB and also navigate to the G7's bootloader menus by using the buttons on the side of the phone. As for my PC platforms, I am running Win 10 (with ADB) but I also have Ubuntu running (so I could format SD cards to ext4 if that would help), and I have Android studio installed (not as if I know what to do with it), if that would be of any help. As far as I can tell, ADB and the Motorola USB drivers are working fine, and I USUALLY get positive indication when I type "adb devices", and I can always get the phone to acknowledge that the USB is connected/disconnected.
I don't know if this will help, but as I try to do the ADB sideload for copy-partitions.zip, this is where things don't work, as my Moto G7 play screen says:
Finding update package…
Opening update package…
Verifying update package…
E:footer is wrong
Update package verification too 0.2 s (result 1).
E: Signature verification failed
E: error:21
Installation aborted.
From there, it seems I can't go on to flash the TWRP image. Any ideas how I can work past these problems? Let me know how I can contact you via the forum and we can work $omething out. I'm guessing that this is a fast fix for someone who knows what they are doing. I'm sick of google and don't want to accept defeat! Thanks, -Andrew
Try the motorola rescue assistant
When it not workling download for your device the firmware
Instead of flashing TWRP, have you tried just booting TWRP w/o flashing?
fastboot boot twrp.img
I ran into some problems with my Moto G7 Play; I didn't softbrick it, but several things fought back, so I'll pass along what may get you back on track. First of all, I cannot use Linux to connect via fastboot, so I had to use a Mac, you can use your Windows box. Secondly, TWRP does not officially have a version for the G7 Play. I used an unofficial one from an XDA forum member HERE. It only offers a black screen unless you flash dtmo.img. I didn't want to flash dtmo.img, so I just used the black screen and used adb commands to install Lineage (and /e/) via TWRP command line.
The steps are pulled from another XDA posting showing how to use TWRP command line:
1. Connect the phone in fastboot mode to the PC, run fastboot devices to make sure it is connected.
2. Type: fastboot set_active b
Then: fastboot boot <your_recovery.img>, e.g. fastboot boot twrp.img
<phone will reboot, the screen will be black>
<wait to Windows new device sound>
3. Type: adb shell
twrp wipe cache << will not work on Moto G7 Play, but won't hurt anything.
twrp wipe dalvik
twrp wipe system
twrp wipe data <- NOW YOUR DATA WILL BE REMOVED, SO MAKE A BACKUP BEFORE!
twrp sideload
adb sideload <location_of_your_ROM.zip>, e.g. adb sideload C:\lineage-xyz.zip
IF THE TWRP commands do not work and hang saying something about "starting TWRP", I discovered by looking at the log in /tmp that /sdcard is encrypted. You will need to unencrypt /sdcard and I'm not sure how to do that without recovery; I'm sure there is way, though.
If I were you, I would see if you can flash LineageOS (or lineageOS + microG) with this method to get your phone back working, then you can move on to /e/. Note that if this works, you will have a recovery program available (the standard Lineage recovery), which has some basic tools. You CAN ONLY load Lineage-signed roms with this recovery. So if you want to switch from lineage to /e/ or to lineage+microG, you will need to use the twrp method above to switch to the other rom. Then you can use the lineage or /e/ recovery to install lineage or /e/ updates from the same publisher.
Also, if you install stock lineage, don't use a bleeding edge version. Pick one from mid-October so if you decide to switch to /e/ or Lineage+microG you will not be downgrading because they don't make nightly builds. It probably won't hurt since downgrading a week probably has few changes, but just in case.
Hope this helps.
maw1 said:
Try the motorola rescue assistant
When it not workling download for your device the firmware
Click to expand...
Click to collapse
I tried the Motorola Device Manager tool. Not sure if I made a good backup to begin with, and now I try to open the tool it doesn't seem to do anything.
xtermmin said:
Instead of flashing TWRP, have you tried just booting TWRP w/o flashing?
fastboot boot twrp.img
Click to expand...
Click to collapse
Tried that... It says it FAILED.
C:\adb>fastboot boot twrp.img
downloading 'boot.img'...
OKAY [ 0.427s]
booting...
FAILED (remote failure)
finished. total time: 1.054s
Exinu said:
I ran into some problems with my Moto G7 Play; I didn't softbrick it, but several things fought back, so I'll pass along what may get you back on track. First of all, I cannot use Linux to connect via fastboot, so I had to use a Mac, you can use your Windows box. Secondly, TWRP does not officially have a version for the G7 Play. I used an unofficial one from an XDA forum member HERE. It only offers a black screen unless you flash dtmo.img. I didn't want to flash dtmo.img, so I just used the black screen and used adb commands to install Lineage (and /e/) via TWRP command line.
The steps are pulled from another XDA posting showing how to use TWRP command line:
1. Connect the phone in fastboot mode to the PC, run fastboot devices to make sure it is connected.
2. Type: fastboot set_active b
Then: fastboot boot <your_recovery.img>, e.g. fastboot boot twrp.img
<phone will reboot, the screen will be black>
<wait to Windows new device sound>
3. Type: adb shell
twrp wipe cache << will not work on Moto G7 Play, but won't hurt anything.
twrp wipe dalvik
twrp wipe system
twrp wipe data <- NOW YOUR DATA WILL BE REMOVED, SO MAKE A BACKUP BEFORE!
twrp sideload
adb sideload <location_of_your_ROM.zip>, e.g. adb sideload C:\lineage-xyz.zip
IF THE TWRP commands do not work and hang saying something about "starting TWRP", I discovered by looking at the log in /tmp that /sdcard is encrypted. You will need to unencrypt /sdcard and I'm not sure how to do that without recovery; I'm sure there is way, though.
If I were you, I would see if you can flash LineageOS (or lineageOS + microG) with this method to get your phone back working, then you can move on to /e/. Note that if this works, you will have a recovery program available (the standard Lineage recovery), which has some basic tools. You CAN ONLY load Lineage-signed roms with this recovery. So if you want to switch from lineage to /e/ or to lineage+microG, you will need to use the twrp method above to switch to the other rom. Then you can use the lineage or /e/ recovery to install lineage or /e/ updates from the same publisher.
Also, if you install stock lineage, don't use a bleeding edge version. Pick one from mid-October so if you decide to switch to /e/ or Lineage+microG you will not be downgrading because they don't make nightly builds. It probably won't hurt since downgrading a week probably has few changes, but just in case.
Hope this helps.
Click to expand...
Click to collapse
Thanks for the effort, Exinu, but it seems to not fully recognize the command or is looking for another flag or operand. The "set_active b" command that you proposed just results in making a list like for a "help" or unspecified command. As you can see below, I tried other variations of the command after I tried searching out more details. I also tried "fastboot set_active=b" and it does the same thing with the listing. I'm assuming that it's not accepting this command. I did try the twrp-dirtyport image as well, but as you can see below, that created an error as well:
C:\adb>fastboot --set_active b
fastboot: unknown option -- set_active
C:\adb>fastboot --set-active=b
fastboot: unknown option -- set-active=b
C:\adb>fastboot set_active b
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
flashing lock locks the device. Prevents flashing partitions
flashing unlock unlocks the device. Allows user to flash any partition except the ones that are related to bootloader
flashing lock_critical Prevents flashing bootloader related partitions
flashing unlock_critical Enables flashing bootloader related partitions
flashing get_unlock_ability Queries bootloader to see if the device is unlocked
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot [bootloader] reboot device, optionally into bootloader
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
C:\adb>​
I did try the next step with the dirtyboot but that seem to have failed as well.
C:\adb>fastboot boot twrp-dirtyport-g7play.img
downloading 'boot.img'...
OKAY [ 0.570s]
booting...
FAILED (status read failed (Too many links))
finished. total time: 1.566s​
On my phone on the "Bootloader logs" screen, it said (before I began)
Start Up Failed:​Your device didn't stat up successfully.
Use the Software Repair Assistant on computer to repair your device.
Connect your device to your computer to get
the Software Repair Assistant.
AP Fastboot Flash Mode (Secure)
No bootable A/B slot
Failed to boot Linux, falling back to fastboot
Fastboot Reason: Fall-through from normal boot mode
USB Connected​
I then typed fastboot devices from my windows C:\ADB prompt and it showed me it was connected.
After running the stuff mentioned above, it said:
cmd: download:01348000
cmd: boot
Incomplete boot image for booting.
I disconnected and reconnect the USB and then I tried the fastloading of the dirtyport image again. The screen went blank and said the same stuff again with no bootable A/B slot, which leaves me to believe this is where my problem starts.
Any other ideas?
Any ideas
I think you may have several issues that need to be fixed one step at a time. First, I think you have an old fastboot if it doesn't recognize the set_active command. Go to this link: https://developer.android.com/studio/ and scroll down to the section labeled "Command Line tools only" and download the command line tools. Make sure you are in that directory in Windows so you are running the newer version and not the old version installed. If you run "fastboot --help" you should see set_active as an option.
Next, where did you get the TWRP? Go to the link I provided, which has a (black screen) TWRP that I have used and it works. Start from there and see how things proceed.
Exinu said:
I think you may have several issues that need to be fixed one step at a time. First, I think you have an old fastboot if it doesn't recognize the set_active command. Go to this link: https://developer.android.com/studio/ and scroll down to the section labeled "Command Line tools only" and download the command line tools. Make sure you are in that directory in Windows so you are running the newer version and not the old version installed. If you run "fastboot --help" you should see set_active as an option.
Next, where did you get the TWRP? Go to the link I provided, which has a (black screen) TWRP that I have used and it works. Start from there and see how things proceed.
Click to expand...
Click to collapse
I got the TWRP from the link that you provided. As for running "fastboot --help", I did not see the "set_active" flag listed as an option (results pasted below). I also tried to download the command line tools as suggested, but not positive as to which directory they are to reside in, or which of the files I should launch. I unzipped the commandlinetools directory (in my adb directory) and tried running the sdkmanager.bat batch file which was nested in one of the subdirectories (it briefly opened and flashed a window but seemed to do nothing more). Not sure if this matters, but I also have android studio installed, although I am not sure how or where the "set_active" command comes from. I tried downloading windows latest PowerShell, and have also tried CMD as adminstrator. From my searching, I see people using "--set-active" with android commands as well, but I really don't know if this is a MS/DOS based command that is used for controlling drives and partitions on the Windows system, or if it's an adhock SDK - Linux add-on command of sorts. I can't seem to find much info on the command.
This is how it reads:
PS C:\adb> fastboot --help
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
flashing lock locks the device. Prevents flashing
partitions
flashing unlock unlocks the device. Allows user to
flash any partition except the ones that are related to bootloader
flashing lock_critical Prevents flashing bootloader related
partitions
flashing unlock_critical Enables flashing bootloader related
partitions
flashing get_unlock_ability Queries bootloader to see if the device is unlocked
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot [bootloader] reboot device, optionally into bootloader
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
PS C:\adb>​
PS C:\adb> set_active
set_active : The term 'set_active' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ set_active
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (set_active:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Any other ideas?
The command-line tools download should not require any installation; at least, the Mac version did not. Unzip the file to your desktop. Then open a command prompt which should open in c:\Users\your_user . Enter "cd Desktop" to change to the Desktop folder, then cd <foldername> to change into the folder you unzipped the files into. Windows will sometimes unzip a folder into a second folder, so you may need to cd <foldername> once more. In any case, enter "dir" to make sure you see files like fastboot.exe, adb.exe, etc.
In Windows, when you type a command it will first look to your current directory and run the exe file that exists there, if it exists. If it does not, then it starts looking for the command in your %PATH% environment variable. That's why you need to "cd" to the tools directory: when you run "fastboot", you want it to run fastboot.exe in that directory, and not the old fastboot.exe that is installed somewhere on your system.
It sounds like you haven't worked with the command line much; I suggest you go through some tutorials on basic command line usage for both Windows and Linux; it will make tinkering with computers and phones much easier. And set_active is not a DOS/Windows command, it is parameter you are passing to fastboot.exe to tell it what action you want it to do; it just also calls these actions "commands". So when you typed c:>set_active, you told Windows to find a file called set_active.exe and run it. That file does does not exist, so it did not work.
Quick note: the Unix command line will not run a command from the current directory for multiuser security reasons; you need to specify the current directory (dot) and a slash on the command like this: ./fastboot
This will also work with DOS/Windows, but usually the backslash is used instead of the forward slash, for very old historical reasons.
Exinu said:
The command-line tools download should not require any installation; at least, the Mac version did not. Unzip the file to your desktop. Then open a command prompt which should open in c:\Users\your_user . Enter "cd Desktop" to change to the Desktop folder, then cd <foldername> to change into the folder you unzipped the files into. Windows will sometimes unzip a folder into a second folder, so you may need to cd <foldername> once more. In any case, enter "dir" to make sure you see files like fastboot.exe, adb.exe, etc.
In Windows, when you type a command it will first look to your current directory and run the exe file that exists there, if it exists. If it does not, then it starts looking for the command in your %PATH% environment variable. That's why you need to "cd" to the tools directory: when you run "fastboot", you want it to run fastboot.exe in that directory, and not the old fastboot.exe that is installed somewhere on your system.
It sounds like you haven't worked with the command line much; I suggest you go through some tutorials on basic command line usage for both Windows and Linux; it will make tinkering with computers and phones much easier. And set_active is not a DOS/Windows command, it is parameter you are passing to fastboot.exe to tell it what action you want it to do; it just also calls these actions "commands". So when you typed c:>set_active, you told Windows to find a file called set_active.exe and run it. That file does does not exist, so it did not work.
Quick note: the Unix command line will not run a command from the current directory for multiuser security reasons; you need to specify the current directory (dot) and a slash on the command like this: ./fastboot
This will also work with DOS/Windows, but usually the backslash is used instead of the forward slash, for very old historical reasons.
Click to expand...
Click to collapse
Exinu, thanks for your continued assistance. As it turns out the fastboot/adb version I was using didn't include the "set_active" command (I don't think it was a path problem as I was always typing commands from the in directory where the ADB software was downloaded). As I had tried to follow a number of different tutorials of the course of several weeks, some for the G7 play, and perhaps some for the G7 and others generic, I think the place on the web that I went for the original ADB package (or the ADB version) was the problem. I also found another copy of ADB on my drive (downloaded weeks ago) that was titled "Minimal ADB and Fastboot", and as it turns out, that version DID support the set_active operand (from the fastboot --help command). So, I was able to return to your initial directions to set the active partion to b as initially instructed (see below, but the phone also shows that the set_active:b command seemed to process without error). However, I was not able to do the next step of flashing the TWRP. I tried the TWRP version you suggested and linked to (the dirtyport version) and then also the "channel" version, which I understand to be designed for the G7 play, unlike the "river" version. In either case (dirtyport or channel) I get a new/different "usage: unknown command" error, as seen in text pasted below:
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot set_active b
Setting current slot to 'b'...
OKAY [ 0.176s]
finished. total time: 0.178s
C:\Program Files (x86)\Minimal ADB and Fastboot>dir
Volume in drive C has no label.
Volume Serial Number is EC2B-BC54
Directory of C:\Program Files (x86)\Minimal ADB and Fastboot
2020-11-27 01:42 PM <DIR> .
2020-11-27 01:42 PM <DIR> ..
2018-01-11 06:53 PM 1,784,320 adb.exe
2018-01-11 06:53 PM 97,792 AdbWinApi.dll
2018-01-11 06:53 PM 62,976 AdbWinUsbApi.dll
2015-08-09 01:50 PM 29,882 cmd-here.exe
2018-01-11 06:53 PM 853,504 fastboot.exe
2020-08-17 02:31 AM 1,456,678 logo.bin
2020-08-15 11:25 PM 27,848,704 twrp
2020-09-03 02:52 AM 27,133,952 twrp-dirtyport-g7play.img
2020-08-16 01:12 AM 17,307,289 twrp-installer-3.4.0-0-river.zip
2020-11-17 04:21 AM 23,298,048 twrp-moto-g7-play-channel-android-10.img
2020-08-15 11:25 PM 27,848,704 twrp.img
2020-11-27 01:27 PM 5,004 unins000.dat
2020-11-27 01:26 PM 717,985 unins000.exe
13 File(s) 128,444,838 bytes
2 Dir(s) 28,010,246,144 bytes free
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot twrp-dirtyport-g7play.img
fastboot: usage: unknown command twrp-dirtyport-g7play.img
Granted, I'm not a command line expert, but I have been playing with computers since the TRS-80 and the C64 and Apple IIe, and 8086 DOS stuff, and used to do QBasic programming as a kid, so in most cases, I can usually navigate myself through some hairy computer instructions to do whatever I need to do, unless the instructions themselves are hairy. I find that the Android Dev forums are predicated upon some knowledge of those platforms and are a rude awakening for those unfamiliar with the development history and architecture. Obviously, I'm going to extremes to try to de-google an Android phone (frankly I would be happier if there was more stuff on the market that already was preinstalled), as this google censorship and proposed contract tracing stuff is just getting out of hand and going too far... so this is my way of fighting back. I'd rather know nothing about ADB, but here I am.
Is there any chance you know how or why I am getting the "fastboot: usage: unknown command twrp..." error above, or how I can resolve it?
You are getting close. Your fastboot entry is a little off. It should be >fastboot boot <filename.img>. If the twrp img file is not in the current directory, you will need to provide the full path.
Exinu said:
You are getting close. Your fastboot entry is a little off. It should be >fastboot boot <filename.img>. If the twrp img file is not in the current directory, you will need to provide the full path.
Click to expand...
Click to collapse
OK, so that was a head-slapping "duh" moment on my end (using fastboot filename.img instead of fastboot boot filename.img). However, now that I've entered the right command I'm still having problems. As you indicate in your post above, the "fastboot boot" command did initiate the sequence, and the screen did go black, however, one of the screens that it went to only said "bad key" at the upper left hand corner.
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot twrp-dirtyport-g7play.img
downloading 'boot.img'...
OKAY [ 0.575s]
booting...
FAILED (status read failed (Too many links))
finished. total time: 1.580s​
As for my phone screen, it goes black and cycles saying "bad key" a few times, and after a few attempts it reverts to the Bootload logs screen, giving the same message it did that I started with.
Start Up Failed​
Your device didn't start up successfully.
Use the Software Repair Assistant on computer
to repair your device.
Connect you device to your computer to get
the Software Repair Assistant. ​AP Fastboot Flash Mode (Secure)
No bootable A/B slot
Failed to boot Linux, falling back to fastboot
Fastboot Reason: Fall-through from normal boot mode
USB Connected​
Exinu said:
You are getting close. Your fastboot entry is a little off. It should be >fastboot boot <filename.img>. If the twrp img file is not in the current directory, you will need to provide the full path.
Click to expand...
Click to collapse
OK, I after the "dirtyport" image didn't work, I went out on a limb and tried to flash a different img file, (first doing the set_active b command), typing:
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot twrp-moto-g7-play-channel-android-10.img
downloading 'boot.img'...
OKAY [ 0.496s]
booting...
OKAY [ 0.178s]
finished. total time: 0.679s​It briefly flashed the Moto screen and then went black. After this, with the black screen, it seemed like it was able to the "adb shell" command, although it seemed to not be able to take the TWRP commands:
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell
* daemon not running; starting now at tcp:5037
* daemon started successfully
channel:/ # twrp wipe cache
Unable to find partition for path '/cache'
Done processing script file
channel:/ # twrp wipe dalvik
Failed to mount '/data' (Invalid argument)
Done processing script file
channel:/ # twrp wipe system
E:Error with wipe command value: 'system'
Done processing script file
channel:/ # twrp wipe data
Failed to mount '/data' (Invalid argument)
Done processing script file
channel:/ # twrp sideload
C:\Program Files (x86)\Minimal ADB and Fastboot>adb sideload lineage-17.1-20201129-nightly-channel-signed.zip
Total xfer: 1.00x​
After this point it went back to the "bad key" and return to the Bootloger logs screen.
I'm assuming at this point if there is a failure in the TWRP command sequence (as suggested above) I shouldn't expect the latter commands to work. I also attempted to use the moto g7's built-in recovery menu that is available from pushing and holding the power and upper volume button. When I tried to "apply update from ADB" using the phone to initiate the effort, and then typed, C:\Program Files (x86)\Minimal ADB and Fastboot>adb sideload lineage-17.1-20201129-nightly-channel-signed.zip, the phone screen read as follows:
Supported APR: 3
Stopping adbd...
Now send the package you want to apply to the device with the "adb sideload ,filename"...
Finding update package...
Opening update package...
Verifying update package...
E: failed to verify whole-file signature Update package verification took 45.2 s (result 1).
E: Signature verification failed
E: error: 21
Installation aborted. ​
Exinu said:
You are getting close. Your fastboot entry is a little off. It should be >fastboot boot <filename.img>. If the twrp img file is not in the current directory, you will need to provide the full path.
Click to expand...
Click to collapse
Even though I was getting errors after the "WIPE" command, it seems like the adb shell is bringing about a linux-esque terminal of the channel image and I can see the files/directories. Using the LS command it seems that the folders you are mentioned are empty, with the exception that there is no "dalvik" directory:
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell
channel:/ # twrp
TWRP openrecoveryscript command line tool, TWRP version 3.3.1-0
Allows command line usage of TWRP via openrecoveryscript commands.
Some common commands include:
install /path/to/update.zip
backup <SDCRBAEM> [backupname]
restore <SDCRBAEM> [backupname]
wipe <partition name>
sideload
set <variable> [value]
decrypt <password>
remountrw
fixperms
mount <path>
unmount <path>
print <value>
mkdir <directory>
reboot [recovery|poweroff|bootloader|download|edl]
See more documentation at https://twrp.me/faq/openrecoveryscript.html
channel:/ # ls
acct config etc init.rc init.recovery.usb.rc persist plat_service_contexts res sideload tmp vendor_file_contexts vndservice_contexts
bin d external_sd init.recovery.hlthchrg.rc license plat_file_contexts postinstall root storage twres vendor_hwservice_contexts
bugreports data file_contexts.bin init.recovery.mksh.rc mnt plat_hwservice_contexts proc sbin sys ueventd.rc vendor_property_contexts
cache default.prop firmware init.recovery.qcom.rc odm plat_property_contexts product sdcard system usb_otg vendor_seapp_contexts
charger dev init init.recovery.service.rc oem plat_seapp_contexts prop.default sepolicy system_root vendor vendor_service_contexts​
Here are the directory contents:
channel:/ # cd data
channel:/data # ls
channel:/data # cd /
channel:/ # cd cache
channel:/cache # ls
channel:/cache # cd /
channel:/ # cd system
channel:/system # ls
channel:/system # cd /
channel:/ # cd dalvik
/sbin/sh: cd: /dalvik: No such file or directory​
When you went into recovery mode, was it Motorola's stock recovery or LineageOS's recovery (with the Lineage logo (the three circles))?
In any case, at least you have a working recovery. Error 21 simply means that the signature is on the firmware file is not what it was expecting. If you have a Motorola recovery, then it expects a Motorola-signed firmware. If it is the Lineage recovery, then it will only flash Lineage-signed firmware.
Your TWRP sideload command sure looks like it worked when it loaded the firmware, but if it had worked, you would have LineageOS recovery and it would say current slot: a. I don't remember if the stock Motorola recovery displays the current slot. When you tell fastboot to set_active b, it sets the current slot to b and then when you install the firmware it installs the firmware to slot a.
Exinu said:
When you went into recovery mode, was it Motorola's stock recovery or LineageOS's recovery (with the Lineage logo (the three circles))?
In any case, at least you have a working recovery. Error 21 simply means that the signature is on the firmware file is not what it was expecting. If you have a Motorola recovery, then it expects a Motorola-signed firmware. If it is the Lineage recovery, then it will only flash Lineage-signed firmware.
Your TWRP sideload command sure looks like it worked when it loaded the firmware, but if it had worked, you would have LineageOS recovery and it would say current slot: a. I don't remember if the stock Motorola recovery displays the current slot. When you tell fastboot to set_active b, it sets the current slot to b and then when you install the firmware it installs the firmware to slot a.
Click to expand...
Click to collapse
Exinu,
It looks like the fastboot set_active b command worked, in that my phone acknowledged it did, and the command prompt seemed to indicate the same. As for the phone screen, the Moto splash screen that flashed quickly (probably less than 1 second) did not have any hint of Lineage logo. I tried repeating the process and saw the logo a total of 3x. It was the C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot twrp-moto-g7-play-channel-android-10.img command that got me there (the "dirtyport" image you suggested didn't work) and it was before the attempt to flash the lineage image.
However, as for the ADB SHELL commands that you recommended, it didn't seem like they were doing what one might expect. Subsequent to the attempted TWRP commands in the shell, I tried to sideload the lineage system but it would not take, saying "bad key" on the upper LH side of the screen.
Is it possible that prior image flashing attempts have left some incompatible clutter on my phone (perhaps visible by means of exploring other folders or folder names via the ADB SHELL)? I've been working with Raspberry PI's and PC based OMV / Nextcloud servers in recent months and perceive that new installs seem inclined to revert to old files on occasion if not thoroughly formatted.
One thing I forgot to mention: since you are installing Lineage, you can use the Lineage recovery to install it. TWRP is only necessary for /e/ or other roms that do not have their own recovery. Try "fastboot boot" but specify the lineage recovery file.
Also, now that I review things again, I may have used this TWRP instead of the "dirty port" version. I don't know if it will make a difference, but it might be worth a try. Sorry, I guess I have too many irons in the fire right now and got it mixed up. Scroll down to abou t the third or forth comment and there is a google drive link. You just need the recovery.img. Do not flash the dtmo.img, just fastboot/boot the recovery image: https://forum.xda-developers.com/t/...y-custom-recovery-kernel-source-code.3933680/

how to install gapps on gsi without twrp

hello,
I have phone which do not support any kind of recovery like twrp or cwm.
Xiaomi Redmi Note 8 2021 arm64 a/b with project treble support.
i have succesfully installed and booted GSI on my Xiaomi Redmi Note 8 2021. With help of the DSU Sideloader.
I have installed GSI without gapps (google apps) so i can manualy pick gapps minimalisic set.
I have tried flash gapps directly from the phone with Ex Kernel Manager but it is giving me message "No space left on device"
My big question is if you can resize GSI system partition without TWRP? since Note 2021 does not support recovery, if yes how?
Or can you actually set bigger system partition than system image with this command ? --el KEY_SYSTEM_SIZE $(du -b system_raw.img|cut -f1) \
(following manual steps for gsi installation)
adb shell setprop persist.sys.fflag.override.settings_dynamic_system true
adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
-d file:///storage/emulated/0/Download/system_raw.gz \
--el KEY_SYSTEM_SIZE $(du -b system_raw.img|cut -f1) \
--el KEY_USERDATA_SIZE 8589934592
what would be number for 20GB size in this command? --el KEY_USERDATA_SIZE 8589934592 how i can write it correctly?
i have enough space to assign big userdata partition.

[Solved] Which partition to flash to install LineageOS (project treble) from TWRP on Blackview BV 4900 Pro?

TLDR: I am trying to install LineageOS from twrp but do not seem to be able to find the right partition to flash.
I have a Blackview BV 4900 Pro (aarch64 / MT6762v/Wd / arm64-v8a) on which I successfully installed twrp, flashed Magisk (24.3) and Disable_Dm-Verity_ForceEncrypt_11.02.2020.zip
I am trying to install lineage-19.1-20220510-UNOFFICIAL-arm64_bvS.img from Andy Yan's personnal build ( https://sourceforge.net/projects/andyyan-gsi/files/lineage-19.x/ ), but I am stuck.
When I try to install the lineage image from twrp, it asks which partition to flash among
- System_image
- Vendor_image
- Product_image
- Boot
- dtbo
- Recovery
- Persist Image
- Vbmeta
- Vbmeta System
- Vbmeta Vendor
- lk
- logo
- nvram
- TEE
- frp
- Super (Product, Vendor, System)
If I Try System_image, I have an error message "E: Cannot flash images to file systems". I can successfully flash on Super, but then nothing boots (I just have a black screen with "Fastboot mode" at the bottom, and I am indeed in fastboot mode).
What am I missing?
In twrp's log, I also have the error message "Failed to mount '/system_root' (Permission denied)", but that's it.
At this time, I am guessing that re-packaging a super.img with the current Product and Vendor image, but the lineage image for system, may be my best way forward.
Relevant threads:
- https://forum.xda-developers.com/t/...devices-with-dynamic-super-partition.4256667/
- https://forum.xda-developers.com/t/...ake-partitions-rw-in-super-partition.4120963/
- https://forum.xda-developers.com/t/...-superrw-featuring-makerw-read-write.4247311/
- https://www.hovatek.com/forum/thread-37896-page-3.html
- https://github.com/ADeadTrousers/an...om_LXL/blob/master/docs/HOW-TO-FLASH-SUPER.md
- https://forum.xda-developers.com/t/...midigi-a7-pro-amd64-a-only-with-twrp.4175241/
- https://forum.xda-developers.com/t/umidigi-devices-flashing-a-rom-gsi.4182673/
The most relevant being probably https://forum.xda-developers.com/t/...r-img-and-flashing-our-modifications.4196625/
So, yes, the correct way of proceeding was to a. repackage a super.img, and the b. flash it.
To repackage a super.img, the best is to follow the instructions at https://forum.xda-developers.com/t/...r-img-and-flashing-our-modifications.4196625/
In my case, I had to:
- Get the original
Code:
super.img
- Install simg2img
- Run
Code:
simg2img super.img super.ext4.img
- Pull the soucres at https://github.com/Exynos-nibba/lpunpack-lpmake-mirror
- Run
Code:
lpbinary/binary/./lpunpack super.ext4.img
- Pull together three images: the original vendor.img, the original product.img, and lineage-19.1-20220510-UNOFFICIAL-arm64_bvS.img
- Find the size of the super partition using https://android.stackexchange.com/a/247134/188657
- Use this python script ( https://forum.xda-developers.com/t/...shing-our-modifications.4196625/post-85096929 ) and run
Code:
python3 lpmakesimple.py lpbinary/binary/lpmake ./super.new.img 4294967296 system=./lineage-19.1-20220510-UNOFFICIAL-arm64_bvS.img,vendor=./vendor.img,product=./product.img
which outputted
Code:
lpbinary/binary/lpmake \
--metadata-size 65536 --metadata-slots 1 --device super:4294967296 \
--group main:4294103040 --partition system:readonly:2035568640:main \
--image system=./lineage-18.1-20220511-UNOFFICIAL-arm64_avS.img \
--partition vendor:readonly:312594432:main --image vendor=./vendor.img \
--partition product:readonly:1945939968:main --image product=./product.img \
--sparse --output ./super.new.img
And then flash super.new.img using
Code:
fastboot flash super super.new.img
and that was it!

Trying to install NetHunter on Nexus 5X that has Lineage-15.1 on?

I have looked and looked and still can't find any help so I thought I'd ask! I've been using Kali for the best part of 2 years and decided to give Nethunter a go.
Got myself a Nexus 5X, installed
twrp-3.6.2_9-0-bullhead.img
lineage-15.1-20220321-UNOFFICIAL-bullhead (rebooted after install)
Magisk-v25.2 (rebooted and verify app)
Got it rooted OK with Magisk, checked with Root Checker Basic.
So far so good.
Now I boot back into TWRP and try flashing:
nethunter-2022.2b-bullhead-oreo-kalifs-full
Which gets me to boot and the flaming Kali logo, then after 30 mins I'm still looking at it!
I also tried wiping it all and flashing the first three again then tried a different flavor of Nethunter and tried to flash:
nethunter-generic-armhf-kalifs-full-rolling-2019.03-13-0514
kernel-nethunter-bullhead-nougat-2019.03-13-0514 (I realise this is nougat and lineage 15.1 is Android 8.1 Oreo but thought it was worth a shot)
For a 3rd attempt I wiped and installed factory official 8.1 Oreo, then TWRP, then Magisk (same version as above), then the Nethunter directly from Nethunter.
AND as a last ditch attempt I wiped and installed factory official 8.1 Oreo, then TWRP, then Magisk.... THEN I transferred to internal storage:
KaliNethunter-v8.2(22).zip
kalifs-full.tar.xz
Then with Magisk I installed KaliNethunter-v8.2(22).zip, rebooted and opened the Nethunter app and used Kali Chroot Manager, however 'apt-get updates', 'apt-get install firmware-atheros' and 'ifconfig wlan1' doesn't work and it's just keeps giving me the error it's outdated plus it doesn't feel as baked in as if I was flashing it via TWRP!?
Soooooooo can anyone point me in the right direction of how to get this done please?
A lot of XDA posts are outdated or contain broken links.
I will caveat and say that this is not my everyday phone and understand the roms are not patched to the latest security and that's OK for what I need it for.
Thank you, thank you, and thank you for anyone that can help get this working.
Maybe it's a little bit late for this but the instructions stated here work:
DM Verity and Force Encryption disabling on Nexus 5X for Kali Nethunter installation
Hi, GOAL: I'm trying to flash Kali Nethunter on my Nexus 5X (bullhead) MIDD: This boils down to try to disable dm-verity and force-encryption from my Nexus 5X (bullhead). STEP: I have a rooted, TWRP'ed phone on (alledgedly) stock ROM, disabling...
forum.xda-developers.com
I slightly modified the script to:
#!/usr/bin/sudo bash
./fastboot format userdata \
&& ./fastboot format cache \
&& ./fastboot flash bootloader bootloader-bullhead-bhz32c.img \
&& ./fastboot reboot-bootloader \
&& sleep 10 \
&& ./fastboot flash radio radio-bullhead-m8994f-2.6.42.5.03.img \
&& ./fastboot reboot-bootloader \
&& sleep 10 \
&& ./fastboot erase cache \
&& ./fastboot flash cache cache.img \
&& ./fastboot flash boot boot.img \
&& ./fastboot flash recovery recovery.img \
&& ./fastboot flash vendor vendor.img \
&& ./fastboot flash system system.img \
&& ./fastboot flash recovery twrp.img \
&& ./fastboot boot twrp.img \
&& echo ENABLE read and write on partitions and install magisk \
&& sleep 30 \
&& ./adb push Magisk-v25.2.zip /sdcard/TWRP/ \
&& echo Flash NH with TWRP, clear caches and reboot into system \
&& echo ./adb push nethunter-2022.3-bullhead-oreo-kalifs-full.zip /sdcard/TWRP/ \
&& echo now copy and unzip this manually into /system/etc/firmware via terminal \
&& echo ./adb push firmware.zip /sdcard/TWRP/
And the firmware.zip can be found here:
GitHub - rithvikvibhu/nh-magisk-wifi-firmware: This Magisk module adds the required firmware for external wireless adapters to be used with NetHunter.
This Magisk module adds the required firmware for external wireless adapters to be used with NetHunter. - GitHub - rithvikvibhu/nh-magisk-wifi-firmware: This Magisk module adds the required firmwar...
github.com
Just zip this
nh-magisk-wifi-firmware/system/etc/firmware at master · rithvikvibhu/nh-magisk-wifi-firmware
This Magisk module adds the required firmware for external wireless adapters to be used with NetHunter. - nh-magisk-wifi-firmware/system/etc/firmware at master · rithvikvibhu/nh-magisk-wifi-firmware
github.com
and extract into /system/etc/firmware via terminal/unzip
If you need rw permissions issue mount -o rw,remount /system
Once NH is installed you can check what dongles may work with cat /proc/config.gz (that's the kernel config) on TWRP. I had the fortune to make one work (an old tplink dongle).
Hope it helps someone.

Categories

Resources