Autopatcher APG Permission denied Error - Android Q&A, Help & Troubleshooting

Hi,
I'm posting here and not in the original autopatcher thread since I don't have 20 posts yet.
Hopefully this will turn up if someone experiences sth. similar:
While trying to use ApG 2.6.0.2 in windows xp I got just got "permission denied" error while trying to patch the framework , although I was running APG in Administrator mode. I could resolve tthe issue as follows:
When the autopatcher commences to give you the permission denied error messages, press control c to interrupt it and get a shell. Then start the Apg Patcher anew and begin the patching process once again but now when everything is unpacked and the autopatcher wants to commence to patch, use your shell to set the directory permissions with "chmod -R 777 on the ApGPackages/ap/tmp-CURRENTDATE-FOLDER.
This resolved the issue for me.
I hope description was clear enough,
san4

Related

Java on Weptop Firefox

I finally managed to get java to work with firefox. I test out runescape and it works great on minimum graphics setting may be able set higher.
Im on 4.1.8.3 with full ubuntu mod. HAS NOT BEEN VERIFIED WITH AN UNMODDED WEBTOP
Here a little guide that I wrote. It should work
Basically
Google Java arm and click Java Embedded
Download ARMv7 Linux - Headful from there
Extract the ejre1.6.0_25 folder and move to phone
Copy the ejre1.6.0_25 folder to
/usr/lib/
Ingore this code if you are running from lxterminal
Code:
su
/usr/bin/sudo -u adas bash
In lxterminal or whatever terminal
Code:
sudo ln -s /usr/lib/ejre1.6.0_25/lib/arm/libnpjp2.so /usr/lib/firefox-addons/plugins/libnpjp2.so
sudo chmod 755 /usr/lib/ejre1.6.0_25/bin/java
sudo chmod 755 /usr/lib/ejre1.6.0_25/bin/java_vm
sudo chmod 755 /usr/lib/ejre1.6.0_25/bin/javaws
sudo chmod 755 /usr/lib/ejre1.6.0_25/bin/keytool
If you get "link failed File exists" run this. then run the ln command
Code:
sudo rm /usr/lib/firefox-addons/plugins/libnpjp2.so
You can also use root explorer to set permission for the files
Set to this:
read write execute
X --- X----- X
X ---------- X
X ---------- X
Then it should work
I attach a screenshot of runescape running
I'd like more information if you would regarding the installation of java as I am a diehard runescape fan myself. I've downloaded the Java embed but it was version _25 and not _21, not sure if it matters. And also, do I have to be rooted or not?
If you come pm me or reply here, that would be great.
I tried this and was able to get the plugin to load, but all I get is black boxes where the applets are. Any ideas? The java plugin shows under plugins. I'm using 1.6.0_25.
I'd like to know how you exactly got it to work? I cant get the lxterminal to run on my webtop, I'm really new and found out basically everything else but how to install the plugin. Thanks for the info.
And according to a thread on xda, cant remember which - the lxterminal was removed from the phone on the most recent update... so how would I get around that?
I did all the commands using Android Terminal Emulator from the Market.
Are you fully updated on your phone? as in 4.1.8.3
because ive tried more than once to get it to work. and no avail.
exactly what commands did you do anyway? because that could quite possibly solve my problems.
I'm on 4.1.83. I used the commands that are in the OP, changing out ejre-1.6.0_21 with ejre1.6.0_25 (which is the folder name for the version I downloaded). Make sure you do not have a folder in a folder. I never got it fully working, just black boxes on the web pages. The plugin does show to be installed though.
OHHHHHHHHHHHHHHHHH, thats why.
actually, nvm ... my files are in the exact location his are. >_<
Should I type the lines 1 at a time? I've been copy and pasting them all at once.
I did one at a time.
?.?
Ok this is my situation as of yet, I currently have rooted atrix, running newest version. I open terminal emulator from market, type in the first line "ln -s /usr/lib/ejre-1.6.0_25/lib/arm/libnpjp2.so /usr/lib/firefox-addons/plugins/libnpjp2.so" and it returns "link failed File exists, so im guessing i've already placed it into the plugins folder.
So far so good, now onto second line -
"chmod 755 /usr/lib/ejre-1.6.0_25/bin/java"
and my return being
-unable to chmod /usr/lib/ejre-1.6.0_25/bin/java: No such file or directory
I would type the rest but i'm sure they would return the same
My files are in the correct location /usr/lib/ejre-1.6.0_25/
any suggestions?
Well I have the full ubuntu mod on my phone. I have not test it doing it though anything other than lxterminal
If you see the plugin in firefox that is good. Im betting the permission are not set properly
you can use root explorer to set the permission on the files that are chmod. Make sure all check boxs under execute are selected.
Check what you copied to the phone and make sure you don't have two ejre-1.6.0_25 folders (one within the other) from when you extracted it.
I extracted it to my sd card then moved the folder, so my locations are exactly what he lists. nothing different aside from the _25 instead of _21 which i change in what I type. I just tried to allow permissions, lets see if this changes anything...*crosses fingers*
Edit: When I type the first line, I get
link failed Permission denied
Stephen Who said:
I extracted it to my sd card then moved the folder, so my locations are exactly what he lists. nothing different aside from the _25 instead of _21 which i change in what I type. I just tried to allow permissions, lets see if this changes anything...*crosses fingers*
Edit: When I type the first line, I get
link failed Permission denied
Click to expand...
Click to collapse
Do you have root?
I have root, plugin shows in firefox, permissions are correct, but all applets just show as a black box. I'm running stock. Do you think it only works with the ubunto mod?
Ok I edited the OP so the commands can be run from android terminal or adb.
Im not sure why it doesnt work for you must be the full ubuntu mod.
I might try downloading a new version of java see if it works
Update
I tried the the 25 version and it worked. I updated the commands. I was able to get it to work using adb.
password for adas:?
edit: and yes, I'm rooted. It's asking for a password when I type the second command line. :|

