Android Question Rooted Android emulator (2020)

peacemaker

Expert
Licensed User
Longtime User
HI, All

Anyone tried recently to get a rooted emulator ? For testing superuser codes.
Any actual tutorial for B4A environment?
 

DonManfred

Expert
Licensed User
Longtime User
Any actual tutorial for B4A environment?
If there is one then the forum search will reveal it.

I can´t remember having seen any.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User

Actually, i always used MEMU before. But now on AMD Ryzen processor under Win10 Home - i'm really scared to try MEMU, as the AMD system easily falls into BSODs.
So, Android's emulator to be rooted is needed, no another PC.

p.s. for IT development only Intel is less trouble, i think now...


UPD: just tried to install the NOX. It even warned me that a BSOD may be now, the restart is needed to solve...
And after restarting - the NOX killed the system by BSOD anyway :(
 
Last edited:
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Some result for manual start AVD and getting the root on Android 7+ (under Win10):

1) Start the emulator AVD manually from folder SDK\tools (SDK - folder where the Android SDK is installed):
B4X:
emulator.exe -avd 6in_Phone_Platform_28_google_apis -verbose -writable-system -selinux disabled
where "6in_Phone_Platform_28_google_apis" = AVD's name from SDK\B4AEmulator folder

2) ADB commands (from SDK\platform-tools):
B4X:
adb start-server
adb -s emulator-5554 root
adb -s emulator-5554 remount
where "emulator-5554" = started emulator's instance name

3) Get and unpack SuperSU files set (https://download.chainfire.eu/696/supersu/) into a folder.

4) Next .bat file script, that should be saved to the folder of SuperSU and started:

B4X:
set adb=adb -e
set arch=x64

%adb% install common/Superuser.apk
%adb% push %arch%/su /system/bin/su
%adb% shell chmod 0755 /system/bin/su
%adb% push %arch%/su /system/xbin/su
%adb% shell chmod 0755 /system/xbin/su
%adb% shell su --install
%adb% shell "su --daemon&"
%adb% shell setenforce 0
exit /b

where
"set adb=adb -e" - for the single emulator (should be edited for the emulator instance, if not single device connected).
"set arch=x64" - architecture of the AVD you start

---------------------
I have tested with API28 AVD (google api !), any help to automate all this to start an AVD by a single .bat file is very appreciated.
 

Attachments

  • 4.bat.txt
    386 bytes · Views: 354
Last edited:
Upvote 0
Top