can anybody help me with this command line - Nexus One Q&A, Help & Troubleshooting

this used to work when i did on my mytouch
cd /data/app-private/
ls
cp */sdcard
when i enter the command on my nexus i get error
cp: cant stat '*': no such file or directory
can some body please tell me how properly write the comand for a nexus one

What exactly are you trying to accomplish with the command? Are you trying to copy everything from /data/app-private/ onto your microSDHC card? If so, I would just (as root), do:
cp /data/app-private/* /sdcard
Make sure that you su to root before issuing the command, or you will get a permission denied error.

doesnt work either

What are you trying to do?
Can you link the place where you originally saw this command?

napoleontheruler said:
cd /data/app-private/
ls
cp */sdcard
Click to expand...
Click to collapse
so from the command and the errors you get using your and nathanzachary's version it looks like
a) your missing a space between * and /
b) you need root access to read anything in /data
perhaps you can tell us what the output of the "ls" is and maybe exchange that with an "ls -al" ? that would show us the access rights. please just copy the whole session.

FloOGB said:
so from the command and the errors you get using your and nathanzachary's version it looks like
a) your missing a space between * and /
b) you need root access to read anything in /data
perhaps you can tell us what the output of the "ls" is and maybe exchange that with an "ls -al" ? that would show us the access rights. please just copy the whole session.
Click to expand...
Click to collapse
i know about the space typo. "ls" shows all of the protected apps on your device. this command line would basically let you save any protected app to the devices sdcard. in a nut shell paid apps for free but it wont work on my nexus. can anyone figure out what the command line should be for a nexus.
i am running cm 5.0.5.3 if it helps any

"ls" is the same as "dir" in windows. it just lists the content of the directory you changed into with "cd". thats why we need to see the complete output of your console session. that includes your input, the output and the error messages. this is the reason i wanted to see an "ls -al" to see the access rights of that directory. if you dont want us to see the aps than please cut out the names, but leave all dots
this is up till know a purley "linux" problem, we just need the right data.
EDIT: and do an "id" please, just after the ls -al, copy that output as well.

FloOGB said:
"ls" is the same as "dir" in windows. it just lists the content of the directory you changed into with "cd". thats why we need to see the complete output of your console session. that includes your input, the output and the error messages. this is the reason i wanted to see an "ls -al" to see the access rights of that directory. if you dont want us to see the aps than please cut out the names, but leave all dots
this is up till know a purley "linux" problem, we just need the right data.
EDIT: and do an "id" please, just after the ls -al, copy that output as well.
Click to expand...
Click to collapse
drwxrwx--x 1 system system 2048 Mar 22 21:51
drwxrwx--x 1 system system 2048 Mar 25 18:04
i dont know if that will help

FloOGB said:
we need to see the complete output of your console session
Click to expand...
Click to collapse
something like
Code:
* daemon not running. starting it now *
* daemon started successfully *
# bash
bash-4.1# id
uid=0(root) gid=0(root)
bash-4.1# cd /data/app-private/
bash-4.1# ls -al
drwxrwx--x 1 system system 2048 Apr 1 07:29 .
drwxrwx--x 1 system system 2048 Mar 20 14:33 ..
-rw-r----- 1 system app_68 92139 Feb 28 11:10 *****.apk
-rw-r----- 1 system app_64 44784 Apr 1 07:29 *****.apk
bash-4.1# cp * /sdcard
bash-4.1# exit
exit
# exit
I just want to see which user you are on the shell and if the access rights match. Because if you are not root you don't even have list rights on that directory, which causes the "cant stat *" message
Did you root you N1? How do you access the shell? ADB? SSH? App? This is getting pointless

FloOGB said:
This is getting pointless
Click to expand...
Click to collapse
that's a little harsh on him...
he is having problems. be understanding. everyone has to start somewhere.
but, flo is correct, we need more detail on how you're commanding, and you'll definitely need root access

FloOGB said:
something like
Code:
* daemon not running. starting it now *
* daemon started successfully *
# bash
bash-4.1# id
uid=0(root) gid=0(root)
bash-4.1# cd /data/app-private/
bash-4.1# ls -al
drwxrwx--x 1 system system 2048 Apr 1 07:29 .
drwxrwx--x 1 system system 2048 Mar 20 14:33 ..
-rw-r----- 1 system app_68 92139 Feb 28 11:10 *****.apk
-rw-r----- 1 system app_64 44784 Apr 1 07:29 *****.apk
bash-4.1# cp * /sdcard
bash-4.1# exit
exit
# exit
I just want to see which user you are on the shell and if the access rights match. Because if you are not root you don't even have list rights on that directory, which causes the "cant stat *" message
Did you root you N1? How do you access the shell? ADB? SSH? App? This is getting pointless
Click to expand...
Click to collapse
ok first of all how would it be possible to run cm 5.0.5.3 witch i posted my n1 is currently running if i didnt have root. i am using this coomand as i have been through better terminal emulator. if you would be so kind as to give me the exact command lines to get the output info you want i will gladly do so. besides what is the point of terminal emulator, adb, or fastboot without root.

napoleontheruler said:
ok first of all how would it be possible to run cm 5.0.5.3 witch i posted my n1 is currently running if i didnt have root. i am using this coomand as i have been through better terminal emulator. if you would be so kind as to give me the exact command lines to get the output info you want i will gladly do so. besides what is the point of terminal emulator, adb, or fastboot without root.
Click to expand...
Click to collapse
* daemon not running. starting it now *
* daemon started successfully *
# bash
bash-4.1# id
uid=0(root) gid=0(root)
bash-4.1# cd /data/app-private/
bash-4.1# ls -al
drwxrwx--x 1 system system 2048 Apr 1 07:29 .
drwxrwx--x 1 system system 2048 Mar 20 14:33 ..
-rw-r----- 1 system app_68 92139 Feb 28 11:10 *****.apk
-rw-r----- 1 system app_64 44784 Apr 1 07:29 *****.apk
bash-4.1# cp * /sdcard
bash-4.1# exit
exit
# exit
Click to expand...
Click to collapse
1) adb shell
2) bash
3) id
4) cd /data/app-private/
5) ls -al
6) cp * /sdcard
Basically anything after bash-4.1# is a command.

napoleontheruler said:
if you would be so kind as to give me the exact command lines to get the output info you want i will gladly do so.
Click to expand...
Click to collapse
I did? Multiple times?
FloOGB said:
perhaps you can tell us what the output of the "ls" is and maybe exchange that with an "ls -al" ? that would show us the access rights. please just copy the whole session.
Click to expand...
Click to collapse
FloOGB said:
EDIT: and do an "id" please, just after the ls -al, copy that output as well.
Click to expand...
Click to collapse
Thats the reason why i got a bit frustrated, sorry. archangelugp posted the command sequence.

archangelugp said:
1) adb shell
2) bash
3) id
4) cd /data/app-private/
5) ls -al
6) cp * /sdcard
Basically anything after bash-4.1# is a command.
Click to expand...
Click to collapse
do i run in terminal emulator or adb connect

