Trying to install NetHunter on Nexus 5X that has Lineage-15.1 on? - Nexus 5X Q&A, Help & Troubleshooting

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.

Related

[ROM] Ubuntu touch 15.04 Vivid Velvet Attempt

Hi there everyone of the Sony xPeria Z Ultra forum.
I'll release here an Ubuntu touch Vivid Velvet Rom in the few hours.
I can't test it because I'm on android, also I won't test it yet by me because I cannot search for a recovery working for the Ubuntu.
So, I'll release the ROM with the cyanogenmod 11 boot.img
ROM Link:
http://d-h.st/NVOP
With the following adb and fastboot commands You'll need to type this on a Terminal:
Code:
sudo adb kill-server
sudo adb start-server
adb devices
adb reboot bootloader
then:
sudo fastboot flash boot boot.img (cyanogenmod 11)
sudo fastboot flash system system.img
sudo fastboot flash userdata userdata.img
After this, do this right ahead:
Code:
sudo fastboot reboot
Go to the recovery through the button sequence
Than install the armhf system preinstalled tar.gz file on it.
I hope that's work.
Please reply the issues even the working stuff here on this topic.
Thank You so much
this is Xperia ZL forum... Sure you are right here, cause you wrote Xperia z ultra?
I'll move it. I've noticed now.

[Q] [SOLVED] Failed to create my own system.img

Hi all,
I'm trying to create my own system.img for the Nexus 7 2013 Wifi from the stock system.img from https://developers.google.com/android/nexus/images 5.0.2 LRX22G. Basically I did it the common way using the android repack tools http://forum.xda-developers.com/showthread.php?t=2600364 and I'm also using branch android-5.0.2_r1 from the git repo.
I'm flashing with the simple:
Code:
fastboot flash system mysystem.img
The problem I'm having is, even with an unmodified tree from system.img, the image I created always get the device stuck at the boot Google logo screen. If I flash the original system.img, then it is fine, so I think my flashing part is working.
The command line I used to create the image is:
Code:
./mkuser.img.sh -s /path/to/loop_mounted_system/ mysystem.img ext4 system 880803840
which will run:
Code:
make_ext4fs -s -T -1 -l 880803840 -a system mysystem.img /path/to/loop_mounted_system/
Has anyone here actually managed to create a working system.img?
Any suggestions would be much appreciated, thanks!
UPDATE: Using ext2simg instead of mkuserimg.sh/make_ext4fs fixes the problem!

Android Pay not working?

So I'm on the M5s Plus and Android Pay doesn't work.
Does Pay work on the Mi5s?
When attempting to add a card, error says:
Android Pay can't be used
Google is unable to verify that your device or the software running on it is Android compatible
MIUI Global 8.0.1.0
Check your version again, there is no 8.0.1.0. Official release is 8.0.10.0, "global custom rom" is 8.0.10.0.0. If you have the second one, there it probably doesn't work because your bootloader is unlocked.
If you indeed have the rare original Chinese/English ROM, then go into settings -> connections -> NFC and there somewhere (I sadly don't yet have the phone) you have to switch from MI Pay to the other possible setting. Then it should work.
hey thanks for the input. Am definitely on 8.0.1.0 here.
i tried your suggestion and switched the nfc pay method but that didn't help so it must be detecting something in the rom. this is rather curious
Oohh you're a Plus user, didn't read that when I replied the first time. Yeah there the software releases are different. Your SIM card is payment enabled? I needed a new sim card when I tried this the last time here, but not with Android Pay, as we don't have that yet here.
Anyway found this: http://en.miui.com/forum.php?mod=viewthread&tid=402053&extra=&highlight=android+pay&page=2
Sounds like there is a bug in the new Global Release of MIUI official
Here the official manual on how to enable it: http://en.miui.com/thread-405166-1-1.html
I have Mi5s plus on same Global Rom. I had to lock boot loader for android pay to work.
Sent from my iPad using Tapatalk
How to relock the bootloader? I try to use "fastboot oem lock" to relock the bootloader. After reboot the phone, the bootloader is still unlock. What's wrong? I am using Xiaomi Mi 5s.
You can relock in miflash, but I don't know if that works without flashing it.
I compared the two .bat files (flash_all.bat and flash_all_lock.bat) and the difference is this:
fastboot %* flash userdata %~dp0images\userdata.img || @ECHO "Flash userdata error" && exit /B 1
fastboot %* erase devinfo || @ECHO "Erase devinfo error" && exit /B 1
I don't exactly know what those commands do, so I wouldn't execute them!
The .sh file has those differences:
fastboot $* erase devinfo
if [ $? -ne 0 ] ; then echo "Erase devinfo error"; exit 1; fi
So for me it looks like the erase devinfo file is the re-lock command, not sure why that should do it tough.
In MiFlash you could try this command flash_all_except_storage.bat. That would flash your phone again, but should not delete your apps and data, but I'm not entirely sure
I also tried to use flash_all_lock.bat to flash the global ROM. After flashing the ROM successfully, the unlock status shown by "fastboot oem device-info" is true also. I think the boot loader is also unlocked, and I can't pass the CTS profile test so that I can't use Android Pay.
patoberli said:
You can relock in miflash, but I don't know if that works without flashing it.
I compared the two .bat files (flash_all.bat and flash_all_lock.bat) and the difference is this:
fastboot %* flash userdata %~dp0images\userdata.img || @ECHO "Flash userdata error" && exit /B 1
fastboot %* erase devinfo || @ECHO "Erase devinfo error" && exit /B 1
I don't exactly know what those commands do, so I wouldn't execute them!
The .sh file has those differences:
fastboot $* erase devinfo
if [ $? -ne 0 ] ; then echo "Erase devinfo error"; exit 1; fi
So for me it looks like the erase devinfo file is the re-lock command, not sure why that should do it tough.
In MiFlash you could try this command flash_all_except_storage.bat. That would flash your phone again, but should not delete your apps and data, but I'm not entirely sure
Click to expand...
Click to collapse
That's weird. I unlocked my phone (to be able to flash global rom) and then flashed it with the lock option and it passes the CTS test.
Chinese stable rom(MIUI 8.0.22) not working with android pay and octopus card

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 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 !

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.

Categories

Resources