wifi turning itself off, driver not being loaded. - X Play Q&A, Help & Troubleshooting

Edit: Considering all the complex processes that I've done, I'm willing to do some series of steps again with the gathered knowledge, but I still need some guidance.
Actual status: Losing my mind (not fixed)
Here's the info of my current problem:
I have a XT1563, cid12 (cl)
Working perfectly until android 6.0 OTA. After restart, in the wifi screen loading bar is constantly present and switches itself off after a couple of seconds of activated. Network list is empty, mac address appears as 02:00:00:00:00:00 in wifi details and status of the phone.
Sent it to support and they 'updated the software', when I got it back wifi was working, but when I installed sd and sim cards back it stopped working.
The most relevant logcat message that appears to be the main one is from WifiStateMachine:
Code:
WifiStateMachine: Fail to set up pno, want false now false
WifiStateMachine: Failed to load driver
Things I've done
Most of this steps have been tried with clean installs and removing sd/sim cards
Network Reset
Factory Reset
Flash different stock roms (currently on 6.0.1 MPD24.107-52)
Flashed ultra kernel R2, R3 and squid kernels 14, 15, 15 oc, 15b
Used twrp 2.8.7 and 3.0.0-r2
Used rsd to flash official firmware for my carrier (RETLA-ENTEL_6.0_MPD24.65-25.1)
Flashed CM 12 and CM 13 unofficial
Installed SuperSU and Busybox
Changed owners and permits in persist/
Copied new persist from different sources
Hex edited .bin file in persist/
downloaded WCNSS_wlan_dictionary.dat and put it in persist to comply with symlink in prima/
fastboot oem install [2 of my carriers; entel, claro]
Replaced WCNSS files in persist with the ones available the motorola repo
Copied WCNSS factory file to prima/ folder
Copied WCNSS_qcom_cfg.ini to /data/misc/wifi
went crazy with 776 permissions
Even after flashing stock with RSDLite, bootloader show the modified status as 3 when I think it should be 2. This has led me to think that something is in the file system that android does not like but is not being fixed by RSD nor clean wipes.
From what I understand, the only thing that could be surviving full flashes and wipes are contents in persist/ and modifications to the root of the system, like busybox and superSU. I've not been able to find any way of cleaning the root of the phone and I imagine that's really dangerous.
TL;DR Wifi driver is not loading, persist folder is ok and clean flash does not fix it.
Possibly relevant logcat entries:
E WifiService: Invoking mWifiStateMachine.setWifiEnable
D WifiStateMachine: setting operational mode to 1
E WifiHW : User build,dont Start logging service.
E WifiService: Invoking mWifiStateMachine.setWifiEnabled
E WifiStateMachine: Failed to load driver
D WifiStateMachine: setWifiState: unknown state
Info for nerds:
Source code of WifiStateMachine.java containing the error message:
Code:
public boolean processMessage(Message message) {
switch (message.what) {
case CMD_START_SUPPLICANT:
[B]if (mWifiNative.loadDriver())[/B] {
// Code for loading supplicant
} else {
loge("Failed to load driver");
}
break;
# More code
}
}
WifiNative.java cointains the class being instantiated where the evaluation calls a empty abstract method:
Code:
public native static boolean loadDriver();
I'm having problems for identifying where this class is being extended for this method to actually do something. If anyone knows please leave a comment.

