B4A Library RootHelper (deprecated)

GMan

Well-Known Member
Licensed User
Longtime User
VERY Cool again :cool:
My SuperSU didnt ask at the sample apk, but allows access and is seen in the log
P.S.: found that issue: i set in the SuperSU as standard: ALLOW.
If i change it to ASK i will be asked as usual.
 
Last edited:

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Examples:

B4X:
'Reboot
Root.Execute("reboot")
Root.Execute("reboot recovery")
Root.Execute("reboot bootloader")
 
Last edited:

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Fast reboot:
B4X:
'Restart GUI by executing 2 commands at once
Root.ExecuteMultiple(Array As String("stop", "start"))
 
Last edited:

GMan

Well-Known Member
Licensed User
Longtime User
Root.Execute(ArrayAsString("stop", "start"))
Means: (temporary) unrootet and rooted ?
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
I just did a silent update (no version change)

Renamed ExecuteSingle to Execute and Execute to ExecuteMultiple in order to avoid naming confusion.
 

GMan

Well-Known Member
Licensed User
Longtime User
Works as good as the OLD version :p
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
It is my pleasure Erel! I can't get enough of your magical creation! There is nothing that can't be done with b4a!

Lets hope that the word will be spread out fast enough so that EVERY SINGLE ANDROID DEVELOPER starts coding with B4A!

:D
 
Last edited:

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Update: 1.1

  • Added: KeepAlive property. If set to true, the first command will keep the connection with superuser process open without the need of asking for permissions again until the app process is killed or KeepAlive property is set back to false.
 

walterf25

Expert
Licensed User
Longtime User
Update: 1.1

  • Added: KeepAlive property. If set to true, the first command will keep the connection with superuser process open without the need of asking for permissions again until the app process is killed or KeepAlive property is set back to false.
Can this library be used to install an application in the background, without any user interface?
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Yes it is possible after acquiring root permissions first. The code is not included though yet. Will add it in the next version.
 

walterf25

Expert
Licensed User
Longtime User
Yes it is possible after acquiring root permissions first. The code is not included though yet. Will add it in the next version.
Awesome, this is great, thank you, can't wait for the next release.
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Update: 1.2

RootHelper.InstallApk: Can be used to silently install apks. Once your app gets permanent root permissions, it will be able to silently install any apk (see sample2 in the RootHelper package or get the precompiled apk).

B4X:
Dim PathName As String = File.DirDefaultExternal
Dim FileName As String = "tutorial.apk"

'Copy the file from the DirAssets to the target location
File.Copy(File.DirAssets, FileName, PathName, FileName)

'Install the apk from the target location into the device
Dim Result As Boolean = Root.InstallApk(PathName, FileName)
 

walterf25

Expert
Licensed User
Longtime User
Update: 1.2

RootHelper.InstallApk: Can be used to silently install apks. Once your app gets permanent root permissions, it will be able to silently install any apk (see sample2 in the RootHelper package or get the precompiled apk).

B4X:
Dim PathName As String = File.DirDefaultExternal
Dim FileName As String = "tutorial.apk"

'Copy the file from the DirAssets to the target location
File.Copy(File.DirAssets, FileName, PathName, FileName)

'Install the apk from the target location into the device
Dim Result As Boolean = Root.InstallApk(PathName, FileName)
Thanks Periklis!
 
Top