[Q] Wifi Phase 2 authentication setting will not set - HD2 Android Q&A, Help & Troubleshooting and Genera

I have found a little bug in the WiFi settings of MIUI HD2 GINGER v9.2 where the Phase 2 authentication drop down menu does not accept its setting. In my case I am trying to set it to MSCHAPV2 and after selecting Save it does not take the setting and reverts to None.
How can I fix that bug

Didn't try yet ...but try this:
I'm not using eduRoam but our wifi is TTLS with Phase 2 PAP. Here's what worked for me
Step One
using adb shell:
# cd /data/misc/wifi
# cp wpa_supplicant.conf /sdcard
# exit
Step 2:
mount the sdcard on pc/ usb and edit the file
Here's what I added to my wpa_suppliant.conf file has (replace the *** with the correct information)
network={
ssid="***"
proto=WPA
key_mgmt=WPA-EAP IEEE8021X
group=CCMP TKIP
eap=TTLS
identity="***"
anonymous_identity="anonymous"
password="***"
ca_cert="/sdcard/***.cer"
phase2="auth=PAP"
priority=3
}
If you have a certificate ( ***.CER) you will need to have it on your sdcard - not inside a folder.
Step 3:
adb shell
# cd sdcard
# cp wpa_supplicant.conf /data/misc/wifi
# cd /data/misc/wifi
# su
# ls –l
(check other file(s) owners in my case it was – wifi.wifi but on previous ROMs it was root.root or System.wifi)
chown wifi.wifi wpa_supplicant.conf
# chmod 777 wpa_supplicant.conf (read, write execute for all) – start with 777 and relax it (I was lazy and left it there)
# reboot

Related

Blutooth & Co - questions to the kernel guy's

I have some questions about some settings within the kernel of the HD2 device. Because the fact that I'm a Windows user I hope someone can explain this to me.
Let's take a look into the initrd.gz and take a look at the init.rc:
Code:
chmod 666 /dev/uinput
chmod 666 /etc/bluez/audio.conf
chmod 666 /etc/bluez/hcid.conf
chmod 666 /etc/bluez/input.conf
EVERY (!) Device is working with this settings. Wether within the ROM nor somewhere else is a link to this files. Here is also a file named "hcid.conf" which was the old name because now its named main.conf. The hcid.conf is responsible for i.e. the bluetooth pin.
2. Go ahead within the init.rc file and you will see this:
Code:
service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
--baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd /dev/ttyHS0
user bluetooth
group bluetooth net_bt_admin
disabled
If you take again a look at /etc/firmware you will NOT see any bcm4329.hcd. This file never exists. Also the "brcm_patchram_plus" is not within the /bin direcotry. I only have found the source code for this.
Within a ripped ROM file I found this information within the init.rc:
Code:
# Make sure we startup btld before hcid
# Set target address to emulator host loopback IF
# Limit baudrate to 460800 to ensure reliable uart operation
service btld /system/bin/logwrapper /system/bin/btld -hwtun 10.0.2.2 -hb 460800 3000000 -lpm 1
#service btld /system/bin/logwrapper /system/bin/btld -lpm 1 -hb 3000000
user root
group bluetooth net_bt_admin
disabled
oneshot
Question:
Could all this be a problem which is related to the "non displaying MAC Address" of the bluetooth within the HD2?
Thanks!

Sideloading part 2...

The first method I presented showed you how to enable sideloading but to toggle it you'd need to re-edit the db file. This method enables the checkbox in System > Settings > Applications so there's no need to modify any DBs.
Code:
[[email protected] ~]$ adb shell
$ su
# busybox cp /data/data/com.motorola.android.providers.settings/databases/settings.db /data/data/com.motorola.android.providers.settings/databases/settings.db.bak
# chown system.system /data/data/com.motorola.android.providers.settings/databases/settings.db
# busybox cp /data/data/com.motorola.android.providers.settings/databases/settings.db /sdcard/settings.db
# exit
$ exit
[[email protected] ~]$ adb pull /sdcard/settings.db
sqlite3 settings.db
sqlite> SELECT * FROM settings WHERE name="force_only_market_apps";
107|force_only_market_apps|0
sqlite> UPDATE settings SET value=0 WHERE name="force_only_market_apps";
sqlite> SELECT * FROM secure WHERE name="force_only_market_apps";
107|force_only_market_apps|1
sqlite> .quit
[[email protected] ~]$ adb push settings.db /sdcard/
[[email protected]ite ~]$ adb shell
$ su
# busybox cp /sdcard/settings.db /data/data/com.motorola.android.providers.settings/databases/settings.db
# chown system.system /data/data/com.motorola.android.providers.settings/databases/settings.db
# exit
$ exit
Oh, and I am pretty sure OneClick doesn't enable this. So you Windows fanboys can hush up.

[Q] Nook ST Glowlight - ready to root?

