[SOLVED] Changing MAC Address: Ideos U8150-D - Android Q&A, Help & Troubleshooting

SOLVED SOLVED SOLVED SOLVED
Hi there,
After flashing new ROMS to my 3 Huawei Ideos u8150 devices (gingerman v7) I found that the ips that were dynamically obtained and the MAC addresses were all identical. This means that two of the devices must be turned off for the third to be able to access the internet. So I was wondering how to change this so that the three devices can work independently?
Cheers Qwertyuiop23
EDIT:: Yup I narrowed the problem to conflicting MAC adresses and have the original mac addresses found also. Now I am trying edit the nvram.txt file with these new addresses. However, I am trouble moving the file to the SD card has I do not read write permissions tot he sd card and when I try to mount it the file cannot be found in the procs/mnt folder.
EDIT 2: Now solved see last post for solution.

Ok I solved the problem and now all three devices are working correctly.
The problem was that when I flashed the gingerman v7 to all 3 devices I flashed the same MAC Address to them all. This meant that if two of the devices were trying to access the market/internet at any one time they connection would fail as the router could not distinguish between the 2 devices (and therefore assign different IP addresses). So obviously this was the problem to be solved.
These are the steps that I took to sole the problem (obviously assumes you have root and busybox):
1. Turn WIFI OFF!! Open up terminal
2. Type
Code:
su
3. Type
Code:
mount -o remount,rw /system
. This allows you to read and write in the system directory.
4. Type
Code:
mount -o remount,rw /mnt/sdcard
. This part caused me a lot of trouble as I at first couldn't find the sdcard mount as in gingerbread it has CHANGED from /sdcard to /mnt/sdcard (I think).
5. Type
Code:
busybox cp /system/etc/firmware/nvram.txt /system
. This is making a backup of the file, just in case.
6. Type
Code:
busybox cp /system/nvram.txt /mnt/sdcard
7. Exit the terminal and connect the phone to the computer using USB cable then allow USB storage.
8. Open up the nvram.txt file on the sdcard on the computer USING NOTEPAD++ (VERY IMPORTANT TO DO THIS as the regular notepad stuffs up the encoding)
9. Edit the line the has mcaddr = to the MAC address needed. Make sure it has the same format as the current one, ie xx:xx:xx:xx:xx:xx where the x's represent numbers/letters.
10. Now remove the USB cable
11. Open terminal backup
12. Type
Code:
su
13. Repeat steps 3 and 4.
14. Type
Code:
busybox mv /mnt/sdcard/nvram.txt /system/etc/firmware
15. Exit terminal and turn WIFI on.
16. Your MAC adress will now have changed. To check go to Wifi settings -> (press options button) -> advanced and check MAC address.
Troubleshooting:
- If you can't read/write to sdcard MAKE SURE THERE IS AN SDCARD!!!!!!! (I did this)
- For the Huawei Ideos u8150-D the MAC Address is under the battery
- I know there are a lot of steps but that is only because I have tried to break them down as much as possible so they are easy to follow.
And that's how I solved my problem. I also had problems flashing clockworkmod so if you have problems give us a shout and I'll help you out.
Cheers
Qwertyuiop23

Related

[Q] How do I set the hostname?

