[GUIDE][ARM32] Patching your own init and sepolicy - Android Software/Hacking General [Developers Only]

Hi guys!
I am posting a very noob friendly guide on replacing init with your patched init file. This will help loading the patched sepolicy and can get temporary unrestricted root shell.
This guide is a prequel to the guide I already posted.
A big thank you to my friend @matteogenacio for helping me out to compiling all the files and patching sepolicy and helping when I was stuck!
Requirements:
(1) dirtyc0w temporary root shell tool: Click Here (Windows only)
(2) dirtyc0w files needed: https://github.com/matteoserva/dirtycow-arm32/archive/master.zip
(2) IDA Pro (Demo version is ok)
(3) HexEditor
(4) You need Ubuntu
(5) Android NDK Compiler
(6)android-libsepol : https://android.googlesource.com/platform/external/libsepol
(7) LOT OF PATIENCE
Click to expand...
Click to collapse
→ Patching your init and loading it into your phone:
(1) Open run_for_arm_devices.bat.
(2) Type "id". You get something similar to this screenshot:
{
"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"
}
(3) Type "cp init /sdcard/". Your original init file is copied into the sdcard.
(4) Type "exit" two times to get out of the shell.
(5) Type "adb pull /sdcard/init". The init file is copied into your computer.
(6) Open your init file in IDA PRO.
(7) Compare it with this source code: Click Here
(8) Look for the function which looks similar to this (This actually relates to bootchart_sample() function which you saw in the C++ code above):
(9) Compile shellcode.s using this command: arm-linux-androideabi-as shellcode.s -o shellcode
(10) Open shellcode file in HexEditor.
(11) Copy the content between AAAAINIT and AAAAFINE.
(12) Open init in XDA and copy the shellcode just after the "PUSHW {R4-R11,LR} line.
(13) My patched init file looked like this (more images to be added):
(14) At the end of the shellcode add "POP.W {R4-R11,PC}; NOP" instruction manually. Use ARMConverter. Copy the "Thumb2 HEX" Code.
(15) Click on File> Create DIFF File. Use a IDA Diff patcher to patch your original init.
(16) Now we have to load the init file. Turn off screen and wait 10 seconds.
(17) Type "adb push <your patched init file> /data/local/tmp".
(18) Open "run_for_arm_devices.bat".
(19) Type "run-as con". Then type "cd /data/local/tmp".
(20) Type "./a.out /init ./init". If it gives you "load destination error", try this one "./dirtycow /init ./init".
→ Injecting your sepolicy with rules for unrestricted access:
(1) Compile sepolicy-inject. Type this "gcc -std=gnu11 *.c -o t -I ../libsepol/include/ ../libsepol/src/libsepol.a -DARG_MAX=128" in terminal.
(2) Copy the the compiled sepolicy-inject file into sepolicy_generator. In sepolicy_generator folder, run ./installa.sh file.
(3) Now we have to copy the patched sepolicy file into phone. Type "adb push <your patched sepolicy file> /data/local/tmp/sepolicy".
Finally, open "adb logcat | grep audit". Look for messages that your sepolicy is loaded.
Hey we got root(temporary & unrestricted access)!
→ Notes:
(1) This works for only ARM32 Devices.
(2) This guide works regardless of your Android version. You can check if your phone is vulnerable to dirtyc0w using my debugging tools which I posted them in my guide.
(2) Another big thank you to my friend @matteogenacio for helping me out to compiling all the files and patching sepolicy and helping when I was stuck!

Reserved.

I'm glad I found this. I'm hoping maybe this can be converted to 64 bit, using a 64 bit dirty cow shell.
If you look in my thread, injecting root & setting SELinux, we have a 64bit shell.

Sorry if it's a noob question, but is "sepolicy" compatible between devices? My policy has attributes I wish it didn't have and I don't know how to remove them. So I thought replacing it with another one.