Walked in B&N today to upgrade to a NST to root knowing that I wouldn't be tempted by the Glowlight versions out May 7th but the B&N Nook guy said, "hey we already have them and a couple of people cancelled their pre-orders, do you want one?"
I couldn't resist and brought it home.
so far I have found no one trying to root a NST-GL yet so here are my observations (but not a review) about the new 1.1.5 firmware on it and the Glowlight hardware after a couple of hours.
the basic menu now has a Glowlight item on the basic "n" press menu which brings up the brightness slider. there is also a little lightbulb always there in the top taskbar next to the wifi icon which shows on/off. I am hoping these are only additional programs and updated menu that wouldn't be affected by root.
press and hold for 2 seconds and toggle the light on/off as reviews have said. it really seems like a hardware function as it works even with the screen locked (but not asleep). I am not ready to try Nooter on it because of this special "n" function and wonder if it would work with the current version of NookColor Tools to get to the adw launcher.
also, just letting everybody know these are in stores already if someone wants to be first to root.
Just attempted to touchnooter the NST Glow. No luck. Here is what happened...
Downloaded Touchnooter-2-1-31
Used WinImage to create the microSD boot "disc"
Powered off Nook and inserted microSD card
Powered Nook on, showed Touchnooter instructions on boot (black flash, remove, reboot, etc.)
Removed microSD and rebooted
Came up to normal "Nook - Read Forever" initial boot screen
Displayed "Nook" boot screen (the one with 5 dots)
Counted through the dots a few times, sorry I didn't get the exact count
Glow light comes on and stays on
Screen will flash black and it will count 3 dots, then flash again and repeat
I let the unit stay on this "stuck loop" for several minutes (at least 10) and nothing changed.
I ended up doing the 8 failed boots restore and the unit is functional again, and "unrooted", so I didn't brick it. But it looks like there is a little work that needs to be done to root the NST Glow.
Thanks for the update David... I'm anxiously awaiting a new nooter
All those "Super Nooters" bash jars.
Jars are version dependent.
The Nook Glow is using 1.1.5 not 1.1.2
Try plain Noogie.
Noogie will most likely work just fine, I don't actually have a nook with Glow Light so I can't do any development toward rooting it, I can't imagine a lot has changed, so you can probably replace the correct jar files mentioned above with modified ones and it'd work. I'll see if I can get my hands on one of the new devices in the next few weeks.
thanks for charging forward on this...
I'm curious about this as well. I have a rooted Nook Color that, since getting a TouchPad, I only use as an eReader for stuff from B&N and Amazon. I'm considering selling it and getting a Simple Touch Glowlight for my eReader duties but would like to be able to use Kindle Reader on it as well as the Nook app. I'll be watching this thread to see if/when folks get it rooted.
NSTG 1.1.5
I also am interested in rooting the Glowlight, my wife got one for her birthday and wants to load a couple of apps on it. I'm tempted to try Noogie, but I can't risk bricking her device. Is there a reliable path for restoring a NST if rooting via Noogie fails?
Praeluceo said:
... but I can't risk bricking her device. Is there a reliable path for restoring a NST if rooting via Noogie fails?
Click to expand...
Click to collapse
If you apply Noogie and made a backup of your Nook - then you have a copy and you didn't touch or modify anything on your nook. Once having a backup, you should be fine. Read the thread related to this (backup) and WATCH out for the size of your backup image !!!
I think, that I would go or the MinimalTouch rooting method (once I place my hands on this new one )
B&N v1.1.5 uRamdisk
Renate NST said:
The Nook Glow is using 1.1.5 not 1.1.2
Try plain Noogie.
Click to expand...
Click to collapse
When I used Noogie to root my Nook Touches, the accompanying thread (which I will find in a few moments) said to just replace the default boot uRamdisk with one of two possibilities: one for USB ADB access, and one for WiFi access. That worked fine on my Nook Touches !!
Using the same uRamdisk for my Nook Glow disabled the GlowLight, but allowed the extraction of "factory.zip":
http://www.mailpen.com/download/bnFirmware/touch/factory-v1.1.5.zip (108MB)
Hopefully it can be "patched" to provide uRamdisks for USB and WiFi access (I prefer the latter).
DeanGibson said:
When I used Noogie to root my Nook Touches, the accompanying thread (which I will find in a few moments) said to just replace the default boot uRamdisk with one of two possibilities: one for USB ADB access, and one for WiFi access. That worked fine on my Nook Touches !!
However, I'm a bit reluctant to use the same uRamdisk for my Nook Glow, especially since as you note, it is a different B&N release (despite the sizes being almost identical). So, for those that know what was done, but don't have a Nook Glow, the link below provides the one I extracted from my Nook Glow (via Noogie).
http://www.mailpen.com/download/uRamdisk-1_1_5.zip
Hopefully it can be "patched" to provide uRamdisks for USB and WiFi access (I prefer the latter).
Click to expand...
Click to collapse
A copy of the factory.zip would be even more helpful.
GabrialDestruir said:
A copy of the factory.zip would be even more helpful.
Click to expand...
Click to collapse
I agree !!! The "Noogie" that I booted only gave me USB file access to the BOOT partition, and I can get you other stuff in that partition, if that helps.
Is there a bootable SD card image that would give me ADB root command-line access, so that I could mount arbitrary partitions on the device and extract factory.zip and anything else you and/or I desired?
Edit: See my response in the related thread. Now that I know that it is safe to use the modified 1.1.0 uRamdisk to at least get root access, I can extract factory.zip and post a link to it, probably (assuming nothing goes wrong, goes wrong, goes wrong, ...) in about an hour.
Here we go, uRamdisk for NTG is attached.
Should enable ADB permanently without affecting anything else.
A good swap !!!
GabrialDestruir said:
Here we go, uRamdisk for NTG is attached.
Should enable ADB permanently without affecting anything else.
Click to expand...
Click to collapse
Just what I wanted !!!
And here we go w/ factory.zip (renamed for download):
http://www.mailpen.com/download/bnFirmware/touch/factory-v1.1.5.zip (108MB)
DeanGibson said:
Just what I wanted !!!
And here we go w/ factory.zip (renamed for download):
http://www.mailpen.com/download/factory-1_1_5.zip
Click to expand...
Click to collapse
This will help people who modify .jar files for TouchNooter and MinimalNooter meaning once they get this downloaded they should be able to modify all the right files and the NTG will get fully rooted.
I spoke too soon ...
GabrialDestruir, your uRamdisk in uRamdisk.zip:
When copied to the boot partition, booted fine, and the GlowLight works.
However, I do not have root ADB access (like I did with the uRamdisk for the Touch 1.1.0 on both the Touch and the Glow).
DeanGibson said:
GabrialDestruir, your uRamdisk in uRamdisk.zip:
When copied to the boot partition, booted fine, and the GlowLight works.
However, I do not have ADB access (like I did with the uRamdisk for the Touch 1.1.0 on both the Touch and the Glow).
Did you enable ADB over USB or over WiFi? I tried to connect using both connection methods. If you provided a WiFi version, I can ping it, but "adb connect ..." doesn't connect. Note that the uRamdisk (for WiFI) for the original Touch allows connections just fine (but alas, no GlowLight).
Click to expand...
Click to collapse
It should be USB enabled from the changes I made.
New version with default.prop modified uploaded below.
Also posted the changed files.
Modified init.rc in this version:
Code:
on init
loglevel 3
# setup the global environment
export PATH /sbin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard
export INTERNAL_STORAGE /media
export BN_PURCHASED_CONTENT /data/media
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
export DSP_PATH /system/lib/dsp
export DEFAULT_BASEIMAGE /system/lib/dsp/baseimage.dof
export QOSDYN_FILE /system/lib/dsp/qosdyn_3430.dll64P
export PM_TBLFILE /system/etc/policytable.tbl
# setup TSLIB environment
export TSLIB_CONSOLEDEVICE none
export TSLIB_FBDEVICE /dev/graphics/fb0
export TSLIB_TSDEVICE /dev/input/event2
export TSLIB_CALIBFILE /etc/pointercal
export TSLIB_CONFFILE /etc/ts.conf
export TSLIB_PLUGINDIR /system/lib/ts/plugins
# Location of BT firmware files
export BT_FW_PATH /system/lib/firmware
# Backward compatibility
symlink /system/etc /etc
# create mountpoints and mount tmpfs on sqlite_stmt_journals
mkdir /system
mkdir /tmp 0777
mkdir /data 0771 system system
mkdir /cache 0770 system cache
mkdir /media 0777 system system
mkdir /sdcard 0777 system system
mkdir /sqlite_stmt_journals 01777 root root
mkdir /rom 0770 root root
mount tmpfs tmpfs /sqlite_stmt_journals size=4m
mount rootfs rootfs / ro remount
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
# mount MMC partitions
mount vfat /dev/block/mmcblk0p2 /rom sync noatime nodiratime uid=1000,gid=1000,fmask=117,dmask=007
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount ext2 /dev/block/mmcblk0p5 /system
mount ext2 /dev/block/mmcblk0p5 /system ro remount
# We chown/chmod /data again so because mount is run as root + defaults
mount ext3 /dev/block/mmcblk0p8 /data nosuid nodev noatime nodiratime
chown system system /data
chmod 0771 /data
# Same reason as /data above
mount ext3 /dev/block/mmcblk0p7 /cache nosuid nodev noatime nodiratime
chown system cache /cache
chmod 0770 /cache
# This may have been created by the recovery system with odd permissions
chown system system /cache/recovery
chmod 0770 /cache/recovery
# create basic filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/hcid 0770 bluetooth bluetooth
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/wifi 0771 wifi wifi
mkdir /data/misc/wifi/sockets 0771 wifi wifi
mkdir /data/misc/dhcp 0777 wifi wifi
mkdir /data/misc/udhcpd 0777 wifi wifi
mkdir /data/local 0771 shell shell
mkdir /data/local/tmp 0771 shell shell
mkdir /data/data 0771 system system
mkdir /data/app-private 0771 system system
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
# BN PurchasedContent
mkdir /data/media 0777 media system
mkdir /data/media/B\&N\ Downloads 0777 media system
mkdir /data/media/B\&N\ Downloads/Books 0777 media system
mkdir /data/media/B\&N\ Downloads/Magazines 0777 media system
mkdir /data/media/B\&N\ Downloads/Newspapers 0777 media system
mkdir /data/media/B\&N\ Downloads/Extras 0777 media system
# make sure folder has correct owner and access if the folder exists
chown media system /data/media
chown media system /data/media/B\&N\ Downloads
chown media system /data/media/B\&N\ Downloads/Books
chown media system /data/media/B\&N\ Downloads/Magazines
chown media system /data/media/B\&N\ Downloads/Newspapers
chown media system /data/media/B\&N\ Downloads/Extras
chmod 0777 /data/media
chmod 0777 /data/media/B\&N\ Downloads
chmod 0777 /data/media/B\&N\ Downloads/Books
chmod 0777 /data/media/B\&N\ Downloads/Magazines
chmod 0777 /data/media/B\&N\ Downloads/Newspapers
chmod 0777 /data/media/B\&N\ Downloads/Extras
# create dalvik-cache and double-check the perms
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
# create the lost+found directories, so as to enforce our permissions
# mkdir /data/lost+found 0770
# mkdir /cache/lost+found 0770
# change permissions for alsa nodes
symlink /dev/snd/pcmC0D0c /dev/pcmC0D0c
symlink /dev/snd/pcmC0D0p /dev/pcmC0D0p
symlink /dev/snd/controlC0 /dev/controlC0
symlink /dev/snd/timer /dev/timer
chmod 0777 /dev/pcmC0D0c
chmod 0777 /dev/pcmC0D0p
chmod 0777 /dev/controlC0
chmod 0777 /dev/timer
# change permissions for modem
chmod 0660 /dev/ttyS0
chown radio radio /dev/ttyS0
# change permissions for bridge. Symlink search directory
chmod 0777 /dev/DspBridge
# change permissions for Camera
chmod 0777 /dev/video5
chmod 0777 /dev/video0
# change permissions for Overlay
chmod 0777 /dev/video1
chmod 0777 /dev/video2
# change permissions for overlay managers and display devices
chmod 0777 /sys/devices/platform/omapdss/manager0/name
chmod 0777 /sys/devices/platform/omapdss/manager1/name
chmod 0777 /sys/devices/platform/omapdss/display0/name
chmod 0777 /sys/devices/platform/omapdss/display1/name
chmod 0777 /sys/devices/platform/omapdss/display0/enabled
chmod 0777 /sys/devices/platform/omapdss/display1/enabled
chmod 0777 /sys/devices/platform/omapdss/display1/timings
chmod 0777 /sys/devices/platform/omapdss/display0/timings
chmod 0777 /sys/devices/platform/omapdss/overlay0/manager
chmod 0777 /sys/devices/platform/omapdss/overlay1/manager
chmod 0777 /sys/devices/platform/omapdss/overlay2/manager
chmod 0777 /sys/devices/platform/omapdss/overlay0/enabled
chmod 0777 /sys/devices/platform/omapdss/overlay1/enabled
chmod 0777 /sys/devices/platform/omapdss/overlay2/enabled
# change permissions for calibration
chmod 0666 /sys/devices/platform/i2c_omap.2/i2c-adapter/i2c-2/2-0050/forcecal
# change permissions for display jni ioct
chmod 0666 /dev/graphics/fb0
# change permissions for Previewer and Resizer
chmod 0777 /dev/omap-previewer
chmod 0777 /dev/omap-resizer
# double check the perms, in case lost+found already exists, and set owner
chown root root /lost+found
chmod 0770 /lost+found
# chown root root /data/lost+found
# chmod 0770 /data/lost+found
# chown root root /cache/lost+found
# chmod 0770 /cache/lost+found
#Owners, Modes for Bluetooth
chmod 0660 /dev/ttyS1
chown bluetooth bluetooth /dev/ttyS1
chmod 0660 sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
write sys/class/rfkill/rfkill0/state 0
# Needed when building with DDK
chown system system /data/data
chown system system /data/system
chown system system /data/app
chown system system /data
on boot
# basic network init
ifup lo
hostname localhost
domainname localdomain
# set RLIMIT_NICE to allow priorities from 19 to -20
setrlimit 13 40 40
# Set timeout value for rmnet stats.
write /sys/devices/virtual/net/rmnet0/timeout_suspend 5000000
# Define the oom_adj values for the classes of processes that can be
# killed by the kernel. These are used in ActivityManagerService.
# setprop service.adb.tcp.port 5555
setprop ro.FOREGROUND_APP_ADJ 0
setprop ro.VISIBLE_APP_ADJ 1
setprop ro.SECONDARY_SERVER_ADJ 2
setprop ro.BACKUP_APP_ADJ 2
setprop ro.HOME_APP_ADJ 4
setprop ro.HIDDEN_APP_MIN_ADJ 7
setprop ro.CONTENT_PROVIDER_ADJ 14
setprop ro.EMPTY_APP_ADJ 15
# Define the memory thresholds at which the above process classes will
# be killed. These numbers are in pages (4k).
setprop ro.FOREGROUND_APP_MEM 1536
setprop ro.VISIBLE_APP_MEM 2048
setprop ro.SECONDARY_SERVER_MEM 4096
setprop ro.BACKUP_APP_MEM 4096
setprop ro.HOME_APP_MEM 4096
setprop ro.HIDDEN_APP_MEM 5120
setprop ro.CONTENT_PROVIDER_MEM 5632
setprop ro.EMPTY_APP_MEM 6144
# Enable auto-mounting of USB mass storage
setprop persist.service.mount.umsauto 1
# Write value must be consistent with the above properties.
# Note that the driver only supports 6 slots, so we have HOME_APP at the
# same memory level as services.
write /sys/module/lowmemorykiller/parameters/adj 0,1,2,7,14,15
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/min_free_order_shift 4
write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,5632,6144
# Set init its forked children's oom_adj.
write /proc/1/oom_adj -16
# Copying hostapd.conf (WLAN soft AP)
copy /system/etc/wifi/softap/hostapd.conf /data/misc/wifi/hostapd.conf
chown wifi wifi /data/misc/wifi
# Enabling Power Management features
# Enabling sleep in idle path
write /sys/power/sleep_while_idle 1
# Enabling OFF mode
write /sys/power/enable_off_mode 1
# Enabling Voltage OFF in idle path
write /sys/power/voltage_off_while_idle 1
# Enablig DVFS with conservative governor
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor conservative
# Enabling SmartReflex for Zoom3 OMAP3630
write /sys/power/sr_vdd1_autocomp 0
write /sys/power/sr_vdd2_autocomp 0
# Permissions for System Server and daemons.
chmod 0444 /system/usr/keychars/omap_twl4030keypad.kcm.bin
chmod 0444 /system/usr/keychars/TWL4030_Keypad.kcm.bin
chmod 0444 /system/usr/keychars/gpio-keys.kcm.bin
chmod 0444 /system/usr/keychars/qwerty.kcm.bin
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
chown radio system /sys/power/state
chown radio system /sys/power/wake_lock
chown radio system /sys/power/wake_unlock
chmod 0660 /sys/power/state
chmod 0660 /sys/power/wake_lock
chmod 0660 /sys/power/wake_unlock
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/dim_brightness
chown system system /sys/class/leds/lcd-backlight2/dim_brightness
chown system system /sys/devices/platform/i2c_omap.2/i2c-adapter/i2c-2/2-0040/dim_start
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/module/sco/parameters/disable_esco
chown system system /sys/kernel/ipv4/tcp_wmem_min
chown system system /sys/kernel/ipv4/tcp_wmem_def
chown system system /sys/kernel/ipv4/tcp_wmem_max
chown system system /sys/kernel/ipv4/tcp_rmem_min
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
# Set default dim speed to 500ms
write /sys/devices/platform/i2c_omap.2/i2c-adapter/i2c-2/2-0040/dim_time 500
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.wifi 4095,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
# Define modem related settings
setprop ro.radio.use-ppp yes
setprop keyguard.no_require_sim 1
setprop ro.config.nocheckin yes
# Set EPD Flushing Update percentage for AUTO Mode.
write /sys/class/graphics/fb0/epd_percent 85
# Set EPD Flush elimination window (ms) for AUTO Mode.
write /sys/class/graphics/fb0/epd_delay 100
class_start default
start omap-edpd
# start console
## Daemon processes to be run by init.
##
service console /system/bin/sh
console
# load DSP firmware
service baseimage /system/bin/cexec.out /system/lib/dsp/baseimage.dof
user root
group audio
oneshot
# Responsable of DSP recovery
service bridged /system/bin/bridged
user root
group system
oneshot
service omx_pm /system/bin/OMXPolicyManager
oneshot
service omx_rm /system/bin/OMXResourceManager
oneshot
# adbd is permanent
service adbd /sbin/adbd
service bootanim /system/bin/bootanimation
user graphics
group graphics
disabled
oneshot
#service mux /system/bin/gsm0710muxd -s /dev/ttyS1 -n 3 -m basic
#service mux /system/bin/gsm0710muxd -v -s /dev/ttyS0 -b 460800 -n 3 -m advanced
# user radio
# group radio cache inet misc
# oneshot
service servicemanager /system/bin/servicemanager
user system
critical
onrestart restart zygote
onrestart restart media
service vold /system/bin/vold
socket vold stream 0660 root mount
#service mountd /system/bin/mountd
# socket mountd stream 0660 root mount
service debuggerd /system/bin/debuggerd
# Start of SGX driver
service pvrsrv /system/bin/sh /system/bin/sgx/rc.pvr start
user root
oneshot
#service ril-daemon /system/bin/rild -l /system/lib/libidcc6071-ril.so -- -d /dev/pts/0
#service ril-daemon /system/bin/rild -l /system/lib/libenforaedg308-ril.so -- -d /dev/pts/0
# socket rild stream 660 root radio
# socket rild-debug stream 660 radio system
# user root
# group radio cache inet misc
#service pppd_gprs /etc/init.gprs-pppd /dev/pts/1
# user root
# group radio cache inet misc
# disabled
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
socket zygote stream 666
onrestart write /sys/android_power/request_state wake
service media /system/bin/mediaserver
user media
group system audio camera graphics inet net_bt net_bt_admin
#service fw3a /system/bin/fw3a_core
# user root
# group root
#service bootsound /system/bin/playmp3
# user media
# group audio
# oneshot
service dbus /system/bin/dbus-daemon --system --nofork
socket dbus stream 660 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
#service bluetoothd /system/bin/bluetoothd -d -n
# socket bluetooth stream 660 bluetooth bluetooth
# socket dbus_bluetooth stream 660 bluetooth bluetooth
# # init.rc does not yet support applying capabilities, so run as root and
# # let hcid drop uid to bluetooth with the right linux capabilities
# group bluetooth net_bt_admin misc
# disabled
# oneshot
#service uim /system/xbin/uim /dev/ttyS1 3000000 1 /sys/uim/pid 19
# user root
# group media bluetooth
# oneshot
#service hciattach /system/bin/hciattach -l
# user root
## changing user to root from bluetooth is a potential security issue
## service hciattach_legacy is used instead of hciattach because, we dont
## have nodes named ttyHS0
# group bluetooth net_bt_admin misc
# disabled
# oneshot
#service hciattach_legacy /system/bin/hciattach -n /dev/ttyS1 texas 3000000
# user root
## changing user to root from bluetooth is a potential security issue
# group bluetooth net_bt_admin misc
# disabled
# oneshot
#service hfag /system/bin/sdptool add --channel=10 HFAG
# user bluetooth
# group bluetooth net_bt_admin
# disabled
# oneshot
#service hsag /system/bin/sdptool add --channel=11 HSAG
# user bluetooth
# group bluetooth net_bt_admin
# disabled
# oneshot
#service opush /system/bin/sdptool add --channel=12 OPUSH
# user bluetooth
# group bluetooth net_bt_admin
# disabled
# oneshot
#service pbap /system/bin/sdptool add --channel=19 PBAP
# user bluetooth
# group bluetooth net_bt_admin
# disabled
# oneshot
service installd /system/bin/installd
socket installd stream 600 system system
service flash_recovery /system/bin/flash_image recovery /system/recovery.img
oneshot
service wlan_loader /system/bin/tiwlan_loader \
-f /system/etc/wifi/firmware.bin \
-i /system/etc/wifi/tiwlan.ini \
-e /rom/devconf/WiFiBackupCalibration
disabled
oneshot
service ifcfg_ti /system/bin/ifconfig tiwlan0 up
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant -Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd
socket wpa_tiwlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd /system/bin/dhcpcd -ABKL -d tiwlan0
disabled
oneshot
# TI WLAN Soft AP related services and configuration
service wlan_ap_loader /system/bin/tiap_loader \
-f /system/etc/wifi/softap/firmware_ap.bin \
-i /system/etc/wifi/softap/tiwlan_ap.ini
disabled
oneshot
service udhcpd /system/bin/udhcpd /system/etc/udhcpd/udhcpdWlan.conf
disabled
oneshot
service hostapd /system/bin/hostapd -dd /data/misc/wifi/hostapd.conf
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
user keystore
group keystore
socket keystore stream 666
# TODO: load waveform file from ROM token /rom/devconf/EpdWaveform instead
service omap-edpd /system/bin/omap-edpd.elf -n --timeout=2 -pV220 --fbdev=/dev/graphics/fb0 -s /system/lib/dsp/subframeip_snode_dsp.dll64P -w /rom/devconf/EpdWaveform,/system/etc/default_waveform.bin
oneshot
disabled
on property:dev.bootcomplete=1
start bootcnt
service bootcnt /system/bin/clrbootcount.sh
disabled
oneshot
service debuglog /system/bin/debuglog.sh
user root
Modified default.prop in this version:
Code:
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=1
Works with root access now
GabrialDestruir said:
It should be USB enabled from the changes I made.
New version with default.prop modified uploaded below.
Click to expand...
Click to collapse
GlowLight works, but still unable to access via USB as does root ADB access. However, I really need a WiFi version.
Edit: I forgot the "Delete the standard 'USB Composite Device', then update the driver for the displayed 'Nook Simple Touch' to be 'Android Composite ADB Interface." Now works as per above edit.
Many, many thanks to Gabrial for his hard and continuing work!
I copied in his second uRamdisk and am now rooted w/ADB support over wifi.
Copy in adb wireless to your /data/apps folder, and a launcher (both while booted from noogie, with a linux host mounting up the filesystems.) Set up /system properly for su, again just copying in from your stock ST. Enable ADB over wireless using that tool - persistent would be cool, but being able to turn it on at all is great.
I have an alternate launcher, adb over wifi, su installed.
Repartiitioning is done, symlinks are done. I didn't get the partitions exactly how I wanted them, but I have 880
mb of internal storage for myself, the unit is registered and is downloading to /media so I can fish the files I want
back out.
Win, except that the illumination is pretty uneven on my unit.
Does that improve over time?
I haven't tried getting the G market running, but I did just set up the Amazon market and it is running with no trouble at all.
I see with interest that the glowworm has a browser built into it still, exposed once you install a launcher and Button Savior.
Thanks roustabout. I might give that a try tonight.
I tried using the adb usb uRamdisk, but can never seem to get it working on my Linux box.
I am sure as others update their rooting packages a permanent adb wifi uRamdisk will emerge. It only a matter of time.