[Q] CASUAL root problem but cant post in the forum

because i am new to this xda i cant post in the right forum so hopefully this will be moved to the CASUAL one-click installation forum.
anyways, i meet all the requirements and when i try to root i get the following:
--- STARTING ----
--- WAITING FOR DEVICE
--- pushing mempodroidfailed to copy '/var/folders/Go/GoqTDoCkHMGrBt8xp6Xh1U+++TI/-Tmp-/TempCASUAL2AF73298/Root With RootICSRAZR/mempodroid' to '/data/local/mempodroid': Permission denied
--- pushing sufailed to copy '/var/folders/Go/GoqTDoCkHMGrBt8xp6Xh1U+++TI/-Tmp-/TempCASUAL2AF73298/Root With RootICSRAZR/su' to '/data/local/su': Permission denied
--- pushing scriptfailed to copy '/var/folders/Go/GoqTDoCkHMGrBt8xp6Xh1U+++TI/-Tmp-/TempCASUAL2AF73298/Root With RootICSRAZR/root.sh' to '/data/local/root.sh': Permission denied
--- correcting permissionsUnable to chmod /data/local/mempodroid: No such file or directory
"--- executing mempodroid and script/system/bin/sh: /data/local/mempodroid: not found
"--- Installing Superuser.ap pkg: /data/local/tmp/Superuser.apk
Success
2436 KB/s (843503 bytes in 0.338s)
"All Done!"
Superuser is installed and thats it. no root.
What version are you running?
If ICS try this: http://forum.xda-developers.com/showthread.php?t=1710871
If GB try this: http://forum.xda-developers.com/showthread.php?t=1341578
I've used both and they *do* work.
What OS are you running? MacOS?
Mac OSX Snow Leopard
What root method are you trying to use?
i used the CASUAL Public Beta 4, but it wouldnt root. It only installed Superuser. Then I tried the one mentioned above- Eternity Easyroot. However, when I unzip the file, I don't know how to run the actual program. In the unzip file there's a linux file, a windows .bat file which says theres no program to open it on Mac OSX, and then an actual Mac OSX .sh file. I dont know how to run it.

[Q] I need to put two files back into system/lib but I'm limited on what I can use

