[Q] Turning on Bluetooth in flight mode - Android Software/Hacking General [Developers Only]

Hi guys,
hope this is the right forum.
I switched from iPhone4 now to the new Samsung Galaxy S II with 2.3.3 and brought my bluetooth Sennheiser MM450 which I would like to use in flight.
Anyway when I turn on the flight mode I can't turn on Bluetooth anymore!?
On my iPhone this was possible.
Is there any way to get Bluetooth in flight mode working as I dont wanna have my phone searching for networks during flight.
Any other App/hint etc. for this?
My Samsung is rooted by the way...

Like this?
Otherwise, on a more serious note: http://code.google.com/p/android/issues/detail?id=3289, see comment 42 there.

doktornotor said:
Otherwise, on a more serious note: ... see comment 42 there.
Click to expand...
Click to collapse
Thanks.... maybe I am too rookie for that... I installed QuickSSHd and logged in from my Putty but can't issue these commands:
# id
uid=0(root) gid=0(root) groups=0(root)
# adb remount /data
adb: not found
# sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite3: not found
So I searched but following issue:
# find / -iname adb
/sys/devices/virtual/usb_composite/adb
/sys/class/usb_composite/adb
# /sys/class/usb_composite/adb
/sys/class/usb_composite/adb: permission denied

adb is supposed to be used from your PC, need to install Android SDK there, not try to run it from phone shell.

Thanks, will try that out now and just installing JDK and Android SDK R11...

Ok. If you get permissions denied stuff, I would suggest loosely following this one:
http://dylanmtaylor.com/2010/10/19/closer-to-a-proper-froyo-limit-removal-fix/
For the remount /system thing, you need to check the actual device being mounted by running something like:
Code:
$ mount | grep /system
as it differs from device to device.
(Other way would involve getting ro.secure=0 which might be more complex than needed here. You can check what you have by getprop | grep ro.secure)

Related

Allowing non market apps to be installed on locked down phones (backflip)

