Weirdest problem on my gear s2 - Samsung Gear S2

I have model sm-732 purchased in US and i am the least bit close to a developer.
Went to sell it today because it had been sitting in a drawer and thought that somebody should have it. I only wore it a few times and then it became of no use to me after i was involved in a robbery wearing it.
It worked after that, dont get me wrong, but i decided to not wear it and but it in a drawer were it has been ever since. I did take it out once to reset it via the software which was successfull. I then placed it in the drawer again and forgot about it. Until i remembered i could sell it. Took it out and charged it up and went to sell it. Turned it on when i got to the buyer and it wouldnt work saying it had failed to start and if it persisted to take it to samsung. I am way out if warrenty to they wont do anything for me. I watched a video on bootlooping and i went to the reset screen where download mode is, and just tried to restore. It came back in russian. All russian.
So i went to the internet. People namely said flash it so i got ap, bl, and csc pack for it and flashed it wirelessly with a passing rating from odin.
I have done this twice now and it will say installing new configuration... (which was displayed in russian but now is displayed in english) after that the gear s2 logo will flash and then the samsung logo and then poof it just shuts down and goes back to russian!
Goodlord help me. I am an idiot.

Same here! If I flash Combinations-FTMA it work (but limited) , after flashing full firmware ... Failed.If the Same here! If I flash Combinations-FTMA it work (but limited) , after flashing full firmware ... Failed.If the problem persists, visit a customer service centre.

@Karmaus
Sorry. Less time...
1.
I can see Warranty Void blabla... so something with Knox happens in Photo 1...
2.
No idea what exact fail...
I can remember during my experiments 1 time I have killed BT address in CSA area...
So first boot ends with Error as no connection possible with Phone...
It was very hard for me to restore BT... but it is not impossible... :angel:
2.1
Maybe check BT AND WiFi connection in FTMA Combination Firmware...
2.2
You could also try to catch Log Files...
Code:
*#9900#
Best Regards
Edit 1.
Forgotten...
SM-R732 have 2 Regions... OXA AND OXX...
Maybe this is the reason... if CSC is not inside Firmware package...

@adfree
adfree said:
@Karmaus
Sorry. Less time...
1.
I can see Warranty Void blabla... so something with Knox happens in Photo 1...
2.
No idea what exact fail...
I can remember during my experiments 1 time I have killed BT address in CSA area...
So first boot ends with Error as no connection possible with Phone...
It was very hard for me to restore BT... but it is not impossible... :angel:
2.1
Maybe check BT AND WiFi connection in FTMA Combination Firmware...
2.2
You could also try to catch Log Files...
Code:
*#9900#
Best Regards
Edit 1.
Forgotten...
SM-R732 have 2 Regions... OXA AND OXX...
Maybe this is the reason... if CSC is not inside Firmware package...
Click to expand...
Click to collapse
1. i've try to write both ftma & full firmware , same result
2. indeed bt is killed ...
Edit1. Thanks for regions!
So can you remember how to restore bt ?
My Edit 1 : I've added my dump log ...

@Karmaus
Limited time... and long time ago...
But if I remember correct.
You can use easy Shell script *.sh inside Combination Firmware...
Write me PM... and I will try to search in my Computers... how I solved lost BT...
Best Regards

Code:
#!/bin/sh
#
# Script for setting Bluetooth Address
#
#if [ -e /opt/etc/.bd_addr ]
#then
# echo "Already .bd_addr exists"
# exit 0
#fi
/usr/bin/setbd
echo "Set BT address successes"
bt-set-addr.sh
@Karmaus
Something like this I did to restore BT...
This Shell Script is inside Combination Firmware...
All my attempts to restore my own CSA dump failed... Seems higher secured...
But with this easy Script it was easy...
Best Regards

adfree said:
Code:
#!/bin/sh
#
# Script for setting Bluetooth Address
#
#if [ -e /opt/etc/.bd_addr ]
#then
# echo "Already .bd_addr exists"
# exit 0
#fi
/usr/bin/setbd
echo "Set BT address successes"
bt-set-addr.sh
@Karmaus
Something like this I did to restore BT...
This Shell Script is inside Combination Firmware...
All my attempts to restore my own CSA dump failed... Seems higher secured...
But with this easy Script it was easy...
Best Regards
Click to expand...
Click to collapse
Thanks so much ... i Will try right now and come with a reply in few minutes!

About BT address...
Example to check if file is absent...
Code:
sh-3.2$ cd csa
sh-3.2$ ls
bluetooth csc factory lost+found prov prov_data sensor
sh-3.2$ cd bluetooth
sh-3.2$ ls
sh-3.2$ ls -a -1 -l
total 6
drwxr-xr-x 2 root root 1024 Sep 4 2015 .
drwxr-xr-x 9 root root 1024 Jan 1 2015 ..
-rw-r--r-- 1 root root 14 Sep 4 2015 .bd_addr
sh-3.2$ cat .bd_addr
0002
fc
68f142sh-3.2$
Here is all okay... BT address is not gone/erased...
BUT IMHO this requires ROOT... Combination Firmware...
Best Regards

