LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, Firefox OS, Sailfish OS, Maemo, MeeGo, Ubuntu Mobile, WebOS, Open Mobile Alliance and other similar projects and products.
A reminder that LQ now has a dedicated Android sister site: AndroidQuestions.org

Notices


Reply
  Search this Thread
Old 07-06-2018, 05: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, 07:16 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,024

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

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

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
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, 05: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, 05: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, 07:42 AM   #6
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 650

Rep: Reputation: 149Reputation: 149
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, 08:03 AM   #7
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 4,438

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
@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 snowpine; 07-07-2018 at 08:12 AM.
 
Old 07-07-2018, 08:12 AM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro / Parrot
Posts: 7,142

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

Rep: Reputation: 2583Reputation: 2583Reputation: 2583Reputation: 2583Reputation: 2583Reputation: 2583Reputation: 2583Reputation: 2583Reputation: 2583Reputation: 2583Reputation: 2583
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-08-2018, 12:13 AM   #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, 05:49 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 9,917
Blog Entries: 7

Rep: Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439
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, 09:12 AM   #12
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 4,438

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
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 snowpine; 07-09-2018 at 10:44 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:29 PM
Accidentally chmod -R 755 * while i was in / Rams3377 Linux - Server 6 04-27-2009 06:39 PM
Accidentally (chmod 755) the whole thing littlegreywings Linux - Newbie 14 03-20-2009 02:41 PM
would you recommend chmod -R 755 *? CodeFish Linux - Security 2 01-22-2005 11:49 PM
CGI without having to CHMOD 755 all the time. qistoph Linux - Software 9 06-21-2002 08:30 AM

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

All times are GMT -5. The time now is 02:45 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration