Open Vpn - Optimus One, P500, V Themes and Apps

How to use Open Vpn
Mahesh

mvgadagi said:
How to use Open Vpn
Mahesh
Click to expand...
Click to collapse
Here you go :http://tinyurl.com/4476rrj

I already have openVPN working in froyo and gingerbread on a i7500, see here: androidforums.com/samsung-i7500/330288-openvpn-gaosp-beta3-i7500.html
Basically you need to copy the key files to a folder, execute some commands from the terminal emulator, and use the "openvpn settings" app to enable it.
Unfortunately, the commands have to be modified for the O1 gingerbread rom.
Anyone help?
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
ln /system/bin/ifconfig /system/xbin/ifconfig
ln /system/bin/route /system/xbin/route

thanks brownsmell for information

Related

Adding and removing apps from ROMs

I wasnt sure and couldnt find this anywhere but, I was looking through a zip folder of a rom and noticed the apk folder. Am I able to delete different apk's and add apps as well? And If I delete the browser apk can I add dolphin browser to work as my default browser?
Thanks in advance
I´m interested in this too.
I guess that the main problem will be to sign the new zip file once added or removed the apps
Yes, but it won't do you any good unless you also do something else. Ask the same question again in the right section, and I'm sure someone will tell you what it is. I'm not going to here, though. Not to be a jerk or anything, but we can't answer questions here, as posting these question threads clutters the dev section. Besides, you can't get a very good answer here anyway--a mod will lock this thread soon. If you want answers, you have to ask in the Q&A section.
carnegie0107 said:
Yes, but it won't do you any good unless you also do something else. Ask the same question again in the right section, and I'm sure someone will tell you what it is. I'm not going to here, though. Not to be a jerk or anything, but we can't answer questions here, as posting these question threads clutters the dev section. Besides, you can't get a very good answer here anyway--a mod will lock this thread soon. If you want answers, you have to ask in the Q&A section.
Click to expand...
Click to collapse
Thanks. I just figured since it was kinda about a rom it would be okay. But yeah you are right
Yeah, but you know how some people are.
You can remove unused/uneeded files by using a Root Manager. Deleting the apk file associated with the particular program you don't want works for me. Make sure you do a Nandroid backup in case you delete something you really needed. Don't for instance delete your virtual keyboard if you only have one.. you will be faced with forced closes.
just push or pull the application through the adb that you want to add or remove from the rom
Amazon MP3 app
I'd love to ditch the US-only Amazon MP3 app from ROMs. Can't uninstall it. Probably need to SU to where it lives & delete it.
linuxluver said:
I'd love to ditch the US-only Amazon MP3 app from ROMs. Can't uninstall it. Probably need to SU to where it lives & delete it.
Click to expand...
Click to collapse
There are instructions on how to and what app you are able to delete without it becoming unstable over at http://wiki.cyanogenmod.com/index.php/Barebones.
Use ADB.
Or Terminal:
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd system/app
rm -r appname.apk
rm -r appname.opex
E.g. appname = com.amazon.mp3
ID# said:
Use ADB.
Or Terminal:
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd system/app
rm -r appname.apk
rm -r appname.opex
E.g. appname = com.amazon.mp3
Click to expand...
Click to collapse
Simply deleting the apk files will leave the data directories, and entries in packages.xml. Someone suggest command [pm uninstall XXXXX], but I cannot get it work.
ID# said:
Use ADB.
Or Terminal:
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd system/app
rm -r appname.apk
rm -r appname.opex
E.g. appname = com.amazon.mp3
Click to expand...
Click to collapse
This, OP use this and next time use QnA for your questions
Help?
Whats the instructions to install apk? Yours shows how to install. I have SuperD and need intstall the IM.apk Thanks 8)
ID# said:
Use ADB.
Or Terminal:
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd system/app
rm -r appname.apk
rm -r appname.opex
E.g. appname = com.amazon.mp3
Click to expand...
Click to collapse
install over ADB
adb install <filename>
deafptl4ever said:
Whats the instructions to install apk? Yours shows how to install. I have SuperD and need intstall the IM.apk Thanks 8)
Click to expand...
Click to collapse
You would be smarter to leave it out, he did it since that app ate alot of ram.
Goto the market and get one of the free im apps instead.The tmo version has no feats like custom mess and stuff
ID# said:
Use ADB.
Or Terminal:
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd system/app
rm -r appname.apk
rm -r appname.opex
E.g. appname = com.amazon.mp3
Click to expand...
Click to collapse
I finally find the proper way to uninstall the system apps.
Step #1 - Find the package names of the apps (e.g. IM.apk=com.android.im)
In console, type
su
pm list packages -f
Step #2 - Delete the apk files from /system/app
In console, type
su
mount -o remount,rw /system
rm /system/app/IM.apk
Step #3 - Uninstall the package
In console, type
su
pm uninstall com.android.im