napoleontheruler said:
do i run in terminal emulator or adb connect
Click to expand...
Click to collapse
Whichever method you use you'll have to use the su command to get root access first.
Connect your phone to your computer via USB cable, and make sure USB debugging is enabled on your phone (Settings > Applications > Development)
Enter adb shell to fire up Debug Bridge and enter shell mode
Enter su to become superuser
Enter cat /data/app-private/filename.apk > /sdcard/filename.apk to copy the file to the SD card.
exit
exit
Click to expand...
Click to collapse
I didn't want to reinvent the wheel so I pasted this from here. Both methods are shown.

wind0zer said:
Whichever method you use you'll have to use the su command to get root access first.
I didn't want to reinvent the wheel so I pasted this from here. Both methods are shown.
Click to expand...
Click to collapse
i was talking about what command line to find the output info and if i should run that though terminal emulator or adb.the link is were i got the command line from. so r u telling me that the termial emulator method will not work on the nexus.

Yes you can use the terminal in the phone to back up your paid apps.
Which part of the steps (in the link) do you not understand?
Sent from my Nexus One using the XDA mobile application powered by Tapatalk

Why so troublesome.
By using below two apps, you can simply copy out your purchase & install apps:
- Root Explorer
- Titanium Backup

Yeah, my guess was that he isn't logged in as root, thats why I need the output of "id".
I think it doesn't matter how you access the phone, trough a terminal emulator on the phone or though adb.
Just write us down the uid and gid value from "id", that should be little enough text to copy manually
for example, write down the red part:
bash-4.1# id
uid=0(root) gid=0(root)

Related

[ROOTING] The M7 Exploit + Newbie Guide

To be honest, I'm a nice guy, but when threads get filled with utter "OMG, How do I root?" posts, I get pissed off. I don't mean to backseat moderate or anything, I just really get fed up sometimes. Hence, I've broken out the hardcore side of myself, and I present:
Coburn's (mostly) failproof rootmeplz kthxbai tutorial, featuring the awesome m7 exploit.
YOU CANNOT USE THIS ROOT GUIDE TO INSTALL ANDROID 2.0.x/2.1/2.x AT THIS MOMENT IN TIME. PLEASE DO NOT ASK IF YOU CAN INSTALL ANDROID 2.x USING ROOT, AT THIS STAGE IT'S A BIG FAT NO! THANK YOU FOR YOUR ATTENTION!!
Alright.
Easy to understand, plain english guide
Download the ZIP file attached to this post. Extract the files to a safe location - perhaps C:\Tattoo ?
Now, you'll need adb for windows. You can get it from my website's server here: ADB for windows.
Make sure your device is in USB Debug Mode (Settings > Applications > Development). This is ESSENTIAL!
Extract all the files in the adb4win zip file to your C:\Tattoo folder.
Now, go to Command Prompt. In XP, it's under System Tools in Accessories. In Vista/7, it'll be under accessories.
Do the following at the command line:
C:\Users\Coburn> cd C:\Tattoo
This will change your working directory from C:\Users\Coburn (or silimar) to C:\Tattoo .
Now, at the command line, do this:
C:\Tattoo> adb-windows shell "mkdir /data/local/bin" (with the quotes!).
This makes a directory on the Tattoo under /data/local, called bin. If you get a error (like mkdir failed, file/folder exists), this is fine! Don't sweat it.
Now, run this command:
C:\Tattoo> adb-windows push m7 /data/local/bin/m7
...and wait until finish.
Run this:
C:\Tattoo> adb-windows shell "cd /data/local/bin && chmod 755 ./m7" (with the quotes!)
This allows you to run the sucker.
Now, the fun part. Run this:
C:\Tattoo> adb-windows shell
This will dump you at a "$" shell. do the following:
C:\Tattoo> adb-windows shell
$ cd /data/local/bin
$ while ./m7 ; do : ; done
...lotsa text will flow down your screen. This is normal. Sometimes the exploit causes adb to freeze up, I don't know. I think it may be due to the exploit. It worked on my mac fine though...
Soon, you'll be greeted with this:
#
This is the root prompt! If you get stuff like this:
# usage: reboot ...
usage: reboot ....
usage: reboot ...
Just keep your cool, press enter and the # will say "Boo" again. This is due the exploit spawning reboots to gain the shell.
Then, do these commands from this thread's first post:
-bm- and the hax0rs crew said:
You did it, you should be root now!
Let's set some variables:
Code:
export LD_LIBRARY_PATH=/system/lib
export PATH=/system/bin
[...] check if ur root:
Code:
id
You should get something like this:
Code:
# id
uid=0(root) gid=1000(shell) groups=1003(graphics),1004(input),1007(log),1011(adb),1015(sdcard_rw),3001(net_bt_admin),3002(net_bt),3003(inet)
uid=0(root) is important.
Click to expand...
Click to collapse
When you get this:
C:\Tattoo> adb-windows shell
$ cd /data/local/bin
$ while ./m7 ; do : ; done
[... lotsa pasta ...]
#
You can do anything then! Look at /system, /data, etc etc. You're broken free, my friend, and you'll forever be free. Until you press that exit button. you didn't. You didn't press that exit button? lolwut u did? Grrrrrrr!!!
EDIT: Added Guide to remount partitions. It's below.
Now you need to install su. Exit your root shell (via CTRL+C) (NO, Coburn, are you serious? ME LOSE ROOT SHELL?! ) and download this su.zip and extract it to C:\Tattoo. DO NOT EXIT THE COMMAND PROMPT WINDOW.
Meanwhile, back at the ranch, in your command prompt window, do this:
C:\Tattoo> adb-windows push su /data/local/bin/su
Then break out a shell...
C:\Tattoo> adb-windows shell
at the $ prompt, enter:
$ chmod 755 /data/local/bin/su
$ cd /data/local/bin/
..run the exploit again via "while 'true' ; do ./m7 ; done" to get root again then enter ...
# chown root.root /data/local/bin/su
# chmod 4755 /data/local/bin/su
# mount -o rw,remount /dev/block/mtdblock5 /data
# mount -o rw,remount /dev/block/mtdblock3 /system (This line allows you to play around with files on the system partition!)
After that, you can exit out of the root shell, and try a normal shell and this:
$ /data/local/bin/su
...which should make you get a nice # prompt. (Sometimes it doesn't, for me it got su: permission denied, wtf?)
(End SU Part of guide)
Tested on Windows 7. Also works on a phone terminal emulator too!
Keep your cool peeps - I do this for fun, I'm not a fulltime android dev. I am an addict though.
Happy rootin my friends.
Cheers,
Tattoo Hacker Coburn.
Greets fly out to the geeks that hacked it originally - without you, I'd have got a nexus one.
Thanks for marsdroid for correcting an error. Kudos to you, bro!
"ANDROID - It's a virus. In a Good Way. Once it's in your system, you can't get rid of it."
You should also add the "su" part in order to get root easier after the first time. Otherwise you have to do the exploit every time you want #
You could also add an explanation on how to remount the partitions without nosuid, so that a suid su can work.
mainfram3 said:
You could also add an explanation on how to remount the partitions without nosuid, so that a suid su can work.
Click to expand...
Click to collapse
Noted. Will do.
LordGiotto said:
You should also add the "su" part in order to get root easier after the first time. Otherwise you have to do the exploit every time you want #
Click to expand...
Click to collapse
Heh, yeah. Might add that up too.
Coburn64.
Thanks Man.
Nice Thread.
Thank you Coburn
svprm said:
Coburn64.
Thanks Man.
Nice Thread.
Click to expand...
Click to collapse
Thanks bro for your thanks.
I'm very glad you did that work, I'm kind of busy but I will update my statusposting and link to your HowTo!
Thats great community work.
[ROOTING] The M7 Exploit + Newbie Guide
Easy to understand, plain english guide
Click to expand...
Click to collapse
I apologize for my english, it's not my native language and I tried my best. ;-)
Keep up your work!
-bm-
-bm- said:
I'm very glad you did that work, I'm kind of busy but I will update my statusposting and link to your HowTo!
Thats great community work.
I apologize for my english, it's not my native language and I tried my best. ;-)
Keep up your work!
-bm-
Click to expand...
Click to collapse
You're welcome. I actually wanted this thread to help your thread, I wanted to spawn a m7 exploit thread to keep the original thread (which is based on the classic m6 exploit) clean of "How do I root with m7" and such.
Keep up the good work too, bm!
Thanks Coburn, so m6 is useless..
adb shell rm /data/local/bin/m6?
thx for the work , and corrections ! deleted the ealyer post
?
When i get # , and type:
# chown root.root /data/local/bin/su
i get :
chown root.root /data/local/bin/su
chown: not found
#
What i'm doing wrong /??
liderzre said:
When i get # , and type:
# chown root.root /data/local/bin/su
i get :
chown root.root /data/local/bin/su
chown: not found
#
What i'm doing wrong /??
Click to expand...
Click to collapse
type
export LD_LIBRARY_PATH=/system/lib
export PATH=/system/bin
rooted
Ty. Guide is not 100% for noobs. (ME).
Problem copying files to system partition after successfull rooting
Hi
The device was rooted successfully (from the first time using m7)
But I have very strange problem.
I try to update some files in the /system (updating fonts in /system/fonts).
I successfully run following command to remount system with rw permissions
/system/bin/mount -o rw,remount /dev/block/mtdblock3 /system
But when I try to copy files to /system/fonts I get "not enough memory" error.
If I run "df" command it shows that /system has 14% free before write attempt
But if I run "df" command after the write attempt I see that there is no free space.
It looks like there is some protection mechanism that prevents copying files to /system partition.
Does any one has an idea how to solve it?
Thanks
ronyrad said:
Hi
The device was rooted successfully (from the first time using m7)
But I have very strange problem.
I try to update some files in the /system (updating fonts in /system/fonts).
I successfully run following command to remount system with rw permissions
/system/bin/mount -o rw,remount /dev/block/mtdblock3 /system
But when I try to copy files to /system/fonts I get "not enough memory" error.
If I run "df" command it shows that /system has 14% free before write attempt
But if I run "df" command after the write attempt I see that there is no free space.
It looks like there is some protection mechanism that prevents copying files to /system partition.
Does any one has an idea how to solve it?
Thanks
Click to expand...
Click to collapse
The problem is well known an jet we have got no explanation. It looks like an additional security system build in by HTC. That is what also prevents us from flashing Custom ROMS at the moment. Development goes on here: http://forum.xda-developers.com/showthread.php?t=631540&page=18 but there is no solution or explanation until now.
-bm-
Could it be that it seems to be that the driver (yaffs) is possibly trying to copy /system into memory, and then reflash the partition all at once (to prevent NAND/NOR tear and wear)?
this guide is in error and will for sure not work ...
you should post probberly ...specially now when things is working....
there is no reason do do a NONSENCE guide .....
thx for the work thoe
Click to expand...
Click to collapse
Excuse me, but it was tested working. I do not post false or misleading information, so please don't accuse me of posting something that won't work. It does work. If you have troubles, you're not following it correctly. Start again and work one step at a time.
Coburn64 said:
Excuse me, but it was tested working. I do not post false or misleading information, so please don't accuse me of posting something that won't work. It does work. If you have troubles, you're not following it correctly. Start again and work one step at a time.
Click to expand...
Click to collapse
don't worry for such baseless allegations coburn.... u r doing a great job. keep up this good work bro.... thanks a lot for this wonderful presentation...
waiting for ur custom ROM.....
Coburn64 u are missing a ; in the 2. while
and i dont expect the newbies to sit back and wait for the "BUUH"..
but im sure someone will....
thx again
EDIT Coburn64 fixed it

