LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.

Notices


Reply
  Search this Thread
Old 07-06-2018, 04:12 AM   #1
lukman.pozo
LQ Newbie
 
Registered: Jul 2018
Posts: 4

Rep: Reputation: Disabled
Can't Chmod 755


Hi everyone, i have problem with this command

C:\Users\Gabriel\Downloads\adb fastboot-s.off\adb fastboot>adb reboot

C:\Users\Gabriel\Downloads\adb fastboot-s.off\adb fastboot>adb wait-for-device p
ush firewater /data/local/tmp
4701 KB/s (4432776 bytes in 0.920s)

C:\Users\Gabriel\Downloads\adb fastboot-s.off\adb fastboot>
C:\Users\Gabriel\Downloads\adb fastboot-s.off\adb fastboot>adb shell
shell@htc_m8:/ $ su
su
root@htc_m8:/ # chmod 755 /data/local/tmp/firewater
chmod 755 /data/local/tmp/firewater
root@htc_m8:/ # /data/local/tmp/firewater
/data/local/tmp/firewater

























==================== firewater S-OFF 8.0.4.6 ===========================

firewater S-OFF comes with NO WARRANTY (express or implied)
and NO GUARANTEE OF FITNESS for any particular task.
We have made every effort we can to make this a safe process for users
however the authors disclaim any liability for damage to your phone
or other materials or devices used during this process.

The entire risk of running firewater S-OFF lies with you, the user.
By using this software you acknowledge and accept that the authors
are not liable for any loss, material or otherwise howsoever caused.

firewater S-OFF may not be rehosted, repackaged, one-clicked, etc.
support is available @ #firewater on the freenode and andirc networks
support is much faster there vs. posting helpme threads on xda etc

Do not operate a motor vehicle after interacting with firewater
Do not inhale firewater or allow firewater to come in contact with eyes
firewater is best served at extremely cold temperatures
firewater has been known to cause temporary lapses in judgement
DO NOT TAUNT FIREWATER, YOU'VE BEEN WARNED

================================================== =======================



Do you understand the implications of these warnings?

(Yes/No)

==============================================
Its above should normal command, but on my HTC One M8 cannot reach that, only stop on this command

root@htc_m8:/ # chmod 755 /data/local/tmp/firewater

and cannot chmod, just back to this state

root@htc_m8:/ #

again, so i cant continue next command.
 
Old 07-06-2018, 06:16 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
What happens when you run it the second time without the "chmod 755"?

Last edited by smallpond; 07-06-2018 at 06:18 AM.
 
Old 07-06-2018, 09:56 AM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
Quote:
chmod 755 /data/local/tmp/firewater
Running that command should just get you back to a prompt. Did you check to see if the permissions changed?

Code:
ls -l /data/local/tmp/firewater
If it's a file, if it is a directory, substitute ls -ld for ls -l. What is firewater in this instance, an executable?
 
1 members found this post helpful.
Old 07-07-2018, 04:32 AM   #4
lukman.pozo
LQ Newbie
 
Registered: Jul 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
Running that command should just get you back to a prompt. Did you check to see if the permissions changed?

Code:
ls -l /data/local/tmp/firewater
If it's a file, if it is a directory, substitute ls -ld for ls -l. What is firewater in this instance, an executable?
Firewater is a executable file that contain command to security off my HTC One M8. I have to s-off my HTC M8 before i change to another custom firmware. I saw the video when they enter that command, should change to that folder or chmod 755 /data/local/tmp/firewater after that they type /data/local/tmp/firewater again and enter firewater question, yes or no. so simple like that. when answered Yes than the security will off
 
Old 07-07-2018, 04:59 AM   #5
lukman.pozo
LQ Newbie
 
Registered: Jul 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
What happens when you run it the second time without the "chmod 755"?
C:\Users\Lukman\Desktop\platform-tools>adb devices
List of devices attached
SH46AWM00371 device


C:\Users\Lukman\Desktop\platform-tools>adb reboot

C:\Users\Lukman\Desktop\platform-tools>adb wait-for-device push firewater /data/local/tmp
114 KB/s (4519496 bytes in 38.510s)

