4

I wanted to install OpenGApps in an Android emulator (created in Android Studio). The emulator is running with Marshmallow. There is enough storage space available, so this is not the problem. I tried everything which I found on Google, but it just wont work.

While the emulator is booting up, and I keep spamming adb remount, first it shows remount succeeded, and just after the desktop shows up, it suddenly says remount of /system failed: Read-only file system and remount failed.

So it doesn't work either when I try to push an OpenGApp .apk using adb push. If I try after booting up, it says: adb: error: failed to copy 'Phonesky.apk' to '/system/priv-app/Phonesky.apk': Read-only file system (or whatever the .apk is).

I can't remount /system with rw either: When I make the following:

$ adb shell
> *some remount command*

Following shows up: mount: Read-only file system. I tried it with various commands (substitute one of them with *some remount command*, the output is always the same):

  • mount -o rw,remount /system
  • mount -o rw,remount /system /system
  • mount -o rw,remount /dev/block/vba /system
  • mount -o rw,remount /dev/block/mtdblock0 /system
  • mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system

I also tried to run su after adb shell, but it had no effect either. I also tried to remount rootfs to / first with rw. This worked without an issue, but the remount for /system gave the same error as without remounting rootfs.

Could anyone help me with this struggle?

Edit 1: I also tried it with various different emulator settings, it didn't change a thing either. So I guess this problem is not depending on the emulator itself...

Please note: A bounty was offered to resolve this question, but I don't have much time for this at the moment. I would be grateful if you would ping me on twitter if an answer worked for you, so I can eventually accept it after I have tried it by myself. But this would save me a lot of time. Thanks

  • I am having the exact same issue and I am not seeing anything that works. – Dan V Aug 29 '16 at 22:07
  • I wish I had a solution, but I still could not manage to get it to work :/ – CharlyDelta Aug 29 '16 at 22:16
  • If you do, please answer your question here. It does seem rather common of an issue since API 23. I will also report back if I see anything. – Dan V Aug 29 '16 at 22:18
  • 1
    Of course I will, and thank you very much for also letting me know about updates. If you find a solution, feel free to post an answer for other people who will face this problem in the future – CharlyDelta Aug 30 '16 at 10:31
  • Not sure if that is possible on the default emulator. I would use Genymotion. – miva2 Dec 1 '16 at 17:28
0

I had the exact same problem before. I solved it by adding this simple option and running the emulator through the command line:

Note: you may need to adjust the slashes and .exe part if you use Linux, but the command args are the same.

<PATH_TO_EMULATOR>\emulator.exe -avd <YOUR_AVD> -partition-size 512

That should fix the problem.

  • Can someone confirm if this works? I am not able to test this in the next few weeks – CharlyDelta Dec 2 '16 at 8:50
  • I have seen this used before on the web so I am sure it should work, unless your specific emulator is wildly different. – user186920 Dec 2 '16 at 12:04
  • Like I have said in the OP, I use the standard Android emulator from Android Studio. However, thanks for your answer but I can't accept an answer if it is not verified (I am kind of busy at the moment). I will try to verify it asap – CharlyDelta Dec 2 '16 at 12:31
0

I suggest using Genymotion for all your emulator needs. After getting Genymotion set up with emulated device of choice, download ARM translation and GAPPS. Those files come in a .zip format, do not unpack them!

I would have normally installed ARM Translation which will let those ARM apps be able to run on this x86 virtual device. Afterwards Install GAPPS (make sure to use appropriate version for the system you are building). To install the above mentioned files I have used the drag and drop technique. Restart the device when done. Hope this helps

  • This is also how I would do it. Not sure if OP is considering using a different emulator. He might be stuck with the default one because of corporate computer or something. – miva2 Dec 1 '16 at 17:26
  • It was more because of the fact that I never heard of that and was rather sceptical. But, and this is more important, I use the default emulator for a lot of things and I don't want to run a hundrets of emulators, each for different use cases... – CharlyDelta Dec 2 '16 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.