tinysu: Compatible "su" command for Root Explorer / for HC images and what not? - Nook Color Android Development

tinysu: Compatible "su" command for Root Explorer / for HC images and what not?
So, I just installed HoneyComb to my NC's eMMC. Works well!
Unfortunately apps such as Root Explorer are not too happy because the "su" command provided with these ROMs is too chatty and that confuses them.
So, here is a very quiet, working "su" command. With it, Root Explorer will happily remount partitions, etc.
Note that, like the ROM's "su" command, SuperUser is out of the picture so use with care.
To install, using adb:
Code:
adb shell
mount -o remount,rw /dev/block/mmcblk0p5 /system
exit
adb push su /system/
adb shell
busybox cp /system/su /system/bin/
mount -o remount,ro /dev/block/mmcblk0p5 /system
All done. Note that the "busybox cp" should preserve the application's suid bit.

been there done that... lol
http://forum.xda-developers.com/showpost.php?p=11304464&postcount=46
no worries.
Even the Superuser application works now: http://forum.xda-developers.com/showthread.php?t=953110\
cyansmoker said:
So, I just installed HoneyComb to my NC's eMMC. Works well!
Unfortunately apps such as Root Explorer are not too happy because the "su" command provided with these ROMs is too chatty and that confuses them.
So, here is a very quiet, working "su" command. With it, Root Explorer will happily remount partitions, etc.
Note that, like the ROM's "su" command, SuperUser is out of the picture so use with care.
To install, using adb:
Code:
adb shell
mount -o remount,rw /dev/block/mmcblk0p5 /system
exit
adb push su /system/
adb shell
busybox cp /system/su /system/bin/
mount -o remount,ro /dev/block/mmcblk0p5 /system
All done. Note that the "busybox cp" should preserve the application's suid bit.
Click to expand...
Click to collapse

LOL.
I actually love that our community is so hard at work that this sort of thing happens

Related

Superuser.apk