To start with, I have a rooted Pantech Pocket that was running Carrier IQ and that is where the problem started.
I found there were 3 files that were associated with Carrier IQ. One in system/bin and two in system/lib and I moved the one from system/bin without any problem but when I moved the two from system/lib I ended up with a phone that gives me error message after error message after error message and all the errors say: "The process com.android.phone has stopped unexpectedly. Please try again."
To make a long story short those error messages pop up so quickly I can not use the "MENU" or a "Long press" anymore and I have to use "Button Savior" to use the "Back" or the "Home" buttons. Note: even though Button Savior is given superuser access the "Menu" key still does not do anything.
I can not use ES File Explorer because I can't get into the menu to set it up as a "Root Explorer" since there is no way I can get the "MENU" key pressed and I tried several different programs too.
I can not use Root Explorer because I can not use a long press since that error message cuts the long press short.
I also tried the following set of commands to try and push the two files into the lib folder but ended up with an error message there too.
adb devices
adb push psneuter /data/local/tmp
adb shell
$ cd /data/local/tmp
$ chmod 777 psneuter
$ ./psneuter
Then the error message I received was:
failed to set prot mask (inappropriate ioctl for device)
UPDATE AFTER PUTTING THE TWO FILES BACK INTO /system/lib
Turns out because my Pantech Pocket was still rooted all I had to do was type "adb shell" on one line and then after getting the '$' type "su".
After that I had to use the following command so I could copy two files back into /system/lib:
mount -o remount,rw -t rfs /dev/block/st19 /system
Then after changing the permissions the cp (copy) worked without any errors and I put the two files I had moved out of /system/lib back into /system/lib.
I learned a lot from trying to get rid of Carrier IQ and had to put carrier IQ back on the Pantech Pocket to make it usable. Dang AT&T but maybe there is something else I can do about Carrier IQ.
Roger

[Q] Trouble with CM10's su and Android Terminal Emulator

