kiah2008 / android-openvpn-installer

Automatically exported from code.google.com/p/android-openvpn-installer
0 stars 0 forks source link

/system rw remount fails on Android 4.3 #23

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This is a known "problem" with 4.3. While remounting the /system partition in 
rw mode actually works, it only shows it for the user that did the mount 
command, root here. So reading /proc/mounts as normal user will not show 
/system as rw, and the test fails

The attached patch works around this problem by reading it via "su -c cat 
/proc/mounts", working fine here :)

Original issue reported on code.google.com by bcafa...@gmail.com on 28 Aug 2013 at 7:03

Attachments:

GoogleCodeExporter commented 8 years ago
I am affected too! Thanks for the patch!

Original comment by jjjja...@gmail.com on 28 Aug 2013 at 8:15

GoogleCodeExporter commented 8 years ago
Hi! just tried your patch and get a force close with nullptr exception.

running "su -c cat /proc/mounts" returns an error only. "cat /proc/mounts" 
returns all mountpoints.

however, changing the line to
Process p = Runtime.getRuntime().exec(new String[] {"cat", "/proc/mounts"});
helps in the way that we do not see any error message any more, but the binary 
is still not installed... unfortunately.

Original comment by jjjja...@gmail.com on 28 Aug 2013 at 8:52

GoogleCodeExporter commented 8 years ago
Yes, it does require to run as root user, strange that this command does not 
work for you though. What is the error? And in a terminal or adb shell?

It could also be caused by a supersu refused permission

Original comment by bcafa...@gmail.com on 28 Aug 2013 at 10:11

GoogleCodeExporter commented 8 years ago
I ran
su -c cat /proc/mount 
from both, adb shell and terminal emulator and both times I get "Unknown id: 
/proc/mount"
So it might be indeed an issue with superuser... I am using 
https://play.google.com/store/apps/details?id=com.koushikdutta.superuser as it 
is open source.

Original comment by jjjja...@gmail.com on 29 Aug 2013 at 8:35

GoogleCodeExporter commented 8 years ago
SuperSU here (Asus TF101 with Katkiss 4.3 rom), but superuser should handle it 
as well.

Maybe some additional quoting could help there, can you try:
su -c "cat /proc/mounts"
(though it does not seem to be needed for previous "su -c" command to remount 
/system)

Original comment by bcafa...@gmail.com on 30 Aug 2013 at 12:22

GoogleCodeExporter commented 8 years ago
it indeed works running su -c "cat /proc/mounts" !

However, how do I modify the patch now to get the installer working again?!
Thanks for your help.

Original comment by jjjja...@gmail.com on 30 Aug 2013 at 3:11

GoogleCodeExporter commented 8 years ago
The equivalent to these quotes in shell is to keep the content in a single 
string (my first patch was indeed incorrect on that)
So it's 'String[] {"su", "-c", "cat /proc/mounts"}' and not 'String[] {"su", 
"-c", "cat" "/proc/mounts"}'

Updated patch attached, this one should work!

Original comment by bcafa...@gmail.com on 30 Aug 2013 at 6:21

Attachments:

GoogleCodeExporter commented 8 years ago
I successfully built and used the app with your new patch! well done! 
@friedrich.schaeuffelhut please fix this bug asap!
Thanks a lot,
Stefan

Original comment by jjjja...@gmail.com on 30 Aug 2013 at 7:46

GoogleCodeExporter commented 8 years ago
In the meantime could anyone be so kind and share a compiled apk containing the 
patch please? Just saves me having to try set up a build environment and learn 
how to compile java code :) Thank you. 

Original comment by axll...@gmail.com on 16 Sep 2013 at 9:45

GoogleCodeExporter commented 8 years ago
Here's my debug build, just be sure to uninstall the official version first as 
the keys will not match

Original comment by bcafa...@gmail.com on 18 Sep 2013 at 4:49

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you so much, tested and works! Really appreciated. 

Original comment by axll...@gmail.com on 18 Sep 2013 at 7:13