I have successfully installed a Superuser.apk but it does not seem to be working properly. Titanium reports that Su does not elevate to root.
I have debugging enabled and I have connected through adb shell but nothing seems to work.
Anyone have any success? If so, which version did you use?
Here is my method
I download 2nd link from here :
http://forum.xda-developers.com/showthread.php?t=682828
After unzip (E:\Android\ROOT\step4\ directory for my example) :
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb push E:\Android\ROOT\step4\system\bin\su /system/bin/su
adb shell chmod 6777 /system/bin/su
adb install E:\Android\ROOT\step4\system\app\Superuser.apk
adb reboot
trying this now, will report
thanks a lot works like a charm..
i can confirm this works perfect
very good... spread 30min to install it yesterday night...
Will be included in new version. Sorry just forgotten
Regards
Bin4ry
You make very good job so no problem for that
Thank a lot for your hard work !
gibou13 said:
Here is my method
I download 2nd link from here :
http://forum.xda-developers.com/showthread.php?t=682828
After unzip (E:\Android\ROOT\step4\ directory for my example) :
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb push E:\Android\ROOT\step4\system\bin\su /system/bin/su
adb shell chmod 6777 /system/bin/su
adb install E:\Android\ROOT\step4\system\app\Superuser.apk
adb reboot
Click to expand...
Click to collapse
I am trying to do same thing with mediascape , but I get error
"Failure [INSTALL_FAILED_DEXOPT]", I am reading on google that its something related to the .odex file, how can I install/or whatever I have to do in order to be able to put mediascape back.
I know I just could restore and than root again and remove rm command for mediascape from ch file, but I am trying to remove more branding apps of telenor firmware and flash and root again with clean system.
PS: Messing with my phone as I don't have any knowledge in programming...just google.
Thx
Hi
You can try to do this :
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
cd /system/app
cp /sdcard/apps/mediascape* .
cp /sdcard/apps/MediascapePluginManager* .
reboot
gibou13 said:
Hi
You can try to do this :
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
cd /system/app
cp /sdcard/apps/mediascape* .
cp /sdcard/apps/MediascapePluginManager* .
reboot
Click to expand...
Click to collapse
never mind guys Jerpelea posted how to do it.
jerpelea said:
restore mediascape (from step4 folder)
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb shell dd if=/sdcard/apps/MediascapePluginManager.apk of=/system/app/MediascapePluginManager.apk
adb shell dd if=/sdcard/apps/MediascapePluginManager.odex of=/system/app/MediascapePluginManager.odex
adb shell chmod 644 /system/app/MediascapePluginManager*
adb shell dd if=/sdcard/apps/mediascape.apk of=/system/app/mediascape.apk
adb shell dd if=/sdcard/apps/mediascape.odex of=/system/app/mediascape.odex
adb shell chmod 644 /system/app/mediascape*
adb shell reboot
Click to expand...
Click to collapse
I got mediascape back as I did't find better media explorer.
One thing can anyone explain what this lines of code mean(Jerpelea's mediascape restore), each separate if u can, I am trying to understand. As I said I am no programmer but I like to learn.
Thanks.
I've tried doing this 4 times... and it's not working ^^;;
Is it missing a step? Or is this all that I need to do?
I get no errors when doing it yet the program isn't working a shown in the screens realunited... ^^;
taye look into the second post of the guide thread -- it has all the info necessary, else: poke me on irc
gibou13 said:
Here is my method
I download 2nd link from here :
http://forum.xda-developers.com/showthread.php?t=682828
After unzip (E:\Android\ROOT\step4\ directory for my example) :
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb push E:\Android\ROOT\step4\system\bin\su /system/bin/su
adb shell chmod 6777 /system/bin/su
adb install E:\Android\ROOT\step4\system\app\Superuser.apk
adb reboot
Click to expand...
Click to collapse
sorry for this very very noob question...
where i try this command?
at windows?
or at my android device with better terminal?
done...
i trying it my self..
sorry for my noob question...
anyway i still don't know how to use superuser lol....
greatermushasi said:
sorry for this very very noob question...
where i try this command?
at windows?
or at my android device with better terminal?
done...
i trying it my self..
sorry for my noob question...
anyway i still don't know how to use superuser lol....
Click to expand...
Click to collapse
It's done from a windows dos prompt. In windows, click on START > RUN > then enter CMD. Next do as mentioned. Happy entering
Confirmed... works for me as well.

Unable to browse /data/app-private with adb

I'm using the adb.exe command directly from the Android SDK to connect to my Xperia X10's file system. Here are the commands I issued:
D:\android_sdk\tools>adb shell
$ cd data/app-private
cd data/app-private
$ ls
ls
opendir failed, Permission denied
$ su
su
pwd
pwd
ls -l
ls -l
Permission denied
$ /data/app-private
$ opendir failed, Permission denied
$ exit
exit
D:\android_sdk\tools>
Two questions: 1) Why is it commands entered after typing "su" are echoed? 2) How come I can't browse the app-private directory even after entering su?
Thanks.
Have you rooted your X10 ? (think not)
A # prompt indicates superuser privileges, you did not get to be a superuser.
Why you get an echo I don't know.
mattiL said:
Have you rooted your X10 ? (think not)
A # prompt indicates superuser privileges, you did not get to be a superuser.
Why you get an echo I don't know.
Click to expand...
Click to collapse
Yes the phone is rooted. I have the AT&T branding, but used the one-click exploid to root the phone, and it works as Titanium Backup when running tells me it gained Superuser priviledges. I don't know what I'm doing wrong. This is from an MS-DOS prompt in Windows.
When you use SU for the first time, you need to have the phone screen on and unlocked. It will ask for superuser permissions. Then it will work.
naplesbill said:
When you use SU for the first time, you need to have the phone screen on and unlocked. It will ask for superuser permissions. Then it will work.
Click to expand...
Click to collapse
Ha, thanks, it worked. The key was typing SU just before I unlock the phone, then it asks me on the phone that "Unknown" wants superuser access. Thanks again.
I was finally able to apply the 'Enable Non-Market apps' fix via adb thanks to this little tip
I'm learning- slowly...
How exactly do I run scripts on this phone when connected to a PC?
Code:
C:\android_sdk\tools>adb shell
$ su
su
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
# cd sdcard
cd sdcard
# ls -l testscript.sh
ls -l testscript.sh
----rwxr-x system sdcard_rw 54 2010-10-06 10:52 testscript.sh
# sh testscript.sh
sh testscript.sh
: not foundsh: ■#!/bin/sh
: not foundsh: /sh
: not found
mkdir <target>
#
Any ideas?
If anyone told me "You should save your files in UNIX format where each text line ends in 0x0A, and not 0x0D 0x0A as in Windows, it will work" ... you'd be right. UNIX doesn't like carriage return & line feed pairs when trying to run a shell script.

permission denied - trying to push apk to /system/app

