[Q] Hardware Wifi Failure? - G Tablet Q&A, Help & Troubleshooting

Hello, I was given a Gtablet by a friend. Everything is in proper working order except for the wifi. The wifi will endlessly scan, never pulling up any SSIDs. Here's what I've done to troubleshoot:
Ascertained flight mode was off (it was)
Enabled wifi through the developer options (Did nothing)
Manually enter SSID/Security information (Claims that SSID is not in range)
Reloaded the OS (He had VEGAn Tab on there. I reloaded the 5.1 Beta. I don't know what version he had on there, oops.)
After a clean install I have the exact same issue, which leads me to believe it is a hardware issue rather than a software issue. Is this common? Am I forgetting something? Would loading an entirely different ROM be of any use or do they also use the same driver?
My apologies if this has been answered previously, but in all my searching I can only find people who have this problem temporarily; a reboot fixes it for them. I haven't been able to find someone who has had this as a persistent issue.

JungleWallace said:
Hello, I was given a Gtablet by a friend. Everything is in proper working order except for the wifi. The wifi will endlessly scan, never pulling up any SSIDs.
Click to expand...
Click to collapse
I'll have to look at some logs to ascertain what your WiFi problem is.
Run the commands in this post (after rebooting the tablet) and then post the text files that're created.

rajeevvp said:
I'll have to look at some logs to ascertain what your WiFi problem is.
Click to expand...
Click to collapse
Thanks, see attached are the logs as per request. As a side note, now that I have the terminal emulator on there I tried a few commands I dug up on the internet after I looked over the logs.
Code:
$ su
# ifconfig tiwlan0 up
# ifconfig eth0 up
Both gave an error message
Code:
error: SIOCGIFFLAGS (No such device)
Also
Code:
# svc wifi enable
did not solve my issues. Oh well.

FYI:
JungleWallace said:
...I tried a few commands I dug up on the internet after I looked over the logs.
Code:
$ su
# ifconfig tiwlan0 up
# ifconfig eth0 up
Both gave an error message
Code:
error: SIOCGIFFLAGS (No such device)
Click to expand...
Click to collapse
The wireless LAN interface name on the gTab is wlan0. Hence your error messages: "No such device" for the ifnames tiwlan0 and eth0. (The latter would work for the ethernet I/F on the dock--if you had one connected.)
Also
Code:
# svc wifi enable
did not solve my issues. Oh well.
Click to expand...
Click to collapse
1. You have to look at the Android system logs (using logcat) to see the result of that svc command.
2. Your Android logs indicate that your WiFi interface is a) disabled at startup and b) then not enabled thereafter:
Code:
01-07 23:21:10.429 V/ConnectivityService( 990): Starting Wifi Service.
01-07 23:21:10.429 I/WifiService( 990): WifiService starting up with Wi-Fi [B]disabled[/B]
Suggestions:
Since this now looks like a ROM problem (ie. not HW):
1. See this thread. Run the script to disable Airplane Mode which might be causing your problem. If that doesn't work, try step 2:
2. Boot into CWM and then a) Format /cache and b) Repartition the Internal SD card (take the external one out first).
You'll lose all your current apps and data with this step, essentially reverting to a "fresh" install of your ROM.
Re-setup WiFi, time & date and other things again.
If step 2. doesn't work, report back next year, and I'll give you more commands to run then.

rajeevvp said:
If step 2. doesn't work, report back next year, and I'll give you more commands to run then.
Click to expand...
Click to collapse
Negative. Ran the airplane fix script, nothing. Reset cache/re-partitioned, still nothing. It's still endlessly scanning/shutting off/scanning.

JungleWallace said:
Negative. Ran the airplane fix script, nothing. Reset cache/re-partitioned, still nothing.
Click to expand...
Click to collapse
OK. Not one of the common simple problems, then.
It's still endlessly scanning/shutting off/scanning.
Click to expand...
Click to collapse
This is puzzling because from your last logs, it doesn't look like the wlan kernel driver was even loaded, so no AP scanning should be possible. A little background will clarify what I mean.
On all the 2.6.32.x kernels for the gTablet, the wlan driver is not compiled into the kernel. Instead, it is built as a separate kernel module which is loaded and unloaded as needed by Android (from the files in /system/lib/hw/wlan/). When the wlan driver is loaded both the kernel (dmesg) and Android (logcat) will show some characteristic messages and until the driver is inserted into the kernel no AP scanning, or other wireless functions, should be possible. And, no wlan driver-related messages in your logs tells me that the driver was likely not loaded. (Also, only after the wlan driver is loaded does it check and initialize the wireless HW. So, only after its been loaded, strictly speaking, can we rule out a HW problem.)
Sometimes the Android logs are not complete, so I want to you setup ADB on your PC, enable USB debugging on the gTablet (Setting > Applications > Development) and collect the Android logs like this from now on:
1. Power off gTab; attach the USB cable to it.
2. Open a CMD.exe window on the PC, then run this command (and keep the window minimized):
Code:
C:\> [B]adb logcat -v time > logcat.txt[/B]
After all the tests/commands have been done, restore this window and press Ctrl-C to kill ADB and terminate Android log collection.
3. Power on the gTablet. The ADB command will wait for the gTablet and keep collecting logs on the PC.
Post also the output of these commands:
Code:
C:\> [B]adb shell dmesg > dmesg.txt[/B]
C:\> [B]adb shell lsmod > lsmod.txt[/B]
C:\> [B]adb shell "cd /; find system -type f -print0 | xargs -0 sha1sum" > sha1sum.txt[/B]
Is this the ROM you currently have?
Have you applied the VEGAn 1.00 beta 5.1.1 supplement also?

rajeevvp said:
OK. Not one of the common simple problems, then.
.........
Is this the ROM you currently have?
Have you applied the VEGAn 1.00 beta 5.1.1 supplement also?
Click to expand...
Click to collapse
That was the current ROM I was using. I had not applied the supplement yet, but now I have. Still the same issue. Here are the logs.

JungleWallace said:
That was the current ROM I was using. I had not applied the supplement yet, but now I have. Still the same issue. Here are the logs.
Click to expand...
Click to collapse
In this one I can see the kernel WiFi driver being loaded, and the driver is not reporting any HW chip, SDIO bus, or other errors:
Code:
<4>[ 23.485281] sdio_reset_comm():
<4>[ 23.503617] DHD: dongle ram size is set to 294912(orig 294912)
<4>[ 23.676913] Firmware version = wl0: May 17 2010 22:38:50 version 4.218.223.1
<4>[ 23.887647] wlan0: Broadcom Dongle Host Driver mac=e0:2a:82:08:3e:81
<4>[ 23.894047] Enter wl_control_wl_start
<4>[ 23.897864] Exited wl_control_wl_start
<4>[ 23.907103]
<4>[ 23.907109] Dongle Host Driver, version 4.218.223.1
As far as the kernel driver is concrned, everything looks OK, but the Android logs still don't show any SSID associations.
What're the exact outputs of these commands? (You can post a screenshot. Mask the psk= value from the 1st output, if present)
Code:
C:\> [B]adb shell "fgrep -v '#' /data/misc/wifi/wpa_supplicant.conf | tr -s '\n'"[/B]
ctrl_interface=wlan0
update_config=1
...
C:\> [B]adb shell wpa_cli -i wlan0 driver rssi[/B]
...
C:\> [B]adb shell wpa_cli -i wlan0 driver linkspeed[/B]
LinkSpeed [I]nn[/I]
C:\> [B]adb shell wpa_cli -i wlan0 scan[/B]
OK
C:\> [B]adb shell wpa_cli -i wlan0 scan_results[/B]
bssid / frequency / signal level / flags / ssid
aa:bb:cc:dd:ee:ff 2452 185 [WPA2-PSK-CCMP] [I]YourSSID[/I]
Collect also the dmesg and logcat outputs as before.