adfree said:
About BT address...
Example to check if file is absent...
Code:
sh-3.2$ cd csa
sh-3.2$ ls
bluetooth csc factory lost+found prov prov_data sensor
sh-3.2$ cd bluetooth
sh-3.2$ ls
sh-3.2$ ls -a -1 -l
total 6
drwxr-xr-x 2 root root 1024 Sep 4 2015 .
drwxr-xr-x 9 root root 1024 Jan 1 2015 ..
-rw-r--r-- 1 root root 14 Sep 4 2015 .bd_addr
sh-3.2$ cat .bd_addr
0002
fc
68f142sh-3.2$
Here is all okay... BT address is not gone/erased...
BUT IMHO this requires ROOT... Combination Firmware...
Best Regards
Click to expand...
Click to collapse
In my similar case, I haven't seen anything
Code:
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell
sh-3.2# ls
bin csa etc initrd lost+found mnt proc run sdcard srv tmp var
boot dev home lib media opt root sbin smack sys usr
sh-3.2# cd csa
sh-3.2# ls -l
total 0
sh-3.2#
My post: https://forum.xda-developers.com/smartwatch/gear-s2/gear-s2-rm-720-loop-t3977853
Edit:
I tried to run /usr/bin/setbd but I can't.
Bluetooth Address Setting
mkdir: Read-only file system (30) File not exist
Can't open address file
Code:
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell chmod 777 /usr/bin/
chmod: changing permissions of `/usr/bin/': Read-only file system
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb root on
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell chmod 777 /usr/bin/
chmod: changing permissions of `/usr/bin/': Read-only file system
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb root off
Switched to 'developer' account mode
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell chmod 777 /usr/bin/
chmod: changing permissions of `/usr/bin/': Read-only file system
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell /usr/bin/setbd
-l: /usr/bin/setbd: Permission denied
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell cp /usr/bin/setbd /opt/usr/media/
cp: cannot stat `/usr/bin/setbd': Permission denied
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb root on
Switched to 'root' account mode
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell cp /usr/bin/setbd /opt/usr/media/
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell ls -l /opt/usr/media/
total 24
drwxrwxrwx 2 app app 4096 Oct 6 2015 Downloads
drwxrwxrwx 2 app app 4096 Oct 6 2015 Images
drwxrwxrwx 2 app app 4096 Oct 6 2015 Music
drwxrwxrwx 3 app app 4096 Oct 6 2015 Sounds
-rwxr-xr-x 1 root root 6004 Jan 5 11:51 setbd
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell chmod 777 /opt/usr/media/setbd
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell ls -l /opt/usr/media/
total 24
drwxrwxrwx 2 app app 4096 Oct 6 2015 Downloads
drwxrwxrwx 2 app app 4096 Oct 6 2015 Images
drwxrwxrwx 2 app app 4096 Oct 6 2015 Music
drwxrwxrwx 3 app app 4096 Oct 6 2015 Sounds
-rwxrwxrwx 1 root root 6004 Jan 5 11:51 setbd
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell /opt/usr/media/setbd
Bluetooth Address Setting
mkdir: Read-only file system(30)File not exist
Can't open address file
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>

@danicifu01
Is sooooooooo looooooooong ago....
Code:
mount -o remount,rw /
Try this Command before in:
Code:
sdb shell
Best Regards

adfree said:
@danicifu01
Is sooooooooo looooooooong ago....
Code:
mount -o remount,rw /
Try this Command before in:
Code:
sdb shell
Best Regards
Click to expand...
Click to collapse
thanks but:
Code:
sh-3.2# ls -l
total 44
drwxr-xr-x 3 root root 4096 Oct 6 2015 abuild
drwxr-xr-x 10 app app 4096 Jan 6 09:57 app
-rwxrwxrwx 1 root root 136 Jan 10 18:14 bt.sh
drwxr-xr-x 2 developer developer 4096 Oct 6 2015 developer
drwxr-xr-x 4 root root 4096 Jan 5 13:49 root
drwxr-xr-x 5 system system 4096 Jan 5 11:10 system
sh-3.2# sh bt.sh
bt.sh: line 1: cript: command not found
Bluetooth Address Setting
mkdir: Permission denied(13)File not exist
Can't open address file
bt.sh is the script
i try run the script but the file not exit. why?

Related

Override system binaries on CM-mod