I am having a hard time getting certain interactive features of any shell to work with Android Terminal Emulator as soon i acquire superuser privileges by issuing the "su" command. I am no longer able to cycle through the command history which is otherwise done by pressing the volume down key (provided you have the vol. down key bound to the Ctrl key via Terminal Emulator's settings) and then the p key. It will simply display the "^P" control sequence instead of displaying the last entered command. It only becomes an issue once the su command is entered. Does anyone know of any possible workarounds?
bsimpson1 said:
I am having a hard time getting certain interactive features of any shell to work with Android Terminal Emulator as soon i acquire superuser privileges by issuing the "su" command. I am no longer able to cycle through the command history which is otherwise done by pressing the volume down key (provided you have the vol. down key bound to the Ctrl key via Terminal Emulator's settings) and then the p key. It will simply display the "^P" control sequence instead of displaying the last entered command. It only becomes an issue once the su command is entered. Does anyone know of any possible workarounds?
Click to expand...
Click to collapse
Quick answer: install Chainfire's SuperSU and don't look back
Just saw this post searching for some terminal stuff and had to reply cause this was driving me crazy trying to figure it out / fix it. The issue is with the CWM su binary. I never could exactly figure out the exact problem, and I wasn't willing to grep through its source code. I know that the permissions weren't (still might not be) configured correctly at installation. /system/xbin/su should be -srwx 06755 and Owner:Group 0:0 aka root:root at installation but the -s--- 06000 sticky-bit should not persist after installation and remounting /system, i.e., /system/xbin/su should be -rwx 0755 in the AOS. CWM's su has been re-chmod'ing the user-specific sticky-bit when I try changing it.. I'm pretty sure this is at least part of the problem with console/shell/terminal output not being (re)directed correctly with CWM-su executed processes.
Another thing to mention is the "security context" (SELinux additional file permissions) which labels the file with an "object" and "role" among other things. I know that it's set correctly during installation with SuperSU, but I didn't see a command for it in the installation zip's script for CWM-su NOV-17-beta. I'm never really sure what's going on with CWM's giant su binary these days lol This is a pretty important permission setting not to forget, especially if you're running enforced SELinux which is Android 4.4's SELinux' default security. Note: SELinux denies unconfigured files by default, and otherwise configured only allows minimum access to function when called. It then makes sense that if su doesn't have the correct security context, then it's children, shell executions might not either.
So I'm pretty sure the shortcuts (ctrl + c,x,z; esc + ...) stopped functioning correctly as a results of one or both of these issues. I checked almost all the suspects like libncurses.so (cursor library), libjackpal*[2-4].so (term library for execution of scripts), other terminals (same results in: better terminal emulator, connectbot, connectbot VX, Script Manager, JuiceSSH, Server Auditor, and a fresh Terminal IDE installation - could just take over the system with this beast if I had time). The ONLY place CWM su'd cursor works is recovery, flashing AromaFM. There's no SELinux here in this bootstrapped utopia of simplicity.
Chainfire's SuperSU recovery-installation-zip does all of the above mentioned correctly, so the cursor works everywhere(includes su binary and Superuser, and it yields complete removal of CWM's superuser files), the security context that's set to su, deamonsu, *all files that are added or modified* during installation is ubject_r:system_file:s0 via
Code:
chcon u:object_r:system_file:s0 file
. Also you can check SELinux security context with id -Z or maybe ls -Z, depends on those binaries and whether called by busybox, etc..
edit: CWM's su actually isn't used in TWRP; a supersu package is used
7175 said:
Quick answer: install Chainfire's SuperSU and don't look back
Just saw this post searching for some terminal stuff and had to reply cause this was driving me crazy trying to figure it out / fix it. The issue is with the CWM su binary. I never could exactly figure out the exact problem, and I wasn't willing to grep through its source code. I know that the permissions weren't (still might not be) configured correctly at installation. /system/xbin/su should be -srwx 06755 and Owner:Group 0:0 aka root:root at installation but the -s--- 06000 sticky-bit should not persist after installation and remounting /system, i.e., /system/xbin/su should be -rwx 0755 in the AOS. CWM's su has been re-chmod'ing the user-specific sticky-bit when I try changing it.. I'm pretty sure this is at least part of the problem with console/shell/terminal output not being (re)directed correctly with CWM-su executed processes.
Another thing to mention is the "security context" (SELinux additional file permissions) which labels the file with an "object" and "role" among other things. I know that it's set correctly during installation with SuperSU, but I didn't see a command for it in the installation zip's script for CWM-su NOV-17-beta. I'm never really sure what's going on with CWM's giant su binary these days lol This is a pretty important permission setting not to forget, especially if you're running enforced SELinux which is Android 4.4's SELinux' default security. Note: SELinux denies unconfigured files by default, and otherwise configured only allows minimum access to function when called. It then makes sense that if su doesn't have the correct security context, then it's children, shell executions might not either.
So I'm pretty sure the shortcuts (ctrl + c,x,z; esc + ...) stopped functioning correctly as a results of one or both of these issues. I checked almost all the suspects like libncurses.so (cursor library), libjackpal*[2-4].so (term library for execution of scripts), other terminals (same results in: better terminal emulator, connectbot, connectbot VX, Script Manager, JuiceSSH, Server Auditor, and a fresh Terminal IDE installation - could just take over the system with this beast if I had time). The ONLY place CWM su'd cursor works is recovery, flashing AromaFM. There's no SELinux here in this bootstrapped utopia of simplicity.
Chainfire's SuperSU recovery-installation-zip does all of the above mentioned correctly, so the cursor works everywhere(includes su binary and Superuser, and it yields complete removal of CWM's superuser files), the security context that's set to su, deamonsu, *all files that are added or modified* during installation is ubject_r:system_file:s0 via
Code:
chcon u:object_r:system_file:s0 file
. Also you can check SELinux security context with id -Z or maybe ls -Z, depends on those binaries and whether called by busybox, etc..
Click to expand...
Click to collapse
Thanks for such a detailed reply. It's nice to know that the problem wasn't on my end. I can finally stop desperately editing my bashrc file, adding all sorts of obscure environment variables and crossing my fingers.
bsimpson1 said:
Thanks for such a detailed reply. It's nice to know that the problem wasn't on my end. I can finally stop desperately editing my bashrc file, adding all sorts of obscure environment variables and crossing my fingers.
Click to expand...
Click to collapse
Man I'm right there with you. lol yeah my 1MB of cursor-fix bashrc and mksh edits are now resting in peace, blasted that tar.gz coffin out to space with my "working-key-signal" su'd ssh terminal the other day like Spock in The Wrath of Khan, oh yeah. I'm glad to know I wasn't the only person who cared about this so much.

