It's not the first time this problem is listed. Suddenly connecting to any wireless networks fails by getting stuck on obtaining IP address. This happened after I enabled airplane mode for the first time. I enabled wifi while in airplane mode (shouldn't be possible right?), realised I was still in airplane mode and disabled it. This broke the wifi, I'd guess the DHCP.

A workaround is using a static IP, this still works. A solution is a factory reset, this solves the problem. I backed up before this, restoring the backup also restores the problem. I'd like to find an actual fix and not install and configure everything again.

So I made a backup of a fresh factory reset system and I have the backup of my own system. By using this:

dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv

from here How to extract .backup files created by android stock recovery? I can read the content of the backup of my broken system.

So to solve the issue I need this:

  1. to find the files responsible for the wifi mess and replace them
  2. reverse the extraction process

I can make resonable guesses about both but help is needed. For the first I would guess this:

 find . | grep dhcp

As per here: https://thealarmclocksixam.com/2013/10/26/dhcp-failure-on-android-wifi-stuck-on-obtaining-ip-address-how-i-solved-it/

And maybe these

find . | grep wifi                               

Simply replacing those directories would be worth a try

The second problem: first creating a tar, applying gunzip in the correct way and then using dd or cat to add the first 512 bytes header. I'm no hero with shell commands, I nearly always understand what I'm doing but coming up with them is different. I'd guess something like

tar -czvf userdata.tar.gz *

Should do the complete trick for the packing.

dd if=userdata_20161009_165440.backup bs=512 count=1 of=userdata_header

Should give me a header out of the original file

cat userdata_header userdata.tar.gz > userdata.backup

Should finish the process

If this works it may be a solution to a common problem that doesn't require rooting the device or living with a static ip workaround. All went well so far but when I tried to restore my home made backup file I get:

error: checksum compare failed

Which makes be suspect the header is actually a checksum, but I have no experience with those. Can anyone give me suggestions? If I can determine how the header is a valid checksum I can then try to make my own for my custom backup

  • You can try to simply delete the .pid and .lease files in /data/misc/dhcp as described in the linked side you mentioned (thealarmclocksixam.com/2013/10/26/…). – Walter Wolf Oct 24 '16 at 5:54
  • Enabling WiFi while in airplane mode is a feature and correct behavior. WiFi has much less range than a normal cellular connection and some planes even offer WiFi in the business class. Cellular connection is onlybanned because of the high range and interference (and the fact that the next cell tower has to direct its power to you when you are near enough). – GiantTree Oct 24 '16 at 6:03
  • That requires rooting the tablet, something I don't want to do – Johan Oct 24 '16 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.