Install: /home/skipkou/android/cm/out/host/linux-x86/bin/checkpolicy
/home/skipkou/android/cm/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /home/skipkou/android/cm/out/target/product/msm8974/obj/ETC/sepolicy_intermediates/policy.conf
libsepol.report_failure: neverallow on line 462 of external/sepolicy/domain.te (or line 5718 of policy.conf) violated by allow netd shellrocess { transition };
libsepol.report_failure: neverallow on line 441 of external/sepolicy/domain.te (or line 5699 of policy.conf) violated by allow mm-qcamerad system_data_file:file { write create };
libsepol.report_failure: neverallow on line 280 of external/sepolicy/domain.te (or line 5546 of policy.conf) violated by allow mm-qcamerad device:chr_file { read write open };
libsepol.report_failure: neverallow on line 254 of external/sepolicy/domain.te (or line 5520 of policy.conf) violated by allow shell system_file:file { entrypoint };
libsepol.check_assertions: 4 neverallow failures occurred
Error while expanding policy
make: *** [/home/skipkou/android/cm/out/target/product/msm8974/obj/ETC/sepolicy_intermediates/sepolicy] error 1
(⊙o⊙)
skipkou said:
Install: /home/skipkou/android/cm/out/host/linux-x86/bin/checkpolicy
/home/skipkou/android/cm/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /home/skipkou/android/cm/out/target/product/msm8974/obj/ETC/sepolicy_intermediates/policy.conf
libsepol.report_failure: neverallow on line 462 of external/sepolicy/domain.te (or line 5718 of policy.conf) violated by allow netd shellrocess { transition };
libsepol.report_failure: neverallow on line 441 of external/sepolicy/domain.te (or line 5699 of policy.conf) violated by allow mm-qcamerad system_data_file:file { write create };
libsepol.report_failure: neverallow on line 280 of external/sepolicy/domain.te (or line 5546 of policy.conf) violated by allow mm-qcamerad device:chr_file { read write open };
libsepol.report_failure: neverallow on line 254 of external/sepolicy/domain.te (or line 5520 of policy.conf) violated by allow shell system_file:file { entrypoint };
libsepol.check_assertions: 4 neverallow failures occurred
Error while expanding policy
make: *** [/home/skipkou/android/cm/out/target/product/msm8974/obj/ETC/sepolicy_intermediates/sepolicy] error 1
(⊙o⊙)
Click to expand...
Click to collapse
Hello,
Thanks for using XDA Assist.
You can post your query in [GUIDE][COMPLETE] Android ROM Development From Source To End.Experts there may be able to help you
___
v7
XDA Assist
v7 said:
Hello,
Thanks for using XDA Assist.
You can post your query in [GUIDE][COMPLETE] Android ROM Development From Source To End.Experts there may be able to help you
___
v7
XDA Assist
Click to expand...
Click to collapse
OK,thank u
Related
please respect the rules
WRITE ON THIS THREAD ONLY IF YOU ARE DEVELOPERS
>>otherwise write in this thread<<
Hi guys,
I stop my porting project because Arco and Ivendor are already developing their own porting and they are more advanced than me,
keep my developments to create a custom kernel, based on their developments.
Before you fill with unnecessary questions, no it is not bootable,
these are the progress i've made in porting the kernel 3.0.8,
the base used is the kernel of Huawei Honor U8860 and with the help of some of the drivers SPH-M950.
The drivers have been included, these are the ones i remember now:
yda165 (audio amplifier) >> updated from SGSII
fsa9485 <fsa9480> >> from SPH-M950
cypress-touchkey >> updated from I9001
touchscreen >> Atmel mXT I2C Touchscreen (updated drivers, to test if work)
gpu adreno >> already included on U8860
audio qdspv2 marimba >> already included on U8860 but fixed the value and config
vibetonz >> updated from SPH-M950
samsung Jack >> ported
samsung battery >> updated from SPH-M950 (do a complete test, when the kernel works)
MAX17043 fuel gauge >> updated by ... i do not remember ... maybe SPH-M950 ?!?
Wifi BCM4329 & bluetooth >> already included on U8860 (maybe need to replace)
Sensors drivers:
gp2a light >> ported
gp2a proximity >> ported
yas bma023 acceleration >> ported
yas529 geomagnetic >> ported
optical gp2a ori orientation sensor >> ported
Camera drivers:
drivers are included.
Board AriesVe:
I re-wrote the board using the one of the U8860, but you may need to make other changes.
Compile errors:
Code:
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 94 of arch/arm/mach-msm/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 1044 of kernel/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 455 of mm/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 205 of fs/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 53 of crypto/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 357 of block/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 274 of lib/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 67 of drivers/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 11 of sound/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 9 of arch/arm/oprofile/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 963 of net/built-in.o is not in EXIDX output section
STATUS:
14/10/2012:
Updated .config
Correct compilation errors "mdp4_overlay_play_wait", "mdp4_overlay_set", "mdp4_overlay_unset"
Corrected "unmet direct dependencies"
Here are you need to compile:
Toolchain: arm-eabi-4.4.3
Config file: .config [14/10/2012]
My 3.0.8 source: GitHub CastagnaIT
any help is well liked.
Wow! so it's actually booting! that's a very big step. I think getting it to boot is the biggest issue. (although there are probably a ton more issues to solve)
Wow, this is really good news...
As he said its NOT(!) booting. This thread is just for KernelDevs so dont post.
Lets go through the problems one at a time.
Looks like there is a Kconfig issue. Is this seen on other configs of the same architecture at the point you forked from? Kconfig unmet dependencies can cause all sorts of problems.
Code:
warning: (ARM_GIC && PMIC8058) selects MSM_SHOW_RESUME_IRQ which has unmet direct dependencies (ARCH_MSM && (ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_MSMCOPPER))
warning: (MTD_MSM_NAND && MTD_DOC2000 && MTD_DOC2001 && MTD_DOC2001PLUS) selects MTD_NAND_IDS which has unmet direct dependencies (MTD && MTD_NAND)
warning: (ARM_GIC && PMIC8058) selects MSM_SHOW_RESUME_IRQ which has unmet direct dependencies (ARCH_MSM && (ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_MSMCOPPER))
warning: (MTD_MSM_NAND && MTD_DOC2000 && MTD_DOC2001 && MTD_DOC2001PLUS) selects MTD_NAND_IDS which has unmet direct dependencies (MTD && MTD_NAND)
As someone said on the other 3.0.8 post, cyanogen is working on a 3.0.x migration for msm7x30, it could be useful. You can find all the info on this post http://kcy.me/bmr4
Enviado desde mi GT-I9001 usando Tapatalk 2
Here are the unresolved symbols I get when compiling with the CodeSourcery 2009q3 compiler:
Code:
drivers/built-in.o: In function `mdp4_overlay_play_wait':
/home/bryan/i9001/samsung-kernel3-msm7x30/drivers/video/msm/mdp4_overlay.c:2354: undefined reference to `mdp4_overlay_dtv_wait_for_ov'
drivers/built-in.o: In function `mdp4_overlay_unset':
/home/bryan/i9001/samsung-kernel3-msm7x30/drivers/video/msm/mdp4_overlay.c:2272: undefined reference to `mdp4_overlay_dtv_unset'
drivers/built-in.o: In function `mdp4_overlay_set':
/home/bryan/i9001/samsung-kernel3-msm7x30/drivers/video/msm/mdp4_overlay.c:2133: undefined reference to `mdp4_overlay_dtv_set'
make: *** [.tmp_vmlinux1] Error 1
The mdp4_overlay_dtv.c file needs to be linked in, by adding CONFIG_FB_MSM_DTV to the kernel config. This option is only a boolean that is enabled by one of the HDMI PANEL options, like CONFIG_FB_MSM_HDMI_MSM_PANEL. But, once this is enabled, it looks like the board is not defining some memory regions used by the HDMI device.
Which compiler are you using to build with?
I know it's a little bit off, but if you look at arco's github, you'll see he has renamed the kernel branch from ics to ics 2.6.35, so their 3.x kernel is almost ready
Tapatalk 2-vel küldve az én GT-I9001-ről
bhundven said:
Lets go through the problems one at a time.
Looks like there is a Kconfig issue. Is this seen on other configs of the same architecture at the point you forked from? Kconfig unmet dependencies can cause all sorts of problems.
Code:
warning: (ARM_GIC && PMIC8058) selects MSM_SHOW_RESUME_IRQ which has unmet direct dependencies (ARCH_MSM && (ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_MSMCOPPER))
warning: (MTD_MSM_NAND && MTD_DOC2000 && MTD_DOC2001 && MTD_DOC2001PLUS) selects MTD_NAND_IDS which has unmet direct dependencies (MTD && MTD_NAND)
warning: (ARM_GIC && PMIC8058) selects MSM_SHOW_RESUME_IRQ which has unmet direct dependencies (ARCH_MSM && (ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_MSMCOPPER))
warning: (MTD_MSM_NAND && MTD_DOC2000 && MTD_DOC2001 && MTD_DOC2001PLUS) selects MTD_NAND_IDS which has unmet direct dependencies (MTD && MTD_NAND)
Click to expand...
Click to collapse
This looks like you compiled from my repo, right? Because I got the same errors. But I don't think that it is needed that we fix it because I already got it at my first build when I made no changes. And it compiles successfully, I get a ready kernel image.
I'm using the cross-compiler from the cyanogenmod android source tree.
hahnjo said:
This looks like you compiled from my repo, right? Because I got the same errors. But I don't think that it is needed that we fix it because I already got it at my first build when I made no changes. And it compiles successfully, I get a ready kernel image.
I'm using the cross-compiler from the cyanogenmod android source tree.
Click to expand...
Click to collapse
Yup. But if depedences are not met, kernel may not boot, that of course. Meaby try to fix it first?
Harrocan said:
Yup. But if depedences are not met, kernel may not boot, that of course. Meaby try to fix it first?
Click to expand...
Click to collapse
I think there are none of the warned configs selected
hahnjo said:
I think there are none of the warned configs selected
Click to expand...
Click to collapse
It would not hurt to check
Harrocan said:
Yup. But if depedences are not met, kernel may not boot, that of course. Meaby try to fix it first?
Click to expand...
Click to collapse
I've just corrected
now compilation works, it remains to fix unwinding warnings
CastagnaIT said:
I've just corrected
now compilation works, it remains to fix unwinding warnings
Click to expand...
Click to collapse
Great. Any other errors? (i don't have so many pratice, only teoretic, so i can help only in that way)
Harrocan said:
Great. Any other errors? (i don't have so many pratice, only teoretic, so i can help only in that way)
Click to expand...
Click to collapse
no, no other error, but you have to replace the drivers wifi and bluetooth
Rom_Tester said:
Sorry ,I am a noob, but is it now bootabel, because no errors?
Click to expand...
Click to collapse
can we please leave this thread clean from any posts which will not really improve the dev path ?
Only for 1 week discipline, please.
On my github, there is now a branch with the original samsung code. I've also applied the latest changes from codeaurora. Today I will maybe try to fix the error with the "unmet dependencies"
If you want to help / have a pull request or questions that are development related, just PM me
Hi guys,
I stop my porting project because Arco and Ivendor are already developing their own porting and they are more advanced than me,
keep my developments to create a custom kernel, based on their developments.
[Issue Building][B2G] Porting FirefoxOS tto the S3 i9300
Hi,
I am a working Porting FirefoxOS to the S3 i9300, but i have a problem with the gralloc_module.cpp, so this is the log:
Code:
b2g/application.ini
b2g/libnspr4.so
target thumb C++: gralloc.i9300 <= hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp: In function 'int gralloc_lock(const gralloc_module_t*, const native_handle_t*, int, int, int, int, int, void**)':
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:386: error: 'GRALLOC_USAGE_YUV_ADDR' was not declared in this scope
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp: At global scope:
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: error: 'gralloc_module_t' has no non-static data member named 'getphys'
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: warning: missing initializer for member 'private_module_t::info'
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: warning: missing initializer for member 'private_module_t::finfo'
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: warning: missing initializer for member 'private_module_t::xdpi'
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: warning: missing initializer for member 'private_module_t::ydpi'
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: warning: missing initializer for member 'private_module_t::fps'
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: warning: missing initializer for member 'private_module_t::enableVSync'
make: *** [out/target/product/i9300/obj/SHARED_LIBRARIES/gralloc.i9300_intermediates/gralloc_module.o] Error 1
real 1m57.225s
user 1m53.015s
sys 0m23.001s
> Build failed! <
Build with |./build.sh -j1| for better messages
If all else fails, use |rm -rf objdir-gecko| to clobber gecko and
Could some help me with this? I like continue with the Port but i can't find a patch to solve this. The repo where there are all the files of the Port is this
https://github.com/Droid2Fox.
The repo that has the library wrong is this:
https://github.com/Droid2Fox/android_hardware_samsung
I work with the ICS branch, not with the Jellybeam.
Thanks
Ok from what your error says I think the lines you need to pay attention to in the error is the following lines.
Code:
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: error: 'gralloc_module_t' has no non-static data member named 'getphys'
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: warning: missing initializer for member 'private_module_t::info'
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: warning: missing initializer for member 'private_module_t::finfo'
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: warning: missing initializer for member 'private_module_t::xdpi'
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: warning: missing initializer for member 'private_module_t::ydpi'
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: warning: missing initializer for member 'private_module_t::fps'
hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp:480: warning: missing initializer for member 'private_module_t::enableVSync'
In your build folder look in hardware/samsung/exynos4/hal/libgralloc_ump/gralloc_module.cpp and look at line 480 of that file. Now without being able to look at that file I can not tell you anymore about it. But that is what i read from your error.
Re: [Issue Building][B2G] Porting FirefoxOS tto the S3 i9300
This is the file that has the issue:
https://github.com/Droid2Fox/androi...exynos4/hal/libgralloc_ump/gralloc_module.cpp
Do you know any idea of how to do it work?
Thanks
Sent from my GT-I9300 using xda app-developers app
Gioyik said:
I am a working Porting FirefoxOS to the S3 i9300, but i have a problem with the gralloc_module.cpp, so this is the log:
Click to expand...
Click to collapse
This reply might seem insulting, but it's impossible for me to know what previous knowledge the original poster has...
Do you understand the errors and warnings that the compiler is generating? What have you done already in order to try and diagnose the errors/warnings? What were the results (if any?)
Are you a developer who is fluent with c++, or are you only looking for someone to provide patches to make things work for you?
Thanks
Gary
Hi,
I understand the warnings that generates the compiler, and i am trying to declare those functions, but i am not good with C++. I create a patch for the Cammerawrapper.cpp before, but for this i don't understand so much how to fix it. I have been some changes, i can declare some functions but it continues giving problems with other functions that are not declared. I found this:
http://git.linaro.org/gitweb?p=peop...b;hb=24a9e234b68b3f44f0f0dbe7dc7efc8f0d57808d
It's good, it solve the 80% not the 100% of the issue, because it fails again because the 'GRALLOC_USAGE_YUV_ADDR' is not declared.
So, i post this in XDA, because i know that there are a lot of devs that knows too much than me about this, and possibly someone has a solution for this. I am not rude and i don't like that other do the work for me, it's only a Post to ask if someone pass for this before and got a solution.
Thanks for you're answers.
Gioyik said:
Hi,
I understand the warnings that generates the compiler, and i am trying to declare those functions, but i am not good with C++. I create a patch for the Cammerawrapper.cpp before, but for this i don't understand so much how to fix it. I have been some changes, i can declare some functions but it continues giving problems with other functions that are not declared. I found this:
http://git.linaro.org/gitweb?p=peop...b;hb=24a9e234b68b3f44f0f0dbe7dc7efc8f0d57808d
It's good, it solve the 80% not the 100% of the issue, because it fails again because the 'GRALLOC_USAGE_YUV_ADDR' is not declared.
So, i post this in XDA, because i know that there are a lot of devs that knows too much than me about this, and possibly someone has a solution for this. I am not rude and i don't like that other do the work for me, it's only a Post to ask if someone pass for this before and got a solution.
Thanks for you're answers.
Click to expand...
Click to collapse
or you could just build aosp ics and copy whatever the error says it cannot build into the b2g out...
Re: [Issue Building][B2G] Porting FirefoxOS tto the S3 i9300
Yes could be a solution. I will try. Thanks.
Sent from my GT-I9300 using xda app-developers app
Note: This is not a question or helping post, this is for Devs interested in continue with the Port of FirefoxOS to i9300
Hi,
My name is Giovanny, and i was trying to make the Port of FirefoxOS to S3 i9300. I have some work ready and some patches ready to build some parts of the port but i can't cotinue making it, because i have some problems compiling that i can resolve myself. I am not a great Android Developer, i know somethings but i am not an expert. For that reason i like share my work with XDA, if there's a Dev interested in make the Port succesfull. This is my Organization account in GIthub:
https://github.com/Droid2Fox
There, i have all the sources ready to start building the Port, it has problem building thats bad for me, because i don't know how to resolve it. If you're interested in continue with the Port you can follow those steps:
Steps:
Clone the repo: https://github.com/Droid2Fox/B2G
Into the repo directory run in the terminal: ./config.sh i9300
When it finishes the download of sources: ./build.sh
And flash with the finally package
For more information visit:
https://developer.mozilla.org/en-US...lug=Mozilla/Firefox_OS/Building_Boot_to_Gecko
https://developer.mozilla.org/en-US...Firefox_OS/Preparing_for_your_first_B2G_build
What's the problem with the Port:
Problems with galloc library
Problems when compile ./test.....js
Possibly other problems
I know that someone can do it more easier, i have some time ago doing this but i can't resolve all the problems, for that reason i decide that other Devs interested can complete this.
Thanks so much, i will be reading if someone is working on it.
Merged the two "firefox i9300" threads (both started by the same person in the same section) together.
How to give intent for accessing card activity,its not taking usual class.
Below is code snippet im providing. can anyone provide me solution
public void onClick(View v) {
if(txtUsername.getText().toString().equals("test") &&
txtPassword.getText().toString().equals("1234")){
Toast.makeText(getApplicationContext(), "Credentials Accepted",
Toast.LENGTH_SHORT).show();
Intent i = new Intent(Login_activity.this, HelloCardActivity.class); //hellocardactivity is another card activity. and login_activity is login page
startActivity(i);
Login_activity.this.finish();
}
else{
Toast.makeText(getApplicationContext(), "Wrong Credentials",
Toast.LENGTH_SHORT).show();
}
}
pls provide a solution
thank you
abhishek1234567 said:
How to give intent for accessing card activity,its not taking usual class.
Below is code snippet im providing. can anyone provide me solution
public void onClick(View v) {
if(txtUsername.getText().toString().equals("test") &&
txtPassword.getText().toString().equals("1234")){
Toast.makeText(getApplicationContext(), "Credentials Accepted",
Toast.LENGTH_SHORT).show();
Intent i = new Intent(Login_activity.this, HelloCardActivity.class); //hellocardactivity is another card activity. and login_activity is login page
startActivity(i);
Login_activity.this.finish();
}
else{
Toast.makeText(getApplicationContext(), "Wrong Credentials",
Toast.LENGTH_SHORT).show();
}
}
pls provide a solution
thank you
Click to expand...
Click to collapse
Please ask in the Chef Central > Android forum.
Just keep in mind that you have to provide more information (abot what card, on which device for what purpose, etc.) to get a more detailed help
Thread closed and thank you.
Hi Mods,
I do not have permissions to post in the development forum so I ask that you move this thread accordingly.
I have been researching the AT&T Galaxy Alpha sm-g850a variant in order to gain root access and, as you might know, have found absolutely nothing out there. All other international variants have been rooted Except the A model...which is what I am stuck with. I found a recently released CVE that states it is not patched until Lollipop 5.0 and allows a malicious intent request to take over SYSTEM permissions. I have been able to get the intent code into an app without bricking the phone and am having some NOOB java issues as I'm not a professional programmer. Any interest in helping finish this exploit would be greatly appreciated. A few code snippets below:
import android.accounts.NetworkErrorException;
import android.app.PendingIntent;
import android.accounts.AbstractAccountAuthenticator;
import android.accounts.Account;
import android.accounts.AccountAuthenticatorResponse;
import android.accounts.AccountManager;
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator" />
android.content.Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.settings","com.android.settings.accounts.AddAccountSettings"));
AccountManager.get(this).addAccount(
accountType,
null, /* authTokenType */
null, /* requiredFeatures */
addAccountOptions,
null,
mCallback,
null /* handler */);
mAddAccountCalled = true;
PendingIntent test = (PendingIntent) options.getParcelable("pendingIntent");
Intent newIntent2 = new Intent("android.intent.action.REBOOT"); <---testing---> somewhere in here I need to drop the SU binary and all of that good stuff.
try {
test.send(mContext, 0, newIntent2, null, null);
} catch (PendingIntent.CanceledException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
There is more code obviously. Posting some main parts to see if anyone is interested in helping.
w/respect-PitPin
Can't forget the credit for discovering this vulnerability:
Credits: Wang,Tao(Scloud) - seclist.org
Here is my NOOB showing. Wouldn't this mean I am on the right track and my app took "system root" privileges?
7386-7386/com.pitpindesigns.modpit.pitpin E/dalvikvm﹕ >>>>> com.pitpindesigns.modpit.pitpin [ userId:0 | appId:10248 ]
Nope...1000 would be root.
Sir,
Here isn't the right place for this type of threads so please open a new one here:
xda-developers -> Android Development and Hacking -> Android General
Good luck
Hello together
since more than 4 Days i stuck on my current app project with the message: "admin componentinfo does not own the profile".
I tried many things - Added an Work Profile programmaticaly - Gave Profile Owner via adb and i dont find the result.
Someone have an Idea, what im doing wrong?
Code to add managed profile:
Java:
private void provisionManagedProfile()
{
Activity activity = this;
if (null == activity) {
return;
}
Intent intent = new Intent(DevicePolicyManager.ACTION_PROVISION_MANAGED_PROFILE);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
intent.putExtra(
DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME,
activity.getApplicationContext().getPackageName()
);
} else {
final ComponentName component = new ComponentName(activity,
DeviceAdmin.class.getName());
intent.putExtra(
DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME,
component
);
}
if (intent.resolveActivity(activity.getPackageManager()) != null) {
startActivityForResult(intent, 1);
Toast.makeText(activity, "Already used!",
Toast.LENGTH_SHORT).show();
activity.finish();
} else {
Toast.makeText(activity, "Device provisioning is not enabled. Stopping.",
Toast.LENGTH_SHORT).show();
}
}
Code to use:
Java:
DevicePolicyManager dpm = (DevicePolicyManager) getApplicationContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
dpm.setProfileEnabled(compName);
compName is:
Java:
compName = new ComponentName(this, DeviceAdmin.class);
#Edit
If i start the manged Profile, its crashed after the end before the "next" button showing.
But if i take an look on my settings its showing that this profile was created.
Greetings
tpoeschl said:
Hello together
since more than 4 Days i stuck on my current app project with the message: "admin componentinfo does not own the profile".
I tried many things - Added an Work Profile programmaticaly - Gave Profile Owner via adb and i dont find the result.
Someone have an Idea, what im doing wrong?
Code to add managed profile:
Java:
private void provisionManagedProfile()
{
Activity activity = this;
if (null == activity) {
return;
}
Intent intent = new Intent(DevicePolicyManager.ACTION_PROVISION_MANAGED_PROFILE);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
intent.putExtra(
DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME,
activity.getApplicationContext().getPackageName()
);
} else {
final ComponentName component = new ComponentName(activity,
DeviceAdmin.class.getName());
intent.putExtra(
DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME,
component
);
}
if (intent.resolveActivity(activity.getPackageManager()) != null) {
startActivityForResult(intent, 1);
Toast.makeText(activity, "Already used!",
Toast.LENGTH_SHORT).show();
activity.finish();
} else {
Toast.makeText(activity, "Device provisioning is not enabled. Stopping.",
Toast.LENGTH_SHORT).show();
}
}
Code to use:
Java:
DevicePolicyManager dpm = (DevicePolicyManager) getApplicationContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
dpm.setProfileEnabled(compName);
compName is:
Java:
compName = new ComponentName(this, DeviceAdmin.class);
#Edit
If i start the manged Profile, its crashed after the end before the "next" button showing.
But if i take an look on my settings its showing that this profile was created.
Greetings
Click to expand...
Click to collapse
Technical discussion of Android development and hacking. No noobs, please. Device-specific releases should go under the appropriate device forum.
Note: Questions go in Q&A Forum
If you are posting a Question Thread post it in the Q&A forum. Technical discussion of Android development and hacking. No noobs, please. Device-specific releases should go under the appropriate device forum...
forum.xda-developers.com