Was looking around XDA for a "guru's thread' on SeLinux - and found this one.
My Util bindfs wont work cos of SeL denials and I need help "neutralizing" the denial by changing SePolicy or alternatively running any relevant chron . So I'm putting my Q here. If ain't of relevance I'll Del it
A non root file explorer can rename existing file with bindfs but it cant create new files aka WhatsApp downloads fail
My Samsung Stock ROM SeLinux logging is disabled.
grep -i avc /proc/kmsg dmesg | grep -i avc logcat | grep -i avc
No results from above. So I cant figure out what's hurting the Create Perm
So I ( hopeully ) recreated the scenario on another Android 9 phone with SeLinux state changeable ( the other 1 is perm. enforced). & I get this avc denial
9421 9421 W com.whatsapp: type=1400 audit(0.0:15540): avc: denied { create } for comm=4D65646961446F776E6C6F61642023 name="LW9n+rkip578Ox9pPGthBD5DGfO7rIMxJyDHRHjQ9ZY=.tmp" scontext=u:r:untrusted_app:s0:c122,c257,c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=file permissive=0
So the issue could be untrusted app or becos my target /data/sdext3 has unlabeled context ?
ls -Zd /data/sdext3
u:object_r:unlabeled:s0 /data/sdext3
BTW just FYI chron fails. Why so ?
chcon -Rh u:object_r:sdcardfs:s0 /data/sdext3` # before that I `chown -R`ed to `root` entire `/data/sdext3` o/p of ths is `chcon: '/data/sdext3/j37 WhatsApp/data/colornote/backup/1606263606732-AUTO.doc' to u:object_r:sdcardfs:s0:
# Permission denied - throws this error for all files
. Does it mean I have to recompile kernel with updated policy OR any work-around ?

Related

Scripts for Nautilus (Linux file browser)