How do I manually assign my phone a hostname on my wlan?
I've gone through all the other threads on XDA but none seem to actually work.
I've tried setprop net.hostname galaxys2
(can check this with getprop net.hostname)
and I've edited system/etc/dhcpcd/dhcpcd.conf and added hostname galaxys2 and ddns-hostname galaxys2
but still no result, anyone got any ideas?
this works for me. just add the below to the end of system/etc/dhcpcd/dhcpcd.conf
Code:
# custom hostname
hostname CHANGETHISTOSOMETHINGELSE
obviously, change the part "CHANGETHISTOSOMETHINGELSE" to the descriptive hostname that you want
note: make sure the file permission remains the same as before
can you tell me more how tho chang the dhcpcd.conf file, i try to use terminal, but the VI command was not found.
zeus_19 said:
can you tell me more how tho chang the dhcpcd.conf file, i try to use terminal, but the VI command was not found.
Click to expand...
Click to collapse
adb pull to your desktop, edit the file in notepad, finally adb push back the file
desean said:
this works for me. just add the below to the end of system/etc/dhcpcd/dhcpcd.conf
Code:
# custom hostname
hostname CHANGETHISTOSOMETHINGELSE
obviously, change the part "CHANGETHISTOSOMETHINGELSE" to the descriptive hostname that you want
note: make sure the file permission remains the same as before
Click to expand...
Click to collapse
Thanks. That's exactly what I wanted.
zeus_19 said:
can you tell me more how tho chang the dhcpcd.conf file, i try to use terminal, but the VI command was not found.
Click to expand...
Click to collapse
Remember it's case sensitive. The exact steps I just followed are as follows:
1. Install Dropbear SSH server. (Needs root)
2. SSH in (I use puttytray on Windows) and login as root (password given in Dropbear)
3. `mount -o rw,remount /system` to make the conf file writeable
4. `vi /system/etc/dhcpcd/dhcpcd.conf`
5. Hit 'I' to enter input mode. Scroll down to the last line and type 'hostname Georges-GSII'
6. Press 'Esc' to exit input mode, then type ':w' and ':q'. It should NOT give an error saying the file is read only.
7. `mount -o ro,remount /system` to mount it read only as it should be
8. Stop the SSH server and restart wifi (just turn it off and on again)
Voila.
deed02392 said:
Remember it's case sensitive. The exact steps I just followed are as follows:
1. Install Dropbear SSH server. (Needs root)
2. SSH in (I use puttytray on Windows) and login as root (password given in Dropbear)
3. type `mount -o rw,remount /system` press enter to make the conf file writeable
4. type `vi /system/etc/dhcpcd/dhcpcd.conf`press enter
5. Hit 'I' to enter input mode. Scroll down to the last line and type 'hostname Georges-GSII'
6. Press 'Esc' to exit input mode, then type ':w' press enter and type ':q'. press enter It should NOT give an error saying the file is read only.
7. type `mount -o ro,remount /system` press enter to mount it read only as it should be
8. Stop the SSH server and restart wifi (just turn it off and on again)
Voila.
Click to expand...
Click to collapse
dhcpcd.conf has new entry, hostname Nexus but still host name is androidthensumnumber ....so the above did not work for me

[Solved] NFS mountpoints and root/superuser privileges

Wanted to update this should anyone run across it - selinux is the issue...
Hi, I would like to know why I can see but not read files in NFS mounts unless they are in the primary storage location(internal storage - /data/media/0) and viewed from an app not running elevated privileges. (problem is if you have the mountpoint at a location you can only access with a file explorer running as root, you can see the files but not read them, and if you aren't root of course you can't get to the mountpoint). You can only read the files when running as a regular user which seems counter-intuitive to my understanding of the basic linux principal of root. This has only started recently, I am guessing android 4.2+
I am able to mount and read off NFS shares with stock kernel on CM10.2 (GS3), but it is a hassle because I have to switch my file explorers from root access to nonroot all the time.
the relevant line for my mounted share example from /etc/exports from server at local ip address 192.168.1.117:
Code:
/home/myth/myth1 192.168.1.0/24(rw,insecure,no_subtree_check,async)
I use smanage app (script manager) (and for some reason script must be run off of /storage/sdcard1 -- external sdcard, not internal memory) and flag it as "su"(root) and "boot"(makes it run at boot).
I have it set up so that I create the folders at boot, then either mount or unmount the network share with 3 different scripts that I can create widgets for on my home screen, but basic language should be same (note change "myth/myth1" to whatever folder names you have, and you only need the primary folder not a secondary, i just set it up this way because I have multiple mounts)
directory creation language:
Code:
mkdir /data/media/0/myth
mkdir /data/media/0/myth/myth1
mount language:
Code:
busybox mount -t nfs 192.168.1.117:/home/myth/myth1 /data/media/0/myth/myth1 -o nolock,rsize=8192,wsize=8192
language to unmount:
Code:
umount /data/media/0/myth/myth1
Now some important things:
1- This server setup (etc/exports) worked fine and had no issues before android 4.2
2- I have had severe issues trying to mount at other points other than /data/media/0, so I can not recommend mounting anywhere else, though it may be possible
3- Starting with Android 4.2, there are major issues seeing things such as NFS mounts among different applications. For some reason I can see, but NOT READ files on the NFS share when the file explore app is running as ROOT/SU. This is why I have only recently been able to get it to work at /data/media/0, and that is because I figured out that the mountpoint has to be accessible by an app when it is not running root privileges. People have hinted that this has something to do with the new multiuser namespaces : see the bottom of this page: http://source.android.com/devices/tech/storage/index.html
any thoughts or understandings would be greatly appreciated on this so I can keep my NFS shares working with further changes

