Hi,
Please let me know if this is in the wrong sub-forum or not.
I'm developing an app, which should display the activity of another app (e.g. youtube) in its content.
I'm using the following code to get the activity of a 3th party application:
Code:
public View LoadActivity(String uniqueString) {
LocalActivityManager mgr = getLocalActivityManager();
Intent i = new Intent(this, SomeActivity.class);
Window w = mgr.startActivity("unique_per_activity_string", i);
View wd = w != null ? w.getDecorView() : null;
return wd;
}
However, due Security Restrictions, I'm receiving the following error:
java.lang.SecurityException: Requesting code from com.google.android.youtube (with uid 10065) to be run in process com.xxx.xxx.
Now i'm wondering if there is any way I can avoid this by rooting my device or doing some shell commands.
Regards,
XverhelstX
I have been working on a Home Screen widget for the past two days. The widget's `onUpdate()` method calls a service which fetches RSS information (title and image link) using `XmlPullParser`. These are working properly by printing the value in `LogCat`.
I want to set the text in the `TextView (tv1)` of AppWidget and image link as image to the `ImageView (imv1)` and a `TextView (go11)` clickable to open the browser and goto the link. I put the following in `OnStart()` just to test the SetText.
Code:
RemoteViews rv = new RemoteViews(this.getApplicationContext().getPackageName(),R.layout.main);
// Set the text
rv.setTextViewText(R.id.tv1,"WORKED");
Its not working. Second, I tried to set the image by:
Code:
InputStream is = (InputStream) new URL(imglnk).getContent();
Drawable d = Drawable.createFromStream(is, "src name");
rv.setImageViewResource(R.id.imv1, 0);
Bitmap bitmap = ((BitmapDrawable)d).getBitmap();
rv.setImageViewBitmap(R.id.imv1,bitmap);
Where imglnk is the link to the image. ImageView is not showing the image.
Then I tried to set the OnClick listener to open the browser with google as a test.
Code:
RemoteViews rv1 = new RemoteViews("com.example.axstartup",R.layout.main);
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
PendingIntent pi = PendingIntent.getActivity(context, 0, browserIntent,PendingIntent.FLAG_UPDATE_CURRENT);
rv1.setOnClickPendingIntent(R.id.go11, pi);
Even that is not working. Please help me with this.
How To Load an another Layout
1- First make an another Layout. name it whatever you want. I name it to "Main2"
2- In the OnCreate bundle, type this
Code:
SetContentView(Resource.Layout.Main2);
Main2 is the Layout that you have named.
3- Now just run it.
How to Load an another Activity
1- Create an another activity, name it whatever u want. I named it to "Activity2"
2- In the OnCreate Bundle, type this
Code:
StartActivity(typeof(Activity2));
Activity2 is the name the activity you want to load
How to Finish a Activity
1- In OnCreate Bundle, type this,
Code:
Finish();
2- Then run, it will only finish the activity where you u use the code
Be Creative to use the codes
I'll share with you what I learn
Loading Progress Box
Code:
private ProgressDialog progress;
Code:
progress = new ProgressDialog(this);
progress.SetTitle("Loading...");
progress.SetCancelable(false);
progress.SetMessage("My Testing");
progress.Show();
to dismiss it.
Code:
progress.Dismiss();
Download a file
Code:
using System.Net;
Code:
using (WebClient Client = new WebClient ())
{
Client.DownloadFile("http://www.abc.com/file/song/a.mpeg", @"/mnt/sdcard/my.mpg");
}
I Think this Guide going to help u lot
With this guide i think u will make a stable rom
So lets Start
1.)For fixing Bootloop when porting rom
Replace :
Code:
/system/lib/libandroid_runtime.so
/system/lib/libandroid_servers.so
/system/lib/libmedia_jni.so
*Repack boot.image
2.)Showing black screen after boot
Replace:
Code:
/system/lib/libMali.so
3.)Fixing Sensors
Replace:
Code:
/system/bin/akmd*
/system/lib/libsensors.so
/system/lib/libms3c_yamaha.so
/system/etc/firmware (folder)
/system/bin/servicemanager
4.)Fixing Bluetooth\Wifi not turning On\Off
Replace:
Code:
/system\lib\module\mtk_stp_wmt
5.) Fixing RadioFM
Replace:
Code:
\system\bin\fmradio
\system\etc\firmware\mt6620_patch_e3_hdr.bin
\system\etc\firmware\mt6620_patch_e6_hdr.bin
\system\etc\firmware\WMT.CFG
\system\lib\modules\mtk_fm_drv.ko
\system\lib\libfmcust.so
6.) Fixing Bluetooth
Replace:
Code:
/system/bin/bd_prov
/system/bin/uim*
/system/bin/hcid
/system/bin/bluetooth*
/system/bin/hciattach
/system/bin/sdptool
/system/xbin/hciconfig
/system/bin/brcm_patchram_plus
/system/lib/libbluetooth_mtk.so
/system/lib/libbluetoothem_mtk.so
7.) Fixing Wifi
Replace:
Code:
Wifi :
/system/bin/netcfg
/system/bin/dhcpcd
/system/bin/ifconfig
/system/bin/hostap
/system/bin/hostapd
/system/bin/hostapd_bin
/system/bin/pcscd
/system/bin/wlan*
/system/bin/wpa*
/system/bin/netd -> Fix wifi hotspot
/system/lib/libhardwarelegacy.so -> Fix wifi /system/lib/modules/mtk_stp_wmt.ko/system/lib/modules/mtk_wmt_wifi.ko
/system/etc/wifi (folder)
/system/etc/firmware (folder)
8.) Fixing Camera
Replace :
Code:
system/lib/libfeatureio.so - camera not working
/system/etc/media_profiles.xml
/system/lib/libcamera.so
/system/lib/liboemcamera.so
\system\lib\hw\camera.default.so
\system\lib\libcamera_client.so
\system\lib\libcameracustom.so
\system\lib\libcamer aprofile.so
\system\lib\libcameraservice.so
\system\lib\libmhal.so
\system\lib\libmhalcontent.s o
\system\lib\libmhaldrv.so
\system\lib\libmhalmdp.so
\system\lib\libmhalpipe.so
\system\lib\libmhalscenario.so
\system\lib\libmhalutility.so
\system\etc\permission\android.hardware.camera.front.xml
\system\lib\libOmx*.so -fix camcoder
\system\lib\libfeatureo.so -fix cam focus
# camera not working or force close or any other problem
copy all libs starting with /libcam*.so
#Camera showing wrong model in pic property?
Change model in build.prop
Still not working? Replace following file from STOCK to PORT
system/lib/libexif.so
9.)Fixing SD card/memory
Replace:
Code:
/system/bin/vold
\system\etc\vold.fstab -> edit file for swap internal and external
\system\etc\vold.fstab.nand
10.)Fixing Storage Not mounting
Replace:
Code:
Decompile framework-res.apk using apktool or apk multitool and replace following file from STOCK framework-res.apk to PORT framework-res.apk
/res/xml/storage_list.xml
11.) Fixing GPS
Replace:
Code:
\system\xbin\libmnlp
/system/etc/gps.conf
12.) Fixing Touch Screen(Haptic)
Replace :
Code:
/system/usr
/system/usr\keylayout\Generic.kl ->fix HomeKey
13.) Fixing Sim1/2 (RIL)
Replace:
Code:
\system\etc\firmware\modem.img
\system\etc\permission (RIL)
/system/bin/stmd
/system/bin/rild*
/system/etc/rril
14.) Fixing Audio/Sound
Relace:
Code:
\system\lib\libaudio* .so
15.) Fixing Network / 3G Network
Replace:
Code:
/ system / etc / agps_profiles_conf
/ system / etc / APNs-conf
/ system / etc / epo-conf
/ system / etc / spn-conf
/ system / etc / virtual-spn-conf-by-efspn
/ system / etc / virtual-spn-conf-by-IMSI
16.)Fixing Pixalation in video
Replace:
Code:
Replace following file from STOCK to PORT or Port to ur Ported rom
system/lib/libvcodecdrv.so
---------------------------------------------------------------
Note Some file will not be there so dont worry jst skip it
And last thing Dont forget to Press Thanks If this helped .......................:good:
Reserved
Thank you @adityaupreti ... i need this badly.... I will try to fix the bugs in my port ROM using this guide bro.....whenever i hav time......Thanks A lot bro
Please elaborate for bootloop.
as you said replace these files from port system folder & repack your boot image.
what changes it will make to boot image ?
will this work for 32 bit or 64 bit ?
---------- Post added at 09:48 AM ---------- Previous post was at 09:07 AM ----------
what if stuck at boot animation ?
rajlko said:
Please elaborate for bootloop.
as you said replace these files from port system folder & repack your boot image.
what changes it will make to boot image ?
will this work for 32 bit or 64 bit ?
---------- Post added at 09:48 AM ---------- Previous post was at 09:07 AM ----------
what if stuck at boot animation ?
Click to expand...
Click to collapse
rajlko said:
Please elaborate for bootloop.
as you said replace these files from port system folder & repack your boot image.
what changes it will make to boot image ?
will this work for 32 bit or 64 bit ?
---------- Post added at 09:48 AM ---------- Previous post was at 09:07 AM ----------
what if stuck at boot animation ?
Click to expand...
Click to collapse
whats ur phone model and what is the model of phone ur porting?
brownstyle said:
whats ur phone model and what is the model of phone ur porting?
Click to expand...
Click to collapse
ze550kl, 5.0.2 ( https://www.asus.com/in/Phone/ZenFone-2-Laser-ZE550KL/HelpDesk_Download/ 1.16.40.763) & YU Lettuce 12.0 version. (https://download.cyanogenmod.org/get/jenkins/124086/cm-12-20150901-SNAPSHOT-YNG4NAO254-lettuce.zip)
adityaupreti said:
Click to expand...
Click to collapse
Dear,
Please provide a solution, your solution does not work & it s still in bootloop, you have replied with
rajlko said:
ze550kl, 5.0.2 ( https://www.asus.com/in/Phone/ZenFone-2-Laser-ZE550KL/HelpDesk_Download/ 1.16.40.763) & YU Lettuce 12.0 version. (https://download.cyanogenmod.org/get/jenkins/124086/cm-12-20150901-SNAPSHOT-YNG4NAO254-lettuce.zip)
Click to expand...
Click to collapse
i think huawei honor 4x is a better option
brownstyle said:
i think huawei honor 4x is a better option
Click to expand...
Click to collapse
4x have 5.1 but base rom is 5.0.2.
rajlko said:
Dear,
Please provide a solution, your solution does not work & it s still in bootloop, you have replied with
Click to expand...
Click to collapse
It will not work coz ur porting a marshmallow or lollipop based ROM
Use any other guide of porting and then come to my threadto fix bugs
rajlko said:
ze550kl, 5.0.2 ( https://www.asus.com/in/Phone/ZenFone-2-Laser-ZE550KL/HelpDesk_Download/ 1.16.40.763) & YU Lettuce 12.0 version. (https://download.cyanogenmod.org/get/jenkins/124086/cm-12-20150901-SNAPSHOT-YNG4NAO254-lettuce.zip)
Click to expand...
Click to collapse
thanx for providing this link but when i try to flash it says E:footer is wrong installation aborted.we have the same device asus ze550kl..wat could have been the problem?
brownstyle said:
thanx for providing this link but when i try to flash it says E:footer is wrong installation aborted.we have the same device asus ze550kl..wat could have been the problem?
Click to expand...
Click to collapse
asus signature verification process is totally different. , I have provided both link so that any one may try to port it.
both having same version android, same cpu, same gpu.
rajlko said:
asus signature verification process is totally different. , I have provided both link so that any one may try to port it.
both having same version android, same cpu, same gpu.
Click to expand...
Click to collapse
is there any way to bypass that verification process?any other workaround?
what are the lib files for bluetooth in Marshmallow for Qualcomm devices ? I have found libbluetooth_jni.so but replacing it didn't fix the issue. What other files do I have to replace?
Great Work
Thanks for this guide
ROBERT CM said:
Great Work
Thanks for this guide
Click to expand...
Click to collapse
Ur welcome
Hi adi bro.
I have cm 12.1 ROM but in camera video recording is not working can u tell me how to fix it??
Man trying get wifi on this port to the s6 i found some files which i moved then bingo wifi turned on scanning put password in now its saying Failed to obtain IP address any tips some the files just arnt there. I got 920p S6
Jimmy1life said:
Man trying get wifi on this port to the s6 i found some files which i moved then bingo wifi turned on scanning put password in now its saying Failed to obtain IP address any tips some the files just arnt there. I got 920p S6
Click to expand...
Click to collapse
Always when i had that problem, i had to go to system/etc/dhcpcd and change the permission of dhcpcd-run-hooks so that "Owner", "Group" and "Others" can execute. Also in build.prop you can change ro.secure.storage=true to false (if it's not already). This is usaly for not saving the password but worth a try.
And by the way if someone has more knowledgement than me:
I'm on the Note Edge and therefor does no exist a CM 13 version. I have read somewhere you can do it also with a sammy rom as base. So i took a S7 edge rom and a Note edge rom, both 6.0.1. I get it to flash and boot but endless boot. I pulled the prev_dump.log to get the errors but all i can see is this
Code:
01-01 00:11:15.899 17542 17542 I boot_progress_system_run: 680900
01-01 00:11:15.999 17542 17542 W SystemConfig: [COLOR="red"]Got exception parsing permissions[/COLOR].
01-01 00:11:15.999 17542 17542 W SystemConfig: [COLOR="red"]org.xmlpull.v1.XmlPullParserException: No start tag found[/COLOR]
01-01 00:11:15.999 17542 17542 W SystemConfig: at com.android.server.SystemConfig.readPermissionsFromXml(SystemConfig.java:275)
01-01 00:11:15.999 17542 17542 W SystemConfig: at com.android.server.SystemConfig.readPermissions(SystemConfig.java:197)
01-01 00:11:15.999 17542 17542 W SystemConfig: at com.android.server.SystemConfig.(SystemConfig.java:157)
01-01 00:11:15.999 17542 17542 W SystemConfig: at com.android.server.SystemConfig.getInstance(SystemConfig.java:110)
01-01 00:11:15.999 17542 17542 W SystemConfig: at com.android.server.pm.PackagePrefetcher.prefetchPermissions(PackagePrefetcher.java:251)
01-01 00:11:15.999 17542 17542 W SystemConfig: at com.android.server.SystemServer.run(SystemServer.java:420)
01-01 00:11:15.999 17542 17542 W SystemConfig: at com.android.server.SystemServer.main(SystemServer.java:363)
01-01 00:11:15.999 17542 17542 W SystemConfig: at java.lang.reflect.Method.invoke(Native Method)
01-01 00:11:15.999 17542 17542 W SystemConfig: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
01-01 00:11:15.999 17542 17542 W SystemConfig: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
01-01 00:11:16.059 17542 17630 W ResourceType: Failure getting entry for 0x7f020020 (t=1 e=32) (error -75)
01-01 00:11:16.059 17542 17630 D PackagePrefetcher: put: /system/app/ANTRadioService
01-01 00:11:16.089 702 866 E BootAnimationLoader: [email protected] : ####Clear Cover is closed####
01-01 00:11:16.099 17542 17542 D AndroidRuntime: Shutting down VM
01-01 00:11:16.099 17542 17542 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main
01-01 00:11:16.099 17542 17542 E AndroidRuntime:[COLOR="red"] java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "TZ_CCM_register_default" referenced by "/system/lib/libandroid_servers.so"...[/COLOR]
01-01 00:11:16.099 17542 17542 E AndroidRuntime: at java.lang.Runtime.loadLibrary(Runtime.java:372)
01-01 00:11:16.099 17542 17542 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1076)
01-01 00:11:16.099 17542 17542 E AndroidRuntime: at com.android.server.SystemServer.run(SystemServer.java:463)
01-01 00:11:16.099 17542 17542 E AndroidRuntime: at com.android.server.SystemServer.main(SystemServer.java:363)
01-01 00:11:16.099 17542 17542 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-01 00:11:16.099 17542 17542 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
01-01 00:11:16.099 17542 17542 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
01-01 00:11:16.119 17542 17629 D PackagePrefetcher: put: /system/app/AllShareCastPlayer
01-01 00:11:16.149 17542 17542 E android.os.Debug: ro.product_ship = true
01-01 00:11:16.149 17542 17542 E android.os.Debug: ro.debug_level = 0x4f4c
01-01 00:11:16.149 17542 17542 E android.os.Debug: sys.mobilecare.preload = false
01-01 00:11:16.149 17542 17542 E AndroidRuntime: Error reporting crash
01-01 00:11:16.149 17542 17542 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'void android.app.IActivityManager.handleApplicationCrash(android.os.IBinder, android.app.ApplicationErrorReport$CrashInfo)' on a null object reference
01-01 00:11:16.149 17542 17542 E AndroidRuntime: at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:96)
01-01 00:11:16.149 17542 17542 E AndroidRuntime: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
01-01 00:11:16.149 17542 17542 E AndroidRuntime: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
01-01 00:11:16.149 17542 17542 I Process : Sending signal. PID: 17542 SIG: 9
01-01 00:11:16.179 702 866 E BootAnimationLoader: [email protected] : ####Clear Cover is closed####
01-01 00:11:16.209 16339 16339 [COLOR="Red"]E Zygote : Exit zygote because system server (17542) has terminated[/COLOR]
But i don't know how to solve it.
Or is it kernel related because of selinux (i use stock Note edge)?
Code:
[ 537.872906] init: Warning! Service gatekeeperd needs a SELinux domain defined; please fix!
[ 537.873485] init: Warning! Service gpu_snapshotd needs a SELinux domain defined; please fix!
[ 537.873938] init: Warning! Service thermal-engine needs a SELinux domain defined; please fix!
[ 537.874395] init: Warning! Service imsqmidaemon needs a SELinux domain defined; please fix!
[ 537.874892] init: Warning! Service mdm_helper needs a SELinux domain defined; please fix!
[ 537.875353] init: Warning! Service mdm_helper_proxy needs a SELinux domain defined; please fix!
[ 537.886664] init: cannot execve('/system/bin/mdm_helper_proxy'): Permission denied
[ 537.887518] init: cannot execve('/system/bin/mdm_helper'): Permission denied
[ 537.887717] init: property_set("ro.service.mdm_helper_restarted", "true") failed
[ 537.888674] init: setgid failed: Invalid argument
[ 537.890330] init: cannot execve('/system/vendor/bin/thermal-engine'): Permission denied
[ 537.891130] init: cannot execve('/system/bin/gpu_snapshotd'): Permission denied
[ 537.891871] init: cannot execve('/system/bin/gatekeeperd'): Permission denied
Or is it completly nonsens?
Thank you.
prev_dump.log
Hey everyone,
I'm having trouble disabling DAA and SLA protection on my Vivo Y33S (V2109), i'm using the mtk bypass utility, but when i execute the command python main.py,i get this error:
[2023-06-16 15:12:41.356299] Waiting for device
[2023-06-16 15:12:41.362994] Found device = 0e8d:201c
Traceback (most recent call last):
File "C:\Users\Lucec\OneDrive\Desktop\bypass_utility\main.py", line 237, in <module>
main()
File "C:\Users\Lucec\OneDrive\Desktop\bypass_utility\main.py", line 40, in main
device = Device().find()
File "C:\Users\Lucec\OneDrive\Desktop\bypass_utility\src\device.py", line 109, in find
self.ep_in = usb.util.find_descriptor(cdc_if, custom_match=lambda x: usb.util.endpoint_direction(x.bEndpointAddress) == usb.util.ENDPOINT_IN)
File "C:\Users\Lucec\AppData\Roaming\Python\Python310\site-packages\usb\util.py", line 192, in find_descriptor
return _interop._next(desc_iter(**args))
File "C:\Users\Lucec\AppData\Roaming\Python\Python310\site-packages\usb\_interop.py", line 68, in _next
return next(iter)
File "C:\Users\Lucec\AppData\Roaming\Python\Python310\site-packages\usb\util.py", line 183, in desc_iter
for d in desc:
TypeError: 'NoneType' object is not iterable
I have the correct drivers installed and i have checked that USB Debugging is enabled, If any body knows how to fix this error, i would very much appreciate it!