Android 4.2.2 (PAC, CM10.1, etc): Mount CIFS share on /sdcard (incl. nls_utf8)

With Android 4.2's multi-user stuff and the dreaded "0" folder, Google broke mounting of CIFS shares for good. (They basically implemented something utterly useless for my needs, and broke something I need on a daily basis.) Cyanogenmod fixed that for mounts outside the /storage hierarchy, but many apps can't go there. And with 4.2.2, Google made using adb on the device very annoying as well, which adds to problems for a workaround for mounting shares in a useful place.
So I looked around for various fixes for that issue and compiled those into one method that works perfectly well for me on a P6810 running the current PAC ROM 20130629. It should probably work for any other CM10.1 or PA3.6x-based ROM as well. A nls_utf8.ko module compiled for the Nexus 10 is included as well, which can be loaded via punchmod (at least in PAC), so you can access shares with Ümläüts in them.
Prerequisites: SManager, SMWidgets, and a working Busybox install (I use Stericson's Busybox Installer).
1.) Extract nls_utf8.ko and punchmod from the attached .zip file and put them in /system/lib/modules. You can put them in some other place as well, but my scripts need to be adjusted then. Next, give the files sufficient permissions:
Code:
chmod 644 /system/lib/modules/nls_utf8.ko
chmod 755 /system/lib/modules/punchmod
2.) Optional: if you want the module to auto-start, create a file called 00punch-nls_utf8 (or whatever you like) with the content below, put it in /etc/init.d and chmod it to 755. To check if nls-utf8 is loaded after a reboot, type lsmod in a terminal window or adb shell - it should display the module name. If punchmod auto-detection fails, read here how to get the right vermagic string for your device: http://forum.xda-developers.com/showthread.php?p=41920265#post41920265
Code:
#!/system/bin/sh
sleep 10
/system/lib/modules/punchmod /system/lib/modules/nls_utf8.ko ""
3.) Here's the script that mounts a CIFS share. Edit the settings on top and either put your correct vermagic string as well, or delete the "$VERMAGIC" part in line 22 and try your luck with auto-detection. I put some sanity checks in the script, but it might not work for all directories in /sdcard (or, /data/media/0, to call it by its 'real' name/location). If you don't want to use the nls-utf8 module, just delete lines 18-23, and iocharset=utf8 in line 67.
Name the script mount-music.sh or something, put the script wherever you like, open SManager and navigate to the script. Run the script with SU permissions. If everything goes well, it will ask you to accept an adb RSA key, and then adb mounts the share. You can also add a desktop widget for quick access to the script with SMWidgets.
Code:
#!/system/bin/sh
# Your settings here
IP="192.168.1.123"
SHARE="Music"
USER="yourusername"
PASS="yourpassword"
MOUNTPOINT="/data/media/0/cifs"
VERMAGIC="3.0.31-CM-ga034655-dirty SMP preempt mod_unload ARMv7 p2v8 "
# Load cifs (if it isn't already loaded)
if [ `lsmod | grep -o cifs` ] ; then
:
else
insmod /system/lib/modules/cifs.ko
fi
# Load nls_utf8 brute-force style (if it isn't already loaded)
if [ `lsmod | grep -o nls_utf8` ] ; then
:
else
/system/lib/modules/punchmod /system/lib/modules/nls_utf8.ko "" "$VERMAGIC"
fi
# Check if cifs $MOUNTPOINT dir exists, create it if not, give sufficient permissions
if [ -d $MOUNTPOINT ] ; then
:
else
mkdir $MOUNTPOINT
fi
chmod 755 $MOUNTPOINT
# Check if $SHARE directory is empty - if not, unmount the share
if [ "$(su root -c busybox ls -A $MOUNTPOINT/$SHARE 2> /dev/null)" == "" ] ; then
:
else
/system/xbin/busybox umount -l $MOUNTPOINT/$SHARE
fi
# Create $SHARE directory if necessary, give sufficient permissions
if [ -d $MOUNTPOINT/$SHARE ] ; then
:
else
mkdir $MOUNTPOINT/$SHARE
fi
chmod 755 $MOUNTPOINT/$SHARE
# Starting adb
adb kill-server
export HOME=/sdcard
# PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port 5555
adb start-server
cat /sdcard/.android/adbkey.pub >> /data/misc/adb/adb_keys
stop adbd
start adbd
adb connect localhost
# Make sure we only use the first device (sometimes there is more than one)
SERIAL=`adb devices | head -n2 | tail -n1 | cut -f1`
if [ "$SERIAL" = "" ] ; then
echo "ERROR: Could not find ADB device.";
fi
# Mounting share via adb
echo Mounting share via adb...
adb -s $SERIAL shell su root -c /system/xbin/busybox mount -t cifs //$IP/$SHARE $MOUNTPOINT/$SHARE -o user=$USER,pass=$PASS,iocharset=utf8,cache=none,directio,CIFSMaxBufSize=130048,rw,file_mode=0777,dir_mode=0777,uid=1015,gid=1015
# If you started adb, then stop it here for security
adb disconnect localhost
stop adbd
PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port $PORT
start adbd
# Show some results
RESULT=`mount | grep $MOUNTPOINT/$SHARE`
if [ "$RESULT" = "" ] ; then
echo "FAILED! //$IP/$SHARE could not be mounted."
else
echo "SUCCESS! //$IP/$SHARE has been mounted on $MOUNTPOINT/$SHARE."
fi
echo
echo All done. You may close this script window now.
4.) This is the script to unmount the share. Name it unmount-music.sh or similar, and edit your settings at the beginning of the script. Again, run it in SManager with SU permissions, and add a desktop widget with SMWidgets if you like.
Code:
#!/system/bin/sh
# Your settings here
SHARE="Music"
MOUNTPOINT="/data/media/0/cifs"
# Check if $SHARE directory exists
if [ -d $MOUNTPOINT/$SHARE ] ; then
# Check if $SHARE directory is empty - if not, unmount the share
if [ "$(su root -c busybox ls -A $MOUNTPOINT/$SHARE 2> /dev/null)" == "" ] ; then
echo "$MOUNTPOINT/$SHARE is empty."
else
su root -c busybox umount -l $MOUNTPOINT/$SHARE
fi
fi
# Show some results
RESULT=`mount | grep $MOUNTPOINT/$SHARE`
if [ "$RESULT" = "" ] ; then
echo "SUCCESS! $MOUNTPOINT/$SHARE has been unmounted."
else
echo "FAILED! $MOUNTPOINT/$SHARE could not be unmounted."
fi
echo
echo All done. You may close this script window now.
Hope this helps some of you. It sure stumped me how incredibly convoluted this simple and much needed procedure has become on Android 4.2.2... just because of that multi-account stuff and new restrictions on adb.
Credits:
Script bits and nls_utf8.ko by H3g3m0n
More script bits by dafunk60 and jmtw000
Punchmod by Jann Horn
Punchmod info by idcrisis
Thanks man, looks awesome, I am going to try it on my 6800.
Do you know how to mount ext4 or ntfs sdcard on CM10.1 based roms?
Removed the original post, still trying to make it work!
I checked vermagic in some existing ko files and found that it is exactly the same as yours.
Sent from my GT-p6800 using Tapatalk HD
m0bster said:
Removed the original post, still trying to make it work!
I checked vermagic in some existing ko files and found that it is exactly the same as yours.
Sent from my GT-p6800 using Tapatalk HD
Click to expand...
Click to collapse
You can try loading the UTF8 module without vermagic string as well, it should work on PAC. Or, make sure you have a blank space at the end of the vermagic string, it is required. Maybe read the short tutorial here: http://forum.xda-developers.com/showthread.php?p=41920265#post41920265
dfkt_ said:
You can try loading the UTF8 module without vermagic string as well, it should work on PAC. Or, make sure you have a blank space at the end of the vermagic string, it is required. Maybe read the short tutorial here: http://forum.xda-developers.com/showthread.php?p=41920265#post41920265
Click to expand...
Click to collapse
I finally managed to mount cifs shares, after loading original cifs and punmode load of nls_utf8.ko.
But I mounted it with cifsmanager. The script always shows "failure to mount" !