C:\Users\Lukman\Desktop\platform-tools>adb shell
shell@htc_m8:/ $ su
root@htc_m8:/ # chmod 755 /data/local/tmp/firewater
root@htc_m8:/ # /data/local/tmp/firewater
error: only position independent executables (PIE) are supported.
1|root@htc_m8:/ #
 
Old 07-07-2018, 06:42 AM   #6
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Rep: Reputation: 156Reputation: 156
Can we just take a step back. What are you trying to achieve with the chmod command?

Next up. Are you aware what
Quote:
su
does? It takes you out of the standard login and takes you to root (superuser) privileges. Once you have entered your comand you should leave this level with a CTRL-D before continuing
 
Old 07-07-2018, 07:03 AM   #7
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
@yancek had good advice above. Post the output of:

Code:
ls -l /data/local/tmp/firewater
A quick google of your error code (" error: only position independent executables (PIE) are supported.") suggests you may need to edit the variables in Application.mk and then re-compile.

Last edited by snowday; 07-07-2018 at 07:12 AM.
 
Old 07-07-2018, 07:12 AM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Code:
chmod 755 /whatever -R
to change everything that might be within it along with the dir?
 
Old 07-07-2018, 03:26 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
C:\Users\Lukman\Desktop\platform-tools

is a Microsoft Windows location

and MS dose not use linux file permissions
Code:
"chmod 755 /data/local/tmp/firewater"
also when remote logging in to a linux OS you NEVER!!!! want things in a temp folder to have a 755

this IS A TEMPORARY FOLDER

now a 644 in tmp is one thing - the default setting

you really do NOT want to install software into one of the "tmp" folders
 
Old 07-07-2018, 11:13 PM   #10
lukman.pozo
LQ Newbie
 
Registered: Jul 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by snowpine View Post
@yancek had good advice above. Post the output of:

Code:
ls -l /data/local/tmp/firewater
A quick google of your error code (" error: only position independent executables (PIE) are supported.") suggests you may need to edit the variables in Application.mk and then re-compile.
C:\Users\Lukman\Desktop\platform-tools>adb wait-for-device push firewater /data/local/tmp
100 KB/s (4519496 bytes in 44.016s)

C:\Users\Lukman\Desktop\platform-tools>adb shell
shell@htc_m8:/ $ su
root@htc_m8:/ # chmod 755 /data/local/tmp/firewater
root@htc_m8:/ # ls -l /data/local/tmp/firewater
-rwxr-xr-x shell shell 4519496 2018-07-02 01:09 firewater
root@htc_m8:/ #
 
Old 07-08-2018, 04:49 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by lukman.pozo View Post
C:\Users\Lukman\Desktop\platform-tools>adb shell
shell@htc_m8:/ $ su
root@htc_m8:/ # chmod 755 /data/local/tmp/firewater
root@htc_m8:/ # /data/local/tmp/firewater
error: only position independent executables (PIE) are supported.
1|root@htc_m8:/ #
i don't think you will ever be able to start an executable from an android device like this, through the adb shell.
android is actually very secure on that level, with SELinux and whatnot.
in any case, there's a clear error message. it has nothing to do with permissions.
did you do a web search for the error message?
 
Old 07-09-2018, 08:12 AM   #12
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Quote:
Originally Posted by lukman.pozo View Post
-rwxr-xr-x shell shell 4519496 2018-07-02 01:09 firewater
This output shows that "chmod 755" was successful. (7 = rwx, 5 = rx)

I'd suggest that you mark this thread "solved" and create a new discussion for your error: "only position independent executables (PIE) are supported." Make clear in the title that your question relates to Android development using adb and firewater. This will increase the odds that a user with the relevant expertise reads your thread.

Last edited by snowday; 07-09-2018 at 09:44 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] What's the difference between chmod 0755 file and chmod 755 file? cola Linux - Newbie 6 04-19-2010 04:29 PM
Accidentally chmod -R 755 * while i was in / Rams3377 Linux - Server 6 04-27-2009 05:39 PM
Accidentally (chmod 755) the whole thing littlegreywings Linux - Newbie 14 03-20-2009 01:41 PM
would you recommend chmod -R 755 *? CodeFish Linux - Security 2 01-22-2005 10:49 PM
CGI without having to CHMOD 755 all the time. qistoph Linux - Software 9 06-21-2002 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 01:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration