How to include Android.mk into my Gradle build - Android Q&A, Help & Troubleshooting

Hey, noob developer here. I'm trying to make an app as a privileged module because I need to access a few files on the device that I can't access using a normal app (with no privileges and permissions). I have an android.mk (its located at {packagename}\app\src\main) with the command LOCAL_PRIVILEGED_MODULE := true in it. I'm not sure how to include that into my gradle.build file so that I take in that command and hopefully spits an apk which is a privileged module. I'm using Android Studio Chipmunk (2021.2.1).
I'm sorry if i missed any details, I have recently started developing android applications so I don't have a lot of knowledge and experience, please ask any clarification questions and I'll try my best to simplify my problem for you to understand.
EDIT: I did a bit more research and added this to my gradle.build file
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
the code builds successfully but i still havent been able to access files in the /data/ folder. Any help would be greatly appreciated. TIA!

pranshullol said:
Hey, noob developer here. I'm trying to make an app as a privileged module because I need to access a few files on the device that I can't access using a normal app (with no privileges and permissions). I have an android.mk (its located at {packagename}\app\src\main) with the command LOCAL_PRIVILEGED_MODULE := true in it. I'm not sure how to include that into my gradle.build file so that I take in that command and hopefully spits an apk which is a privileged module. I'm using Android Studio Chipmunk (2021.2.1).
I'm sorry if i missed any details, I have recently started developing android applications so I don't have a lot of knowledge and experience, please ask any clarification questions and I'll try my best to simplify my problem for you to understand.
Click to expand...
Click to collapse
Hello and good evening, @pranshullol
Welcome to XDA! I hope you'll always find and get the support you require.
However. prior to your next posting please read the guidances that are stuck on top of every forum like
[ATTN] : Read before posting - Any questions posted here will be MOVED or CLOSED
Please read the below before posting. Any questions not development related will be moved or closed. Forum Searching | Posting | The Basics: (Make sure you've read them before starting a new thread) Forum Rules Forum Search Google Forum...
forum.xda-developers.com
and the others. I've moved the thread to Android Q&A.
Thanks for your cooperation!
Regards
Oswald Boelcke
Senior Moderator

Related

[Tip] Which Questions can be asked here.

Hi all,
As a member of XDA me and many others are trying to help and answer everyone with their questions. However some questions are device related and should not be asked here but at the correct forum for the device for example the Samsung Galaxy S3.
So a friendly reminder ( I'm sorry moderators, perhaps one of you guys should have created this): With 9 posts or less you ARE allowed to ask your questions of your device in their Q&A thread/forum. For more information about the 10 post rule i refer to here: 10 Post Rule on XDA Developers.
For Example:
Hi all,
My phone (Samsung Galaxy S3) keeps bootlooping after installing Android revolution HD.
I've tried several things but i cant seem to fix it myself. Anyone have some advice for me?
Click to expand...
Click to collapse
The above question can be asked in Samung Galaxy S3 I9300/I9305 Q&A troubleshooting forum.
To find your phone:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Type your devices name eg: Samsung Galaxy S3 or I9300/I9305 In the FIND YOUR DEVICE.. Searchbar and press enter. You will be redirected to the forum of your device. If you are not certain which version or phone you have: Open settings > About Phone > Model
You will be wondering why you should post your question there:
You will get a lot more response and comment from users with the same phone
It is device related so users with the same issue can report there and together you can solve it
The Q&A where you are posting now (not device related) is mostly used for devices without an seperated place or random android questions which are not device specified
Every phone is diffent aswell as the guides/how to's etc. At the device/phone forum place you can find them all at one place. Prevents you from searching through XDA developers
All other questions can be asked here. If you by accident place a question here. Dont worry it will be reported to the XDA staff so that it can be moved to the correct place
Regards,
Mrjraider
- A late reserve for some most answerd questions -
I hate to bump this but could this perhaps be a sticky?

Google Play Protect shows warning

Can anyone please tell me how can to fix the fake google play protection warning shown in the apk while installing the app.
I have tried signing the app with android debug key and also i have tried signing the apk with my private key(whose apk is present in playstore) but still i used to get this warning.
I dont want to disable the play protect(as this is not the solution)
PS: when i make clones of the same apk for eg making 10 clones of 1same apk and every apk with new unique package name out of those 10 clone i used to see the play protect warning in only 4-5apks and rest apks used to be good (its not the issue of the package name)
Everything was working good but i started facing this issue of google play protect warning since Nov2021.
I have also tried to sign the apk with apkeasytool but still the same issue.
IT WILL BE BIG HELP FOR ME TO IF SOMEONE WILL FINDOUT SOME WAY TO FIX THIS PROBLEM
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
thegreatsamar said:
Can anyone please tell me how can to fix the fake google play protection warning shown in the apk while installing the app.
I have tried signing the app with android debug key and also i have tried signing the apk with my private key(whose apk is present in playstore) but still i used to get this warning.
I dont want to disable the play protect(as this is not the solution)
PS: when i make clones of the same apk for eg making 10 clones of 1same apk and every apk with new unique package name out of those 10 clone i used to see the play protect warning in only 4-5apks and rest apks used to be good (its not the issue of the package name)
Everything was working good but i started facing this issue of google play protect warning since Nov2021.
I have also tried to sign the apk with apkeasytool but still the same issue.
IT WILL BE BIG HELP FOR ME TO IF SOMEONE WILL FINDOUT SOME WAY TO FIX THIS PROBLEM
View attachment 5516469
Click to expand...
Click to collapse
@thegreatsamar
Prior to your next posting please read the guidances that are stuck on top of every forum like
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
I've moved the thread to Q&A.
Regards
Oswald Boelcke
Senior Moderator

HTC 5G HUB - QXDM (LTE band locking issue)

anyone knows how can this be fixed?, it just says waiting and it just wont move beyond that,
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I booted my htc 5g hub from magisk using the option to reboot to EDL and I´m not sure if this is the proper diagnostic port or what.
Thanks!
SnakeEYEPTY said:
anyone knows how can this be fixed?, it just says waiting and it just wont move beyond that,
View attachment 5693853
I booted my htc 5g hub from magisk using the option to reboot to EDL and I´m not sure if this is the proper diagnostic port or what.
View attachment 5693857
Thanks!
Click to expand...
Click to collapse
Hello and good morning, @SnakeEYEPTY
Welcome to XDA. I hope you'll always find and get the support you require.
However, prior to your next posting please read the guidances that are stuck on top of every forum like
[ATTN] : Read before posting - Any questions posted here will be MOVED or CLOSED
Please read the below before posting. Any questions not development related will be moved or closed. Forum Searching | Posting | The Basics: (Make sure you've read them before starting a new thread) Forum Rules Forum Search Google Forum...
forum.xda-developers.com
and the others. I've moved the thread to Android Q&A.
Thanks for your cooperation!
Regards
Oswald Boelcke
Senior Moderator
I was doing it wrong.
How do I get my htc 5g hub into diag mode?
1. make sure you have a rooted device.
2. connect it to your PC
3. open command prompt
4. Type in:
adb shell
su
setprop sys.usb.config diag,adb
5. You should see this on device manager:

Can't access files that were pushed to the Android device via ADB root

I am having a problem accessing files pushed to my Android 12 tablet via ADB under a root account (see picture 1).
(Picture 1)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
When doing a directory listing using a regular user in ADB I am unable to view the contents of the two files that were uploaded via ADB root user . Both '1.jpg' and '3.jpg' where uploaded using ADB root. The file '2.jpg' was uploaded using a the regular ADB user (i.e. ADB unrooted)
(Picture 2)
If I do a directory listing under the root shell user I can see all the files
(Picture 3)
Note: that on '1.jpg' I changed the user & group (via 'chown shell:ext_data_rw 2.jpg') so that it matches '2.jpg'. So you would think '1.jpg' would be visible to a regular user since it has the same permissions, user, & group as '2.jpg' which is visible to regular user (See picture 3). Prior to running 'chown shell:ext_data_rw 2.jpg' it had the same user and group as '3.jpg' (i.e. root).
(Picture 4)
I used ADB to demonstrate this problem, but what I am really trying to solve is the same problem that occurs when I upload files via our sFTP server which running under a rooted SSH daemon. I figure most people don't have rooted SSH servers running on their Android device. I figured this would be closer to what they know. Not sure to do to make these files accessible to a regular user. What I'm trying to do is update files that are used by our Kotlin application (running under a regular user).
I think this is file permissions issue, but one of the other developers mentioned it may be a encryption issue (Encrypted Files System or File Based Encryption). He seemed to imply that the files where not visible between separate users. Not sure that makes sense to me as root user can see the file (2.jpg) uploaded by a regular user.
Any help would be appreciated.
smedlytonker said:
Any help would be appreciated.
Click to expand...
Click to collapse
Hello and good morning, @smedlytonker
Prior to your next posting please read the guidances that are stuck on top of every forum like
[Read Before Posting]QUESTIONS DO NOT BELONG IN GENERAL
Hello Everybody, In order to attempt to keep this forum neat and tidy the moderation team is asking you to post your questions into the Questions and Answers (Q&A) forum and not into the General section. You can find the Q&A forum by clicking...
forum.xda-developers.com
and the others. I've moved your thread to Android Q&A.
Thanks for your cooperation!
Regards
Oswald Boelcke
Senior Moderator

OBD2 diagnostic tool -need help

hello every one.
i hope i make myself understand, i'm french and not fluent in english.
i have a Mucar CDE900 a wired autonomous obd2 diagnostic tool running on android.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
it runs ok but lacks some common car brands/models, and it has many "dlc" purchase options to unlock its full potential
i have found on youtube someone showing this device rooted unlocked and able to run any software, but absolutely zero details on how he managed to do it.
video here :
i would like to try the same to test to run other obd software, like torque for example hoping it is more "complete" for my use here in france with local car brands
so far i get it runs on android (version?) , it has a usb3 port, wifi (i managed to get the mucar update OTA) and a sdcard reader and a file explorer, where i can see and launch an apk from the sdcard but the apk install auto close automatically and it send me back to the original device interface.
can someone coach me on what to do /what to try please ?
kaiz47 said:
can someone coach me on what to do /what to try please ?
Click to expand...
Click to collapse
Hello and good afternoon, @kaiz47 Welcome to XDA! I hope you'll always get the support you require.
However, prior to your next posting please read the guidances that are stuck on top of every forum like
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
and the others. I've moved your thread to Android Q&A.
Thanks for your cooperation!
Regards
Oswald Boelcke
Senior Moderator
I dunno. I'd rather lose the device and use either a OBD-II/Bluetooth or OBD-II/USB adapter and a stock Android device.
Me? My vehicle is 28 years old and uses OBD-I (a/k/a ALDL)
I use my own µC to go from OBD-I to USB and I have a custom Android app.
In another decade I might own a vehicle with OBD-II.
thank you oswald. sorry for not posting in the good place, i thought "hacking" was appropriate.
renate : i understand what you say : less trouble getting it to work. but since there is a video showing it is possible with my device, i want to try, if i can get a little help here.
anyone : some hints ? should i treat it like a locked tablet ? what are the methods - steps to investigate ?
edit : some info found online :
Android system: 6.0
Running memory: 2G
Storage memory: 16G
Screen size: 4 inch IPS (480×800)
CPU: MT6580 CORTEX-A7 1.3GHz 4 cores
can this point me towards some unlocking/rooting methods ?
Me, I'd see if there is a UART running console inside there.
Is ADB enabled?
I'm all for hacking/rooting a device for all access, but if they have paid tiers I wouldn't hack that.
By the same token, I wouldn't buy a Kindle with ads then defeat the ads.
OTOH, I wouldn't buy a Kindle anyway.

Categories

Resources