[/FONT]
rajeevvp said:
What're the exact outputs of these commands? (You can post a screenshot. Mask the psk= value from the 1st output, if present) [...] Collect also the dmesg and logcat outputs as before.
Click to expand...
Click to collapse
See attached. Ignore my syntax errors that I underlined. I was typing wlan instead of wlan0.

JungleWallace said:
Ignore my syntax errors that I underlined. I was typing wlan instead of wlan0.
Click to expand...
Click to collapse
Those are OK since you've corrected them. But, these commands you'll have to redo:
1. In the first command (fgrep ... | tr), you've typed a '/' (forward slash) instead of what I've given in the example, which is a '\' (back-slash) character.
The correct character will remove all those blank lines. But, this is a minor typo compared to:
2. The last 2 commands (wpa_cli scan* ...), which you'll have to redo. This time without the extraneous driver argument (again, see the example)--which turns it into a completely different (and non-existent) command. This is why the output doesn't look like what I've shown.
Instead of typing the commands in manually, select and copy the command lines from the browser and paste them into the shell window.
You might also want to increase the no. of columns that CMD.exe displays: Right-click on the title-bar; choose Properties; select Layout; increase the no. of Columns to, let's say, 150.
3. That dmesg.txt file is not very useful because you've not rebooted the tablet before issuing that command.
The kernel has a fixed-size message buffer, so all the HW initialization messages printed only at system boot will be overwritten by later, and irrelevent, messages as time passes. From the timestamps, it looks like your tablet's been on for a couple of weeks, at least--I can't see any of the earlier boot-up messages.

Related

[Q] Second Camera?

