How to Call system API from an application - Samsung Galaxy S9 Questions & Answers

Hey Guys,
i have a rooted phone with Android 12 image, i would like to call an system API from an application, how would i go about it ?
things i have done so far without success
1. built the apk with aosp build
2. copied the application in /system/priv-app folder
3. created permission.xml in /etc/permissions/ folder
4. ofcourse have asked the permission in the manifest file
inspite of all these i still get the error "this user nor the process have the permission for MAINELINE_NETWORK_STACK
any help would be appreciated

Related

[Q] Reinstall HTC Sense stock apps

Hello,
I've removed the Gallery app (com.htc.album.apk) using the Titanium backup 'cause I wanted to replace it with another one. I do have the backup, but when I do a restore it just does the circle with restore in progress forever. Is there a way to restore the Gallery?
The only reason why I want to restore is that when I use the HTC Sense apps which cooperate with Gallery (for example the Camera), when I want to see the photos the apps crash - I thought it would be possible to choose another app like QuickPic for this photo browsing, but apparently not. Therefore I would be very grateful if somebody knows how to restore the app.
The phone has s-off and is rooted.
Thank you very much.
SOLUTION
OK, I've found a way how to do it, so just want to share with others, in case anybody gets into the same kinda trouble as I did ;-)
The steps:
1. Download the zipped RUU of the stock ROM and extract the APK and ODEX files of the app you want to restore (HTCAlbum.apk and HTCAlbum.odex in my case)
2. Using Root Explorer (or some other tool that can write into /system/app) copy the apk and odex files into it.
3. Again using the same tool set the permissions of the 2 files to rw-r--r-- and set the owner and group to 0 - root (both user and group)
4. What I did now was try to Install the apk in the /system/app, but it failed, so probably this step is not needed - just put it here in order to reproduce exactly all steps.
5. Reboot the phone -> after the reboot the app should appear in the app drawer and all HTC stock apps now work with using the Gallery.
Please if you try this method, write down your comment, whether you succeeded or not.
Cheers and good luck...
Didn't work for me. Tried apk and odex gallery from newest ruu.
I also accidentally removed the Gallery (com.htc.album.apk), and I've found a way out to do it.
First to do :
> Install the latest Java JDK.
> Install HTC Sync & drivers.
> Install the Android SDK.
> Open SDK Manager after installing the Android SDK successfully.
> Install every 'Available Packages' in SDK Manager.
> Edit 'Path' in Environmental Variables and put this behind the line
Code:
;C:\android-sdk-windows\platform-tools
> Enable USB Debugging on your HTC.
And after all this above..
1 -Connect your Wildfire to the PC.
2 -Reboot into CWM Recovery.
3 -Go to Mounts and Storage.
4 -Select Mount /system.
Then use adb :
Oh and make sure the HTCAlbum.apk is in the same map as adb.exe
Code:
adb push HTCAlbum.apk /system/app
-MAKE SURE YOUR DEVICE IS S-OFF- Otherwise it won't work.
Solar_ said:
MAKE SURE YOUR DEVICE IS S-OFF- Otherwise it won't work.
Click to expand...
Click to collapse
This doesn't need S-OFF. Just a Custom Recovery like Clockworkmod.
rocky7x said:
OK, I've found a way how to do it, so just want to share with others, in case anybody gets into the same kinda trouble as I did
The steps:
1. Download the zipped RUU of the stock ROM and extract the APK and ODEX files of the app you want to restore (HTCAlbum.apk and HTCAlbum.odex in my case)
2. Using Root Explorer (or some other tool that can write into /system/app) copy the apk and odex files into it.
3. Again using the same tool set the permissions of the 2 files to rw-r--r-- and set the owner and group to 0 - root (both user and group)
4. What I did now was try to Install the apk in the /system/app, but it failed, so probably this step is not needed - just put it here in order to reproduce exactly all steps.
5. Reboot the phone -> after the reboot the app should appear in the app drawer and all HTC stock apps now work with using the Gallery.
Please if you try this method, write down your comment, whether you succeeded or not.
Cheers and good luck...
Click to expand...
Click to collapse
It worked! Thank you:good:

