9988776665544332
を入力せずにrootとしてADBシェルを実行する方法はありますか?私はシェルに入らずにrootアクセスを持つことができたいです。
9988776665544332
を入力せずにrootとしてADBシェルを実行する方法はありますか?私はシェルに入らずにrootアクセスを持つことができたいです。
Is there a way for me to run Adb shell as root without typing in su
? I want to be able to have root access without going into the shell.
あなたの質問を正しく理解しているなら、 adb shell
を実行すると自動的にrootアクセスを取得する方法を尋ねてください。携帯電話のrootとしてコマンドを実行するための
これはブートパーティション内のフラグによって制御されます。これは、デフォルトでroot権限を許可するように最もカスタムROMが変更されました。 9988776654333
ににドロップした場合は、2つの永続的なオプションと1つの一時的なものがあります(一時的な意味では、再起動した場合はスティックではない意味)。< / P>
Number 2は実際には難しいことではありませんが、不注意な場合はやや危険になる可能性があります。 Wikiの記事があります。これはプロセスを説明し、カップルを含みます。あなたを助けるためのPerlスクリプトの。これらの手順はLinux / Unix環境を想定しています。私は個人的にFedora Linuxでこれらの指示を使いました、そして彼らが働くことをあなたに言うことができますが、私はMacのような他の* NIX環境について知りません。私はまた類似のWindowsの指示を知らないが、あなたがWindows上にいるならば、私はいくらかの追跡を試みることができました。異なるデバイスは異なるパーティションテーブルを使用しているため、正確なコマンドは電話から電話まで多少異なります。
一般的に言って、あなたの電話から現在のboot.imgを引き離し、解凍してRamdiskを抽出し、 default.prop ファイルを見つける必要があります。これはプレーンテキストファイルです。これはテキストエディタで開き、 998876665444355
を含む行を見つける必要があります。行が ro.secure=1
と表示されている場合は、 998877666544337
に変更する必要があります。その後、RAMDiskとboot.imgを再梱包することができ、それをあなたの携帯電話にフラッシュすることができます。再起動すると、<コード> 998877666544339 を実行せずに<コード> adb shell を登録します。
またはカスタムROMを使用しているがこの変更がない場合は、ROMを解凍して上記の手順を使用して組み込まれているboot.imgを変更することもできます。その後、新しく変更されたboot.imgを使用してROMを起動し、通常のようにzipファイルをフラッシュすることができます。
これはおそらく言うことなく行われますが、これを行うときにはに注意してください。ブートパーティションをめちゃくちゃにすると、携帯電話を大切にし、HBoot経由で回復するように強制できます。 FastBootをテストすることを強くお勧めし、拡張FastBootコマンドを使用してリカバリを実行できることを確認します。これはあなたのモデルに基づいてビットを変えますが、ほとんどの電話は電話をリフティングするために実行できるいくつかの種類のデスクトップソフトウェアを持っています。
3番目のオプションは、多くの場合、<コード> 99887766543311 をroot特権で再起動することが可能です。 1つの可能性は、PC端末から 9988776665443312
を実行することですが、これはすべてのROM構成では機能しません(ROMは「UserDebug」として作成する必要があります)。 ChainFireのADBD安全でないアプリケーションを試すこともできます。これは再起動にわたっては持続することはないので、携帯電話を再起動したときは、アプリまたは<コード> 998877665443313 のいずれかを再度使用する必要があります。
If I'm understanding your question correctly, you're asking how to get root access automatically when you run adb shell
, so that you don't have to go into the shell and type su
to execute a command as root on your phone.
This is controlled by a flag in your boot partition, which most custom ROMs have modified to allow root permission by default. If you get dropped to a $
when you use adb shell
then you have two permanent options and one temporary one (temporary meaning that it doesn't stick if you reboot):
adbd
on your device with root permissionsNumber 2 is actually not that difficult, but it can be somewhat dangerous if you're careless. There is a wiki article here which explains the process and includes a couple of Perl scripts to help you. These instructions assume a Linux/Unix environment. I have personally used these instructions on Fedora Linux and can tell you that they work, but I do not know about other *nix environments like Macs. I also do not know of any similar Windows instructions, but I could try to track some down if you are on Windows. The exact commands will vary somewhat from phone to phone since different devices use different partition tables.
Generally speaking, though, you need to pull your current boot.img from your phone, unpack it, extract the ramdisk, and find the default.prop file. This is a plaintext file, which you need to open in a text editor and then find the line that contains the value ro.secure
. If the line says ro.secure=1
then you need to change it to ro.secure=0
. After that you can re-pack the ramdisk and boot.img, then flash it to your phone. Once you reboot, you will be greeted with a #
prompt whenever you perform adb shell
without having to run su
.
Alternatively, if you are using a custom ROM but it doesn't have this modification, you can just unzip the ROM and modify the boot.img that is included with it using the above steps. Then you can zip up the ROM with the newly modified boot.img and flash the zip file as you normally would.
This probably goes without saying, but be careful when doing this. Messing with your boot partition can quite easily wreck your phone and force you to recover via HBoot. I would highly recommend testing Fastboot to makes sure you can use extended Fastboot commands and perform a recovery. This varies a bit based on your model, but most phones have some sort of desktop software that can be run to reflash the phone as well.
The third option is that in many cases it may be possible to restart adbd
on your device with root privileges. One possibility is to execute adb root
from a PC terminal, although this will not work on all ROM configurations (the ROM must be built as a "userdebug" one). You can also try Chainfire's adbd insecure app. This will not persist across a reboot, so you would need to use either the app or adb root
again any time you restarted your phone.
携帯電話の根本的な場合は、 "su -c"コマンドでコマンドを実行できます。
これは、Phones製品情報を取得するためのbuild.propファイルのcatコマンドの例です。
<コード> su4
これはroot権限を呼び出し、 ''
内のコマンドを実行しますあなたがすべてのあなたの終了引用符を閉じることが必要な5つの終了引用符に注意してください。
明確化のための形式はこのようなものです。
<コード> su5
シェルで実行しているときに通常どのような方法でコマンドを入力してください。
試してみて、これが役立つことを願っています。
Well if you phone is rooted you can run commands with the "su -c" command.
Here is an example of a cat command on the build.prop file to get a phones product information.
adb shell "su -c 'cat /system/build.prop |grep "product"'"
This invokes root permission and runs the command inside the ' '
Notice the 5 end quotes, that is required that you close ALL your end quotes or you will get an error.
For clarification the format is like this.
adb shell "su -c '[your command goes here]'"
Make sure you enter the command EXACTLY the way that you normally would when running it in shell.
Give it a try, hope this helps.
adbd安全で
。Simply install adbd Insecure.
rootとして何を走ろうとしていますか?あなたはrootでadbシェルを実行したいのですが、ADBシェルを使用したくないと言っていますか?あなたは明確にすることができますか?
アプリケーションがrootアクセス要求の場合、携帯電話のスーパーユーザーアプリケーションは、許可を与えるかどうかを扱います。携帯電話を根ざしたプロセスには、スーパーユーザーアプリケーションが含まれているはずです。
What are you trying to run as root for? You're saying that you want to run ADB shell with root but you don't want to use ADB shell? Can you clarify?
If the application requests for root access, then the SuperUser application on your phone should handle giving it permission or not. The process in which you rooted your phone should have included a SuperUser application.
代替として、あなたは電話にあなたのスクリプトを書くことができ、単にそれを実行するだけです、例えば:
<事前> <コード> commands0スクリプトはあなたの介入なしにそれ自身を上昇させることができます(スーパーユーザーが承認を忘れないように設定されている)、例えば:
<事前> <コード> commands1私の携帯電話で成功しただけで、私がADBシェルセッションをきれいに終わる方法を考え出していないということです。 Windowsのコマンドプロンプトに戻るには、私のWindowsシェルでCtrl-CをCTRL-Cにしなければなりません - それ以外の場合は #
プロンプトで座って入力を受け入れません。
As an alternative, you could write your script on the phone and simply have adb execute it, for example:
adb shell sh /sdcard/myscript.sh
The script can elevate itself without your intervention (assuming SuperUser is set to remember the approval), for example:
su pm setInstallLocation 1
I just did this on my phone with success, the only problem being that I haven't quite figured out how to cleanly end the adb shell session. I have to Ctrl-C in my Windows shell to return to the Windows command prompt -- otherwise adb just sits at the #
prompt and doesn't accept input.
修理用ホームボタンの発行失敗
ADB装置
ADBシェルSU -C <コード> commands3
または
adb rootシェルsqlite3 / data/data/com.android.providers.settings/databases/settings.db "セキュア(名前、値)値( 'device_provisioned'、 '1')への挿入。"
ADB Kill-Server
i use for repair home button issue failure
adb devices
adb shell su -c commands
or
adb root shell sqlite3 /data/data/com.android.providers.settings/databases/settings.db "INSERT INTO secure (name,value) VALUES ('device_provisioned','1');"
adb kill-server
SUIDビットを「SH」に設定することもできます。 私はBusyBoxを使ってあなたのセットアップと一致しないかもしれません:
とルートプロンプト
を持つべきですYou can also set the suid bit on your 'sh'. I'm using BusyBox so instructions may not match your setup:
and you should have the root prompt
© 2022 cndgn.com All Rights Reserved. Q&Aハウス 全著作権所有