I have to root android emulator. I've found some articles, but I've got the same error every time! It's 'cannot create su: not enough memory'!
What I did:
1. adb push su /data/local
2. adb shell
3. #su
4. #mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
5. # cd /system/xbin
6. # mv su osu
7. # cat /data/local/su > su // I've got an error!!!
//Cannot create su: Out of memory!
What do I wrong?
I've got answer on my question!
I must run an android emulator with -partition-size 128 option.
It should look like below:
android-sdk-windows\tools\emulator -avd MyAndroidVirtualDeviceName -partition-size 128
After that I can root my emulator.
Looks like /system/xbin is not rw.
The fact that mount -o remount,rw does not return errors doesn't mean that it succeeded.
Check what mount reports for /system after the remount.
Also, see if you have proper permissions to write there.
Related
I am trying to figure out why if I don't need to do this step
(Ubuntu before wily only) Add yourself to the fuse group, then log out and back in:
sudo usermod -a -G fuse $USER
exit
Then why can't I write to files; I keep getting the following error:
Using mount point: /mnt/c/Users/russe/Documents/gstorage
Opening GCS connection...
Opening bucket...
Mounting file system...
daemonize.Run: readFromProcess: sub-process: mountWithArgs: mountWithConn: Mount: mount: running fusermount: exit status 1
stderr:
fusermount: fuse device not found, try 'modprobe fuse' first
I am using Ubuntu (on Windows App Store).
Even running:
sudo mount -t gcsfuse -o implicit_dirs,allow_other,uid=1000,gid=1000,key_file=/mnt/c/Users/russe/Documents/RadioMedia-ba86f56a2aa6.json radiomediapod
cast gstorage
had an error:
Calling gcsfuse with arguments: --uid 1000 --gid 1000 --key-file /mnt/c/Users/russe/Documents/RadioMedia-ba86f56a2aa6.json -o rw --implicit-dirs -o allow_other radiomediapodcast /mnt/c/Users/russe/Documents/gstorage
Using mount point: /mnt/c/Users/russe/Documents/gstorage
Opening GCS connection...
Opening bucket...
Mounting file system...
daemonize.Run: readFromProcess: sub-process: mountWithArgs: mountWithConn: Mount: mount: running fusermount: exit status 1
stderr:
fusermount: fuse device not found, try 'modprobe fuse' first
running gcsfuse: exit status 1
The problem you are having might be because of two things:
-Permissions on the OS after mounting, to solve this mount your bucket with the following command:
sudo mount -t gcsfuse -o implicit_dirs,allow_other,uid=1000,gid=1000,key_file=<KEY_FILE>.json <BUCKET> <PATH>
-Permissions of your service account, to validate this you can go on the console to IAM & admin and verify that the service account being used has Storage Admin Role.
Android emulator starts and dies after seconds. In error log I get following error message:
Emulator: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
I found following solution
$ cd Android/Sdk/emulator/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib64/libstdc++.so.6
but in my lib64 folder I do not have the file libstdc++.so.6 which i could change to .bak
I am using centos 6.9 and want to install xampp. But when I run the command on the terminal it showing error i.e. cannot execute binary file. So, How can I fix this problem and successfully install xampp ? Please help me.
chmod +x xampp-linux-x64-7.0.22-0-installer.run
./xampp-linux-x64-7.0.22-0-installer.run
after this command it showing
bash: ./xampp-linux-x64-7.0.22-0-installer.run: cannot execute binary file
You're probably running the install (binary) with a lesser privileged user. You'll have to use root user for modifying SELinux settings as such:
semanage fcontext -a -t httpd_sys_script_exec_t '/<install-location>(/.*)/?'
restorecon -R -v /<install-location>/
In https://source.android.com/devices/architecture/vndk/deftool, it mentions that Google provides a tag file to classify the framework shared libraries, including LL-NDK, SP-NDK, VNDK, VNDK-SP and etc. However, after searching on this website and googling it, I'm not able to find the tag file. Where does Google provide it?
Thanks
Jincan
I found how to get such files.
You must get the file of vendor.img and system.img, for that is a file for deploying at "vendor partition" and "system partition" at a device.
Step 1
Please visit to Driver Binaries for Nexus and Pixel Devices.
There are images for two devices.
taimen (Pixel 2 XL)
walleye (Pixel 2)
Step 2: Method for file expand
Please read README.md.
There is undermentioned code
$ simg2img system.img system.raw.img
$ simg2img vendor.img vendor.raw.img
$ mkdir system
$ mkdir vendor
$ sudo mount -o loop,ro system.raw.img system
$ sudo mount -o loop,ro vendor.raw.img vendor
$ sudo python3 vndk_definition_tool.py vndk \
--system system \
--vendor vendor \
--aosp-system /path/to/aosp/generic/system \
--tag-file eligible-list-v3.0.csv
For detail, Please see that "README.md".
Thank you
git clone https://android.googlesource.com/platform/development
~/tools/development/vndk/tools/definition-tool/datasets[master]$ ls
eligible-list-o-mr1-release.csv eligible-list-o-release.csv minimum_dlopen_deps.txt minimum_tag_file.csv
I am trying to install busybox on an android emulator.
I downloaded and compiled busybox and have the busybox binary on my pc.
i then did adb push busybox /data/local/tmp
then did adb shell, then #cd /data/local/tmp , then #chmod 777 busybox, then tried #./busybox --install it says busybox command not found.
I also copied the file to /system/busybox. but ./busybox --install says busybox command not found.
First do adb push busybox /data/local/busybox
to copy the busybox into the android phone system
then go to the android shell by doing adb shell.
Get the superuser by typing su
from you android phone grant superuser request
then back to the shell and type
cd /data/local
chmod 755 busybox
./busybox
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mkdir /system/xbin
cp /data/local/busybox /system/xbin
cd /system/xbin
busybox --install .
mount -o ro,remount -t yaffs2 /dev/block/mtdblock4 /system
sync
reboot
Note: /dev/block/mtdblock4 may not be the /system partition on every device or emulator. It's best to execute the 'mount' command without parameters first in the shell, and look which device or partition is mounted as /system.
On a rooted phone, install this apk: https://f-droid.org/en/packages/ru.meefik.busybox/
f-droid is a good option as it is open source and officially allows downloading APKs, unlike the play store, which may not be available on test devices.
That app also has a simple install GUI, but the most reliable way to install it is to do simply:
adb shell
cp /data/data/ru.meefik.busybox/files/bin/busybox /system/xbin/
busybox ls
There are a couple of small changes to gregko and hayder Jawad's answer to get this working on the Pixel 2 emulator.
You have to start the emulator using the -writable-system flag as per this answer, otherwise you won't be able to remount the /system directory with the rw flag.
On the Pixel 2 emulator, /system is mounted at /dev/block/vda and /system/xbin already exists.
Thus, assuming you've pushed the binary to /data/local/busybox as per the first half of the answer, the shell commands to install busybox into the Pixel 2 emulator are
su
cd /data/local
chmod 755 busybox
./busybox
mount -o rw,remount -t ext4 /dev/block/vda /system
cp /data/local/busybox /system/xbin
cd /system/xbin
busybox --install .
mount -o ro,remount -t ext4 /dev/block/vda /system
sync
reboot
The busybox download page might be a bit unclear for beginners (like me). For 32-bit x86 processors, you'll want to use the i686 binary file.
I did the following very simple steps:
Download busybox apk to my laptop from here
Install apk using: adb install <apk file path>
Run busybox shell: busybox ash
Once in shell you can use busybox commands.