-- This is needed so the modems (LTE & CDMA) are powered on and running
before unlocking encrypted devices
Change-Id: I842f5286499fd76abc554ded550fb837d12b324e
The adb gadget driver used to reset the USB bus when the adbd daemon exited,
and the host side adb relied on this behavior to force it to reconnect
with the new adbd instance after init relaunches it. The new gadget
drivers no longer automatically reset the USB bus when adbd is restarted
which caused adb to hang since it was no longer forced to reconnect with the
device. We attempted to work around this on the host side adb, but that
work around has not been reliable.
This change adds a property trigger on the service.adb.root system property
which will reset the USB bus and restart the adbd daemon when adbd sets
the property to 1. This should be much closer to the previous behavior
and will hopefully fix some problems with automated testing.
Change-Id: I177c37400009a3d83f21a5f9431f94fd1cc19b9b
Signed-off-by: Mike Lockwood <lockwood@android.com>
frameworks/base
Adding IKeyChainService APIs for CertInstaller and Settings use
keystore/java/android/security/IKeyChainService.aidl
libcore
Improve exceptions to include more information
luni/src/main/java/javax/security/auth/x500/X500Principal.java
Move guts of RootKeyStoreSpi to TrustedCertificateStore, leaving only KeyStoreSpi methods.
Added support for adding user CAs in a separate directory for system.
Added support for removing system CAs by placing a copy in a sytem directory
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/RootKeyStoreSpi.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustedCertificateStore.java
Formerly static methods on RootKeyStoreSpi are now instance methods on TrustedCertificateStore
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java
Added test for NativeCrypto.X509_NAME_hash_old and X509_NAME_hash
to make sure the implementing algorithms doe not change since
TrustedCertificateStore depend on X509_NAME_hash_old (OpenSSL
changed the algorithm from MD5 to SHA1 when moving from 0.9.8 to
1.0.0)
luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java
Extensive test of new TrustedCertificateStore behavior
luni/src/test/java/org/apache/harmony/xnet/provider/jsse/TrustedCertificateStoreTest.java
TestKeyStore improvements
- Refactored TestKeyStore to provide simpler createCA method (and
internal createCertificate)
- Cleaned up to remove use of BouncyCastle specific X509Principal
in the TestKeyStore API when the public X500Principal would do.
- Cleaned up TestKeyStore support methods to not throw Exception
to remove need for static blocks for catch clauses in tests.
support/src/test/java/libcore/java/security/TestKeyStore.java
luni/src/test/java/libcore/java/security/KeyStoreTest.java
luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java
Added private PKIXParameters contructor for use by
IndexedPKIXParameters to avoid wart of having to lookup and pass
a TrustAnchor to satisfy the super-class sanity check.
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/IndexedPKIXParameters.java
luni/src/main/java/java/security/cert/PKIXParameters.java
packages/apps/CertInstaller
Change CertInstaller to call IKeyChainService.installCertificate
for CA certs to pass them to the KeyChainServiceTest which will
make them available to all apps through the
TrustedCertificateStore. Change PKCS12 extraction to use AsyncTask.
src/com/android/certinstaller/CertInstaller.java
Added installCaCertsToKeyChain and hasCaCerts accessor for use by
CertInstaller. Use hasUserCertificate() internally. Cleanup coding
style.
src/com/android/certinstaller/CredentialHelper.java
packages/apps/KeyChain
Added MANAGE_ACCOUNTS so that IKeyChainService.reset
implementation can remove KeyChain accounts.
AndroidManifest.xml
Implement new IKeyChainService methods:
- Added IKeyChainService.installCaCertificate to install certs
provided by CertInstaller using the TrustedCertificateStore.
- Added IKeyChainService.reset to allow Settings to remove the
KeyChain accounts so that any app granted access to keystore
credentials are revoked when the keystore is reset.
src/com/android/keychain/KeyChainService.java
packages/apps/Settings
Changed com.android.credentials.RESET credential reset action to
also call IKeyChainService.reset to remove any installed user CAs
and remove KeyChain accounts to have AccountManager revoke
credential granted to private keys removed during the RESET.
src/com/android/settings/CredentialStorage.java
Added toast text value for failure case
res/values/strings.xml
system/core
Have init create world readable /data/misc/keychain to allow apps
to access user added CA certificates installed by the CertInstaller.
rootdir/init.rc
Change-Id: I768ca8e8e990ff333ce0f7069a0935173498c5ed
Fix for bug 3415286. The persistent properties are normally read early
in the boot process after /data is mounted. However, for an encrypted
system, at that point /data is a tmpfs ramdisk. This change adds a new
command to init (load_persist_props) to read the persistent properties,
and adds an action to init.rc to load the persistent properties. This
action is triggered by setting a property in vold, but that's in a
different CL.
Change-Id: I74b3057974ee6029c29d956b76fef5566700d471
This is to allow OpenGL ES rendering from the system process,
and help with debugging.
Bug: 4086003
Change-Id: I732e95f4fcaa358f430cc195d8e63a69263bffdc
This change forces the start of the RIL daemon used to provide
3G connectivity to the system. It should normally be started
automatically by init.rc but there is a bug within
system/core/init/builtins.c that prevents this to happen.
Fixes the "No network connectivity" bug while the network
interface and route were properly setup.
Change-Id: Ieec0f513aabf92b8a59f0a86f64a16e97057c3c3
Now that rild can be killed in a reasonable amount of time, move it
from the core class to late_start. I was going to move it to main,
but it would get killed and restarted right after the disk crypto
password was entered, which is when the late_start class is started,
and I was seeing issues with rild not re-connecting to the network
when it was killed and restarted.
Change-Id: I60479ddb853953029890fc816538d615ef5a96ab
The net.eth0.gw system property is used by the ConnectivityService
to set the default route when it detects that 3G connectivity is
established. Because the property was undefined, the route was
unset which broke networking.
+ Format / document init.goldfish.sh
Change-Id: I1133cf6c093609300315cd0ea363c9e139b42521
This fixes the goldfish-specific config scripts used by init and ueventd
to properly setup the system under emulation. This fixes a lot of broken-ess
introduced by recent permission changes in the system.
Note that there are still several problems after this patch is applied, but
at least it becomes possible to get an adb connection to the emulated system,
Change-Id: Iff47bbf0fe5cb759fa93089284bb0f71e32405a2
Changes in init.stingray.rc now prevent rild from making sockets
or named pipes on /data. Now that rild no longer prevents /data
from being unmounted, we can put it in the core class, which doesn't
restart when we enable encryption. This speeds up the boot by 20+
seconds.
Change-Id: I737baf804e089f4ddbd664eaa1e675a7bd62e699
Changes in init.stingray.rc now prevent rild from making sockets
or named pipes on /data. Now that rild no longer prevents /data
from being unmounted, we can put it in the core class, which doesn't
restart when we enable encryption. This speeds up the boot by 20+
seconds.
Change-Id: I71c426dab1b725e401116234167d41c7ccd958c1
Since the "usb" group and ACCESS_USB permission will be used by regular apps
to access USB devices in host mode, we need a separate permission for the
device side MTP driver.
Change-Id: Ibb546b8726d61e041fc7c273f71929624ad1575b
Signed-off-by: Mike Lockwood <lockwood@android.com>
This is a dependency for the DNS proxy CLs.
This CL also adds a new socket for the netd process to inherit which
is owned by the inet group. (so only apps with the INTERNET
permission can use the DNS proxy...)
Change-Id: I8a51924e0ed56c6066f77e6f1b02d39bdadac51e
This fixes the goldfish-specific config scripts used by init and ueventd
to properly setup the system under emulation. This fixes a lot of broken-ess
introduced by recent permission changes in the system.
Note that there are still several problems after this patch is applied, but
at least it becomes possible to get an adb connection to the emulated system,
Change-Id: I1e8f5828b4d5cbb3a4338878df875dc718276b38
These are the changes to init and init.rc necessary to
support booting with and encrypted /data filesystem.
A corresponding change to init.<device>.rc goes along
with this change.
Change-Id: I0c7e2cc39568358014a82e317735c0eae14dd683
Ensure that we drop privileges for servicemanager
and drmioserver. These should not be running with
gid=0.
Bug: 3275526
Testing: Applied change and successfully rebooted
the device. No obvious bugs.
Change-Id: I782fbda812cb88e0a365788b45b3b32894623177
This was an inefficient way of doing things and was
temporary. There are now direct calls to Bluez to add reserved
SDP records.
This improves connection time after turning on BT by 6-8 secs.
Change-Id: I8750f44e1de73c9cc935d68710b8964e3f50c3a6
This is a dependency for the DNS proxy CLs.
This CL also adds a new socket for the netd process to inherit which
is owned by the inet group. (so only apps with the INTERNET
permission can use the DNS proxy...)
Change-Id: Ic3475c697913ba85805b4e49801b65e7a1d59289
Merge commit '33357f5477a24cb16bd3dd692fe5ca14755ab033'
* commit '33357f5477a24cb16bd3dd692fe5ca14755ab033':
Make netd restart when system server hangs on it.
Merge commit '6490257d116c35d3da927ee7b91179dde64ef713' into gingerbread-plus-aosp
* commit '6490257d116c35d3da927ee7b91179dde64ef713':
Make netd restart when system server hangs on it.
netd has been seen hanging (cause suspected but unconfirmed)
which then brings down the system server which blocks forever
on its main thread trying to connect to netd with its hung
event loop.
This then results in an infinite watchdog runtime restart loop
because the situation never improves: netd is still borked.
Instead, we should kill netd and give it another chance when
the system server dies.
Bug: 3018996
Bug: 3017876
Change-Id: Ibf9ecf0ffcb78e48c38e5167f21cbeefe0e2a47f
- look in /vendor/firmware/... in addition to /system/etc/firmware/... for firmware loading
- add /vendor/bin to path before /system/bin
- add /vendor/lib to ldpath before /system/lib
- configure appropriate permissions for /system/vendor/bin
- symlink /vendor -> /system/vendor
Change-Id: I0c06ca1e38a44f0c7024cee6cea8907aa93a4532
Merge commit '8df3a4a554184afba71887995c5f0983ce81196f'
* commit '8df3a4a554184afba71887995c5f0983ce81196f':
remount / as read-only only on post-fs to allow per-target config of /
Merge commit '4012c0a46ab2ebdf6a1298bc4e85ed3368d1b8a4' into gingerbread-plus-aosp
* commit '4012c0a46ab2ebdf6a1298bc4e85ed3368d1b8a4':
remount / as read-only only on post-fs to allow per-target config of /
Merge commit 'f2af88e81af5efb2d585963507f798d5a8b93d67' into gingerbread-plus-aosp
* commit 'f2af88e81af5efb2d585963507f798d5a8b93d67':
Tracking merge of dalvik-dev to gingerbread
This introduces some new buckets that will be used by the activity
manager, and adjusts the default levels to match what we had been
setting for Droid.
It turns out Passion has been using the old levels, which makes no
sense for how much memory it has. Also it is a problem with these
definitions spreading to other projects for different devices, so
I am going to update the defaults to be appropriate for our newer
devices, and put here a file to tune them down for something like
the sapphire.
Change-Id: Ia4f33c4c3b94aeb3656f60b9222072a1d11e9e68
Merge commit 'b1fb3bd13a4da8bc46a44ec5eef6de9cb952f163' into kraken
* commit 'b1fb3bd13a4da8bc46a44ec5eef6de9cb952f163':
Make /proc/kmsg and /proc/sysrq-trigger system-process-readable
This is so that the system process can capture kernel thread stacks when the
watchdog detects a deadlock. Previously, /proc/kmsg was root/root and mode
0400, and /proc/sysrq-trigger was root/root and mode 0200. With this
change, /proc/kmsg becomes root/system and 0440, and /proc/sysrq-trigger
becomes root/system and 0220.
Change-Id: Iac46bd10bd11d495024afeb5d693107ce5074791
init now creates files in /dev/bus/usb/ for user access to USB devices.
Files are chmod 660 with group AID_USB.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Devices with non-MTD storage need to override the filesystem mounting
commands in init.rc. Moving them to a new "fs" init level allows a
custom init.<device>.rc to handle the mounting.
Change-Id: If0e655139b9734650fb798b6eb0a90e2241fc29b
This reverts commit a7d88224ff.
This cgroup subsys should be mounted on it's own mount-point, since it's
addition to /dev/cpuctl causes the cpu subsys to EPERM
Temporarily creating emulated encrypted directories manually.
Will remove those lines once a true encrypted FS is mounted, and proper
framework chanfes have been made. This is required for the feature to
work with the other changes.
Merge commit 'eb67fac4723892ac8ae3fae87c05e776c49029c5' into eclair-mr2-plus-aosp
* commit 'eb67fac4723892ac8ae3fae87c05e776c49029c5':
change /cache/recovery group to cache
Merge commit '5a8cf57eb7aa70f1647b28315a2419c4a6d36828' into eclair-mr2-plus-aosp
* commit '5a8cf57eb7aa70f1647b28315a2419c4a6d36828':
Make the RIL daemon part of the audio group so it can load region-specific
Merge commit '1dec5032cfadc1a3d7687ce5b6cd322e4151ce9d' into eclair-plus-aosp
* commit '1dec5032cfadc1a3d7687ce5b6cd322e4151ce9d':
Force the mediaserver process to restart whenever the zygote or system
Merge commit 'ea935c1d9771fa2cc00583720586c209463f2791' into eclair-plus-aosp
* commit 'ea935c1d9771fa2cc00583720586c209463f2791':
Make vmallocinfo readable by group log so we can put it in bugreports
Merge commit 'a0c98ef01a4c5a859fdde35fed7977b1eb919007' into eclair-plus-aosp
* commit 'a0c98ef01a4c5a859fdde35fed7977b1eb919007':
Ensure -user builds can run the dex preopt pass in the emulator.
This is done by ensuring that /init.goldfish.rc and /system/etc/init.goldfish.sh
are part of the system image, even if it lacks other emulator related bits.
Merge commit 'bb6f68c63d79bf58bd53f463de1bd23d49e5b8a4' into eclair-plus-aosp
* commit 'bb6f68c63d79bf58bd53f463de1bd23d49e5b8a4':
init.rc: mount debugfs for debugging
Merge commit '25f1a5aaffd1ef6e87d53d4fd3c14ea1b6c5b940' into eclair-plus-aosp
* commit '25f1a5aaffd1ef6e87d53d4fd3c14ea1b6c5b940':
init.rc: Adjust permissions on /data/dontpanic/ so dumpstate will not need root
Merge commit '2f21659d4565afd65da1be07c28317a3cb4287a1' into eclair-plus-aosp
* commit '2f21659d4565afd65da1be07c28317a3cb4287a1':
Fix a bug that prevented the "generic" product builds from working in the emulator.
Merge commit '9332482ed2945174d94615f0720f88702cb92667' into eclair-plus-aosp
* commit '9332482ed2945174d94615f0720f88702cb92667':
init.rc: Make /data/dontpanic files readable only by the system process.
This also ensures that emulator-specific files /init.goldfish.rc and
/system/etc/init.goldfish.sh are never part of -user builds, which
correspond to production devices.
Merge commit 'e991decf340e24203ed63f87d9313598cd09a46c' into eclair-plus-aosp
* commit 'e991decf340e24203ed63f87d9313598cd09a46c':
init.rc: Add dumpstate service
init: Add support for enforcing setprop by caller's group.
adb: "adb bugreport" now runs dumpstate via init rather than execing it in the shell.
This fixes both a typo and the fact that sh seems not to have
test or [.
(see also sh/builtins.def: ##testcmd commented out)
The handling of these properties was broken, having the effect
that the Modem in ... internal/telephony/test/Simulated*.java
was never run, even if it would have been the users/developers
intention.
See also issue #1380http://code.google.com/p/android/issues/detail?id=1380
Signed-off-by: Simon.Braunschmidt@gmail.com>
Merge commit 'ee40fc4e64e1656a16603778bee895ea389ec7d5'
* commit 'ee40fc4e64e1656a16603778bee895ea389ec7d5':
rootdir: init.rc: Bump up background cpu shares to 5.0%