I know there are a ton of these topics here, Still having problems.
I'm trying to push a apk to /system/app
First I used adb shell and used su to remount /system/app
example:
Code:
adb shell
su
mount -o rw,remount -t ext4 /dev/block/mmcblk0p9 /system
I did this part successfully.
Here is my proof:
/dev/block/mmcblk0p9 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
Click to expand...
Click to collapse
The problem is I don't know how to push a *.apk thur a "adb shell". If I try, I get "push not found"
They only way I know how to push is using a regular linux terminal.
example:
Code:
linux_user:$ adb push /path/to/apk /system/app
however this only works on my Evo 4G (custom rom). On my Samsung Epic 4G (stock rom) I get a permission denied.
I tried adding a su like:
Code:
linux_user:$ adb [color=red]su[/color] push /path/to/apk /system/app
however, that does not seem to be a valid command.
I think I know what my problem is but I don't know how to solve it.
I think the problem is the default user is not #. For example in "adb shell" the default user is
$
and after su
it becomes
#
how do I fix this without switching to custom rom?
I hope I explained this in a way someone can understand.
Searched all over these forums and could not find a solution.
As a work around I installed an Android Terminal Emulator
then from the Android Emulator,
su
cd /sdcard
install name.apk /system/app
Click to expand...
Click to collapse
Best work around I could think of. Did I use the correct syntax? the emulator did not have adb or push.
Use Root Explorer
Try To put Your APK in system/app
change ro to rw
Then set the permission as same as other app in the system
then reboot...
I hope it will help your problem....

[Q] Unable to adb remount

"Operation not permitted"
What is causing this? I really want to push some files to my EVO.
Help
I have done it previously on other Roms i have flashed. I am currently on Goodies 1.5.
typhoonikan said:
"Operation not permitted"
What is causing this? I really want to push some files to my EVO.
Help
I have done it previously on other Roms i have flashed. I am currently on Goodies 1.5.
Click to expand...
Click to collapse
I believe the adb binary has to be replaced with one that has permission to do this, it is often disabled in stock builds.
an easy way around this is
adb shell
su
mount -o remount rw, /system
modplan said:
I believe the adb binary has to be replaced with one that has permission to do this, it is often disabled in stock builds.
an easy way around this is
adb shell
su
mount -o remount rw, /system
Click to expand...
Click to collapse
I typed just as you did. No help.
My results as copy and pasted:
c:\Android>adb shell
[email protected]:/ $ su
su
[email protected]:/ # mount -o remount rw, /system
mount -o remount rw, /system
[email protected]:/ # exit
exit
[email protected]:/ $ exit
exit
c:\Android>adb remount
remount failed: Operation not permitted
typhoonikan said:
I typed just as you did. No help.
My results as copy and pasted:
c:\Android>adb shell
[email protected]:/ $ su
su
[email protected]:/ # mount -o remount rw, /system
mount -o remount rw, /system
[email protected]:/ # exit
exit
[email protected]:/ $ exit
exit
c:\Android>adb remount
remount failed: Operation not permitted
Click to expand...
Click to collapse
What I posted remounts the system partition read/write. No need to adb remount after that, you can write to /system at that point.

[Help] Can't mount as read / write

Hi, I have a huawei y6
I rooted with kingroot, root checker says I have my phone rooted and i even managed to uninstall some apps like google movies and google music who were just wasting space but now I can't do anything because it only shows as read only and can't change to read/ write.
I have tried with
Root Browser, it was the one I was using at first
Root explorer
es file explorer
total command
super manager
also tried with
Code:
adb shell
su
mount -o rw,remount rootfs /
chmod 777 /system
and
Code:
su
mount -o remount,rw /system
only returns:
Code:
mount: Read-only file system
I don't know what else to do
docHolmes said:
Hi, I have a huawei y6
I rooted with kingroot, root checker says I have my phone rooted and i even managed to uninstall some apps like google movies and google music who were just wasting space but now I can't do anything because it only shows as read only and can't change to read/ write.
I have tried with
Root Browser, it was the one I was using at first
Root explorer
es file explorer
total command
super manager
also tried with
Code:
adb shell
su
mount -o rw,remount rootfs /
chmod 777 /system
and
Code:
su
mount -o remount,rw /system
only returns:
Code:
mount: Read-only file system
I don't know what else to do
Click to expand...
Click to collapse
make sure that u still have root access on ur device

Categories

Resources