开发者

Can I load an app built with Android source onto other devices?

开发者 https://www.devze.com 2022-12-18 12:49 出处:网络
This seems like the answer would be no, but does anyone know if it is possible to build a custom app into a custom-built version of Android and then load that apk file onto a different device?Obviousl

This seems like the answer would be no, but does anyone know if it is possible to build a custom app into a custom-built version of Android and then load that apk file onto a different device? Obviously, if you make changes to the OS and then rely on them in your app, you can't, but assuming you use the source as-is (or the appropriate version) from the repo can it be done?

If you can, you could theoretically link against things that are otherwise considered to be hidden开发者_如何学运维 in the SDK, right? Or am I completely off base here?

Thanks, Chris


You can always call private methods via reflection, but in general, this is a very bad idea. Handset vendors are free to change anything not in the SDK, so there is a big chance your app will not work on certain devices. However, if you only want the app to work only on one device, or only on one special version of the OS, hack away :)


nothing prevents you build an apk from sources of your app and put it on the market. But if your app uses private methods, i assume via reflection, i would expect things not gonna work in certain version.

0

精彩评论

暂无评论...
验证码 换一张
取 消