[Android Software/Hacking General [Developers Only]] mp9_sit:
Hi everyone,

I'm new to android but have some experience in Linux.

I've bought a Android phone from china but i found there is lack of the Google Apps. (Only have broswer and Maps. No market No Youtube No Gmail No Google Sync etc.) (I've seen some of the HTC india phone is No market too)

That make the phone nearly un-usable. (Only can make a phone call but no contact synced...LOL)

After i got the apk from the emulator and fixed some issue.

I'm interfacing a issue i don't know how to fix it.

The issue is Permission denial: writing to secure settings requires android.permission.WRITE_SECURE_SETTINGS

Here is the logcat

[COLOR="Red"]E( 80) java.lang.SecurityException: Permission denial: writing to secure settings requires android.permission.WRITE_SECURE_SETTINGS (DatabaseUtils)[/COLOR]

E( 80) at com.android.providers.settings.SettingsProvider.checkWritePermissions(SettingsProvider.java:172) (DatabaseUtils)
E( 80) at com.android.providers.settings.SettingsProvider.insert(SettingsProvider.java:335) (DatabaseUtils)
E( 80) at android.content.ContentProvider$Transport.insert(ContentProvider.java:140) (DatabaseUtils)
E( 80) at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:125) (DatabaseUtils)
E( 80) at android.os.Binder.execTransact(Binder.java:287) (DatabaseUtils)
E( 80) at dalvik.system.NativeStart.run(Native Method) (DatabaseUtils)
D( 509) Shutting down VM (AndroidRuntime)
W( 509) threadid=3: thread exiting with uncaught exception (group=0x4001aa08) (dalvikvm)
E( 509) Uncaught handler: thread main exiting due to uncaught exception (AndroidRuntime)
[COLOR="Red"]E( 509) java.lang.RuntimeException: Unable to create service com.google.android.googleapps.GoogleLoginService: java.lang.SecurityException: Permissio
n denial: writing to secure settings requires android.permission.WRITE_SECURE_SETTINGS (AndroidRuntime)[/COLOR]
E( 509) at android.app.ActivityThread.handleCreateService(ActivityThread.java:2693) (AndroidRuntime)
E( 509) at android.app.ActivityThread.access$3100(ActivityThread.java:116) (AndroidRuntime)
E( 509) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1846) (AndroidRuntime)
E( 509) at android.os.Handler.dispatchMessage(Handler.java:99) (AndroidRuntime)
E( 509) at android.os.Looper.loop(Looper.java:123) (AndroidRuntime)
E( 509) at android.app.ActivityThread.main(ActivityThread.java:4203) (AndroidRuntime)
E( 509) at java.lang.reflect.Method.invokeNative(Native Method) (AndroidRuntime)
E( 509) at java.lang.reflect.Method.invoke(Method.java:521) (AndroidRuntime)
E( 509) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) (AndroidRuntime)
E( 509) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) (AndroidRuntime)
E( 509) at dalvik.system.NativeStart.main(Native Method) (AndroidRuntime)
E( 509) Caused by: java.lang.SecurityException: Permission denial: writing to secure settings requires android.permission.WRITE_SECURE_SETTINGS (And
roidRuntime)
E( 509) at android.os.Parcel.readException(Parcel.java:1218) (AndroidRuntime)
E( 509) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:145) (AndroidRuntime)
E( 509) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:111) (AndroidRuntime)
E( 509) at android.content.ContentProviderProxy.insert(ContentProviderNative.java:340) (AndroidRuntime)
E( 509) at android.content.ContentResolver.insert(ContentResolver.java:479) (AndroidRuntime)
E( 509) at android.provider.Settings$NameValueTable.putString(Settings.java:438) (AndroidRuntime)
E( 509) at android.provider.Settings$Secure.putString(Settings.java:1682) (AndroidRuntime)
E( 509) at com.google.android.googleapps.GoogleLoginService.onCreate(GoogleLoginService.java:396) (AndroidRuntime)
E( 509) at android.app.ActivityThread.handleCreateService(ActivityThread.java:2684) (AndroidRuntime)
E( 509) ... 10 more (AndroidRuntime)

I've try to modify the

/system/etc/permissions/platform.xml

by

<assign-permission name="android.permission.WRITE_SECURE_SETTINGS" uid="system" />

but still no luck. (I've checked the PID 80 is run by System.)

system 80 46 176348 21752 ffffffff afe0c70c S system_server

From ps in the shell

Is anybody have an idea how to makes its works?

MY phone is already rooted but i haven't found the method to login to the recovery mode:(