[GUIDE][TUTORIAL][SHARE] How to make a nandroid backup directly to your computer with

Note: I'm just sharing the work of the XDA member.This guide was tested on Galaxy Y GT-S5360.Here's a little introduction:
scandiun said:
INFORMATION
This guide is intended to make a full backup of your android phone (the entire memory block with all partitions) or a single partition (including sdcards, etc) directly to your computer, in either
Block level (with dd): for single partitions or whole memory block (all partitions in one piece). The backup always has the same size which is the size of the partition.
File level (with tar): only for individual partitions. This only includes files and folders, so occupies much less space, depending on how much filled is the partition.
It can be done with the phone powered on or from ClockWorkMod Recovery (from both ADB works, while in Fastboot doesn't so won't apply). Unless specified the commands meant to be used from Windows. For Linux and Unix is similar.
REQUIREMENTS
Rooted Android Phone
Busybox installed on your phone
If you are using Linux / OS X you have native tools, for Windows download Cygwin, and install with it netcat, pv and util-linux. Get them from Cygwin's setup.exe
ADB installed.
Make sure adb.exe is in your windows' path. See here and here, or use Path Manager.
Android phone with USB Debugging enabled, and the proper drivers installed on Windows so the phone is recognized. Typing 'adb devices' on a terminal should show your device.
PARTITION IDENTIFICATION
You now have to identify the partition or block device that you want to backup. For a single partition you can use either tar or dd, while for the entire memory block you can only use dd.
For example, on Galaxy Nexus you have the list of partitions here and for Galaxy S2 here.
Usually on android, the entire block containing all partitions is located at /dev/block/mmcblk0 and the data partitions is a subpartition of it. You can push parted with GPT support to your device and see all information on a partition or block.
Whole phone memory -> /dev/block/mmcblk0 (may vary, in some phones this is the sdcard)
Subpartitions -> depends on each device. Usually at /dev/block/platform/dw_mmc/by-name/ there are listed by name linking to the real device.
Back up of the whole memory block (via adb)
Connect the phone in ADB mode and unlock the screen.
Open one Cygwin Terminal and enter (replace mmcblk0 if needed):
Code:
adb forward tcp:5555 tcp:5555
adb shell
su
/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0
You will see the cursor blinking at the left. Now the phone is waiting to send the block over the network.
Open another Cygwin terminal and type:
Code:
adb forward tcp:5555 tcp:5555
cd /path/to/store/the/backup
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw
You will see how the image size is growing until it finishes. Now you have the whole phone backed up in raw format. You can see the contents of the GPT partition with gptfdisk tool, available for windows, linux and such. See official website and sourceforge to get it. You can do it the same from ClockWorkMod Recovery but you have to mount first the /system partition since the busybox included with clockworkmod does not come with netcat and you have to use the one from the system partition.
With further linux tools you could edit or extract single partitions from the whole block.
You can use adb via wifi as well with applications like WiFi ADB.
Back up of the whole memory block (via wifi)
Original post: [Q] Nandroid directly to computer w/o sdcard
We need to install a FTP server on the computer or the other device, configure a user with a password if we want to, and set some port. It uses by default 21 but this example uses 40. We must set a home dir for the user with write permissions.
Usually is a good idea to put myfifo in /cache not in /data because we may overwrite sensitive data in case we want to use that raw image for data recovery.
Open one Cygwin terminal
Code:
adb shell
su
mkfifo /cache/myfifo
ftpput -v -u user -p pass -P 40 COMPUTER_IP block.raw /cache/myfifo
Open another Cygwin terminal
Code:
adb shell
su
dd if=/dev/block/mmcblk0p12 of=/cache/myfifo
Tips:
- Fifos only can be made on linux native filesystems, for example on a FAT partition is not possible.
- Reading from a partition does not modify it.
Now check on Filezilla Server the speed
Back up of the whole memory block (USB tethering, Wifi tethering)
To use tethering you have to disconnect the computer from all networks and connect it only to the phone with the type of connection you want.
Once you connect it, you can view the IP of the computer and the IP of the phone from connection properties. The ip is the computer ip and the gateway is the phone's ip.
Wifi Tethering: Computer Phone Internet
USB Tethering:
Computer Phone Internet
Conputer Phone Internet
This is exactly the same as via wifi, except that the transfer speed is much higher because the computer and the phone are directly connected, instead of using a router as a gateway. In this case, the gateway is the phone. USB tethering has the highest transfer rate.
Back up of a single partition (raw = every bit of the partition)
It is exactly the same as the the previous but replacing mmcblk0 by the corresponding partition. You can use in this particular case several software to read the partition from windows, depending on partition filesystem: DiskInternals Linux Reader, Ext2Read, Ext2 File System Driver for Windows, Ext4Explore, plugin for Total Commander and ImDisk Virtual Disk Driver. You can also use recovery software on individual partitions like Recuva in combination with VHD Tool or command line tools included with operating systems.
Back up of a single partition (tar = only files and folders)
In this case, you need the partition mounted. To see the list of mounted partitions type on Cygwin Terminal
Code:
adb shell mount
Now you need to know where is mounted the partition you want to backup, for example the firmware is mounted on /system, which is the ROM.
In this case you will have to open three terminals, because of android limitations:
Open one Cygwin terminal and create a fifo, in /cache, for example, and redirect the tar there
Code:
adb forward tcp:5555 tcp:5555
adb shell
su
/system/xbin/busybox mkfifo /cache/myfifo
/system/xbin/busybox tar -cvf /cache/myfifo /system
We have to do it this way because redirecting the tar to stdout (with - ) is broken on android and will corrupt the tar file.
Open a second Cygwin terminal and type:
Code:
adb forward tcp:5555 tcp:5555
adb shell
su
/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox cat /cache/myfifo
Open a third Cygwin terminal and type:
Code:
adb forward tcp:5555 tcp:5555
cd /path/to/store/the/backup
nc 127.0.0.1 5555 | pv -i 0.5 > system.tar
You can browse the tar file with Winrar, Total Commander, PeaZip and almost any compression tool. Note that you shouldn't extract files or edit it since the tar format saves the permission and owner data for each file, that is lost when extracted to FAT / NTFS partitions and you will mess things when restoring.
LINKS
[GUIDE] Internal Memory Data Recovery - Yes We Can!
How to Create and Attach a Virtual Hard Disk in Windows 7
[Guide] Types of Android backups
Click to expand...
Click to collapse
Original Thread : http://forum.xda-developers.com/showthread.php?t=1818321
And here is the guide to make nandroid backup through terminal app in android with switching off the phone in sdcard!!!
http://forum.xda-developers.com/showthread.php?t=1620255

