Hey everybody
I currently have a mytouch 4g on 2.3.4, and i want to downgrade so i can root my device. To get you up to speed, I have SDK with all the necessary downloads (except to google drivers, it says not supported on mac after download).
I have fre3vo, misc_version, and PD15IMG.zip all in the platform-tools folder.
Heres my issue,
when i type the commands:
> adb push fre3vo /data/local/tmp
> adb shell
$ chmod 777 /data/local/tmp/fre3vo
$ /data/local/tmp/fre3vo -debug -start FAA90000 -end FFFFFFFF
It tells me that the file is not there. Ive tried re-downloading the files and still not working. Also, i have tried just pushing the misc_version and it takes me straight to the ADB command list.
-debugging is on
-SD Unmounted
-> adb shell cat /dev/msm_rotator
/dev/msm_rotator: invalid length (good to go)
-it recognizes my device and serial number
can anybody help with this? what gives?
Thank you all!!
PS. IM ON A MAC COMPUTER
Did you add platform tools folder to your PATH?
Give me the result of this command:
echo $PATH
Sent from my HTC Panache / CM7 using xda premium.
see attached picture. I did the same thing with misc_version and got the same response.
Can anyone help me with this ptoblem? I would really appreciate it!
Sent from my HTC Glacier using XDA App
You're not running it from the directory where you have both of those files. This is why adb doesn't find them.
Just cd into correct directory where you have them before executing the command.
The guide clearly says:
1. Download the attached files, unzip them, and place the files in your platform-tools folder.
...
5. Run the following commands from your platform-tools directory
Click to expand...
Click to collapse
Hey Jack R1,
Thank you for the response. Please bare with me throught his problem, for i am not really good at this. I was under the impression that it is IN the platform tools folder. I have it all unzipped and ready to go. Maybe i am typing the commands wrong? Could you also tell me how to CD them to the right directory? I thought it was in the right place but i guess i just dont understand.
Thank you!
i attached another picture of my problem, if it helps.
Hello,
cd is used to change directory. Please google it because this is a basic command you must know.
So what you must do:
cd /home/USER/PATH_TO_ADB_FOLDER
You must replace USER and PATHZTO...
Please provide the result of the command I ask in my first response(echo $PATH)
Just copy paste the result here. Image are not easy to read from my phone.
Sent from my HTC Panache / CM7 using xda premium.
The files are in the correct directory. You aren't (your shell is open on default location, which is /User, I think). You're calling adb by full path, while you shouldn't be - your shell should be in the same subdirectory.
Instead of writing /User/blah/blah/platform-tools/adb, write:
cd /User/blah/blah/platform-tools
Click to expand...
Click to collapse
And from there, write:
adb push blah-blah wherever_you_want_it
Click to expand...
Click to collapse
SprigganMaster, Jack R1
Thank you both for helping me through this, im getting closer and closer .
I spent almost all night researching adb and cd and got more familiar with it. I guess the problem im having is writing it in the terminal the correct way.
SprigganMaster-
When i type echo ($path) this is what i get. (i have a feeling that im typing it in wrong)
jordan-browns-macbook:android-sdk-macosx jordanbrownlute2$ echo ($path)
-bash: syntax error near unexpected token `$path'
jordan-browns-macbook:android-sdk-macosx jordanbrownlute2$
Jack R1,
after reading what you posted, the articles on use of cd more more sense now, and i feel like a complete idiot. (I know that if this kinda stuff is not up my alley then i should probably just wait for a root, or ICS to be released, but after tinkering with this phone and sdk/adb, i am hooked! ). Anyways, back to the problem at hand....
after cd it to the directory, then typing the commands, i get a command not found for alot of commands..
jordan-browns-macbook:~ jordanbrownlute2$ cd /Users/jordanbrownlute2/Desktop/android-sdk-macosx/platform-tools
jordan-browns-macbooklatform-tools jordanbrownlute2$ /Users/jordanbrownlute2/Desktop/android-sdk-macosx/platform-tools
-bash: /Users/jordanbrownlute2/Desktop/android-sdk-macosx/platform-tools: is a directory
jordan-browns-macbooklatform-tools jordanbrownlute2$ cd /Users/jordanbrownlute2/Desktop/android-sdk-macosx/platform-tools
jordan-browns-macbooklatform-tools jordanbrownlute2$ adb root
-bash: adb: command not found
jordan-browns-macbooklatform-tools jordanbrownlute2$ adb devices
-bash: adb: command not found
jordan-browns-macbooklatform-tools jordanbrownlute2$ adb push fre3vo /data/local/tmp
-bash: adb: command not found
jordan-browns-macbooklatform-tools jordanbrownlute2$ adb push fre3vo /data/local/tmp
-bash: adb: command not found
jordan-browns-macbooklatform-tools jordanbrownlute2$ adb push fre3vo /data/local/tmpadb push fre3vo /data/local/tmp
-bash: adb: command not found
jordan-browns-macbooklatform-tools jordanbrownlute2$ adb push misc_version /data/local/tmp/
-bash: adb: command not found
jordan-browns-macbooklatform-tools jordanbrownlute2$
what am i doing wrong now?
i think this part is ok:
Last login: Thu Jan 12 14:05:06 on ttys001
jordan-browns-macbook:~ jordanbrownlute2$ cd /Users/jordanbrownlute2/Desktop/android-sdk-macosx/platform-tools
jordan-browns-macbooklatform-tools jordanbrownlute2$ (<-this is what it responds with, which means i am in the directory i need to be running the commands with right?)
Yes, you're changing to the correct directory.
You need to run "./adb" and not just "adb", I guess, when running from the same folder where ADB executable resides.
finnaly success
Jack R1,
I guess i am an idiot after all, a simple "./" is what was stoping me from pushing those files...
Heres the response:
Last login: Thu Jan 12 15:03:44 on ttys001
jordan-browns-macbook:~ jordanbrownlute2$ cd /Users/jordanbrownlute2/Desktop/android-sdk-macosx/platform-tools
jordan-browns-macbooklatform-tools jordanbrownlute2$ ./adb push fre3vo /data/local/tmp
217 KB/s (9796 bytes in 0.044s)
jordan-browns-macbooklatform-tools jordanbrownlute2$ ./adb push misc_version /data/local/tmp/
139 KB/s (15837 bytes in 0.110s)
jordan-browns-macbooklatform-tools jordanbrownlute2$ chmod 777 /data/local/tmp/fre3vo
chmod: /data/local/tmp/fre3vo: No such file or directory
jordan-browns-macbooklatform-tools jordanbrownlute2$
Its supposed to like like that right!?
Almost.
You forgot 1 thing: to actually enter ADB shell before executing chmod.
adb shell
Click to expand...
Click to collapse
(you get $ prompt, keep working from it)
chmod 777 /data/local/tmp/fre3vo
/data/local/tmp/fre3vo with_the_parameters_from_the_guide
Execute_the_rest_of_the_guide
exit
Click to expand...
Click to collapse
you sir, are a genius. and i highly appreciate you sticking with me through this process. i now understand more of adb and its commands/functions. THANK YOU!!!
./adb shell
$ chmod 777 /data/local/tmp/fre3vo
$ /data/local/tmp/fre3vo -debug -start FAA90000 -end FFFFFFFF
fre3vo by #teamwin
Please wait...
Attempting to modify ro.secure property...
fb_fix_screeninfo:
id: msmfb
smem_start: 2fd00000
smem_len: 300000
type: 0
type_aux: 0
visual: 2
xpanstep: 0
ypanstep: 1
line_length: 1920
mmio_start: 0
accel: 0
fb_var_screeninfo:
xres: 480
yres: 800
xres_virtual: 480
yres_virtual: 1600
xoffset: 0
yoffset: 0
bits_per_pixel: 32
activate: 16
height: 80
width: 48
rotate: 0
grayscale: 0
nonstd: 0
accel_flags: 0
pixclock: 0
left_margin: 0
right_margin: 0
upper_margin: 0
lower_margin: 0
hsync_len: 0
vsync_len: 0
sync: 0
vmode: 0
Frame Buffer handle: 4
Buffer offset: 002ee000
Buffer size: 8192
Scanning region faa90000...
Scanning region fab80000...
Scanning region fac70000...
Scanning region fad60000...
Scanning region fae50000...
Scanning region faf40000...
Scanning region fb030000...
Scanning region fb120000...
Scanning region fb210000...
Scanning region fb300000...
Scanning region fb3f0000...
Scanning region fb4e0000...
Scanning region fb5d0000...
Scanning region fb6c0000...
Scanning region fb7b0000...
Scanning region fb8a0000...
Scanning region fb990000...
Scanning region fba80000...
Potential exploit area found at address fbb57a00:600.
Exploiting device...
jordan-browns-macbooklatform-tools jordanbrownlute2$ ./adb shell
# exit
jordan-browns-macbooklatform-tools jordanbrownlute2$
SAMPDX said:
Exploiting device...
jordan-browns-macbooklatform-tools jordanbrownlute2$ ./adb shell
# exit
jordan-browns-macbooklatform-tools jordanbrownlute2$
Click to expand...
Click to collapse
The # mean you gain root access. Congrat
If I can offer some advices :
- Linux / Mac shell command are case sensitive. It means HELLO and hello are 2 differents things.
When I asked to execute echo $PATH, PATH must be in upper case and the $ is important.
It's why you got
-bash: syntax error near unexpected token `$path'
Example on my computer :
$:>echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/usr/share/java/apache-ant/bin:/opt/java/bin:/opt/java/db/bin:/opt/java/jre/bin:/opt/kde/bin:/usr/bin/core_perl:/opt/qt/bin
Click to expand...
Click to collapse
The MyTouch / Panache / Glacier is not easy to root. You need to downgrade and it's very important to follow the tuto closely to be sure you don't brick your phone. Feel free to copy paste the command to be sure you are not doing any error.
Regards
adb is a program i have never used before and i am very thankful that you are giving me advice. I am eager to learn more and tinker with my device!
-as for the commands being sensitive. It was my issue 90% of the time .
After all was said and done, i typed the command
>adb reboot bootloader
and it said something like, wrong image, main version is older. I repeated the whole process again and now it worked!!!!
I am officially back to 2.2.1! You have no idea how relieved i am.
Thank you for everything SprigganMaster and Jack_R1!
similar problem with adb push
Hello,
I am having a similar problem, I am unable to perform the "adb push fre3vo /data/local/tmp"
I am using a windows computer, and trying to downgrade the os on my mytouch 4g so I can install CyanogenMod I have tried it with and without the "./"
Here are the responces:
C:\android-sdk-windows\platform-tools> ./adb push fre3vo /data/local/tmp
'.' is not recognized as an internal or external command,
operable program or batch file.
C:\android-sdk-windows\platform-tools> adb push fre3vo /data/local/tmp
When I do not use the "./" nothing happens, and I do not get another command prompt.
Is it different because it is a windows machine? or what are the other possibilities?
Thanks
_rob
may help
rla150 said:
Hello,
I am having a similar problem, I am unable to perform the "adb push fre3vo /data/local/tmp"
I am using a windows computer, and trying to downgrade the os on my mytouch 4g so I can install CyanogenMod I have tried it with and without the "./"
Here are the responces:
C:\android-sdk-windows\platform-tools> ./adb push fre3vo /data/local/tmp
'.' is not recognized as an internal or external command,
operable program or batch file.
C:\android-sdk-windows\platform-tools> adb push fre3vo /data/local/tmp
When I do not use the "./" nothing happens, and I do not get another command prompt.
Is it different because it is a windows machine? or what are the other possibilities?
Thanks
_rob
Click to expand...
Click to collapse
yes it is different.... read this and it may help.
http://forum.xda-developers.com/showthread.php?t=1178912
Related
hiya everyone, im new on here and really need some help.
im trying to downgrade my android software so im able to root it. only problem being ive never used command prompt lol!!
the guide im using says:
Launch a Command Prompt window and browse to the location of the files extracted in Step 1.
Enter the following commands:
adb push psneuter /data/local/tmp
adb push misc_version /data/local/tmp
adb shell chmod 777 /data/local/tmp/psneuter
adb shell chmod 777 /data/local/tmp/misc_version
adb shell /data/local/tmp/psneuter
adb shell
You should now get the # prompt, indicating temporary root.
Enter these commands:
cd /data/local/tmp
./misc_version -s 1.31.405.6
but how do i browse for the files if ive stored them in my documents and in a folder called downgrade android.
many thanks
What device are you trying to downgrade and what version of Android are you currently on? If it's Gingerbread there is a oneclick root called gingerbreak that works for a lot of people.
More info needed really.
hiya everyone, im new on here and really need some help.
im trying to downgrade my android software so im able to root it. only problem being ive never used command prompt lol!!
the guide im using says:
Launch a Command Prompt window and browse to the location of the files extracted in Step 1.
Enter the following commands:
adb push psneuter /data/local/tmp
adb push misc_version /data/local/tmp
adb shell chmod 777 /data/local/tmp/psneuter
adb shell chmod 777 /data/local/tmp/misc_version
adb shell /data/local/tmp/psneuter
adb shell
You should now get the # prompt, indicating temporary root.
Enter these commands:
cd /data/local/tmp
./misc_version -s 1.31.405.6
but how do i browse for the files if ive stored them in my documents and in a folder called downgrade android.
many thanks
keeps saying not a batch file :s
Moving them into the SDK tools folder temporarily would make things easier and would mean only the file name needs to be typed rather than the specific location, try it out, I hope I remembered correctly
dannysissons said:
hiya everyone, im new on here and really need some help.
im trying to downgrade my android software so im able to root it. only problem being ive never used command prompt lol!!
the guide im using says:
Launch a Command Prompt window and browse to the location of the files extracted in Step 1.
Enter the following commands:
adb push psneuter /data/local/tmp
adb push misc_version /data/local/tmp
adb shell chmod 777 /data/local/tmp/psneuter
adb shell chmod 777 /data/local/tmp/misc_version
adb shell /data/local/tmp/psneuter
adb shell
You should now get the # prompt, indicating temporary root.
Enter these commands:
cd /data/local/tmp
./misc_version -s 1.31.405.6
but how do i browse for the files if ive stored them in my documents and in a folder called downgrade android.
many thanks
Click to expand...
Click to collapse
you can either modify the command like this:
adb push C:\users\[YOURUSERNAME]\My documents\downgrade\psneuter /data/local/tmp
or setup a locale path variable to the dir, where adb is stored as mentioned in THIS thread. (step 4)
Then you can simply cd to the dir, where your files are stored, and run adb from there (actually you can run adb from any dir then)
hy guys
I want to downgrade my htc desire z, and i am follwing all the steps only the thing is that on ./flashgc it gives me this: permission denied.
and finally and the most important, when i begin to downgrade it gives me this message: CID Incorrect update fail.
please help me
amiraria said:
hy guys
I want to downgrade my htc desire z, and i am follwing all the steps only the thing is that on ./flashgc it gives me this: permission denied.
and finally and the most important, when i begin to downgrade it gives me this message: CID Incorrect update fail.
please help me
Click to expand...
Click to collapse
Can you post the original post you are following? You might need to create your own goldcard.
CID Incorrect update failed
iSkanky said:
Can you post the original post you are following? You might need to create your own goldcard.
Click to expand...
Click to collapse
after doing all the settings as instruction shows i started writing the cammonds like below:
> adb shell cat /dev/msm_rotator
/dev/msm_rotator: invalid length
> adb push fre3vo /data/local/tmp
> adb shell
$ chmod 777 /data/local/tmp/fre3vo
$ /data/local/tmp/fre3vo -debug -start FAA90000 -end FFFFFFFF
Buffer offset: 00000000
Buffer size: 8192
Scanning region fb7b0000...
Scanning region fb8a0000...
Scanning region fb990000...
Scanning region fba90000...
Potential exploit area found at address fbb4d600:a00.
Exploiting device...
> adb shell
# exit
> adb push misc_version /data/local/tmp/misc_version
> adb push flashgc /data/local/tmp/flashgc
> adb shell chmod 777 /data/local/tmp/*
> adb shell
# cd /data/local/tmp
# ./misc_version -s 1.00.000.0
--set_version set. VERSION will be changed to: 1.00.000.0
Patching and backing up partition 17...
./flashgc (In this part when i am writing this code i will get this massage: ./flashgc permission denied, then i countinued typing the rest of the codes).
# sync
# dd if=/dev/block/mmcblk0p17 bs=1 skip=160 count=10
1.00.000.010+0 records in
10+0 records out
10 bytes transferred in 0.001 secs (10000 bytes/sec) (here also instead of getting 10000 bytes/sec i get 5000 bytes/sec)
(here i downloaded PC10IMG.zip and copied to my sdcart)
(then for Fastboot Downgrade i wrote these codes)
> adb reboot bootloader
> fastboot devices
(My device is recognized by typing the above command)
> fastboot oem rebootRUU
(but after finishing all the procedure it will give me this error: CID Incorrect update failed)
flashgc is not working and it gives the error: CID incorrect
amiraria said:
after doing all the settings as instruction shows i started writing the cammonds like below:
> adb shell cat /dev/msm_rotator
/dev/msm_rotator: invalid length
> adb push fre3vo /data/local/tmp
> adb shell
$ chmod 777 /data/local/tmp/fre3vo
$ /data/local/tmp/fre3vo -debug -start FAA90000 -end FFFFFFFF
Buffer offset: 00000000
Buffer size: 8192
Scanning region fb7b0000...
Scanning region fb8a0000...
Scanning region fb990000...
Scanning region fba90000...
Potential exploit area found at address fbb4d600:a00.
Exploiting device...
> adb shell
# exit
> adb push misc_version /data/local/tmp/misc_version
> adb push flashgc /data/local/tmp/flashgc
> adb shell chmod 777 /data/local/tmp/*
> adb shell
# cd /data/local/tmp
# ./misc_version -s 1.00.000.0
--set_version set. VERSION will be changed to: 1.00.000.0
Patching and backing up partition 17...
./flashgc (In this part when i am writing this code i will get this massage: ./flashgc permission denied, then i countinued typing the rest of the codes).
# sync
# dd if=/dev/block/mmcblk0p17 bs=1 skip=160 count=10
1.00.000.010+0 records in
10+0 records out
10 bytes transferred in 0.001 secs (10000 bytes/sec) (here also instead of getting 10000 bytes/sec i get 5000 bytes/sec)
(here i downloaded PC10IMG.zip and copied to my sdcart)
(then for Fastboot Downgrade i wrote these codes)
> adb reboot bootloader
> fastboot devices
(My device is recognized by typing the above command)
> fastboot oem rebootRUU
(but after finishing all the procedure it will give me this error: CID Incorrect update failed)
Click to expand...
Click to collapse
I even made a goldcard but i dont know how to use it, i mean the file name is Goldcard.img, i dont know whether i should place it in the related folder or not ? what should be the extension of the file.
one thing more: my device is htc desire z 2.3.3 . and i downloaded the ( Desire Z: PC10IMG.zip
Mirrors:
PC10IMG.zip
Vision_DZ_1.34.405.5_PC10IMG.zip
Vision_DZ_1.34.405.5_PC10IMG.zip) the first one is it correct or not? or i should download the (G2: PC10IMG_Vision_TMOUS_1.19.531.1_Radio_12.21.60.09b _26.02.01.15_M2_release_149459_signed.zip
Mirrors:
Vision_G2_1.19.531.1_PC10IMG.zip
Vision_G2_1.19.531.1_PC10IMG.zip
MD5: 531c08dc402e15577b947bf4cd22aec2)
please help me
Use any 1 of the following methods.
I have personally tried these on 2 of my china android phones.
1. Using linux {Recommended}Install Ubuntu or DebianEither
Install the android-sdk.
dl.google.com/android/adt/adt-bundle-linux-x86-20130717.zip <==x86
dl.google.com/android/adt/adt-bundle-linux-x86_64-20130717.zip <==x86_64
or
Just get the standalone adb and fastboot executables
texasice-cream-sandwich-mirror.googlecode.com/files/adb_fastboot.zipInstall ia32-libsRun this in a terminal
Code:
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
Now download the files required for root and put it in the same folder as adbmir.cr/GDEPZT4VAfter you finish installing the files,
Connect your device with debugging mode enabled
Run
Code:
cd path/to/adb
where "path/to/adb" is the directory of your adb file
Now run
Code:
sudo chmod a+x adb
sudo chmod a+x fastboot
>>Root
Code:
./adb devices
./adb push psneuter /data/local/tmp/
./adb push busybox /data/local/tmp/
./adb push su /data/local/tmp/
./adb push Superuser.apk /data/local/tmp/
./adb shell
Chmod and run the exploit under adb shell
Code:
cd /data/local/tmp/
chmod 755 psneuter
./psneuter
Now re-engage an adb shell to check if the exploit worked.
Code:
./adb kill-server
./adb devices
./adb shell
If you see a # sign, the exploit was was successful. Otherwise repeat from >>Root
Now run these on the same adb shell
Code:
cd /data/local/tmp
./busybox ash
mount -o remount,rw /dev/block/mtdblock0 /system
cp /data/local/tmp/su /system/xbin/su
chmod 6755 /system/xbin/su
chown 0.0 /system/xbin/su
cp /data/local/tmp/Superuser.apk /system/app/Superuser.apk
chmod 777 /system/app/Superuser.apk
cp /data/local/tmp/busybox /system/xbin/busybox
chmod 6755 /system/xbin/busybox
Now reboot your device and open up SuperSU. Let it update the binary.
Your device should be rooted. 2. Use Windows + MoboroboMethod 1 {Recommended but hard}
Download Moborobo from
Code:
moborobo.com
This software can Install drivers for many china phones and other branded phones.
After installing Moborobo download the files required for root
Code:
mir.cr/GDEPZT4V
Extract the files to the installation directory of Moborobo.
Code:
C:\Program Files (x86)\Moborobo
Run a CMD window under that directory and type
Code:
xcopy AndroidInterface.exe adb.exe
Connect your device in debugging mode & Open up Moborobo, It will install the drivers.
Keep Moborobo open & Follow the instructions mentioned in >>Root
P.S- the linux commands begin with a "./" remove this in windows or else it won't work. Note: Wherever I mentioned a terminal, the windows equivalent to this would be cmdMethod 2 {Easier}
Download and Install Moborobo just like above and run this under a cmd on that folder
Code:
xcopy AndroidInterface.exe adb.exe
Also download UnlockRoot or SuperOneClick
To make sure the adb files are of the same version, Copy over
Code:
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
to UnlockRoot's tools directory or SOC's ADB directory
Connect your device in debugging mode and open up moborobo.
Now keep Moborobo open and Run UnlockRoot or SOC. Good Luck :good:
---Smo0thK, team BL4CKF1R3---
Click thanks if I helped you.
[/COLOR]
Hi there!
under method 2 in the end...I could not locate ROOT nowhere.....
>>Root
arena1 said:
Hi there!
under method 2 in the end...I could not locate ROOT nowhere.....
Click to expand...
Click to collapse
I said follow the instructions mentioned in ">>Root".
I named a step in Method one as ">>Root". So I meant you should repeat those steps.
Now download the files required for root and put it in the same folder as adb
mir.cr/GDEPZT4V
Click to expand...
Click to collapse
What files?
EDIT: managed to do all the steps using method 1 in windows but got this message with executing ./psneuter :
mnmap() failed. Invalid argument
I used windows to root
failed at adb shell psneuter command...
/system/bin/sh: psneuter: not found
how to proceed ?
Hi
I have a new Android device, it's not any of the ones that have their own forum.
More specifically it runs Android 11 on top of a 4.19.193 Rockchip BSP kernel.
I need to read one or two specific files but these files are only readable by root.
I have ADB shell access.
What I do want to acheive:-
Temporarily have an ability to copy a file that's readable only by root, this could be by some GUI app that copies files, as long as the copy is readable by normal user, running commands as root, copy a partition to an image file, export to a desktop machine and read it there. Any one of these would get me that file.
What I don't want to do:-
I don't want to permanently modify the device, unlock the bootloader, put su into /system or anything like that.
Does anyone know of a rooting app that can give me temporary root access but then doesn't actually change the system?
thanks
To get temporary super-user ( AKA root ) rights on an Android's device shell all you have to do is to find a suitable su binary and copy it onto Android's filesystem.
A: To run Android shell commands with super-user right from within the shell on desktop computer ( AKA Command Prompt ) you have to run within desktop computer shell
Code:
adb devices
adb push <LOCATION-OF-SUITABLE-SU-BINARY-ON-PC-HERE> /data/local/tmp/
what will 1. connect the Android device to your desktop computer and 2. upload the su binary in the Android device temporary directory always available for the user.
B: Then, in desktop computer shell type
Code:
adb shell "cd /data/local/tmp & chmod 776 su"
what makes the su binary executable: its ownership by default is set to shell.
C: Then in desktop computer shell type
Code:
adb shell "ls -l"
what will show you content and permissions on recently uploaded files.
D:
To apply a series of Android shell commands what require super-user rights you now would run
Code:
adb shell
export PATH=/data/local/tmp:$PATH"
su -c "<SHELL-CMD-HERE>"
....
su -c "<SHELL-CMD-HERE">
exit
BTW:
When in an Android shell another process like su gets started then this spawned process runs as a child process means it inherits most of the parent process attributes.
adb push allowed me to send the file
Code:
adb push su /data/local/tmp/
su: 1 file pushed. 1.2 MB/s (11640 bytes in 0.009s)
but the adb shell command is failing
Code:
adb shell "cd /data/local/tmp & chmod 776 su"
chmod: su: No such file or directory
if I then log in over adb I don't seem to have permissions to do anything in data
Code:
adb shell
ls -al
drwxrwx--x 47 system system 4096 2022-09-02 16:31 data
cd data
ls -al
ls: .: Permission denied
additionally, I thought that su would need the suid bit set
Does chmod 766 acheive that?
oh this works
Code:
adb shell
cd /data/local/tmp
ls -al
total 18
drwxrwx--x 2 shell shell 3452 2022-09-02 16:32 .
drwxr-x--x 4 root root 3452 2022-07-27 03:04 ..
-rw-rw-rw- 1 shell shell 11640 2022-09-02 16:29 su
Code:
chmod 776 su
ls -al
total 18
drwxrwx--x 2 shell shell 3452 2022-09-02 16:32 .
drwxr-x--x 4 root root 3452 2022-07-27 03:04 ..
-rwxrwxrw- 1 shell shell 11640 2022-09-02 16:29 su
Code:
adb shell
export PATH=$PATH:/data/local/tmp
su
su: setgid failed: Operation not permitted
The device has separate boot_a, boot_b, dtbo_a, dtbo_b partitions.
If I could be reasonably sure that booting a boot partition from a similar device (I have one) would pick up the dtb from this device then I think I could be reasonably confident of not frying anything, I might try and boot it from fastboot.