How to sign my test suite with a system key?

I am writing a test suite for other applications that run system intent, in particular ACTION_DOCK_EVENT.

I know that I need to add android:sharedUserId="android.uid.system"android to my manifest in the manifest tag, and I need to install my application in / system / app instead of the usual / data / data. I have root access so that is not a problem.

The problem I am facing seems to be that I also need to sign my application using the system key. Where can I get the system key, usernames and passwords? I suppose I can create my own version of Android and sign it with my own keys, but since I have root access, should there be an easier way?

I have N1 with CM7, and the emulator with keys.

Thank.

+3
source share
2 answers

Turns off broadcast translation using adb using commands, for example:

am broadcast -a android.intent.action.DOCK_EVENT --ei android.intent.extra.DOCK_STATE 2

To check ACTION_DOCK_EVENT. I could not figure out how to do this from another application, but adb worked for my needs.

0
source

It’s best to create your own OS and sign it with your own keys. Root access will not help you exchange the user ID with the system.

If you do not work with the device manufacturer, you will not be able (legally) to obtain signature keys for the firmware.

0
source

Source: https://habr.com/ru/post/1795063/


All Articles