[Q] configuring wifi connection under recovery

hello i wonder if i can get some help
i am in recovery mode under my smartphone rooted with adb shell
i can mount android /system and /data
i am able to use linux located on external sd
(see my script http://jeanmichel.gens.free.fr/etc/install copied before in /system/bin )
i just want to activate the wifi connection
first i load module 80211 with insmod ok
when i run wpa_suplicant with my /data/misc/wifi/wpa_suplicant.conf -i wlan0 -Dnl80211 -c/data/misc/wifi/wpa_suplicant.conf
it tells that my wlan0 interface is not set
i wonder if i must run log/wapper ... dhcp before,
under android looks run after in the process numbers
how the wlanO is set ?

[Q] configuring wifi connection under recovery

hello i wonder if i can get some help
i am in recovery mode under my smartphone rooted with adb shell
i can mount android /system and /data
i am able to use linux located on external sd
(see my script http://jeanmichel.gens.free.fr/etc/install copied before in /system/bin )
i just want to activate the wifi connection
first i load module 80211 with insmod ok
when i run wpa_suplicant with my /data/misc/wifi/wpa_suplicant.conf -i wlan0 -Dnl80211 -c/data/misc/wifi/wpa_suplicant.conf
it tells that my wlan0 interface is not set
i wonder if i must run log/wapper ... dhcp before,
under android looks run after in the process numbers
how the wlanO is set ?

Categories

Resources