Why 'adb remount' failed on a Rooted neuxs one

Hi,
I have rooted my Nexus one. I can do "'adb shell and then 'su' under the shell"
But on my MacOS Desktop, when I execute 'adb remount', it still said
$ adb remount
remount failed: Operation not permitted
Click to expand...
Click to collapse
Can anyone please help me resolve this?
Thank you.
[size=+4]DO *NOT* POST QUESTIONS IN THIS FORUM - only tips/info/etc.[/size]
Right at the top. Why does this have to be repeated on a daily basis?
Can you please move my thread to the right forum? I can't find a way to do it.
Anyhow, to answer you question... you "adb remount" is disabled in production releases... just rooting does not allow this.
You need a modified boot image where ro.secure=0 in default.props, instead of ro.secure=1. The ro.secure flag in the boot image indicates whether the root filesystem can be remounted as read/write... 0 indicated it can be... 1 indicated it cannot be.
If ro.secure=0, this is referred to as insecure boot.
Most custom ROMs have this by default... some rooted stock ROMs do not have this...
Will the Modified GRI40 (2.3.3 Gingerbread) ROM from this
http:// forum.xda-developers.com/showthread.php?t=968396
Does what I need? Thanks.
Or you can also use these commands to mount and unmount the system partition as writable:
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
mount -o remount,ro /dev/block/mtdblock3 /system
Thank you. That seems to be an easier solution for me.
But after I did
$ adb shell
$ su
# mount -o remount,rw /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
I go to another shell and i did
adb push sqlite3 /system
failed to copy 'sqlite3' to '/system/sqlite3': Read-only file system
$ adb push sqlite3 /system/bin
failed to copy 'sqlite3' to '/system/bin/sqlite3': Permission denied
Click to expand...
Click to collapse
It still does not let me push 'sqlite3' to /system or /system/bin
That is what I need.
Thank you for any more pointers.
hap497 said:
Thank you. That seems to be an easier solution for me.
But after I did
I go to another shell and i did
It still does not let me push 'sqlite3' to /system or /system/bin
That is what I need.
Thank you for any more pointers.
Click to expand...
Click to collapse
Don't try to combine adb commands with shell commands.
Copy/move/push the file to your sdcard first.
Then open a root shell, mount it as rw, then copy the file from your sdcard to the directory you want.
Thanks. but I get 'failed on '/sdcard/sqlite3' - Cross-device link'
$ su
# mount -o remount,rw /dev/block/mtdblock3 /system
# mv /sdcard/sqlite3 /system/
failed on '/sdcard/sqlite3' - Cross-device link
# ls -l /sdcard/sqlite3
----rwxr-x system sdcard_rw 24120 2010-10-16 22:04 sqlite3
Click to expand...
Click to collapse
and i have tried:
# mv /mnt/sdcard/sqlite3 /system/bin/
failed on '/mnt/sdcard/sqlite3' - Cross-device link
# ls -l /mnt/sdcard/sqlite3
----rwxr-x system sdcard_rw 24120 2010-10-16 22:04 sqlite3
Click to expand...
Click to collapse
I get the 'sqlite3' from SuperOneClickv1.7-ShortFuse.zip.
Wholly crap, don't use the mv command! Bad idea!!! mv does not move the data, it moves the hardlink to the data! Thank your lucky stars mv wouldn't let you do it.
Use cp instead. cp will actually copy the data to where you're going.
Thank you. But I don't have 'cp' in my adb shell.
# cp
cp: not found
# /system/bin/cp
/system/bin/cp: not found
Click to expand...
Click to collapse
From here:
http://android-tricks.blogspot.com/2009/02/cp-on-android.html
I use 'cat' command to move to /system/bin
How do you have mv but not cp? Do you not have BusyBox installed?
No. I just need to search 'BusyBox' on Android market and install it? That is?
hap497 said:
Thank you. But I don't have 'cp' in my adb shell.
From here:
http://android-tricks.blogspot.com/2009/02/cp-on-android.html
I use 'cat' command to move to /system/bin
Click to expand...
Click to collapse
The cat command will work fine, no busybox needed: cat source_file > dest_file
efrant said:
The cat command will work fine, no busybox needed: cat source_file > dest_file
Click to expand...
Click to collapse
Woah there partner. Cat shouldn't be used on binary files, only ascii files. While it might work fine, it is not the recommended practice and really should not be done.
OP, Yes, BusyBox can be installed from the market.
GldRush98 said:
Woah there partner. Cat shouldn't be used on binary files, only ascii files. While it might work fine, it is not the recommended practice and really should not be done.
Click to expand...
Click to collapse
Really? I was unaware of that. It worked every time I used it.
efrant said:
Really? I was unaware of that. It worked every time I used it.
Click to expand...
Click to collapse
On standard Unix/Linux/etc. systems, cat works fine for binary files. It's only under DOS that cat or type shouldn't be used for binaries.
back in my ADB days.. itd say remount failed or w.e but i could still access my phone..
but i dont know.. ever since i switched to linux i stopped using ADB.. hahah

