B4A Library RootHelper (deprecated)

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:
Examples:

Code: Copy
'Reboot
Root.Execute("reboot")
Root.Execute("reboot recovery")
Root.Execute("reboot bootloader")
 
Last edited:
Fast reboot:
Code: Copy
'Restart GUI by executing 2 commands at once
Root.ExecuteMultiple(Array As String("stop", "start"))
 
Last edited:
Root.Execute(ArrayAsString("stop", "start"))
Means: (temporary) unrootet and rooted ?
 
I just did a silent update (no version change)

Renamed ExecuteSingle to Execute and Execute to ExecuteMultiple in order to avoid naming confusion.
 
Works as good as the OLD version :p
 
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:
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.
 
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?
 
Yes it is possible after acquiring root permissions first. The code is not included though yet. Will add it in the next version.
 
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.
 
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).

Code: Copy
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)
 
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).

Code: Copy
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!
 
Back
Top