This is hack for the userinit.sh script that allows to override
system programs with different binaries or just add some new
executable programs to your rom as you can use your ext3 partition
as storage. One more advantage is that your customizations
will be persistent even after a update.
For this to work you have to add this lines to your /system/sd/userinit.sh script:
Code:
mount -o remount,rw /dev/rootfs /
mkdir /usr
chown root.root /usr
chmod 755 /usr
mkdir /system/sd/bin
chown root.shell /system/sd/bin
chmod 755 /system/sd/bin
ln -s /system/sd/bin /usr/bin
mount -o remount,ro /dev/rootfs /
After a reboot, you'll find a newly created bin
directory in /system/sd/ linked to /usr/bin.
/usr/bin is the first directory to be searched
in path in CM-mod ROMs so any program dropped
there will be found and executed before others with
same name in the system. So you can simply:
Code:
adb push new_program /usr/bin
adb shell
cd /usr/bin
chmod 755 new_program
chown root.shell new_program
This is experimental stuff and therefore USE IT AT YOUR OWN RISK.
Tested on CM-mod-3.6.7.2 and CM-mod-3.6.8 and works fine for me.
So if I were to use this method. I could 'truely' replace the home screen with one of the 3rd party ones. ie aHome or dxTop? As it is now, I've noticed that even setting aHome as default, Home still runs in the background. Using Advanced Task Manager to confirm this btw.
If this is the case, I'll be using this shortly. As I'm tired of just running 3rd party programs in addition to the programs they are suppose to replace.
Its like using windowblinds in windows, instead of just replacing the whole shell. lol
followinginsanity said:
So if I were to use this method. I could 'truely' replace the home screen with one of the 3rd party ones. ie aHome or dxTop? As it is now, I've noticed that even setting aHome as default, Home still runs in the background. Using Advanced Task Manager to confirm this btw.
If this is the case, I'll be using this shortly. As I'm tired of just running 3rd party programs in addition to the programs they are suppose to replace.
Its like using windowblinds in windows, instead of just replacing the whole shell. lol
Click to expand...
Click to collapse
This only lets your run cli programs. This is below the dalvik system so it won't help you change the launcher.apk for ahome or dxtop.
Ok I see what your saying now. Misunderstood the exact intent of the changes
Cool trick, thanks. I already had a /system/sd/bin, so I modified it a little to skip creating it and doing the chmod etc on it.
Slight mod to avoid the whole thing if /usr is already there.. .
Code:
if ! [ -d /usr ]
then
mount -o remount,rw /dev/rootfs /;
mkdir /usr;
chown root.root /usr;
chmod 755 /usr;
ln -s /system/sd/bin /usr/bin;
mount -o remount,ro /dev/rootfs /;
fi
This is useful to me as my userinit.sh is the new one from the compcache thread and can be run to get status info on compcache after boot. No need to remount the filesystem and all that when what we need is already there.
I don't think you can skip the creation of /usr as it is lost
after a reboot at least on cm-mod, you can skip the creation
of system/sd/bin if it already exists tough. OTOH running:
Code:
mkdir /usr
chown root.root /usr
chmod 755 /usr
mkdir /system/sd/bin
chown root.shell /system/sd/bin
chmod 755 /system/sd/bin
ln -s /system/sd/bin /usr/bin
will do no harm as mkdir and ln will fail if the targets already exist
and chown and chmod will just ensure that you can run your
programs.To be on the safe side i would suggest:
Code:
mount -o remount,rw /dev/rootfs /
mkdir /usr
chown root.root /usr
chmod 755 /usr
# we should check if /system/sd is mounted
if [ ! -d /system/sd/bin ] ; then
mkdir /system/sd/bin
chown root.root /system/sd/bin
chmod 755 /system/sd/bin
fi
ln -s /system/sd/bin /usr/bin
mount -o remount,ro /dev/rootfs /
This would be a great place to put a set of the GNU utilities like ls, ln, cp, mv, etc to go along with bash. Busybox is great and all, but there are some advanced options in the GNU versions that aren't available in Busybox. Has anyone compiled them for Android? I might try copying the Debian ones over and see if they work without the rest of the chroot. I'm thinking I'll need at least some of /lib from debian for them to work though.
ttabbal said:
This would be a great place to put a set of the GNU utilities like ls, ln, cp, mv, etc to go along with bash. Busybox is great and all, but there are some advanced options in the GNU versions that aren't available in Busybox. Has anyone compiled them for Android? I might try copying the Debian ones over and see if they work without the rest of the chroot. I'm thinking I'll need at least some of /lib from debian for them to work though.
Click to expand...
Click to collapse
Have you tried a fully configured busybox with desktop options enabled?
Attached just for reference my .config.
farmatito said:
Have you tried a fully configured busybox with desktop options enabled?
Attached just for reference my .config.
Click to expand...
Click to collapse
Nope. Is there a binary available? I don't have a cross compiler set up right now.
Try this, You can create all the symlinks with this command:
Code:
adb push busybox /usr/bin
adb shell
cd /usr/bin
./busybox --install .
For full functionality you should also add /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow. I link them to /system/sd/etc/ to have them rw
Code:
mkdir /system/sd/etc
chmod 644 /system/sd/etc
/system/bin/chown root.root /system/sd/etc
/system/bin/chown root.root /system/sd/etc/passwd
/system/bin/chown root.root /system/sd/etc/group
/system/bin/chown root.root /system/sd/etc/shadow
/system/bin/chown root.root /system/sd/etc/gshadow
/system/bin/chown root.root /system/sd/etc/fstab
chmod 644 /system/sd/etc/passwd
chmod 644 /system/sd/etc/group
chmod 600 /system/sd/etc/shadow
chmod 600 /system/sd/etc/gshadow
ln -s /system/sd/etc/passwd /etc/passwd
ln -s /system/sd/etc/shadow /etc/shadow
ln -s /system/sd/etc/group /etc/group
ln -s /system/sd/etc/gshadow /etc/gshadow
Remove the su link to busybox for now as it interferes with
the superuser app (otoh you could set a root passwd and
use busybox's su BUT ONLY FROM A SHELL)
Code:
rm /usr/bin/su
You should also:
Code:
passwd root
addgroup -g 65534 nogroup
You can even use ash as your default shell by doing:
Code:
if [ -e /usr/bin/busybox ] ; then
mount --bind /usr/bin/sh /system/bin/sh
fi
# Fix scripts in /system/bin
for i in am ime input monkey pm svc
do
if [ `grep -c "#!/system/bin/sh" /system/bin/$i` -eq 0 ] ; then
echo "#!/system/bin/sh" > /system/bin/$i.tmp
cat /system/bin/$i >> /system/bin/$i.tmp
mv /system/bin/$i.tmp /system/bin/$i
chown root.shell /system/bin/$i
chmod 755 /system/bin/$i
fi
done
Thanks! That worked great.
farmatito said:
Try this, You can create all the symlinks with this command:Remove the su link to busybox for now as it interferes with
the superuser app (otoh you could set a root passwd and
use busybox's su BUT ONLY FROM A SHELL)
Click to expand...
Click to collapse
Hey farmatito - just stumbled onto this thread and am going to follow this but I am unclear on how to remove the su link to busybox? Any direction would be appreciated! Thanks.
Edit: I realize you mean to just rm it from /system/sd/bin - duh. thanks for this thread! I like having the full busybox bin.
cd /usr/bin
rm su
farmatito said:
cd /usr/bin
rm su
Click to expand...
Click to collapse
Yeah, I figured that out - thanks. I had edited my above post saying such.
another question for you - I was going through your busybox config file - and am wondering which directory you store it in so that it is used when installing busybox?
prscott1 said:
Yeah, I figured that out - thanks. I had edited my above post saying such.
another question for you - I was going through your busybox config file - and am wondering which directory you store it in so that it is used when installing busybox?
Click to expand...
Click to collapse
Download the source code from www.busybox.net
extract it
cd busybox
cp my_config .config
make oldconfig
make
You need a cross compiler to build it
you can download one at
http://www.codesourcery.com/sgpp/lite/arm/portal/release830
or
http://www.codesourcery.com/sgpp/lite/arm/portal/release827
Quick stupid question please... tried searching but haven't found much.
After doing the userinit.sh mod shown here and using the new busybox (thanks for that, btw!), I noticed that a lot of the commands (including 'ls' which is now using /usr/bin/ls) show ansi colors in a terminal that supports them (i.e. 'Terminal' or 'Better Terminal' app) which is awesome but 'adb shell' looks mostly horrible with escape sequences instead of colors, like this:
Code:
# cd /system/sd
cd /system/sd
# ls -l
ls -l
drwxrwx--x 2 system system 2048 Aug 19 16:04 ←[1;34mapp←[0m
drwxrwx--x 2 system system 1024 Aug 16 02:12 ←[1;34mapp-private←[0m
drwxr-xr-x 2 root root 4096 Aug 19 20:40 ←[1;34mbin←[0m
drwxrwx--x 2 system system 7168 Aug 19 16:04 ←[1;34mdalvik-cache←[0m
drw-r--r-- 2 root root 1024 Aug 19 20:39 ←[1;34metc←[0m
drwxr-xr-x 2 root root 12288 Jul 10 02:29 ←[1;34mlost+found←[0m
drwxrwxrwx 2 root root 1024 Jul 22 18:15 ←[1;34mmedia←[0m
-rwxr-xr-x 1 root root 331 Aug 19 20:28 ←[1;32muserinit.sh←[0m
Do you guys set your $TERM variable to something that makes the adb terminal more "sane" or is not possible because adb is limited and I should just ssh or telnet in, etc.?
I've tried setting $TERM to various standard things (ansi/vt100/xterm/etc.) but the dumb adb terminal remains.. well.. dumb.
rub1k said:
Quick stupid question please... tried searching but haven't found much.
After doing the userinit.sh mod shown here and using the new busybox (thanks for that, btw!), I noticed that a lot of the commands (including 'ls' which is now using /usr/bin/ls) show ansi colors in a terminal that supports them (i.e. 'Terminal' or 'Better Terminal' app) which is awesome but 'adb shell' looks mostly horrible with escape sequences instead of colors, like this:
Code:
# cd /system/sd
cd /system/sd
# ls -l
ls -l
drwxrwx--x 2 system system 2048 Aug 19 16:04 ←[1;34mapp←[0m
drwxrwx--x 2 system system 1024 Aug 16 02:12 ←[1;34mapp-private←[0m
drwxr-xr-x 2 root root 4096 Aug 19 20:40 ←[1;34mbin←[0m
drwxrwx--x 2 system system 7168 Aug 19 16:04 ←[1;34mdalvik-cache←[0m
drw-r--r-- 2 root root 1024 Aug 19 20:39 ←[1;34metc←[0m
drwxr-xr-x 2 root root 12288 Jul 10 02:29 ←[1;34mlost+found←[0m
drwxrwxrwx 2 root root 1024 Jul 22 18:15 ←[1;34mmedia←[0m
-rwxr-xr-x 1 root root 331 Aug 19 20:28 ←[1;32muserinit.sh←[0m
Do you guys set your $TERM variable to something that makes the adb terminal more "sane" or is not possible because adb is limited and I should just ssh or telnet in, etc.?
I've tried setting $TERM to various standard things (ansi/vt100/xterm/etc.) but the dumb adb terminal remains.. well.. dumb.
Click to expand...
Click to collapse
What terminal are you using?
I use konsole on linux and everything looks fine.
Cannot say if there is a suitable terminal for windows,
maybe the one that comes with the mingw compiler.
If nothing works you can just:
Code:
cd /usr/bin
rm ls
farmatito said:
Download the source code from www.busybox.net
extract it
cd busybox
cp my_config .config
make oldconfig
make
You need a cross compiler to build it
you can download one at
http://www.codesourcery.com/sgpp/lite/arm/portal/release830
or
http://www.codesourcery.com/sgpp/lite/arm/portal/release827
Click to expand...
Click to collapse
Many thanks!
Oh, sorry, I should have specified that.
This was using adb from my Vista x64 laptop (yeah, sorry, stuck with win32 for using adb so terminal choices rather limited).
So, basically, it was just running "adb[.exe] shell" from a Windows command prompt.
Tried bash under cygwin and even though it has full ansi coloring support, it looks like adb.exe isn't very terminal friendly because extended/escaped ansi still don't translate.
No big deal; I'll remove /usr/bin/ls for now or temporarily alias 'ls' to /system/xbin/bb/ls while I'm in an adb shell.
Wondering what else I could be using via the USB connection to get a shell prompt within my G1... easiest way is to turn on the wifi and telnet/ssh in, I guess?
EDIT: Duh, just started telnetd and forwarded the port using adb and problem solved (using putty to telnet in as described here and it works very nicely).
rub1k said:
Quick stupid question please... tried searching but haven't found much.
After doing the userinit.sh mod shown here and using the new busybox (thanks for that, btw!), I noticed that a lot of the commands (including 'ls' which is now using /usr/bin/ls) show ansi colors in a terminal that supports them (i.e. 'Terminal' or 'Better Terminal' app) which is awesome but 'adb shell' looks mostly horrible with escape sequences instead of colors, like this:
Code:
# cd /system/sd
cd /system/sd
# ls -l
ls -l
drwxrwx--x 2 system system 2048 Aug 19 16:04 ←[1;34mapp←[0m
drwxrwx--x 2 system system 1024 Aug 16 02:12 ←[1;34mapp-private←[0m
drwxr-xr-x 2 root root 4096 Aug 19 20:40 ←[1;34mbin←[0m
drwxrwx--x 2 system system 7168 Aug 19 16:04 ←[1;34mdalvik-cache←[0m
drw-r--r-- 2 root root 1024 Aug 19 20:39 ←[1;34metc←[0m
drwxr-xr-x 2 root root 12288 Jul 10 02:29 ←[1;34mlost+found←[0m
drwxrwxrwx 2 root root 1024 Jul 22 18:15 ←[1;34mmedia←[0m
-rwxr-xr-x 1 root root 331 Aug 19 20:28 ←[1;32muserinit.sh←[0m
Do you guys set your $TERM variable to something that makes the adb terminal more "sane" or is not possible because adb is limited and I should just ssh or telnet in, etc.?
I've tried setting $TERM to various standard things (ansi/vt100/xterm/etc.) but the dumb adb terminal remains.. well.. dumb.
Click to expand...
Click to collapse
If you are on a windows pc, try using cygwin - works great.

[Q] Zygote Restrict slave mountspace

Has anybody tried to implement this in KitKat ?
When I mount my server by sshfs on my Nexus 5 I can see this mount only in su, every other App/User is not seeing the mountpoint.
As explained here http://forum.xda-developers.com/showthread.php?t=2106480 this is a "Security-Feature" for MultiUser-Support.
So I've applied the Dalvik-Patch in android-4.4_r1 and compiled a new libdvm.so for my Nexus 5 und modified my boot.img (init.rc).
But this does not solve the Problem as expected.
Anybody has patched this in KitKat or has in depth knowlege of Zygote and Dalvik and could explain?
I've digged a litte deeper and found those threads:
http://forum.xda-developers.com/showthread.php?t=1781411
http://forum.xda-developers.com/showthread.php?t=2062768
http://forum.xda-developers.com/showthread.php?t=2107224
All of those basicly say that it is possible to mount using adb and all apps will be able to access them, because adb is not running as a child-process of dalvik.
This is why mounts are not visible to other apps when an app run by dalvik mounts them.
What I don't really get is why mounts by sshfs are not visible to other processes even when I use adb to run sshfs:
[email protected]:~$ adb shell
[email protected]:/ $ su
[email protected]:/ # sshfs [email protected]: /sdcard/mountpoint
[email protected]:/ # mount
...
sshfs#[email protected]: /storage/emulated/legacy/mountpoint fuse rw,nosuid,nodev,relatime,user_id=0,group_id=0 0 0
...
[email protected]:/ # exit
[email protected]:/ $ mount
...
<sshfs mount not listed>
....
So why is the mount only visible when I'am root (in su)?
I'am still working on it and tried the following without using sshfs, but even bind-mounts are not accessible by other users.
Does anyone know why and how to workaround it?
[email protected]:~$ android/android-sdk-linux/platform-tools/adb shell
[email protected]:/ $ su
[email protected]:/ # mount -o rw,remount /
[email protected]:/ # mkdir /mnt/test
[email protected]:/ # chown media_rw:media_rw /mnt/test/
[email protected]:/ # chmod 777 /mnt/test/
[email protected]:/ # busybox mount --bind /mnt/sdcard/ /mnt/test
[email protected]:/ # ls /mnt/test/ -la
drwxrwx--- root sdcard_r 2013-11-06 14:10 .MySecurityData
-rw-rw---- root sdcard_r 33 2013-11-20 18:17 .bugsense
drwxrwx--- root sdcard_r 2013-11-21 14:00 .estrongs
drwxrwx--- root sdcard_r 1970-01-02 01:01 Alarms
drwxrwx--x root sdcard_r 2013-11-06 01:12 Android
drwxrwx--- root sdcard_r 2013-11-12 18:10 DCIM
drwxrwx--- root sdcard_r 2013-11-18 23:38 Download
...
[email protected]:/ # exit
[email protected]:/ $ ls /mnt/test -la
[email protected]:/ $

Samsung Galaxy S insert SIM CARD problem

Hi,
Can you please help me how I can CODE in my mobile ( SAMSUNG GALAXY S - GTI9003)
I m happy to see the solution given by you.. but dont know how to code on ADB shell in my device
Thanks in advance
vssvaas
01binary01 said:
I think every issue to do with losing the baseband has a slight twist, I'm beginning to think not every problem can use the same solution.
I've fixed mine, using similar lines as the posting in http://forum.xda-developers.com/showthread.php?t=1261948
As I couldn't get 7Zip to edit/modify the tar file without the file getting corrupt.
Finally I resorted did the unpacking and re-tarring via my Mac (with android sdk installed) to preserve id's etc.
** The following is just a simple guide, which worked for me, I made sure I had plenty of power on the phone and kept original states of my efs directory **
On my phone via 'adb shell'
Code:
$ su
# mkdir /sdcard/efsbck
# cd /
# busybox tar zcvf /sdcard/efsbck/orig-broke-efs.tar.gz efs
# exit
$ exit
On my mac
Code:
cd <where-ever-your-android-sdk-is>/platform-tools/
adb pull /sdcard/efsbck/orig-broke-efs.tar.gz
mkdir mod
sudo su
cd mod
sh-3.2# #*Note the 'p' on the tar to preserve the original id's etc on various files
sh-3.2# gunzip -c ../orig-broke-efs.tar.gz | tar xvpf -
sh-3.2# cd efs
sh-3.2# ls -ltra | grep nv_data
-rwx------ 1 1001 1001 32 31 Dec 2010 .nv_data.bak.md5
-rwx------ 1 1001 1001 2097152 31 Dec 2010 .nv_data.bak
-rwx------ 1 1001 1001 32 21 Sep 00:46 nv_data.bin.md5
-rwx------ 1 1001 1001 2097152 21 Sep 00:46 nv_data.bin
sh-3.2# rm nv_data.bin.md5
sh-3.2# rm nv_data.bin
sh-3.2# cp -p .nv_data.bak nv_data.bin
sh-3.2# cp -p .nv_data.bak.md5 nv_data.bin.md5
sh-3.2# cd ..
sh-3.2# tar cvf - efs | gzip -c - > mod-efs.tar.gz
a efstar: getpwuid(1001) failed: No such file or directory
a efs/.files
...
...
sh-3.2# ../adb push mod-efs.tar.gz /sdcard/efsbck/mod-efs.tar.gz
Then 'adb shell' back to the phone. I checked the tar file list was ok and wasn't corrupt.
Code:
$ su
# cd /sdcard/efsbck
# busybox tar ztvf mod-efs.tar.gz
Then for the final run, butt clenching bit, still on the phone via 'adb shell'
Code:
$ su
# cd /sdcard/efsbck
# umount /efs
# mke2fs /dev/block/mmcblk0p1
# mount -w -t ext4 /dev/block/mmcblk0p1 /efs
# ls /efs
lost+found
#
# busybox tar zxvf mod-efs.tar.gz -C /
# ls /efs
... check that the nv_data.bin is there ... and has radio radio id's
# exit
$ exit
Then after a reboot - Phone was still in 'airplane mode' - But went into settings - checked baseband - it was visible rolleyes ! , went to wireless network 'Flight Mode' was correctly green 'ticked', undid. And got my signal back.cool
I also had to re-activate data network settings for my GPS to sort itself out.
The procedure worked for me, I can't say it'll work for everyone.
Click to expand...
Click to collapse

[Completed] move album to SD Card

I have screen captures and downloads on my phone that I want to move to my SD card.
When I mount the phone on my Linux computer, I see:
/run/user/1000/gvfs/mtp:host=%5Busb%3A010%2C018%5D$ ls -l
total 0
drwx------ 1 me me 0 Dec 31 1969 Card
drwx------ 1 me me 0 Dec 31 1969 Phone
I did: mkdir Card/DCIM/Screenshots and that worked.
cp -a Phone/Pictures/Screenshots Card/DCIM/Screenshots gives the error "Operation not supported".
I checked the permissions on all the directories in the path and they seem ok.
I tried to chmod to make everything writeable by everyone but that fails too.
I've tried to copy/move the files with a file manager on the phone but that fails too.
$ ls -l
total 0
dr-x------ 1 me me 0 Dec 31 1969 mtp:host=%5Busb%3A010%2C018%5D
$ chmod o+w *
chmod: changing permissions of 'mtp:host=%5Busb%3A010%2C018%5D': Operation not supported
bjlockie said:
I have screen captures and downloads on my phone that I want to move to my SD card.
When I mount the phone on my Linux computer, I see:
/run/user/1000/gvfs/mtp:host=%5Busb%3A010%2C018%5D$ ls -l
total 0
drwx------ 1 me me 0 Dec 31 1969 Card
drwx------ 1 me me 0 Dec 31 1969 Phone
I did: mkdir Card/DCIM/Screenshots and that worked.
cp -a Phone/Pictures/Screenshots Card/DCIM/Screenshots gives the error "Operation not supported".
I checked the permissions on all the directories in the path and they seem ok.
I tried to chmod to make everything writeable by everyone but that fails too.
I've tried to copy/move the files with a file manager on the phone but that fails too.
$ ls -l
total 0
dr-x------ 1 me me 0 Dec 31 1969 mtp:host=%5Busb%3A010%2C018%5D
$ chmod o+w *
chmod: changing permissions of 'mtp:host=%5Busb%3A010%2C018%5D': Operation not supported
Click to expand...
Click to collapse
Hi,
Try this:
Code:
/run/user/1000/gvfs/mtp:host=%5Busb%3A010%2C018%5D$ cp -R Phone/Pictures/Screenshots $HOME/Card/DCIM/Screenshots
I might have your file paths wrong but the logic should work.

oneplus7 pro ro.secure=0 not working

Hi All
two days ago I rooted my LAB Onepluse 7 pro , after that we succeed to connect trough ADB shell .
to connected as like as root (sudo ) we re edited the build.prop (ro.secure=0 and ro.debuggable=1 ) but after changing the ro.secure to 0 we failed to connect at all via adb ( adb devices not showing the phone ) and if we are setting only the
ro.debuggable=1 we are able to do adb shell but if we are trying to do adb root we are losing the adb connectivity .
First i suggest u to install TWRP through fastboot. And interact with it. Also check Magisk utility for better ROOT contol.
Before the build.prop was modified
jimmy123322 said:
First i suggest u to install TWRP through fastboot. And interact with it. Also check Magisk utility for better ROOT contol.
Click to expand...
Click to collapse
First the mobile was rooted with
twrp - 3.4.0.0 img , twrp-3.4.0.0 installer and Magisk-v20.4
After that i used prop editor to allowing the su root access
but unfortunately I able to access only to the shell with no option to access like adb root
and when the ro.secure is modified to 0 there is no option to access via ADB at all .
can you please be more accurate what to do.
Someone can answer
I'm quite new and have to know what to do
[email protected] said:
I'm quite new and have to know what to do
Click to expand...
Click to collapse
Try an earlier version of twrp
how to executing files via shell
last week i've asked about adb root but i didn't succeed to solve it .
means ro.secure=0 is still blocking my adb shell or adb root.
my question now is that we are trying to running iperf via the shell and not via the vysor.
but we are rejecting because permission deny.
drwxr-xr-x 3 root root 60 1970-04-21 23:37 vendor
1|OnePlus7Pro:/mnt $ ./ipef
/system/bin/sh: ./ipef: inaccessible or not found
127|OnePlus7Pro:/mnt $ ./iperf
/system/bin/sh: ./iperf: can't execute: Permission denied
126|OnePlus7Pro:/mnt $ ./iperf
/system/bin/sh: ./iperf: can't execute: Permission denied
126|OnePlus7Pro:/mnt $ ls -lrt
ls: ./media_rw: Permission denied
ls: ./asec: Permission denied
ls: ./product: Permission denied
total 168
drwxr-xr-x 3 root root 60 1970-04-21 23:37 user
drwx------ 3 root root 60 1970-04-21 23:37 secure
drwxr-xr-x 2 root system 40 1970-04-21 23:37 obb
drwxrwx--x 2 system system 40 1970-04-21 23:37 expand
lrwxrwxrwx 1 root root 21 1970-04-21 23:37 sdcard -> /storage/self/primary
drwx------ 6 root root 120 1970-04-21 23:37 runtime
drwx--x--x 2 root root 40 1970-04-21 23:37 appfuse
drwxr-xr-x 3 root root 60 1970-04-21 23:37 vendor
-rwxr-xr-x 1 root root 170480 2020-07-14 11:06 iperf
1|OnePlus7Pro:/mnt $ cd user
OnePlus7Pro:/mnt/user $ ls
0
OnePlus7Pro:/mnt/user $ cd ..
OnePlus7Pro:/mnt $ cp iperf /mnt/user/
cp: /mnt/user//iperf: Permission denied
1|OnePlus7Pro:/mnt $ cp iperf /mnt/user/
cp: /mnt/user//iperf: Permission denied
1|OnePlus7Pro:/mnt $
1|OnePlus7Pro:/mnt $
1|OnePlus7Pro:/mnt $
1|OnePlus7Pro:/mnt $
1|OnePlus7Pro:/mnt $
1|OnePlus7Pro:/mnt $
1|OnePlus7Pro:/mnt $
1|OnePlus7Pro:/mnt $
1|OnePlus7Pro:/mnt $ exit
MacBook-Pro-de-Victor-2latform-tools root#
MacBook-Pro-de-Victor-2latform-tools root#
MacBook-Pro-de-Victor-2latform-tools root# ./adb shell /data/iperf -h
/system/bin/sh: /data/iperf: can't execute: Permission denied
MacBook-Pro-de-Victor-2latform-tools root#
replaying to my self
Have use x-plore app to changing /data/app permission then iperf file was copied to this folder
1|OnePlus7Pro:/bin $
1|OnePlus7Pro:/bin $ cd /data/app
OnePlus7Pro:/data/app $ ./iperf -h
Usage: iperf [-s|-c host] [options]
iperf [-h|--help] [-v|--version]
Client/Server:
-f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes
-i, --interval # seconds between periodic bandwidth reports
-l, --len #[KM] length of buffer to read or write (default 8 KB)
-m, --print_mss print TCP maximum segment size (MTU - TCP/IP header)
-o, --output <filename> output the report or error message to this specified file
-p, --port # server port to listen on/connect to
-u, --udp use UDP rather than TCP
-w, --window #[KM] TCP window size (socket buffer size)
-B, --bind <host> bind to <host>, an interface or multicast address
-C, --compatibility for use with older versions does not sent extra msgs
-M, --mss # set TCP maximum segment size (MTU - 40 bytes)
-N, --nodelay set TCP no delay, disabling Nagle's Algorithm
-V, --IPv6Version Set the domain to IPv6
Server specific:
-s, --server run in server mode
-U, --single_udp run in single threaded UDP mode
-D, --daemon run the server as a daemon
Client specific:
-b, --bandwidth #[KM] for UDP, bandwidth to send at in bits/sec
(default 1 Mbit/sec, implies -u)
-c, --client <host> run in client mode, connecting to <host>
-d, --dualtest Do a bidirectional test simultaneously
-n, --num #[KM] number of bytes to transmit (instead of -t)
-r, --tradeoff Do a bidirectional test individually
-t, --time # time in seconds to transmit for (default 10 secs)
-F, --fileinput <name> input the data to be transmitted from a file
-I, --stdin input the data to be transmitted from stdin
-L, --listenport # port to receive bidirectional tests back on
-P, --parallel # number of parallel client threads to run
-T, --ttl # time-to-live, for multicast (default 1)
-Z, --linux-congestion <algo> set TCP congestion control algorithm (Linux only)
Miscellaneous:
-x, --reportexclude [CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports
-y, --reportstyle C report as a Comma-Separated Values
-h, --help print this message and quit
-v, --version print version information and quit
[KM] Indicates options that support a K or M suffix for kilo- or mega-
The TCP window size option can be set by the environment variable
TCP_WINDOW_SIZE. Most other options can be set by an environment variable
IPERF_<long option name>, such as IPERF_BANDWIDTH.
Report bugs to <[email protected]>
1|OnePlus7Pro:/data/app $

Categories

Resources