[Q] how to get -RW rights at system map

How can I change -r rights into -rw rights for my system. I only have -rw rights for my SD-card now. I want it to for my intern system so I can change some apks
I use AstroFile manager
ARC is rooted, Busybox/Titanium back-up installed en worked well.
Kind regards
Vintiem
Buy root-explorer from market.
Sent from my LT15i using XDA Premium App
I don't have a credit card so Rootexplorer isn't an option unfortunately.
No other way/free app that can give the -rw rights I need?
Kind regards,
Vintiem
The command for setting rw rights to /system is:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
I use ADB but if you're not comfortable with command lines you could use a Terminal app on the phone to run the command and then use a file manager for the file operations.
Got -rw rights. Thanks
get ''super manager'' from the market, it works like file explorer but its free.
Vintiem said:
Got -rw rights. Thanks
Click to expand...
Click to collapse
I believe 'adb remount' works as well
Terminal emulator should also be possible, but you've got to have busybox installed than.
mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
Oh, wait, that was mentioned before
get yaffs explorer from the market its free and better then root explorer
Thijs96 said:
I believe 'adb remount' works as well
Click to expand...
Click to collapse
no it does not because the default.prop has not been edited as it is part of the boot.img...

Need help on userinit script.

I want a script that will rename a /system/app on boot in userinit (.d or.sh) in /data/local. This is my first script and was thrilled when I was able to get it to work in SManager. I copied the script to /data/local and renamed to userinit.d. Rebooted, checked the file, not renamed. More research, tried various ways, which also work in SManager, but not as a userinit script. I have included the three ways I have tried with attempt counts and used # on two of them. I didn't use these all at once but included them so you could see what I've tried including a delay o allow time for the "mount" to work. This doesn't work in SManager in boot mode. And returns that it cannot rename because it is ro.
Code:
#!/system/bin/sh
#
#Renames DSPManager.apk to DSPManager.apk.bak
#export PATH=${PATH};/system/bin;/system/xbin
FN=/system/app/DSPManager.apk
if (FN.exists())
then
# attempt one
#busybox mount -o remount,ro -t ext4 /dev/block/mmcblk0p5 /system
# attempt two
#busybox mount -o remount,rw / 2>/dev/null
#busybox mount -o remount,rw rootfs 2>/dev/null
#busybox mount -o remount,rw /system 2>/dev/null
# attempt three
busybox mount -o remount,rw /system
#thread.wait(3000)
mv $FN $FN.bak
busybox mount -o remount,ro /system
#thread.wait(3000)
#
#busybox mount -o remount,ro -t ext4 /dev/block/mmcblk0p5 /system
#
#busybox mount -o remount,ro / 2>/dev/null
#busybox mount -o remount,ro rootfs 2>/dev/null
#busybox mount -o remount,ro /system 2>/dev/null
fi
Maybe I'm trying more than the userinit is supposed to do. I want this to survive and do its thing after Nightly updates. I use Speaker boost for volume and don't want DSPmanager taking extra memory.
Two things, first make sure you are using a root file manager and have set the directory to rw. Second, if you want the file to execute in /data/local you must name it userinit.sh and set the permissions of the file for execute. Or you can create a folder named userinit.d in /data/local and put multiple script files in that folder. Each script file must have its permission set to execute. To understand this, look at the contents of /etc/init.d/90userint.
Sent from my BN NookHD+ using XDA Premium HD app
leapinlar said:
Two things, first make sure you are using a root file manager and have set the directory to rw. Second, if you want the file to execute in /data/local you must name it userinit.sh and set the permissions of the file for execute. Or you can create a folder named userinit.d in /data/local and put multiple script files in that folder. Each script file must have its permission set to execute. To understand this, look at the contents of /etc/init.d/90userint.
Sent from my BN NookHD+ using XDA Premium HD app
Click to expand...
Click to collapse
I have the file permissions set to rwxr-xr-x (755) as well as the folder userinit.d set to the same. I have been using either Speed software's Root explorer (prefered) or Jrummy's Root Browser. I have named the script in the userinit.d folder "90RnamDSP". Again I can run the script in the root browser as a script and it renames the file. After set the file name back to the .apk I reboot, check in the /system/app and the file is not renamed. I have given the specific script I am using in the userinit.d folder.
Code:
#!/system/bin/sh
#
#Renames DSPManager.apk to DSPManager.apk.bak
path=/system/bin:/system/xbin;
FN=/system/app/DSPManager.apk;
if [ -e $fn];
then
busybox mount -o remount,rw -t /dev/block/mmcblk0p5 /system;
sleep 5;
mv $FN $FN.bak;
busybox mount -o remount,ro -t /dev/block/mmcblk0p5 /system;
fi;
You have the mount commands wrong for a userinit script. It should be:
mount -o remount,rw /system
and
mount -o remount,ro /system
And you don't need the path statement. You don't need the busybox in front of mount either. And shouldn't $fn be capitalized in the if statement?
Sent from my BN NookHD+ using XDA Premium HD app
Yippee, Yahoo, it works
leapinlar said:
You have the mount commands wrong for a userinit script. It should be:
mount -o remount,rw /system
and
mount -o remount,ro /system
And you don't need the path statement. You don't need the busybox in front of mount either. And shouldn't $fn be capitalized in the if statement?
Sent from my BN NookHD+ using XDA Premium HD app
Click to expand...
Click to collapse
Thanks for your help and patience. Didn't need the sleep either. I will be posting this on my help post noted in my signature below. I will give you thanks there as well. Couple of final questions.
Can you recommend a how to script reference ie: init script for dummies?
Can you recommend a how to make an install zip and install script, (again for the untrained)?
I have included the final code to maybe help someone trying to do something similar.
Code:
#!/system/bin/sh
#
#Renames DSPManager.apk to DSPManager.apk.bak
FN=/system/app/DSPManager.apk;
if [ -e $FN ];
then
mount -o remount,rw /system;
mv $FN $FN.bak;
mount -o remount,ro /system;
fi;
pastordl said:
Thanks for your help and patience. Didn't need the sleep either. I will be posting this on my help post noted in my signature below. I will give you thanks there as well. Couple of final questions.
Can you recommend a how to script reference ie: init script for dummies?
Can you recommend a how to make an install zip and install script, (again for the untrained)?
I have included the final code to maybe help someone trying to do something similar.
Code:
#!/system/bin/sh
#
#Renames DSPManager.apk to DSPManager.apk.bak
FN=/system/app/DSPManager.apk;
if [ -e $FN ];
then
mount -o remount,rw /system;
mv $FN $FN.bak;
mount -o remount,ro /system;
fi;
Click to expand...
Click to collapse
I don't know of any how-to's for those topics. I learned by studying examples of how others did them.
Sent from my SCH-i705 using Tapatalk
leapinlar said:
I don't know of any how-to's for those topics. I learned by studying examples of how others did them.
Sent from my SCH-i705 using Tapatalk
Click to expand...
Click to collapse
Thank you again. This script and a second one that adds the folder and the script are available at this post.
http://forum.xda-developers.com/showpost.php?p=50795653&postcount=6
I was able to make and debug the installer in a couple of hours. I thanked you in the post also.
The post is part of the help/info/reference post that I asked your permission to list your help files on.

