Closed fxthomas closed 11 years ago
Francois, your code assumes that the user has remounted /system/etc/permissions as read-write in the emulator, right?
Also, what do you think about versioning the xml file as well? This would support, say, working on two apps that have different scala versions on the same device.
Another important point is that the /system partition is not persisted across reboots, so the work done by android:preload-emulator gets wiped out immediately.
Ah, I see, I only tested on a real device, I don't use the emulator. The /system partition is mounted as read-write automatically anyway.
Maybe some pointers here, I'll look into it : http://blog.thecobraden.com/2012/06/making-persistent-changes-to-android.html and http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images#Background
I also noticed that my mod doesn't enable "adb root", which device rooting method did you test this with?
adb root
should work on stock ROMs, but if you use CyanogenMod you have to explicitly enable root for ADB under the development options. I don't know about other mods.
(Good point by the way, it's a good idea to stop with an error if adb root
fails)
(for anyone who stumbles upon this) I used adbd Insecure to enable adb root
access on my stock ROM. Apparently this is needed in addition to root.
Let's go ahead and merge this since it doesn't conflict with other functionality and the device portion is quite useful.
We should try to resolve the emulator issue if possible, though.
Here is a new command to quickly setup your device (or emulator) for Scala development.
It predexes the Scala libs then pushes them to the device, most of it being heavily inspired by svenwiegand/scala-libs-for-android-emulator. These are the two main commands you can use :
android:preload-device
android:unload-device
I tested it on my device (Galaxy Nexus running Cyanogen 10.1-M2) and it apparently runs flawlessly.