Good day...
Im wanting to connect a USB camera to my ViewSonic G Tablet... I have 3 different USB models. When I plug them in (individually,) I get the /dev/video0 device but I don't seem to be able to use the device...
Why a second camera? I'm thinking I can use my G Tab in my car with a USB camera connected for a Baby Cam (since the baby faces the other way so I can't see and most of my traveling is at night so the normal mirror won't work unless I blind the poor child...) -- In theory, it could be used as a backup camera as well. (Same effect)
The internal camera works, but I don't need to see myself, I'd rather see something behind me.
Ideas?
I've scoured the Forums in more detail... Several ask the questions and someone made it work on the Nook, but it looked Nook specific. =/
Is there a more appropriate place to ask? This would affect all Android Devices that have a USB Host Port...
Now, the G Tablet, VEGAn mod at least... has the UVC Driver for WebCams. When I plug a camera in I get the /dev/video0 device (which doesn't exist until I plug in a camera.) - could it be permissions or is the driver not fully implemented?
The mplayer app that was released sets the root path to /sdcard so I can't point it at /dev/video0... I've tried to use the stream part, but it just exits the video - no error that I can see...
adamsoutherland said:
Now, the G Tablet, VEGAn mod at least... has the UVC Driver for WebCams. When I plug a camera in I get the /dev/video0 device (which doesn't exist until I plug in a camera.) - could it be permissions or is the driver not fully implemented?
Click to expand...
Click to collapse
The device appearing is a good first sign. Can you get me a dmesg output after you've plugged the webcam in? Run a Terminal Emulator app, then type in the window:
Code:
$ [B]dmesg > /mnt/sdcard/dmesg.txt[/B]
The mplayer app that was released sets the root path to /sdcard so I can't point it at /dev/video0... I've tried to use the stream part, but it just exits the video - no error that I can see...
Click to expand...
Click to collapse
Is this app an Android port of the standard mplayer for Linux? If yes, then it will use the V4L (Video 4 Linux) API to grab video frames, and if you can start it on the command line (or supply an input file name), then you can try "tv://" as the input file name.
Run this command first, though, to give everybody read-write access to /dev/video0:
Code:
$ [B]su[/B]
# [B]chmod 666 /dev/video0[/B]
I'm attaching a dmesg prior to plugging in the camera, and one after... I'm also inserting the text of the "diff" in the post...
Code:
[ 189.574313] usb 1-1.1: new high speed USB device using tegra-ehci and address 3
[ 189.657223] usb 1-1.1: New USB device found, idVendor=18ec, idProduct=3299
[ 189.664506] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 189.671944] usb 1-1.1: Product: USB2.0 PC CAMERA
[ 189.677125] usb 1-1.1: Manufacturer: ARKMICRO
[ 189.685907] usb 1-1.1: configuration #1 chosen from 1 choice
[ 189.695760] uvcvideo: Found UVC 1.00 device USB2.0 PC CAMERA (18ec:3299)
[ 189.708989] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
[ 189.732392] input: USB2.0 PC CAMERA as /devices/platform/tegra-ehci.2/usb1/1-1/1-1.1/1-1.1:1.0/input/input7
[ 190.318832] SO340010: gpio_val=0xc0a50000, button_val = 0xdbaf0002
[ 190.445387] SO340010: gpio_val=0xc0a50000, button_val = 0xdbaf0000
and this:
Code:
/data/data/berserker.android.apps.sshdroid/home # ls -lh /dev/vid*
crw-rw---- 1 0 1006 81, 0 Sep 2 18:22 /dev/video0
I've also done this:
Code:
/data/data/berserker.android.apps.sshdroid/home # chmod 666 /dev/video0
/data/data/berserker.android.apps.sshdroid/home # cat /dev/video0 /mnt/sdcard/test.mpg
cat: read error: No such device
/data/data/berserker.android.apps.sshdroid/home # ls -lh /dev/vid*
crw-rw-rw- 1 0 1006 81, 0 Sep 2 18:22 /dev/video0
/data/data/berserker.android.apps.sshdroid/home #
The mplayer was an APK from someone on the forums... I've opened it up only to find a "mplayer.so" as I thought it might contain the mplayer binary... (I don't have a machine (with sufficient space) to load the Android SDK at the moment...) (It's on my todo list.)
Am I right to try "cat /dev/video0" before I find the proper mplayer or event ffmpeg binary? (It generally works in linux when I do it...)
PS - I have 3 WebCams, I can give you a dmesg of each one if you need it... They all appear to do the same thing (they are by different manufacturers... iMicro, Sabrent and Agama.) -- also note that these 3 web cams work in Linux (each slightly different, but they work.)
adamsoutherland said:
The mplayer was an APK from someone on the forums... I've opened it up only to find a "mplayer.so" as I thought it might contain the mplayer binary... (I don't have a machine (with sufficient space) to load the Android SDK at the moment...) (It's on my todo list.)
Click to expand...
Click to collapse
Attach the APK so I can have a look at it.
Am I right to try "cat /dev/video0" before I find the proper mplayer or event ffmpeg binary? (It generally works in linux when I do it...)
Click to expand...
Click to collapse
I'm surprised that that works even on standard Linux! You have to setup the frame capture parameters first using ioctl()s before you can start reading data from /dev/video0. Even after that, you get raw frame data, and not mpeg video from the device.
PS - I have 3 WebCams, I can give you a dmesg of each one if you need it... They all appear to do the same thing (they are by different manufacturers... iMicro, Sabrent and Agama.) -- also note that these 3 web cams work in Linux (each slightly different, but they work.)
Click to expand...
Click to collapse
Attach all the 3 webcams to your desktop machine, check that each one works and get me a dmesg and a lsmod command output for each one. I want to see what drivers are loaded for each one. We'll have to load the same drivers on the gTablet too after compiling them.
Code:
[I]Attach Camera1 and make sure its working, then,[/I]
desktop$ [B]dmesg > dmesg1.txt[/B]
desktop$ [B]lsmod > lsmod1.txt[/B]
[I]Attach Camera2 and make sure its working, then,[/I]
desktop$ [B]dmesg > dmesg2.txt[/B]
desktop$ [B]lsmod > lsmod2.txt[/B]
[I]Attach Camera3 and make sure its working, then,[/I]
desktop$ [B]dmesg > dmesg3.txt[/B]
desktop$ [B]lsmod > lsmod3.txt[/B]
Caveats: Even if we get all the drivers to load on the gTablet (the V4L drivers, the main camera driver, and, possibly, its support drivers), we still have the problem of displaying the video stream on Android. While I'm happy to write whatever systems code is required, writing the Java UI code for the Android app is beyond my ken. We'll have to ask someone else (try in the main Android development forums on XDA, or, ask user herbert1 here who's helped out before with custom Java apps) once we've checked that we can read data from the V4L device (I'll send you a test prog which'll output .jpg files once every second once we have the drivers sorted out).
It would be great if someone has already ported mplayer for Android.
I'm attaching the APK I found...
Side note:
After looking deeper at 'cat /dev/video0'; it does not work with these webcams... I think this works on my TV Cards that natively displayed mpeg2 video (it's been a while).
See the attached dmesg-*.txt and lsmod-*.txt. Each is named after the company logo on the camera. (I can get the model numbers if the dmesg isn't enough.) Between each dmesg I rebooted the linux box for clarity. (They can all work at once, but I get confused on what is doing what.)
The command I used to test:
Code:
ffmpeg -f alsa -i hw:0,0 -f video4linux2 -s 320x240 -i /dev/video0 test-agama.mpg
(Each of these cameras has audio - The audio is not important for what I am attempting to do...)
About the UI... I've been avoiding this but it maybe time to start work on this =P -- I just realized that the box I'm testing the cameras on has space... I may have to reload linux for 64bit but then I can install the Android SDK and get to UI Development.
All three webcams seem to depend on only 3 kernel modules: uvcvideo, videodev and v4l1_compat.
If all 3 drivers are loaded on the gTablet too, then we should be able to get the video frames from /dev/video0 (or whatever the device).
I'll send you a test program this evening. In the mean time...:
That .apk file contains the application too--the classes.dex file contains the Dalvik executable bytecode. Just install the .apk, then run the app and provide a file name as input. Try "tv://" as the file name once all 3 drivers have been loaded. Do the "chmod 666 /dev/video0" before running the app.
Try the webcam test program in the attachment. The program reads from a user-specified V4L device and outputs JPEG images until you stop it with CTRL-C. Run as:
Code:
$ [B]su[/B] [I]Become superuser[/I]
# [B]mkdir /mnt/sdcard/tmp[/B] [I]Make a tmp dir. for storing imgs[/I]
# [B]./webcam -o /mnt/sdcard/tmp[/B] [I]Capture webcam images until stopped with CTRL-C[/I]
Get usage instructions with "./webcam --help".
EDIT: I actually didn't test the program out because I couldn't locate my webcam. Report if you encounter any bugs.
Quick Update:
I will be trying this tonight... I've been busy trying to get things done. (Little one is going to be born tomorrow!)
Sorry I haven't been able to respond sooner...
rajeevvp said:
Try the webcam test program in the attachment. The program reads from a user-specified V4L device and outputs JPEG images until you stop it with CTRL-C. Run as:
Code:
$ [B]su[/B] [I]Become superuser[/I]
# [B]mkdir /mnt/sdcard/tmp[/B] [I]Make a tmp dir. for storing imgs[/I]
# [B]./webcam -o /mnt/sdcard/tmp[/B] [I]Capture webcam images until stopped with CTRL-C[/I]
Get usage instructions with "./webcam --help".
EDIT: I actually didn't test the program out because I couldn't locate my webcam. Report if you encounter any bugs.
Click to expand...
Click to collapse
I copied it to /mnt/asec (because I can execute things there without remount)
When I run it, i get:
Code:
/mnt/asec # ./webcam -o /mnt/asec/tmp -d /dev/video0
./webcam: error getting video channel info. Invalid argument
I tried without the -d /dev/video0 and got the same result.
(Sorry for the LOOONG delay... Turns out a newborn takes more time and energy than I expected. I'm just now figuring that out... =P It's worth it though.)
Try this simple USB Webcam test app in the attachment which works on VEGAn-Tab 7.1 and GtabComb* (which have the pershoot kernel).
1. Plug the USB webcam in.
Assuming the kernel you're running has the correct USB webcam drivers compiled in--and, most of them do seem to have the V4L subsystem and the UVC camera drivers (which supports a lot of the common USB webcams) built into the kernel--you should see a new /dev/video0 device file pop up.
2. Run these commands to set correct permissions and owners on the device file (some ROMs--eg. GtabCombOver--don't need it):
Code:
$ [B]su[/B]
# [B]chown system.camera /dev/video0[/B]
# [B]chmod 660 /dev/video0[/B]
(Note that if you unplug and replug the webcam, you'll have to re-run the commands on ROMs which don't set the correct permissions and owners.)
3. Now install and run the SimpleWebCam app.
If, for some reason, no /dev/video0 device is created, then your webcam may need different device drivers, which have not been compiled in (or not been written!), in which case you'll have to compile a new kernel with the correct drivers either built-in or as loadable modules. Nothing else described in this post will need change.
adamsoutherland said:
When I run it, i get:
Code:
/mnt/asec # ./webcam -o /mnt/asec/tmp -d /dev/video0
./webcam: error getting video channel info. Invalid argument
I tried without the -d /dev/video0 and got the same result.
Click to expand...
Click to collapse
Looks like I'll have to update the code to make the program use the V4L2 API instead.
Nexus 7
Just tested this on my Google Nexus 7 tablet and it worked fine, I didn't have to modify the permissions either,
PS, it is rooted, of sure if that makes much difference, will test it on my friends stock nexus 7 tomorrow
USB Camera App
I was able to get the app working on my rooted Nexus 7 4.2 and an unrooted Galaxy SIII . How hard would it be to add a video record function to the app?
droidoso said:
How hard would it be to add a video record function to the app?
Click to expand...
Click to collapse
If you want to do that, then it's better to compile a custom native camera-interface library which makes the USB webcam appear as a standard camera (--the rear one, usually). Then, you can use the standard apps to record videos.
See this thread for a precompiled binary and for the source.

[Q] Spoofing MAC address on the Nexus 7 FLO with KitKat

I recently bought a Nexus 7 Flo tablet running the latest Android 4.4. I've since been trying to spoof a MAC address on it, but for some reason the wireless card seems to refuse to use the spoofed mac no matter what I do.
There's a more detailed discussion what I've tried in android.stackexchange.com/questions/57922/wifi-network-not-accessible-with-modified-mac-address (forum won't let me link), but I'll repeat the main points here. I have tried both ip link set wlan0 address XX:XX:XX:XX:XX:XX and busybox ifconfig wlan0 hw ether XX:XX:XX:XX:XX:XX. They both result in the MAC address being changed as far as I can tell from the output of ip link and busybox ifconfig, but when connecting to a network with MAC filtering with the spoofed MAC address being allowed, the device fails to connect. /sys/class/net/wlan0/address also shows the spoofed address. If I use the device's stock MAC and add this to the filter on the AP, then the device connects successfully.
Has anyone experienced anything similar on KitKat devices?
Jonhoo said:
Has anyone experienced anything similar on KitKat devices?
Click to expand...
Click to collapse
Haven't tried anything, yet. Just wondering if you've had any success with this since it's been a while. Thanx=)
pan.droid said:
Haven't tried anything, yet. Just wondering if you've had any success with this since it's been a while. Thanx=)
Click to expand...
Click to collapse
No, unfortunately not. I ended up buying a Samsung Galaxy S II where I can change the MAC successfully for demo purposes. I would still really like to get this working on an up-to-date tablet though..
Bummer. Okay, thanx.
---------- Post added at 03:54 PM ---------- Previous post was at 03:53 PM ----------
This is hopeful, but not a silver bullet... http://forum.xda-developers.com/showthread.php?t=2180809
pan.droid said:
This is hopeful, but not a silver bullet... http://forum.xda-developers.com/showthread.php?t=2180809
Click to expand...
Click to collapse
Interesting...
There seems to be a couple of suggestions here that I will try when I get back to work next week:
- Enable Airplane mode before changing the MAC, then turn airplane mode off again and your WiFi should work
- Deleting /persist/wifi before changing the MAC
- Using this spoofing app
Good news everyone!
/persist/wifi/.macaddr seems to be the key to changing the MAC, *and* it allows the MAC to be changed *permanently*!
Code:
$ adb shell
$ su
# cd /persist/wifi
# echo -n "112233445566" > .macaddr
# ^D
$ ^D
$ adb reboot
And voilà, MAC changed even after reboot, and connects without a problem!
Jonhoo said:
Good news everyone!
/persist/wifi/.macaddr seems to be the key to changing the MAC, *and* it allows the MAC to be changed *permanently*!
Code:
$ adb shell
$ su
# cd /persist/wifi
# echo -n "112233445566" > .macaddr
# ^D
$ ^D
$ adb reboot
And voilà, MAC changed even after reboot, and connects without a problem!
Click to expand...
Click to collapse
Hi,
I stumbled upon your post. I'm trying to do the same on my Nexus 5. I found your method works in changing my MAC address but it doesn't change to the string I put in the quotes. What I found is that the address I end up with is the unicode values of the first 6 characters. Is there some special format for this file?
Thanks!
tmagritte said:
I found your method works in changing my MAC address but it doesn't change to the string I put in the quotes. What I found is that the address I end up with is the unicode values of the first 6 characters. Is there some special format for this file?
Click to expand...
Click to collapse
Hmm, that's quite strange. From what I remember, simply using echo worked fine for me.
What you can do instead is this:
Code:
echo -ne '\x11\x22\x33\x44\x55\x66' > .macaddr
Let me know if it works!
Jonhoo said:
Hmm, that's quite strange. From what I remember, simply using echo worked fine for me.
What you can do instead is this:
Code:
echo -ne '\x11\x22\x33\x44\x55\x66' > .macaddr
Let me know if it works!
Click to expand...
Click to collapse
Brilliant!
Thanks so much!
---------- Post added at 01:31 PM ---------- Previous post was at 01:31 PM ----------
I'm guessing for some reason on the Nexus 7 it uses a text file but a binary file on the Nexus 5...
I also found a couple of ways to activate the new MAC address without requiring a reboot. This is useful if you want to be able to change MAC address dynamically using Tasker or similar.
The least obtrusive method I found is adding:
busybox ifconfig wlan0 down
busybox ifconfig wlan0 up
commands after the echo command. This will briefly turn off the WiFi adapter and when it comes back on it will have the new MAC address. I actually found the busybox ifconfig wlan0 up command isn't strictly necessary, at least on the Nexus 5, as it seems to get reactivated automatically after you take it down.
You can confirm the new MAC is in effect by opening a new terminal emulator window and running:
busybox ifconfig wlan0
Interestingly, if you go into Wifi Settings, under advanced settings it still shows the old MAC address but the WiFi adapter is clearly running with the new one as indicated by ifconfig and the ability to connect to a MAC filtered router.
Alternatively, toggling on then off airplane mode will also activate the new MAC and it even shows the new MAC under the advanced WiFi settings.
I like the first option as you'd be able to automate dynamic changes for a particular network without the risk of interrupting voice or cellular data connections when it happens.
tmagritte said:
The least obtrusive method I found is adding:
busybox ifconfig wlan0 down
busybox ifconfig wlan0 up
Click to expand...
Click to collapse
I tried using the approach above to reset the MAC on-the-fly, but it doesn't seem to work on my Nexus 5 4.4.4.
For now I'm sticking with "reboot" at the end of my .sh script, which works well. Any thoughts / advice are appreciated. Thanks!
great but
Jonhoo said:
Good news everyone!
/persist/wifi/.macaddr seems to be the key to changing the MAC, *and* it allows the MAC to be changed *permanently*!
Code:
$ adb shell
$ su
# cd /persist/wifi
# echo -n "112233445566" > .macaddr
# ^D
$ ^D
$ adb reboot
And voilà, MAC changed even after reboot, and connects without a problem!
Click to expand...
Click to collapse
helo i tried u r method and i succeed the problem its gaining random mac address not specified mac address i would like to copy iPhone mac address to my android but it is failed please help me
Hi everyone,
Does anyone know how to remove this method of mac change and go back to the original?
Many thanks!

[Q] How to fix edit of platform.xml gone wrong on Note3 SM-N9005?

I did a search and have found similar threads. However, people seem to have been intelligent and back up stuff or installed recovery apps before screwing around with their phones. I did not.
I have a Samsung Note3. Kit Kat 4.4.2 installed OTA once I had it up and running. I rooted it. However, the version of Kit-kat has a famous issue in that it would not allow apps to write to the SD card. I found a site with manual instructions to edit the platform.xml to overcome this issue. The site is as below:
winaero.com/blog/unlock-external-sd-card-writing-for-all-apps-in-android-4-4-kitkat/
However, something went awry after rebooting. I could not see anything on my SD card and I was unable to edit the platform.xml. A solution seemed to be to flash the ROM (using ODIN 3.07). I did this and currently have Baseband version N9005XXUENB1 and Build Number KOT49H.N9005XXUENB7
However, the still has lots of issues. I can stick in a password on wifi and connect to the network but it does not actually communicate with the internet. The H with up and down arrows appears for 3g connectivitiy but also does not work. Bluetooth does not work. Youtube has stopped working errors are common. I am unable to install any apps as cannot use play store, etc. I have pictures and mp3s on my SD card but gallery comes up empty as does music app. The only "file explorer" I seem to have is "my files" app. It comes up as empty (although it shows Total storage available for both SD memory and device storage as using 25/32 and 22/29 respectively.
I am guessing that flashing the ROM did not remedy the corrupt platform.xml in the permissions folder. I think the folder path was etc/permission/platform.xml although am not an expert with android. I was hoping someone might be able to give me a solution to fix the issue. Preferably a completely fresh and clean wipe type solution. Although as I am a "newbie" the greater the simplicity of the solution the better.
Apologies for the length of this issue!
T
laconical said:
I did a search and have found similar threads. However, people seem to have been intelligent and back up stuff or installed recovery apps before screwing around with their phones. I did not.
I have a Samsung Note3. Kit Kat 4.4.2 installed OTA once I had it up and running. I rooted it. However, the version of Kit-kat has a famous issue in that it would not allow apps to write to the SD card. I found a site with manual instructions to edit the platform.xml to overcome this issue. The site is as below:
winaero.com/blog/unlock-external-sd-card-writing-for-all-apps-in-android-4-4-kitkat/
However, something went awry after rebooting. I could not see anything on my SD card and I was unable to edit the platform.xml. A solution seemed to be to flash the ROM (using ODIN 3.07). I did this and currently have Baseband version N9005XXUENB1 and Build Number KOT49H.N9005XXUENB7
However, the still has lots of issues. I can stick in a password on wifi and connect to the network but it does not actually communicate with the internet. The H with up and down arrows appears for 3g connectivitiy but also does not work. Bluetooth does not work. Youtube has stopped working errors are common. I am unable to install any apps as cannot use play store, etc. I have pictures and mp3s on my SD card but gallery comes up empty as does music app. The only "file explorer" I seem to have is "my files" app. It comes up as empty (although it shows Total storage available for both SD memory and device storage as using 25/32 and 22/29 respectively.
I am guessing that flashing the ROM did not remedy the corrupt platform.xml in the permissions folder. I think the folder path was etc/permission/platform.xml although am not an expert with android. I was hoping someone might be able to give me a solution to fix the issue. Preferably a completely fresh and clean wipe type solution. Although as I am a "newbie" the greater the simplicity of the solution the better.
Apologies for the length of this issue!
T
Click to expand...
Click to collapse
Sounds like a bit of a pickle. Since you know that Odin is working and the firmware you have at least flashes correctly, I'd consider installing a custom recovery, backing up EFS folder (and the rom too, just in case there is some weird issue with Odin the 2nd time around) , then wipe everything - /system included. This will make your phone not be able to boot up at all because it will wipe the OS off. Then just boot directly to Download and redo the firmware flash. Something else to consider since you do have the international version, is that some of the firmwares you install might be more carrier or region specific, so there might be a better option to install. I know that there is a some slightly newer version that has NC2 in it as I was trying to fix one of these phones the other day that could not register on any network and ran across that build. Do you remember the build number of the software before you started modding?
Hello. Thanks for the reply.
I am going to ask what are probably very obvious questions but I am a little out of my depth.
1) What does installing a custom recovery involve?
2)How would I backup the EFS directory? When I had ES file explorer I would have been able to try and find it. However, as it is I do not know how to find the directory and back it up. I have connected the phone to a windows laptop and it shows up as note3 but there are no folders or files visible in either the phone or on the card.
3) What is the procedure to "wipe everything"?
I think the final part I know how to do with ODIN. Just go to download boot and load and run odin with the ROM.
I got the BTU ROM is that not for the UK? I tried looking up what NC2 was but did not really find anything the explained what it is.
Thanks again and sorry for the ignorance on my side.
Let's put the custom recovery and all that on the back burner for now.
Was your phone unlocked from the factory or did you get it from a carrier? If from a carrier, which, and is it unlocked now or you are still using it with the original carrier? This one is for Vodaphone http://www.sammobile.com/firmwares/3/?download=27401 but if you are unlocked, it should work anyway, I believe.
Thanks to the people for their replies. I managed to solve the issue as below.
As mentioned previously I had flashed using ODIN and BTU version of N9005XXUENB7. The only other thing that was then required was to enter the recovery (I think power + volume up + home and then release power once samsung name appears). I then selected wipe data/factory. A reboot later and everything was solved.
es0tericcha0s said:
Sounds like a bit of a pickle. Since you know that Odin is working and the firmware you have at least flashes correctly, I'd consider installing a custom recovery, backing up EFS folder (and the rom too, just in case there is some weird issue with Odin the 2nd time around) , then wipe everything - /system included. This will make your phone not be able to boot up at all because it will wipe the OS off. Then just boot directly to Download and redo the firmware flash. Something else to consider since you do have the international version, is that some of the firmwares you install might be more carrier or region specific, so there might be a better option to install. I know that there is a some slightly newer version that has NC2 in it as I was trying to fix one of these phones the other day that could not register on any network and ran across that build. Do you remember the build number of the software before you started modding?
Click to expand...
Click to collapse
Hi, The other day i tried to fix the Platform.xml. on my S5. i noticed sometime after that when i move files using the "My files" app, the phone would not refresh the files so that they would show up in gallery, videos etc.. I tried to undo the Media_rw by using SD Maid to find the Platform.xml and Axel to rewrite the Xml. In the platform.xml. i deleted the Media_rw and replaced the old xml with the old (original) one. I rebooted my phone. On swiping to open the screen i noticed alot of apps crashing one after the other. I when back to SD Maid and searched for Platform.xml and opened it with Axel but it said file not found.. i can not use the internet, i cant use most apps, i cant even use the Kies on my computer. I cant save anything to the storage either. I really need help. Odin is the only thing i can use. but i dont know how i can reset the xml files on my phone.. What exactly am i do to?
please
christaph3r said:
Hi, The other day i tried to fix the Platform.xml. on my S5. i noticed sometime after that when i move files using the "My files" app, the phone would not refresh the files so that they would show up in gallery, videos etc.. I tried to undo the Media_rw by using SD Maid to find the Platform.xml and Axel to rewrite the Xml. In the platform.xml. i deleted the Media_rw and replaced the old xml with the old (original) one. I rebooted my phone. On swiping to open the screen i noticed alot of apps crashing one after the other. I when back to SD Maid and searched for Platform.xml and opened it with Axel but it said file not found.. i can not use the internet, i cant use most apps, i cant even use the Kies on my computer. I cant save anything to the storage either. I really need help. Odin is the only thing i can use. but i dont know how i can reset the xml files on my phone.. What exactly am i do to?
please
Click to expand...
Click to collapse
Hey, I was wondering if you ever got a fix on this without factory reset. I am having the exact same issue.
Same boat here. Please someone help!
woahs said:
Hey, I was wondering if you ever got a fix on this without factory reset. I am having the exact same issue.
Click to expand...
Click to collapse
I am having exact same problem. After editing the platform.xml, my Note 3 is behaving the same way: no access to any storage area (including USB drive), no remote access/online access (even though WIFI and 4G appear to connect just fine), most apps fail with 'Unfortunately ... has stopped' error message, no Google Play...
I really don't want to do a factory reset, but really, does it even help? Is there a way to put the platform.xml back? Is there a way to access the phone via USB cable?
vbcomer said:
I am having exact same problem. After editing the platform.xml, my Note 3 is behaving the same way: no access to any storage area (including USB drive), no remote access/online access (even though WIFI and 4G appear to connect just fine), most apps fail with 'Unfortunately ... has stopped' error message, no Google Play...
I really don't want to do a factory reset, but really, does it even help? Is there a way to put the platform.xml back? Is there a way to access the phone via USB cable?
Click to expand...
Click to collapse
Update: I went ahead and successfully install the all-in-one file to the phone via Odin, but it still has the same issues. Can someone give a hint? thanks
FIX!!!
Hi I'm a god at searching(hence the Go)but an Noob(hence the obie) to Dev on Android but a computer techy(in other words I fix computers upgrade ETC.) Now if you followed EXACT instructions you SHOULD have the Backup copy of platform.xml. If not reply and I'll give those instructions.
So I did the same as this post did to get my issue as well but there's a SOLUTION I just found W/o getting rid of your loved files and its easy!
1. Download the ADB also included in The Android SDK by Google (approx. 3XX MB)
2. DOWNLOAD Root Explorer.APK
3. Extract ADB Dev kit( name should be roughly adt-bundle-windows-x86_64-20140702.zip)Note: I prefered it at C:\Android it avoided Name too long error
4. Open CMD Type: cd C:\<location ADB was extracted>\sdk\platform-tools(if you followed my note it will be "C:\Android\adt-bundle-windows-x86_64-20140702\sdk\platform-tools") and press enter... HINT TO COPY PASTE IN CMD RIGHT CLICK SAVES TIME!!!!
5. Install Root Explorer so you can backup your files(if any) I was unlucky having none on the phone but SD storage is ok!
To do this type ADB INSTALL <Location of Root explorer.exe> For standard windows users with default download locations it would be "C:\Users\<USER NAME>\Downloads\Root Explorer v3.1.9.apk" <COPY PASTE
6. Copy the original back to System>ETC>Permissions and overwrite
7. Factory reset!
Links?
sorry guys bt i have the same note 3 and i delete the platform.xml file .....i did a factory reset bt nothing happened ...can u help plz
Re:FIX!
But you have to set the permissions of platform.xml as 0777.Right?
Step 5 how should it works
Android Goobie said:
Hi I'm a god at searching(hence the Go)but an Noob(hence the obie) to Dev on Android but a computer techy(in other words I fix computers upgrade ETC.) Now if you followed EXACT instructions you SHOULD have the Backup copy of platform.xml. If not reply and I'll give those instructions.
So I did the same as this post did to get my issue as well but there's a SOLUTION I just found W/o getting rid of your loved files and its easy!
1. Download the ADB also included in The Android SDK by Google (approx. 3XX MB)
2. DOWNLOAD Root Explorer.APK
3. Extract ADB Dev kit( name should be roughly adt-bundle-windows-x86_64-20140702.zip)Note: I prefered it at C:\Android it avoided Name too long error
4. Open CMD Type: cd C:\<location ADB was extracted>\sdk\platform-tools(if you followed my note it will be "C:\Android\adt-bundle-windows-x86_64-20140702\sdk\platform-tools") and press enter... HINT TO COPY PASTE IN CMD RIGHT CLICK SAVES TIME!!!!
5. Install Root Explorer so you can backup your files(if any) I was unlucky having none on the phone but SD storage is ok!
To do this type ADB INSTALL <Location of Root explorer.exe> For standard windows users with default download locations it would be "C:\Users\<USER NAME>\Downloads\Root Explorer v3.1.9.apk" <COPY PASTE
6. Copy the original back to System>ETC>Permissions and overwrite
7. Factory reset!
Links?
Click to expand...
Click to collapse
Hi have next message in the install root step could you help me please
Android Debug Bridge version 1.0.31
-a - directs adb to listen on all interfaces for a connection
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <specific device> - directs command to the device or emulator with
the given
serial number or qualifier. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
-H - Name of adb server host (default: localhost)
-P - Port of adb server (default: 5037)
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number
is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number
is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devices.
device commands:
adb push [-p] <local> <remote>
- copy file/dir to device
('-p' to display the transfer progress)
adb pull [-p] [-a] <remote> [<local>]
- copy file/dir from device
('-p' to display the transfer progress)
('-a' means copy timestamp and mode) adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward --list - list all forward socket connections.
the format is a list of lines with the followin
g format:
<serial> " " <local> " " <remote> "\n" adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only) adb forward --no-rebind <local> <remote>
- same as 'adb forward <local> <remote>' but fails
if <local> is already forwarded
adb forward --remove <local> - remove a specific forward socket connection
adb forward --remove-all - remove all forward socket connections
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-d] [-s] [--algo <algorithm name> --key <hex-encoded ke
y> --iv <hex-encoded iv>] <file>
- push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-d' means allow version code downgrade)
('-s' means install on SD card instead of inter
nal storage)
('--algo', '--key', and '--iv' mean the file is
encrypted already)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all]
[-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>
.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any installed apk expansion
(aka .obb) files associated with each application; the default is noobb.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.) adb restore <file> - restore device contents from the <file> backup
archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb get-devpath - prints: <device-path>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1 [parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list of the following values
1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.

[SM-G850F][SLTE] CyanogenMod 12.1 UNOFFICIAL BETA8 (Android 5.1) - UPDATE: 2015-10-22

ABOUT THE GALAXY ALPHA CM-12.1 PROJECT
I'm working on getting CyanogenMod working on the Galaxy Alpha since October 2014. This ROM is not complete. There are still features which are not fully working and there are for sure things which need bugfixing. Please check the Known Bugs section before reporting issues.
I work on this project for FREE and putting in a lot of hours into it. A small donation would help to buy better tools to improve the development some day.
RECOVERY
To be able to install the ROM you need a recovery. I suggest to use my TWRP Recovery build. You can find it here.
BACKUP
Before installing the ROM you should create backups. The most important backup is to create one of the EFS partition and store it on safe place on your computer. If something goes wrong you need to restore this partition. It holds information about your device, like the MAC address for your wifi and information for the radio.
DOWNLOAD
You are storing very sensitive information on your phone. You always have to be careful what ROMs you flash and whom you trust. If you don't trust me then don't use my ROM or compile it from source by yourself.
The ROM will be gpg signed with my key 0xCC014E3D. You can verify the ROM with 'gpg --verify cm-12.1-20150901-UNOFFICIAL-slte-beta1.zip.asc '.
Detailed information and instruction for Windows can be found here.
Download BETA
FLASHING THE ROM
As this is a Lollipop (Android 5) based ROM you need to flash sboot (bootloader) and the modem image from one of the latest LL releases. Or install a LL ROM via the Samsung update option. You can find the latest stock ROM here. Suggested modem version is: G850FXXU2COI3 or newer
I suggest to put the ROM on a USB disk and use a USB OTG cable to flash the ROM. It is also possible to put it on the emulated sdcard and flash it from there.
GAPPS
I suggest to use Open GAPPS.
REPORTING BUGS
Give the programmer some credit for basic intelligence: if the program really
didn't work at all, they would probably have noticed. Since they haven't
noticed, it must be working for them. Therefore, either you are doing something
differently from them, or your environment is different from theirs. They need
information; providing this information is the purpose of a bug report. More
information is almost always better than less.
Click to expand...
Click to collapse
Before reporting bugs, please check the KNOWN BUGS list below and read THIS HOWTO
XDA:DevDB Information
[ROM][SM-G850F] CM-12.1 UNOFFICIAL ROM, ROM for the Samsung Galaxy Alpha
Contributors
modpunk, raymanfx, bonuzzz, kyasu
Source Code: https://git.cryptomilk.org/projects/android/android_device_samsung_slte.git/
ROM OS Version: 5.1.x Lollipop
ROM Kernel: Linux 3.10.x
ROM Firmware Required: TWRP/CWM Recovery
Based On: CyanogenMod
Version Information
Status: Beta
Current Beta Version: 8
Beta Release Date: 2015-10-22
Created 2015-09-01
Last Updated 2015-10-26
KNOWN ISSUES
RIL: SMS broadcast subscriptions aren't working (generic failure)
MEDIA: HEVC videos don't work
INCALL: Some SLTE devices need 10-30 seconds to wake the screen on an incoming call
VOIP: Not tested (could someone please test)
CHANGELOG
2015-10-22 + BETA8
audio: Should be completely working now
ril: Fixed network operator search
2015-10-15 - BETA7
audio: More fixes to get audio fully working
audio: Fixed voice recording (camcorder should work fine now)
audio: Fixed media playback (especially over bluetooth)
camera: Fixed remaining camera issues (using LL blobs now)
Kernel: Smaller kernel image using XZ compression now
Kernel: Updated arizona sound driver
2015-10-10 - BETA6
More fixes to the audio HAL
Improved PowerHAL (VSYNC and LOW_POWER) support
This version includes the latest Security fixes for Android, see the Android Patchlevel in Settings -> About Phone.
2015-10-07 - BETA5
Fixed audio calls (wideband)
Fixed audio calls with bluetooth headset and carkit
Fixed audio recordings
This version includes the latest Security fixes for Android, details see here.
2015-10-02 - BETA4
Fixed bluetooth call playback (mics are not working yet)
Fixed two mic control in audio HAL
Fixed firmware loading on wisol devices
New sensor HAL
Improved boot time
2015-09-17 - BETA3
Added bluetooth headset support
Added support for noise suppression
Better sound quality on wideband connections
2015-09-03 - BETA2
Fixed flashing issue with TWRP
Set addtitional build information
2015-09-01 - BETA1
Initial release
FREQUENTLY ASKED QUESTIONS
"It doesn't work."
Give the programmer some credit for basic intelligence: if the program really didn't work at all, they would probably have noticed. Since they haven't noticed, it must be working for them. Therefore, either you are doing something differently from them, or your environment is different from theirs. They need information; providing this information is the purpose of a bug report. More information is almost always better than less.
Please read How to Report Bugs Effectively
My modem doesn't work, what can I do?
Did you flash the latest MODEM firmware from the latest Lollipop release? The suggested firmware is at least G850FXXU2COI3 or newer
How do I use adb/logcat go get logs from my device
You can find a good tutorial here.
I have problem with flashing. I tried with suggested TWRP. Flashing rom takes 1 second and ends with successful information
Edit. "Unable to mount /system" twrp error
miszko77 said:
I have problem with flashing. I tried with suggested TWRP. Flashing rom takes 1 second and ends with successful information
Edit. "Unable to mount /system" twrp error
Click to expand...
Click to collapse
Which TWRP version are you using?
Awesome work man. Honestly I can't flash this right now, just because, I need a fully functioning device daily so, I'll be patient
modpunk said:
Which TWRP version are you using?
Click to expand...
Click to collapse
I am using 2870. Anyway I flashed recovery with odin. May this be a problem?
miszko77 said:
I have problem with flashing. I tried with suggested TWRP. Flashing rom takes 1 second and ends with successful information
Edit. "Unable to mount /system" twrp error
Click to expand...
Click to collapse
I have same problem
---------- Post added at 09:58 PM ---------- Previous post was at 09:57 PM ----------
miszko77 said:
I am using 2870. Anyway I flashed recovery with odin. May this be a problem?
Click to expand...
Click to collapse
I am using 2.8.7 also
lukrangelu said:
I have same problem
---------- Post added at 09:58 PM ---------- Previous post was at 09:57 PM ----------
I am using 2.8.7 also
Click to expand...
Click to collapse
Could you connect with 'adb shell' to the recovery and run 'getenforce'. Then get me the log and avc_msg file with:
adb pull /tmp/recovery.log
adb pull /proc/avc_msg
and paste the file somewhere ...
modpunk said:
Could you connect with 'adb shell' to the recovery and run 'getenforce'. Then get me the log and avc_msg file with:
adb pull /tmp/recovery.log
adb pull /proc/avc_msg
and paste the file somewhere ...
Click to expand...
Click to collapse
-a - directs adb to listen on all interfaces for a connection
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <specific device> - directs command to the device or emulator with the given
serial number or qualifier. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
-H - Name of adb server host (default: localhost)
-P - Port of adb server (default: 5037)
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devices.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward --list - list all forward socket connections.
the format is a list of lines with the following format:
<serial> " " <local> " " <remote> "\n"
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb forward --no-rebind <local> <remote>
- same as 'adb forward <local> <remote>' but fails
if <local> is already forwarded
adb forward --remove <local> - remove a specific forward socket connection
adb forward --remove-all - remove all forward socket connections
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --iv <hex-encoded iv>] <file>
- push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal storage)
('--algo', '--key', and '--iv' mean the file is encrypted already)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any installed apk expansion
(aka .obb) files associated with each application; the default
is noobb.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb get-devpath - prints: <device-path>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list of the following values
1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.
would it be this?
Blubberor said:
Thanks a lot modpunk,
initial bug after doing wipe incl. Cache, dalv.cache and using same minimal gapps that works in kyasus cm12.1
I dont have network setting up, sim card not detected and cannot manually activate it.
Again thank you for your work,
blubberor
Click to expand...
Click to collapse
Read the bug report section in the initial post, provide logcat for system/main and also radio. This is a beta version you should at least know the basics how to get information from the device ...
lukrangelu said:
would it be this?
Click to expand...
Click to collapse
Not even close. If you want to run a beta version you should learn at least the basics for using adb.
ADB/LOGCAT HOWTO
Here you are.
getenforce
Permissive
Click to expand...
Click to collapse
miszko77 said:
Here you are.
Click to expand...
Click to collapse
The recovery reports:
Code:
You have an installed system that isn't signed with this build's key, aborting...
script aborted: Can't install this package on top of incompatible data. Please try another package or run a factory reset
Can't install this package on top of incompatible data. Please try another package or run a factory reset
This is a pretty obvious message to me. You need to wipe system and data in order to install the ROM.
modpunk said:
You need to wipe system and data in order to install the ROM.
Click to expand...
Click to collapse
Result of wiping caches, data and system. See attachment.
I did factory reset and getting the same information.
miszko77 said:
Result of wiping caches, data and system. See attachment.
I did factory reset and getting the same information.
Click to expand...
Click to collapse
I've wiped my system partition and running into the same problem as you know. I'm investigating it now ...
modpunk said:
Read the bug report section in the initial post, provide logcat for system/main and also radio. This is a beta version you should at least know the basics how to get information from the device ...
Click to expand...
Click to collapse
Mfg
Blubberor said:
Mfg
Click to expand...
Click to collapse
Please pull /proc/avc_msg ...
modpunk said:
Please pull /proc/avc_msg ...
Click to expand...
Click to collapse
and here you go.
Thanks a lot. crossing fingers that the avc_msg.log helps you with fixing.
Tschö,
blubberor

Starting adb on boot process? For debugging purposes...

Hi guys, i successfully build from scratch a device and vendor tree for my rom, and compile CM13 with no problems.
The roms boots but i get a bootloop when it come into "starting apps". My idea is get adb working on boot proccess.
I was googling but i couldn't get working....
This is my init.qcom.rc: https://drive.google.com/open?id=0ByjBTzGuQ9FIQldHTGxBWjdtczQ
And init.usb.rc generated by CM13: https://drive.google.com/open?id=0ByjBTzGuQ9FIc1ZVNnVpTVExOE0
Thanks
Well guy i was digging around and testing ALOT with no luck. Still can't enable adb at boot.
I try adding this properties on default.prop:
Code:
ro.adb.secure=0
ro.secure=0
ro.debuggable=1
persist.sys.usb.config=mtp,adb
An this in build.prop:
Code:
ro.default_usb_mode=0
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
My device is a Forge TV, and it have a single usb port and no sdcard slot, so the only way to get a log is via usb...
In the stock rom, by default, starts in host mode (storage) and you have to go into config to change it into "device mode" to get usb adb working....
Probably i need to manage how the usb port starts at boot, i thought that "ro.default_usb_mode=0" was the solution...but no
Any help will be appreciated!
PS. lsusb doesn't recognize any device....only in fastboot mode
So i found out something interesting...in stock rom if i execute the command echo 0 > /proc/usb_device the device put itself in device mode and i can debug, putting that value to 1 reverts to storage.
I try to put that on init.d, or even on init.qcom.rc in the boot image with no luck....it's so frustating...
Ususally adbd should already be running this late during the boot.
Can you at least get an usb connection during boot? (check lsusb)
If you want to get at least a dmesg output during boot you could try the following:
set this in the build.prop
Code:
debug.sf.nobootanimation=1
set the following in your kernel defconfig
Code:
CONFIG_VGA_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
(not all of them are needed but I forgot which ones are and which ones are not)
add this to the kernel command line
Code:
console=tty1 loglevel=7
This should at least show some output on the phone screen itself.
To run something in the console, you could try to connect an usb keyboard or use something like a scriptable virtual keyboard.
You might need to set loglevel to 1 or 0 if you don't want it to spam your console while working on it.
ruleh said:
Ususally adbd should already be running this late during the boot.
Can you at least get an usb connection during boot? (check lsusb)
If you want to get at least a dmesg output during boot you could try the following:
set this in the build.prop
Code:
debug.sf.nobootanimation=1
set the following in your kernel defconfig
Code:
CONFIG_VGA_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
(not all of them are needed but I forgot which ones are and which ones are not)
add this to the kernel command line
Code:
console=tty1 loglevel=7
This should at least show some output on the phone screen itself.
To run something in the console, you could try to connect an usb keyboard or use something like a scriptable virtual keyboard.
You might need to set loglevel to 1 or 0 if you don't want it to spam your console while working on it.
Click to expand...
Click to collapse
Hi, thanks alot for your answer! My device is a Razer Forge TV wich is an Android TV device. It's equiped with a single full usb 3.0 port and no sdcard slot. The port works in 2 ways, by default in host mode and device mode (the mode i need to get some debug output). In the stock rom executing "echo 0 > /proc/usb_device" enable this mode and remains on reboot. But doesn't seems to work on CM (i put the command on an init.d script). lsusb reports nothing (equal in stock rom when the port is in host mode).
I test the soluton you provided, but instead of bootanimation i get a black screen then optimizing apps, starting apps and reboot (wich is my main problem)....there's no output on screen...i'm stuck on this like 10 days or more...is so annoying...thanks again
achaw said:
Hi, thanks alot for your answer! My device is a Razer Forge TV wich is an Android TV device. It's equiped with a single full usb 3.0 port and no sdcard slot. The port works in 2 ways, by default in host mode and device mode (the mode i need to get some debug output). In the stock rom executing "echo 0 > /proc/usb_device" enable this mode and remains on reboot. But doesn't seems to work on CM (i put the command on an init.d script). lsusb reports nothing (equal in stock rom when the port is in host mode).
I test the soluton you provided, but instead of bootanimation i get a black screen then optimizing apps, starting apps and reboot (wich is my main problem)....there's no output on screen...i'm stuck on this like 10 days or more...is so annoying...thanks again
Click to expand...
Click to collapse
You could try to insert a usb stick, mount it, and then write dmesg and/or adb output to it using init.rc.
Alternatively you could try to enable adb over tcp and connect that way to it.
Alos try to chose a different tty in the kernel command line.
(btw are the following three lines present in your kernel defconfig?)
Code:
CONFIG_VT_CONSOLE=y
CONFIG_TTY=y
CONFIG_VT=y
ruleh said:
You could try to insert a usb stick, mount it, and then write dmesg and/or adb output to it using init.rc.
Alternatively you could try to enable adb over tcp and connect that way to it.
Alos try to chose a different tty in the kernel command line.
(btw are the following three lines present in your kernel defconfig?)
Code:
CONFIG_VT_CONSOLE=y
CONFIG_TTY=y
CONFIG_VT=y
Click to expand...
Click to collapse
I can't mount usb or enable adb over tcp becasuse the system reboot itself at starting apps...
Right now i'm testing with your new config, switching ttys because i'm still getting black screen instead some output...
Well after some days i remember that the Forge iss equipped with a ethernet port...i feel so stupid lol...
So i was able to debug via adb over tcp.... @ruleh thanks alot for your time!
I think "starting apps" happens when zygote is started.
If it is really the case then it should be possible to mount an usb stick and write the logs to it before everything reboots.
According to the init files I have, init.${ro.hardware}.rc would be the place to do the mount+write.
Ideally /system is mounted and /system/bin is in the path to access tools like logcat and dmesg.
Otherwise you could include them in /sbin which is (in most cases) part of the ramdisk.
It would probably be something like this:
Code:
on early-boot
#mkdir /mnt/usb
mount /dev/(usb_stick) /mnt/usb
exec /system/bin/dmesg > /mnt/usb/dmesg.log
exec /system/bin/logcat > /mnt/usb/logcat.log
(I have never used the init.rc files directly so I am not too sure.)
Also did you try "write /proc/usb_device 0" instead of "echo 0 > /proc/usb_device" in the init.rc files? (preferably before zygote starts...maybe init.usb.rc?)
Or you could try to remove the lines referencing zygote from the init.rc files and see if adbd starts then or not.
---------- Post added at 20:17 ---------- Previous post was at 20:16 ----------
achaw said:
Well after some days i remember that the Forge iss equipped with a ethernet port...i feel so stupid lol...
So i was able to debug via adb over tcp.... @ruleh thanks alot for your time!
Click to expand...
Click to collapse
I wish I read this a bit earlier...... oh well

Categories

Resources