Unable to mount System as rw in 7.1.1 DP

I am trying to create an overlay folder under /system/vendor so that I can throw a layers apk there to hide the nav bar. I am currently using the build.prop method which doesn't work nicely with the Now on Tap action of Swipe Navigation which is what I am ultimately trying to fix.
I tried using Solid Explorer to simply create the new directory like I did previously in 7.0 and 6.x but was unable to do so (action failed). I decided to try using the terminal and create the folder and move files from there but got the message that the system was read-only. I then attempted to mount system a few different ways all of which failed. I did use su before entering these commands.
Code:
angler:/system/vendor $ mkdir overlay
mkdir: 'overlay': Read-only file system
angler:/system/vendor $ mount -o rw,remount,rw /system
mount: '/dev/block/platform/soc.0/f9824900.sdhci/by-name/system' not user mountable in fstab
angler:/system/vendor $ /system/bin/mount -o rw,remount,rw /system /system
mount: '/system' not in /proc/mounts
angler:/system/vendor $ /system/bin/mount /system
mount: bad /etc/fstab: No such file or directory
Googling around didn't yield much in the way of solutions other than these different methods of mounting system. Am I just unable to mount system as rw in 7.1.1 currently, and if so, is there another way to accomplish what I want?
I'm trying to find thread I read this from, so if I find it I'll post link to it. When I was on early 7 previews that was set up with systemless root I went into twrp and then went to terminal and typed the following, touch su. When your in terminal cd to both bin and xbin and type command "touch su" without quotes. Then reboot and you should be able to use something like es file explorer to get into and write in /system. Hope that helps.
Found it, look to post = 15
http://forum.xda-developers.com/nexus-6p/help/es-file-explorer-doesnt-understand-t3242775
Unfortunately that did not end up working for me, thanks for looking up the link for me though!
On Nougat the rw mount command should be typed like this:
mount -o rw,remount /system
then for touch:
touch sbin/su
Thank you blitz for clarifying.
Hmm... it seems like the mount worked but the touch did not. I ended up using just "touch su" but ran into a different error with mkdir. I think I may just be out of luck for now. Thank you both for your help!
Code:
~ # mount -o rw,remount /system
~ # cd /system/bin
/system/bin # touch sbin/su
touch: sbin/su: No such file or directory
/system/bin # touch su
/system/bin # cd /system/xbin
/system/xbin # touch su
/system/xbin # cd /system/vendor
/vendor # mkdir overlay
mkdir: cannot create directory 'overlay': No space left on device
AbuShabanov said:
Hmm... it seems like the mount worked but the touch did not. I ended up using just "touch su" but ran into a different error with mkdir. I think I may just be out of luck for now. Thank you both for your help!
Code:
~ # mount -o rw,remount /system
~ # cd /system/bin
/system/bin # touch sbin/su
touch: sbin/su: No such file or directory
/system/bin # touch su
/system/bin # cd /system/xbin
/system/xbin # touch su
/system/xbin # cd /system/vendor
/vendor # mkdir overlay
mkdir: cannot create directory 'overlay': No space left on device
Click to expand...
Click to collapse
I'm not sure what you're trying to accomplish but still:
The touch sbin/su means creating an empty file called su in the sbin subdirectory under the current directory. So if there is no subdir named sbin under /system/bin, then it's not going to work
Secondly, you should know about the ls command: ls -la lists the files in the current directory, and remember than in unix and linux terminology, a directory is also a file so you'll also see directories (including current "." and parent "..")
Third, you should know about the df command which shows filesystem disk space usage. df -h will show you how much free space you have an all of your filesystems, including system.
Last, with great power comes great responsibilities. Running the wrong command as root will easily make your system unusable.
I have substratum installed and inside /system/vendor there is a link (again a file) called overlay which links to directory /system/overlay where apks are.
rchtk said:
I'm not sure what you're trying to accomplish
Click to expand...
Click to collapse
I am trying to create an overlay folder under /system/vendor so that I can throw a layers apk there to hide the nav bar.
rchtk said:
I have substratum installed and inside /system/vendor there is a link (again a file) called overlay which links to directory /system/overlay where apks are.
Click to expand...
Click to collapse
Are you on the 7.1.1 (NPF10C)? If so it sounds like you have accomplished what I am trying to do. I'm only familiar with the basic unix commands as I haven't actively used it in about 5 years. Would you mind sharing how to create the link to /system/overlay from /system/vendor, or does Substratum take care of that? Offhand it sounds like a symbolic link but my terminology is pretty rusty.
AbuShabanov said:
I am trying to create an overlay folder under /system/vendor so that I can throw a layers apk there to hide the nav bar.
Are you on the 7.1.1 (NPF10C)? If so it sounds like you have accomplished what I am trying to do. I'm only familiar with the basic unix commands as I haven't actively used it in about 5 years. Would you mind sharing how to create the link to /system/overlay from /system/vendor, or does Substratum take care of that? Offhand it sounds like a symbolic link but my terminology is pretty rusty.
Click to expand...
Click to collapse
Yes 7.1.1.
Substratum created the overlay directory and the link to it.
Manually that would be:
mount -o rw,remount -t auto /vendor
mount -o rw,remount -t auto /system
mkdir /system/overlay
cd /system/vendor
ln -s /system/overlay
mount -o ro,remount -t auto /vendor
mount -o ro,remount -t auto /system
But links do take a very small amount of bytes (roughly name and target) so for that, you'll need some space in your vendor partition (no space left on /vendor). check with "df".
I have 3.8MB free (that's an original vendor + overlay link)
rchtk said:
mount -o rw,remount -t auto /vendor
mount -o rw,remount -t auto /system
mkdir /system/overlay
cd /system/vendor
ln -s /system/overlay
mount -o ro,remount -t auto /vendor
mount -o ro,remount -t auto /system
Click to expand...
Click to collapse
Well, this works and I was able to mount system and vendor, create the link, move the apk file, etc but it appears that the apk itself is not working on NPF10C. Thank you for your help and the refresher on the unix commands!

Categories

Resources