I have LG G2 with rooted CloudyG2 2.2.
I have 5GHz router but I can't see its wifi in the networks list in my G2 (the wifi is fine, and other devices are connected to it).
I found this post and in there there is a solution to change a database entry using the command
Code:
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "UPDATE global SET value='us' WHERE name='wifi_country_code'"
and root permissions.
After setting it (via adb root), I can connect to the 5GHz network, but after reboot, this network disappears and I need to run the command again.
So - is there a way to set this entry so that it will survive reboots?
Or maybe add this command to a script that runs in boot so that it set it anytime?
Thanks
Related
Hi folks,
can i change the device name of my HTC Hero anyhow, so that in my router's overview it shows the name of it, like it does with laptops / PCs?
I know its possible with bluetooth, but i havent found any option for doing that concerning WLAN.
I didnt root my device, otherwise i would have probably tried the commands which i would use for my Ubuntu laptop:
sudo echo "newname" > /etc/hostname
sudo hostname -F /etc/hostname
and edit /etc/hosts accordingly.
Anyone knows a solution for me?
Best regards,
kapen
Please, anyone?
Or could anyone, who has a rooted Hero, go and take a look whether the files /etc/hostname, /etc/hosts and the command "hostname" exist? Or perhaps even write something in these files, i mean it wont do any harm as you are just writing sth to an ordinary text file.
If i'd have root, i'd do it myself, but for now there are no benefits for me which would push me to root and i don't want to lose my warranty for nothing.
Help is very much appreciated!
most routers let you do this on the router....
I know when i hook up to my thompson router and set a static IP address, it lets me name the device... Hardly worth hacking the device for really.
Bump
I'd like to be able to do this as well, without having to use a static IP. This can be done with symbian, winmobile, java and other types of phone not to mention internet tablets, laptops etc. Why not an Android phone?
rhedgehog said:
most routers let you do this on the router....
Click to expand...
Click to collapse
True. But most routers isnt my router, its not able to do that. And neither do i want to set a static IP on my Hero, because i'm using it with several other WLANs.
fair enough.
I just thought as there is no way that anyone seems to know of on the device, that it may be an alternative.
Ya your right.
I just thought anyone knew a solution for me. I mean its a system running on linux and i ought to be able change that kind of stuff... just don't know how :\
Heureka! It worked just the way i suggested
If you have a rooted device with busybox!, get that handy adb file and do:
Code:
1. adb root
2. adb remount
3. adb shell
3.1 cd /etc
3.2 echo "Hero" >> hostname
3.3 echo "127.0.0.1 Hero localhost.localdomain localhost" > hosts
3.4 echo "127.0.1.1 Hero" >> hosts
3.5 hostname -F /etc/hostname
Voila. Though, you'll get an error when you do "hostname" now, because something in busybox is wrongly linked against a library which doesnt allow resolving hostname by IP, but other devices (such as my router) will now display "Hero" as device name.
Side note: my only intend for doing this was, that my router WAG54G2 (Linksys by Cisco) didnt work correctly with my Hero, meaning i got a lot of connection aborts in WLAN and often could not reconnect afterwards. That seems to be solved now!
Edit:
With the method above, you''ll lose your Wlan name after reboot. You need to add a line to the init startup scripts to perform a "hostname -F /etc/hostname" on every boot. This can be done in the file /init.rc or, if you have the MoDaCo Rom, in /data/init.sh
def:"Reverse tethering" : sharing your PC's internet connection with your Android phone.
This is suppose to work with any rooted Android device with the latest of Busybox. I own an Atrix and I use Ubuntu, and it works. If you own X and use Y, I don't care . It is also suppose to work with any USB tether-able Android device (like in proper, not the kind where you need to download an app for your PC to set up a SOCKS proxy of some kind).
I also use the Gingerbread ROM leaked for AT&T. This was done on Ubuntu 11.04 Natty, but the principles stay the same.
Let's get on with, shall we:
INSTRUCTIONS
Install Firestarter and DHCP server
sudo apt-get install firestarter dhcp3-server
Connect to the internet
Like you normally would. If you connected via WiFi, your connected device would probably be wlan0, if via ethernet - eth0, if via dialup - ppp0. If you are unsure, click on the Network Manager icon and click on Connection information. Otherwise, run ifconfig to see which device has got what IP address (to give you a hint as to what network device your PC is using).
Start USB tethering on your Atrix
Plug in the USB cable in your Atrix.
Under Settings -> Wireless -> Tethering & Mobile Hotspot -> USB Tethering checked.
Your Network Manager will try to get an IP address (and will probably succeed). Click on the Network Manager icon (probably the icon has changed to an ethernet port to signify that you are connected via USB) and click on "Edit Connections".
Under the "Wired" tab double-click on USB0 to edit it
Under the "IPV4" settings click on the "Routes" button
Check the "Use this connection only for resources on its network"
OK, Save
You'll see the Network Manager icon will change back to its previous icon.
Configure Firestarter
Run firestarter
If it is your first time to start firestarter, it will prompt you with the First Run Wizard. Otherwise, click on Firewall -> Run Wizard
Click Forward to get past the intro screen.
In the drop down box, select the device you are connected to the internet with.
Click forward
Check the "Enable internet sharing" option
On the checkbox, select the "Unknown Device (usb0)" as your Local Area Network device
Check the "Enable DHCP for local network" option
On the DHCP server details, select the "Create new DHCP configuration:" option
Click forward
Uncheck the "Start Firewall now"
Click save.
Great, so Firestarter is set up. But, it saves the dhcpd.conf file (Natty specific? I don't know) in the wrong directory (/etc/dhcpd.conf instead of /etc/dhcp/dchpd.conf).
sudo mv /etc/dhcpd.conf /etc/dhcp/dhcpd.conf
Start the Firestarter firewall (in Firestarter, press CTRL-S)
Configure the Atrix
2 Options:
1) While the device is connected via USB (and Applications -> Development -> USB debugging is enabled)
sudo adb shell
su bash
netcfg usb1 dhcp
2) Run in your terminal on your phone:
su bash
netcfg usb1 dhcp
If nothing failed, then everything worked. The principle is this : IP Chains between USB0 and <internet connecting device> (set up by Firestarter) with DHCP server running. This may not be the most über geek way of doing things but is sure point-and-clicky-easy-ish.
Et voilà, sweet reverse tethered nettubes...
No Enable DHCP checkbox
while i try everything .... i m stuck at the part where the 'Enable DHCP for local network' checkbox is inactive due to 'Chromium cannot be run as root'....
i dont know why this error kindly help me with this....
How is Chromium even related to DHCP and/or firewall settings?
failed
Code:
action 'dhcp' failed (Bad file number)
I'm using LightJB 1.2 Rom with CoCore-CWM 6.2
Unfortunately my Network Manager hasn't succeed when I turned USB Tethering checked on Android since I've upgrade ubuntu from 14.04 to 16.04.
I have rooted my Nexus 7. Currently, the only way to change my MAC address is the following:
Code:
$ echo -n <MAC> > /persist/wifi/.macaddr
Using busybox ifconfig seems to work because new HWaddr is shown but in fact it doesn't - Settings->About tablet->Status shows old Wi-Fi Mac address. Additionally I cannot connect to AP any more. OpenWRT says:
deauthenticated due to local deauth request
Click to expand...
Click to collapse
I can write a script to automatically write new MAC to /persist/wifi/.macaddr and reboot, no problem, but I would prefer to avoid rebooting.
Kernel version 3.4.0-g03485a6, Android 4.4.4, Nexus 7 2013 Wi-Fi only.
Is this possible?
Has anyone ever got this to work? I'm searching on a way to have my MAC address changed upon booting the device and keeping it that way. Using ifconfig/busybox just allows you to change the MAC on that "boot session" and reverts back when you disconnect from an AP. I want to change my "stock MAC" from the get-go so that if I disconnect from an AP, it wont go back to the actual one. There is no /persist/wifi dir on my Nexus 7. Anyone who has done this before who can tell me how to do it?
I have recently tried to root the new Fire HD 10 (2017). Unfortunately i've got today a bootloop. This little guide is for Linux. The principle stays the same, so you can apply this also on Windows. Here's what i did to resolve the problem:
1. Download adb on computer (here is for linux: dl.google.com/android/repository/platform-tools-latest-linux.zip ) & unpack
2. Download the 5.5.0.0 firmware for HD10(2017) from HERE : fireos-tablet-src.s3.amazonaws.com/afKacHmumxrMp9XPdw6oykKMaw/update-kindle-40.5.9.1_user_591450020.bin
3. Rename that in update.zip and place in the same folder with adb
4. Open terminal in the same folder with adb
5. Connect your device to the computer
6. Enter recovery mode on Tablet (Power + Vol Up) & go to install update from ADB
7. Go on computer and run in the opened terminal: ./adb sideload update.zip
8. Wait till the process is finished, restart and enjoy
Exsa said:
I have recently tried to root the new Fire HD 10 (2017). Unfortunately i've got today a bootloop. This little guide is for Linux. The principle stays the same, so you can apply this also on Windows. Here's what i did to resolve the problem:
1. Download adb on computer (here is for linux: dl.google.com/android/repository/platform-tools-latest-linux.zip ) & unpack
2. Download the 5.5.0.0 firmware for HD10(2017) from HERE : fireos-tablet-src.s3.amazonaws.com/afKacHmumxrMp9XPdw6oykKMaw/update-kindle-40.5.9.1_user_591450020.bin
3. Rename that in update.zip and place in the same folder with adb
4. Open terminal in the same folder with adb
5. Connect your device to the computer
6. Enter recovery mode on Tablet (Power + Vol Up) & go to install update from ADB
7. Go on computer and run in the opened terminal: ./adb sideload update.zip
8. Wait till the process is finished, restart and enjoy
Click to expand...
Click to collapse
I attempted the same activity and ran into the same issue (using different rooting methods, even though it has been stated no root is currently available), I can also confirm reloading the OS using the stock image works.
I don't think it really matters but I didn't rename the *.bin file to a *.zip; I used the following command (on Windows):
<ADB Tools working dir>\adb.exe sideload <path to bin>\update-kindle-40.5.9.1_user_591450020.bin
On a side note, with the release of FireOS 5.6.0.0, I am trying to hold my device at 5.5.0.0 in the event that a root method is discovered. The setup wizard doesn't allow you to skip the wireless setup, after connecting to a wireless network it wants to check for "system updates" - to work around this, I used my cellular hotspot, after connecting my kindle to the hotspot, it got me passed the wireless connection screen, where it then started to check for updates. I immediately turned off the hotspot. This allowed me to get past the setup wizard and prevent system updates/checks. (I suppose someone could setup a temp access point that doesn't have a connection or route to the internet, but I haven't tested this method.)
I installed G Play, G Services, G Framework apk's and NoRootFirewall. Once I blocked all of the Amazon Apps, I connected my kindle to my regular wireless network and the device hasn't been able to download 5.6.0.0.
That being said, on a side of caution, I turn off wireless when I turn off the tablet, to ensure that NoRootFirewall is up and running before connecting to WiFi on next boot. The device was able to start a download of 5.6.0.0 once and I had to boot into recovery to clear the partial/complete download of the OTA update to 5.6.0.0.
DaKat said:
The setup wizard doesn't allow you to skip the wireless setup, after connecting to a wireless network it wants to check for "system updates" - to work around this, I used my cellular hotspot, after connecting my kindle to the hotspot, it got me passed the wireless connection screen, where it then started to check for updates. I immediately turned off the hotspot. This allowed me to get past the setup wizard and prevent system updates/checks. (I suppose someone could setup a temp access point that doesn't have a connection or route to the internet, but I haven't tested this method.)
Click to expand...
Click to collapse
I can confirm that connecting to a router with no internet access will indeed allow you to get past the wifi setup portion. I bought an HD 10 7th gen. a few weeks ago and in order to prevent any updates before I could get a firewall installed, I plugged in an old router I had lying around. Once connected to the 'dummy' router I was able to continue setup.
As for disabling wifi before rebooting - I use NoRoot DF and have granted it usage access permission and never have any issues rebooting with wifi left on. This is certainly no guarantee that it is safe and I definitely wouldn't advise doing this if you haven't granted uap to your firewall, I'm simply sharing that I have had no issues.
Hi I ran into a bootloop while trying to get Xposed Framework. I get an "error: closed" in the terminal when I try to access adb shell. I have tried kill-server and it still wont work
Since the 8.1 update of my MI A1 i can't make a wifi hotspot for my other devices. The other devices can connect perfectly, but they don't have internet. I use a dual sim and i have the issue with both providers. When i use the sim in a other phone i can hotspot perfectly. I found some things to remove the APN Type or fill in <blank> but that does not work either.
I installed the August patch, but that did solved the issue as well.
Hmm, when i turn off 1 sim card i have a working hotspot. No the kind of workaround/solution i wanted but at least it is something.
Try add "default,supl,dun" on APN type
Add the same issue and found the solution somewhere on the net. It's working fine since then.
1 - Put your phone in debugging mode
Under Setting -> system -> about phone, tap repeatedly on Build Number, until the prompt asks if you want to enable developer mode
2 - Enable USB debugging on your phone
Under Setting -> system -> Developer options turn on USB Debugging
3 - plug your phone into USB, there may be a popup to allow remote debugging, allow this.
4 - Open a command window, and browse to the folder where you have adb.
5 - Type the following and press the [Enter] key
adb shell
This starts the Android shell (terminal where commands can be typed), which can work on your phone.
Once in the shell, type this:
settings put global tether_dun_required 0
Press return. To confirm it worked, type this and press return:
settings get global tether_dun_required
It should print out a zero.
Then type either quit or exit
Had the time to test this and this worked @datasource. Thanks for the answer.
Same problem after October update
---------- Post added at 05:34 PM ---------- Previous post was at 05:28 PM ----------
Where is adb?
@sly21
adb android is a tool to edit android system. Follow this:
https://www.xda-developers.com/install-adb-windows-macos-linux/
Thank you @datasource your explanation helped me!
Not fixed in Android 9. Hardresetted my phone
no hotspot after resetting or manual dns
Hi!
Same happens to me since I bought a new sim card last week. Tried the DNS manual change to 8.8.8.8. and 8.8.4.4., re-set all wifi and data networks. Can't add ',dun' to APN type and haven't been able to access shell on adb window programme - any extra advice you could suggest?