So I'm working on a new ROM and i want to add super user put I'm a little pit confused where to put files.. i have multiple files put i don't know where they belong..
of course META-INF is where the commands to install the su from the recovery so here we don't need it..
but i have 3 other files i don't know where to put..
first x86 containing chattr and su
then common containing 99supersudaemon, install-recovery(i think we don't need thid too..),
and superuser.apk(which of course belongs to system/app..
finally we have arm which contains chattr and su too! so any one can help me there?
the zip is the latest su 1.94..
Related
I've been building from AOSP for a few weeks now and have a decent product, but there's a couple things that I have yet to work out.
First is adding root permissions (i.e. changing the permissions to su) from source. Currently, I have pulled this[URL] code from ChainsDD's github into my tree and added the Superuser.apk via my [URL="http://github.com/rmgeren/android_vendor_rmg/blob/master/products/rmg_passion.mk"]vendor file. Some things work, others don't. Rommanager seems to be fine, but Titanium Backup isn't. I think the problem is that su is installed into /system/bin but not xbin. When I use dsixda's rom kitchen it installs to both places and sets the permissions for su in my update-script.
Second part is more of a "like to have." I make a nice ROM, install it via RomManager (like everyone should!) and, as soon as I boot, I'm back into RomManager installing the custom recovery image.
Here's the question part:
How do I get su to install to /system/bin with a symlink to /system/xbin?
Can I just pull koush's recovery image source into my build and have a nice, custom recovery?
Is it better to just somehow not build the recovery image? How would I make that happen?
RMGeren said:
I've been building from AOSP for a few weeks now and have a decent product, but there's a couple things that I have yet to work out.
First is adding root permissions (i.e. changing the permissions to su) from source. Currently, I have pulled this[URL] code from ChainsDD's github into my tree and added the Superuser.apk via my [URL="http://github.com/rmgeren/android_vendor_rmg/blob/master/products/rmg_passion.mk"]vendor file. Some things work, others don't. Rommanager seems to be fine, but Titanium Backup isn't. I think the problem is that su is installed into /system/bin but not xbin. When I use dsixda's rom kitchen it installs to both places and sets the permissions for su in my update-script.
Second part is more of a "like to have." I make a nice ROM, install it via RomManager (like everyone should!) and, as soon as I boot, I'm back into RomManager installing the custom recovery image.
Here's the question part:
How do I get su to install to /system/bin with a symlink to /system/xbin?
Can I just pull koush's recovery image source into my build and have a nice, custom recovery?
Is it better to just somehow not build the recovery image? How would I make that happen?
Click to expand...
Click to collapse
For the symlink, just add the following to your updater-script (assuming you're using a binary update) immediately after you extract the system partition.
Code:
symlink("../xbin/su", "/system/bin/su");
If you include a recovery image in your build you will overwrite the users' recovery image which isn't such a good idea for a rom... I'd leave that one alone to be honest. And problems writing the image and you could bork their phone. It's easy though, just create the .img, put it in the root of your update zip and install it using your updater-script as such:
Code:
assert(package_extract_file("recovery.img", "/tmp/recovery.img"),
write_raw_image("/tmp/recovery.img", "recovery"),
delete("/tmp/recovery.img"));
I don't understand your third question sorry...
Thanks for the response! I actually solved the problem by including busybox as a pre built package and pulling the su source from chainsdd
Before, I was including the binary su
By compiling from his source, it installs the symlink correctly.
Sent from my Nexus One using XDA App
Can we flash rom using PC ?? Its not that big a deal but sounds cool to me.. i cudnt find any such option in nandroid-mobile.sh.. I mean after i reboot into recovery i dont want to press any buttons on my phone..Juts hook up the phone to pc and flash the new rom using say adb
It should be possible. When flashing zips, the recovery checks the update-script file found in the META-INF folder. Mimicking the steps there and inputting the correct adb commands and copying the files on the appropriate folders and partitions on your phone should yield the same results.
But as you may have guessed, this isn't practical.
so u mean to say that i unzip the contents of the zip archive and just execute the script from terminal ???That shud be it??? I know its impractical but wat the hell i love doing things from my debian terminal
Update: that script is just a set of messages to be shown during actual update process..it isnt the script ..
instead the script apparently "update-binary" is a binary executable and not a shell script..DO you think that unzip and calling this binary might work??
I'm not entirely sure. I think adb has it's limitations. Check other's replies xD
Dear All,
I have been accidentally move the /system/bin/sh file to my SD card,
now, all my app which need root was not function..
What should I do now...?
Please help..... T_T
Move it back.
thankz for reply..
But, any suggestion to move back?
cause now I can't move it back via my phone file manager as the sh file was a
read only file..
Please advise any suggestion that how i can move back
really need advise...
peter tham said:
thankz for reply..
But, any suggestion to move back?
cause now I can't move it back via my phone file manager as the sh file was a
read only file..
Please advise any suggestion that how i can move back
really need advise...
Click to expand...
Click to collapse
You can probably use adb or Terminal Emulator (Free on market) directly on your phone.
Regards
SprigganMaster said:
You can probably use adb or Terminal Emulator (Free on market) directly on your phone.
Regards
Click to expand...
Click to collapse
Dear SprigganMaster,if I use terminal emulator,what was the initial command?
Cause the 'sh' file I move from system,it seem like a script ,and when I open the scree of emulator,I can't type any things...
For your info,I move the 'sh' file from /system /bin/ folder to my SD card /folder.
by using apk root explore,as a result,without the 'sh' script file in /system/bin folder,when I can't access to root explore anymore-force close.
Then I can't move back the 'sh' file to the system/bin folder.
All those root apk does not work anymore...
Now,I am trying my best to get a way to move back the 'sh' file (which is read only file) to my system folder...
Can u guide me about it? Using terminal emulator or any alternative way to move back the file into system?
Waiting your prompt reply and really appreciate it.
Thankz....^^
Hello peter tham,
Please note : my phone is not rooted. I can't try these solutions and I'm quite new to android. Maybe someone with more experience could help you.
I'm not sure if Terminal Emulator use the sh file too but we can try...
To move file, the command is mv.
To copy a file, the command is cp.
Adapt this command with the correct folder where you put the sh file :
Code:
cp /FOLDER/sh /system/bin/
You will need to be root to copy a file to /system folder.
Usually, to gain root privileges, you use the command su.
If Terminal Emulator does not work, you can try with adb.
1- Download sh file to your computer.
2- open a shell (on windows : cmd, on linux whatever you're using as shell)
3- plug your phone in Charge Only mode with USB debuging On
4- Push the file with a command like this one :
Code:
adb push foo.txt /sdcard/foo.txt
adb push <local> <remote>
You can find more info on adb here :
http://wiki.cyanogenmod.com/wiki/ADB
and here :
http://developer.android.com/guide/developing/tools/adb.html
Good Luck
Hi,
I am Kit Blackheart, sorry this is my very first post here at XDA, hope you all are able to bear with my noob-ness
anyways,
I am building a custom stock-based rom for the lge google NEXUS 5, I am having some issues with the update-script part though...
*using flashable zips.
the problem is...i am trying to get the system to run a script, using run_program, but the binary requires SU, and it doesnt work when i run su through run_program inside the script itself....and it has to run the su command before running the script..
but even when i execute the SU binary before INSIDE the script *INSTEAD OF USING RUN_PROGRAM INSIDE THE UPDATE-SCRIPT , it doesnt work!
i have already chmodded both, the binary, the script and their dependencies...
and i know that this is the problem because the rom boots fine and i can execute the script perfectly from terminal emulator as long as i go SU before running it...
also can someone explain why many binaries just dont run or give any output when i run them with su?
does anyone have any idea?...x.x *sorry for being a noob...
also....just saying...i shall post the rom here in xda later! expect me again! xD
i want to know where will i find .su file.
i had updated su last time and i remember i have .su file in that zip file.
system/bin
system/xbin
system/bin/.ext/.su
i have attached the flashable zip also.
now i want to know if i flash the update file which i have downloaded from chainfire website, will it be safe, because in this zip file i cant see system folder and bin and xbin folder.??
and if possible can anyone tell me where to get proper flashable supersu zip? i have HTC desire x (Proto)
thanks.
You might want to download an up to date version to begin with. Seeing that is v1.04.