[Q] [MAAAAD] Run Script.sh

Hi brothers
i really don't know what to do
I'm trying to run a script.sh and i think i did everything possible to run it, but yet
it says plz blah blah blah blah be rooted first ( and I'm already rooted )
cd /sdcard << here where is the script located
su
sh script.sh
[now I'm getting the msg about being root first]
..
I'm getting another error too, saying something about permission denied!!
now how to change the permission
I believe that i should use chmod +x script.sh OR chmod +x 755 script.sh OR chmod +x 777 script.sh << error error error
WHAT SHOULD I DO TO RUN THIS FU***** SCRIPT!!!!!!!!!!!!!
what is this .. nobody!!!!
i'll keep posting until somebody response
Me-Nex S said:
Hi brothers
i really don't know what to do
I'm trying to run a script.sh and i think i did everything possible to run it, but yet
it says plz blah blah blah blah be rooted first ( and I'm already rooted )
cd /sdcard << here where is the script located
su
sh script.sh
[now I'm getting the msg about being root first]
..
I'm getting another error too, saying something about permission denied!!
now how to change the permission
I believe that i should use chmod +x script.sh OR chmod +x 755 script.sh OR chmod +x 777 script.sh << error error error
WHAT SHOULD I DO TO RUN THIS FU***** SCRIPT!!!!!!!!!!!!!
Click to expand...
Click to collapse
can you please post that script?
as of changing permission use chmod 0755 script.sh
as android/busybox chmod binary does not uses the chmod +x or chmod a+x notation
and make sure that su binary is installed i.e phone is rooted
here is the script
https://www.dropbox.com/s/8atidhjswrts7qe/yamas.sh
Solution
You need to root your phone.
Also you must have Busy Box Installed.
Here is the link to Google Play of that busybox app: https://play.google.com/store/apps/details?id=com.jrummy.busybox.installer
Don't install the few latest versions because it is in nightlies.
I use Samsung Galaxy Y and I use the version 1.18.2.
Reboot your phone after installation.
Also you must have script manager installed.
Here is the link to Google Play of that manager app: https://play.google.com/store/apps/details?id=os.tools.scriptmanager
Open Script Manager and give super user access.
Tap on Menu > Advanced Options > Config
Scroll down until you see Browse as Root
Tap on it and press the back button to save
Once again grant Script Manager SuperUser Access to save config
Exit Script Manager
Now again open Script Manager and browse for your script file (yamas.sh)
Tap on it and set properties to:
Favorites (Star Icon)
Root (Green Android Skull Icon)
After setting properties, tap on Run to execute the script installer.
When executed, it will do initial test, be patient and wait for it to complete its tasks.
Press thanks if I have helped.
I'm gettingthe same error .. i've done evrything u've said but still .. here is the error msg .. even if i give the script the root permission, still it ask for permission again i dont know why!!
Error resolving interpreter:/bin/sh does not exist
Using default shell
exec sh '/storage/emulated/legacy/yamas.sh'
[email protected]:/ # exec sh '/storage/emulated/legacy/yamas.sh'
You are not running this script as root.
Please become root (e.g. "su") before launching this script
Answer
Me-Nex S said:
I'm gettingthe same error .. i've done evrything u've said but still .. here is the error msg .. even if i give the script the root permission, still it ask for permission again i dont know why!!
Error resolving interpreter:/bin/sh does not exist
Using default shell
exec sh '/storage/emulated/legacy/yamas.sh'
[email protected]:/ # exec sh '/storage/emulated/legacy/yamas.sh'
You are not running this script as root.
Please become root (e.g. "su") before launching this script
Click to expand...
Click to collapse
Download a root checker app from the play store and check whether your phone is really rooted.
If no, try to root again by following tutorials on xda.
If yes, update su binaries.
Also go to settings / preferences of superuser app, and click automatic response and then select 'allow'.
That script was placed in sd card right?
Then it maybe the app which copies to a specified location before executing it.
---------- Post added at 07:21 AM ---------- Previous post was at 06:35 AM ----------
See the link again. I added more information.
http://forum.xda-developers.com/showthread.php?t=2620394

Categories

Resources