[PORT] DHCPv6 Client for Android

Hi everyone,
This thread is obsolete because I found a solution check out my app here: http://forum.xda-developers.com/android/apps-games/app-dhcpv6-client-t3176443
This is port of Roy Marples dhcpcd client for Android.
Background:
The fact that Android doesn't support DHCPv6 is for many system administrators an eyesore.
The guys from google don't plan to implement this feature very soon or not at all. See https code.google.com/p/android/issues/detail?id=32621
Because of this I decided to cross compile the dhcpcd client from Roy Marples for android.
source: http roy.marples.name/projects/dhcpcd/home
This client was tested on my Nexus 5 with:
Chroma ROM (build from 05-06-2015 with Android 5.1.1)
3.4.107 UBER-L Kernel
Working
Execution of dhcpcd
Optaining AND setting IPv4 address
Optaining IPv6 address (but not assigning the address to an interface)
NOT Working
Assigning IPv6 address to an interface
running as dhcp user (will give you permission denied on the interfaces)
as replacement for the stock client (see below)
Installation
Connect your phone to your PC
Open an adb shell (adb shell)
ON PHONE:
Make a folder for the dhcp client
cd /sdcard && mkdir dhcpcd
ON COMPUTER:
Copy files to phone
adb push roy-marples-dhcpcd-android.tar.gz /sdcard/dhcpcd
ON PHONE:
cd /sdcard/dhcpcd
extract roy-marples-dhcpcd-android.tar.gz
tar -xf roy-marples-dhcpcd-android.tar.gz
aquire root
su
remount /system rw
mount -o remount,rw /system
copy dhcpcd client
cp out/system/bin/dhcpcd /system/bin/dhcpcd6
DO NOT OVERWRITE THE STOCK DHCP CLIENT!!!!!
Copy all other files and create folders
mkdir /data/misc/dhcp6 && mkdir /system/etc/dhcpcd6
cp out/system/etc/dhcpcd6/* /system/etc/dhcpcd6/.
copy required libs
cp libs/* /system/lib
setting permissions
chmod 755 /system/bin/dhcpcd6
chown root:shell /system/bin/dhcpcd6
chmod 644 /system/lib/ld-linux-armhf.so.3
chmod 644 /system/lib/libc.so.6
chmod 755 /system/etc/dhcpcd6
chmod 550 /system/etc/dhcpcd6/dhcpcd-run-hooks
chmod 644 /system/etc/dhcpcd6/dhcpcd.conf
chmod 770 /data/misc/dhcp6
chown dhcp:dhcp /data/misc/dhcp6
Behavior
dhcpcd - stock dhcp client
dhcpcd6 - my cross compiled dhcp client
This client will not work without the stock dhcpcd client for some reason.
When killing dhcpcd and connecting to a w-lan network dhcpcd will be started, you can then call dhcpcd6 and you will get a secondary IPv4 address, however you can get but not set an IPv6 address, see Issues to fix.
If you replace dhcpcd with dhcpcd6, android will not invoke a dhcpcd process, when connecting to a network, also manually over command line by calling dhpcd will not get an IP address.
If dhcpcd6 is invoked by the dhcp user (su dhcp -c "/system/bin/dhcpcd6") will give a permission denied at the interfaces for some reason.
Issues to Fix
You can obtain an IPv6 address but you can not assign it to an interface for some reason:
Code:
wlan0: soliciting a DHCPv6 lease
wlan0: ADV xxxx:67c:xxxx:52cc:xxxx::1419/128 from xxxx:67c:xxxx:52cc:xxxx::1
wlan0: REPLY6 received from xxxx:67c:xxxx:52cc:xxxx::1
wlan0: adding address xxxx:67c:xxxx:52cc:xxxx::1419/128
if_addaddress6: Invalid argument
I went through the source code and found out that the problem might come from the sendmsg function which basically sends data through a socket: if-linux.c line 865
Any advice would be appreciated
Troubleshooting
If you get something like this:
Code:
wlan0: Router Advertisement from 1234::1234:xxxx:xxxx:xxxx
wlan0: ignoring RA from 1234::1234:xxxx:xxxx:xxxx (no public prefix, no managed address)
Add ipv6ra_accept_nopublic to the /system/etc/dhcpcd6/dhcpcd.conf file
Help needed!
Basically just how to get it fully working
Any advise would be appreciated
Compiled with:
Compiled on: x86_64 GNU/Linux (Debian Jessie)
arm-linux-gnueabihf-
package: binutils-arm-linux-gnueabihf
preconfigure.sh
Code:
export CROSS_TARGET=arm-linux-gnueabihf
export CC="${CROSS_TARGET}-gcc-5"
## export CXX="${CROSS_TARGET}-g++"
export AR="${CROSS_TARGET}-ar"
export AS="${CROSS_TARGET}-as"
export LD="${CROSS_TARGET}-ld"
export RANLIB="${CROSS_TARGET}-ranlib"
export READELF="${CROSS_TARGET}-readelf"
export STRIP="${CROSS_TARGET}-strip"
Compile:
Code:
./configure --host=arm-linux-gnueabihf --enable-static --enable-ipv4 --enable-ipv6 --enable-embedded --sysconfdir=/system/etc/dhcpcd6 --bindir=/system/bin --libexecdir=/system/etc/dhcpcd6 --statedir=/data/misc/dhcp6 --dbdir=/data/misc/dhcp6 --rundir=/data/misc/dhcp6 --libdir=/system/lib
make -j2 ARCH=arm
mkdir out
make install DESTDIR=out
Thanks To:
Roy Maprles - for the source of his dhcp client
-realm_01
Edit 1 10:20 17-06-2015
I rebuilded the dhcpcd client with some changes in the directories, also I figured out what why I can't assign a IPv6 address
This thread is obsolete because I found a solution check out my app here: http://forum.xda-developers.com/android/apps-games/app-dhcpv6-client-t3176443

Categories

Resources