Hey guys,
My uncle works for Motorola and gave me a prototype phone (which I believe will be called the Motorola Sage, and it's model number is MB508. This thread isn't really about that, I can't post pictures because I don't want to get anyone in trouble). This phone is an AT&T phone, complete with AT&T startup screen, uninstallable AT&T apps and of course the inability to install non-market apps. Also it's running Android 2.1.
Now, I seem to have default root access to this phone. I'm assuming the file system is very similar to that of the Backflip (which I was previously using until I received this one). From what I've read and learned from poking around in /system/etc, non-market apps are blocked by two config files. These are:
/system/etc/motorola/com.android.providers.settings/secure.mkitso
Code:
# cat secure.mkitso
cat secure.mkitso
location_providers_allowed=network,gps
wifi_on=0
data_roaming=1
bluetooth_on=0
install_non_market_apps=0
usb_mass_storage_enabled=1
and
/system/etc/motorola/com.motorola.android.providers.settings/settings.mkitso
Code:
# cat settings.mkitso
cat settings.mkitso
mms_maximum_message_size=614400
auto_scan_on_flip=true
sms_pref_key_emailgateway_num=121
Single_Digit_Dial_Enabled=True
roaming_icon=0
dun_enable=1
force_only_market_apps=1
Bluetooth_Dun_Enabled=true
mms_x_wap_profile_url=http://uaprof.motorola.com/phoneconfi/MotoMB51/profile/MotoMB511.rdf
sms_pref_key_to_email=1
Okay, now it would seem that it's a simple matter of changing the values for "force_only_market_apps" to 0, and "install_non_market_apps" to 1. I did this, and let me quickly tell you how I did it.
- Make /system writable: mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
- Copy mkitso files to sdcard
- Edit mkitso files using Notepad++, changing the values as stated above
- Copy mkitso files back to their original directories
- chmod 644 to the files in order to keep their original permissions
- Make /system read only again: mount -o remount,ro -t yaffs2 /dev/block/mtdblock4 /system
- Restart the phone
However, this did not work, as I still get the warning when I try to install a non-market app.
I was wondering if anyone had any ideas on this, as when the Backflip gets rooted this is one thing that I'm sure we would like to know.
Have you tried adb install? I've heard that works on Backflops. You could download the app to your PC,and install it using "adb install PATH/TO/APP.APK"
Thanks, I know that I can use adb to install non market apps, but I was looking at how to change this setting on the phone. Since I have root on my phone, I figured it was possible.
Check out some of these terminal apps found in /system/bin/ directory of the backflip.Maybe they will help you.
Code:
modemlog
chown
check_prereq
dumpsys
qmuxd
rild
dd
port_bridge
installd
minipadut
vmstat
vold
ioctl
mm-audio-native-test
lsmod
id
mm-adec-omxamr-test
notify
getevent
hciattach
dhcpcd
service
cat
system_server
linker
mm-vdec-omxh264-test
mm-adec-omxevrc-test
wpa_supplicant
netstat
mm-adec-omxmp3-test
ls
wipe
iwpriv
stop
log
mm-vdec-omxmp4-test
top
bt_init
app_process
kill
dumpcrash
iwspy
tcmd_engine
sleep
port-bridge
input
chmod
flash_image
wfa_dut
monkey
dmesg
umount
dalvikvm
sh
sync
ptf
mm-jpeg-dec-test
ime
diag_klog
route
ln
batch
fuel_gauge
iwlist
bugreport
insmod
hcid
svc
rmmod
servicemanager
iwgetid
debuggerd
test_diag
am
renice
applypatch
ps
watchprops
sendevent
reboot
mount
mm-adec-omxQcelp13-test
pm
start
ping
busybox
toolbox
df
touchpad
mediaserver
setconsole
loc_api_app
setprop
logwrapper
rm
dvz
hd
ifconfig
rmdir
printenv
getprop
mm-venc-omx-test
fsck_msdos
iwconfig
iftop
bt_downloader
akmd2
sdptool
disp_util
mm-aenc-omxamr-test
newfs_msdos
gzip
cmp
iwevent
mv
smd
mmclog
mknod
mm-adspsvc-test
bt_test_exec
dexopt
date
set_grp_id
i2c
tcmd_sql
recovery
dumpstate
netcfg
surfaceflinger
mkdir
dbus-daemon
mm-adec-omxaac-test
schedtest
mm-jpeg-enc-test
logcat
mm-aenc-omxaac-test
schedtop
fmradio
EDIT:Also there does not seem to be a com.android.providers.settings in /system/etc/motorola/ only com.motorola.android.providers.settings and the file located in that directory is named secure.mkitso and the market app setting is set up like this:install_non_market_apps=0
So there is a slight difference in how the devices are set up and maybe a bit less security on the backflip =)
Thanks for your suggestion, but if you read above I changed the mkitso files without any changes in the behavior of the phone .
I was thinking that since I changed the settings files and they didn't do anything, maybe they will be applied during a hard reset. I'll try that sometime this weekend and report on the results.
The reason I'm asking for help is because I believe that once the Backflip gets rooted, we will need to know how to disable this setting.
I doubt you have root unless it came already rooted (you did make up some **** about a prototype) I honestly think this wont be a hard issue to tackle or work around when root is achieved on the Lackflip...yes I did Lackflip on purpose because of how crippled it is..so spend your time ANNONYMOUSLY sending www.endgadget.com some nice shiney pics of your supposed prototype codnamed:
"Motorola Sage"
I'm not sure why you're so aggressive, Honestly77. I'm able to "su" in shell and I'm able to modify files in the /system folder, so unless I'm mistaken (which I very well might be), then I believe I have root on the phone.
It is a prototype phone for testing, so it coming rooted isn't too farfetched at all.
When the Backflip does get rooted yes, this will be an easier issue to solve, but I'm trying now. If we're able to figure it out now then no time will have to be devoted to it when the Backflip is rooted.
Alright, I just did a hard reset and it activated a menu toggle under Settings -> Applications -> "Unknown Sources: Allow install of non-Market applications" which can be checked or unchecked.
To summarize, if you have root on your phone, edit secure.mkitso and settings.mkitso and change the variables, then you need to hard reset the phone.
hey met3ora, I too have a backflop, I am currently trying to sell my soul to obtain some sort of root or even simple control over the device, I have 2 questions for you...
1: using the config files and other software availible on this forum, would it be possible to obtain a workaround to be able to install apps from sd? I'm sure you are well aware that the backflip has no memory and won't even allow market apps to be installed via sd.
my second question (its ok if you don't want to answer as we will find out soon enough)
is: the moto sage, how does it compare to the backflip? no specifics needed just, is it better?
Iv'e seen the photos of the sage that appeared a couple weeks ago and it looks good, just incase we need it you should copy the system files as I'm sure the one AT&T will give us will be on lockdown as well. Thanks!
Honestly77 said:
I doubt you have root unless it came already rooted (you did make up some **** about a prototype) I honestly think this wont be a hard issue to tackle or work around when root is achieved on the Lackflip...yes I did Lackflip on purpose because of how crippled it is..so spend your time ANNONYMOUSLY sending www.endgadget.com some nice shiney pics of your supposed prototype codnamed:
"Motorola Sage"
Click to expand...
Click to collapse
THis thread is old but it still helped me with a bravo. Thanks OP.
And to this guy above, wtf, why be such a douche? You are also clearly an idiot or you would know that engineering models always have root.
Calling the OP a liar was way out of line and you should apologize.

[Q]Disable/Enable radio or airplane mode through shell script

All,
I am looking for a way to enable/disable airplane mode (or just the radio) from a shell script... I actually do work on the HTC Eris forum but you guys are the script masters so I thought I would cross post here. thanks for your help!
I have reviewed the output of the below code and did not see anything that worked.
Code:
adb shell getprop
I have also reviewed the /sys/ directory on the phone and not yet found anything.
I know it is there somewhere...

adbd running on device, cannot connect from host

Hello all,
As per my previous thread, I now have a rooted nonsense free Android.
Now I'm trying to connect to it via adb which is proving tricky.
The device is rooted (unrevoked/clockwork mod) and in recovery mode it'll adb just like that. However, when the device is running, I can't pick it up. I get:
Code:
$ adb devices
List of devices attached
???????????? no permissions
Now I have the old superuser skull and crossbones app thingy on my phone running. I've also tried to connect locally using connectbot and this works, I get sh running just fine. I can also su and get root.
However, even if I stop and restart adbd it changes nothing from the pov of the host... in other words it's not letting me connect.
Specifically, I can see:
Code:
sh-3.2# ps
...
root 1978 1 3142 200 ffffffff 0000f474 /sbin/adbd
...
$ whoami
whoami: unknown uid 0
from connectbot on the device
A pointer in the right direction would be wonderful!
_glokta.

Proximity sensor issue and solution.

Here is my experience with proximity sensor, and finally got it working back with manual recalibration. So sharing here with you if any one having same issue.
Symptoms : Weired behavior of proximity sensor, I had issue like screen was not turning On after call ends. Air call accept not working
Test : Dial *#0*#
Now this will open up menu, select sensor from there and putting hand near proximity sensor screen should turn green and vibrate. I have had that, but when moving hand away from proximity sensor it was not turning back to normal stat. So once proximity sensor gets activated, it was remaining On always.
Suggestion from net : There wa plenty of cases I have seen having same issue on note3. there was different suggestion like turning auto brightness off / removing Ext SD card was worked for other but not worked on my case. Also someone asked to blow compressed air in earpiece to clean sensor, that helped but just for few minutes only.
Solution that was worked for me.
First thing this setting files remains in EFS folder, so if you have EFS backup, you can try restoring it. In my case I had old EFS backup (MJ1) and have ROM MK2, and later I realized, there is some file difference in both version. (samsung have again screwed EFS, Thanks )
So finally I need to manually recalibrate proximity sensor and that worked fine and since couple of hrs using it without issue.
Requirements :
-Adb access and rooted device.
You should have rooted device, also make sure USB debugging is ON
Connect device to PC and run adb shell
Type following command
Code:
cd /sys/devices/virtual/sensors/proximity_sensor/
then
Code:
cat state #blank value
You will get some value(blank value), note that value. In my case it was 85.
Now enter this command to get actual configuration value
Code:
cat prox_cal
you will get some value, note that value too. In my case it was 46,166,126
Now make total of blank value and actual value(first part) , e.g. in my case it was 85+46 (red above) = 131
Now you need to find HEX value for 131. Get from here OR Here
So in my case it was (HEX value for 131) 83
Now you need to write this value in prox_cal file in EFS folder. For this you need,
Type this with adb
Code:
su
Grant supersu permission from device if ask.
then
Code:
echo -en $'\x83' > /efs/prox_cal
here 83 is my value, you have to replace with your.
then
Code:
sync
Now last step you needs to change permission. here is three steps for that.
Code:
chown system:system /efs/prox_cal
chmod 644 /efs/prox_cal
sync
Reboot device and check proximity sensor is working fine.
GoodLuck !
Referred too many threads on XDa and google, main credit goes to @greaty for clear instruction.
Sorry intended to post on Note3 general forum.
Mod please move this thread.
Hi dr.Ketan,
Good morning!
Sometime back I wrote to you about the proximity sensor not working and also about the weird results I was getting with adb. You told me to wait for some time as you were busy with the kitkat rom for note 2. If you are relatively free now, would you please guide me in this regard. I'm pasting the results I get on adb:
"Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\Admin>adb devices
List of devices attached
4df723a360****** device
C:\Users\Admin>adb shell
[email protected]:/ $ cd /sys/devices/virtual/sensors/proximity_sensor/
cd /sys/devices/virtual/sensors/proximity_sensor/
[email protected]:/sys/devices/virtual/sensors/proximity_sensor $ cat state #blank valu
e
#blank value <
1
[email protected]:/sys/devices/virtual/sensors/proximity_sensor $ cat prox_cal
cat prox_cal
11,9
[email protected]:/sys/devices/virtual/sensors/proximity_sensor $"
You would have noticed that:
1. Once I punch in a command in adb, it puts the cursor at the end of the line rather that at a new line;
2. 'cat prox_cal' is giving me only two values;
3. If I add the blank value, i.e., 1 and the first digit of the cat prox_cal, i.e., 11, I would get 12 and a hex value for the same as 'C'.
Is it normal? If you are busy , would appreciate if you can indicate some resources regarding adb and android
regards,
dcpathak
yeah ut can be any so better first use that value and see if that works or not. If doesn't work then let me know.
you have to use this
echo -en $'\xC' > /efs/prox_cal
Click to expand...
Click to collapse
as per instruction and don't forget to do it with Supreuser (root access)
Did that and it seems to have solved the problem.
Interesting observation: this time the blank value increased to 14 so corresponding hex was E. used that and problem solved.
Any idea why commands were starting from the same line as the previous command?
Thanks and regards,
dcpathak
Thanks man, finally a solution for the promity sensor i really appresiate that you are sharing this with us i finally will get my prox sensor working
i wonder if this value is a normal value
[email protected]:/sys/devices/virtual/sensors/proximity_sensor $ cat prox_cal
cat prox_cal
2013274108,2013274228,2013274188
Hi,
you my friend are a legend, this works finally for me again after over month putting up with it.
Thanks
what should i do it's said not found?
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>adb devices
List of devices attached
4df79c57088840c5 device
C:\Windows\system32>adb shell
[email protected]:/ $ cd/sys/devices/virtual/sensors/proximity_sensor/
cd/sys/devices/virtual/sensors/proximity_sensor/
/system/bin/sh: cd/sys/devices/virtual/sensors/proximity_sensor/: not found
127|[email protected]:/ $
SOLVED
my one has returned back to the same issue again just randomly.
Thanks
Sent from my SM-N9005 using Tapatalk
Thanks @dr.ketan for share this method...and now my proximity sensor is back... i'm on leaked lollipop ????????????????????????????????? i'm very happy?
I had this issue too. After Samsung refused to repair my n9005 because of the triggered Knox counter, I just opened my phone and cleaned the dust that gathers between the prox. sensor and the front glass with isopropanol and a microfiber cloth. Now it's working again. The method described by OP and other methods didn't work for me.
i had the same problem and solved it typing in a terminal emulator
HTML:
$ su
$ echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
$ echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
$ chown system:system /efs/prox_cal
$ chmod 644 /efs/prox_cal
$ sync
Jager23 said:
i had the same problem and solved it typing in a terminal emulator
HTML:
$ su$ echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal$ echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal$ chown system:system /efs/prox_cal$ chmod 644 /efs/prox_cal$ sync
Click to expand...
Click to collapse
Yes it's definitely works for me...
SM-N900 cihazımdan Tapatalk kullanılarak gönderildi
@dr.ketan..
u are a legend, thanks alot. and for the other how found this..
for whom how is noob like me :angel: u could use terminal emulator from playstore after rooting(of course)..
thank you
Just followed the method using terminal emulator, rebooted and now works perfectly so far!!! Was getting different faults on different ROMs. On lollipop the proximity sensor just wouldn't work at all. Then went back to 4.4.4 and would work but only once (soon as you put the phone to ear during a call then remove it , although the screen would come on, the key pad would be unresponsive.) Which meant I had many voice mails that had built up and was unable to delete them lol.
Thanks again for this method....though I'm not entirely sure what this has exactly done....its worked.
Omg thank you. This works for lollipop n9005 too ?
I've been having this issue since upgrading to Lollipop, I'll be sure to try this!
how?
Jager23 said:
i had the same problem and solved it typing in a terminal emulator
HTML:
$ su
$ echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
$ echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
$ chown system:system /efs/prox_cal
$ chmod 644 /efs/prox_cal
$ sync
Click to expand...
Click to collapse
thanks, but it didnt work for me. I installed terminal emulator from the play market, then started typing the above, but it said su is not found, and echo etc is not allowed.
ive never used the emulator before and googling the subject did not help. could you explain what am i doing wrong?
You have device rooted?
Sent from my SM-N910G using xda premium

[Q] MMS Fix for KitKatDS 1.3. Help a Noob Plz

Hi. As title says I need a fix for KitKatDS rom. I tried to post in that thread but it won't let me. I saw this fix in the thread but I don't know where you do this or if it works:
FYI - found a fix. If anyone is having issues sending/receiving MMS, do this:
(load up adb shell)
su
mount -o rw,remount /system
rm /system/bin/ip
ln -s /system/xbin/ip /system/bin/ip
IP on /bin errors out so the device is unable to route a connection to the MMS servers. the IP in /xbin works just fine
Can someone give a noob a walkthrough of how to do this? Thanks
Set up adb on PC and turn debugging on on phone, if you aren't sure how to do this a quick Google search will give you many guides.
Once this is working open a terminal/cmd and type
adb devices
If you a see a serial number than you are good, if not see the guide on setting up adb or ask question here if still stuck
Once all is working type
adb shell
Then type the exact commands you linked from above
Now for safe measure type
exit
adb reboot
You should be good (granted I'm not using this ROM currently and have not needed to attempt this fix, but looking at it, it makes sense and could work. Having said that always make a backup of current ROM in recovery before trying new things you don't fully understand)
Best of luck
Sent from my Nexus 7 using XDA Premium 4 mobile app
As I mentioned in the KK thread itself, I was able to run the fix without having to PC attach and adb shell. Just used the included terminal program with SU permissions, and the fix has held since day 1. I've sent & received plenty of MMS messages.

Categories

Resources