GoogleCodeExporter commented 8 years ago
easier way is to use root explorer.. than locate then search for busybox then 
find system/xbin/busybox then rename it to system/xbin/openvpn..

Original comment by amattapa...@gmail.com on 20 Oct 2013 at 4:26

GoogleCodeExporter commented 8 years ago
I've just tried OpenVPNInstaller-debug.apk and it works like a charm.
I'll wait for patch merged into main app.

Thank you.

Original comment by ma...@marcogiorgetti.com on 20 Oct 2013 at 9:27

GoogleCodeExporter commented 8 years ago
I try with openvpn-debug.apk and work fine with s4 4.3 with only root
Thanks

Original comment by maurizio...@gmail.com on 1 Dec 2013 at 12:59

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
great job for #10 bcafa...@gmail.com
realy fast and easy
thank you

Original comment by praf...@gmail.com on 17 Dec 2013 at 10:50

GoogleCodeExporter commented 8 years ago
I want to cry and say all my thanks to comment #10 for solving in two seconds 
all my vpn problems ( ifconfig fatal error ) for my n7100 with android 4.3 
(omega roma).

Thanks

Original comment by d.nas...@gmail.com on 25 Feb 2014 at 7:31

GoogleCodeExporter commented 8 years ago
Thank very much
Patch works fine with 4.4.2 also.

Original comment by david.du...@gmail.com on 4 May 2014 at 8:39

GoogleCodeExporter commented 8 years ago
openvpn-debug.apk did the trick!!

Thanks a lot

Original comment by ibarco.s...@gmail.com on 14 May 2014 at 8:57

GoogleCodeExporter commented 8 years ago
thanks a lot

Original comment by coc...@gmail.com on 7 Jun 2014 at 2:17

GoogleCodeExporter commented 8 years ago
.apk from #10 works just perfect (xperia T omni 4.4.3), thx a lot!

Original comment by seibold....@gmail.com on 17 Jun 2014 at 7:38

GoogleCodeExporter commented 8 years ago
disculpen, cuales son los pasos para instalar???????????

Original comment by Wayne.Co...@gmail.com on 23 Jun 2014 at 5:48

GoogleCodeExporter commented 8 years ago
Debes descargar el archivo APK a tu equipo. Luego, con un gestor de archivos 
deberías ser capaz de ubicar e instalar el APK (activa la casilla de fuentes 
desconocidas en el apartado de seguridad).

Original comment by o...@oskr.cl on 26 Jun 2014 at 3:35

GoogleCodeExporter commented 8 years ago
Thanks #10, worked perfectly on my Nexus 5, 4.4.2!
Just wondering what's taking so long merging it into the original build.

Original comment by wischnew...@gmail.com on 7 Jul 2014 at 9:08

GoogleCodeExporter commented 8 years ago
2014-07-07 13:38 GMT+04:30 <android-openvpn-installer@googlecode.com>:

Original comment by hamidakhtarzand@gmail.com on 7 Jul 2014 at 3:15

GoogleCodeExporter commented 8 years ago
thanks  #10 bcafa...@gmail.com   !!!!

Original comment by janas.lu...@gmail.com on 13 Jul 2014 at 4:20

GoogleCodeExporter commented 8 years ago
many thx.  it works on my nexus 4 (4.4.4)

Original comment by tefeng...@gmail.com on 19 Jul 2014 at 2:27

GoogleCodeExporter commented 8 years ago
File it is not i stallable anymore :/

Original comment by oba...@gmail.com on 26 Sep 2014 at 3:14

GoogleCodeExporter commented 8 years ago
Many thanks #10 worked a charm galaxy s4 4.4.4

Original comment by mike.kiv...@finao.co.nz on 14 May 2015 at 9:12

GoogleCodeExporter commented 8 years ago
Thanks #10
Nexus 5 Android 5.1.1

Original comment by spider1...@gmail.com on 17 Jun 2015 at 7:17

GoogleCodeExporter commented 8 years ago
Thanks GitHup

Original comment by hamidakhtarzand@gmail.com on 18 Jun 2015 at 12:47