[NST] HELP IN PATCHING framework.jar

HI EVERY BODY, I REALLY NEED HELP IN PATCHING this files to get Arabic support. I am not an expert with patching and code stuffs . Last days i was trying to root my nook. First i rooted with Slasicha but i was not able to run android market,
then restored and rooted again with minimal touch. i was afraid of it because it involves installing cwm which i don't know any thing about it, but with following steps and instructions, It worked . also Google apps and market
files that i need to try patching it
framework.jar
libwebcore.so
framework.jar takes care of shaping texts in android on all texts except Gmail and the browser, while libwebcore.so takes care of shaping texts in the default Browser and Gmail app.
This patcher will attempt to get you Arabic support in both of these files.
This should work with all Android phones sporting Android
these steps taken from here :
http://blog.devasque.com/?page_id=11
by madmack member
http://forum.xda-developers.com/member.php?u=1436971
Requirements:
Your device needs to be rooted.
Your Android version is 2.1 or newer
Your ROM needs to be deodexed. To find out if your installed ROM is deodexed, navigate to /system/framework on your phone. If you see a file called framework.odex then this patch will NOT work for you.
Your rom is not based on MIUI.
Steps to apply the patch:
Download the patch below and extract it to a folder on your computer.
Pull /system/framework/framework.jar from your phone and place it in the subfolder input that you extracted in step 1
If you’re not using a CyanogenMod ROM, then you’ll also need to pull /system/lib/libandroid_runtime.so from your phone and place it in subfolder input that you extracted in step 1
If you’re interested in getting arabic shaping in the Browser, pull file /system/lib/libwebcore.so from your phone and place it in subfolder input as well.
Double click on commands.exe. Do not close the black cmd screens that will pop up. Once the patch is done, you should get a patched framework.jar in the subfolder output
Version 0.800 provides a recovery flashable file in folder output. Place that on your sdcard, reboot into recovery and flash it. If the flashing through recovery didn’t work for some reason, you’ll need to do the following manually:
Put file output/framework.jar in your phone at /system/framework/
Put file output/libandroid_runtime.so in your phone at /system/lib/ (if this file exists, it shouldn’t if you’re arabizing CM6).
Put file output/libicuuc-arabic.so in your phone at /system/lib/ This is extremely important, failing to place this file will result in a boot loop of your deivce
If file exists: Place file output/libwebcore.so in your phone at /system/lib/
If file exists: Place file output/lib__bcore.so in your phone at /system/lib/
I’ve also included the Aljazeera fonts in fonts. You can place these in /system/fonts and reboot
Sometimes permissions and xml data doesn’t get updated correctly resulting in corrupted data entries. If you receive a bunch of Force Closes after a reboot, you’ll need to Factory Reset.
member: dark hawk, on this post
http://forum.xda-developers.com/showpost.php?p=22521341&postcount=17
said ,
dark_hawk said:
As for how to add Arabic, I'll add a guide soon, it involves patching the Framework.jar only, as I found that patching the lib files causes crashes in the anything related to the stock browser , like gmail and such. But all in all, You'll have Arabic in everything else.
Click to expand...
Click to collapse
but he did not answer, i hope he is ok
can someone help me with that a screenshot with these website :
www.ce4arab.com
www.bbc.co.uk/arabic/
, it would be a great help

[Help] my android destroy weight !

I do not know how to restore my android mobile operating system.
At a few months ago, I had made a post for help on my android phone on this forum, but until now I have not been able to fix my android system.​
Problem:
At that time, I'm interested in from the android system update and then I download GSmart_G1315_V0.50.2_PL_CZ.zip which, according to a tutorial that I could read in spend on upgrading the android phone Nexian nx-a892.
I then tried to follow the tutorial,
Starting from sw_ver.txt edit the file in /system/etc/sw_ver.txt (Using Root Explorer) says "BUILD_SW_PROJ = Nexian", I replace the "Nexian" with "pl_cz" according to the tutorial.
Then edit the file build.prop in /system/build.prop and replace all the "Nexian" with "GSmart" and "A892" with "G1315".
Then do the update from sdcard to file Update.zip
At this moment I am having a problem, because there is a warning error, but the operating system can still get into the android desktop.
I then opened explorer and re-edit root /system/build.prop in this section:
"Ro.product.model = Nexian A892", delete "Nexian" then save it.​
then I go to /system/app/ .. and remove all the applications in it,,, I like hypnotized make the same mistake.
**** Error occurs when phone restart... *****
Expect the solution:
Among my friends, who can help me solve this problem?
I can only get fastboot mode but can not perform the update from here.
I can not do the update from sdcard, warning always appears E: Error in line7.
I want to activate adbmode, does not work at all.
Help from friends so I would expect. Previously I thank you.
No body can help me in this forum. Ba*