Hello !
I wrote some scripts for easily pushing and installing files/apks to your android device.
The advantage over "command line" and other scripts like mine :
- Multiple selection allowed (install 100 APKs in one click ! )
- You have a progress bar (shows only the progression between multiples files/ not the state of a single pushing).
- You can choose the destination on your phone with a simple prompt by choosing "Push to ..."
- It's a very simple and lightweight nautilus script...
- You don't have to (in fact, you can't) put the usb in "usb disk" mode, just have debugging enabled.
Examples
To simply install some applications, just select them, right click, go to scripts->ADB->install
{
"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"
}
Progression :
Idem for files :
Progress :
Confirmation :
(So the "Push to ..." allow you to choose a destination. "Push to musique" is just a copy of "Push to sdcard" with the second line of the script changed to copy files to /sdcard/music/ instead of /sdcard/ )
How to install
- Download the scripts :
http://www.itstudents.be/~tom/android/ADB Scripts for Nautilus.tar.gz​- Uncompress the files in ~/.gnome2/nautilus_scripts/ADB/
So if your name is mario, you should copy the 3 files to :
/home/mario/.gnome2/nautilus-scripts/ADB/
You are not obliged to make the last folder named ADB, it's just to make "categories" in the Nautilus script menu (like in the screenshots)​
Requirements
- A correctly installed ADB
What is a correctly installed ADB?
- The PATH environment variable has to be set, to be able to just type "adb" and not "/path/to/sdk/platform-tools/adb". If it's not done :
Edit the file ~/.bashrc , you can do that by typing in the console
Code:
gedit ~/.bashrc
and add this line changed for yourself at the end of the file
Code:
export PATH=${PATH}:/path/to/android-sdk-linux_86/platform-tools/
Or, if this does'nt work :
Edit the file /etc/environment , you can do that by typing in the console
Code:
gedit /etc/environment
and add this text changed for yourself at the end of the line "PATH:", before the last ["]
Code:
:/path/to/android-sdk-linux_86/platform-tools/
- The rules for udev have to be made to allow any non-root user to access to the device
Method for any HTC device :
Edit with root rights the file /etc/udev/rules.d/51.android.rules by typing in the console :
Code:
gksudo gedit /etc/udev/rules.d/51.android.rules
and add the lines :
Code:
SUBSYSTEM=="usb|usb_device", SYSFS{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
Hope you'll enjoy !
Please correct my english
don't want people to know what you're listening to, eh?
It's cool; I like it.
very useful
thanks man
I've been wanting to do something like this but never had time to. Will definitely test this out!
Sent from my Nexus One using XDA App
Oh epic win thanks for this!
Sent from my HTC Hero using XDA App
Please reupload ADB Scripts for Nautilus.tar.gz somewhere.
Stupid me...
http://www.kmel.be/~tom/android/ADB Scripts for Nautilus.tar.gz
Please note a little "bug", the progress bar progress when a file start transfer. So if you send just one big file, it will be at 100% for a little time...
Easily correctible, but I haven't the time now...
MappaM said:
Stupid me...
http://www.kmel.be/~tom/android/ADB Scripts for Nautilus.tar.gz
Please note a little "bug", the progress bar progress when a file start transfer. So if you send just one big file, it will be at 100% for a little time...
Easily correctible, but I haven't the time now...
Click to expand...
Click to collapse
nice work. very handy
EDIT: actually I may have spoke too soon, these don't seem to be working for me. Ubuntu 10.10
I know my udev and $PATH are all set up correctly. So I'm not sure where these are failing for me..
any thoughts?
EDIT2: OK it was a $PATH issue the ~.bashrc however is only for interactive non login shells adding the adb path to ~.profile and a re-login solved my problem with this script. Or alternatively you could call adb in the script using it's full path.
Thanks MappaM for the great base script!
Here is my version of "Push to Movies":
My solution to the immediately full progress bar was to use the --pulsate option in zenity this works for me because I am likely to only be sending one file anyway and don't need the fine grain feed back of an incremental progress bar. The one that bounces back and forth is what you will see.
echo "15" ; sleep 1
is a hack, you may not need it but for me it lets the pulsate flag work.
zenity bugs reported here
https://bugs.launchpad.net/zenity/+bug/291850
https://bugzilla.gnome.org/show_bug.cgi?id=567663
Code:
#!/bin/sh
#this is MY path, your path will be different . change this path.
android_path="/sdcard/media/video/movies/"
i=1
(
for thing in "[email protected]"
do
# this first echo tricks the pulsate into working you may not need it. try it both with and without it.
echo "15" ; sleep 1
echo $(($i * 100 / $#))
echo "# Pushing \"${thing}\"" ;
adb push "${thing}" $android_path
i=$(($i+1))
done; i=$(($i-1)) ; echo "# $i files pushed." ) | zenity --progress --pulsate --auto-kill --width=300 --text "Copying files..." --title "Pushing files to $android_path"

[Guide][Win-Linux-Script] The Easiest Ways For Getting All Device's Mounting Points

For Non-Rooted Devices and Rooted Devices​
Here is a summary on how to get mounting points without rooting or extracting recovery.img.
The different procedures only needs to have adb shell or terminal emulator.. I will explain using adb shell through pc.
After establishing adb connection to your device, you can choose any of the following procedures to get your mounting points:
#1
Code:
adb shell
cat /proc/mounts
This will give you info about device, the mount point, the file system type, and how it is mounted.
Limitation: This method, however, will not give you all mounting points.!!!
{
"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"
}
#2
Code:
adb shell
cat /proc/partitions
This is more neat, it will give you info about ALL dev blocks and their names (not the familiar name!), and block size
Limitation: Needs from you to figure out which block belong to which partition name.!!
#3
Code:
adb shell
ls -al /dev/block/platform/[B][COLOR="Blue"]dw_mmc[/COLOR][/B]/by-name
This one is the command that I like on non-rooted device..! It will give you info about the dev block names WITH their familiar names (i.e, boot, recovery, system... etc) :laugh:
This command is not universal between devices, and you will need to gather its pieces (/dev/block/platform/dw_mmc/by-name).
How?
- In your device, use any explorer that can get you to the device root (personally I use ES Explorer, by pressing on "/" on navigation bar).
- Go to "/dev/block/platform/" folder
- Here you will see some files and folders, we need to open folders and search for the folder called "by-name" inside one of them; in my situation it was "dw_mmc" folder which has the folder "by-name" inside it.
- At the end, my targeted piece info will be (/dev/block/platform/dw_mmc/by-name)
- Now open adb shell and put the command..
***​
For Rooted Devices Only​
There are different ways to get mounting points in rooted device (including the non-rooted devices way), but the easiest way to get all device mounting points is to push parted binary to /system/bin folder and run it.
Code:
adb remount
adb shell "su" "" "mount -o remount,rw /system"
adb push parted /system/bin/parted
adb shell
chmod 755 /system/bin/parted
parted /dev/block/[B][COLOR="Blue"]mmcblk0[/COLOR][/B]
print
Here, your mounting points will start with /dev/block/mmcblk0p* where (*) is the number shown in the table above for each partition.
example:
The preload partition mounting point will be mmcblk0p12
The modem partition mounting point will be mmcblk0p8
The system partition mounting point will be mmcblk0p9
The Kernel partition mounting point will be mmcblk0p5
and so on
Don't forget to "quit" the parted action after grasping your device mounting points.
N.B:
- You may need to run first:
Code:
adb shell
cat /proc/partitions
to know what is the initial name for your device partition.. In the example above, it was mmcblk0.
- Also to be able to do adb push to /system partition, you will need adbd insecure installed in your device (Check this thread for that app), or to push it manually by any root explorer and then fix permissions to 755.
***​
Pre-made Scripts​Windows users
Here is a script I wrote for both non-rooted (way #3) and rooted devices for windows users.
Just extract the content in any folder and run the script that you want ("Non-Rooted and Rooted.cmd" or "Rooted Only.cmd")
Don't forget to install adbd insecure in rooted device in order to use Rooted Only.cmd script.
Linux users
As same, here is a script I wrote for both non-rooted (way #3) and rooted devices for linux users.
Just extract the content in any folder and run the script that you want ("non-rooted" or "rooted")
Don't forget to install adbd insecure in rooted device in order to use rooted script.
N.B: The linux scripts are tested with cygwin emulator on windows machine.. So needs feedback on actual machine.!!
Cheers
reserved
Thank you, I go to try.
Linux script added to OP
Thanks
Thank you You are the best one

[GUIDE][HOW-TO] Add Koush SuperUser In Settings Of AOSP Or Any Source Built Rom

{
"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"
}
This is for people who build AOSP or any roms from source for general public or for personal use. Koushik Dutta has given quite a good explanation here but some more things are needed to get it fully working. You should know what you are doing before you read ahead. I am not responsible if you mess up your device or any of your personal belongings
Click to expand...
Click to collapse
​
This guide will focus on Nexus 5 but the same procedure should work on Nexus 4, Nexus 7 (2012 & 2013) or any other device with little or no modifications.
Prerequisite:
Knowledge about building roms from source
knowledge about cherry-picking commits and resolving the conflicts
basic knowledge about device trees
A logical and working brain
Click to expand...
Click to collapse
Step 1: Add the required packages into your source:
You need to add the Superuser related repos from cyanogenmod into your rom source. This can be done using a local manifest. Make a local manifest by any name say su.xml and place it in .repo/local_manifests/su.xml. If the "local_manifests" folder doesn't exists in .repo then make one. Copy paste the following lines in su.xml
Code:
Step 2: Cherry-pick commits
There are many commits to refer. I would link some to you. You can cherry-pick, for example,this or this. You can refer any of such commits. Cherry-pick is to be done in packages/apps/Settings. There might be conflicts in Android.mk & proguard.flags. Just compare the files from the ones in the above linked commits and fix them.
Step 3 : Add some required flags to device make file
To make Superuser to go under Settings, the most important flag needed is this :
Code:
SUPERUSER_EMBEDDED := true
Without this, superuser won't get embedded into Settings.apk. You can add this flag in any ".mk" file. I have added it under device/lge/hammerhead/device.mk. Some build.prop lines are also needed to get root working. Also you need to make the Superuser and su binary packages to be built. All the lines needed are summarized as follows:
Code:
# SU Support
SUPERUSER_EMBEDDED := true
PRODUCT_PACKAGES += \
Superuser \
su
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.root_access=3
# Enable ADB authentication
PRODUCT_PROPERTY_OVERRIDES += \
ro.adb.secure=1
Add all of them on the same location device/lge/hammerhead/device.mk.
Step 4[MOST IMPORTANT] : Import init.superuser.rc in init.rc or similar file.
People do everything properly upto step 3 but they never get superuser to work properly. When you try opening any root app, ADB gives the following error :
Code:
D/su ( 2529): su invoked.
D/su ( 2529): starting daemon client 10019 10019
E/su ( 2529): connect failed with 2: No such file or directory
su daemon is started by init.superuser.rc. You need to import it in init.rc or in this case init.hammerhead.rc or any similar init file like this :
Code:
import init.hammerhead.usb.rc
import init.superuser.rc
on early-init
mount debugfs debugfs /sys/kernel/debug
chown system system /sys/kernel/debug/kgsl/proc
If you don't do this, system won't know that a file "init.superuser.rc" even exists. Hence, the daemon fails, failing root access eventually
DONE!!!! Just build the rom as you normally do and you have # Superuser under Settings. I hope it was clear enough. I have tried to add everything I recollect but if you find anything missing then please let me know. Thank you!!!! And enjoy coding​
Reserved
One more
Wouldn't this be better to add to a general android hacking section as it could also apply to more devices?
Somcom3X said:
Wouldn't this be better to add to a general android hacking section as it could also apply to more devices?
Click to expand...
Click to collapse
Yeah that's right. I kept nexus 5 as example so i added it up here. You can report it to get to general section. I am not near the pc atm
Looks like it was moved

[Developers] Support and development init.d script

{
"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"
}
Welcome to this subject where I'll share the following information to activate the terminal init.d our support, as well as the development of the topic is addressed primarily to the developer community roms in order to implement and improve its development in each of the phones and better autonomy thereof is provided.
Warning: Before continuing please read the documentation that will expose so they can check its development, those who only discuss other issues please abtenerse as this issue is not in order to respond is only to well that development develop properly targeted by this issue.
The tools I used for the development of the init.d support they can find at the end of the subject for downloading and asu same time the use so you can verify some of the things we will discuss on this issue.
no script can be universal because it is different and its code and some values and parameters are only applicable for each smartphone
Requirements: root access and SuperSU
1.- proceed with the most basic thing is to give root access to our terminal this method according in each terminal is indispensable as the first requirement
2.- as a second step this would be related to the installation of busybox in the terminal and ending with the installation of the same proceed with checking the same watching the following path with a file browser /system/xbin, if you have any doubts use the application busybox checker to verify the installation of the same
3.- as a third step needs a file browser and asu time they open the routes to them to enter and to edit text files comfortably
4.- as fourth step is to go to the /system /etc there init.qcom.post_boot.sh locate file name to open it proceed traditionally files editor of exploring and we should be on the part of all the way just to add the following lines
Code:
# support init.d
/system/xbin/busybox run-parts /system/etc/init.d
and finished we proceed to save changes to the file
5.- In this step we will create a folder called init.d name is created only once we proceed with changing the permissions would be: 0755 attached screenshot for more details of the permits, download the file will come a script called 99SuperSUDaemon and moved to the /system/etc/init.d apply the same route that takes the folder permissions ie the file 99SuperSUDaemon 0755 will have permission to run properly without any problem because if you put 0644 permits will not run
6.- proceed with terminal power cycle this is to enable support init.d our terminal as seen was not very complicated because they bring roms have actually proven but have not convecid me a story to execution of script obtaining a negative result this method I show a positive result :good:
-Tools
I bring a tool that enables init.d support only run automatically and ready
the end of the song I'll let the files that I used for this topic
1. As a first step it will be necessary to know what we are going and we want to remember that there is no script and not the same parameters with a value change at each terminal
2.- we will create in the internal memory of the terminal a folder called tools this may be optional but we'll use as an example to notice what we do at every step and can understand a bit about this topic
3.- after the tools created folder create a script so that they will ask is to copy the files that are present on that route in this case I will take as an example the following path: /proc/sys/vm is where some values are saved by heart
Code:
#!/system/bin/sh
# copying files
# script by kaiiori xda-developers
sleep 2
echo "creating internal memory directory"
busybox mkdir /storage/emulated/0/tools/vm
sleep 2
echo "copying files"
sleep 2
cp -r /proc/sys/vm /storage/emulated/0/tools
sleep 2
echo "copying completed"
exit 0;
save file vm.sh
4.- install android terminal in the terminal run the following commands
root permissions
Code:
su
go to the directory of your internal memory in this case this is my directory
Code:
cd /storage/emulated/0/tools
find files in the directory
Code:
ls
run the script through the terminal
Code:
sh vm.sh
in the directory /storage/emulated/0/tools/vm has been created a folder called VM and see if open files that have been copied to the internal memory of the terminal
5.- if you open the file values that have default in this case if you to installed scripts should the value applied to the parameter of the same appear if it is not is because there is a problem with the script in content and has to reahacer to carry just the change you want to apply
checking values applied
1.- after you created the script with the content you need to check to see if the value applied is that we have written script is the file we should show the same value as if it does not show is because the code is not right
2.- I leave a script will help them review the values and see if they were applied correctly
Code:
#!/system/bin/sh
# copying files
# script by kaiiori xda-developers
echo " " >>/storage/emulated/0/tools/info.log
echo "-------------------------------" >>/storage/emulated/0/tools/info.log
cat /proc/sys/vm/swappiness >>/storage/emulated/0/tools/info.log
echo " " >>/storage/emulated/0/tools/info.log
echo "-------------------------------" >>/storage/emulated/0/tools/info.log
root permissions
Code:
su
go to the directory of your internal memory in this case this is my directory
Code:
cd /storage/emulated/0/tools
find files in the directory
Code:
ls
run the script through the terminal
Code:
sh script_log.sh
in the directory you create a log file there appear the value that was applied in this case is 100 by default but as I modify it appears 40 that is the result we must apply
with this information I will end my subject just adding the init.d support users should provide updates and other improvements because honestly the code they use and check it when I get the same default the script I use for this and to apply the changes not be able to release it in no way is the greetings own development
reserv
reserved

Android Studio Stuck on Loading Project

I was working in Android Studio and accidentally locked my Android Folder containing the Sdk, I re gave myself the permissions and unlocked it but when I try to reopen my android project it stays stuck on loading project.
{
"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 have tried restarting my computer(linux) and running ./studio.sh but it is still not loading.
I am also seeing in the terminal:
2021-03-19 12:48:57,346 [ 56749] WARN - Container.ComponentManagerImpl - Do not use constructor injection (requestorClass=com.android.tools.idea.apk.issues.SetupIssueReporter)
first, glad to see you use programming on linux, i encourage you continue using it and learn it
that "WARN", is normal when starting studio from command line.
check in ~/HOME/AndroidStudioProjects directory, (if you allowed android studio to install location for projects in ~/HOME/AndroidStudioProjects, and in ~/HOME directory check if you have "Android" directory, there is located Sdk tools.
check permissions for directories, just check this website , cd (open directory, terminal command) to ~/HOME/AndroidStudioProjects;
Code:
~/HOME/AndroidStudioProjects
, and check permissions via
Code:
ls -l
, or
Code:
cd AndroidStudioProjects
to get deeper into, to list project directories you have, and check their permissions, they need to have write, and read permissions for owner at least
And replace ~/HOME, with your name you use in linux, if command don't work, so not to get confused there
indestructible master said:
first, glad to see you use programming on linux, i encourage you continue using it and learn it
that "WARN", is normal when starting studio from command line.
check in ~/HOME/AndroidStudioProjects directory, (if you allowed android studio to install location for projects in ~/HOME/AndroidStudioProjects, and in ~/HOME directory check if you have "Android" directory, there is located Sdk tools.
check permissions for directories, just check this website , cd (open directory, terminal command) to ~/HOME/AndroidStudioProjects;
Code:
~/HOME/AndroidStudioProjects
, and check permissions via
Code:
ls -l
, or
Code:
cd AndroidStudioProjects
to get deeper into, to list project directories you have, and check their permissions, they need to have write, and read permissions for owner at least
And replace ~/HOME, with your name you use in linux, if command don't work, so not to get confused there
Click to expand...
Click to collapse
Thanks so much for you help and encouragement for programming with linux!
I checked the permissions of the folder and am seeing:
Code:
drwxrwxr-x
Which I think means that I have permissions for this folder.
yjay18 said:
I was working in Android Studio and accidentally locked my Android Folder containing the Sdk, I re gave myself the permissions and unlocked it but when I try to reopen my android project it stays stuck on loading project.
View attachment 5254367
I have tried restarting my computer(linux) and running ./studio.sh but it is still not loading.
I am also seeing in the terminal:
2021-03-19 12:48:57,346 [ 56749] WARN - Container.ComponentManagerImpl - Do not use constructor injection (requestorClass=com.android.tools.idea.apk.issues.SetupIssueReporter)
Click to expand...
Click to collapse
I keep reading a lot of posts when I first get into trouble. This is how I once reached this website ( https://kodlogs.net/329/android-studio-stuck-on-installing-apk ) and got the desired solution. You can read this post as well as visit here. I think it will be very useful for you

Categories

Resources