Wifi problems and fixes
I've still not found a solution for myself, but I figured I still can give some tips for people with problems, especially considering how confusing is to get information about this.
This is a work in progress. I would gladly receive corrections and new info.
Before anything, do a backup. Even if your wifi does not work, it can save you from a lot of problems. Remember to backup the persist folder, a lot of automated recoveries don't make a backup of that folders because it's supposed to survive flashes but there's ways in which you can do it by mistake. It also helps a lot with bug hunting.
Things you should have already tried:
Plane mode on, reboot, wifi on and plane mode off
Network settings reset in android and reboot
Rebooted to safemode (longpress in power off when turning phone off]
Factory reset in android
Removal of SD and SIM cards
Factory reset in recovery
Flash Stock ROM in RDSlite
Unlock bootloader
Activate developer mode and set usb debug on
Installed custom recovery
Clean Flash stock ROM trough fastboot
Flash custom Kernels
Things you need:
adb and fastboot
usb drivers for the phone
Optional Text editor that preserves text format (avoid notepad and MS word)
Optional Busybox for extended commands in android shell (root required)
Optional If you're in windows and want to mess with adb: A decent console to work with.
Option A: cash with cmder
Install cmder
Install NodeJs
Install cash tipping in cmd npm install cash-global -g (after NodeJs)
Option B: babun
http://babun.github.io/
optional Open text editor for easy copy-paste of long paths and commands
optional Hex editor if you want to edit .bin files. I use XVI32
Useful console commands (In windows you need one of the optional shells described above)
List files and folders
Code:
ls -la [path to list]
Find file/folder in linux (and android shell)
Code:
find / -iname '*[word you're looking]*'
* are 'wildcards', they allow for matching any text (or no text at all)
you can add, before -iname, -type f (for files) or -type d (for folders)
Symlink
It's an alternative of copying files. this allows you to simulate having a file in two different places, but really all paint to one. Modifications in this source are going to affect all the links, so it's easier to configure. Android does this a lot.
Code:
ln -s [path to] [from]
Copy files and folders
Code:
cp [-R if you want to move folders] [path to source] [path to target]
logcat for essential wifi messages (short-colored) If someone know more, please let me know
Code:
adb logcat -v brief -v color WifiSerice:V WifiHW:V WifiStateMachine:V FileUtils:V QSEECOMAPI:V *:S
change owners and permissions
the flag -R makes the command work for files and subfolders
Code:
chown user:group [path to file or folder]
chmod [num of user][num of group][num of all] [path to file or folder] [SIZE="2"](e.g. chmod 660 /persist/WCNSS_qcom_wlan_nv.bin)[/SIZE]
grep
This one is awesome; It's for filtering the results of any command, so you can use it for filtering.
Code:
[command you want to filter] | grep -i [term you're looking for]
For example, [adb logcat] gives you a huge list of messages, but [adb logcat | grep -i wifi] gives you just the lines that contain 'wifi'
From my experience, this are the common folders related to wifi configs:
Code:
/persist/
/system/etc/firmware/wlan/prima/
/system/etc/wifi/
/data/misc/wifi/
Command list for do a full clean flash:
please note that system.img_sparsechunk can vary in number according to ROM, but I've put 9 in here because failed commands don't write to phone
note: fastboot flash partition gpt.bin works perfectly when used first, but for me it's failing when I erase system and boot first.
Code:
fastboot erase system -w
fastboot erase boot
fastboot erase fsg
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash modem NON-HLOS.bin.
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot reboot (or reboot-bootloader)
Important: Every time you flash, do a clean wipe. In fastboot this usually means using erase system -w and erase boot before flashing.
Be aware that for getting the logcat your phone must be booted to android OS.
Be aware that for copying and modifying important files you must access the phone's shell either in recovery mode or switching to root with the command (su) that's only accesible if you're rooted.
Ok. If you made it this far you're probably losing your mind. To debug this, especially if you're going to post asking for help, get the catlog of your phone and/or a precise description to look for clues to your problem (I have a command ready for you above).
Here's some common solutions I've found while trying to solve my own problem: (Credits to the authors of the solutions)
Bad permissions/users
These appear to be correct or usable permissions for relevant files. Consider that there's a lot of fragmentation in this info so they might be wrong.
Confirmation of these would be great:
Code:
-rwxrwx--- wifi wifi /system/etc/wifi
-rw-rw---- wifi wifi /system/etc/wifi/wpa_supplicant.conf
-rwxrwx--- wifi wifi /data/misc/wifi
-rwxrwx--- wifi wifi /data/misc/wifi/sockets
-rw-rw---- wifi wifi /data/misc/wifi/wpa_supplicant.conf
-rw-rw---- system:wifi /data/misc/wifi/WCNSS_qcom_cfg.ini
-rw-rw---- wifi wifi WCNSS_qcom_wlan_nv.bin
-rw-rw---- root root WCNSS_wlan_dictionary.dat
-rwxrwx--- is 770, -rw-rw---- is 660
Is reported in some places that the parent folder of wpa_supplicant.conf should be -rw-rw---- wifi wifi
Missing or badly configured wpa_supplicant.conf
The solution is place a new copy of the file in the correct folders. If someone has a 'oficial' source or more info let me know
I remember reading that some people had success deleting the file so the SO rebuilds it. Do it to your discretion and remember to backup
Missing WCNSS files
These files are essential and must be in the correct paths for wifi drivers to load.
There's a lot of different sources for this files, but from my experiencie they don't change a lot (last commits are more than one year old).
Files in oficial source repository from motorola
These posts have info and files
http://forum.xda-developers.com/showthread.php?t=2589790
http://forum.xda-developers.com/showpost.php?p=48861415&postcount=19
Paths of relevant files. Please consider that not just because it's here means you need it
Code:
/persist/WCNSS_qcom_wlan_nv.bin
/persist/WCNSS_qcom_wlan_factory_nv.bin
/persist/WCNSS_qcom_wlan_dictionary.dat
/system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini
/system/etc/firmware/wlan/prima/WCNSS_cfg.dat
/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin
/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_dictionary.dat
/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_factory_nv.bin
/data/misc/wifi/WCNSS_qcom_cfg.ini
/data/misc/wifi/wpa_supplicant.conf
Missing /persist/drm/widevine and/or /persist/prov
Check this two posts:
http://forum.xda-developers.com/showthread.php?t=2589790
http://forum.xda-developers.com/showpost.php?p=48861415&postcount=19
In there you can find backups to get the folders, restore them to /persist/ and check permissions.
Bad MAC address in WCNSS_qcom_wlan_nv.bin
Sometimes the file WCNSS_qcom_wlan_nv.bin needs to be updated with the correct mac address.
Since it's a .bin file, it cannot be changed with a text editor. You need to use a hex editor (XVI32 link is in 'things you need' above).
The mac address starts at 'A' (since is hex) or, more simply, after 10 'cells'. Be aware that in this editor changes get 'inserted' instead of modified, so you have to delete the initial 6 addresses of the old mac.
Put the file back, and check permissions. There's two copies of this file: one in /persist/ and another in /system/etc/firmware/wlan/prima/ change one or both according with your situation
Some logcat messages and details about them
For getting more messages about wifiHW you need a userdebug build like CyanogenMod. Stock roms don't log wifiHW.
Code:
WifiStateMachine: failed to load driver
WCNSS_qcom_cfg.ini and/or WCNSS_cfg.dat is missing somewhere. In my case this was missing from /system/etc/wifi.
Code:
wcnss_service: CAL file not found
This refers to the calibration file. The source of wcnss-service.c defines this file as "WCNSS_qcom_wlan_cal.bin" in the path "/data/misc/wifi/WCNSS_qcom_wlan_cal.bin". however, source show that CAL file is not used if the factory file is present. Source in link gives this address '"/data/misc/wifi/WCN_FACTORY" which is weird because from posts in xda this file has the name "CNSS_qcom_wlan_factory_nv.bin" I'll update if I have more info
Info for nerds:
How android Wifi works:
https://community.freescale.com/docs/DOC-93603
source code for wifi opt framework - android 6.0.1 r22
source code for wifi qcom framework - android 6.0.1 r22

you need hex editor to edit those .bin files.www.droidrzr.com/topic/65438-how-to-change-your-mac-address-xt926/
forum.xda-developers.com/nexus-4/help/nexus-4-mac-changer-spoofing-t2180809/page3

Thank you for your answer!
I'll make the edit in the file but I'll take a while to report back on the results because it's already too late in here.
Considering this, would it make sense for a nonmatching mac address show up as 02:00:00:00:00 in the wifi details screen?

RoDeltaLambda said:
Thank you for your answer!
I'll make the edit in the file but I'll take a while to report back on the results because it's already too late in here.
Considering this, would it make sense for a nonmatching mac address show up as 02:00:00:00:00 in the wifi details screen?
Click to expand...
Click to collapse
Yes, your Mac address is fine, just checked I also have the same
try this and report if its working
1. Put the phone into airplane mode.
2. Restart the phone.
3. Turn on WiFi.
4. Connect to the WiFi network.
5. Turn off airplane mode.

bablu048 said:
Yes, your Mac address is fine, just checked I also have the same
try this and report if its working
1. Put the phone into airplane mode.
2. Restart the phone.
3. Turn on WiFi.
4. Connect to the WiFi network.
5. Turn off airplane mode.
Click to expand...
Click to collapse
I've tried those steps and it's not working.
Logcat shows "WifiStateMachine: Failed to load driver" in each attempt.
I will update the .bin modifications results in a couple of minutes

bablu048 said:
you need hex editor to edit those .bin files.www.droidrzr.com/topic/65438-how-to-change-your-mac-address-xt926/
forum.xda-developers.com/nexus-4/help/nexus-4-mac-changer-spoofing-t2180809/page3
Click to expand...
Click to collapse
I have tried the modifications to no avail.
Steps I did:
get the wifi mac address from the recovery logs
adb pull the files on recovery with persist mounted
hex edited the lines taken from the screenshot on your second link (Both _factory_nv.bin and _nv.bin
adb pushed lines back to mounted persist on recovery
cleaned data/cache/dalvik
rebooted to system
Is there something in the /data/ folder that could be causing the issue? Now both files show back at -rw-r--r-- permissions with root:root owner. I'll try again without wiping data this time and post the report.

RoDeltaLambda said:
I have tried the modifications to no avail.
Click to expand...
Click to collapse
I think this thread solved the problem just by replacing the files from another device forum.cyanogenmod.org/topic/84876-wifi-failure-after-cm11-install-still-present-after-restore-from-backup/

bablu048 said:
I think this thread solved the problem just by replacing the files from another device forum.cyanogenmod.org/topic/84876-wifi-failure-after-cm11-install-still-present-after-restore-from-backup/
Click to expand...
Click to collapse
I have tried the steps in that topic, copying the exact same files in /persist and /prima. Problem still persists
From that topic I've learned that at flash time the files from persist are taken out and sent to system folders. I will try to reflash now with the new files and permissions set up

After the actions of my last post and before the new flash, I scanned the results of adb logcat *: D | grep Wifi
Here are some entries that could be of interest:
more possibly relevant logcat entries:
Code:
[SIZE="2"][I]Initially country code appears to be empty:[/I][/SIZE]
I WifiService: WifiService trying to set country code to with persist set to true
WifiService: Client connection lost with reason: 4
I WifiService: WifiService trying to set country code to cl with persist set to true
E WifiService: Invoking mWifiStateMachine.setWifiEnable
D WifiStateMachine: setting operational mode to 1
E WifiHW : User build,dont Start logging service.
E WifiService: Invoking mWifiStateMachine.setWifiEnabled
E WifiStateMachine: Failed to load driver
D WifiStateMachine: setWifiState: unknown state

RoDeltaLambda said:
I have tried the steps in that topic, copying the exact same files in /persist and /prima. Problem still persists
From that topic I've learned that at flash time the files from persist are taken out and sent to system folders. I will try to reflash now with the new files and permissions set up
Click to expand...
Click to collapse
I've fully flashed the device with RSD and problem still persist.
Eager to hear some more ideas.

I noticed that in system/etc/firmware/prima, adding to the files I copied, there's one symlink: WCNSS_wlan_dictionary.dat -> /persist/WCNSS_wlan_dictionary.dat
This file is not present in my persist folder (nor the rest of the files in the phone, based on adb shell find . -name WCNSS_wlan_dictionary.dat). I imagine this could clearly cause a problem with the wifi driver looking for a file that does not exist.
Someone has a reliable source where I could get this file? I can try to delete it to see if the SO tries to rebuild something, but I would prefer the safest option first.

have you tried flashing back stock recovery then do a factory reset from there?

copy WCNSS_qcom_wlan_factory_nv.bin to your SD card. Use your filemanger to copy this file to /prima. Reboot
Activate wi-fi, the you'll find your mac adress under Settings > About Phone > Status > Wi-fi MAC Adress
Open WCNSS_qcom_wlan_factory_nv.bin on your phone or PC with a hex editor and type your mac adress inside that file and save it.
File attached just remove .txt
The file is from xt1562

bablu048 said:
copy WCNSS_qcom_wlan_factory_nv.bin to your SD card. Use your filemanger to copy this file to /prima. Reboot
Activate wi-fi, the you'll find your mac adress under Settings > About Phone > Status > Wi-fi MAC Adress
Open WCNSS_qcom_wlan_factory_nv.bin on your phone or PC with a hex editor and type your mac adress inside that file and save it.
File attached just remove .txt
The file is from xt1562
Click to expand...
Click to collapse
Thank you for the file and the instructions. I've checked the diff with 3 different sources:
Meninblack007 - vendor
huawei_msm8916
google android source code
All match, so I'll asume this is a universal file without modifications.
Moving this file to persist/ folder made no difference
I've also tried taking the files from motorola official github repo, copy them to persist/ and flash. Without success this far.
I'll send factory_nv.bin to prima folder and report back

flash the firmware through rsd lite, lock the bootloader and take it again to service center.
I am out of ideas and also Google searches.. I'll keep looking and report if I find anything else.

bablu048 said:
copy WCNSS_qcom_wlan_factory_nv.bin to your SD card. Use your filemanger to copy this file to /prima. Reboot
Activate wi-fi, the you'll find your mac adress under Settings > About Phone > Status > Wi-fi MAC Adress
Open WCNSS_qcom_wlan_factory_nv.bin on your phone or PC with a hex editor and type your mac adress inside that file and save it.
File attached just remove .txt
The file is from xt1562
Click to expand...
Click to collapse
I've copied the file between the locations trough adb shell and there's no noticeable difference.
MAC address does not appear either in this screen:
I'll post this image and the versions of the phone in the OP

did u try ultra kernel?
i have same problem.
i flash ultra kernel(r3), and my wifi work fine.

jalal-jap said:
did u try ultra kernel?
i have same problem.
i flash ultra kernel(r3), and my wifi work fine.
Click to expand...
Click to collapse
Yes I've tried.
Flashed ultra kernel R2, R3 and squid kernels 14, 15, 15 oc, 15b
Click to expand...
Click to collapse
Considering all the changes I've done, it was a good idea to try again.
I've tried the last release of squid kernel, since the dev of ultra kernel recommended this one for 6.0.1.
Installed the kernel, wiped cache/dalvik and rebooted without success. Logcat is still showing failure at loading drivers.
The main problem I'm having is that the failure point is not correctly specified, so now I'll try to dig deeper into logcats to see if I pinpoint the source of the issue. If anyone can let me know about some complementary logs, I would be super grateful.

I've installed CM to have a userdebug build, in order to debug more in detail thanks to the logs of wifiHW.
After fixing an error of missing WCNSS_qcom_cfg.ini in /system/etc/wifi (Copied from prima folder) I've came across this error appearing persistently:
Code:
wcnss_service: Failed to open /dev/wcnss_ctrl : Bad address
I've looked around but there's no info of how could I deal with this. I will dig around a little more but if someone has a tip I would gladly hear

Related

[Q] ROM porting

Edit: bootloop, partitions are not mounting.
nagato.fm said:
I'm trying to port an X5PRO rom to regular X5 and facing an issue of unworking wi-fi and USB mass-storage. All data I have: it's all right with IMEI, wi-fi and bluetoth MAC's are missing, serial number is missing, wi-fi toggle in settings is inactive (I mean it can't be turned on and if I try to turn it on directly from wi-fi settings it says "an error occured" and goes inactive again), when I'm connecting my phone to computer and trying to turn on storage I get message of dismounting SD card and the storage stays turned off.
I've already tried to change the kernel (this ROM is running 3.0.8 PRO kernel and I've used Dzo's v5.0u17 kernel) and it haven't fixed my problems. Changing of /system/libs/hw/ to the Aurora's resulted in non-bootable rom.
Have you any ideas of how to solve it? Or is there any threads about x5pro to non-pro porting I could miss? (I've tried to google anything about problems with my port and about porting from U8800PRO and found... nothing)
Click to expand...
Click to collapse
I have no ideal to give you because i'm not a DEV, but in the whole 4rum, you can easy find out the solution to help you.
http://forum.xda-developers.com/showthread.php?t=1941239
Those so called tutorials are pretty much useless, they will help you get the base on, but no more.
So, since U8800+ has a different Wi-Fi, you should first replace /system/lib/libhardware_legacy.so, /system/bin/wpa_supplicant with the dzo ones. Then copy over the /system/lib/modules directory, it contains Wi-Fi modules needed.
If it does not work out, try to modify the init.huawei.rc or init.rc and replace service wpa_supplicant and related configs with dzo ones. Note that you will have to modify boot.img, because it contains the init files. So use a boot.img unpacker, modify it, then repack it again.
Try to get me the logs too .
Blefish said:
Those so called tutorials are pretty much useless, they will help you get the base on, but no more.
So, since U8800+ has a different Wi-Fi, you should first replace /system/lib/libhardware_legacy.so, /system/bin/wpa_supplicant with the dzo ones. Then copy over the /system/lib/modules directory, it contains Wi-Fi modules needed.
If it does not work out, try to modify the init.huawei.rc or init.rc and replace service wpa_supplicant and related configs with dzo ones. Note that you will have to modify boot.img, because it contains the init files. So use a boot.img unpacker, modify it, then repack it again.
Try to get me the logs too .
Click to expand...
Click to collapse
The problem is that I've changed the kernel using abootimg package in Ubuntu because none of the scripts for unpacking/repacking boot.img found on this forum worked for me, also I couldn't unpack ramdisk so I think I can't modify init.rc at this moment. I'll try to get some logs and do all that you've mentioned.
Also there is another problem: no mobile network at all. When I turn on the phone the indicator goes gray and nothing seems working (can't phone someone and etc.). When trying to change mobile operator via settings I get a VERY strange menu asking me for PIN code (I actually don't have one - I've disabled it years ago).
Also I need to ask for some tutorials or knowledge bases about how android works and how core parts of android work (I mean EVERYTHING I can get) because I actually don't know ANYTHING about android and there's no noob-friendly tutorials or FAQ's over the internet. I've checked xda-university and it didn't helped either.
Anyway thanks for your help, Blefish!
After following your instructions system hangs on boot. When first flashed it started to "updating android:setting applications..." and then it rebooted. Then it said "updating... 1 of 1" and another reboot. Seems like framework-res isn't starting because it hangs on bootanimation and hardware buttons lights are constantly flashing. Installing SDK now, will try to get some logs.
Try to do it step-by-step so first replace one thing, reboot, then try another. That will help us understand what makes the phone hang.
For modifying kernel or init.rc I attatched boot.img unpacker-repacker with README, check it out. I am not sure if you need a Linux box for it, but I use that tool and it works well.
MIUI-XJ (my ROM) is a ported u800pro ROM. But it is a gingerbread ROM.
First of all,you need change all init files in /system. You can found this files in system/etc (example;init.qcom.wifi.sh).And I think the mass stroage problem causing by init.qcom.usb.rc (It can found in boot.img) but I'm not sure.
You should change gralloc files for a better GPU performance. It can found in systen/lib/hw. I think You don't need change other hw files.
u8800 needs system/bin/netd - system/lib/modules/*(anything in this folder) - system/bin/wpa_supplicant - system/lib/liboem_rapi.so - system/lib/libreference-ril.so - system/lib/libhardware_legacy.so - system/etc/init.qcom.wifi.sh - system/etc/firmware/wlan/*(anything in this folder) for turn on WiFi
and also u8800 needs system/etc/init.qcom.bt.sh - system/bin/hci_qcomm_init - system/bin/qmuxd (I'm not sure about this file) - system/bin/sdptool - system/bin/hciattach for turn on BT
And also,you need change init.rc and init.huawei.rc files in boot.img for turn on WiFi and BT.
forumber2 said:
MIUI-XJ (my ROM) is a ported u800pro ROM. But it is a gingerbread ROM.
First of all,you need change all init files in /system. You can found this files in system/etc (example;init.qcom.wifi.sh).And I think the mass stroage problem causing by init.qcom.usb.rc (It can found in boot.img) but I'm not sure.
You should change gralloc files for a better GPU performance. It can found in systen/lib/hw. I think You don't need change other hw files.
u8800 needs system/bin/netd - system/lib/modules/*(anything in this folder) - system/bin/wpa_supplicant - system/lib/liboem_rapi.so - system/lib/libreference-ril.so - system/lib/libhardware_legacy.so - system/etc/init.qcom.wifi.sh - system/etc/firmware/wlan/*(anything in this folder) for turn on WiFi
and also u8800 needs system/etc/init.qcom.bt.sh - system/bin/hci_qcomm_init - system/bin/qmuxd (I'm not sure about this file) - system/bin/sdptool - system/bin/hciattach for turn on BT
And also,you need change init.rc and init.huawei.rc files in boot.img for turn on WiFi and BT.
Click to expand...
Click to collapse
Thanks a lot! Will try it all now!
Okey, now it's a bootloop on splash screen.
Edit: a bootloop was caused by some error in boot.img repack. Will try to repack it again now.
How to enable ADB when booting? On Aurora I could get kernel messages via ADB using adb shell cat /proc/kmsg. And now I really miss this feature.
Okey, great news! Wi-fi turned on, but the phone will fastreboot if I turn it off (framework crash I think) and wont turn on again until a full reboot. Also it isn't really working: no networks found.
No changes at all except Aurora kernel + setprop persist.sys.wifimac mac_param in terminal. After that wi-fi turned on, but even with that prop I have no wi-fi mac.
From that I understand all my problems are from some RIL or hardware libs that don't load or load with mistakes. So I need to know what exactly it can be and what libs are for what. Also I think it can be because of unedited init.rc's in ramdisk so I need to know what to edit in them. I've tried to look through them but I don't understand anything in it.
nagato.fm said:
Okey, great news! Wi-fi turned on, but the phone will fastreboot if I turn it off (framework crash I think) and wont turn on again until a full reboot. Also it isn't really working: no networks found.
No changes at all except Aurora kernel + setprop persist.sys.wifimac mac_param in terminal. After that wi-fi turned on, but even with that prop I have no wi-fi mac.
From that I understand all my problems are from some RIL or hardware libs that don't load or load with mistakes. So I need to know what exactly it can be and what libs are for what. Also I think it can be because of unedited init.rc's in ramdisk so I need to know what to edit in them. I've tried to look through them but I don't understand anything in it.
Click to expand...
Click to collapse
Which ROM are you fixing? Isn't CM10?
Nope, it's some desire z jb rom.
Code:
[email protected]:~# adb shell dmesg
- exec '/system/bin/sh' failed: No such file or directory (2) -
That's what I'm getting now. Already tried to fix this issue with some methods from google, no results. Even tried to adb-push bash from 4pda to system/bin and make symlinks, no results. Phone is in bootloop. Any ideas?
P.S.: sh is actually in both xbin and bin, so the problem is somewhere in the boot.img, right?
Have tried all kind of sorcery, still bootloops and exec '/system/bin/sh' failed: No such file or directory (2). Don't know why this is happening. Either /system mounts on boot in some wrong poing or init.rc is completely messed up. But I've checked everything connected to mounting partitions in all init files (except binaries) and gained nothing. I really need some explanation of what are these files for and what they do and what they MUST do.
If someone can give me answers or advices, please, do it now. Because all my ideas are over and I simply don't know now what to do.
EDIT: with aurora boot.img (no changes at all) results are the same except the message in terminal is now "/system/bin/sh: no such tool"
The system/bin/sh error is caused by not mounting /system properly. Check the init.rc files, it could also be in init.emmc.rc if it's a CM rom.
Find out where the on emmc-fs trigger is; if you can't find it, add it into one of the init.rc files.
Code:
on emmc-fs
# mount mmc partitions
wait /dev/block/mmcblk0p12
mount ext4 /dev/block/mmcblk0p12 /system rw barrier=1
wait /dev/block/mmcblk0p13
exec /system/bin/e2fsck -p /dev/block/mmcblk0p13
mount ext4 /dev/block/mmcblk0p13 /data nosuid nodev barrier=1 noauto_da_alloc
mount ext4 /dev/block/mmcblk0p6 /cache nosuid nodev barrier=1
Not sure that I am following this thread properly. I am just starting out with android devel in Fedora. Have you recompiled the WLAN module?
eyeconic said:
Not sure that I am following this thread properly. I am just starting out with android devel in Fedora. Have you recompiled the WLAN module?
Click to expand...
Click to collapse
Nope, I have no proper skills for that, sorry.
I still need some information
Mostly completely rewrote init. files and still no results.
According to this: (http://forum.xda-developers.com/showpost.php?p=30458679&postcount=1)
The Android Boot Process
Bootloader – In HD2’s case, Magldr or cLK – loads the kernel based on how you have configured the phone.
Kernel – The kernel (zImage) is loaded into RAM along with an initial ramdisk (initrd.gz), which initializes various devices (IO, memory, GPU, etc.), interrupts, and mounts the root file system (/). After this, the first user-space process called init is started.
Init – this is a binary file that is contained within the initrd.gz. The init binary processes init.rc and init..rc , along with other .rc files that are called by these two .rc files. Some of the key functions (from this thread’s perspective) in the order of their initialization/ execution are:
The init process follows the instructions in the init.rc and init.xyz.rc files and creates empty directories including /data. It then mounts the storage devices (partitions in the internal NAND (MTD)) to these empty directories. The NAND partition for system is mounted to /system, followed by the partitions specified for data, cache, etc. The directories for dalvik-cache (/data/dalvik-cache) are also created by the init process after mounting the specified device to /data.
The init process then starts various services including adb, service manager, Volume Daemon (vold) for media like SD Card (FAT partition). Most importantly, the zygote service which initiates the Dalivk-Cache is loaded in this sequence.
As we all know, Android is based on Linux. The boot sequence described above is common for all Linux machines – until the zygote stage. Core Android file like core, framework, services, IME, policy, etc. are executed from the Dalvik-Cache and hence Initialization of the Dalvik Cache is pretty much where Android comes into the picture
The sysinit/ run-parts part, which runs scripts from the /system/etc/init.d later the Zygote stage. No matter how this is done, Android has already started loading by the time the boot process comes to executing scripts in /system/etc/init.d
Click to expand...
Click to collapse
Click to expand...
Click to collapse
the error is in mounting nand partitions, but how can it past to starting adb when it fails on mounting system partitions? I don't understand this.

[GUIDE][Dual Boot][TheEasyway] How to setup Linux RootBind Method [Updated May 16th]

Hello everyone ! I made this guide for all who want to try to dualboot Android and Ubuntu using the RootBind method.
But first, what is RootBind ?
Actually, the RootBind method consist to have a Linux file system, living in a folder of our Android partition.
The default location for this linux file system is /data/linuxroot.
The way to switch between Android and Linux is to flash an Android kernel or the linux kernel. That's all.
It means you'll be able to have a linux installation, without erasing Android ( Still available, not touched at all ) and it means that you can easily manage your Linux installation.
You dont want it anymore ? Just delete a folder. You want to try another version, but you dont want to lose your current data ? Just do a zip of the folder, and extract a new version instead.
Advantages :
No need to repartitionate your tab.
It works with all TF101.
It doesnt touch current Android Installation.
It has same free space as your /data Android partition.
You can easily access it from within Android.
It has good performances
Kernel has everything working
And you only need to flash an Android or Linux Kernel to boot desired OS.
Everything is possible thanks to @jrohwer and @DjDill and @TravellingGuy.
Dont forget to thanks them : jrohwer Kernel Thread - jrohwer 14.04 Kubuntu IMG / DjDill images thread / TravellingGuy Image thread​Of course, every manipulation is risky, Me, jrohwer, DjDill, Travelling Guy, my dog, or even my math professor, can NOT be responsible for any damage on your tab, use this guide at your own risk​First Post : Dualboot setup
Second Post : How to change the linux location / How to have multiple linux installations
Third Post : FAQ & Tips​
DualBoot setup. Linux installation
First of all, here is all what you'll need :
The last rootbind kernel : Download Here Take the zip version.
[*]WARING : Note that if you use the last kernel ( 15 one ) YOU MUST TAKE MODULES AND EXTRACT IT IN /lib/modules/ when installation is done
The last Linux IMG of your choice, DjDill made imgs for this method with everything pre working here : DjDill images thread / TravellingGuy Image thread / jrohwer 14.04 Kubuntu IMG
Kernel for booting back Android You can find the KatKiss kernel there for exemple : KatKernel
A terminal emulator in Android or ADB Shell
If you dont want to use one of DjDill img, you'll need the bcm4329 tar from there : http://forum.xda-developers.com/showpost.php?p=43203818&postcount=569
You need to have a rooted device with a custom recovery. Check by here or by there
This method works on any TF101
Note that all command can be done with ADB shell aswell.
If you choose to install one of DjDill img :
Boot to Android as usual
Copy all download files to your tab. You can rename the kernel zip to Linux_Loader.zip and Android_Loader.zip to be clearer.
Now, I assume you have files in internal storage ( change sdcard0 by sdcard1 if it's on microSD )
We will now ensure terminal has root permissions :
Open Terminal emulator
Type su then Enter
SuperUser will ask terminal emulator root permission, allow it.
If you have an error with this command, your device may not be properly rooted.
Now we will setup installation location and extract our linux tar.gz ( Be aware it may take a while ) :
Code:
busybox mount -o remount,rw /
mkdir /data/linuxroot
chmod 755 /data/linuxroot
cd /data/linuxroot
tar -pxvzf /storage/sdcard0/yourubuntufilename.tar.gz
busybox mount -o remount,ro /
If you don't choose to install one of pre configured img :
Boot to Android as usual
Copy all download files to your tab. You can rename the kernel zip to Linux_Loader.zip and Android_Loader.zip to be clearer.
Now, I assume you have files in internal storage ( change sdcard0 by sdcard1 if it's on microSD )
We will now ensure terminal has root permissions :
Open Terminal emulator
Type su then Enter
SuperUser will ask terminal emulator root permission, allow it.
If you have an error with this command, your device may not be properly rooted.
Now we will setup installation location and extract our linux tar.gz ( Be aware it may take a while ) :
Code:
busybox mount -o remount,rw /
mkdir /data/linuxroot
chmod 755 /data/linuxroot
cd /data/linuxroot
tar -pxvzf /storage/sdcard0/yourubuntufilename.tar.gz
cd /data/linuxroot/lib/firmware
tar -pxvzf /storage/sdcard0/bcm4329.tar.gz
cp nvram.txt nvram_3429.txt
busybox mount -o remount,ro /
The setup is now complete.
In order to boot your linux installation, flash the linux kernel.
To get back to Android, flash the Android kernel.
​
How to change the linux location / How to have multiple linux installations
Here we are, so in order to have multiple linux instllations or change defaut linux installation location, you will need a Linux computer. ( Or a Virtual Machine, that's what I use, with Virtual Box for exemple.
You will need 3 tools to get it done too.
You can get it there abootimg, blobpack and blobunpack files at the end of first post ( Thanks to @shaola ).
I post the zip in attachement for mirror.
MORE INFORMATIONS ABOUT THESE TOOLS : http://forum.xda-developers.com/showpost.php?p=13713619&postcount=3
Now you have to get in the Rootbind kernel, the blob file. Blob file in Asus ROM can contain any partition of the device ( System, kernel, recovery etc ). In this kernel blob, there is only the kernel partition. Soooo, here we go for some commands.
Open your linux computer
Place all four files in same place ( better to have a folder created for this ). I'll take exemple of ~/kerneltf/ It's a exemple, so adapt in consequencies of course.
Now you have your four files in same place, blobunpack, blobpack, and abootimg-i686 so let's start with commands :
Go to the desired place :
Code:
cd ~/kerneltf
Unpack the blob containing partition imgs
Code:
./blobunpack blob
This will create partitions img. The one that interest us is the .LNX partition. ( Here blob.LNX )
Now unpack the kernel parition img
Code:
./abootimg-i686 -x blob.LNX
This will create 3 files, bootimg.cfg, zImage and initrd.img
The file we want to edit is bootimg.cfg. so open it with a text editor.
You'll see the last line is a cmdline. At the end we have the location of linux system place.
For exemple here : root=/dev/mmcblk0p7 bind=/linuxroot that means, the folder takes place in mmcblk0p7 ( /data partition of device ) and is placed in /linuxroot folder. So with Android layout it means /data/linuxroot.
You can now change the location of your folder, so you have some choices :
1-Change the folder location or name. ( This can be used to have multiple linux systems )
So you have this part : root=/dev/mmcblk0p7 bind=/linuxroot
If you want to change folder place/name change this part : bind=/linuxroot into whatever you want
For exemple root=/dev/mmcblk0p7 bind=/linuxroot2 or root=/dev/mmcblk0p7 bind=/linuxroot3 ( To have more linux systems )
Or root=/dev/mmcblk0p7 bind=/Linuxroot/Linux1
ATTENTION as said in rootbind thread : Make sure, however, not to put the Linux rootfs to the "internal storage" (/data/media) or any subdirectories thereof. This plays havoc with the Android media scanner when re-booting into Android and your tablet may slow down to a crawl.
2-Change the folder location in order to have it on an other partition like SDCard
For this choice, a 2nd partition on your SDcard is greatly recommended and should be in ext4. ( Must be the second partition, it is better for general use of SDcard )
So root=/dev/mmcblk0p7 bind=/linuxroot will become root=/dev/mmcblk1p2 ( can be p3 p4 or more if you have more than 2 partitions in your sdcard to have several systems on your SDcard ) the bind argument must be deleted as it will not be used.
3-Change the folder location in order to have it on first partition on SDCard
The problem here if you want your linuxroot folder in you SDcard with your other files, is that sdcard MUST be formatted in ext4 and so will not be recognized directly by Windows ( Using MTP in the TF will work but not Storage Mount ) cause Windows doesnt support ext4 partition. It's definitively the worse choice IMHO. The precedent process is definitively better choice. More than that it could make MediaScanner in Android going crazy too ( a .nomedia can maybe do the trick but not sure ).
More again, it hasnt been tested at all so you're the only responsible, but if you want to do it :
For exemple, to put folder on SDcard, you should change root=/dev/mmcblk0p7 bind=/linuxroot to root=/dev/mmcblk1p1 bind=/linuxroot
This means your folder is in sdcard ( The one in the tab ) at root in /linuxroot folder. ( /storage/sdcard1/linuxroot in android )
THIS HAS NOT BEEN TESTED YET, I CANT TELL YOU IF IT WORKS OR NOT.
Sooo, now you seted up your new location ( BE SURE TO DONT TOUCH ANYTHING ELSE ON THE CMDLINE, ONLY THIS PART ):
We will now repack the kernel to get it flashable.
Once again, be sure that you didnt make mistake with the file, and you only edited root=/dev/mmcblk0p7 bind=/linuxroot this part without deleting something or got a typo error.
We will now update the new bootimg :
Code:
abootimg-i686 -u blob.LNX -f bootimg.cfg
Then we will rename old blob file to create a new one with our modified kernel:
Code:
mv blob blobold
Now, we will repack our blob in order to make a new flashable zip with our kernel:
Code:
./blobpack blob LNX blob.LNX
You're done, make a copy of the old zip, rename it as you wish ( avoid spaces in the zip title ) for exemple Linux_Loader_2.zip
Then open it, and replace the blob file with your new one.
Now you're good to flash. Be sure to install a linux system in desired location before flashing it of course. See post 1 for this !
And a last one !
Envoyé de mon Nexus 4 en utilisant Tapatalk
Nice does work with TF101 G model (3G+) ?
Envoyé depuis ma TF101G-B80 with Revolution HD 4.0 (3.6g release) by Mike _1986
stephane.papin said:
Nice does work with TF101 G model (3G+) ?
Envoyé depuis ma TF101G-B80 with Revolution HD 4.0 (3.6g release) by Mike _1986
Click to expand...
Click to collapse
Yes, it works with all TF101
Si t'as besoin d'aide, hésite pas à me MP
Is a bootloader within the realm of possibility?
Thanks for the write-up.. I'm at the drinking my coffee while the untar keeps chugging stage, and it occurs to me that a bootloader would be very cool to have. Kernels flash so quickly, the recovery method isn't far off in terms of usability.. but it did motivate the question: is it possible?
So I'm just curious - is there any reason why we couldn't have the android and linux kernels both on disk to be loaded by a bootloader based on user choice?
Hello,
I have tried the "DjDill img" method.
When it finishes booting, it tells me that there are networks, and yhat I have to configure wifi.
I can't find how.
ifconfig shows lo and wlan0, and wlan0 is up but of course has no address.
if I try a iwlist scan, it tells me that wlan0 is an interface that doesn't support scanning.
In "settings manager/network connections", if I try to add a connection, it doesn't see my ssid.
Do you have any idea or point me to some doc/tuto.
Thanks in advance
nbenm
nbenm said:
Hello,
I have tried the "DjDill img" method.
When it finishes booting, it tells me that there are networks, and yhat I have to configure wifi.
I can't find how.
ifconfig shows lo and wlan0, and wlan0 is up but of course has no address.
if I try a iwlist scan, it tells me that wlan0 is an interface that doesn't support scanning.
In "settings manager/network connections", if I try to add a connection, it doesn't see my ssid.
Do you have any idea or point me to some doc/tuto.
Thanks in advance
nbenm
Click to expand...
Click to collapse
What kernel and what image did you used?
Tapatalké depuis mon Nexus 4 MIUI !
Couple questions
First, BIG thx to you and all the devs for hacking the tf-101!!
I've tried several of the images and they all worked as posted (Go figure ). I will be trying to compile a kernel for some custom work.
1 - Are the kernels compiled on the TF-101 and the tarballed?
2 - Any idea if Kali Linux 1.0.6 ARMHF Image, build will work?
I'll be using an external wifi dongle and not the internal.
Again much excitement to the tf-101 world!
Kingzak34 said:
What kernel and what image did you used?
Tapatalké depuis mon Nexus 4 MIUI !
Click to expand...
Click to collapse
I'm using kernel:Ubuntu-3.1.10-12-rootbind-oc1.0GHz.zip from your rootbind kernel link
I use image:tf101-14.04-xubuntu-armhf.tar.gz which is a DjDill image.
Before you reply me, I wanted to try "TravellingGuy Image". On its page, it was told to create wlan0 entry in the interfaces file. I did this and it works now.
But I can't understant why:
- iwlist scan doesn't work
- network manager doesn't see any of the multiple essids tahere are here
When I try to iwconfig essid "my_ssid", it says "cannot read /proc/net/wireless". Does it need some module ?
Thanks
nbenm
nbenm said:
I'm using kernel:Ubuntu-3.1.10-12-rootbind-oc1.0GHz.zip from your rootbind kernel link
I use image:tf101-14.04-xubuntu-armhf.tar.gz which is a DjDill image.
Before you reply me, I wanted to try "TravellingGuy Image". On its page, it was told to create wlan0 entry in the interfaces file. I did this and it works now.
But I can't understant why:
- iwlist scan doesn't work
- network manager doesn't see any of the multiple essids tahere are here
When I try to iwconfig essid "my_ssid", it says "cannot read /proc/net/wireless". Does it need some module ?
Thanks
nbenm
Click to expand...
Click to collapse
Ubuntu-3.1.10-12-rootbind-oc1.0GHz.zip doesnt exist ?
It's Ubuntu-3.1.10-12-rootbind-oc1.2GHz.zip
Or Ubuntu-3.1.10-10-rootbind-1.0GHz.zip
If you choose the Ubuntu-3.1.10-12-rootbind-oc1.2GHz.zip, wifi will works by default with defaut network manager without needing any cmd config or anything on pre installed DjDill img, IDK for Travelling guy img I didnt tested it, but you can try the other method if you're on Debian img and wifi doest work.
If you choose DjDill img, choose one of the lastest, This one http://forum.xda-developers.com/showpost.php?p=50335555&postcount=1
Or the 1.1 14.04 one, end of this post : http://forum.xda-developers.com/showpost.php?p=50335574&postcount=2
Or the Lxde build from same post.
But I suggest to use the first for now, it's the newer and have a lot of fixes.
Updated !
With second post and added jrohwer 14.04 IMG !
image: Kubuntu 14.04 With Tegra drivers.
kernel: Ubuntu-3.1.10-12-rootbind-oc1.2GHz.zip also tried Ubuntu-3.1.10-10-rootbind-1.0GHz.zip
It boots into KDE fine now but initially had some warnings even after running depmod -a. I had to issue the comnmand depmod -a a few times and it black screened once on boot.
I cant seem to get the wifi networking working even though it finds local networks clicking on the networks in the GUI doesn't do anything. Any help here. This is my first linux boot on the transformer but I have used Ubuntu since gutsy. I have to admit I am a little confused after reading a couple of posts here about exactly comes with these premade images. For instance the nvidia drivers are they included as modules in these images. When i read jrohwer's thread for the image he includes his apt sources list and states that the it took a little to get the nvidia drivers working?
Like I said on the other thread to setup Wi-Fi you have to setup in cmd line. Search on the net to setup with nmcli command or you install another network manager
Tapatalké depuis mon Nexus 4 MIUI !
Kingzak34 said:
Like I said on the other thread to setup Wi-Fi you have to setup in cmd line. Search on the net to setup with nmcli command or you install another network manager
Tapatalké depuis mon Nexus 4 MIUI !
Click to expand...
Click to collapse
Yes sorry I was struggling with the command for nmcli. I should have elaborated ... Tried various commands .. and this was what worked.
Code:
nmcli dev wifi
to list off the possible availables ap's then to join what you want
Code:
sudo nmcli dev wifi connect "whatever ap u want to connect to"
much easier to hunt down answers with a working intenet connection
Sorry bout that. I suppose my other question about the nvidia drivers is most likely too silly to answer ??
dasbooter said:
Yes sorry I was struggling with the command for nmcli. I should have elaborated ... Tried various commands .. and this was what worked.
Code:
nmcli dev wifi
to list off the possible availables ap's then to join what you want
Code:
sudo nmcli dev wifi connect "whatever ap u want to connect to"
much easier to hunt down answers with a working intenet connection
Sorry bout that. I suppose my other question about the nvidia drivers is most likely too silly to answer ??
Click to expand...
Click to collapse
What question ?
You dont have to do anything with the driver as in 14.04 build from jrohwer, is pre installed.
Kingzak34 said:
What question ?
You dont have to do anything with the driver as in 14.04 build from jrohwer, is pre installed.
Click to expand...
Click to collapse
Thanks i was reading jrohwer's thread for the 14.04 image and he was discussing the fact that it took alot of work to get the nvidia drivers up and running and then gives his apt sources list for download but after what u said it sounds like this is for people who want to get there own images together with working nvidia drivers. So compiling your own modules. Sorry I just wasnt sure. Anyways thanks for the trouble. I have connected to the ap but cant get a connection out to the internet. Oh well maybe I will try that lubuntu image on the first page. Thanks
dasbooter said:
Thanks i was reading jrohwer's thread for the 14.04 image and he was discussing the fact that it took alot of work to get the nvidia drivers up and running and then gives his apt sources list for download but after what u said it sounds like this is for people who want to get there own images together with working nvidia drivers. So compiling your own modules. Sorry I just wasnt sure. Anyways thanks for the trouble. I have connected to the ap but cant get a connection out to the internet. Oh well maybe I will try that lubuntu image on the first page. Thanks
Click to expand...
Click to collapse
Sounds weird, you successfully connected but dont have access to internet ?
Correct command for connecting on AP with a password is
sudo nmcli dev wifi connect <ssid> password <password>
And yes, the files that jrohwer gave, is for those who want to create a 14.04 with nvidia driver working img.
Kingzak34 said:
Sounds weird, you successfully connected but dont have access to internet ?
Correct command for connecting on AP with a password is
sudo nmcli dev wifi connect <ssid> password <password>
And yes, the files that jrohwer gave, is for those who want to create a 14.04 with nvidia driver working img.
Click to expand...
Click to collapse
Ya its at a hospital with no wpa type encryption only a login web page with name and password. I am most certainly connected ifconfig shows I have pulled a IP address etc etc. I have been reading about similiar problems in other linux type threads where there is automatic redirection to the login page. I actually use an app hellowifi to automatically enter the info in katkiss 4.4.2 so I am actually having trouble getting the address of that login page lol. I will give it a try at home where i have a wpa2 encrypted connection
dasbooter said:
Ya its at a hospital with no wpa type encryption only a login web page with name and password. I am most certainly connected ifconfig shows I have pulled a IP address etc etc. I have been reading about similiar problems in other linux type threads where there is automatic redirection to the login page. I actually use an app hellowifi to automatically enter the info in katkiss 4.4.2 so I am actually having trouble getting the address of that login page lol. I will give it a try at home where i have a wpa2 encrypted connection
Click to expand...
Click to collapse
Ho yeah I see, sometimes I cannot get login at the university hotspot, cause it doesnt want to redirect to login page.
I dont think you'll got problem with a 'normal' router.

Complete Partition Backup Script

After trying to install the March security patch and revert to stock, my XT1644 changed from a Moto G4 Plus to a Moto G4 without fingerprints etc.
I learned after the fact that my TWRP backup only backed up 3 partitions of my phone's 48 partitions (only 4 were offered on the first version of TWRP I tried). Reflashing all ROMS, including npjs25-93-14-4 via fastboot does not help. I have since found the solution. The hw partition had become corrupted.
Because of this issue, I wrote a script which dumps all partitions (by default only partitions of 102400 blocks or less). It writes a summary to a file called partitions.txt which includes checksums of all partitions. It also writes the output from getprop to build.prop. It writes everything to a sub directory of wherever the script is uploaded to.
The options are as follows:
Code:
#adb shell /data/media/0/PartitionImages/backupPartitions.sh -h
Usage /data/media/0/PartitionImages/backupPartitions.sh [-z] [-b MaxBlocks] [-n partition1 ] [-n partition2 ]
options:
-z optional to tar.gz the output folder default=false
-b 102400 optional maximum number of blocks of the partition - 0 will dump all partitions default=102400
-n partitionName... optional - one or more partitions to dump
To use do this, all you need is an unlocked bootloader and ADB debugging turned on.
The steps are as follows:
1) Boot into TWRP Recovery
2) Run the following commands via ADB to prepare the backup (note /data/media/0/ can be substituted for /sdcard if you have one)
Code:
adb shell mkdir /data/media/0/PartitionImages
adb push .\backupPartitions.sh /data/media/0/PartitionImages/backupPartitions.sh
adb shell chmod 0755 /data/media/0/PartitionImages/backupPartitions.sh
3) Perform the backup to backup (see options above if you want a full backup or a more limited backup)
Code:
adb shell /data/media/0/PartitionImages/backupPartitions.sh
4) Copy the results back to your computer
Code:
adb pull /data/media/0/PartitionImages .\PartitionImages
Try to flash twrp and clear internal memory as well
And after that flash dec security version of android 7..
dont try to lock the bootloader.
It worked for me ...
Best of luck
Resolved!
As posted on a related thread I just found, I have resolved the issue:
Moto G4 Plus's Model changed to G4,lost one imei and finger print.
Excellent tool, thank you very much.
So, in the unlucky case that i would lose fingerprint scanner, etc. due to bootloader downgrade or whatsoever that causes it. if i flash my previously backuped (with your script) hw.img partition with ' fastboot flash hw hw.img ', my device will be recognized as a Moto G4 plus?
And features like fingerprint, network, will be in working condition again?
I think that your script is a "must have" for every flashaholic that owns a G4 Plus. I did the backup, just in case. Thanks for sharing it.
moonlightdrive said:
Excellent tool, thank you very much.
So, in the unlucky case that i would lose fingerprint scanner, etc. due to bootloader downgrade or whatsoever that causes it. if i flash my previously backuped (with your script) hw.img partition with ' fastboot flash hw hw.img ', my device will be recognized as a Moto G4 plus?
And features like fingerprint, network, will be in working condition again?
I think that your script is a "must have" for every flashaholic that owns a G4 Plus. I did the backup, just in case. Thanks for sharing it.
Click to expand...
Click to collapse
That is the idea yes, but I haven't tested restoring anything - only done a binary patch of the first little bit of that partition - using dd. I wrote it mostly to get the MD5s of each partition from someone with a working phone so I could start looking for differences. There are lots of more professional backup tools out there which are likely all just wrappers around dd - but this will likely do the job with very basic requirements.
Nice work mate :good: @givitago
givitago said:
After trying to install the March security patch and revert to stock, my XT1644 changed from a Moto G4 Plus to a Moto G4 without fingerprints etc.
I learned after the fact that my TWRP backup only backed up 3 partitions of my phone's 48 partitions (only 4 were offered on the first version of TWRP I tried). Reflashing all ROMS, including npjs25-93-14-4 via fastboot does not help. I have since found the solution. The hw partition had become corrupted.
Because of this issue, I wrote a script which dumps all partitions (by default only partitions of 102400 blocks or less). It writes a summary to a file called partitions.txt which includes checksums of all partitions. It also writes the output from getprop to build.prop. It writes everything to a sub directory of wherever the script is uploaded to.
The options are as follows:
Code:
#adb shell /data/media/0/PartitionImages/backupPartitions.sh -h
Usage /data/media/0/PartitionImages/backupPartitions.sh [-z] [-b MaxBlocks] [-n partition1 ] [-n partition2 ]
options:
-z optional to tar.gz the output folder default=false
-b 102400 optional maximum number of blocks of the partition - 0 will dump all partitions default=102400
-n partitionName... optional - one or more partitions to dump
To use do this, all you need is an unlocked bootloader and ADB debugging turned on.
The steps are as follows:
1) Boot into TWRP Recovery
2) Run the following commands via ADB to prepare the backup (note /data/media/0/ can be substituted for /sdcard if you have one)
Code:
adb shell mkdir /data/media/0/PartitionImages
adb push .\backupPartitions.sh /data/media/0/PartitionImages/backupPartitions.sh
adb shell chmod 0755 /data/media/0/PartitionImages/backupPartitions.sh
3) Perform the backup to backup (see options above if you want a full backup or a more limited backup)
Code:
adb shell /data/media/0/PartitionImages/backupPartitions.sh
4) Copy the results back to your computer
Code:
adb pull /data/media/0/PartitionImages .\PartitionImages
Click to expand...
Click to collapse
guys i dont understand what to do my pls help me can u describe in detail what are the steps to get back my moto g4 plus fingerprint can you make a video
or explain this
can anyone can upload their full backup of his moto g4 plus ? it will me really helpful because after 201-1 aka june security patch update totally bricked my phone and from since no bootloader and nothing is in my phone. and the blackflash method is also not working. so if I somehow use tour backup as emmc and bering my phone back to life ?!?! Thanks.....
Hello,
Please help me my moto g4 plus is dead after nougat update only white LED is blinking
i have try blankflash aslo but same issue...
error is.
Motorola qboot utility version 3.40
[ -0.000] Opening device: \\.\COM3
[ 0.001] Detecting device
[ 0.003] ...cpu.id = 2418 (0x972)
[ 0.003] ...cpu.sn = 30871031 (0x1d70df7)
[ 0.004] Opening singleimage
[ 0.012] Loading package
[ 0.016] ...filename = singleimage.pkg.xml
[ 0.018] Loading programmer
[ 0.019] ...filename = programmer.mbn
[ 0.019] Sending programmer
[ 0.240] Handling things over to programmer
[ 0.240] Identifying CPU version
[ 0.246] Waiting for firehose to get ready
[ 60.377] Waiting for firehose to get ready
[120.466] ...MSM8952 unknown
[120.466] Determining target secure state
[120.469] Waiting for firehose to get ready
[180.546] ...secure = no
[180.584] Flashing GPT...
[180.601] Flashing partition:0 with gpt_main0.bin
[180.602] Initializing storage
[180.606] Waiting for firehose to get ready
[240.617] Configuring device...
[240.622] Waiting for firehose to get ready
[300.634] Waiting for firehose to get ready
[360.651] Waiting for firehose to get ready
[420.661] Waiting for firehose to get ready
[480.668] ERROR: do_package()->do_recipe()->do_flash()->gpt_flash()->get_storage
()->init_storage()->firehose_do_fmt()->do_recipe()->do_configure()->buffer_read(
)->device_read()->IO error
[480.668] Check qboot_log.txt for more details
[480.668] Total time: 480.668s
FAILED: qb_flash_singleimage()->do_package()->do_recipe()->do_flash()->gpt_flash
()->get_storage()->init_storage()->firehose_do_fmt()->do_recipe()->do_configure(
)->buffer_read()->device_read()->IO error
please help
Hi, is there is any hardware partition for camera and flashlight???? Bcoz ny device camera hardwares are good but not opening. Camera says "camera is busy" and flashlight option is missing from my device ans it says flashlight not detected in flashlight app. Same issue i had for network and fingerprint. It is solved via hw partition image. Is there is any hardware partition for camera also???? If it is there, plz include in this thread...
Aashakmeeran said:
Hi, is there is any hardware partition for camera and flashlight???? Bcoz ny device camera hardwares are good but not opening. Camera says "camera is busy" and flashlight option is missing from my device ans it says flashlight not detected in flashlight app. Same issue i had for network and fingerprint. It is solved via hw partition image. Is there is any hardware partition for camera also???? If it is there, plz include in this thread...
Click to expand...
Click to collapse
This can be software related or hardware issue.. not any partition related..
For Hardware*
I don't know anything.. you can see fixing videos or go to service center..
For software* (two methods)
1) Try this app, https://f-droid.org/en/packages/info.aario.killcamera/
2) reflash ROM, try different ROM.
3) this is hardware issue.
Do you know if it was working before you flashed ROM and device changed to normal G4..??
____Mdd said:
This can be software related or hardware issue.. not any partition related..
For Hardware*
I don't know anything.. you can see fixing videos or go to service center..
For software* (two methods)
1) Try this app, https://f-droid.org/en/packages/info.aario.killcamera/
2) reflash ROM, try different ROM.
3) this is hardware issue.
Do you know if it was working before you flashed ROM and device changed to normal G4..??
Click to expand...
Click to collapse
Ya it works fine before the name I got g(4) but after doing frp flash it is not getting. Even the flashlight also not works.
Aashakmeeran said:
Ya it works fine before the name I got g(4) but after doing frp flash it is not getting. Even the flashlight also not works.
Click to expand...
Click to collapse
Tried app i mentioned ?
Tried reflashing other/stock rom?
If still not working, it's definitely hardware issue, because others with same issue (g4plus > g4) haven't reported any camera problem.
If you know hardware stuff, then go and check it. Otherwise service centers are best choice..
____Mdd said:
Tried app i mentioned ?
Tried reflashing other/stock rom?
If still not working, it's definitely hardware issue, because others with same issue (g4plus > g4) haven't reported any camera problem.
If you know hardware stuff, then go and check it. Otherwise service centers are best choice..
Click to expand...
Click to collapse
That app need root it seems. So root process is going on. Ill try my best and thank you:good:
By doing this I lost my Imei number plz help:crying: anyone
givitago said:
After trying to install the March security patch and revert to stock, my XT1644 changed from a Moto G4 Plus to a Moto G4 without fingerprints etc.
I learned after the fact that my TWRP backup only backed up 3 partitions of my phone's 48 partitions (only 4 were offered on the first version of TWRP I tried). Reflashing all ROMS, including npjs25-93-14-4 via fastboot does not help. I have since found the solution. The hw partition had become corrupted.
Because of this issue, I wrote a script which dumps all partitions (by default only partitions of 102400 blocks or less). It writes a summary to a file called partitions.txt which includes checksums of all partitions. It also writes the output from getprop to build.prop. It writes everything to a sub directory of wherever the script is uploaded to.
The options are as follows:
Code:
#adb shell /data/media/0/PartitionImages/backupPartitions.sh -h
Usage /data/media/0/PartitionImages/backupPartitions.sh [-z] [-b MaxBlocks] [-n partition1 ] [-n partition2 ]
options:
-z optional to tar.gz the output folder default=false
-b 102400 optional maximum number of blocks of the partition - 0 will dump all partitions default=102400
-n partitionName... optional - one or more partitions to dump
To use do this, all you need is an unlocked bootloader and ADB debugging turned on.
The steps are as follows:
1) Boot into TWRP Recovery
2) Run the following commands via ADB to prepare the backup (note /data/media/0/ can be substituted for /sdcard if you have one)
Code:
adb shell mkdir /data/media/0/PartitionImages
adb push .\backupPartitions.sh /data/media/0/PartitionImages/backupPartitions.sh
adb shell chmod 0755 /data/media/0/PartitionImages/backupPartitions.sh
3) Perform the backup to backup (see options above if you want a full backup or a more limited backup)
Code:
adb shell /data/media/0/PartitionImages/backupPartitions.sh
4) Copy the results back to your computer
Code:
adb pull /data/media/0/PartitionImages .\PartitionImages
Click to expand...
Click to collapse
hey bro can u please explain me this actually my moto g4 plus isnt accepting new hw image

[Guide][Root] How to install the latest Google software update

This guide is primarily intended for rooted users updating to the latest security update, since stock users can just take the OTA.
Key points
User data and applications are kept intact
You do not have to remove your PIN, password, or fingerprint
You do not have to remove TWRP, Magisk, your custom kernel, dtbo, or anything
This is intended for monthly security updates; developer previews and beta releases may or may not work with this method. You're welcome to try, but all may not work as expected
Installing Update:
Make sure you have the latest Google SDK Platform Tools. Extract the archive to a location of your choosing (creates platform-tools folder)
Get the latest taimen Factory Image (not OTA) from Google's Developer Page and save to a location of your choosing
Extract the archive, and open the extracted folder. You should see a list of files:
bootloader-taimen-[version string].img
flash-all.bat
flash-all.sh
flash-base.sh
image-taimen-[version string].zip
radio-taimen-[version string]
.img
Open the flash-all script (flash-all.bat for Windows, flash-all.sh for Linux/OSX) in your favorite text editor.
Find the line that reads "fastboot -w update image-taimen-[version].zip and remove "-w" (the wipe user data switch). Save and close the flash-all script.
Move (cut and paste, etc) all of these files to the platform-tools folder.
Enable USB Debugging from the Developer Options menu on your device (press "Build Number" 7 times if not already visible)
With your device plugged into the computer, open a command prompt in the platform-tools folder
Windows: Open the folder, hold down Shift and right click inside the folder, "Open Command window here"
Linux: If you're on Linux you already know how to do this
OSX: Open a folder in a terminal
Reboot to bootloader:
Code:
adb reboot bootloader
Execute update script in terminal:
Windows:
Code:
flash-all.bat
Linux/OSX:
Code:
./flash-all.sh
The device will reboot a few times while updating
Restoring root and/or a custom recovery
Download latest:
TWRP image
Magisk zip
TWRP zip
(Optional) Custom kernel zip
Place all files in the platform-tools folder
Reboot to bootloader
Boot TWRP image.
Code:
fastboot boot [twrp image filename].img
Push zip files to /tmp
Code:
adb push [magisk filename].zip /tmp
Optional: TWRP persistent installation + custom kernel:
Code:
adb push [twrp filename].zip /tmp
adb push [custom kernel filename].zip /tmp
Install Magisk:
Code:
adb shell twrp install /tmp/[magisk filename].zip
Optional: TWRP persistent installation + custom kernel:
Code:
adb shell twrp install /tmp/[twrp filename].zip
adb shell twrp install /tmp/[custom kernel filename].zip
adb shell twrp install /tmp/[magisk filename].zip
Reboot to system
[ Reserved ]
[ Reserved Post ]
[Deleted]
tlbland0426 said:
Nice guide but correct me if I'm wrong but I don't believe there is a working solution for Magisk yet
Click to expand...
Click to collapse
Magisk works fine...
twiz0r said:
Magisk works fine...
Click to expand...
Click to collapse
He probably was referring to P
Telperion said:
This guide is primarily intended for rooted users updating to the latest security update, since stock users can just take the OTA.
Key points
User data and applications are kept intact
You do not have to remove your PIN, password, or fingerprint
This is intended for monthly security updates; developer previews and beta releases may not work as expected
Installing Update:
Make sure you have the latest Google SDK Platform Tools. Extract the archive to a location of your choosing (creates platform-tools folder)
Get the latest taimen Factory Image from Google's Developer Page and save to a location of your choosing
Extract the archive, and open the extracted folder. You should see a list of files: bootloader-taimen-[version string].img/B]
flash-all.bat
flash-all.sh
flash-base.sh
image-taimen-[version string].zip
radio-taimen-[version string]
.img
Open the flash-all script (flash-all.bat for Windows, flash-all.sh for Linux/OSX) in your favorite text editor.
Find the line that reads "fastboot -w update image-taimen-[version].zip and remove "-w" (the wipe user data switch). Save and close the flash-all script.
Move (cut and paste, etc) all of these files to the platform-tools folder.
Enable USB Debugging from the Developer Options menu on your device (press "Build Number" 7 times if not already visible)
With your device plugged into the computer, open a command prompt in the platform-tools folder
Windows: Open the folder, hold down Shift and right click inside the folder, "Open Command window here"
Linux: If you're on Linux you already know how to do this
OSX: Open a folder in a terminal
Reboot to bootloader:
Execute update script in terminal:
Windows:
Linux/OSX:
The device will reboot a few times while updating
Restoring root and/or a custom recovery
Download latest:
TWRP image
Magisk zip
TWRP zip
(Optional) Custom kernel zip
Place all files in the platform-tools folder
Reboot to bootloader
Boot TWRP image.
Note: As of the February security update, TWRP 3.2.1-0 cannot decrypt the /data/ partition. When prompted for your PIN, cancel. You can keep /system/ read-only.
Push zip files to /tmp
Optional: TWRP persistent installation + custom kernel:
Install Magisk:
Optional: TWRP persistent installation + custom kernel:
Reboot to system
Click to expand...
Click to collapse
Will this method work if I already have TWRP installed or is this for people who have the factory recovery? I understand that I'll have to reinstall TWRP after. I just wanna make sure that this will work with TWRP installed before I do it. Thanks for the great tutorial btw!
Update: Guide worked perfectly for me!
I would say the guide worked perfectly, but even after removing the "-w", my phone immediately proceeded to wipe all data anyway.
HOWEVER!: This may have been personal error as the first time I did the "flash-all" bat, I forgot to "unlock_critical" (perhaps you should add this to your guide as mine seemed to have reset itself). I therefore had to flash again, which may have caused a corrupted file and automatically initiated the system wipe.
Secondly, on the first boot/install of TWRP, I would not recommend flashing absolutely everything in one go as for me it borked the install of Magisk and caused me all sorts of issues with Google Play (no idea how, but it did).
I would only suggest booting to TWRP and installing that zip, then going back into recovery afterwards and then flashing your kernel, then finally flashing Magisk (may be an issue related to my kernel and Magisk overwriting each other?).
Then go back into TWRP a final time and flash Dolby/VIPER, etc...
Eleiyas said:
I would say the guide worked perfectly, but even after removing the "-w", my phone immediately proceeded to wipe all data anyway.
HOWEVER!: This may have been personal error as the first time I did the "flash-all" bat, I forgot to "unlock_critical" (perhaps you should add this to your guide as mine seemed to have reset itself). I therefore had to flash again, which may have caused a corrupted file and automatically initiated the system wipe.
Secondly, on the first boot/install of TWRP, I would not recommend flashing absolutely everything in one go as for me it borked the install of Magisk and caused me all sorts of issues with Google Play (no idea how, but it did).
I would only suggest booting to TWRP and installing that zip, then going back into recovery afterwards and then flashing your kernel, then finally flashing Magisk (may be an issue related to my kernel and Magisk overwriting each other?).
Then go back into TWRP a final time and flash Dolby/VIPER, etc...
Click to expand...
Click to collapse
Well once you issues the "unlock_critical" it was wiped right?
Hey guys, I followed this today and it wiped data. I am not sure if Google has changed the flash-all.bat file, but I do recall in the past following these exact steps, opening the flash-all.bat, removing "-w" and that saving the data.
Today though, when I opened the bat for image (8.1.0 (OPM2.171019.029.B1, May 2018)) here's what it says: @Echo off
:: Copyright 2012 The Android Open Source Project
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
:: http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.
PATH=%PATH%;"%SYSTEMROOT%\System32"
fastboot flash bootloader bootloader-taimen-tmz12a.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-taimen-g8998-00164-1710262031.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot update image-taimen-opm1.171019.011.zip
echo Press any key to exit...
pause >nul
exit
//////////////////
So there's no -w there by default apparently. When I didn't see it I assumed I would be alright. Not the case lol. But thankfully I had already backed up the few things that mattered so it wasn't a huge deal but nevertheless, is there something i am missing for future reference?
Teffy said:
Hey guys, I followed this today and it wiped data. I am not sure if Google has changed the flash-all.bat file, but I do recall in the past following these exact steps, opening the flash-all.bat, removing "-w" and that saving the data.
Today though, when I opened the bat for image (8.1.0 (OPM2.171019.029.B1, May 2018)) here's what it says: @Echo off
:: Copyright 2012 The Android Open Source Project
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
:: http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.
PATH=%PATH%;"%SYSTEMROOT%\System32"
fastboot flash bootloader bootloader-taimen-tmz12a.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-taimen-g8998-00164-1710262031.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot update image-taimen-opm1.171019.011.zip
echo Press any key to exit...
pause >nul
exit
//////////////////
So there's no -w there by default apparently. When I didn't see it I assumed I would be alright. Not the case lol. But thankfully I had already backed up the few things that mattered so it wasn't a huge deal but nevertheless, is there something i am missing for future reference?
Click to expand...
Click to collapse
Did this occur when you tried to edit the flash-all.bat file? If so, how were you trying to edit the file?
Badger50 said:
Did this occur when you tried to edit the flash-all.bat file? If so, how were you trying to edit the file?
Click to expand...
Click to collapse
I'm not sure if you're confused about what I wrote so I'll recap. I edited the flashall with notepad but remember I never ended up changing anything at all because the file did not contain "-w" on first open after extraction.
So essentially, I did all the steps except when I editted the flash-all I didn't actually have to edit anything because there was no -w (I included full text as is, first open in my post). Then I continued through rest of the steps. Everything worked fine other than it did wipe use data at the very end.
Teffy said:
I'm not sure if you're confused about what I wrote so I'll recap. I edited the flashall with notepad but remember I never ended up changing anything at all because the file did not contain "-w" on first open after extraction.
So essentially, I did all the steps except when I editted the flash-all I didn't actually have to edit anything because there was no -w (I included full text as is, first open in my post). Then I continued through rest of the steps. Everything worked fine other than it did wipe use data at the very end.
Click to expand...
Click to collapse
I'm always confused my friend. I got it now That's pretty weird for sure. Never encountered that with all the factory images since November. Must have been a rouge download or something. I'll be on the lookout for it though in the coming months :good::good:
Can anyone confirm if this process still works on the June update?
Thanks
docluv01 said:
Can anyone confirm if this process still works on the June update?
Thanks
Click to expand...
Click to collapse
Don't see why not. It's pretty much the same as the one I use :good:
docluv01 said:
Can anyone confirm if this process still works on the June update?
Thanks
Click to expand...
Click to collapse
It worked when I flashed a device from May to Beta 2 this week, so June should still work.
My June factory flash all. bat still had the - w in it. I removed - w, saved it, ran it and worked fine. My Substratum black theme for Inbox still works as well. No data wiped at all.
If I use this method to update, is it just "dirty flashing" the device? So all my settings, apps and their data and the internal storage will remain intact? If not it's better just to flash the full OTA zip as it was suggested for me in another thread by @Badger50 ?
matekaneve said:
If I use this method to update, is it just "dirty flashing" the device? So all my settings, apps and their data and the internal storage will remain intact? If not it's better just to flash the full OTA zip as it was suggested for me in another thread by @Badger50 ?
Click to expand...
Click to collapse
Either way, your data will not be wiped. Google dirty OTA's stock, non rooted folks every month ??
Windows 10. Shift, right click menu has powershell instead of cmd.exe. Powershell doesn't work well for this. Someone tipped me to typing cmd into the path window of file explorer to get the cmd prompt going. Much easier to use than that powershell stuff.

Modifying the wpa_supplicant.conf file on TB-X304F

Hello. I have 285 different networks between the different campus apartments for which I am trying to add network profile information to a series of Lenovo Tab4 10 TB-X304F so they may connect without having our Apartment Managers carry around a list of wifi passwords.
So far, I have created a custom wpa_supplicant.conf file with all of the network blocks for each of the networks across the campus. I have rooted the device. I have pushed this custom file to /sdcard/TWRP. I then copied the file from /sdcard/TWRP to /data/misc/wifi.
Now we run into my issue, it appears that this file is stored in at least 3 locations which I have currently found, /etc/wifi, /system/etc/wifi and /data/misc/wifi. The other part of the problem is that these files appear to be rewritten/overwritten on boot. I have been trying to do my own research but everything I find is related to Raspbian or refers to a file structure which is different from this device's file structure.
Which of these file locations should I be updating with my custom wpa_supplicant.conf file? How do I stop the file from being rebuilt on boot? Or, how do I make the process, which builds the file on boot, build it with the networks I want added?
Am I missing any other steps?
I have also tried running " wpa_supplicant -iwlan0 -c/sdcard/TWRP/wpa_supplicant.conf -B " as a command in the adb shell with super user permissions and didn't receive any output or confirmation. What am I misunderstanding about the wpa_supplicant command?
Just in case here are the settings currently in /data/misc/wifi/wpa_supplicant.conf which I have copied into my custom file:
Code:
ctrl_interface=/data/misc/wifi/sockets
disable_scan_offload=1
driver_param=use_p2p_group_interface=1
update_config=1
device_name=LenovoTB-X304F
manufacturer=LENOVO
model_name=Lenovo TB-X304F
model_number=Lenovo TB-X304F
serial_number=<SerialNumber>
device_type=10-0050F204-5
config_methods=physical_display virtual_push_button
p2p_disabled=1
pmf=1
external_sim=1
tdls_external_control=1

Categories

Resources