[WIP][4.4.4] Emulated Android ROOT and unlock

I am not responsable of any damage in your phone​Hi i have create this aow.wim images with ROOT bin and uncheked not to used BT and GSM in android apps but I cant copy it so system32/aow.wim
Can someone test it and put how to copy the image to pohne and most important if it works and if it is rooted you need to install SuperSU or others apps but bins are there...
Install route WINDOWS/System32/aow
Download:
http://www.mediafire.com/download/n68tle0kzd29b3e/aow.wim
For now i am tired of thinking i will try next day if i got time for it to copy to phone and try iif it works
This most likely won't work. The aow.wim on the system has extra headers that have Android-specific metadata attached to it. I see that you most likely just copied the contents out of it and then created a NEW wim, as it's impossible to commit changes to the aow.wim that comes with the update due to it complaining about WIMBoot.
snickler said:
This most likely won't work. The aow.wim on the system has extra headers that have Android-specific metadata attached to it. I see that you most likely just copied the contents out of it and then created a NEW wim, as it's impossible to commit changes to the aow.wim that comes with the update due to it complaining about WIMBoot.
Click to expand...
Click to collapse
I run dism comands and one ofgf them was create image from folder that was the previously one extract from phone and mod and it give me ok and the aow.wim image but now i dont know how to put it in system32 to try it
werty100 said:
I run dism comands and one ofgf them was create image from folder that was the previously one extract from phone and mod and it give me ok and the aow.wim image but now i dont know how to put it in system32 to try it
Click to expand...
Click to collapse
I not 100% sure if i'm correct in saying this but I don't think there is actually any method of putting the new aow.wim into the AOW folder, as using MTP or the built in file explorer either returns Permission error on unknown error respectively and @snickler has found that you cannot write to that directory using his SFTP method.
Plus @ADeltaX has managed to get root 2/3 working but project astoria doesnt allow two apps to overlay each so you cannot grant root access as there is no superSU pop-up. So he is working on modding superSU.
Just turn off "Protection against false touches" or smth like that in SuperSU (Settings)

How to install Xposed Framework on the Huawei GX8/G8.

