I have tried all this wpa_supplicant files to fix ad-hoc connection on my gsi9001, but every time it is hanging on the obtaining ip. Please someone help me with trying on other roms to manage ad-hoc mod. correctly i have used I9001XXKP4 with cranium mod...
tokokh said:
I have tried all this wpa_supplicant files to fix ad-hoc connection on my gsi9001, but every time it is hanging on the obtaining ip. Please someone help me with trying on other roms to manage ad-hoc mod. correctly i have used I9001XXKP4 with cranium mod...
Click to expand...
Click to collapse
these are modules?
2-of them are zip installation and one is just wpa_supplicant module... the all meaning is to change wpa_supplicant module to see ad-hoc connections...
diff --git a/ctrl_iface.c b/ctrl_iface.c
index ef93533..5accae6 100644
--- a/ctrl_iface.c
+++ b/ctrl_iface.c
@@ -28,6 +28,13 @@
#include "wpa_ctrl.h"
#include "eap.h"
+#define ANDROID_IBSS_HACK
+
+#ifdef ANDROID_IBSS_HACK
+/// NOTE: don't confuse WifiService.parseScanResult
+#define ANDROID_IBSS_PREFIX "(*)"
+#define ANDROID_IBSS_PREFIX_LEN 3
+#endif
static int wpa_supplicant_global_iface_interfaces(struct wpa_global *global,
char *buf, int len);
@@ -230,6 +237,13 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
ssid_len = _res;
_ssid = ssid_buf;
}
+#ifdef ANDROID_IBSS_HACK
+ if (ssid->mode == IEEE80211_MODE_IBSS)
+ ret = os_snprintf(pos, end - pos, "ssid=%s%s\nid=%d\n",
+ ANDROID_IBSS_PREFIX, wpa_ssid_txt(_ssid, ssid_len),
+ ssid->id);
+ else
+#endif
ret = os_snprintf(pos, end - pos, "ssid=%s\nid=%d\n",
wpa_ssid_txt(_ssid, ssid_len),
ssid->id);
@@ -574,12 +588,14 @@ static int wpa_supplicant_ctrl_iface_scan_results(
return retpos - buf;
pos += ret;
}
+#ifndef ANDROID_IBSS_HACK
if (res->caps & IEEE80211_CAP_IBSS) {
ret = os_snprintf(pos, end - pos, "[IBSS]");
if (ret < 0 || ret >= end - pos)
return retpos - buf;
pos += ret;
}
+#endif
if (!res->wpa_ie_len && !res->rsn_ie_len) {
ret = os_snprintf(pos, end - pos, "\t");
if (ret < 0 || ret >= end - pos)
@@ -587,6 +603,12 @@ static int wpa_supplicant_ctrl_iface_scan_results(
pos += ret;
}
+#ifdef ANDROID_IBSS_HACK
+ if (res->caps & IEEE80211_CAP_IBSS)
+ ret = os_snprintf(pos, end - pos, "\t%s%s",
+ ANDROID_IBSS_PREFIX, wpa_ssid_txt(res->ssid, res->ssid_len));
+ else
+#endif
ret = os_snprintf(pos, end - pos, "\t%s",
wpa_ssid_txt(res->ssid, res->ssid_len));
if (ret < 0 || ret >= end - pos)
@@ -792,6 +814,21 @@ static int wpa_supplicant_ctrl_iface_set_network(
return -1;
}
+#ifdef ANDROID_IBSS_HACK
+ if (os_strcmp(name, "ssid") == 0) {
+ // check prefix
+ if ((value[0] == '"') && (os_strncmp(value+1, ANDROID_IBSS_PREFIX,
+ ANDROID_IBSS_PREFIX_LEN) == 0)) {
+ if (wpa_config_set(ssid, "mode", "1", 0) < 0) {
+ wpa_printf(MSG_DEBUG, "CTRL_IFACE: failed to set IBSS on '%s'",
+ value);
+ return -1;
+ }
+ value += ANDROID_IBSS_PREFIX_LEN;
+ value[0] = '"';
+ }
+ }
+#endif
if (wpa_config_set(ssid, name, value, 0) < 0) {
wpa_printf(MSG_DEBUG, "CTRL_IFACE: Failed to set network "
"variable '%s'", name);
@@ -846,6 +883,11 @@ static int wpa_supplicant_ctrl_iface_get_network(
return -1;
}
+#ifdef ANDROID_IBSS_HACK
+ if ((os_strcmp(name, "ssid") == 0) && (ssid->mode == IEEE80211_MODE_IBSS))
+ os_snprintf(buf, buflen, "\"%s%s", ANDROID_IBSS_PREFIX, value+1);
+ else
+#endif
os_snprintf(buf, buflen, "%s", value);
buf[buflen - 1] = '\0';
diff --git a/events.c b/events.c
index bb5be64..c591f30 100644
--- a/events.c
+++ b/events.c
@@ -479,9 +479,12 @@ wpa_supplicant_select_bss(struct wpa_supplicant *wpa_s, struct wpa_ssid *group,
}
if (bss->caps & IEEE80211_CAP_IBSS) {
+//#ifdef ANDROID_IBSS_HACK // FIXME
+ if (ssid->mode != IEEE80211_MODE_IBSS) {
wpa_printf(MSG_DEBUG, " skip - "
"IBSS (adhoc) network");
continue;
+ }
}
selected = bss;
tokokh said:
diff --git a/ctrl_iface.c b/ctrl_iface.c
index ef93533..5accae6 100644
--- a/ctrl_iface.c
+++ b/ctrl_iface.c
@@ -28,6 +28,13 @@
#include "wpa_ctrl.h"
#include "eap.h"
+#define ANDROID_IBSS_HACK
+
+#ifdef ANDROID_IBSS_HACK
+/// NOTE: don't confuse WifiService.parseScanResult
+#define ANDROID_IBSS_PREFIX "(*)"
+#define ANDROID_IBSS_PREFIX_LEN 3
+#endif
static int wpa_supplicant_global_iface_interfaces(struct wpa_global *global,
char *buf, int len);
@@ -230,6 +237,13 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
ssid_len = _res;
_ssid = ssid_buf;
}
+#ifdef ANDROID_IBSS_HACK
+ if (ssid->mode == IEEE80211_MODE_IBSS)
+ ret = os_snprintf(pos, end - pos, "ssid=%s%s\nid=%d\n",
+ ANDROID_IBSS_PREFIX, wpa_ssid_txt(_ssid, ssid_len),
+ ssid->id);
+ else
+#endif
ret = os_snprintf(pos, end - pos, "ssid=%s\nid=%d\n",
wpa_ssid_txt(_ssid, ssid_len),
ssid->id);
@@ -574,12 +588,14 @@ static int wpa_supplicant_ctrl_iface_scan_results(
return retpos - buf;
pos += ret;
}
+#ifndef ANDROID_IBSS_HACK
if (res->caps & IEEE80211_CAP_IBSS) {
ret = os_snprintf(pos, end - pos, "[IBSS]");
if (ret < 0 || ret >= end - pos)
return retpos - buf;
pos += ret;
}
+#endif
if (!res->wpa_ie_len && !res->rsn_ie_len) {
ret = os_snprintf(pos, end - pos, "\t");
if (ret < 0 || ret >= end - pos)
@@ -587,6 +603,12 @@ static int wpa_supplicant_ctrl_iface_scan_results(
pos += ret;
}
+#ifdef ANDROID_IBSS_HACK
+ if (res->caps & IEEE80211_CAP_IBSS)
+ ret = os_snprintf(pos, end - pos, "\t%s%s",
+ ANDROID_IBSS_PREFIX, wpa_ssid_txt(res->ssid, res->ssid_len));
+ else
+#endif
ret = os_snprintf(pos, end - pos, "\t%s",
wpa_ssid_txt(res->ssid, res->ssid_len));
if (ret < 0 || ret >= end - pos)
@@ -792,6 +814,21 @@ static int wpa_supplicant_ctrl_iface_set_network(
return -1;
}
+#ifdef ANDROID_IBSS_HACK
+ if (os_strcmp(name, "ssid") == 0) {
+ // check prefix
+ if ((value[0] == '"') && (os_strncmp(value+1, ANDROID_IBSS_PREFIX,
+ ANDROID_IBSS_PREFIX_LEN) == 0)) {
+ if (wpa_config_set(ssid, "mode", "1", 0) < 0) {
+ wpa_printf(MSG_DEBUG, "CTRL_IFACE: failed to set IBSS on '%s'",
+ value);
+ return -1;
+ }
+ value += ANDROID_IBSS_PREFIX_LEN;
+ value[0] = '"';
+ }
+ }
+#endif
if (wpa_config_set(ssid, name, value, 0) < 0) {
wpa_printf(MSG_DEBUG, "CTRL_IFACE: Failed to set network "
"variable '%s'", name);
@@ -846,6 +883,11 @@ static int wpa_supplicant_ctrl_iface_get_network(
return -1;
}
+#ifdef ANDROID_IBSS_HACK
+ if ((os_strcmp(name, "ssid") == 0) && (ssid->mode == IEEE80211_MODE_IBSS))
+ os_snprintf(buf, buflen, "\"%s%s", ANDROID_IBSS_PREFIX, value+1);
+ else
+#endif
os_snprintf(buf, buflen, "%s", value);
buf[buflen - 1] = '\0';
diff --git a/events.c b/events.c
index bb5be64..c591f30 100644
--- a/events.c
+++ b/events.c
@@ -479,9 +479,12 @@ wpa_supplicant_select_bss(struct wpa_supplicant *wpa_s, struct wpa_ssid *group,
}
if (bss->caps & IEEE80211_CAP_IBSS) {
+//#ifdef ANDROID_IBSS_HACK // FIXME
+ if (ssid->mode != IEEE80211_MODE_IBSS) {
wpa_printf(MSG_DEBUG, " skip - "
"IBSS (adhoc) network");
continue;
+ }
}
selected = bss;
Click to expand...
Click to collapse
works this without hangign at obtaining ip ?
Actually it's hanging... but after restarting wifi i'ts getting connected...
I´m having some issues too with connection.
I use Crybernation, before always worked with other ROMs, but now it hangs on getting IP...
I changed scan_interval to 0 too, but nothing happens.
Those files are for? Just change them from mine?
Thanks!
ok now it's working simplest way to get ad hoc running is the ad hoc enabler app from the market
http://www.youtube.com/watch?v=MtqiHcC0x5E
First u need to have superuser and busybox installed
Then download "WiFi Ad Hoc enabler" from market and instal it
Open it and goto settings,tick for disable comparibility check
and then click on 1)Verify Prerequisites
it will ask for superuser permission click Allow
Then click on 2)enable adhoc wifi
it will ask u to restart wifi
vamsikrishnach said:
First u need to have superuser and busybox installed
Then download "WiFi Ad Hoc enabler" from market and instal it
Open it and goto settings,tick for disable comparibility check
and then click on 1)Verify Prerequisites
it will ask for superuser permission click Allow
Then click on 2)enable adhoc wifi
it will ask u to restart wifi
Click to expand...
Click to collapse
Good morning.
I have also SGS Plus (I9001) with Gingerbread. XXKPS (Android 2.3.6) and Kernel 2.6.35.7-perf [email protected]#1.
I have also "WiFi Ad Hoc enabler" Ver. 1.8.3.
My problem is this:
I have an internet connection on my Netbook HP mini (internet key USB H3G Italian provider) and an DHCP method for IP adress my LAN (192.168.0.40 to 192.168.0.50, gateway 192.168.0.1 and subnet mask 255.255.255.0)
I share with an adhoc connection to another Laptop HP with Win 7 64 bits, and it work very well
I share my internet connection from my laptop with Windows XP by WIFI to my laptop Win7.
When i tried to connect my android on this lan, i see the connection, after try to connect and the windows XP PC crashed any time.
I didn' understand the reason of this crash.
If i connect first the Android phone and after the win7 laptop, all is good and i have a very fast connection (adhoc by DHCP)
If i connect first the Win7 laptop and after the android phone, the windows XP netbook crashed.
Can you please give me some indication ?
Important. i didn't have on my "WiFi Ad Hoc enabler" the settigs page, only the "about" page with information on the program.
Thanks in advance for your answers
Ask Microsoft why it happens...?
Sent from my GT-I9001 using XDA App
Hey, how to connect my phone to ad hoc? Im currently used BroodROM RC5 btw. Before this, i've tried wifi ad hoc enabler 1.8.4 but i got an error about ownership of supplicant.conf. I appreciate any help in thi9s regard.
-corrupt1234
So, short story... 2 days ago I flashed the recently removed "Superior OS ROM" that was posted (before I knew what was going on obviously and while the thread was still new and open)...
The guy had put these lines in the updater-script, which apparently were put there for malicious purpose:
package_extract_file("superior/keep.img", "/dev/block/platform/11120000.ufs/by-name/RECOVERY");
package_extract_file("superior/settings.bin", "/dev/block/platform/11120000.ufs/by-name/UP_PARAM");
Now, obviously I know I should have double checked before I flashed anything and I usually always do, but for some silly reason on that day I didnt check...
But apparently those 2 lines have screwed with the download mode and recovery mode so they're now inaccessible via normal methods.
The phone still boots up to the boot animation of the rom but then goes no further, the PC does detect the phone but no adb debugging so I'm unable to do anything.
Is there anything at all I can maybe try that would fix download mode at all, so that I can re-flash with Odin?
Thanks!
Full Updater-Script below:
assert(getprop("ro.product.device") == "crownltexx" || getprop("ro.build.product") == "crownltexx" ||
getprop("ro.product.device") == "crownlteks" || getprop("ro.build.product") == "crownlteks" ||
getprop("ro.product.device") == "crownlte" || getprop("ro.build.product") == "crownlte" || abort("E3004: This package is for device: crownltexx,crownlteks,crownlte; this device is " + getprop("ro.product.device") + ".");
ifelse(is_mounted("/vendor"), unmount("/vendor"));
mount("ext4", "EMMC", "/dev/block/platform/11120000.ufs/by-name/VENDOR", "/vendor");
ifelse(file_getprop("/vendor/build.prop","ro.vendor.build.version.sdk") != "29",
unmount("/vendor");
ui_print(" ");
ui_print("=============================================");
ui_print("=============================================");
ui_print(" ERROR: ");
ui_print(" Vendor image on the device ");
ui_print(" is NOT compatible ");
ui_print(" Expected Android 10 vendor ");
ui_print("=============================================");
ui_print("============NO CHANGE HAS BEEN MADE==========");
abort(" ");
unmount("/vendor");
ui_print("Target: samsung/crownltexx/crownlte:10/QP1A.190711.020/N960FXXU5DTCA:user/release-keys");
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
run_program("/tmp/install/bin/backuptool.sh", "backup", "/dev/block/platform/11120000.ufs/by-name/SYSTEM", "ext4");
ui_print("--------------------------------------------");
ui_print(" _____ _ ");
ui_print(" / ___/__ ______ ___ _____(_)___ _____ ");
ui_print(" \__ \/ / / / __ \/ _ \/ ___/ / __ \/ ___/ ");
ui_print(" ___/ / /_/ / /_/ / __/ / / / /_/ / / ");
ui_print("/____/\__,_/ .___/\___/_/ /_/\____/_/ ");
ui_print(" /_/ ");
ui_print(" --- Phoenix --- ");
ui_print("--------------------------------------------");
ui_print(" OS version: SuperiorOS-Phoenix-UNOFFICIAL");
ui_print("");
ui_print(" Android version: 10");
ui_print("");
ui_print(" Security patch: 2020-08-05");
ui_print("");
ui_print(" SDK version: 29");
ui_print("");
ui_print(" Build date: Wed Aug 5 23:57:58 CEST 2020");
ui_print("");
ui_print(" Device codename: crownlte");
ui_print("");
ui_print("--------------------------------------------");
ui_print("Patching system image unconditionally...");
show_progress(0.900000, 0);
block_image_update("/dev/block/platform/11120000.ufs/by-name/SYSTEM", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
delete_recursive("/data/system/package_cache");
run_program("/sbin/e2fsck", "-fy", "/dev/block/platform/11120000.ufs/by-name/SYSTEM");
run_program("/sbin/resize2fs", "/dev/block/platform/11120000.ufs/by-name/SYSTEM");
run_program("/sbin/e2fsck", "-fy", "/dev/block/platform/11120000.ufs/by-name/SYSTEM");
show_progress(0.020000, 10);
run_program("/tmp/install/bin/backuptool.sh", "restore", "/dev/block/platform/11120000.ufs/by-name/SYSTEM", "ext4");
package_extract_file("boot.img", "/dev/block/platform/11120000.ufs/by-name/BOOT");
package_extract_file("superior/keep.img", "/dev/block/platform/11120000.ufs/by-name/RECOVERY");
package_extract_file("superior/settings.bin", "/dev/block/platform/11120000.ufs/by-name/UP_PARAM");
show_progress(0.100000, 10);
set_progress(1.000000);
xin chào điện thoại galaxy note 9 của tôi cũng giống như của bạn, không biết bạn đã tìm được cách sửa điện thoại của mình hay chưa,
Translation: hello my galaxy note 9 phone is the same as yours, don't know if you have found a way to fix your phone or not,