[MOD] v0.3.1 Working Full Ubuntu for 1.5.7 and 1.8.3 based on Sogarth's script

Sogarth's webtop2sd will be released soon, you really should wait and install that instead of this! Thanks -The Management
No longer breaks on 1.83, thanks to Romracer
Update: This script worked on my phone. Mind you I was installing it from a fresh SBF flash, but it should work on your phone too. Absolutely no guarantees as usual.
Update 11th April 2011, 06:59 PM: Won't be getting CWM package because it'd be huuuuuuuuuge.
Update 28th April 2011. 16:38 PM: Removing BETA tag since there have been no issues with the script for quite some time.
First off I would like to thank Sogarth for making this script in the first place as well as Romracer for fixing it for 1.83. Since he is busy doing more important work I decided to do this little hack for those of us that updated to 1.5.7 and dont feel like flashing back to earlier versions to get full Ubuntu working.
Again, this is only necessary if you're already running 1.5.7 or 1.8.3.
Secondly, I am still working on this script so it may not work for you. If you have a problem you may post in the thread or PM me showing exactly the error message, word for word, that you receive.
Updates will be included in the OP from time to time as I fix errors.
Instructions:
1) install.bat (from your computer)
2) adb shell (get a shell on your phone)
3) su (get root on your phone in that shell)
4) . /data/local/tmp/install.sh (run the install script *on your phone* don't forget the "." and the space after the dot, or you will have to chmod 755 the shell script manually)
5) ?????
6) profit\
Noob instructions, written by Viamonte (I take no credit or responsibility):
Thanks again for all your help. Now the noob instructions:
"1-Download "Terminal Emulator" from the market, on your phone (or any other terminal), and the file anexed in this thread to your computer.
2-Connect the Atrix to the computer via USB, configuring the connection mode to "None" and enabling USB Debugging mode (Settings>Applications>Development>USB debugging)
3-Unzip the file you downloaded on your pc, and run Install.bat. This will push the script to your phone.
4-Go back to your phone and open the emulator you downloaded. Then type "su" (without quotes) and press enter. Then type ". /data/local/tmp/install.sh" (without quotes) and press enter again.
The script should begin running now. It will stop in two moments where you'll be instructed to get a cup of coffee, and may take several minutes to continue form this point. When finished, the Atrix will reboot.
To check if this worked, use the Webtop either on your multimidia dock or your lapdock and verify if new itens appeared on your task bar and on the right upper side of the screen"
0.3.1 release
0.2 release
0.1 first release
Changelog
0.3.1 fix to gconf file's mdate so it does what its supposed to do =)
0.3 Small typo fixes and cpp package install fix by romracer, now works on 1.83 =)
0.2 Fixed some typos in uninstall.sh and make sure the %gconf file wound up in the right spot.
0.1 - first version. NOT CWM install but ready to be packaged for that more or less
Nice, I'll give this a shot later.
Ill give it a shot when I get home!
Sent from Motorola Atrix on TELUS.
My phone is working perfectly, so why not ruin it?
I'm giving this a try right now!
1.4.57 - Rooted and gingerblurred with HDMI Mirroring and Webtop hack.
I'll update as progress goes along:
Edit 1:
Initial try gave me this
Checking device state...
Obtaining temporary root access...pushing shell scripts
A filesystem file already exists. Reset it? [n] y
Mounting the filesystem...
07.sh
--------------------------------------------
EXECUTION FAILED
Unable to mount the filesystem file. ERR 07
--------------------------------------------
Press any key to continue . . .
Edit 2:
Ok, it doesnt work with resetting it. How about removing?
Checking device state...
Obtaining temporary root access...pushing shell scripts
A filesystem file already exists. Reset it? [n] n
A filesystem file already exists. Delete it? [n] y
Deleting the filesystem file...
--------------------------------------
EXECUTION FAILED
Unable to delete the filesystem file.
--------------------------------------
Press any key to continue . . .
Edit 3:
Ok, only one option left then.
Checking device state...
Obtaining temporary root access...pushing shell scripts
A filesystem file already exists. Reset it? [n] n
A filesystem file already exists. Delete it? [n] n
--------------------------------------------------------------------------
EXECUTION FAILED
The filesystem file already exists, but no operations have been selected.
--------------------------------------------------------------------------
Press any key to continue . . .
=====================================================================
Edit 4:
Since execution is failing I'm trying to find the problem. Using ADB Shell i tried to manually run the shell scripts and stumbled here:
(I tried chmod 777 @ 02.sh to see if that was the problem, no change is results)
# ls -l
...
...
-rwsr-sr-x shell shell 87 2011-04-06 12:13 03.sh
-rwxrwxrwx shell shell 82 2011-04-06 12:11 02.sh
-rwsr-sr-x shell shell 251 2011-04-06 12:04 01.sh
# pwd
pwd
/data/tmp/shell
# /data/tmp/shell/02.sh
/data/tmp/shell/02.sh
/data/tmp/shell/02.sh: not found
I had the same issue as flybob when I tried to run the script.
Sent from my MB860 using XDA Premium App
Good effort, but 1.57 changes how we have to run commands as root. On a normal linux box, I'm sure your methods would work fine, but we're not dealing with a normal su binary. You should look into doing this as CWM as opposed to .bat files. I had a hell of a time getting around the restrictions since the psneuter exploit was closed.
Ah, I did not think about that Ririal, thanks for the info. I am not familiar with CWM though.
Why is the /tmp directory in /data ? That would certainly cause every script to fail.
I'll look at this some more tonight.
Ririal said:
Good effort, but 1.57 changes how we have to run commands as root. On a normal linux box, I'm sure your methods would work fine, but we're not dealing with a normal su binary. You should look into doing this as CWM as opposed to .bat files. I had a hell of a time getting around the restrictions since the psneuter exploit was closed.
Click to expand...
Click to collapse
How about a shell script that we can run in terminal emulator ? and the output goes to screen and a log file for debug !
molotof said:
How about a shell script that we can run in terminal emulator ? and the output goes to screen and a log file for debug !
Click to expand...
Click to collapse
most of the script is now run by shell scripts, no reason you couldn't run them in the terminal emulator, just get the order right. There are also a few lines I didn't translate to shell so you'd have to enter them by hand.
In any case I'll keep working on this until Sogarth releases his version with union mounts =D
You might be interested to know this;
# cd /tmp
cd /tmp
# pwd
pwd
/data/tmp
# ls -l /tmp
lrwxrwxrwx root root 2011-04-09 14:47 tmp -> /data/tmp
I'll happily help with the script, i know tons of linux and got my Atrix ready to be bricked
flybob said:
You might be interested to know this;
# cd /tmp
cd /tmp
# pwd
pwd
/data/tmp
# ls -l /tmp
lrwxrwxrwx root root 2011-04-09 14:47 tmp -> /data/tmp
I'll happily help with the script, i know tons of linux and got my Atrix ready to be bricked
Click to expand...
Click to collapse
That's just a symlinked directory. I won't make a difference if you call either.
Yes, just replied to the previous question
Why is the /tmp directory in /data ? That would certainly cause every script to fail.
I'll look at this some more tonight.
Click to expand...
Click to collapse
However, why doesn't the scripts run as wanted...?
# cat /tmp/shell/02.sh
cat /tmp/shell/02.sh
#!/bin/sh
/system/bin/su
/bin/rm /data/ubuntu.disk > /dev/null 2>&1 && echo PASS#
# ls -l /tmp/shell/02.sh
ls -l /tmp/shell/02.sh
-rwxrwxrwx shell shell 82 2011-04-06 12:11 02.sh
# /tmp/shell/02.sh
/tmp/shell/02.sh
/tmp/shell/02.sh: not found
flybob said:
Yes, just replied to the previous question
However, why doesn't the scripts run as wanted...?
# cat /tmp/shell/02.sh
cat /tmp/shell/02.sh
#!/bin/sh
/system/bin/su
/bin/rm /data/ubuntu.disk > /dev/null 2>&1 && echo PASS#
# ls -l /tmp/shell/02.sh
ls -l /tmp/shell/02.sh
-rwxrwxrwx shell shell 82 2011-04-06 12:11 02.sh
# /tmp/shell/02.sh
/tmp/shell/02.sh
/tmp/shell/02.sh: not found
Click to expand...
Click to collapse
Ah ok my mistake, you didn't quote anything I didn't realize that's what you were responding too
Likely noexec flag causing that issue.
Also, you can't invoke su from inside a shell script. It just doesn't work with this su binary.
yeah, I guess not. I hadn't realized that it wasn't a real 'su' before making this... too bad.
If anyone figures out how to get around that we'll be in business Unfortunately that's way beyond my expertise.
Okay, after fiddling a little bit and talking to a friend I may have solved some of the problems, mainly with the scripts executing and su working.
I will have to rewrite a bunch of things but should report back tonight.
the2dcour said:
Okay, after fiddling a little bit and talking to a friend I may have solved some of the problems, mainly with the scripts executing and su working.
I will have to rewrite a bunch of things but should report back tonight.
Click to expand...
Click to collapse
su -c "command"
You'll have to allow superuser on the phone for every single command.
PM'd you my error. I tried manually editing the permissions, but that didn't work.
Running on GladAtrix2 v3
USB debugging on; USB set to none
Checking device state...
Obtaining temporary root access...pushing shell scripts
-------------------------
EXECUTION FAILED
Unable to chmod scripts.
-------------------------
Press any key to continue . . .
Changed /sdcard-ext to /sdcard in script. Got this error
Checking device state...
Obtaining temporary root access...pushing shell scripts
-------------------------
EXECUTION FAILED
Unable to chmod scripts.
-------------------------
* server not running *
Press any key to continue . . .
Running BETA_ubuntu-1.0.6.4.zip. File extracts to BETA_ubuntu-1.0.6.2 directory. Ran ubuntu-1.5.7.bat
Moved BETA_ubuntu-1.0.6.2 to C:\ Same error
The only easy workaround to that I can see at the moment is to
Code:
adb shell
su
chmod 777 /path-to-scripts/*
ls -l /path-to-scripts/*
make sure all the files are executable (should say rwxrwxrwx)
then remove the bit of code from 1.5.7.bat
Code:
set retval=
for /f "tokens=*" %%l in ('%~dps0adb.exe shell "/bin/chmod 6755 /mnt/sdcard-ext/shell/* > /dev/null 2>&1 && echo PASS"') do set retval=%%l
if "%retval%" neq "PASS" set message=Unable to chmod scripts. && goto abort
If anyone can help me fix this problem I should be able to automate the chmod process using ririal's suggestion of su -c. The problem is that there are too many nested quotation marks in this section of the batch file, and I can't for the life of me figure out how to escape quotes so they pass through to adb:
Code:
set retval=
for /f "tokens=*" %%l in ('%~dps0adb.exe shell "/system/bin/su -c [U]'/bin/chmod 6755 /mnt/sdcard-ext/shell/*'[/U] > /dev/null 2>&1 && echo PASS"') do set retval=%%l
if "%retval%" neq "PASS" set message=Unable to chmod scripts. && goto abort
The underlined bit is where I need to escape either single or double quotes.
the2dcour said:
The only easy workaround to that I can see at the moment is to
Code:
adb shell
su
chmod 777 /path-to-scripts/*
ls -l /path-to-scripts/*
make sure all the files are executable (should say rwxrwxrwx)
then remove the bit of code from 1.5.7.bat
Code:
set retval=
for /f "tokens=*" %%l in ('%~dps0adb.exe shell "/bin/chmod 6755 /mnt/sdcard-ext/shell/* > /dev/null 2>&1 && echo PASS"') do set retval=%%l
if "%retval%" neq "PASS" set message=Unable to chmod scripts. && goto abort
If anyone can help me fix this problem I should be able to automate the chmod process using ririal's suggestion of su -c. The problem is that there are too many nested quotation marks in this section of the batch file, and I can't for the life of me figure out how to escape quotes so they pass through to adb:
Code:
set retval=
for /f "tokens=*" %%l in ('%~dps0adb.exe shell "/system/bin/su -c [U]'/bin/chmod 6755 /mnt/sdcard-ext/shell/*'[/U] > /dev/null 2>&1 && echo PASS"') do set retval=%%l
if "%retval%" neq "PASS" set message=Unable to chmod scripts. && goto abort
The underlined bit is where I need to escape either single or double quotes.
Click to expand...
Click to collapse
^ escapes batch, \ escapes shell. Hope this helps. If you zip up and send me the whole process in a single .sh file I can wrap it up in CWM for you.

[ROOT][HOW-TO]Working Root Method for ICS 4.0.4

** Update ****************
************************
Posted a .zip with scripts for both Windows and *nix users to automate the process.
Linux:
-----
Unzip the contents of the attached ICS404root.zip anywhere on your computer and run the script aptly named "runme_root_script.sh". It should take care of the rest. Make sure you have USB Debugging enabled and you put the phone in Camera mode, not mass storage device.
Windows:
---------
Unzip ICS404root.zip wherever you want and then run "rootscript.bat". Make sure you have USB Debugging enabled and you put the phone in Camera mode, not mass storage device.
*************************
*************************
Credit to miloj for finding this technique on the Transformer. (See the thread noted below and be sure to thank him!) I modified it to work on our devices.
http://forum.xda-developers.com/showthread.php?t=1704209
I'll put together a script to automate this process shortly, but if you're antsy like me, here's the lowdown:
1. Download the following files:
su: http://db.tt/ShPzea6I
debugfs: http://db.tt/bGFh43LZ
2. Save the two files downloaded above on /sdcard. (ie: mount your sdcard in windows and copy them over, or "adb push" them to /sdcard).
**Make sure you have your phone on Mount Camera mode, not as a mass storage device; otherwise, you won't be able to access your /sdcard directory via adb. **
3. In a linux terminal/Windows command prompt:
Code:
adb shell
[email protected]_maserati:/ $ cd /sdcard
[email protected]_maserati:/ $ cp su /data/local/12m/
[email protected]_maserati:/ $ cp debugfs /data/local/12m/
[email protected]_maserati:/ $ cd /data/local/12m
[email protected]_maserati:/ $ chmod 755 debugfs
[email protected]_maserati:/ $ chmod 755 su
[email protected]_maserati:/ $ mv batch batch.bak
[email protected]_maserati:/ $ ln -s /dev/block/mmcblk1p20 batch
[email protected]_maserati:/ $ exit
adb reboot
4. While you are waiting for the phone to reboot, type the following into your terminal/command window:
Code:
adb wait-for-device shell
5. Once you're back into the android shell:
Code:
[email protected]_maserati:/ $ cd /data/local/12m
[email protected]_maserati:/ $ rm batch
[email protected]_maserati:/ $ mv batch.bak batch
[email protected]_maserati:/ $ /data/local/12m/debugfs -w /dev/block/mmcblk1p20
(The following is entered at the "debugfs:" prompt)
debugfs: # cd xbin
debugfs: # write /data/local/12m/su su
debugfs: # set_inode_field su mode 0104755
debugfs: # set_inode_field su uid 0
debugfs: # set_inode_field su gid 0
debugfs: # quit
[email protected]_maserati:/ $ cd /data/local/12m
[email protected]_maserati:/ $ rm su
[email protected]_maserati:/ $ rm debugfs
[email protected]_maserati:/ $ exit
adb reboot
Done deal. Now you've got the "su" binary pushed to your /system partition and set with the proper permissions for execution. Download the Superuser app from the market and you're good to go. Make sure you update the su binary within the Superuser app as well to make sure you're up to date.
Awesome! Were you able to upgrade to the latest leak and not lose root? Btw, what carrier are you on? I figured out how to get tethering fully functional on rogers but the process requires root...
Sent from my XT894 running ICS
You bet. I had to fastboot the leaked .208 update over top of the .206 update yesterday because I messed up my /system partition; I had used the OTA Rootkeeper to keep root permissions when upgrading from .219 but had foolishly disabled it right before I bungled everything up.
So to sum it up, this method didn't require anything to be done before updating to the .208 leak; since it has nothing to do with the technical details of the kernel itself, I'm fairly certain it should work for the .200 or .206 leaks as well. Root permissions were obtained from a completely stock system.
I'm in Canada with Bell but it doesn't matter because I imported the phone from the US; Verizon is the only carrier that has this phone. At any rate, this method is pretty universal, it is preying on a vulnerability present in the stock init.rc file and I bet it would work on other phones such as the RAZR as well.
So we can confirm this is 100% working with Fastbooting back and moving to 208? If so I will probably jump on this immediately.
I am trying to do this method but I cant adb to detect my phone. Im on the .208 leak. Can anybody help?
Have you enabled USB Debugging in the Settings->Developer Options menu?
Rick#2 said:
Have you enabled USB Debugging in the Settings->Developer Options menu?
Click to expand...
Click to collapse
Yep.
Not able to reboot, trying manually...
Code:
debugfs: /data/local/12m/su: Permission denied
debugfs: su: File not found by ext2_lookup
debugfs: su: File not found by ext2_lookup
debugfs: su: File not found by ext2_lookup
Had to reboot manually twice. This is the only error message I received. Tried Superuser, but it stops.
I'm on .200 btw.
droidian1441 said:
Yep.
Click to expand...
Click to collapse
I'm having the same issue. I'm on the 208 leak. I start command prompt in windows then type "adb shell" and I get the "device not found" message. I enabled usb debugging and my phone is connected as mass storage.
Likewise, Reboot requires su access, manual only. When I go and run the write command in debugfs permission denied. Any ideas what would cause this? Based on the code shown in the first post, SU had been already acquired(# vs $), which makes me wonder here.
Die Bruine said:
Not able to reboot, trying manually...
Code:
debugfs: /data/local/12m/su: Permission denied
debugfs: su: File not found by ext2_lookup
debugfs: su: File not found by ext2_lookup
debugfs: su: File not found by ext2_lookup
Had to reboot manually twice. This is the only error message I received. Tried Superuser, but it stops.
I'm on .200 btw.
Click to expand...
Click to collapse
Looks like you're doing something wrong with the debugfs command; you don't want to enter /data/local/12m/su at that prompt.
Running su from any partition other than /system will lead to a permissions error, so you don't want to bother trying to execute it from the /data/local/12m location.
(The following is entered at the "debugfs:" prompt, ie: after executing /data/local/12m/debugfs -w /dev/block/mmcblk1p20; see step 5.)
Code:
debugfs: # cd xbin
debugfs: # write /data/local/12m/su su
debugfs: # set_inode_field su mode 0104755
debugfs: # set_inode_field su uid 0
debugfs: # set_inode_field su gid 0
debugfs: # quit
Grizzy3 said:
I'm having the same issue. I'm on the 208 leak. I start command prompt in windows then type "adb shell" and I get the "device not found" message. I enabled usb debugging and my phone is connected as mass storage.
Click to expand...
Click to collapse
Ive got the same situation over here. I can stick without root, just the fact that I would have it again would be just the single reason to do it. Lol.
Sent from my DROID4 using Tapatalk 2
Code:
debugfs 1.42 (29-Nov-2011)
debugfs: cd xbin
cd xbin
debugfs: write /data/local/12m/su su
write /data/local/12m/su su
/data/local/12m/su: Permission denied
Rick, that's what we're putting in. From the code you posted it shows that you had root access already. Do you have any other suggestions on this? Because that's the in and out I get.
---------- Post added at 04:57 AM ---------- Previous post was at 04:53 AM ----------
Problem resolved. Need to run the following code:
Code:
chmod 755 debugfs
chmod 755 su
Then continue with rooting.
gdeeble said:
From the code you posted it shows that you had root access already.
Click to expand...
Click to collapse
Not sure where you're making this assumption from. I just wrote the "#" symbol in there to signal where to start entering commands... though I suppose you're correct in pointing out that the "#" shows up on a root prompt. A smarter choice probably would have been "$".
Trust me, I'm not an idiot. I wouldn't have gone through the hassle of writing up the guide in the first post if it didn't work.
Didn't mean it that way, just looked like it already had root, which was what confused me. But thanks again for this. :-D
Tried it again. This time no errors and the phone rebooted. But now Superuser keeps on FC .
Reinstalled superuser, updated and busybox. Now rooted! Thnx.
BTW, you might wanna update the OP. Do not batch the commands under windows. I tried several times. I think there is something wrong with the timing. Manually entering all the commands in a shell works. But putting them in a batch will enter them too fast for ADB to handle (under Windows shell) I guess.
Die Bruine said:
BTW, you might wanna update the OP. Do not batch the commands under windows. I tried several times.
Click to expand...
Click to collapse
I don't know, it seemed to work fine for me with the script I made. Anyways, glad it worked out for you.
Now that we can re-root as well as (somewhat convolutedly) fastboot ourselves back on track, we're good to go.
droidian1441 said:
Ive got the same situation over here. I can stick without root, just the fact that I would have it again would be just the single reason to do it. Lol.
Sent from my DROID4 using Tapatalk 2
Click to expand...
Click to collapse
As stated in the guide, you need to be in camera mode not mass storage.
Sent from my DROID4 using XDA
I was trying to do it manually last night before the OP posted the batch file, and it was not working because I was in MTP instead of PTP. SO make sure you use PTP.
Put your phone in camera (PTP) mode for the USB connection and it should work fine. Also, after it completes, download Superuser from the market.
I ran Titanium Backup after everything and it told me it needed to fix my su binary permissions or something like that... I let it do its thing... Either way, IT WORKED!!!!!
I put it in camera mode and made sure usb debugging is enabled. Then I ran the script for windows. Still getting the device not found error throughout. Really don't know what's going on.

(SOLVED)--Require of sim unlock ...how to carry out instruction

------------------------------------SOLVED---------------------------------------------------------------------
JUST CARRIED OUT THE COMMANDS IN CWM RECOVERY ....THAT SOLVED ALL PROBLEMS
I have htc j one ...japanese htc one
Hboot is 1.52 and android 4.1.2
I have been able to s off, unlock bootloader using revone
I have flash cwm and rooted phone
Now I need to sim unlock the phone with some adb commands given in the below mentioned website :-
http://htcsoku.info/htcsokudev-news/au-m7-device-sim-unlock/
You can easily auto translate the above page if u open it in google chrome
Can anyone help me with that ?
Thanks in advance
Sent from my GT-N7000 using xda premium
download and unrar this in adb folder >>> http://www.androidfilehost.com/?fid=23159073880933098
they edited misc.img and say to do this :
adb push misc.img /
adb shell
# dd if=/misc.img of=/dev/block/mmcblk0p19
# reboot
hope it helps
criszz said:
download and unrar this in adb folder >>> http://www.androidfilehost.com/?fid=23159073880933098
they edited misc.img and say to do this :
adb push misc.img /
adb shell
# dd if=/misc.img of=/dev/block/mmcblk0p19
# reboot
hope it helps
Click to expand...
Click to collapse
Thanks for replying
I will download this file and put in adb folder
I shud do
adb push misc.img
( is this commabd correct or do I need to to put / ar back)
Then
Adb shell
It shows $ at the end
So it type
Su
Now it becomes #
Then I shud type
dd if=/misc.img of=/dev/block/mmcblk0p19
# reboot
Am I correct ?
Plz help as I am noob in this ...but am trying to learn
Sent from my GT-N7000 using xda premium
The auto-translated instructions are not good enough, and this is a very risky procedure. Fortunately, with code you usually don't need to read the words to understand it. Fortunately, with my Japanese-speaking colleague's help, I understand everything. Some things to know:
- Don't try this unless you are content to risk your phone, because I can tell he made mistakes in his instructions
- To reiterate, you either need to follow his incorrect instructions or you need to listen to me (why would you do that?)
- Look at the code blocks--all that code is meant to be run on your computer while the phone is connected to USB.
- There is only one complicated step, and this is the one with the incorrect instructions.
What he says:
Open misc.img in a hex editor, represent [00001023] as [11] and save. If you are lazy, use the file I modified already. <link>
There are two problems with this statement. First, "00001023" is not a reasonable position in the file. It means "line 10, column 3" (lines start with zero, columns start with zero). But there are 16 bytes per line, so what he really means is "byte 147". (Each pair of hex characters is a byte. The lowest value is 00, the highest value is ff.)
The second problem is that in his "already modified" file, that byte is "00", not "11". This is what I expected, because it's not reasonable for number="11" to mean "unlocked". More likely, "11" is his carrier and "00" is when the phone is unlocked.
What I advise is getting your carrier to unlock the phone, and if that's not possible, proceed only if you are willing to risk your phone. Follow his instructions, but when you get your misc.img file, download his modified version and compare them. If they differ in only one position, install his file to your phone (as per the instructions). If they are very different but the same size, you can try changing byte 147 to 00 (if the surrounding bytes are also all 00). Save the unmodified .img file, because you might be able to use it to rescue your phone if this fails.
Note: this is risky, with or without language barrier issues. At least 10% chance of bricking your phone.
Thanks a lot for your advice.
But it is not possible to carrier unlock the phone
Is there any safe way to sim unlock the phone ?
Currently am stuck ...
Sent from my GT-N7000 using xda premium
sitanshu91 said:
But it is not possible to carrier unlock the phone
Is there any safe way to sim unlock the phone ?
Click to expand...
Click to collapse
I think it's probably safe to flash the misc.img file he uploaded and linked to, if (and only if) it is exactly the same as yours, except for that one byte. Low chance of bricking the phone.
But currently can you tell me to how to pull the image coz I havr followed his command ...
Adb shell
It strt with $
Su
Now # come
Then somd dd comand
Here it shows operation cannot complete(will update what is exactly error in few min)
Exit
Adb pull misc.img
Here it shows error device not detected
Can you help me to first pull file so I can compare
Sent from my GT-N7000 using xda premium
Weird... you got a successful ADB shell, then it stopped detecting your device? I suppose you should just try again.
My phone is not the same as yours, so you shouldn't compare your partition19 to mine. You have a phone specific to Japan, right?
fenstre said:
Weird... you got a successful ADB shell, then it stopped detecting your device? I suppose you should just try again.
My phone is not the same as yours, so you shouldn't compare your partition19 to mine. You have a phone specific to Japan, right?
Click to expand...
Click to collapse
see this is what i get
C:\adb\adt-bundle-windows-x86-20131030\sdk\platform-tools>adb shell
[email protected]:/ $ su
su
[email protected]:/ # dd if=/dev/block/mmcblk0p19 of=/misc.img
dd if=/dev/block/mmcblk0p19 of=/misc.img
/misc.img: cannot open for write: Read-only file system
1|[email protected]:/ #
can you tell me why it says " /misc.img: cannot open for write: Read-only file system "
requesting your help
thanks
sitanshu91 said:
can you tell me why it says " /misc.img: cannot open for write: Read-only file system "
Click to expand...
Click to collapse
That's actually normal (because you're not supposed to write to the root of the phone's filesystem). Every time the instructions say "/", you can replace it with "/sdcard/", and every time they say "/misc.img", you can think "/sdcard/misc.img". (The instructions were carelessly written.)
fenstre said:
That's actually normal (because you're not supposed to write to the root of the phone's filesystem). Every time the instructions say "/", you can replace it with "/sdcard/", and every time they say "/misc.img", you can think "/sdcard/misc.img". (The instructions were carelessly written.)
Click to expand...
Click to collapse
so you say i should proceed
see again i did the same
C:\adb\adt-bundle-windows-x86-20131030\sdk\platform-tools>adb devices
List of devices attached
HT35Z******* device
C:\adb\adt-bundle-windows-x86-20131030\sdk\platform-tools>adb shell
[email protected]:/ $ su
su
[email protected]:/ # dd if=/dev/block/mmcblk0p19 of=/misc.img
dd if=/dev/block/mmcblk0p19 of=/misc.img
/misc.img: cannot open for write: Read-only file system
1|[email protected]:/ # exit
exit
1|[email protected]:/ $ adb pull misc.img
adb pull misc.img
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|[email protected]:/ $
now how should i proceed ....please help
Guys requesting help before the new year starts
So I can use my phone in new year
Sent from my GT-N7000 using xda premium
sitanshu91 said:
/misc.img: cannot open for write: Read-only file system
Click to expand...
Click to collapse
are you doing this is fastboot? / recovery? is your device bootloader unlocked through htc dev?
Kasi!995 said:
are you doing this is fastboot? / recovery? is your device bootloader unlocked through htc dev?
Click to expand...
Click to collapse
yes this is unlocked bootloader ...i have done it thru revone
now i have installed busybox
and i can progress
C:\adb\adt-bundle-windows-x86-20131030\sdk\platform-tools>adb devices
List of devices attached
HT3******* device
C:\adb\adt-bundle-windows-x86-20131030\sdk\platform-tools>adb shell
[email protected]:/ $ su
su
[email protected]:/ # dd if=/dev/block/mmcblk0p19 of=/misc.img
dd if=/dev/block/mmcblk0p19 of=/misc.img
2045+0 records in
2045+0 records out
1047040 bytes transferred in 0.106 secs (9877735 bytes/sec)
[email protected]:/ # exit
exit
[email protected]:/ $ adb pull misc.img
adb pull misc.img
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|[email protected]:/ $
can you help me now
i want to do as written in this
http://htcsoku.info/htcsokudev-news/au-m7-device-sim-unlock/
thanks
sitanshu91 said:
can you help me now
i want to do as written in this
http://htcsoku.info/htcsokudev-news/au-m7-device-sim-unlock/
thanks
Click to expand...
Click to collapse
what Recovery do you have flashed? TWRP?
Its cwm recovery
Sent from my GT-N7000 using xda premium
Run adb pull outside of adb shell.
1st problem :-
C:\adb\adt-bundle-windows-x86-20131030\sdk\platform-tools>adb shell
[email protected]:/ $ su
su
[email protected]:/ # dd if=/dev/block/mmcblk0p19 of=/misc.img
dd if=/dev/block/mmcblk0p19 of=/misc.img
2045+0 records in
2045+0 records out
1047040 bytes transferred in 0.106 secs (9877735 bytes/sec)
[email protected]:/ # exit
exit
[email protected]:/ $ adb pull misc.img
adb pull misc.img
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|[email protected]:/ $
can you tell me where is my mistake
What can I do can you type command
2nd problem
similiarly when i try
C:\adb\adt-bundle-windows-x86-20131030\sdk\platform-tools>adb push misc.img /
failed to copy 'misc.img' to '//misc.img': Permission denied
request you to please help me
thanks and regards
Sent from my GT-N7000 using xda premium
what is your status now?
criszz said:
what is your status now?
Click to expand...
Click to collapse
i am very glad that you asked .....happy new year
Now my status is sim unlocked ....but i can use only to make and receive phone calls and sms ...
now here is the problem
i cant use data (2g/3g) on my phone
do u know how to do that
thanks
sitanshu

[Guide] Remove magisk modules without TWRP!

First of all, this was all made possible by s3axel
Now on to the tutorial:
Flash s3axel's stock recovery with adb enabled (Tutorial in post)
Now you have that, boot into the recovery and put in your security method (pattern, pin, etc)
Now open CMD and type "adb shell"
To find a specific module
type "ls -Ral data/adb/modules"
Now to remove the magisk module
type "rm -r data/adb/modules/module_name"
(module_name is the name of the module)
I'll be sure to try and help with any questions in the comments so don't be shy to ask
Don't you have to cd to a path before executing the remove command?
EDIT:
You have to cd to data/adb/modules and then run the rm -r command. It worked perfectly! Now I can actually try different modules. Thanks!
Sent from my OnePlus7TPro using XDA Labs
Lossyx said:
Don't you have to cd to a path before executing the remove command?
EDIT:
You have to cd to data/adb/modules and then run the rm -r command. It worked perfectly! Now I can actually try different modules. Thanks!
Sent from my OnePlus7TPro using XDA Labs
Click to expand...
Click to collapse
Sorry forgot that yeah, thanks for the heads up. I edited the post
HolyChickenGuy said:
First of all, this was all made possible by s3axel
type "rm -r data/adb/modules/module_name"
Click to expand...
Click to collapse
Remembers me of how to shoot yourself in the foot with bash...
Code:
$ ls
foot.c foot.h foot.o toe.c toe.o
$ rm * .o
rm:.o no such file or directory
$ ls
$
Always be carefull when using "rm -r" or "rm -rf". :laugh:
thank you very much for you post, really helped me
I followed this guide but didn't succeed!
When imputing the command "ls -ral /data/adb/modules" I get the message that there is not that file or directory...
Inputing "ls -ral /data/adb" I find that there are 2 directorys under /adb: "system" and "root", but no "modules"
I'm stuck here. please help me
salomaoa said:
I followed this guide but didn't succeed!
When imputing the command "ls -ral /data/adb/modules" I get the message that there is not that file or directory...
Inputing "ls -ral /data/adb" I find that there are 2 directorys under /adb: "system" and "root", but no "modules"
I'm stuck here. please help me
Click to expand...
Click to collapse
I think you can use "cd file_name" to enter file
"cd .." to back
You can type "ls" to show any file
And you go in the file and type "rm -r *" to remove all file and folder
ricky886 said:
I think you can use "cd file_name" to enter file
"cd .." to back
You can type "ls" to show any file
And you go in the file and type "rm -r *" to remove all file and folder
Click to expand...
Click to collapse
I was hoping you could guide me? I want to delete lock.ogg and unlock.ogg in system/product/media/ui folder and copy new ones. BTW, I have got the adb enabled img of 10.0.8...
adeelsmatrix said:
I was hoping you could guide me? I want to delete lock.ogg and unlock.ogg in system/product/media/ui folder and copy new ones. BTW, I have got the adb enabled img of 10.0.8...
Click to expand...
Click to collapse
You'll have to use magisk for that.
System is permanent read only in Android 10
Sent from my OnePlus7TPro using XDA Labs
adeelsmatrix said:
I was hoping you could guide me? I want to delete lock.ogg and unlock.ogg in system/product/media/ui folder and copy new ones. BTW, I have got the adb enabled img of 10.0.8...
Click to expand...
Click to collapse
You can try this to remove that two files
Adb shell
CD system/product/media/ui
Rm lock.ogg
Rm unlock.ogg
ricky886 said:
You can try this to remove that two files
Adb shell
CD system/product/media/ui
Rm lock.ogg
Rm unlock.ogg
Click to expand...
Click to collapse
Thanks for the reply bro, Actually I need to overwrite these two files with the files of same names. So how to put new files with the same names. PEACE...
adeelsmatrix said:
Thanks for the reply bro, Actually I need to overwrite these two files with the files of same names. So how to put new files with the same names. PEACE...
Click to expand...
Click to collapse
Check this
https://adbshell.com/commands
I think you can use cp(copy) or mv(move) commands
Lossyx said:
You'll have to use magisk for that.
System is permanent read only in Android 10
Sent from my OnePlus7TPro using XDA Labs
Click to expand...
Click to collapse
How magisk could help in this regard. Is there any specific module...?
---------- Post added at 07:23 AM ---------- Previous post was at 07:22 AM ----------
ricky886 said:
Check this
https://adbshell.com/commands
I think you can use cp(copy) or mv(move) commands
Click to expand...
Click to collapse
Thanks, I'll try this...
ricky886 said:
Check this
https://adbshell.com/commands
I think you can use cp(copy) or mv(move) commands
Click to expand...
Click to collapse
I can enter into systems but adb shell is displaying only three directories/folders (bin, etc and lib64). I can't get into system/product/media/audio/ui folder. Any suggestions....?
As I know off you can't mount system rw in Android 10 for now...
salomaoa said:
I followed this guide but didn't succeed!
When imputing the command "ls -ral /data/adb/modules" I get the message that there is not that file or directory...
Inputing "ls -ral /data/adb" I find that there are 2 directorys under /adb: "system" and "root", but no "modules"
I'm stuck here. please help me
Click to expand...
Click to collapse
I am stuck here as well, "ls -ral /data/adb" tells me no such file or directory.
"ls -ral /data" only returns
# ls -Ral data
data:
total 0
drwxr-xr-x 2 root root 40 2019-12-25 01:32 .
drwxr-xr-x 28 root root 1100 1970-03-14 14:38 ..
I installed a Magisk module and Now im stuck in boot animation. Have no way of uninstalling at the moment. Please let me know if you have a solution
thanks for this guide !!
c19932 said:
I am stuck here as well, "ls -ral /data/adb" tells me no such file or directory.
"ls -ral /data" only returns
# ls -Ral data
data:
total 0
drwxr-xr-x 2 root root 40 2019-12-25 01:32 .
drwxr-xr-x 28 root root 1100 1970-03-14 14:38 ..
I installed a Magisk module and Now im stuck in boot animation. Have no way of uninstalling at the moment. Please let me know if you have a solution
Click to expand...
Click to collapse
Looks like you forgot the "/" infront of data so unless you are already in the root directory it is listing the contents of the directory "data" that is in your current location which it looks like doesn't exist.
Either run
# ls -Ral /data
or
# cd /
# ls -Ral data
Hope that helps ya out.
Stay Kung Flu Free
Later
Thanks for this helpful guide,
Just an FYI for my 10.0.7AA i reboot into recovery but i cannot decrypt, however I could use those commands and helped me remove the modules.
However, the phone is still not booting, does it have anything to do with the recovery pushed? Do I need to then go place the stock recovery back?
Or has it got something else wrong?
Thanks again.
Another way with a computer running adb:
If adb debugging is enabled:
"adb wait-for-device shell magisk --remove-modules"
If not, flash the stock boot.img, enable USB debugging, flash the magisk_patched_boot.img and then run the command.
It will remove all modules even if your SystemUI crashes. If you are stuck before adb commands can be issued, the OT's tutorial will do.
Macusercom said:
Another way with a computer running adb:
If adb debugging is enabled:
"adb wait-for-device shell magisk --remove-modules"
If not, flash the stock boot.img, enable USB debugging, flash the magisk_patched_boot.img and then run the command.
It will remove all modules even if your SystemUI crashes. If you are stuck before adb commands can be issued, the OT's tutorial will do.
Click to expand...
Click to collapse
Thanks, good to know!
So only prerequisite is that ADB/USB debugging is enabled and it works for both Magisk and Xposed modules?

Categories

Resources