I was curious to know to how xposed framework can be installed on the Huawei GX8 so I went through different sites to find at least an easy way to do that but honestly i didn't find any easy steps. They are more or less complicated depending on the individual attempting the procedure. ok
It is advised to take complete backup before deodexing so that you can replace the deodexed apps with the odexed backups in case you face some Apps crashing. Deodexing is important in order to make xposed framework install successfully and use some modules as well.
Warning: You attempt this procedure at your own risk, bare in mind that I will not be held responsible if you brick your device for attempting this procedure.
Prerequisites:
Rooted device.
Fully functional TWRP recovery or any other recovery with File manager support.
Backup all your data & apps.
Download this APP for deodexing:https://docs.google.com/uc?id=0BwSanb5zBfFiaHN5MGV2ZnFqcVU&export=download
Deodexing the ROM:
Step 1: Extract the BatchAPKTool to your preferred location.
Step 2: Open BatchAPKTool.exe. Set Language to English when prompted.
Step 3: The tool will now ask you to chose task.
Step 4: Type 83 and set smali version to smali-2.1.2.jar by entering 2. Now type 84 and set Android API level to 21 (Android 5.0), 22 (Android 5.1.1) or 23 (Android 6.0). This value must match with the firmware you have currently installed on your device.
Step 5: Now connect your device to PC. Make sure USB Debugging Mode is enabled and necessary Huawei Drivers are installed.
Step 6: In BatchAPKTool window, type 13 and then enter 4. This will pull all files from /system/app , /system/framework , /system/priv-app from your device. This may take some time so wait patiently. (You might also do it manually using Root Explorer)
Step 7: Once it’s done press Enter to return to main BatchAPKTool Menu.
Step 8: We’ll now deodex the apps. Enter 01 in the tool. It will now ask you for your ARM version. Enter “arm” and press Enter. Wait for the process to be completed.
Step 9: In the directory where you have extracted BatchAPKTool, you’ll find three folders named _priv-app, _app and _framework. Remove the underscore from the folder names so that they are now priv-app, app and framework respectively.
Step 10: Create a new SYSTEM FOLDER and name it DEODEXED SYSTEM and copy those three folders inside it. Now copy the System folder to your SD card or Internal Memory.
Replacing Odexed Apps with Deodexed Apps:
1: Boot your device into recovery and backup System partition
2: Using the built in file manager in recovery, delete the app, framework and priv-app folders from your system partition.
VERY IMPORTANT: Make sure that in twrp in the "Mount" section the "Only mount system read-only" is unchecked in order to copy the files to system.
3: Now copy the app, framework and priv-app folders from system folder (which we copied to SD card or Internal) and paste them to the SYSTEM partition i.e. /system/
4: When done, reboot your device. First boot will be extremely long. Might take 20-30 minutes so be patient.
ALTERNATE METHOD:
NOTE: It may not be possible to copy files from one folder to another in recovery mode, so this is what i did...
1. Create a NEW FOLDER in your internal memory and name it ORIGINAL SYSTEM.
2. Copy PRIV-APP, APP and FRAMEWORK from the ORIGINAL SYSTEM FOLDER and paste it in the ORIGINAL SYSTEM FOLDER in the memory of your device.
3. Now copy the THREE files in the DEODEXED SYSTEM FOLDER to the ORIGINAL SYSTEM FOLDER in the root of your device.
4. Your device will reboot immediately the files are copied. The boot may take 20-30 minutes so be PATIENT..
Installing Xposed Framework.
1. Go to the official thread and download the latest version(xposed-v86-sdk23-arm64) for Marshmallow
2. Download the apk and the uninstaller arm zip just in case anything goes sideways you can flash the uninstaller to unistall xposed framework.
3. Install the apk file and flash the v80-sdk23-arm zip in recovery. Again device might take 20-30 minutes to boot.
4. For Android 6.0:
Open build.prop
add these lines ro.config.hwtheme=0
ro.config.hw_theme=0
For Android 5.0-5.1.1:
Open local.prop (in system/emui/base/prop/local.prop)
add these lines ro.config.hwtheme=0
ro.config.hw_theme=0
The commands is to ACTIVATE the framework.
Thanks to mfbcool for the guide and Rockchip for Batch tool.
OK I have successfully installed xposed installer and some xposed modules, however some of the modules seem not to be working.
Partially working modules....
N-ify
Not working.......
Gravitybox
Lockscreen Mods
Qs tiles per row
xnotifications
Working.......
YouTube Adaway
Greenify
Maxlock
Flat Style Bar Indicators
Jit Screen On
Has anyone tried this method and had some success .....?
Ok. I'm now on cyanogenmod so I will be releasing xposed modules that are working perfectly on the rom. Stay tuned.
Its been a while. Yeah, have been busy with school and work.
Ok, here's a list of xposed modules working flawlessly with cyanogenmod.....
Gravitybox MM
Flat Style Bar Indicators
Android N-ify
Blurred System Ui MM
ifont
Youtube adaway
Maxlock
USB for Marshmallow
Adblock
Greenify
The list will be updated with time. If I helped you in any way, don't forget to hit the like button... Thanks
Sent from my HUAWEI GX8 using XDA Labs
Good joob BRO
bro i have LAG after install xposed its work 100% but there is some lag in apps
Ahmed-Iraq said:
bro i have LAG after install xposed its work 100% but there is some lag in apps
Click to expand...
Click to collapse
Sorry for the late reply....which apps are you experiencing lags with???
Sent from my Nexus 6 using Tapatalk

Categories

Resources